rushes 0.6.3 → 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 +6 -2
- package/README.md +8 -1
- package/dist/cli/main.js +10 -3
- package/dist/core/batches.js +3 -1
- package/dist/core/exportNotes.js +3 -0
- package/dist/core/logEvents.js +12 -3
- package/dist/core/logText.js +1 -1
- package/dist/core/project.js +29 -1
- package/dist/core/schema.js +19 -0
- package/dist/core/store.js +1 -1
- package/dist/core/tabs.js +3 -1
- package/dist/mcp/tools.js +7 -7
- package/dist/server/app.js +67 -22
- package/dist/server/found.js +17 -9
- package/package.json +1 -1
- package/skills/rushes/SKILL.md +4 -0
- package/web-dist/assets/index-B4EIQ7WV.js +7 -0
- package/web-dist/assets/index-BH66xs4n.css +1 -0
- package/web-dist/index.html +2 -2
- package/web-dist/assets/index-Bc-DIF61.js +0 -7
- package/web-dist/assets/index-V7YEFWgg.css +0 -1
package/dist/server/found.js
CHANGED
|
@@ -6,10 +6,10 @@ import { InvalidError, RevConflictError, RushesError } from "../core/errors.js";
|
|
|
6
6
|
import { slugify } from "../core/ids.js";
|
|
7
7
|
import { AUDIO_FORMATS, probe as ffprobe } from "../core/media.js";
|
|
8
8
|
import { fromManifestPath, toManifestPath } from "../core/paths.js";
|
|
9
|
-
import { addFile, addVariant, addVersion, resolveVideo } from "../core/project.js";
|
|
9
|
+
import { addFile, addVariant, addVersion, inPlay, resolveVideo } from "../core/project.js";
|
|
10
10
|
import { cueFiles } from "../core/cues.js";
|
|
11
11
|
import { logBookFor } from "./logbook.js";
|
|
12
|
-
import { broughtInEvent, cutName } from "../core/logEvents.js";
|
|
12
|
+
import { broughtInEvent, cutName, filmEvent } from "../core/logEvents.js";
|
|
13
13
|
/** The audio kinds, which an include can settle. */
|
|
14
14
|
const AUDIO_KINDS = new Set(["voice", "music", "sfx"]);
|
|
15
15
|
/** The most cuts' settled kinds found.json keeps (the newest). */
|
|
@@ -156,7 +156,8 @@ function addedTime(v) {
|
|
|
156
156
|
}
|
|
157
157
|
/**
|
|
158
158
|
* §20.4's cut: the named film's newest version when it has one, otherwise the newest registered
|
|
159
|
-
* cut of any film (latest `addedAt`; on a tie, the later one in the project).
|
|
159
|
+
* cut of any film (latest `addedAt`; on a tie, the later one in the project). §26: a shelved film is
|
|
160
|
+
* passed over while any film is in play, so a file nobody named a film for never restores one.
|
|
160
161
|
*/
|
|
161
162
|
export function anchorCut(p, film) {
|
|
162
163
|
if (film !== undefined) {
|
|
@@ -171,7 +172,8 @@ export function anchorCut(p, film) {
|
|
|
171
172
|
}
|
|
172
173
|
}
|
|
173
174
|
let best = null;
|
|
174
|
-
|
|
175
|
+
const candidates = p.videos.some(inPlay) ? p.videos.filter(inPlay) : p.videos;
|
|
176
|
+
for (const video of candidates) {
|
|
175
177
|
for (const version of video.versions) {
|
|
176
178
|
if (!best || addedTime(version) >= addedTime(best.version))
|
|
177
179
|
best = { video, version };
|
|
@@ -566,6 +568,8 @@ export class FoundScanner {
|
|
|
566
568
|
// §22.5: what the current set brought in is one line, by Rushes (R8, R9); its variants are dated (R5).
|
|
567
569
|
// Built inside add's guard, so a line that can't be made never undoes the bring-in (M1).
|
|
568
570
|
const cut = anchor;
|
|
571
|
+
for (const f of result.restored ?? [])
|
|
572
|
+
await logBookFor(this.store).add(() => filmEvent(f, false), "rushes");
|
|
569
573
|
if (result.added.length)
|
|
570
574
|
await logBookFor(this.store).add(() => broughtInEvent(result.added, cut ? cutName(films, cut.video, cut.version.id) : null), "rushes");
|
|
571
575
|
return result;
|
|
@@ -738,7 +742,7 @@ export class FoundScanner {
|
|
|
738
742
|
this.current.delete(a.path);
|
|
739
743
|
}
|
|
740
744
|
this.announce();
|
|
741
|
-
return { added: result.ok, failed: [...failed, ...result.refused] };
|
|
745
|
+
return { added: result.ok, failed: [...failed, ...result.refused], ...(result.restored.length ? { restored: result.restored } : {}) };
|
|
742
746
|
}
|
|
743
747
|
catch (e) {
|
|
744
748
|
if (e instanceof NothingAdded)
|
|
@@ -753,6 +757,7 @@ export class FoundScanner {
|
|
|
753
757
|
/** Registers the plan in the project draft, in order. The cap counts only what goes in. */
|
|
754
758
|
applyPlan(p, plan, film) {
|
|
755
759
|
const ok = [];
|
|
760
|
+
const restored = [];
|
|
756
761
|
const refused = [];
|
|
757
762
|
const perKind = new Map();
|
|
758
763
|
for (const it of plan) {
|
|
@@ -760,7 +765,7 @@ export class FoundScanner {
|
|
|
760
765
|
refused.push(refusal(it.item.path, R.cap));
|
|
761
766
|
continue;
|
|
762
767
|
}
|
|
763
|
-
const out = this.register(p, it, film);
|
|
768
|
+
const out = this.register(p, it, film, restored);
|
|
764
769
|
if ("reason" in out) {
|
|
765
770
|
refused.push(refusal(it.item.path, out.reason));
|
|
766
771
|
continue;
|
|
@@ -768,10 +773,10 @@ export class FoundScanner {
|
|
|
768
773
|
ok.push(out);
|
|
769
774
|
perKind.set(it.kind, (perKind.get(it.kind) ?? 0) + 1);
|
|
770
775
|
}
|
|
771
|
-
return { ok, refused };
|
|
776
|
+
return { ok, refused, restored };
|
|
772
777
|
}
|
|
773
778
|
/** Registers one planned item in the project draft, or says why it can't, changing nothing. */
|
|
774
|
-
register(p, it, film) {
|
|
779
|
+
register(p, it, film, restored) {
|
|
775
780
|
const stem = basename(it.rel, extname(it.rel));
|
|
776
781
|
const name = fitName(stem);
|
|
777
782
|
switch (it.kind) {
|
|
@@ -793,7 +798,10 @@ export class FoundScanner {
|
|
|
793
798
|
}
|
|
794
799
|
case "cut": {
|
|
795
800
|
const duration = this.durations.get(revKey(it)) ?? null;
|
|
796
|
-
const
|
|
801
|
+
const out = addVersion(p, { video: filmFor(p, film) ?? (film ? fitName(film) : name), file: it.rel, duration });
|
|
802
|
+
const { video, version } = out;
|
|
803
|
+
if (out.restored)
|
|
804
|
+
restored.push({ id: video.id, name: video.name });
|
|
797
805
|
return { path: it.rel, kind: it.kind, video: video.id, version: version.id };
|
|
798
806
|
}
|
|
799
807
|
case "doc":
|
package/package.json
CHANGED
package/skills/rushes/SKILL.md
CHANGED
|
@@ -51,6 +51,10 @@ When a user starts briefing in the chat, offer to keep `brief.md` up to date as
|
|
|
51
51
|
|
|
52
52
|
For stills, standalone images and carousels, register one visual per post with `rushes_add_visual`: a `name` and `pages`, each page with its pictures, one per aspect ratio, in every aspect ratio the post comes in (Rushes reads each ratio from the picture). The user marks a region, a point or the whole image in the Visuals tab and sends a batch; each note names its visual, version, page, ratio, where on the picture it is (`words`) and the `file` to open. A note with no ratio is for every ratio. Fix the pictures, register a new version with `rushes_add_visual` (`visual` and only the pages that changed, each with `n`), then `rushes_reply` to each note you fixed with `status: "done"` and `fixVersion` set to it (a note you did not fix stays `todo`, with the reason in `reply`). The full contract is in `AGENTS.md`.
|
|
53
53
|
|
|
54
|
+
## Shelved films
|
|
55
|
+
|
|
56
|
+
`rushes_status` returns `films`, each with `shelved` (the time the user shelved it, or null). A shelved film is one the user has set aside: leave it alone, make no new cuts of it and fix none of its notes unless they ask. A new cut of a shelved film brings it back (`restored: true` in the reply), so make one only when they want that film worked on again. You never shelve or restore a film.
|
|
57
|
+
|
|
54
58
|
## Reviewing and fixing
|
|
55
59
|
|
|
56
60
|
1. Register what you made:
|