@scenerok/sdk 0.24.0 → 0.25.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
|
@@ -44,7 +44,32 @@ match, and prefer a plugin whenever the user pasted structured source data.
|
|
|
44
44
|
`scenerok_render_video` the edited copy. See
|
|
45
45
|
[Editing a generated video](#editing-a-generated-video).
|
|
46
46
|
|
|
47
|
-
The tool list is stable:
|
|
47
|
+
The tool list is stable: seven plugin tools, not one tool per plugin.
|
|
48
|
+
|
|
49
|
+
## UI actions (headless)
|
|
50
|
+
|
|
51
|
+
A plugin with a UI can expose non-interactive actions. Use
|
|
52
|
+
`scenerok_ui_action` with `{ ref, component, props?, inputs?, action, payload? }`
|
|
53
|
+
when the plugin's `component.json#agent.actions` lists what you need (the
|
|
54
|
+
component listing on the plugin page shows it). It runs the same controller the
|
|
55
|
+
UI runs, with no browser, and returns:
|
|
56
|
+
|
|
57
|
+
```jsonc
|
|
58
|
+
{
|
|
59
|
+
"inputs": { "trimStartMs": 2000 }, // a proposed tier-1 patch
|
|
60
|
+
"document": { "api": "scenerok.ui.document/1", "root": {} },
|
|
61
|
+
"events": [{ "name": "trim", "payload": { "startMs": 2000 } }]
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Feed the patch into `scenerok_run_plugin`. Nothing is applied or charged by the
|
|
66
|
+
action itself.
|
|
67
|
+
|
|
68
|
+
An interactive action (recording a take, opening a picker) returns an **error**
|
|
69
|
+
with `code: "ui_required"` and `{ component, action, fallbackInput, hint }`. Do
|
|
70
|
+
not retry it: pass an existing value for `fallbackInput` (usually a
|
|
71
|
+
`scenerok://asset/<id>` from the user's workspace) to the normal plugin inputs,
|
|
72
|
+
or ask the user to open the run page. Actions never spend tokens.
|
|
48
73
|
|
|
49
74
|
## CLI equivalents
|
|
50
75
|
|