@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.
- package/LICENSE +21 -0
- package/README.md +6 -0
- package/dist/chunk-ENGUNMFI.js +196 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +781 -0
- package/dist/setup-entry.d.ts +11 -0
- package/dist/setup-entry.js +20 -0
- package/openclaw.plugin.json +98 -0
- package/package.json +58 -0
- package/skills/indream-editor-json/SKILL.md +157 -0
- package/skills/indream-editor-json/references/asset-mapping.md +147 -0
- package/skills/indream-editor-json/references/common-items.md +280 -0
- package/skills/indream-editor-json/references/editor-state.v1.schema.json +1491 -0
- package/skills/indream-editor-json/references/keyframes.md +102 -0
- package/skills/indream-editor-json/references/material-libraries.md +97 -0
- package/skills/indream-editor-json/references/minimal-editor-state.json +36 -0
- package/skills/indream-editor-json/references/motion-effects-and-transitions.md +235 -0
- package/skills/indream-editor-json/references/recipes.md +122 -0
- package/skills/indream-editor-json/references/structure-and-principles.md +159 -0
- package/skills/indream-editor-json/references/template-catalog.md +45 -0
- package/skills/indream-editor-json/references/templates/chart-showcase.json +654 -0
- package/skills/indream-editor-json/references/templates/gallery-carousel.json +538 -0
- package/skills/indream-editor-json/references/templates/hello-world.json +212 -0
- package/skills/indream-editor-json/references/templates/illustration-board.json +480 -0
- package/skills/indream-editor-json/references/templates/keyframe-motion-lab.json +362 -0
- package/skills/indream-editor-json/references/templates/product-intro.json +614 -0
- package/skills/indream-editor-json/references/templates/subtitle-promo.json +341 -0
- package/skills/indream-editor-json/references/text-and-captions.md +211 -0
- package/skills/indream-editor-json/references/validation-repair.md +134 -0
- package/skills/indream-render-workflow/SKILL.md +57 -0
- package/skills/indream-render-workflow/references/workflow.md +19 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 indreamai
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defProps = Object.defineProperties;
|
|
3
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
4
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
7
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
8
|
+
var __spreadValues = (a, b) => {
|
|
9
|
+
for (var prop in b || (b = {}))
|
|
10
|
+
if (__hasOwnProp.call(b, prop))
|
|
11
|
+
__defNormalProp(a, prop, b[prop]);
|
|
12
|
+
if (__getOwnPropSymbols)
|
|
13
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
14
|
+
if (__propIsEnum.call(b, prop))
|
|
15
|
+
__defNormalProp(a, prop, b[prop]);
|
|
16
|
+
}
|
|
17
|
+
return a;
|
|
18
|
+
};
|
|
19
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
|
|
21
|
+
// src/config.ts
|
|
22
|
+
var PLUGIN_ID = "indream";
|
|
23
|
+
var PLUGIN_NAME = "Indream";
|
|
24
|
+
var PLUGIN_DESCRIPTION = "Indream video editor API tools and skills for OpenClaw";
|
|
25
|
+
var DEFAULT_BASE_URL = "https://api.indream.ai";
|
|
26
|
+
var DEFAULT_TIMEOUT_MS = 6e4;
|
|
27
|
+
var DEFAULT_POLL_INTERVAL_MS = 2e3;
|
|
28
|
+
var pluginConfigJsonSchema = {
|
|
29
|
+
type: "object",
|
|
30
|
+
additionalProperties: false,
|
|
31
|
+
properties: {
|
|
32
|
+
apiKey: {
|
|
33
|
+
type: "string",
|
|
34
|
+
minLength: 1
|
|
35
|
+
},
|
|
36
|
+
baseURL: {
|
|
37
|
+
type: "string",
|
|
38
|
+
default: DEFAULT_BASE_URL
|
|
39
|
+
},
|
|
40
|
+
timeoutMs: {
|
|
41
|
+
type: "integer",
|
|
42
|
+
minimum: 1,
|
|
43
|
+
default: DEFAULT_TIMEOUT_MS
|
|
44
|
+
},
|
|
45
|
+
pollIntervalMs: {
|
|
46
|
+
type: "integer",
|
|
47
|
+
minimum: 1,
|
|
48
|
+
default: DEFAULT_POLL_INTERVAL_MS
|
|
49
|
+
},
|
|
50
|
+
uploads: {
|
|
51
|
+
type: "object",
|
|
52
|
+
additionalProperties: false,
|
|
53
|
+
properties: {
|
|
54
|
+
allowLocalPaths: {
|
|
55
|
+
type: "boolean",
|
|
56
|
+
default: true
|
|
57
|
+
},
|
|
58
|
+
allowRemoteUrls: {
|
|
59
|
+
type: "boolean",
|
|
60
|
+
default: true
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
default: {
|
|
64
|
+
allowLocalPaths: true,
|
|
65
|
+
allowRemoteUrls: true
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
var pluginConfigUiHints = {
|
|
71
|
+
apiKey: {
|
|
72
|
+
label: "Indream API key",
|
|
73
|
+
help: "Used for all requests to the Indream Open API.",
|
|
74
|
+
placeholder: "indream_...",
|
|
75
|
+
sensitive: true
|
|
76
|
+
},
|
|
77
|
+
baseURL: {
|
|
78
|
+
label: "Base URL",
|
|
79
|
+
placeholder: DEFAULT_BASE_URL
|
|
80
|
+
},
|
|
81
|
+
timeoutMs: {
|
|
82
|
+
label: "Timeout (ms)",
|
|
83
|
+
advanced: true
|
|
84
|
+
},
|
|
85
|
+
pollIntervalMs: {
|
|
86
|
+
label: "Poll interval (ms)",
|
|
87
|
+
advanced: true
|
|
88
|
+
},
|
|
89
|
+
uploads: {
|
|
90
|
+
label: "Upload controls",
|
|
91
|
+
advanced: true
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
var isRecord = (value) => {
|
|
95
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
96
|
+
};
|
|
97
|
+
var readOptionalString = (value) => {
|
|
98
|
+
if (typeof value !== "string") {
|
|
99
|
+
return void 0;
|
|
100
|
+
}
|
|
101
|
+
const trimmed = value.trim();
|
|
102
|
+
return trimmed ? trimmed : void 0;
|
|
103
|
+
};
|
|
104
|
+
var readPositiveInteger = (value) => {
|
|
105
|
+
if (typeof value !== "number" || !Number.isInteger(value) || value <= 0) {
|
|
106
|
+
return void 0;
|
|
107
|
+
}
|
|
108
|
+
return value;
|
|
109
|
+
};
|
|
110
|
+
var readOptionalBoolean = (value) => {
|
|
111
|
+
return typeof value === "boolean" ? value : void 0;
|
|
112
|
+
};
|
|
113
|
+
var resolvePluginConfig = (value) => {
|
|
114
|
+
var _a, _b;
|
|
115
|
+
const record = isRecord(value) ? value : {};
|
|
116
|
+
const uploadsRecord = isRecord(record.uploads) ? record.uploads : {};
|
|
117
|
+
return {
|
|
118
|
+
apiKey: readOptionalString(record.apiKey),
|
|
119
|
+
baseURL: readOptionalString(record.baseURL) || DEFAULT_BASE_URL,
|
|
120
|
+
timeoutMs: readPositiveInteger(record.timeoutMs) || DEFAULT_TIMEOUT_MS,
|
|
121
|
+
pollIntervalMs: readPositiveInteger(record.pollIntervalMs) || DEFAULT_POLL_INTERVAL_MS,
|
|
122
|
+
uploads: {
|
|
123
|
+
allowLocalPaths: (_a = readOptionalBoolean(uploadsRecord.allowLocalPaths)) != null ? _a : true,
|
|
124
|
+
allowRemoteUrls: (_b = readOptionalBoolean(uploadsRecord.allowRemoteUrls)) != null ? _b : true
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
var buildMissingApiKeyMessage = () => {
|
|
129
|
+
return "Indream plugin is not configured. Set plugins.entries.indream.config.apiKey before using Indream tools.";
|
|
130
|
+
};
|
|
131
|
+
var pluginConfigSchema = {
|
|
132
|
+
jsonSchema: pluginConfigJsonSchema,
|
|
133
|
+
uiHints: pluginConfigUiHints,
|
|
134
|
+
validate(value) {
|
|
135
|
+
if (value === void 0) {
|
|
136
|
+
return {
|
|
137
|
+
ok: true
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
if (!isRecord(value)) {
|
|
141
|
+
return {
|
|
142
|
+
ok: false,
|
|
143
|
+
errors: ["Plugin config must be an object."]
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
const errors = [];
|
|
147
|
+
if (value.apiKey !== void 0 && readOptionalString(value.apiKey) === void 0) {
|
|
148
|
+
errors.push("apiKey must be a non-empty string.");
|
|
149
|
+
}
|
|
150
|
+
if (value.baseURL !== void 0 && readOptionalString(value.baseURL) === void 0) {
|
|
151
|
+
errors.push("baseURL must be a non-empty string.");
|
|
152
|
+
}
|
|
153
|
+
if (value.timeoutMs !== void 0 && readPositiveInteger(value.timeoutMs) === void 0) {
|
|
154
|
+
errors.push("timeoutMs must be a positive integer.");
|
|
155
|
+
}
|
|
156
|
+
if (value.pollIntervalMs !== void 0 && readPositiveInteger(value.pollIntervalMs) === void 0) {
|
|
157
|
+
errors.push("pollIntervalMs must be a positive integer.");
|
|
158
|
+
}
|
|
159
|
+
if (value.uploads !== void 0) {
|
|
160
|
+
if (!isRecord(value.uploads)) {
|
|
161
|
+
errors.push("uploads must be an object.");
|
|
162
|
+
} else {
|
|
163
|
+
if (value.uploads.allowLocalPaths !== void 0 && readOptionalBoolean(value.uploads.allowLocalPaths) === void 0) {
|
|
164
|
+
errors.push("uploads.allowLocalPaths must be a boolean.");
|
|
165
|
+
}
|
|
166
|
+
if (value.uploads.allowRemoteUrls !== void 0 && readOptionalBoolean(value.uploads.allowRemoteUrls) === void 0) {
|
|
167
|
+
errors.push("uploads.allowRemoteUrls must be a boolean.");
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
if (errors.length > 0) {
|
|
172
|
+
return {
|
|
173
|
+
ok: false,
|
|
174
|
+
errors
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
return {
|
|
178
|
+
ok: true,
|
|
179
|
+
value: resolvePluginConfig(value)
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
export {
|
|
185
|
+
__spreadValues,
|
|
186
|
+
__spreadProps,
|
|
187
|
+
PLUGIN_ID,
|
|
188
|
+
PLUGIN_NAME,
|
|
189
|
+
PLUGIN_DESCRIPTION,
|
|
190
|
+
DEFAULT_BASE_URL,
|
|
191
|
+
DEFAULT_TIMEOUT_MS,
|
|
192
|
+
DEFAULT_POLL_INTERVAL_MS,
|
|
193
|
+
resolvePluginConfig,
|
|
194
|
+
buildMissingApiKeyMessage,
|
|
195
|
+
pluginConfigSchema
|
|
196
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as openclaw_plugin_sdk_plugin_entry from 'openclaw/plugin-sdk/plugin-entry';
|
|
2
|
+
|
|
3
|
+
declare const _default: {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
configSchema: openclaw_plugin_sdk_plugin_entry.OpenClawPluginConfigSchema;
|
|
8
|
+
register: NonNullable<openclaw_plugin_sdk_plugin_entry.OpenClawPluginDefinition["register"]>;
|
|
9
|
+
} & Pick<openclaw_plugin_sdk_plugin_entry.OpenClawPluginDefinition, "kind">;
|
|
10
|
+
|
|
11
|
+
export { _default as default };
|