@indreamai/openclaw-plugin 0.1.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.
Files changed (31) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +6 -0
  3. package/dist/chunk-ENGUNMFI.js +196 -0
  4. package/dist/index.d.ts +11 -0
  5. package/dist/index.js +781 -0
  6. package/dist/setup-entry.d.ts +11 -0
  7. package/dist/setup-entry.js +20 -0
  8. package/openclaw.plugin.json +98 -0
  9. package/package.json +58 -0
  10. package/skills/indream-editor-json/SKILL.md +157 -0
  11. package/skills/indream-editor-json/references/asset-mapping.md +147 -0
  12. package/skills/indream-editor-json/references/common-items.md +280 -0
  13. package/skills/indream-editor-json/references/editor-state.v1.schema.json +1491 -0
  14. package/skills/indream-editor-json/references/keyframes.md +102 -0
  15. package/skills/indream-editor-json/references/material-libraries.md +97 -0
  16. package/skills/indream-editor-json/references/minimal-editor-state.json +36 -0
  17. package/skills/indream-editor-json/references/motion-effects-and-transitions.md +235 -0
  18. package/skills/indream-editor-json/references/recipes.md +122 -0
  19. package/skills/indream-editor-json/references/structure-and-principles.md +159 -0
  20. package/skills/indream-editor-json/references/template-catalog.md +45 -0
  21. package/skills/indream-editor-json/references/templates/chart-showcase.json +654 -0
  22. package/skills/indream-editor-json/references/templates/gallery-carousel.json +538 -0
  23. package/skills/indream-editor-json/references/templates/hello-world.json +212 -0
  24. package/skills/indream-editor-json/references/templates/illustration-board.json +480 -0
  25. package/skills/indream-editor-json/references/templates/keyframe-motion-lab.json +362 -0
  26. package/skills/indream-editor-json/references/templates/product-intro.json +614 -0
  27. package/skills/indream-editor-json/references/templates/subtitle-promo.json +341 -0
  28. package/skills/indream-editor-json/references/text-and-captions.md +211 -0
  29. package/skills/indream-editor-json/references/validation-repair.md +134 -0
  30. package/skills/indream-render-workflow/SKILL.md +57 -0
  31. package/skills/indream-render-workflow/references/workflow.md +19 -0
