@lemonriver/core 0.8.0 → 1.0.1

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.
Files changed (54) hide show
  1. package/README.md +3 -1
  2. package/dist/{build-Bdagm0FU.js → build-CiT4CNey.js} +1 -1
  3. package/dist/cli/bin.js +11 -4
  4. package/dist/client-DpO_eR9X.js +57 -0
  5. package/dist/{config-Begts3gq.js → config-BI3VRI2n.js} +4557 -4596
  6. package/dist/{dev-DjjzmT28.js → dev-DpzBn_sf.js} +2 -2
  7. package/dist/index.js +1 -1
  8. package/dist/locale/index.js +1 -1
  9. package/dist/mcp-CjYDzcJa.js +262 -0
  10. package/dist/{preview-C9y9MTY1.js → preview-Dro8hl5_.js} +2 -2
  11. package/dist/vite/index.js +1 -1
  12. package/dist/{zh-tw-DcrDeKxr.js → zh-tw-BhYyMx0-.js} +40 -40
  13. package/package.json +1 -1
  14. package/skills/slide-authoring/SKILL.md +2 -0
  15. package/src/app/lemonriver/agent-providers/section.tsx +13 -4
  16. package/src/app/lemonriver/board/use-self-check.ts +1 -1
  17. package/src/app/lemonriver/brand/mascot.tsx +4 -1
  18. package/src/app/lemonriver/chrome/app-chrome.tsx +6 -0
  19. package/src/app/lemonriver/chrome/sidebar-extras.tsx +9 -1
  20. package/src/app/lemonriver/feedback/lemon-empty.tsx +3 -1
  21. package/src/app/lemonriver/guide/guide-prompt.tsx +89 -0
  22. package/src/app/lemonriver/guide/state.ts +29 -0
  23. package/src/app/lemonriver/guide/use-guide.ts +17 -0
  24. package/src/app/lemonriver/help/help-page.tsx +5 -0
  25. package/src/app/lemonriver/help/model.test.ts +72 -0
  26. package/src/app/lemonriver/help/model.ts +10 -1
  27. package/src/app/lemonriver/home/home-page.tsx +25 -7
  28. package/src/app/lemonriver/mcp/respond.ts +47 -0
  29. package/src/app/lemonriver/mcp/screenshot.tsx +155 -0
  30. package/src/app/lemonriver/mcp/self-check.tsx +65 -0
  31. package/src/app/lemonriver/outline/describe-page.tsx +3 -1
  32. package/src/app/lemonriver/routes.test.tsx +4 -1
  33. package/src/app/lemonriver/routes.tsx +12 -11
  34. package/src/app/lemonriver/settings/settings-page.tsx +3 -3
  35. package/src/app/lemonriver/share/freeze.ts +13 -5
  36. package/src/app/lemonriver/text/en.ts +227 -7
  37. package/src/app/lemonriver/text/es.ts +23 -6
  38. package/src/app/lemonriver/text/ja.ts +23 -6
  39. package/src/app/lemonriver/text/types.ts +14 -1
  40. package/src/app/lemonriver/text/zh-cn.ts +218 -6
  41. package/src/app/lemonriver/text/zh-tw.ts +218 -6
  42. package/src/app/lemonriver/update/beta-badge.tsx +3 -0
  43. package/src/app/lemonriver/update/lazy-page.tsx +29 -0
  44. package/src/app/lemonriver/update/notice-mascot.tsx +18 -0
  45. package/src/app/lemonriver/update/restart-notice.tsx +47 -0
  46. package/src/app/lemonriver/update/state.ts +33 -0
  47. package/src/app/lemonriver/update/update-prompt.tsx +30 -1
  48. package/src/app/lemonriver/update/version.test.ts +14 -0
  49. package/src/app/lemonriver/update/version.ts +5 -0
  50. package/src/locale/en.ts +8 -8
  51. package/src/locale/es.ts +10 -8
  52. package/src/locale/ja.ts +9 -8
  53. package/src/locale/zh-cn.ts +9 -8
  54. package/src/locale/zh-tw.ts +9 -8
@@ -1,6 +1,6 @@
1
1
  import { V as PKG_NAMES } from "./update-b1dSg_FW.js";
2
- import { a as printUrls, i as printShortcutsHint, n as formatError, o as shortcutsEnabled, r as printHeader, s as startupDuration, t as createCliLogger } from "./cli/bin.js";
3
- import { n as DEV_SUPERVISED_ENV, t as createViteConfig } from "./config-Begts3gq.js";
2
+ import { a as printUrls, c as startupDuration, i as printShortcutsHint, n as formatError, r as printHeader, s as shortcutsEnabled, t as createCliLogger } from "./cli/bin.js";
3
+ import { n as DEV_SUPERVISED_ENV, t as createViteConfig } from "./config-BI3VRI2n.js";
4
4
  import path from "node:path";
5
5
  import { existsSync } from "node:fs";
