rushes 0.2.1 → 0.3.0
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/.claude-plugin/plugin.json +1 -1
- package/AGENTS.md +36 -8
- package/README.md +75 -4
- package/dist/cli/doctor.js +35 -10
- package/dist/cli/main.js +200 -18
- package/dist/core/batches.js +35 -3
- package/dist/core/exportNotes.js +9 -5
- package/dist/core/formats.js +159 -0
- package/dist/core/found.js +333 -0
- package/dist/core/labels.js +192 -0
- package/dist/core/log.js +190 -0
- package/dist/core/logEvents.js +193 -0
- package/dist/core/logText.js +122 -0
- package/dist/core/media.js +119 -13
- package/dist/core/notes.js +35 -4
- package/dist/core/project.js +69 -1
- package/dist/core/schema.js +147 -1
- package/dist/core/store.js +19 -3
- package/dist/mcp/client.js +13 -1
- package/dist/mcp/tools.js +181 -11
- package/dist/server/app.js +495 -38
- package/dist/server/assets.js +19 -7
- package/dist/server/files.js +61 -4
- package/dist/server/found.js +1216 -0
- package/dist/server/logbook.js +208 -0
- package/dist/server/loudness.js +7 -3
- package/dist/server/peaks.js +3 -2
- package/dist/server/proxy.js +16 -4
- package/dist/server/start.js +15 -2
- package/package.json +1 -1
- package/skills/rushes/SKILL.md +9 -4
- package/web-dist/assets/index-BDMm5p1-.css +1 -0
- package/web-dist/assets/index-C9dBtlRy.js +3 -0
- package/web-dist/index.html +2 -2
- package/web-dist/assets/index-ChXjhVC5.js +0 -3
- package/web-dist/assets/index-Cj_tr1I-.css +0 -1
package/dist/mcp/tools.js
CHANGED
|
@@ -2,15 +2,48 @@ import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import { ApiError, dashboardUrlFor } from "./client.js";
|
|
4
4
|
import { VERSION } from "../server/app.js";
|
|
5
|
+
import { BRING_IN_MAX } from "../server/found.js";
|
|
6
|
+
import { LABEL_MAX, oneLineOf } from "../core/labels.js";
|
|
7
|
+
import { LOG_AREAS } from "../core/logText.js";
|
|
5
8
|
const project = z.string().optional().describe("Project folder. Defaults to the current working directory.");
|
|
6
9
|
const stage = z.enum(["script", "picture", "voice", "music", "sfx", "mix"]);
|
|
7
10
|
const fileKind = z.enum(["doc", "image", "caption", "export", "delivery", "edit"]);
|
|
8
11
|
const assetKind = z.enum(["screenshot", "cut", "proxy", "take", "music", "sfx", "voice", "doc", "image", "caption", "export", "delivery", "edit"]);
|
|
12
|
+
// §20.7: a file to bring in. The server checks everything else (inside the project, the kind, the limits).
|
|
13
|
+
const film = z.string().min(1).max(200);
|
|
14
|
+
const bringInItem = z.object({
|
|
15
|
+
path: z.string().min(1).max(1024).describe("Absolute, or relative to the project folder."),
|
|
16
|
+
kind: z.enum(["voice", "music", "sfx", "cut", "doc"]).optional(),
|
|
17
|
+
round: z.string().trim().min(1).max(64).optional().describe('Voice only: the round the read joins, e.g. "Round 2 · Gerald, tone". Defaults to its folder\'s name.'),
|
|
18
|
+
});
|
|
19
|
+
// §21.4: the server's own limits on formats (src/server/app.ts), so a request that can't land is refused here, in words.
|
|
20
|
+
const FORMAT_PATH_MAX = 1024;
|
|
21
|
+
const FORMAT_ID_MAX = 16;
|
|
22
|
+
const FORMAT_LABEL_MAX = 16;
|
|
23
|
+
// A format id ("9x16", "2.39x1"), or the label it is written from ("9:16"): the id has an x where the label has a colon.
|
|
24
|
+
const FORMAT_ID_OR_LABEL = /^\d+(?:\.\d+)?[x:]\d+(?:\.\d+)?$/;
|
|
25
|
+
const FORMATS_BESIDE_CUT_MAX = 7;
|
|
26
|
+
// What an agent is told when a Rushes started by an older version quietly ignores the new fields.
|
|
27
|
+
const OLDER_DROPPED = "An older Rushes is running and ignored `formats`: the cut is in, its other shapes are not. Run `rushes stop`, then add them with rushes_add_format.";
|
|
28
|
+
const OLDER_DROPPED_LABEL = "An older Rushes is running and dropped the label: the cut was added without it. Run `rushes stop`, then open again.";
|
|
29
|
+
// A 0.2.x Rushes drops both: one note that says both, so neither is lost.
|
|
30
|
+
const OLDER_DROPPED_BOTH = "An older Rushes is running and dropped the label and ignored `formats`: the cut is in, without its label and without its other shapes. Run `rushes stop`, then open again and add the shapes with rushes_add_format.";
|
|
31
|
+
const OLDER_UNFILTERED = "An older Rushes is running and ignores `format`: these are every note, not that format's. Run `rushes stop`, then ask again.";
|
|
9
32
|
function ok(data) {
|
|
10
33
|
return { content: [{ type: "text", text: JSON.stringify(data, null, 2) }] };
|
|
11
34
|
}
|
|
35
|
+
/** "include.0.path: Too small", for each issue the server's own validation reported. */
|
|
36
|
+
function issuesOf(body) {
|
|
37
|
+
if (!Array.isArray(body.issues) || body.issues.length === 0)
|
|
38
|
+
return "";
|
|
39
|
+
const lines = body.issues.slice(0, 5).map((i) => {
|
|
40
|
+
const where = Array.isArray(i.path) ? i.path.join(".") : "";
|
|
41
|
+
return `${where ? `${where}: ` : ""}${String(i.message ?? "invalid")}`;
|
|
42
|
+
});
|
|
43
|
+
return `: ${lines.join("; ")}`;
|
|
44
|
+
}
|
|
12
45
|
function fail(e) {
|
|
13
|
-
const message = e instanceof ApiError ? `${e.message} (${e.body.error ?? e.status})` : e.message;
|
|
46
|
+
const message = e instanceof ApiError ? (e.body.error === "not_json" ? e.message : `${e.message} (${e.body.error ?? e.status})${issuesOf(e.body)}`) : e.message;
|
|
14
47
|
return { content: [{ type: "text", text: message }], isError: true };
|
|
15
48
|
}
|
|
16
49
|
/** Wrap a handler so API errors come back as tool errors the agent can read. */
|
|
@@ -28,15 +61,66 @@ export function createMcpServer(ctx) {
|
|
|
28
61
|
const server = new McpServer({ name: "rushes", version: VERSION });
|
|
29
62
|
server.registerTool("rushes_open", {
|
|
30
63
|
title: "Open Rushes",
|
|
31
|
-
description: "
|
|
32
|
-
inputSchema: {
|
|
33
|
-
|
|
64
|
+
description: "Starts Rushes if needed, brings in the current set of files that go with the cut, and opens it. Pass `include` for files you know belong. It waits about 20 seconds for the folder to be looked through; on a big folder it returns what it has with `scanning: true` and carries on in the background (rushes_scan, or opening again, shows the rest). Returns `broughtIn` (everything brought in since Rushes started, each with its kind, lane, reasons and `origin`: auto, include or hand), `alreadyIn` (your include files that were already registered), `failed` (files that couldn't come in, with why) and `found` (what was left, counts by kind).",
|
|
65
|
+
inputSchema: {
|
|
66
|
+
project,
|
|
67
|
+
browser: z.boolean().optional().describe("Open the browser. Default true."),
|
|
68
|
+
film: film.optional().describe("The film whose newest cut the files are matched to (id or name). Defaults to the newest cut in the project."),
|
|
69
|
+
include: z
|
|
70
|
+
.array(bringInItem)
|
|
71
|
+
.max(BRING_IN_MAX)
|
|
72
|
+
.optional()
|
|
73
|
+
.describe("Files you made for this cut or know belong to it, inside the project folder. They are brought in whatever they score, and win over the scoring: a kind you include (voice, music or sfx) is not also guessed for this cut, now or on later scans or restarts. Nothing already registered is ever removed. Each: path, and kind (voice, music, sfx, cut, doc) when the name doesn't say, and round for a voice read."),
|
|
74
|
+
},
|
|
75
|
+
}, safe(async ({ project, browser, film, include }) => {
|
|
34
76
|
const c = await ctx.client(project);
|
|
35
77
|
const url = await dashboardUrlFor(c.baseUrl);
|
|
78
|
+
// Open first: the dashboard shows the folder being looked through, and fills in as files arrive.
|
|
36
79
|
if (browser !== false)
|
|
37
80
|
ctx.openBrowser(url);
|
|
38
|
-
|
|
81
|
+
let r;
|
|
82
|
+
try {
|
|
83
|
+
r = await c.post("/api/found/scan", { wait: true, ...(film ? { film } : {}), ...(include ? { include } : {}) });
|
|
84
|
+
}
|
|
85
|
+
catch (e) {
|
|
86
|
+
// A Rushes started by an older version has no such route: it's open, just not scanned.
|
|
87
|
+
if (e instanceof ApiError && e.status === 404) {
|
|
88
|
+
return { url, broughtIn: [], failed: [], found: null, note: "An older Rushes is running and can't look through the folder. Run `rushes stop`, then open again." };
|
|
89
|
+
}
|
|
90
|
+
throw e;
|
|
91
|
+
}
|
|
92
|
+
return {
|
|
93
|
+
url,
|
|
94
|
+
broughtIn: r.added ?? [],
|
|
95
|
+
alreadyIn: r.alreadyIn ?? [],
|
|
96
|
+
failed: r.failed ?? [],
|
|
97
|
+
found: r.found ?? null,
|
|
98
|
+
...(r.scanning ? { scanning: true } : {}),
|
|
99
|
+
};
|
|
39
100
|
}));
|
|
101
|
+
server.registerTool("rushes_scan", {
|
|
102
|
+
title: "Look through the project folder",
|
|
103
|
+
description: "Looks through the project folder for files that go with the cut and returns the candidates, best score first, each with its kind, folder, size, length and the reasons in plain words. It also brings in the current set, as opening does (`broughtIn`), and returns what is left, with `counts` by kind (the same as `found` from rushes_open). It waits about 20 seconds; on a big folder `scanning: true` says it is still looking. Bring a chosen file in with rushes_bring_in.",
|
|
104
|
+
inputSchema: {
|
|
105
|
+
project,
|
|
106
|
+
film: film.optional().describe("The film whose newest cut the files are matched to (id or name). Defaults to the newest cut."),
|
|
107
|
+
limit: z.number().int().min(1).max(200).default(100).describe("How many candidates to return, best first. Default 100, at most 200."),
|
|
108
|
+
},
|
|
109
|
+
}, safe(async ({ project, film, limit }) => {
|
|
110
|
+
const c = await ctx.client(project);
|
|
111
|
+
const r = await c.post("/api/found/scan", { wait: true, ...(film ? { film } : {}) });
|
|
112
|
+
const { files } = await c.get("/api/found");
|
|
113
|
+
return { files: files.slice(0, limit ?? 100), counts: r.found ?? null, broughtIn: r.added ?? [], ...(r.scanning ? { scanning: true } : {}) };
|
|
114
|
+
}));
|
|
115
|
+
server.registerTool("rushes_bring_in", {
|
|
116
|
+
title: "Bring files in",
|
|
117
|
+
description: "Registers files from inside the project folder: voice reads, music and sfx as unpicked variants, video as cuts, md, txt and pdf as docs. Nothing is picked. Returns what was added and, for each file that couldn't come in, why (a path outside the project folder is refused). Up to 60 files, 12 of a kind.",
|
|
118
|
+
inputSchema: {
|
|
119
|
+
project,
|
|
120
|
+
files: z.array(bringInItem).min(1).max(BRING_IN_MAX).describe("Each: path (absolute or relative to the project), kind when the name doesn't say, round for a voice read."),
|
|
121
|
+
film: film.optional().describe("The film a cut joins (id or name). Defaults to the newest cut's film."),
|
|
122
|
+
},
|
|
123
|
+
}, safe(async ({ project, files, film }) => (await ctx.client(project)).post("/api/found/bring-in", { files, ...(film ? { film } : {}) })));
|
|
40
124
|
server.registerTool("rushes_set_shots", {
|
|
41
125
|
title: "Set shots",
|
|
42
126
|
description: "Set the storyboard shot list for a cut. Shots are numbered by start time; a new cut copies the previous cut's shots until you send new ones.",
|
|
@@ -67,14 +151,57 @@ export function createMcpServer(ctx) {
|
|
|
67
151
|
}, safe(async ({ project }) => (await ctx.client(project)).get("/api/tabs")));
|
|
68
152
|
server.registerTool("rushes_add_version", {
|
|
69
153
|
title: "Add a cut",
|
|
70
|
-
description: "Register a new cut of a video. The first cut creates the video. Returns the new version id (v1, v2 ...). When the cut is likely to play badly in a browser (4K, over 1.5 GB, or a codec such as ProRes), it also returns proxySuggested: true and proxyReason; Picture offers the user a proxy. If the project has autoProxy on, proxyJob is the proxy already being made.",
|
|
154
|
+
description: "Register a new cut of a video. The first cut creates the video. Returns the new version id (v1, v2 ...). When the cut is likely to play badly in a browser (4K, over 1.5 GB, or a codec such as ProRes), it also returns proxySuggested: true and proxyReason; Picture offers the user a proxy. If the project has autoProxy on, proxyJob is the proxy already being made. Give every cut a short `label` (" + LABEL_MAX + " characters at most) saying what changed, e.g. \"launch 1.45x slower\", and put the detail in `note`: the version list shows the label. Pass `formats` to register the other shapes of the same cut in one call; the reply then carries `formatWarnings` (a list, one entry for each shape more than 0.1 s off the cut's length; `warning` here means Picture is locked).",
|
|
71
155
|
inputSchema: {
|
|
72
156
|
project,
|
|
73
157
|
video: z.string().describe("Video id or name, e.g. \"Hero 60s\"."),
|
|
74
158
|
file: z.string().describe("Path to the rendered file, absolute or relative to the project."),
|
|
75
159
|
note: z.string().optional().describe("What changed in this cut."),
|
|
160
|
+
label: z
|
|
161
|
+
.string()
|
|
162
|
+
// Counted as the route counts it: on one clean line (padding and invisible characters don't count), in characters.
|
|
163
|
+
.refine((s) => Array.from(oneLineOf(s)).length <= LABEL_MAX, `label is ${LABEL_MAX} characters at most: put the detail in note`)
|
|
164
|
+
// Still advertised, so an agent sees the limit in the schema.
|
|
165
|
+
.meta({ maxLength: LABEL_MAX })
|
|
166
|
+
.optional()
|
|
167
|
+
.describe(`A short label for the version list, ${LABEL_MAX} characters at most, e.g. "launch 1.45x slower". The detail goes in note.`),
|
|
168
|
+
formats: z
|
|
169
|
+
.array(z.object({ file: z.string().min(1).max(FORMAT_PATH_MAX) }))
|
|
170
|
+
.max(FORMATS_BESIDE_CUT_MAX)
|
|
171
|
+
.optional()
|
|
172
|
+
.describe("Other shapes of this same cut (the same edit at other aspect ratios, e.g. a 9:16 and a 1:1 of the 16:9), registered as its formats in one call. `file` is the main one."),
|
|
173
|
+
},
|
|
174
|
+
}, safe(async ({ project, ...b }) => {
|
|
175
|
+
const r = await (await ctx.client(project)).post("/api/versions", b);
|
|
176
|
+
// A Rushes started by an older version ignores `label`, and its reply has none; one from before
|
|
177
|
+
// formats drops `formats` without a word. Say which, so the agent isn't left thinking either was kept.
|
|
178
|
+
const droppedLabel = Boolean(b.label && r?.version && r.version.label === undefined);
|
|
179
|
+
const droppedFormats = Boolean(b.formats?.length && r?.version && !Array.isArray(r.version.formats));
|
|
180
|
+
if (droppedLabel && droppedFormats)
|
|
181
|
+
return { ...r, note: OLDER_DROPPED_BOTH };
|
|
182
|
+
if (droppedLabel)
|
|
183
|
+
return { ...r, note: OLDER_DROPPED_LABEL };
|
|
184
|
+
if (droppedFormats)
|
|
185
|
+
return { ...r, note: OLDER_DROPPED };
|
|
186
|
+
return r;
|
|
187
|
+
}));
|
|
188
|
+
server.registerTool("rushes_add_format", {
|
|
189
|
+
title: "Add a format",
|
|
190
|
+
description: "Register another shape of a cut: the same edit rendered at another aspect ratio, e.g. the 9:16 or 1:1 of a 16:9 cut. Rushes measures the ratio with ffprobe. Defaults to the newest cut of the only or newest film. Returns the format's id and label (e.g. \"9x16\", \"9:16\"), and `warning` when its length is more than 0.1 s off the cut's. Refused, with the reason: a second render with a ratio the cut already has (a re-render is a new version), a file that isn't a video, a cut that already has 8 shapes (the most one cut can have, its own file included), and a machine without ffprobe. The cut's own file stays its main shape: register only the other shapes.",
|
|
191
|
+
inputSchema: {
|
|
192
|
+
project,
|
|
193
|
+
video: z.string().min(1).max(200).optional().describe("Video id or name. Defaults to the newest cut's film."),
|
|
194
|
+
version: z.string().min(1).max(64).optional().describe("Defaults to that film's newest cut."),
|
|
195
|
+
file: z.string().min(1).max(FORMAT_PATH_MAX).describe("Path to the render, absolute or relative to the project."),
|
|
196
|
+
label: z
|
|
197
|
+
.string()
|
|
198
|
+
.trim()
|
|
199
|
+
.min(1)
|
|
200
|
+
.max(FORMAT_LABEL_MAX)
|
|
201
|
+
.optional()
|
|
202
|
+
.describe('A ratio hint only, e.g. "2.39:1", used when the measured ratio isn\'t a standard one. Not the cut\'s short label (that is `label` on rushes_add_version).'),
|
|
76
203
|
},
|
|
77
|
-
}, safe(async ({ project, ...b }) => (await ctx.client(project)).post("/api/
|
|
204
|
+
}, safe(async ({ project, ...b }) => (await ctx.client(project)).post("/api/formats", b)));
|
|
78
205
|
server.registerTool("rushes_add_variant", {
|
|
79
206
|
title: "Add an audio variant",
|
|
80
207
|
description: "Add a voice read (in a round), music bed or SFX pass for side-by-side review. Returns its lane and variant ids: a note on it is `on` \"<lane id>/<variant id>\".",
|
|
@@ -122,17 +249,30 @@ export function createMcpServer(ctx) {
|
|
|
122
249
|
}, safe(async ({ project, section, file }) => (await ctx.client(project)).post(`/api/script/${encodeURIComponent(section)}/takes`, { file })));
|
|
123
250
|
server.registerTool("rushes_list_notes", {
|
|
124
251
|
title: "List notes",
|
|
125
|
-
description: "Notes left in Rushes, filtered by tab, status, batch or version. A note's `on` says what it's about: null on Picture or for the whole mix, \"<lane>/<variant>\" for a music bed, SFX pass or voice variant, \"<lane>/<variant>:<cue>\" for an SFX cue, \"vo\" for the VO lane on Mix. Older notes may carry a bare variant id, \"vo\" for the assembled read, \"<section>:<take>\" for a take, or a section id.",
|
|
252
|
+
description: "Notes left in Rushes, filtered by tab, status, batch or version. A note's `on` says what it's about: null on Picture or for the whole mix, \"<lane>/<variant>\" for a music bed, SFX pass or voice variant, \"<lane>/<variant>:<cue>\" for an SFX cue, \"vo\" for the VO lane on Mix. Older notes may carry a bare variant id, \"vo\" for the assembled read, \"<section>:<take>\" for a take, or a section id. On Picture, a note's `format` is null when it's for every format, or a format id such as \"9x16\" when it's for that shape only.",
|
|
126
253
|
inputSchema: {
|
|
127
254
|
project,
|
|
128
255
|
stage: stage.optional(),
|
|
129
256
|
status: z.enum(["todo", "done"]).optional(),
|
|
130
257
|
batch: z.string().optional(),
|
|
131
258
|
version: z.string().optional(),
|
|
259
|
+
format: z
|
|
260
|
+
.string()
|
|
261
|
+
.max(FORMAT_ID_MAX)
|
|
262
|
+
.regex(FORMAT_ID_OR_LABEL)
|
|
263
|
+
.optional()
|
|
264
|
+
.describe('A format id such as "9x16" (or its label, "9:16"): that format\'s Picture notes plus the all-format Picture ones. Picture only: other tabs\' notes are left out.'),
|
|
265
|
+
onlyThisFormat: z.boolean().optional().describe("With format: only that format's notes, not the all-format ones."),
|
|
132
266
|
},
|
|
133
267
|
}, safe(async ({ project, ...f }) => {
|
|
134
|
-
|
|
135
|
-
|
|
268
|
+
// The label "9:16" is the format "9x16".
|
|
269
|
+
const asked = { ...f, ...(f.format !== undefined ? { format: f.format.replace(":", "x") } : {}) };
|
|
270
|
+
const q = new URLSearchParams(Object.entries(asked).filter(([, v]) => v !== undefined).map(([k, v]) => [k, String(v)]));
|
|
271
|
+
const r = await (await ctx.client(project)).get(`/api/notes${q.size ? `?${q}` : ""}`);
|
|
272
|
+
// A Rushes from before formats ignores the filter and sends every note, none with a `format`.
|
|
273
|
+
if (f.format !== undefined && Array.isArray(r?.notes) && r.notes.some((n) => !("format" in n)))
|
|
274
|
+
return { ...r, note: OLDER_UNFILTERED };
|
|
275
|
+
return r;
|
|
136
276
|
}));
|
|
137
277
|
server.registerTool("rushes_get_batch", {
|
|
138
278
|
title: "Get a batch",
|
|
@@ -179,9 +319,39 @@ export function createMcpServer(ctx) {
|
|
|
179
319
|
}, safe(async ({ project, ...b }) => (await ctx.client(project)).post("/api/files", b)));
|
|
180
320
|
server.registerTool("rushes_export_notes", {
|
|
181
321
|
title: "Export notes",
|
|
182
|
-
description: "Write every note to exports/<project-slug>-notes-<date>.md, grouped by stage and, for Picture, by film and version. Exporting again the same day overwrites
|
|
322
|
+
description: "Write every note to exports/<project-slug>-notes-<date>.md, grouped by stage and, for Picture, by film and version, and the Change Log to exports/change-log-<date>.md, newest first. Exporting again the same day overwrites them. Returns both paths (path, changeLog).",
|
|
183
323
|
inputSchema: { project },
|
|
184
324
|
}, safe(async ({ project }) => (await ctx.client(project)).post("/api/exports/notes", {})));
|
|
325
|
+
const area = z.enum(LOG_AREAS);
|
|
326
|
+
server.registerTool("rushes_log", {
|
|
327
|
+
title: "Add a line to the Change Log",
|
|
328
|
+
description: 'Adds one line to the project\'s Change Log, as the agent: a decision or a change of direction, e.g. "Slowed the zooms: the first cut felt rushed". One line, 160 characters at most (longer is cut): one line per decision, not a running commentary. The log is exported and shared, so never copy a note\'s or reply\'s text into it. Rushes already logs cuts, formats (another shape of a cut), voice reads, music, sound effects, takes, the script, picks, picture lock and unlock, notes sent, replies, files added and bring-ins by itself, so don\'t repeat those. `area` defaults to project; `video`, `version` and `ref` ("<lane>/<variant>" or "<section>:<take>") let the line open that place in the dashboard. Returns the line.',
|
|
329
|
+
inputSchema: {
|
|
330
|
+
project,
|
|
331
|
+
text: z.string().min(1).max(2000).describe("What happened, in one line."),
|
|
332
|
+
area: area.optional().describe("script, picture, voice, music, sfx, mix, notes, assets or project (the default)."),
|
|
333
|
+
video: z.string().min(1).max(200).optional().describe("Video id or name, to open its cut from the line."),
|
|
334
|
+
version: z.string().min(1).max(64).optional().describe("With video: the version to open."),
|
|
335
|
+
ref: z.string().min(1).max(300).optional().describe('"<lane>/<variant>" to open a voice read, bed or pass from the line, or "<section>:<take>" for a take.'),
|
|
336
|
+
},
|
|
337
|
+
}, safe(async ({ project, ...b }) => (await ctx.client(project)).post("/api/log", b)));
|
|
338
|
+
server.registerTool("rushes_get_log", {
|
|
339
|
+
title: "Read the Change Log",
|
|
340
|
+
description: "Call this at the start of a session to catch up: what happened in the project, newest first. Cuts, reads, beds, passes and takes as they were added, the script, picks, notes sent, replies and lines people or agents wrote. Returns `entries` (each with `at`, `area`, `text`, `by`: user, agent or rushes), `earlier` (how many matching lines were left out), `undated` (audio from before the log) and `dropped` (lines removed past 5000).",
|
|
341
|
+
inputSchema: {
|
|
342
|
+
project,
|
|
343
|
+
limit: z.number().int().min(1).max(200).default(30).describe("How many lines, newest first. Default 30, at most 200."),
|
|
344
|
+
area: area.optional().describe("Only this area."),
|
|
345
|
+
since: z.string().optional().describe("Only lines after this date and time, e.g. 2026-10-07T09:00:00Z."),
|
|
346
|
+
},
|
|
347
|
+
}, safe(async ({ project, limit, area: a, since }) => {
|
|
348
|
+
const q = new URLSearchParams({ limit: String(limit ?? 30) });
|
|
349
|
+
if (a)
|
|
350
|
+
q.set("area", a);
|
|
351
|
+
if (since)
|
|
352
|
+
q.set("since", since);
|
|
353
|
+
return (await ctx.client(project)).get(`/api/log?${q}`);
|
|
354
|
+
}));
|
|
185
355
|
server.registerTool("rushes_doctor", {
|
|
186
356
|
title: "Rushes doctor",
|
|
187
357
|
description: "Health check (§19.3): Node version, ffmpeg/ffprobe on PATH, which agent harnesses have the Rushes MCP server registered, and this project's files, server and disk space. Read-only -- doesn't start a server or change anything.",
|