editorbrain 0.42.0 → 0.42.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/README.md +2 -2
- package/bin/editorbrain.mjs +363 -183
- package/package.json +1 -1
- package/skill/editorbrain/references/style-creator.md +6 -4
package/package.json
CHANGED
|
@@ -79,6 +79,8 @@ Tell the user the saved name/ID, where to find it, whether it is local or cloud-
|
|
|
79
79
|
|
|
80
80
|
## Capture and reuse a real project (check installed help first)
|
|
81
81
|
|
|
82
|
+
The corrections for nested project capture, resource push/dry-run, directory bindings, text context and caption style override require 0.42.1. A globally installed 0.42.0 does not include them.
|
|
83
|
+
|
|
82
84
|
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
85
|
|
|
84
86
|
```sh
|
|
@@ -90,7 +92,7 @@ editorbrain styles pull build-journal --dir ./another-workspace
|
|
|
90
92
|
editorbrain styles test build-journal --project episode-two
|
|
91
93
|
```
|
|
92
94
|
|
|
93
|
-
`create --from-project` without an ID chooses `<project>-style`. It
|
|
95
|
+
`create --from-project` without an ID chooses `<project>-style`. It scans `videos/<id>/` and `.editorbrain-local/<id>/`, including nested production folders and `direction.md`/`review.md`, plus safe declared dependencies for that project: 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 2,000 entries, depth 8, 500 resource candidates (at most 200 portable resources), 90 MiB/file and 512 MiB total. Videos over 90 MiB can be streamed into hash-only local examples within the same 512 MiB budget; they are not uploaded or declared portable. Smaller files are captured first. Budget omissions and unreadable inputs are warnings; required originals need an explicit requirement or lighter authorized derivative. Receipts are recognized by model/provider plus generation fields (`input`, `output`, `taskId`, `jobId`, `tasks`, `jobs`, etc.), not a filename. Nested job prompts are sanitized examples, not provider receipts certified by the server. Unsupported formats need explicit review.
|
|
94
96
|
|
|
95
97
|
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
98
|
|
|
@@ -113,7 +115,7 @@ Put configurable values in a JSON-like object inside a script block. Explicit bi
|
|
|
113
115
|
]
|
|
114
116
|
```
|
|
115
117
|
|
|
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.
|
|
118
|
+
`next.json` would contain `{"headline":"New idea","anchor":3.375}`. Roles are clip/directory/text/timing/layout; types string/number/boolean. A clip value is a workspace-relative file and is rebased to the output location. `directory` requires a string path to an existing workspace folder (up to 500 entries/depth 4, no symlinks or private paths); it is rebased too, but does not upload its contents. Declare each portable dependency in resources.json. Binding names may use camelCase; IDs remain lowercase. 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
119
|
|
|
118
120
|
### Typed recipes and subtitles
|
|
119
121
|
|
|
@@ -123,8 +125,8 @@ Create the documents with `media style create <style-id> --style <style-id> --fi
|
|
|
123
125
|
- `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
126
|
- `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
127
|
|
|
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.
|
|
128
|
+
`styles captions prepare --project <id> --file cues.json --out new-layer.html` makes a transparent deterministic layer using the effective preset. Add `--style <id>` to preview another saved style without changing the project; destination brand/output constraints still win. 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
129
|
|
|
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.
|
|
130
|
+
`styles test` reads the destination script and returns candidate text ranges with exact matched text, surrounding context, source file, optional JSON field and line, 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. Offsets are UTF-16 code units; lines refer to the decoded script (not the line of the JSON file). Turn text ranges into actual word timings only after inspecting the target audio/transcript. A dry transfer is not proof of visual quality.
|
|
129
131
|
|
|
130
132
|
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.
|