@@ -0,0 +1,341 @@
1
+ {
2
+ "compositionWidth": 1080,
3
+ "compositionHeight": 1920,
4
+ "timebaseTicksPerSecond": 240000,
5
+ "outputRatio": "9:16",
6
+ "tracks": [
7
+ {
8
+ "id": "track-media",
9
+ "hidden": false,
10
+ "muted": false,
11
+ "items": [
12
+ "item-bg-image"
13
+ ]
14
+ },
15
+ {
16
+ "id": "track-copy",
17
+ "hidden": false,
18
+ "muted": false,
19
+ "items": [
20
+ "item-title",
21
+ "item-cta"
22
+ ]
23
+ },
24
+ {
25
+ "id": "track-captions",
26
+ "hidden": false,
27
+ "muted": false,
28
+ "items": [
29
+ "item-captions"
30
+ ]
31
+ }
32
+ ],
33
+ "assets": {
34
+ "asset-bg-image": {
35
+ "id": "asset-bg-image",
36
+ "type": "image",
37
+ "filename": "vertical-bg.png",
38
+ "size": 0,
39
+ "remoteUrl": "https://r.indream.ai/system/presets/154c197a-92c3-4bef-8560-4b9b70688a57.png",
40
+ "remoteKey": null,
41
+ "mimeType": "image/png",
42
+ "width": 1024,
43
+ "height": 1024
44
+ },
45
+ "asset-captions": {
46
+ "id": "asset-captions",
47
+ "type": "caption",
48
+ "filename": "asset-captions.json",
49
+ "size": 0,
50
+ "remoteUrl": null,
51
+ "remoteKey": null,
52
+ "mimeType": "application/json",
53
+ "timingGranularity": "line",
54
+ "captions": [
55
+ {
56
+ "text": "Build faster scenes.",
57
+ "startMs": 0,
58
+ "endMs": 900
59
+ },
60
+ {
61
+ "text": "Validate before export.",
62
+ "startMs": 900,
63
+ "endMs": 2100
64
+ },
65
+ {
66
+ "text": "Keep subtitle timing readable.",
67
+ "startMs": 2100,
68
+ "endMs": 3300
69
+ },
70
+ {
71
+ "text": "Ship a clean final render.",
72
+ "startMs": 3300,
73
+ "endMs": 4500
74
+ }
75
+ ]
76
+ }
77
+ },
78
+ "items": {
79
+ "item-bg-image": {
80
+ "id": "item-bg-image",
81
+ "type": "image",
82
+ "startTicks": 0,
83
+ "durationTicks": 1200000,
84
+ "top": {
85
+ "value": 0,
86
+ "keyframes": []
87
+ },
88
+ "left": {
89
+ "value": 0,
90
+ "keyframes": []
91
+ },
92
+ "width": {
93
+ "value": 1080,
94
+ "keyframes": []
95
+ },
96
+ "height": {
97
+ "value": 1920,
98
+ "keyframes": []
99
+ },
100
+ "scaleX": {
101
+ "value": 1,
102
+ "keyframes": []
103
+ },
104
+ "scaleY": {
105
+ "value": 1,
106
+ "keyframes": []
107
+ },
108
+ "opacity": {
109
+ "value": 1,
110
+ "keyframes": []
111
+ },
112
+ "isDraggingInTimeline": false,
113
+ "assetId": "asset-bg-image",
114
+ "keepAspectRatio": true,
115
+ "borderRadius": {
116
+ "value": 0,
117
+ "keyframes": []
118
+ },
119
+ "rotation": {
120
+ "value": 0,
121
+ "keyframes": []
122
+ },
123
+ "cropLeft": {
124
+ "value": 0,
125
+ "keyframes": []
126
+ },
127
+ "cropTop": {
128
+ "value": 0,
129
+ "keyframes": []
130
+ },
131
+ "cropRight": {
132
+ "value": 0,
133
+ "keyframes": []
134
+ },
135
+ "cropBottom": {
136
+ "value": 0,
137
+ "keyframes": []
138
+ }
139
+ },
140
+ "item-title": {
141
+ "id": "item-title",
142
+ "type": "text",
143
+ "startTicks": 0,
144
+ "durationTicks": 336000,
145
+ "top": {
146
+ "value": 120,
147
+ "keyframes": []
148
+ },
149
+ "left": {
150
+ "value": 88,
151
+ "keyframes": []
152
+ },
153
+ "width": {
154
+ "value": 904,
155
+ "keyframes": []
156
+ },
157
+ "height": {
158
+ "value": 180,
159
+ "keyframes": []
160
+ },
161
+ "scaleX": {
162
+ "value": 1,
163
+ "keyframes": []
164
+ },
165
+ "scaleY": {
166
+ "value": 1,
167
+ "keyframes": []
168
+ },
169
+ "opacity": {
170
+ "value": 1,
171
+ "keyframes": []
172
+ },
173
+ "isDraggingInTimeline": false,
174
+ "text": "Subtitle Promo",
175
+ "color": "#ffffff",
176
+ "align": "center",
177
+ "fontFamily": "TikTok Sans",
178
+ "fontStyle": {
179
+ "variant": "normal",
180
+ "weight": "700"
181
+ },
182
+ "fontSize": 84,
183
+ "lineHeight": 1.1,
184
+ "letterSpacing": 0,
185
+ "resizeOnEdit": true,
186
+ "direction": "ltr",
187
+ "strokeWidth": 0,
188
+ "strokeColor": "#000000",
189
+ "background": null,
190
+ "rotation": {
191
+ "value": 0,
192
+ "keyframes": []
193
+ },
194
+ "animations": {
195
+ "in": {
196
+ "type": "slide-up",
197
+ "durationTicks": 80000,
198
+ "easing": "ease-out"
199
+ }
200
+ }
201
+ },
202
+ "item-cta": {
203
+ "id": "item-cta",
204
+ "type": "text",
205
+ "startTicks": 816000,
206
+ "durationTicks": 384000,
207
+ "top": {
208
+ "value": 1650,
209
+ "keyframes": []
210
+ },
211
+ "left": {
212
+ "value": 110,
213
+ "keyframes": []
214
+ },
215
+ "width": {
216
+ "value": 860,
217
+ "keyframes": []
218
+ },
219
+ "height": {
220
+ "value": 110,
221
+ "keyframes": []
222
+ },
223
+ "scaleX": {
224
+ "value": 1,
225
+ "keyframes": []
226
+ },
227
+ "scaleY": {
228
+ "value": 1,
229
+ "keyframes": []
230
+ },
231
+ "opacity": {
232
+ "value": 1,
233
+ "keyframes": []
234
+ },
235
+ "isDraggingInTimeline": false,
236
+ "text": "Use line-timed captions when subtitle animations are needed.",
237
+ "color": "#f8fafc",
238
+ "align": "center",
239
+ "fontFamily": "TikTok Sans",
240
+ "fontStyle": {
241
+ "variant": "normal",
242
+ "weight": "500"
243
+ },
244
+ "fontSize": 28,
245
+ "lineHeight": 1.1,
246
+ "letterSpacing": 0,
247
+ "resizeOnEdit": true,
248
+ "direction": "ltr",
249
+ "strokeWidth": 0,
250
+ "strokeColor": "#000000",
251
+ "background": {
252
+ "color": "#00000088",
253
+ "horizontalPadding": 20,
254
+ "borderRadius": 28
255
+ },
256
+ "rotation": {
257
+ "value": 0,
258
+ "keyframes": []
259
+ }
260
+ },
261
+ "item-captions": {
262
+ "id": "item-captions",
263
+ "type": "captions",
264
+ "startTicks": 96000,
265
+ "durationTicks": 1104000,
266
+ "top": {
267
+ "value": 1320,
268
+ "keyframes": []
269
+ },
270
+ "left": {
271
+ "value": 120,
272
+ "keyframes": []
273
+ },
274
+ "width": {
275
+ "value": 840,
276
+ "keyframes": []
277
+ },
278
+ "height": {
279
+ "value": 220,
280
+ "keyframes": []
281
+ },
282
+ "scaleX": {
283
+ "value": 1,
284
+ "keyframes": []
285
+ },
286
+ "scaleY": {
287
+ "value": 1,
288
+ "keyframes": []
289
+ },
290
+ "opacity": {
291
+ "value": 1,
292
+ "keyframes": []
293
+ },
294
+ "isDraggingInTimeline": false,
295
+ "assetId": "asset-captions",
296
+ "fontFamily": "TikTok Sans",
297
+ "fontStyle": {
298
+ "variant": "normal",
299
+ "weight": "600"
300
+ },
301
+ "lineHeight": 1.2,
302
+ "letterSpacing": 0,
303
+ "fontSize": 80,
304
+ "align": "center",
305
+ "color": "#ffffff",
306
+ "highlightColor": "#39E508",
307
+ "strokeWidth": 4,
308
+ "strokeColor": "#000000",
309
+ "direction": "ltr",
310
+ "pageDurationInMilliseconds": 2000,
311
+ "captionStartInSeconds": 0,
312
+ "maxLines": 2,
313
+ "source": "manual",
314
+ "captionGroupId": "caption-group-1",
315
+ "background": null,
316
+ "rotation": {
317
+ "value": 0,
318
+ "keyframes": []
319
+ },
320
+ "animations": {
321
+ "in": {
322
+ "type": "fade",
323
+ "durationTicks": 48000,
324
+ "easing": "ease-out"
325
+ }
326
+ },
327
+ "captionAnimations": {
328
+ "in": {
329
+ "type": "converge",
330
+ "durationTicks": 48000
331
+ }
332
+ }
333
+ }
334
+ },
335
+ "transitions": {},
336
+ "globalBackground": {
337
+ "type": "color",
338
+ "color": "#020617",
339
+ "gradient": "linear-gradient(135deg, #020617 0%, #1d4ed8 100%)"
340
+ }
341
+ }
@@ -0,0 +1,211 @@
1
+ # Text, Captions, and Templates
2
+
3
+ ## Text item
4
+
5
+ Use `text` for normal titles, lower thirds, bullet callouts, labels, quote cards, and simple animated copy.
6
+
7
+ Required fields:
8
+
9
+ - `type: "text"`
10
+ - `text`
11
+ - `color`
12
+ - `align`
13
+ - `fontFamily`
14
+ - `fontStyle`
15
+ - `fontSize`
16
+ - `lineHeight`
17
+ - `letterSpacing`
18
+ - `resizeOnEdit`
19
+ - `direction`
20
+ - `strokeWidth`
21
+ - `strokeColor`
22
+ - full base geometry fields
23
+
24
+ Common optional fields:
25
+
26
+ - `background`
27
+ - `rotation`
28
+ - `animations`
29
+ - `captionAnimations`
30
+
31
+ Practical defaults:
32
+
33
+ - `align`: `left` for blocks of copy, `center` for hero text
34
+ - `direction`: `ltr` unless the content is actually right-to-left
35
+ - `resizeOnEdit`: `true` for editable text overlays
36
+ - `strokeWidth`: `0` unless the user asked for outline text
37
+ - `background`: `null` unless the text needs a pill, chip, or readable subtitle box
38
+
39
+ ## Caption animation support on text
40
+
41
+ Text items can use subtitle-style animation types through `captionAnimations`.
42
+ Supported schema values:
43
+
44
+ - `converge`
45
+ - `elastic-pop`
46
+ - `typewriter`
47
+ - `lay-down`
48
+ - `center-type-out`
49
+ - `curtain-close`
50
+ - `jitter`
51
+ - `rainbow`
52
+ - `sweep-shine`
53
+
54
+ Use them when the user wants:
55
+
56
+ - kinetic lyric text
57
+ - punchy social captions
58
+ - animated slogans
59
+ - text-only subtitle effects
60
+
61
+ Avoid stacking too many different caption animation types in one short clip unless the user clearly wants a flashy style.
62
+
63
+ ## Captions item
64
+
65
+ Use `captions` when the user has a real subtitle asset and wants timed subtitle playback.
66
+
67
+ Required fields:
68
+
69
+ - `type: "captions"`
70
+ - `assetId`
71
+ - `fontFamily`
72
+ - `fontStyle`
73
+ - `lineHeight`
74
+ - `letterSpacing`
75
+ - `fontSize`
76
+ - `align`
77
+ - `color`
78
+ - `highlightColor`
79
+ - `strokeWidth`
80
+ - `strokeColor`
81
+ - `direction`
82
+ - `pageDurationInMilliseconds`
83
+ - `captionStartInSeconds`
84
+ - `maxLines`
85
+ - `source`
86
+ - `captionGroupId`
87
+ - `background`
88
+ - full base geometry fields
89
+
90
+ Important subtitle rules:
91
+
92
+ - `source` must be one of `manual`, `auto`, or `upload`.
93
+ - `captionGroupId` can be `null`.
94
+ - `background` can be `null` or an object with:
95
+ - `color`
96
+ - `horizontalPadding`
97
+ - `borderRadius`
98
+ - `captionAnimations` is not allowed when the linked caption asset uses `timingGranularity: "word"`.
99
+ If the user wants subtitle animation, prefer `timingGranularity: "line"` for the caption asset.
100
+ - For production authoring, start with one short `captionAnimations.in` on `captions` items and add more layers only after a real export probe.
101
+ Dense combinations can validate but still be a worse default for renderer stability.
102
+
103
+ Practical guidance:
104
+
105
+ - Use `captions` for real subtitle timing.
106
+ - Use `text` for static or manually timed overlay copy.
107
+ - Use `highlightColor` only when the subtitle style calls for word or phrase emphasis.
108
+ - Keep `pageDurationInMilliseconds` aligned with the intended subtitle pagination behavior.
109
+ - Make sure the `captions` item duration fully covers the subtitle asset timing window after applying `captionStartInSeconds`.
110
+ A validation pass may still succeed when the subtitle data slightly overruns the clip, but real export can fail at render time.
111
+
112
+ ## Caption asset and captions item pairing
113
+
114
+ The clean subtitle workflow is:
115
+
116
+ 1. store subtitle timing data in a `caption` asset under `assets`
117
+ 2. reference that asset from a `captions` item
118
+ 3. style the `captions` item for readability and animation
119
+
120
+ This is better than manually creating one text item per subtitle line unless the user explicitly wants handcrafted timing.
121
+
122
+ ## Text-template item
123
+
124
+ Use `text-template` only when you have a real template contract.
125
+
126
+ Required fields:
127
+
128
+ - `type: "text-template"`
129
+ - `schemaVersion: 2`
130
+ - `templateId`
131
+ - `templateCategory`
132
+ - `nodes`
133
+ - full base geometry fields
134
+
135
+ Notes:
136
+
137
+ - `nodes` must contain at least two entries.
138
+ - Each node must have a `type` of `image` or `text`.
139
+ - The schema keeps nodes intentionally flexible, but that does not mean you should invent arbitrary template contracts.
140
+
141
+ When to avoid `text-template`:
142
+
143
+ - the request is just "make a bold title card"
144
+ - the template ID is unknown
145
+ - the node structure is not supplied by a product system
146
+ - the same result can be achieved with normal `text`, `image`, and `solid` items
147
+
148
+ ## Subtitle styling patterns
149
+
150
+ ### Clean spoken subtitles
151
+
152
+ Use:
153
+
154
+ - medium or semibold weight
155
+ - centered alignment
156
+ - modest background pill or dark translucent box
157
+ - minimal outline
158
+ - one gentle caption animation or none
159
+
160
+ ### Emphasized social captions
161
+
162
+ Use:
163
+
164
+ - larger font size
165
+ - stronger highlight color
166
+ - short `captionAnimations.in`
167
+ - optional extra motion only after a real export check confirms the composition is stable
168
+
169
+ ### Title-card text
170
+
171
+ Use:
172
+
173
+ - `text` item, not `captions`
174
+ - optional `captionAnimations` for headline motion
175
+ - optional `animations` for clip-level entry and exit
176
+
177
+ ## Text snippet
178
+
179
+ ```json
180
+ {
181
+ "id": "item-title-1",
182
+ "type": "text",
183
+ "text": "Launch title",
184
+ "color": "#ffffff",
185
+ "align": "center",
186
+ "fontFamily": "TikTok Sans",
187
+ "fontStyle": {
188
+ "variant": "normal",
189
+ "weight": "600"
190
+ },
191
+ "fontSize": 72,
192
+ "lineHeight": 1.1,
193
+ "letterSpacing": 0,
194
+ "resizeOnEdit": true,
195
+ "direction": "ltr",
196
+ "strokeWidth": 0,
197
+ "strokeColor": "#000000",
198
+ "background": null,
199
+ "rotation": { "value": 0, "keyframes": [] },
200
+ "startTicks": 0,
201
+ "durationTicks": 120,
202
+ "top": { "value": 160, "keyframes": [] },
203
+ "left": { "value": 160, "keyframes": [] },
204
+ "width": { "value": 960, "keyframes": [] },
205
+ "height": { "value": 240, "keyframes": [] },
206
+ "scaleX": { "value": 1, "keyframes": [] },
207
+ "scaleY": { "value": 1, "keyframes": [] },
208
+ "opacity": { "value": 1, "keyframes": [] },
209
+ "isDraggingInTimeline": false
210
+ }
211
+ ```
@@ -0,0 +1,134 @@
1
+ # Validation and Repair Guide
2
+
3
+ ## Repair priorities
4
+
5
+ 1. Preserve the user's intent.
6
+ 2. Change the minimum number of fields needed to satisfy validation.
7
+ 3. Prefer supported replacements over deleting creative features.
8
+ 4. Validate again after each meaningful repair pass.
9
+ 5. Do not export until validation returns `valid: true`.
10
+
11
+ ## Common failures
12
+
13
+ ### Unsupported effect value
14
+
15
+ Symptoms:
16
+
17
+ - `EDITOR_EFFECT_TYPE_INVALID`
18
+ - validation path points at `items.*.effectType`
19
+
20
+ Fix:
21
+
22
+ - call `indream_editor_capabilities`
23
+ - replace the invalid value with a supported effect type
24
+ - preserve the original timing window unless the user asked to remove the effect
25
+
26
+ ### Unsupported filter value
27
+
28
+ Symptoms:
29
+
30
+ - `EDITOR_FILTER_TYPE_INVALID`
31
+ - validation path points at `items.*.filterType`
32
+
33
+ Fix:
34
+
35
+ - call `indream_editor_capabilities`
36
+ - replace the invalid value with a supported filter type
37
+ - preserve `intensity` and any valid `params`
38
+
39
+ ### Unsupported transition
40
+
41
+ Symptoms:
42
+
43
+ - `EDITOR_TRANSITION_TYPE_INVALID`
44
+ - validation path points at `transitions.*.type`
45
+
46
+ Fix:
47
+
48
+ - replace the transition type with a capability-supported value
49
+ - keep `fromClipId`, `toClipId`, and `durationTicks` if they are otherwise valid
50
+
51
+ ### Transition clips are not adjacent
52
+
53
+ Symptoms:
54
+
55
+ - `EDITOR_TRANSITION_CLIP_NOT_ADJACENT`
56
+ - the transition references clips that exist but skip over another clip
57
+
58
+ Fix:
59
+
60
+ - ensure `fromClipId` and `toClipId` are neighbors in the same `track.items[]`
61
+ - if the clips are intentionally separate scenes, move the transition to the actual neighboring pair or remove it
62
+
63
+ ### Missing asset
64
+
65
+ Symptoms:
66
+
67
+ - validation path points to `assetId`
68
+ - item references an asset key that does not exist
69
+
70
+ Fix:
71
+
72
+ - ensure the referenced asset key exists under `assets`
73
+ - ensure the nested `assets[*].id` matches that key
74
+ - ensure the asset type matches the item type
75
+
76
+ ### Missing required geometry or playback fields
77
+
78
+ Symptoms:
79
+
80
+ - validator points at `top`, `left`, `width`, `height`, `scaleX`, `scaleY`, `opacity`, `rotation`, `playbackRate`, or fade fields
81
+
82
+ Fix:
83
+
84
+ - restore the missing required properties with a valid static animated-number-track or scalar value
85
+ - remember that audio items still require the base geometry fields
86
+
87
+ ### Invalid text or subtitle style object
88
+
89
+ Symptoms:
90
+
91
+ - validator points at `fontStyle`, `background`, `captionAnimations`, or alignment fields
92
+
93
+ Fix:
94
+
95
+ - ensure `fontStyle` contains both `variant` and `weight`
96
+ - ensure `align` is one of `left`, `center`, `right`
97
+ - ensure `direction` is `ltr` or `rtl`
98
+ - ensure background objects include `color`, `horizontalPadding`, and `borderRadius`
99
+ - ensure caption animation names are supported
100
+
101
+ ### Template item mismatch
102
+
103
+ Symptoms:
104
+
105
+ - validator points at `schemaVersion`, `templateId`, `templateCategory`, or `nodes`
106
+
107
+ Fix:
108
+
109
+ - confirm `schemaVersion` is exactly `2`
110
+ - ensure `nodes` has at least two entries
111
+ - ensure each node has a `type`
112
+ - if the real template contract is unknown, replace the `text-template` item with standard `text` and `image` items
113
+
114
+ ## Schema troubleshooting workflow
115
+
116
+ When the validator output is not enough:
117
+
118
+ 1. Open `references/editor-state.v1.schema.json`.
119
+ 2. Search for the item or asset definition that matches the failing path, such as:
120
+ - `imageItem`
121
+ - `videoItem`
122
+ - `captionsItem`
123
+ - `transition`
124
+ - `globalBackground`
125
+ 3. Confirm the required fields and enum values.
126
+ 4. Compare the failing payload against a known-good pattern in the other references.
127
+ 5. Re-run `indream_editor_validate`.
128
+
129
+ ## Safe repair habits
130
+
131
+ - Keep IDs stable while repairing.
132
+ - Do not regenerate the entire JSON when only one field is invalid.
133
+ - Preserve timing and track order unless the failure is caused by timing or adjacency.
134
+ - Preserve optional design choices such as crop, border radius, subtitle styling, and animation when they are already valid.