6
6
  import { fork } from "node:child_process";
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as en, i as es, n as zhCN, r as ja, t as zhTW } from "./zh-tw-DcrDeKxr.js";
1
+ import { a as en, i as es, n as zhCN, r as ja, t as zhTW } from "./zh-tw-BhYyMx0-.js";
2
2
  import { n as defaultDesign, r as designToCssVars, t as cssVarsToString } from "./design-Cpqx7SJs.js";
3
3
  import { Children, cloneElement, createContext, isValidElement, useCallback, useContext, useEffect, useLayoutEffect, useRef, useState, useSyncExternalStore } from "react";
4
4
  import { toast } from "sonner";
@@ -1,4 +1,4 @@
1
- import { a as en, i as es, n as zhCN, r as ja, t as zhTW } from "../zh-tw-DcrDeKxr.js";
1
+ import { a as en, i as es, n as zhCN, r as ja, t as zhTW } from "../zh-tw-BhYyMx0-.js";
2
2
  //#region src/locale/format.ts
3
3
  function format(template, vars) {
4
4
  return template.replace(/\{(\w+)\}/g, (m, key) => {
@@ -0,0 +1,262 @@
1
+ import { b as SLIDE_ID_RE } from "./update-b1dSg_FW.js";
2
+ import { o as readVersion } from "./cli/bin.js";
3
+ import { t as callDevServer } from "./client-DpO_eR9X.js";
4
+ import { createInterface } from "node:readline";
5
+ //#region src/lemonriver/mcp/protocol.ts
6
+ const PARSE_ERROR = -32700;
7
+ const INVALID_REQUEST = -32600;
8
+ const METHOD_NOT_FOUND = -32601;
9
+ const INTERNAL_ERROR = -32603;
10
+ const PROTOCOL_VERSION = "2024-11-05";
11
+ function writeRpc(out, message) {
12
+ out.write(`${JSON.stringify(message)}\n`);
13
+ }
14
+ function rpcResult(id, result) {
15
+ return {
16
+ jsonrpc: "2.0",
17
+ id,
18
+ result
19
+ };
20
+ }
21
+ function rpcError(id, code, message) {
22
+ return {
23
+ jsonrpc: "2.0",
24
+ id,
25
+ error: {
26
+ code,
27
+ message
28
+ }
29
+ };
30
+ }
31
+ function isRequest(value) {
32
+ return typeof value === "object" && value !== null && "method" in value;
33
+ }
34
+ /**
35
+ * One JSON-RPC 2.0 message per line, in both directions. A line that does not
36
+ * parse gets -32700 with a null id, which is the only reply a peer can match
37
+ * to what it sent. Notifications (no `id`) are handled and never answered.
38
+ */
39
+ async function serveLines(input, output, handle) {
40
+ const lines = createInterface({
41
+ input,
42
+ crlfDelay: Number.POSITIVE_INFINITY,
43
+ terminal: false
44
+ });
45
+ for await (const line of lines) {
46
+ const text = line.trim();
47
+ if (!text) continue;
48
+ let message;
49
+ try {
50
+ message = JSON.parse(text);
51
+ } catch {
52
+ writeRpc(output, rpcError(null, PARSE_ERROR, "Parse error"));
53
+ continue;
54
+ }
55
+ if (!isRequest(message) || typeof message.method !== "string") {
56
+ writeRpc(output, rpcError(typeof message === "object" && message !== null && "id" in message ? normalizeId(message.id) : null, INVALID_REQUEST, "Invalid Request"));
57
+ continue;
58
+ }
59
+ const id = normalizeId(message.id);
60
+ const notification = !("id" in message);
61
+ try {
62
+ const result = await handle({
63
+ id,
64
+ method: message.method,
65
+ params: typeof message.params === "object" && message.params !== null ? message.params : {}
66
+ });
67
+ if (!notification) writeRpc(output, rpcResult(id, result ?? {}));
68
+ } catch (err) {
69
+ if (notification) continue;
70
+ const code = err.rpcCode;
71
+ writeRpc(output, rpcError(id, typeof code === "number" ? code : INTERNAL_ERROR, err.message ?? String(err)));
72
+ }
73
+ }
74
+ }
75
+ function normalizeId(id) {
76
+ if (typeof id === "string" || typeof id === "number") return id;
77
+ return null;
78
+ }
79
+ //#endregion
80
+ //#region src/lemonriver/mcp/tools.ts
81
+ const TOOLS = [
82
+ {
83
+ name: "lemonriver_current",
84
+ description: "Show where the user is right now in the open LemonRiver window: which deck, which page, and which element they have selected in the inspector. Use this whenever the user says \"this page\", \"this slide\", \"here\" or \"this element\" without naming it — the answer changes every time they navigate, so call it again instead of reusing an earlier result.",
85
+ inputSchema: {
86
+ type: "object",
87
+ properties: {},
88
+ additionalProperties: false
89
+ },
90
+ readOnlyHint: true
91
+ },
92
+ {
93
+ name: "lemonriver_list_decks",
94
+ description: "List the decks in this LemonRiver workspace: id, title and page count. Use it to find the slideId that the other LemonRiver tools take.",
95
+ inputSchema: {
96
+ type: "object",
97
+ properties: {},
98
+ additionalProperties: false
99
+ },
100
+ readOnlyHint: true
101
+ },
102
+ {
103
+ name: "lemonriver_screenshot_page",
104
+ description: "Render one page of a deck and return it as a JPEG image, exactly as the deck lays it out at 1280x720. Use it after writing or changing a page to see what the user will see — type sizes, spacing, overflow and overlaps are invisible in the source. `page` is 1-based. `step` picks an animation step the way the preview page does (0 is settled).",
105
+ inputSchema: {
106
+ type: "object",
107
+ properties: {
108
+ slideId: {
109
+ type: "string",
110
+ description: "Deck folder name under slides/."
111
+ },
112
+ page: {
113
+ type: "integer",
114
+ minimum: 1,
115
+ description: "1-based page number."
116
+ },
117
+ step: {
118
+ type: "integer",
119
+ minimum: 0,
120
+ description: "Animation step to settle on; omit for the finished frame."
121
+ }
122
+ },
123
+ required: ["slideId", "page"],
124
+ additionalProperties: false
125
+ },
126
+ readOnlyHint: true
127
+ },
128
+ {
129
+ name: "lemonriver_self_check",
130
+ description: "Run the same layout self-check as the story board's Self-check button on a whole deck, and record the result on the board. It reports tiny type, overflowing or overlapping blocks, missing speaker notes and long titles, plus any page it could not read. Run it before telling the user a deck is finished.",
131
+ inputSchema: {
132
+ type: "object",
133
+ properties: { slideId: {
134
+ type: "string",
135
+ description: "Deck folder name under slides/."
136
+ } },
137
+ required: ["slideId"],
138
+ additionalProperties: false
139
+ },
140
+ readOnlyHint: true
141
+ },
142
+ {
143
+ name: "lemonriver_comments",
144
+ description: "List the comments the user has left on a deck and has not resolved yet: page number, the note, and the source line it points at. Use it when the user asks what still needs fixing, or before reworking a deck.",
145
+ inputSchema: {
146
+ type: "object",
147
+ properties: { slideId: {
148
+ type: "string",
149
+ description: "Deck folder name under slides/."
150
+ } },
151
+ required: ["slideId"],
152
+ additionalProperties: false
153
+ },
154
+ readOnlyHint: true
155
+ }
156
+ ];
157
+ var ToolInputError = class extends Error {
158
+ constructor(message) {
159
+ super(message);
160
+ this.name = "ToolInputError";
161
+ }
162
+ };
163
+ function text(value) {
164
+ return [{
165
+ type: "text",
166
+ text: JSON.stringify(value, null, 2)
167
+ }];
168
+ }
169
+ function requireSlideId(args) {
170
+ const value = args.slideId;
171
+ if (typeof value !== "string" || !SLIDE_ID_RE.test(value)) throw new ToolInputError("slideId must be a deck folder name under slides/");
172
+ return value;
173
+ }
174
+ function optionalPage(args) {
175
+ const value = args.page;
176
+ if (typeof value !== "number" || !Number.isInteger(value) || value < 1) throw new ToolInputError("page must be a positive integer");
177
+ return value;
178
+ }
179
+ function optionalStep(args) {
180
+ const value = args.step;
181
+ if (value === void 0) return void 0;
182
+ if (typeof value !== "number" || !Number.isInteger(value) || value < 0) throw new ToolInputError("step must be a non-negative integer");
183
+ return value;
184
+ }
185
+ async function callTool(cwd, name, args) {
186
+ try {
187
+ switch (name) {
188
+ case "lemonriver_current": {
189
+ const current = await callDevServer(cwd, "current", {});
190
+ if (current === null) return { content: [{
191
+ type: "text",
192
+ text: "The user has not opened a deck in LemonRiver yet."
193
+ }] };
194
+ return { content: text(current) };
195
+ }
196
+ case "lemonriver_list_decks": return { content: text(await callDevServer(cwd, "decks", {})) };
197
+ case "lemonriver_comments": return { content: text(await callDevServer(cwd, "comments", { slideId: requireSlideId(args) })) };
198
+ case "lemonriver_screenshot_page": {
199
+ const shot = await callDevServer(cwd, "screenshot", {
200
+ slideId: requireSlideId(args),
201
+ page: optionalPage(args),
202
+ step: optionalStep(args)
203
+ });
204
+ return { content: [{
205
+ type: "image",
206
+ data: shot.image,
207
+ mimeType: shot.mimeType
208
+ }] };
209
+ }
210
+ case "lemonriver_self_check": return { content: text(await callDevServer(cwd, "self-check", { slideId: requireSlideId(args) })) };
211
+ default: throw new ToolInputError(`unknown tool: ${name}`);
212
+ }
213
+ } catch (err) {
214
+ return {
215
+ content: [{
216
+ type: "text",
217
+ text: err.message ?? String(err)
218
+ }],
219
+ isError: true
220
+ };
221
+ }
222
+ }
223
+ //#endregion
224
+ //#region src/lemonriver/mcp/index.ts
225
+ function createHandler(cwd, version = readVersion()) {
226
+ return async function handle(request) {
227
+ switch (request.method) {
228
+ case "initialize": {
229
+ const requested = request.params.protocolVersion;
230
+ return {
231
+ protocolVersion: typeof requested === "string" ? requested : PROTOCOL_VERSION,
232
+ capabilities: { tools: {} },
233
+ serverInfo: {
234
+ name: "lemonriver",
235
+ version
236
+ }
237
+ };
238
+ }
239
+ case "notifications/initialized":
240
+ case "initialized": return {};
241
+ case "ping": return {};
242
+ case "tools/list": return { tools: TOOLS.map((tool) => ({
243
+ name: tool.name,
244
+ description: tool.description,
245
+ inputSchema: tool.inputSchema,
246
+ annotations: { readOnlyHint: tool.readOnlyHint ?? true }
247
+ })) };
248
+ case "tools/call": {
249
+ const name = request.params.name;
250
+ if (typeof name !== "string") throw new Error("tools/call needs a tool name");
251
+ return await callTool(cwd, name, typeof request.params.arguments === "object" && request.params.arguments !== null ? request.params.arguments : {});
252
+ }
253
+ default: throw Object.assign(/* @__PURE__ */ new Error(`Method not found: ${request.method}`), { rpcCode: METHOD_NOT_FOUND });
254
+ }
255
+ };
256
+ }
257
+ /** `lemonriver mcp`: JSON-RPC over stdio, one message per line, nothing else on stdout. */
258
+ async function runMcp(cwd, io) {
259
+ await serveLines(io.input, io.output, createHandler(cwd));
260
+ }
261
+ //#endregion
262
+ export { runMcp };
@@ -1,5 +1,5 @@
1
- import { a as printUrls, i as printShortcutsHint, o as shortcutsEnabled, r as printHeader, s as startupDuration, t as createCliLogger } from "./cli/bin.js";
2
- import { t as createViteConfig } from "./config-Begts3gq.js";
1
+ import { a as printUrls, c as startupDuration, i as printShortcutsHint, r as printHeader, s as shortcutsEnabled, t as createCliLogger } from "./cli/bin.js";
2
+ import { t as createViteConfig } from "./config-BI3VRI2n.js";
3
3
  import { mergeConfig, preview as preview$1 } from "vite";
4
4
  //#region src/cli/preview.ts
5
5
  async function preview(opts = {}) {
@@ -1,2 +1,2 @@
1
- import { t as createViteConfig } from "../config-Begts3gq.js";
1
+ import { t as createViteConfig } from "../config-BI3VRI2n.js";
2
2
  export { createViteConfig };
@@ -60,8 +60,8 @@ const en = {
60
60
  nothingMatchesPrefix: "Nothing matches ",
61
61
  nothingMatchesSuffix: " in this folder.",
62
62
  noSlidesYet: "No slides yet",
63
- createSlideHintPrefix: "Run ",
64
- createSlideHintSuffix: " in your agent to scaffold one.",
63
+ createSlideHintPrefix: "Ask your agent to “make a slide deck about …” (in Claude Code, run ",
64
+ createSlideHintSuffix: ").",
65
65
  folderEmptyTitle: "{name} is empty",
66
66
  folderEmptyHint: "Drag a slide from Draft into this folder in the sidebar.",
67
67
  slideActions: "Slide actions",
@@ -94,10 +94,10 @@ const en = {
94
94
  resizeSidePanel: "Resize side panel",
95
95
  home: "Home",
96
96
  backToHome: "Back to home",
97
- agentConnected: "Agent connected",
98
- agentConnectedTooltip: "The current slide and inspector selection are synced to your agent in real time.",
99
- agentDisconnected: "Agent disconnected",
100
- agentDisconnectedTooltip: "Lost connection to the dev server, so your agent can no longer see the current slide or inspector selection. Restart the dev server to restore the connection.",
97
+ agentConnected: "Local service connected",
98
+ agentConnectedTooltip: "The browser and the local service are connected: the deck you are viewing, the page number and the selected element are written into the workspace, where an agent working in this folder can read them.",
99
+ agentDisconnected: "Local service disconnected",
100
+ agentDisconnectedTooltip: "The browser is disconnected from the local service, so the agent cannot see which page you are on. Reopen LemonRiver (or run the start command again) to restore it.",
101
101
  download: "Download",
102
102
  copyLink: "Copy link",
103
103
  moreActions: "More actions",
@@ -288,8 +288,8 @@ const en = {
288
288
  commentLineLabel: "line {n}",
289
289
  commentRegionLabel: "region",
290
290
  commentEmptyHint: "Click an element or drag across a region to leave a comment.",
291
- commentsApplyHintPrefix: "Run ",
292
- commentsApplyHintSuffix: " in your agent to apply these.",
291
+ commentsApplyHintPrefix: "Ask your agent to “apply comments” (in Claude Code, run ",
292
+ commentsApplyHintSuffix: ").",
293
293
  commentDeleteAria: "Delete",
294
294
  commentUpdateFailed: "Couldn't update comment:",
295
295
  commentAddFailed: "Couldn't add comment:",
@@ -689,8 +689,8 @@ const es = {
689
689
  nothingMatchesPrefix: "Nada coincide con ",
690
690
  nothingMatchesSuffix: " en esta carpeta.",
691
691
  noSlidesYet: "Aún no hay presentaciones",
692
- createSlideHintPrefix: "Ejecuta ",
693
- createSlideHintSuffix: " en tu agente para crear una.",
692
+ createSlideHintPrefix: "Pídele a tu agente que «haga una presentación sobre…» (en Claude Code, ejecuta ",
693
+ createSlideHintSuffix: ").",
694
694
  folderEmptyTitle: "{name} está vacía",
695
695
  folderEmptyHint: "Arrastra una presentación desde Borradores a esta carpeta en la barra lateral.",
696
696
  slideActions: "Acciones de la presentación",
@@ -723,10 +723,10 @@ const es = {
723
723
  resizeSidePanel: "Redimensionar panel lateral",
724
724
  home: "Inicio",
725
725
  backToHome: "Volver al inicio",
726
- agentConnected: "Agente conectado",
727
- agentConnectedTooltip: "La diapositiva actual y la selección del inspector se sincronizan con tu agente en tiempo real.",
728
- agentDisconnected: "Agente desconectado",
729
- agentDisconnectedTooltip: "Se perdió la conexión con el servidor de desarrollo, así que tu agente ya no ve la diapositiva actual ni la selección del inspector. Reinicia el servidor de desarrollo para restablecerla.",
726
+ agentConnected: "Servicio local conectado",
727
+ agentConnectedTooltip: "El navegador y el servicio local están conectados: la presentación que estás viendo, el número de página y el elemento seleccionado se escriben en el espacio de trabajo, donde un agente que trabaje en esta carpeta puede leerlos.",
728
+ agentDisconnected: "Servicio local desconectado",
729
+ agentDisconnectedTooltip: "El navegador se ha desconectado del servicio local, así que el agente ya no puede ver qué página estás viendo. Vuelve a abrir LemonRiver (o ejecuta de nuevo el comando de inicio) para restablecer la conexión.",
730
730
  download: "Descargar",
731
731
  copyLink: "Copiar enlace",
732
732
  moreActions: "Más acciones",
@@ -917,8 +917,8 @@ const es = {
917
917
  commentLineLabel: "línea {n}",
918
918
  commentRegionLabel: "zona",
919
919
  commentEmptyHint: "Haz clic en un elemento o arrastra sobre una zona para dejar un comentario.",
920
- commentsApplyHintPrefix: "Ejecuta ",
921
- commentsApplyHintSuffix: " en tu agente para aplicarlos.",
920
+ commentsApplyHintPrefix: "Pídele a tu agente que «aplique los comentarios» (en Claude Code, ejecuta ",
921
+ commentsApplyHintSuffix: ").",
922
922
  commentDeleteAria: "Eliminar",
923
923
  commentUpdateFailed: "No se pudo actualizar el comentario:",
924
924
  commentAddFailed: "No se pudo añadir el comentario:",
@@ -1318,8 +1318,8 @@ const ja = {
1318
1318
  nothingMatchesPrefix: "このフォルダ内に ",
1319
1319
  nothingMatchesSuffix: " に一致する項目はありません。",
1320
1320
  noSlidesYet: "スライドはまだありません",
1321
- createSlideHintPrefix: "エージェントで ",
1322
- createSlideHintSuffix: " を実行してスライドを作成しましょう。",
1321
+ createSlideHintPrefix: "エージェントに「〜についてのスライドを作って」と伝えてください(Claude Code では ",
1322
+ createSlideHintSuffix: " を実行)。",
1323
1323
  folderEmptyTitle: "{name} は空です",
1324
1324
  folderEmptyHint: "サイドバーから下書きのスライドをこのフォルダにドラッグしてください。",
1325
1325
  slideActions: "スライド操作",
@@ -1350,10 +1350,10 @@ const ja = {
1350
1350
  },
1351
1351
  slide: {
1352
1352
  resizeSidePanel: "サイドパネルの幅を調整",
1353
- agentConnected: "エージェント接続中",
1354
- agentConnectedTooltip: "現在のスライドと Inspector の選択はエージェントにリアルタイムで同期されています。",
1355
- agentDisconnected: "エージェント切断",
1356
- agentDisconnectedTooltip: "dev server との接続が切れたため、現在のスライドや Inspector の選択がエージェントに届かなくなっています。dev server を再起動して接続を復旧してください。",
1353
+ agentConnected: "ローカルサービス接続中",
1354
+ agentConnectedTooltip: "ブラウザとローカルサービスが接続されています。表示中のデッキ、ページ番号、選択中の要素はワークスペースに書き込まれ、このフォルダで作業するエージェントが読めます。",
1355
+ agentDisconnected: "ローカルサービス切断",
1356
+ agentDisconnectedTooltip: "ブラウザとローカルサービスが切断されたため、エージェントは表示中のページを参照できません。LemonRiver を開き直す(または起動コマンドを再実行する)と復旧します。",
1357
1357
  home: "ホーム",
1358
1358
  backToHome: "ホームへ戻る",
1359
1359
  download: "ダウンロード",
@@ -1546,8 +1546,8 @@ const ja = {
1546
1546
  commentLineLabel: "行 {n}",
1547
1547
  commentRegionLabel: "範囲",
1548
1548
  commentEmptyHint: "要素をクリックするか、範囲をドラッグしてコメントを残せます。",
1549
- commentsApplyHintPrefix: "エージェントで ",
1550
- commentsApplyHintSuffix: " を実行して適用してください。",
1549
+ commentsApplyHintPrefix: "エージェントに「コメントを適用」と伝えてください(Claude Code では ",
1550
+ commentsApplyHintSuffix: " を実行)。",
1551
1551
  commentDeleteAria: "削除",
1552
1552
  commentUpdateFailed: "コメントを更新できませんでした:",
1553
1553
  commentAddFailed: "コメントを追加できませんでした:",
@@ -1947,8 +1947,8 @@ const zhCN = {
1947
1947
  nothingMatchesPrefix: "该文件夹中没有匹配 ",
1948
1948
  nothingMatchesSuffix: " 的内容。",
1949
1949
  noSlidesYet: "尚无幻灯片",
1950
- createSlideHintPrefix: "在 agent 中执行 ",
1951
- createSlideHintSuffix: " 开始创建。",
1950
+ createSlideHintPrefix: "跟你的 Agent 说「做一份关于……的幻灯片」(Claude Code 里输入 ",
1951
+ createSlideHintSuffix: ")。",
1952
1952
  folderEmptyTitle: "{name} 为空",
1953
1953
  folderEmptyHint: "从侧边栏将幻灯片从草稿拖入此文件夹。",
1954
1954
  slideActions: "幻灯片操作",
@@ -1979,10 +1979,10 @@ const zhCN = {
1979
1979
  },
1980
1980
  slide: {
1981
1981
  resizeSidePanel: "调整侧栏宽度",
1982
- agentConnected: "Agent 已连接",
1983
- agentConnectedTooltip: "目前的 slide 与 Inspector 选择会即时同步给 agent。",
1984
- agentDisconnected: "Agent 已断开",
1985
- agentDisconnectedTooltip: "已和 dev server 断开连接,agent 没办法再看到你目前的 slide 或 Inspector 选择。请重新启动 dev server 来恢复连接。",
1982
+ agentConnected: "本机服务已连接",
1983
+ agentConnectedTooltip: "浏览器和本机服务连着:你正在看的演示、页码和选中的元素会写进工作区,在这个文件夹里干活的 Agent 读得到。",
1984
+ agentDisconnected: "本机服务已断开",
1985
+ agentDisconnectedTooltip: "浏览器和本机服务断开了,Agent 看不到你正在看哪一页。重新打开 LemonRiver(或重新运行启动命令)就能恢复。",
1986
1986
  home: "首页",
1987
1987
  backToHome: "返回首页",
1988
1988
  download: "下载",
@@ -2175,8 +2175,8 @@ const zhCN = {
2175
2175
  commentLineLabel: "第 {n} 行",
2176
2176
  commentRegionLabel: "区域",
2177
2177
  commentEmptyHint: "点击元素或拖拽框选一个区域来评论。",
2178
- commentsApplyHintPrefix: "在你的代理中运行 ",
2179
- commentsApplyHintSuffix: " 以应用这些更改。",
2178
+ commentsApplyHintPrefix: "跟你的 Agent 说「应用评论」(Claude Code 里输入 ",
2179
+ commentsApplyHintSuffix: ")。",
2180
2180
  commentDeleteAria: "删除",
2181
2181
  commentUpdateFailed: "无法更新评论:",
2182
2182
  commentAddFailed: "无法添加评论:",
@@ -2576,8 +2576,8 @@ const zhTW = {
2576
2576
  nothingMatchesPrefix: "此資料夾中沒有相符 ",
2577
2577
  nothingMatchesSuffix: " 的項目。",
2578
2578
  noSlidesYet: "尚無投影片",
2579
- createSlideHintPrefix: "在 agent 中執行 ",
2580
- createSlideHintSuffix: " 開始建立。",
2579
+ createSlideHintPrefix: "跟你的 Agent 說「做一份關於……的簡報」(Claude Code 裡輸入 ",
2580
+ createSlideHintSuffix: ")。",
2581
2581
  folderEmptyTitle: "{name} 為空",
2582
2582
  folderEmptyHint: "從側邊欄將投影片從草稿拖入此資料夾。",
2583
2583
  slideActions: "投影片操作",
@@ -2608,10 +2608,10 @@ const zhTW = {
2608
2608
  },
2609
2609
  slide: {
2610
2610
  resizeSidePanel: "調整側欄寬度",
2611
- agentConnected: "Agent 已連線",
2612
- agentConnectedTooltip: "目前的 slide 與 Inspector 選擇會即時同步給 agent。",
2613
- agentDisconnected: "Agent 已斷線",
2614
- agentDisconnectedTooltip: "已和 dev server 斷線,agent 沒辦法再看到你目前的 slide 或 Inspector 選擇。請重新啟動 dev server 來恢復連線。",
2611
+ agentConnected: "本機服務已連線",
2612
+ agentConnectedTooltip: "瀏覽器和本機服務連著:你正在看的簡報、頁碼和選取的元素會寫進工作區,在這個資料夾裡工作的 Agent 讀得到。",
2613
+ agentDisconnected: "本機服務已斷線",
2614
+ agentDisconnectedTooltip: "瀏覽器和本機服務斷開了,Agent 看不到你正在看哪一頁。重新開啟 LemonRiver(或重新執行啟動指令)就能恢復。",
2615
2615
  home: "首頁",
2616
2616
  backToHome: "返回首頁",
2617
2617
  download: "下載",
@@ -2804,8 +2804,8 @@ const zhTW = {
2804
2804
  commentLineLabel: "第 {n} 行",
2805
2805
  commentRegionLabel: "範圍",
2806
2806
  commentEmptyHint: "點選元件或拖曳框選一個範圍來留言。",
2807
- commentsApplyHintPrefix: "在你的代理中執行 ",
2808
- commentsApplyHintSuffix: " 以套用這些變更。",
2807
+ commentsApplyHintPrefix: "跟你的 Agent 說「套用留言」(Claude Code 裡輸入 ",
2808
+ commentsApplyHintSuffix: ")。",
2809
2809
  commentDeleteAria: "刪除",
2810
2810
  commentUpdateFailed: "無法更新留言:",
2811
2811
  commentAddFailed: "無法新增留言:",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lemonriver/core",
3
- "version": "0.8.0",
3
+ "version": "1.0.1",
4
4
  "description": "The LemonRiver runtime: deck viewer, story board, present mode, agent panel and export.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -339,6 +339,8 @@ This applies whenever the *visual element* repeats, not whenever the *data* does
339
339
 
340
340
  ## Previewing a page visually
341
341
 
342
+ If your agent has the `lemonriver` MCP tools (new workspaces ship a `.mcp.json` that provides them), use `lemonriver_screenshot_page` to render a page and `lemonriver_self_check` to run the same layout check as the story board's Self-check button. Everything below is the fallback for when those tools are not available.
343
+
342
344
  After writing or editing a page, look at it — the vertical-budget math catches overflow, but not clashing colors, awkward wraps, or a broken image. While the dev server runs, every page has a chrome-less preview URL; don't drive the full editor UI (home → deck → thumbnail) to get there.
343
345
 
344
346
  1. **Find the dev server.** Read `node_modules/.open-slide/server.json` (written on startup, removed on shutdown):
@@ -1,3 +1,4 @@
1
+ import { Link } from 'react-router-dom';
1
2
  import { toast } from 'sonner';
2
3
  import { format } from '@/lib/use-locale';
3
4
  import { cn } from '@/lib/utils';
@@ -18,10 +19,7 @@ export function AgentProvidersSection() {
18
19
  }
19
20
 
20
21
  function hint(row: AgentProviderRow): string {
21
- if (!row.detected) return lr.agents.missingHint;
22
- if (row.connectable) return lr.agents.detected;
23
- if (row.reason === 'desktop-only') return lr.agents.dumateReason;
24
- return lr.agents.missingHint;
22
+ return row.detected ? lr.agents.detected : lr.agents.missingHint;
25
23
  }
26
24
 
27
25
  return (
@@ -70,6 +68,17 @@ export function AgentProvidersSection() {
70
68
  );
71
69
  })}
72
70
  </ul>
71
+
72
+ <p data-lr-agent-own-window className="mt-3 text-[13px] text-muted-foreground">
73
+ {lr.agents.ownWindow}{' '}
74
+ <Link
75
+ to="/help#guide-prepare"
76
+ data-lr-agent-own-window-link
77
+ className="underline-offset-2 hover:text-foreground hover:underline"
78
+ >
79
+ {lr.agents.ownWindowLink}
80
+ </Link>
81
+ </p>
73
82
  </section>
74
83
  );
75
84
  }
@@ -6,7 +6,7 @@ import type { CheckResult, SelfCheck } from './model/self-check';
6
6
  import type { SelfCheckInput } from './self-check-runner';
7
7
 
8
8
  /** The floor for small type the deck's template asks for, if it has one. */
9
- async function templateFloor(slideId: string): Promise<number | undefined> {
9
+ export async function templateFloor(slideId: string): Promise<number | undefined> {
10
10
  const id = (await outlineTemplate(slideId)) ?? (await appliedTemplate(slideId));
11
11
  if (!id) return undefined;
12
12
  return templates.find((template) => template.id === id)?.minType;
@@ -38,11 +38,14 @@ export function Mascot({
38
38
  size,
39
39
  float = false,
40
40
  className,
41
+ src,
41
42
  }: {
42
43
  state: MascotState;
43
44
  size: number;
44
45
  float?: boolean;
45
46
  className?: string;
47
+ /** An already-loaded image, used when the file on disk may be gone. */
48
+ src?: string;
46
49
  }) {
47
50
  const first = useRef(true);
48
51
  const [bounce, setBounce] = useState(0);
@@ -59,7 +62,7 @@ export function Mascot({
59
62
  return (
60
63
  <img
61
64
  key={bounce}
62
- src={MASCOT_SRC[state]}
65
+ src={src ?? MASCOT_SRC[state]}
63
66
  alt=""
64
67
  aria-hidden
65
68
  draggable={false}
@@ -5,6 +5,7 @@ import { format } from '@/lib/use-locale';
5
5
  import { OfflineBanner } from '../feedback/offline-banner';
6
6
  import { takePendingToast } from '../feedback/pending-toast';
7
7
  import { Toaster } from '../feedback/toaster';
8
+ import { installMcpResponder } from '../mcp/respond';
8
9
  import { useLrText } from '../text';
9
10
  import { applyReduceMotion, useReduceMotionSetting } from '../theme/motion';
10
11
  import { isBrandPage, pageForPath, SPLASH_ID } from '../theme/pages';
@@ -89,6 +90,10 @@ function usePendingToast() {
89
90
  }, []);
90
91
  }
91
92
 
93
+ function useMcpResponder() {
94
+ useEffect(() => installMcpResponder(), []);
95
+ }
96
+
92
97
  /** Everything LemonRiver adds around the routes. Sits where the official toaster was. */
93
98
  export function AppChrome() {
94
99
  const reduceMotion = useReduceMotionSetting();
@@ -96,6 +101,7 @@ export function AppChrome() {
96
101
  useSplashOut();
97
102
  useDecksChangedReload();
98
103
  usePendingToast();
104
+ useMcpResponder();
99
105
 
100
106
  useEffect(() => {
101
107
  applyReduceMotion(reduceMotion);
@@ -1,4 +1,4 @@
1
- import { LayoutTemplate, Plus, Settings, Trash2 } from 'lucide-react';
1
+ import { BookOpen, LayoutTemplate, Plus, Settings, Trash2 } from 'lucide-react';
2
2
  import { createPortal } from 'react-dom';
3
3
  import { useLocation, useNavigate } from 'react-router-dom';
4
4
  import { Button } from '@/components/ui/button';
@@ -52,6 +52,14 @@ export function SidebarExtras() {
52
52
  onSelect={() => navigate('/trash', { replace: true })}
53
53
  />
54
54
  )}
55
+ {isFeatureEnabled('help') && (
56
+ <NavRow
57
+ icon={<BookOpen className="size-4" strokeWidth={1.75} />}
58
+ label={lr.guide.sidebar}
59
+ current={false}
60
+ onSelect={() => navigate('/help#guide')}
61
+ />
62
+ )}
55
63
  {isFeatureEnabled('settings') && (
56
64
  <NavRow
57
65
  icon={<Settings className="size-4" strokeWidth={1.75} />}
@@ -6,6 +6,7 @@ import { Mascot, type MascotState } from '../brand/mascot';
6
6
  export function LemonEmpty({
7
7
  state = 'idle',
8
8
  size = 140,
9
+ mascotSrc,
9
10
  title,
10
11
  children,
11
12
  actions,
@@ -14,6 +15,7 @@ export function LemonEmpty({
14
15
  }: {
15
16
  state?: MascotState;
16
17
  size?: number;
18
+ mascotSrc?: string;
17
19
  title: ReactNode;
18
20
  children?: ReactNode;
19
21
  actions?: ReactNode;
@@ -29,7 +31,7 @@ export function LemonEmpty({
29
31
  className,
30
32
  )}
31
33
  >
32
- <Mascot state={state} size={size} float={state === 'idle'} className="mb-2" />
34
+ <Mascot state={state} size={size} src={mascotSrc} float={state === 'idle'} className="mb-2" />
33
35
  <h2
34
36
  className={cn(
35
37
  'font-heading font-semibold text-foreground',