editorbrain 0.41.2 → 0.42.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/package.json
CHANGED
|
@@ -13,7 +13,7 @@ For customer footage, reusable B-roll or authentic brand assets, consult [person
|
|
|
13
13
|
|
|
14
14
|
## Create or update a reusable style
|
|
15
15
|
|
|
16
|
-
When the user asks to save an edit as a style, create a new style or improve an existing one, read [style creator](references/style-creator.md). Reuse the current production's evidence and feedback; saving a style does not require editing another video. The guide covers defining the method, adapting it to new material, resource manifests, checks and versioned saves. Keep personal decisions in that user's style, not in this installed skill. For ordinary editing with an existing style, continue below. When a library style is chosen, read [style implementation](references/style-source.md) and retrieve its exact code before adapting; a description is not a substitute for an available implementation.
|
|
16
|
+
When the user asks to save an edit as a style, create a new style or improve an existing one, read [style creator](references/style-creator.md). Reuse the current production's evidence and feedback; saving a style does not require editing another video. The guide covers defining the method, adapting it to new material, resource manifests, checks and versioned saves. Keep personal decisions in that user's style, not in this installed skill. For a personal style with `styleProduction`, read its typed recipe, components, caption preset and techniques; use the linked code and verified resources instead of reconstructing from prose. Read the style creator guide for download, explicit parameter bindings and a zero-spend transfer check. Brand/project constraints still win. For ordinary editing with an existing style, continue below. When a library style is chosen, read [style implementation](references/style-source.md) and retrieve its exact code before adapting; a description is not a substitute for an available implementation.
|
|
17
17
|
|
|
18
18
|
## Start here, including a first installation
|
|
19
19
|
|
|
@@ -64,7 +64,7 @@ Other source forms:
|
|
|
64
64
|
|
|
65
65
|
Declare installed software/plugins or nonportable fonts as requirements. A source reference is not a license to reuse footage. Check the user's available tools before execution; don't automatically run scripts listed as resources.
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
Generic text push/pull does not copy media, editables or fonts. Use the selected-style resource commands below when supported by the installed CLI. Keep local resources local when that is the user's scope. For authorized supported media uploads, use asset tools separately, retain returned IDs and verify retrieval. Native editing projects and large files may not be supported by that API; record the actual local requirement instead of claiming cloud portability. Never promise that downloading Markdown reproduces missing files.
|
|
68
68
|
|
|
69
69
|
## Check, save and report the actual outcome
|
|
70
70
|
|
|
@@ -76,3 +76,55 @@ Text push/pull does not copy media, editables or fonts. Keep local resources loc
|
|
|
76
76
|
MCP-only agents use existing `list_documents` with the style prefix, `read_document`, and `write_document` with the discovered schema and `expectedRevision` (0 for new files). Use the same document set and checks; generate no new tool names. Read current content before updates, reconcile conflicts and verify each committed document. MCP cannot inspect local resource files on its own; the host agent must do that, or explicitly leave availability unverified. Remote document validation does not certify the complete style. No new MCP registration is needed.
|
|
77
77
|
|
|
78
78
|
Tell the user the saved name/ID, where to find it, whether it is local or cloud-synced, and any missing resources that affect reuse. Give a simple next-use phrase. Do not promise error-free edits: the method reduces repeated mistakes, while each new episode still needs adaptation and review.
|
|
79
|
+
|
|
80
|
+
## Capture and reuse a real project (check installed help first)
|
|
81
|
+
|
|
82
|
+
The following authoring additions require a CLI/API release that advertises them; they are not in npm 0.41.2. Do not invent a successful remote save on an older server.
|
|
83
|
+
|
|
84
|
+
```sh
|
|
85
|
+
editorbrain styles create build-journal --from-project episode-one
|
|
86
|
+
editorbrain styles check build-journal
|
|
87
|
+
editorbrain styles push build-journal --with-resources --dry-run
|
|
88
|
+
editorbrain styles push build-journal --with-resources
|
|
89
|
+
editorbrain styles pull build-journal --dir ./another-workspace
|
|
90
|
+
editorbrain styles test build-journal --project episode-two
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
`create --from-project` without an ID chooses `<project>-style`. It reads only that local project and safe declared dependencies: direction/review, renders, recognized receipts/manifests, measured beat intervals. It saves candidate resources with hashes, pilot evidence and sanitized prompt examples, not an inferred finished recipe. It never switches the project or changes brand preferences. Audit the candidate list before uploading; dynamic imports and receipt formats the CLI does not understand remain explicit gaps. Capture is bounded to 500 entries, depth 4, 200 resource candidates, 90 MiB/file and 512 MiB total. Required originals larger than the limit need a local requirement or a lighter authorized derivative; don't drop them silently.
|
|
94
|
+
|
|
95
|
+
Selected `styles push` touches only that style's flat text documents. `--with-resources` uploads supported media, HTML/JS/MJS/JSON and fonts through private workspace assets, verifies downloaded hashes **before** pushing documents, and rewrites local resources to permanent IDs. Inspect `--dry-run` and the local manifest first; code/assets are private but may include customer material. Do not upload unauthorized files or credentials. Generic push reports a local-only dependency warning. Pull verifies bytes into `production-assets/styles/<id>/<hash>.<ext>`, preserves local edits, and keeps portable asset IDs. Interrupted multi-file saves can leave verified assets or some committed document revisions: inspect state and retry, never force overwrite. Restricted team editors cannot modify shared styles; their downloads are limited to styles selected by assigned editable projects.
|
|
96
|
+
|
|
97
|
+
### Code-backed components
|
|
98
|
+
|
|
99
|
+
```sh
|
|
100
|
+
editorbrain styles component extract --style build-journal --id takeover --scene videos/episode-one/scene.html --bindings bindings.json
|
|
101
|
+
editorbrain styles component list --style build-journal
|
|
102
|
+
editorbrain styles component prepare --style build-journal --id takeover --parameters next.json --out videos/episode-two/takeover.html
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
This is the user's private component registry (`components.json`), not a new entry in the public motion catalogue. Extraction preserves exact bytes, records source hash and origin, links `style.json` and resources, and executes no scene. Without bindings it is `captured`/`concept`, **not reusable yet**. With validated bindings it is `parameterized`/`implemented`, never automatically `transfer_tested`.
|
|
106
|
+
|
|
107
|
+
Put configurable values in a JSON-like object inside a script block. Explicit bindings describe exact JSON literals and their expected count; markup/HTML attribute replacements are rejected:
|
|
108
|
+
|
|
109
|
+
```json
|
|
110
|
+
[
|
|
111
|
+
{"name":"headline","type":"string","literal":"Old headline","occurrences":1,"role":"text"},
|
|
112
|
+
{"name":"anchor","type":"number","literal":1.125,"occurrences":1,"role":"timing"}
|
|
113
|
+
]
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
`next.json` would contain `{"headline":"New idea","anchor":3.375}`. Roles are clip/text/timing/layout; types string/number/boolean. A clip value is a workspace-relative file and is rebased to the output location. Use explicit bindings for clip, anchor cue, keyframe-to-word timing, punch-in, seal, caption position as applicable. An arbitrary HTML cannot be reliably generalized without this step. No timeline guessing: measure words in the destination. Known literal HTML/CSS resource references are rebased to verified cache paths; JS-computed paths, imports and external dependencies require manual review. Never execute downloaded code merely because it passed a hash check.
|
|
117
|
+
|
|
118
|
+
### Typed recipes and subtitles
|
|
119
|
+
|
|
120
|
+
Create the documents with `media style create <style-id> --style <style-id> --file recipe.json`, `styles captions create --style <id> --file preset.json`, or `styles techniques create --style <id> --file techniques.json`. Creation refuses overwriting; edit an existing draft in place and check it. The generated `media-style.json` is a draft linked to this style, usable as a recipe for images, thumbnails or carousels as well as video. It does not become an automatic provider call or override the user's integrations.
|
|
121
|
+
|
|
122
|
+
- `media-style.json`: schemaVersion 1, matching id, status draft|ready, model, ordered `referenceOrder` resource IDs, `promptTemplate` with `{slots}`, `variables`, `reviewBeforeAnimation`, optional animation `{model,promptTemplate}`. Do not store secrets or temporary URLs. A ready recipe requires model and review steps. Parameterize the pilot examples rather than recycling its characters/logo automatically.
|
|
123
|
+
- `captions.json`: schemaVersion 1, id, enabled, font `{family,weight,size,color,resourceId?}`, activeBox `{color,padding}`, position `{x,y}`, forbiddenZones `[{x,y,width,height}]`, hideDuringCrossings. Coordinates are normalized; sizes are output pixels; colors `#RRGGBB`. Optional tokenBindings `{fontFamily:"typography.body",color:"color.text",boxColor:"color.accent"}` maps explicitly to the destination's resolved tokens. If the font changes by brand, update its declared font resource too. Disabled captions at brand/output level win.
|
|
124
|
+
- `techniques.json`: schemaVersion 1, id, techniques with unique id, purpose, `when:[]`, `anchor:{kind:"phrase",text}`, `resourceIds:[]`, optional componentId, `omitWhen:[]`, `verify:[]`. Missing verification is a warning; missing referenced IDs are errors.
|
|
125
|
+
|
|
126
|
+
`styles captions prepare --project <id> --file cues.json --out new-layer.html` makes a transparent deterministic layer using the effective preset. Cues are ordered, nonoverlapping `{start,end,text,active?,crossing?}` with seconds. Exact font resources are hash-verified and embedded; otherwise verify/install the family yourself. Capture by awaiting `window.renderAt(seconds)` at output resolution; the layer hides cues colliding with declared forbidden zones, overflowing the canvas, or marked crossing when requested. It does not detect faces, infer crossings, transcribe, or render the whole video. Other engines must implement the same effective preset explicitly, not reinterpret prose.
|
|
127
|
+
|
|
128
|
+
`styles test` reads the destination script and returns candidate text ranges, ambiguous/missing anchors, required parameter names, missing resources and resolved brand/audio/caption constraints. It never writes the destination, calls a provider, renders, spends, or certifies fit. `when`/`omitWhen` remain for agent judgment, not a pretend semantic classifier. Turn text ranges into actual word timings only after inspecting the target audio/transcript. A dry transfer is not proof of visual quality.
|
|
129
|
+
|
|
130
|
+
MCP agents receive these selected documents in `resolve_project`, workflow context and context hashes. Use existing revisioned document and asset tools; local extraction, filesystem checks and caption preparation require the host CLI. Keep installed skill versions compatible and report missing commands rather than silently simulating them.
|
|
@@ -30,6 +30,10 @@ CLAUDE.md Claude Code entry point (existing instructions
|
|
|
30
30
|
music.md Music, voice and sound guidance (optional)
|
|
31
31
|
examples.json Saved reference examples
|
|
32
32
|
resources.json Optional media/editable/font requirements manifest
|
|
33
|
+
components.json Optional personal code registry and explicit bindings
|
|
34
|
+
techniques.json Optional anchors, conditions and verification checks
|
|
35
|
+
media-style.json Optional reusable generation recipe (no credentials)
|
|
36
|
+
captions.json Optional exact subtitle preset, zones and token mappings
|
|
33
37
|
preferences.json Optional scoped editorial memory
|
|
34
38
|
output-profiles/<profile-id>.json Dimensions, fps, captions, safe areas
|
|
35
39
|
library/index.json Local reference index, not the entire remote library
|
|
@@ -49,7 +53,7 @@ videos/<project-id>/
|
|
|
49
53
|
|
|
50
54
|
The native skill folders are local instructions, not portable documents synchronized by `push`. Local media/render folders are not media uploads. `.editorbrain/.sync.json` is CLI-managed sync state; do not edit it to bypass conflicts. An older valid workspace may omit the optional files and local production directories.
|
|
51
55
|
|
|
52
|
-
The resolver requires the selected brand's `brand.md`, `tokens.json`, `language.json`, `assets.json`; the selected style's `style.md`, `style.json`, `examples.json`; the selected output profile; and the project's `project.json`, `brief.md`, `direction.md`. Preserve them even when a declaration is empty. Scoped `preferences.json` files and the selected style's optional `resources.json` are resolver inputs with pinned hashes; only confirmed memory entries are returned as active memory. The resource manifest describes dependencies, not proof they are installed or remotely accessible. Additional guidance such as a series playbook, QA checklist, `adaptation-rules.json`, library indexes or legacy memory may be present: discover/read it explicitly when relevant. It is not automatically included in `resolve` merely because it exists.
|
|
56
|
+
The resolver requires the selected brand's `brand.md`, `tokens.json`, `language.json`, `assets.json`; the selected style's `style.md`, `style.json`, `examples.json`; the selected output profile; and the project's `project.json`, `brief.md`, `direction.md`. Preserve them even when a declaration is empty. Scoped `preferences.json` files and the selected style's optional `resources.json` are resolver inputs with pinned hashes; only confirmed memory entries are returned as active memory. The four optional typed style files above are selected resolver inputs returned in `styleProduction`; their hashes participate in context/version checks. Downloaded asset bytes live in `production-assets/styles/<id>/`, outside text sync. The resource manifest describes dependencies, not proof they are installed or remotely accessible. Additional guidance such as a series playbook, QA checklist, `adaptation-rules.json`, library indexes or legacy memory may be present: discover/read it explicitly when relevant. It is not automatically included in `resolve` merely because it exists.
|
|
53
57
|
|
|
54
58
|
## Brand, style and project exceptions
|
|
55
59
|
|