rushes 0.7.0 → 0.7.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.
- package/.claude-plugin/plugin.json +1 -1
- package/AGENTS.md +2 -2
- package/dist/core/logEvents.js +7 -3
- package/dist/core/schema.js +17 -0
- package/dist/core/store.js +1 -1
- package/dist/mcp/tools.js +3 -3
- package/dist/server/app.js +33 -16
- package/package.json +1 -1
- package/web-dist/assets/index-B4EIQ7WV.js +7 -0
- package/web-dist/index.html +1 -1
- package/web-dist/assets/index-DqsLz9v7.js +0 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rushes",
|
|
3
3
|
"description": "A local review desk for video made with AI agents: timecoded notes, script edits and audio picks your agent reads and acts on.",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.1",
|
|
5
5
|
"author": { "name": "Red Morley Hewitt" },
|
|
6
6
|
"homepage": "https://github.com/iamredmh/rushes",
|
|
7
7
|
"repository": "https://github.com/iamredmh/rushes",
|
package/AGENTS.md
CHANGED
|
@@ -121,7 +121,7 @@ The user can shelve a film they have set aside (the **Film actions** menu in the
|
|
|
121
121
|
4. **Fix each note.** A note has `stage`, `scope` (`point`, `range` or `whole` — Voiceover only ever uses `point` or `whole`; it has no Range scope), `t`, `tOut`, `on` (the lane, variant, take, cue or section it's about), `text`, and optionally `box` (normalised 0 to 1), `grab` (a PNG path in `screenshots/`; older notes may point to `.rushes/grabs/`), `shot` (the shot it falls in, `{n, name}`, worked out by the server from the version's shots — not yours to set) and, on Picture, `format` (`null` when the note is for every format, or a format id such as `"9x16"` when it's for that shape only). When a note's `format` is not null, fix only that format and leave the others alone; an all-format note is for every shape, so fix each and say in `reply` which formats you fixed. `rushes_list_notes` takes `format` (an id such as `9x16`, or its label `9:16`: that format's Picture notes plus the all-format ones) and `onlyThisFormat: true` (only that format's). On an audio stage, `on` is `"<laneId>/<variantId>"` for a music bed, SFX pass or voice read (the lane and variant ids `rushes_add_variant` returns) — on Voiceover the lane id is the round's slugged name, so `on` names the round and the read together — or `"<laneId>/<variantId>:<cueId>"` for an SFX cue. On Mix it's `null` for the whole mix, `"vo"` for the VO lane (the newest round with a pick), or `"<laneId>/<variantId>"` for the music or SFX lane. Older notes may carry a bare variant id, `"vo"` on Voiceover itself, a section id, `"<sectionId>:<takeId>"` for a take, `"<variantId>:<cueId>"` or a bare cue id; Rushes still lists these with a sensible label, but none of them name a read any more. On Music, Sound effects and Mix, a note can also carry `marks` — short feedback like `Fall` (bring the level down over the range) or `Quieter 3 dB` (3 dB lower over the range). `rushes_list_notes`, `rushes_get_batch` and exported notes all show them. Marks are the user's, like a note's text and times — you read and act on them, you don't set them. Voiceover notes carry no marks: a note there is **Whole** (`Speaker`, `Pacing`, `Tone` or `Overall` — about the read as a whole) or **Point** (`Fix this` or `Keep this`, marked at the playhead).
|
|
122
122
|
5. **Register the new cut** with `rushes_add_version`, with a short `label` and the detail in `note`. If the video is locked, the reply carries `warning: "Picture is locked at vN"`; the version is still added.
|
|
123
123
|
6. **Reply to every note** in one `rushes_reply` call. For each, set `status: "done"`, a one-line `reply`, `fixT` (when the fix is visible in the new cut, in seconds) and `fixVersion`. If you didn't fix a note, leave it `todo` and say why in `reply`.
|
|
124
|
-
7. **Audio batches.** On Voiceover, Music, Sound effects or Mix, call `rushes_get_picks` first, so you know which read or variant is in use before you fix anything. On Mix, it also returns `levels: { voice?, music?, sfx? }` in dB — where the user wants each lane to sit. Don't try to change these; they're set from the dashboard's sliders and only tell you the balance the user has already chosen. Then fix each note:
|
|
124
|
+
7. **Audio batches.** On Voiceover, Music, Sound effects or Mix, call `rushes_get_picks` first (pass the note's film as `video`: picks and levels are per film), so you know which read or variant is in use before you fix anything. On Mix, it also returns `levels: { voice?, music?, sfx? }` in dB — where the user wants each lane to sit. Don't try to change these; they're set from the dashboard's sliders and only tell you the balance the user has already chosen. Then fix each note:
|
|
125
125
|
- **Voiceover:** register a new whole read with `rushes_add_variant` (`stage: "voice"`) — a new round for a new direction (another voice, a different tone), or the current round for a small fix to a marked word. Say in `description` what changed.
|
|
126
126
|
- **Music or Sound effects:** make the new bed or pass the text and marks ask for, and register it as in step 1.
|
|
127
127
|
|
|
@@ -157,7 +157,7 @@ The MCP server has twenty-three tools: `rushes_open`, `rushes_status`, `rushes_a
|
|
|
157
157
|
## Rules
|
|
158
158
|
|
|
159
159
|
- Never edit `.rushes/*.json` by hand while the server is running. Use the tools, or the CLI (`rushes add`, `rushes notes`, `rushes reply`).
|
|
160
|
-
- Picks — which variant is in use per lane — are set from the dashboard only (**Use** / **Unpick**). No tool or CLI command sets one; read them with `rushes_get_picks`. Section take picks remain in the file format for compatibility only; nothing sets them any more.
|
|
160
|
+
- Picks — which variant is in use per lane, for each film on its own — are set from the dashboard only (**Use** / **Unpick**). No tool or CLI command sets one; read them with `rushes_get_picks`. Section take picks remain in the file format for compatibility only; nothing sets them any more.
|
|
161
161
|
- A project whose voiceover exists only as takes from before rounds keeps Voiceover locked until a voice read exists, but open notes on those takes still count towards Send to agent and can be answered with `rushes_reply`.
|
|
162
162
|
- You own a note's `reply`, `fixT` and `fixVersion`. The user owns its text, times and box. Either of you can set `status`.
|
|
163
163
|
- After the first cut, send the storyboard's shots with `rushes_set_shots`; when a new cut moves them, send new timings.
|
package/dist/core/logEvents.js
CHANGED
|
@@ -126,15 +126,19 @@ export function takeEvent(section, take, number) {
|
|
|
126
126
|
export function scriptEvent(sections) {
|
|
127
127
|
return { area: "script", kind: "script", merge: "replace", text: `Script set: ${plural(sections, "section", "sections")}` };
|
|
128
128
|
}
|
|
129
|
-
/** `Picks: voice “Vo Jules, full read”, music “Night drive, held back”`, the whole set after the change
|
|
130
|
-
export function picksEvent(project, lanes) {
|
|
129
|
+
/** `Picks: voice “Vo Jules, full read”, music “Night drive, held back”`, the whole set after the change; for one film, `Picks for “Key”: …`. */
|
|
130
|
+
export function picksEvent(project, lanes, video) {
|
|
131
131
|
const parts = [];
|
|
132
132
|
for (const lane of project.lanes) {
|
|
133
133
|
const v = lane.variants.find((x) => x.id === lanes[lane.id]);
|
|
134
134
|
if (v)
|
|
135
135
|
parts.push(`${PICK_WORDS[lane.stage]} ${quoted(v.name, lane.stage === "voice" ? "a read" : "a variant")}`);
|
|
136
136
|
}
|
|
137
|
-
|
|
137
|
+
const film = video ? named(video.name, PLACE_MAX) : "";
|
|
138
|
+
const head = film ? `Picks for ${quoted(film, "")}` : "Picks";
|
|
139
|
+
// Per film, so one film's picks never replace another's line in the log.
|
|
140
|
+
const scope = video ? { subject: video.id, video: video.id, version: null } : {};
|
|
141
|
+
return { area: "mix", kind: "picks", merge: "replace", windowMs: PICKS_MERGE_MS, ...scope, text: parts.length ? `${head}: ${parts.join(", ")}` : `${video ? `${head} cleared` : "Picks cleared"}` };
|
|
138
142
|
}
|
|
139
143
|
/** "Picture locked at v6", "Picture unlocked". */
|
|
140
144
|
export function lockEvent(films, video) {
|
package/dist/core/schema.js
CHANGED
|
@@ -268,14 +268,31 @@ export const LEVEL_MIN = -24;
|
|
|
268
268
|
export const LEVEL_MAX = 6;
|
|
269
269
|
export const LEVEL_STEP = 0.5;
|
|
270
270
|
export const LevelsSchema = fileObject({ voice: z.number(), music: z.number(), sfx: z.number() }).partial().default({});
|
|
271
|
+
// What one film hears: its own pick per lane and its own Mix levels. Music, sound effects, the
|
|
272
|
+
// voiceover read and the levels belong to a film, so a second film never inherits the first's.
|
|
273
|
+
export const VideoPicksSchema = fileObject({
|
|
274
|
+
lanes: z.record(z.string(), z.string()).default({}),
|
|
275
|
+
levels: LevelsSchema,
|
|
276
|
+
});
|
|
271
277
|
export const PicksSchema = fileObject({
|
|
272
278
|
schema: z.literal(1),
|
|
273
279
|
rev: z.number().int().nonnegative(),
|
|
280
|
+
// The project-wide picks of a project from before picks were per film. Nothing reads them for a
|
|
281
|
+
// film any more; a write that names no film (an old client, a test) still lands here.
|
|
274
282
|
lanes: z.record(z.string(), z.string()).default({}),
|
|
275
283
|
sections: z.record(z.string(), z.string()).default({}),
|
|
276
284
|
// §19.6: each Mix lane's level in dB, defaulting to 0 (absent). Keyed the same as LaneStage.
|
|
277
285
|
levels: LevelsSchema,
|
|
286
|
+
// Each film's own picks and levels, keyed by video id. A film with no entry has picked nothing.
|
|
287
|
+
videos: z.record(z.string(), VideoPicksSchema).default({}),
|
|
278
288
|
});
|
|
289
|
+
/** The picks one film plays: its own entry, or nothing picked. With no film named, the project-wide set. */
|
|
290
|
+
export function picksForVideo(picks, videoId) {
|
|
291
|
+
if (!videoId)
|
|
292
|
+
return picks;
|
|
293
|
+
const own = picks.videos[videoId];
|
|
294
|
+
return { ...picks, lanes: { ...(own?.lanes ?? {}) }, levels: { ...(own?.levels ?? {}) }, sections: {}, videos: {} };
|
|
295
|
+
}
|
|
279
296
|
export const BatchSchema = fileObject({
|
|
280
297
|
id,
|
|
281
298
|
stage: StageSchema,
|
package/dist/core/store.js
CHANGED
|
@@ -14,7 +14,7 @@ function defaults(key, name) {
|
|
|
14
14
|
case "notes":
|
|
15
15
|
return { schema: 1, rev: 0, notes: [] };
|
|
16
16
|
case "picks":
|
|
17
|
-
return { schema: 1, rev: 0, lanes: {}, sections: {}, levels: {} };
|
|
17
|
+
return { schema: 1, rev: 0, lanes: {}, sections: {}, levels: {}, videos: {} };
|
|
18
18
|
case "batches":
|
|
19
19
|
return { schema: 1, rev: 0, batches: [] };
|
|
20
20
|
case "found":
|
package/dist/mcp/tools.js
CHANGED
|
@@ -337,9 +337,9 @@ export function createMcpServer(ctx) {
|
|
|
337
337
|
}, safe(async ({ project, kind }) => (await ctx.client(project)).get(`/api/assets${kind ? `?kind=${encodeURIComponent(kind)}` : ""}`)));
|
|
338
338
|
server.registerTool("rushes_get_picks", {
|
|
339
339
|
title: "Get picks",
|
|
340
|
-
description: "Which variant is in use per audio lane (per round on Voiceover), and each Mix lane's level in dB (where the user wants voice, music and sfx to sit). Section take picks are kept for older projects but not used.",
|
|
341
|
-
inputSchema: { project },
|
|
342
|
-
}, safe(async ({ project }) => (await ctx.client(project)).get(
|
|
340
|
+
description: "Which variant is in use per audio lane (per round on Voiceover), and each Mix lane's level in dB (where the user wants voice, music and sfx to sit). Picks and levels belong to one film: pass `video` (the film's id, as in the note you are fixing) to read that film's own; without it you get the whole file, each film's under `videos`. Section take picks are kept for older projects but not used.",
|
|
341
|
+
inputSchema: { project, video: z.string().optional().describe("The film's id. Picks and levels are per film.") },
|
|
342
|
+
}, safe(async ({ project, video }) => (await ctx.client(project)).get(`/api/picks${video ? `?video=${encodeURIComponent(video)}` : ""}`)));
|
|
343
343
|
server.registerTool("rushes_add_file", {
|
|
344
344
|
title: "Add a file to the library",
|
|
345
345
|
description: "Register a project file (a doc, image, caption, export, delivery or edit file) in the Assets library, so it's listed, can be revealed, downloaded and opened. Docs, text and PDFs at the project root, captions at the root, and anything in exports/ are found automatically; other files need this.",
|
package/dist/server/app.js
CHANGED
|
@@ -24,7 +24,7 @@ import { GRAB_PATH, OUTSIDE_CUT_EXT, OUTSIDE_MEDIA_EXT, SCREENSHOT_PATH, content
|
|
|
24
24
|
import { BRING_IN_MAX, FoundScanner, ffprobeDuration, foundAnnouncer } from "./found.js";
|
|
25
25
|
import { candidatePaths, listAssets, fpsFor, screenshotName } from "./assets.js";
|
|
26
26
|
import { osRevealer, osOpener, OPEN_SAFE_EXT } from "./reveal.js";
|
|
27
|
-
import { LaneStageSchema, SectionStatusSchema, StageSchema, BoxSchema, PinSchema, FileKindSchema, MarkSchema, ProjectIdSchema, ShotSchema, LEVEL_MIN, LEVEL_MAX, LEVEL_STEP } from "../core/schema.js";
|
|
27
|
+
import { LaneStageSchema, SectionStatusSchema, StageSchema, BoxSchema, PinSchema, FileKindSchema, MarkSchema, ProjectIdSchema, ShotSchema, LEVEL_MIN, LEVEL_MAX, LEVEL_STEP, picksForVideo } from "../core/schema.js";
|
|
28
28
|
import { LABEL_MAX, oneLineOf } from "../core/labels.js";
|
|
29
29
|
import { byOf, logBookFor } from "./logbook.js";
|
|
30
30
|
import { BriefService } from "./brief.js";
|
|
@@ -33,7 +33,7 @@ import { buildState, planWarning } from "../core/plan.js";
|
|
|
33
33
|
import { broughtInEvent, cutEvent, fileEvent, filmEvent, formatEvent, lineEvent, lockEvent, notesSentEvent, picksEvent, repliesEvent, scriptEvent, takeEvent, variantEvent, visualEvent, } from "../core/logEvents.js";
|
|
34
34
|
import { LOG_AREAS, LOG_MAX, changeLogFileName, logText, recentChanges } from "../core/logText.js";
|
|
35
35
|
import { defaultRunner, measureMix } from "./loudness.js";
|
|
36
|
-
export const VERSION = "0.7.
|
|
36
|
+
export const VERSION = "0.7.1";
|
|
37
37
|
async function body(c, schema) {
|
|
38
38
|
let json;
|
|
39
39
|
try {
|
|
@@ -168,7 +168,7 @@ const PickMap = z.record(z.string(), z.string().nullable());
|
|
|
168
168
|
// §19.6: a level is −24..6 dB in 0.5 dB steps; null resets it to 0 (removes the key).
|
|
169
169
|
const LevelValue = z.number().min(LEVEL_MIN).max(LEVEL_MAX).multipleOf(LEVEL_STEP);
|
|
170
170
|
const LevelsBody = z.object({ voice: LevelValue.nullable(), music: LevelValue.nullable(), sfx: LevelValue.nullable() }).partial();
|
|
171
|
-
const PicksBody = z.object({ lanes: PickMap.optional(), sections: PickMap.optional(), levels: LevelsBody.optional() });
|
|
171
|
+
const PicksBody = z.object({ video: z.string().min(1).max(200).optional(), lanes: PickMap.optional(), sections: PickMap.optional(), levels: LevelsBody.optional() });
|
|
172
172
|
const BatchBody = z.object({ stage: StageSchema });
|
|
173
173
|
const NoteQuery = z.object({
|
|
174
174
|
stage: StageSchema.optional(),
|
|
@@ -188,7 +188,7 @@ const ShotsBody = z.object({
|
|
|
188
188
|
});
|
|
189
189
|
const LockBody = z.object({ version: z.string().nullable() });
|
|
190
190
|
const ShelveBody = z.object({ shelved: z.boolean() });
|
|
191
|
-
const MixLoudnessBody = z.object({ lanes: z.array(LaneStageSchema).min(1) });
|
|
191
|
+
const MixLoudnessBody = z.object({ lanes: z.array(LaneStageSchema).min(1), video: z.string().min(1).max(200).optional() });
|
|
192
192
|
const SettingsBody = z.object({ autoProxy: z.boolean() }).strict();
|
|
193
193
|
// A time in seconds, 0 to 24 h: an empty value, NaN, Infinity or anything huge is a 400.
|
|
194
194
|
const FrameQuery = z.object({
|
|
@@ -1161,7 +1161,12 @@ export function createApp(store, opts = {}) {
|
|
|
1161
1161
|
return c.json({ take: result }, 201);
|
|
1162
1162
|
});
|
|
1163
1163
|
// ---- picks ----
|
|
1164
|
-
|
|
1164
|
+
// ?video=<id> reads one film's picks as a plain picks file (lanes and levels are that film's own).
|
|
1165
|
+
app.get("/api/picks", async (c) => {
|
|
1166
|
+
const picks = await store.read("picks");
|
|
1167
|
+
const video = c.req.query("video");
|
|
1168
|
+
return c.json(video ? picksForVideo(picks, video) : picks);
|
|
1169
|
+
});
|
|
1165
1170
|
app.put("/api/picks", async (c) => {
|
|
1166
1171
|
const b = await body(c, PicksBody);
|
|
1167
1172
|
// Merged key by key: a string sets that pick, null removes it, anything not named is kept.
|
|
@@ -1173,11 +1178,7 @@ export function createApp(store, opts = {}) {
|
|
|
1173
1178
|
into[k] = v;
|
|
1174
1179
|
}
|
|
1175
1180
|
};
|
|
1176
|
-
|
|
1177
|
-
const { data } = await store.update("picks", (p) => {
|
|
1178
|
-
before = { ...p.lanes };
|
|
1179
|
-
merge(p.lanes, b.lanes);
|
|
1180
|
-
merge(p.sections, b.sections);
|
|
1181
|
+
const mergeLevels = (into) => {
|
|
1181
1182
|
// §19.6: same merge rule as lanes/sections -- a number sets the level, null resets it to 0
|
|
1182
1183
|
// (deletes the key), anything not named is kept.
|
|
1183
1184
|
for (const stage of ["voice", "music", "sfx"]) {
|
|
@@ -1185,29 +1186,45 @@ export function createApp(store, opts = {}) {
|
|
|
1185
1186
|
if (v === undefined)
|
|
1186
1187
|
continue;
|
|
1187
1188
|
if (v === null)
|
|
1188
|
-
delete
|
|
1189
|
+
delete into[stage];
|
|
1189
1190
|
else
|
|
1190
|
-
|
|
1191
|
+
into[stage] = v;
|
|
1191
1192
|
}
|
|
1193
|
+
};
|
|
1194
|
+
let before = {};
|
|
1195
|
+
const { data } = await store.update("picks", (p) => {
|
|
1196
|
+
merge(p.sections, b.sections);
|
|
1197
|
+
if (b.video) {
|
|
1198
|
+
// A film's picks and levels are its own: another film's are never touched.
|
|
1199
|
+
const own = (p.videos[b.video] ??= { lanes: {}, levels: {} });
|
|
1200
|
+
before = { ...own.lanes };
|
|
1201
|
+
merge(own.lanes, b.lanes);
|
|
1202
|
+
mergeLevels(own.levels);
|
|
1203
|
+
return;
|
|
1204
|
+
}
|
|
1205
|
+
before = { ...p.lanes };
|
|
1206
|
+
merge(p.lanes, b.lanes);
|
|
1207
|
+
mergeLevels(p.levels);
|
|
1192
1208
|
});
|
|
1209
|
+
const now = b.video ? (data.videos[b.video]?.lanes ?? {}) : data.lanes;
|
|
1193
1210
|
// §22.5: a change of what's picked is logged; levels alone aren't (R10).
|
|
1194
|
-
const changed = Object.keys({ ...before, ...
|
|
1211
|
+
const changed = Object.keys({ ...before, ...now }).some((k) => before[k] !== now[k]);
|
|
1195
1212
|
if (changed) {
|
|
1196
1213
|
// The names come from project.json; if it can't be read now, the pick still stands (ruling e).
|
|
1197
1214
|
const project = await store.read("project").catch(() => null);
|
|
1198
1215
|
if (project)
|
|
1199
|
-
await log.add(() => picksEvent(project,
|
|
1216
|
+
await log.add(() => picksEvent(project, now, project.videos.find((v) => v.id === b.video)), by(c));
|
|
1200
1217
|
else
|
|
1201
1218
|
log.failures += 1;
|
|
1202
1219
|
}
|
|
1203
|
-
return c.json(data);
|
|
1220
|
+
return c.json(b.video ? picksForVideo(data, b.video) : data);
|
|
1204
1221
|
});
|
|
1205
1222
|
// ---- mix loudness (§17.6) ----
|
|
1206
1223
|
app.post("/api/mix/loudness", async (c) => {
|
|
1207
1224
|
const b = await body(c, MixLoudnessBody);
|
|
1208
1225
|
const [project, picks] = await Promise.all([store.read("project"), store.read("picks")]);
|
|
1209
1226
|
const run = opts.loudnessRunner ?? defaultRunner;
|
|
1210
|
-
const result = await measureMix(project, picks, b.lanes, store.root, run, opts.loudnessTimeoutMs);
|
|
1227
|
+
const result = await measureMix(project, picksForVideo(picks, b.video), b.lanes, store.root, run, opts.loudnessTimeoutMs);
|
|
1211
1228
|
return c.json(result);
|
|
1212
1229
|
});
|
|
1213
1230
|
// ---- batches ----
|
package/package.json
CHANGED