@chad.dev/dsh-adclip 0.0.0-stage → 0.1.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/LICENSE +201 -0
- package/NOTICE +4 -0
- package/README.md +28 -2
- package/client.js +2256 -0
- package/cordis.patch.yml +10 -0
- package/engine/requirements.txt +9 -0
- package/engine/src/adclip/__init__.py +0 -0
- package/engine/src/adclip/api.py +704 -0
- package/engine/src/adclip/catalog.py +341 -0
- package/engine/src/adclip/image_params.py +45 -0
- package/engine/src/adclip/intents.py +209 -0
- package/engine/src/adclip/llm.py +142 -0
- package/engine/src/adclip/media/__init__.py +0 -0
- package/engine/src/adclip/media/asr.py +79 -0
- package/engine/src/adclip/media/ffmpeg.py +294 -0
- package/engine/src/adclip/media/stitch.py +124 -0
- package/engine/src/adclip/media/subtitles.py +45 -0
- package/engine/src/adclip/media/vision.py +105 -0
- package/engine/src/adclip/models.py +127 -0
- package/engine/src/adclip/params.py +158 -0
- package/engine/src/adclip/personas.py +60 -0
- package/engine/src/adclip/pipeline/__init__.py +0 -0
- package/engine/src/adclip/pipeline/analyze.py +133 -0
- package/engine/src/adclip/pipeline/generate.py +196 -0
- package/engine/src/adclip/pipeline/image_runner.py +146 -0
- package/engine/src/adclip/pipeline/persona.py +56 -0
- package/engine/src/adclip/pipeline/post.py +40 -0
- package/engine/src/adclip/pipeline/qa.py +44 -0
- package/engine/src/adclip/pipeline/replace.py +191 -0
- package/engine/src/adclip/pipeline/runner.py +138 -0
- package/engine/src/adclip/pipeline/script.py +226 -0
- package/engine/src/adclip/pipeline/segment.py +87 -0
- package/engine/src/adclip/providers/__init__.py +0 -0
- package/engine/src/adclip/providers/ark.py +122 -0
- package/engine/src/adclip/providers/ark_image.py +114 -0
- package/engine/src/adclip/providers/base.py +30 -0
- package/engine/src/adclip/providers/discovery.py +56 -0
- package/engine/src/adclip/providers/kling.py +101 -0
- package/engine/src/adclip/providers/minimax.py +155 -0
- package/engine/src/adclip/providers/minimax_image.py +89 -0
- package/engine/src/adclip/settings.py +109 -0
- package/engine/src/adclip/store.py +378 -0
- package/host/dsh.js +60 -0
- package/host/engine.js +265 -0
- package/host/proxy.js +142 -0
- package/host/supervisor.js +251 -0
- package/icon.svg +6 -0
- package/index.js +39 -0
- package/locale/en.json +12 -0
- package/locale/zh.json +12 -0
- package/package.json +47 -4
package/index.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import path from 'node:path'
|
|
2
|
+
import { fileURLToPath } from 'node:url'
|
|
3
|
+
import { EngineSupervisor } from './host/supervisor.js'
|
|
4
|
+
import { registerProxy } from './host/proxy.js'
|
|
5
|
+
import { createDshBridge } from './host/dsh.js'
|
|
6
|
+
|
|
7
|
+
export const inject = ['webServer']
|
|
8
|
+
|
|
9
|
+
/** The installed package root, used to find the bundled engine sources. */
|
|
10
|
+
const pluginRoot = path.dirname(fileURLToPath(import.meta.url))
|
|
11
|
+
|
|
12
|
+
export function apply(ctx, config = {}) {
|
|
13
|
+
const supervisor = new EngineSupervisor(config, { pluginRoot })
|
|
14
|
+
const dsh = createDshBridge(ctx)
|
|
15
|
+
const boot = { token: supervisor.token, base: '/adplus/api', media: '/adplus/media' }
|
|
16
|
+
|
|
17
|
+
ctx.effect(() => {
|
|
18
|
+
void supervisor.start()
|
|
19
|
+
return () => { void supervisor.stop() }
|
|
20
|
+
}, 'adplus-studio-engine')
|
|
21
|
+
|
|
22
|
+
ctx.effect(() => registerProxy(ctx, supervisor, dsh), 'adplus-studio-proxy')
|
|
23
|
+
|
|
24
|
+
ctx.effect(() => ctx.webServer.tapIndex((html) => html.replace(
|
|
25
|
+
'</body>',
|
|
26
|
+
`<script>window.__ADPLUS_STUDIO__=${JSON.stringify(boot)}</script></body>`,
|
|
27
|
+
)), 'adplus-studio-boot-token')
|
|
28
|
+
|
|
29
|
+
ctx.effect(() => {
|
|
30
|
+
const timer = setInterval(() => {
|
|
31
|
+
void supervisor.health().then((result) => {
|
|
32
|
+
if (result.ok && result.data?.service === 'adclip') {
|
|
33
|
+
supervisor.status = { ...supervisor.status, ok: true, detail: 'healthy', url: supervisor.url, data: result.data }
|
|
34
|
+
}
|
|
35
|
+
})
|
|
36
|
+
}, 15000)
|
|
37
|
+
return () => clearInterval(timer)
|
|
38
|
+
}, 'adplus-studio-health')
|
|
39
|
+
}
|
package/locale/en.json
ADDED
package/locale/zh.json
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,49 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chad.dev/dsh-adclip",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
6
|
-
|
|
3
|
+
"version": "0.1.1",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "AdClip: AI ad clips up to 30 seconds — viral remakes, text to video, text to image, storyboard edits, personas and stitching inside DSH.",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": "./index.js",
|
|
8
|
+
"./client": "./client.js",
|
|
9
|
+
"./locale/*.json": "./locale/*.json",
|
|
10
|
+
"./icon": "./icon.svg"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"index.js",
|
|
14
|
+
"client.js",
|
|
15
|
+
"cordis.patch.yml",
|
|
16
|
+
"host/*.js",
|
|
17
|
+
"locale/*.json",
|
|
18
|
+
"icon.svg",
|
|
19
|
+
"LICENSE",
|
|
20
|
+
"NOTICE",
|
|
21
|
+
"engine/**"
|
|
22
|
+
],
|
|
23
|
+
"dsh": {
|
|
24
|
+
"bundle": {
|
|
25
|
+
"patch": "./cordis.patch.yml"
|
|
26
|
+
},
|
|
27
|
+
"client": {
|
|
28
|
+
"platform": "web",
|
|
29
|
+
"immediately": true,
|
|
30
|
+
"inject": [
|
|
31
|
+
"@deepseek-ai/dsh-client-ui-conversation"
|
|
32
|
+
]
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"license": "Apache-2.0",
|
|
36
|
+
"publishConfig": {
|
|
37
|
+
"access": "public"
|
|
38
|
+
},
|
|
39
|
+
"engines": {
|
|
40
|
+
"dsh": ">=0.2.1-rc.1 <0.3.0"
|
|
41
|
+
},
|
|
42
|
+
"keywords": [
|
|
43
|
+
"dsh",
|
|
44
|
+
"dsh-plugin",
|
|
45
|
+
"ad-video",
|
|
46
|
+
"text-to-video",
|
|
47
|
+
"storyboard"
|
|
48
|
+
]
|
|
49
|
+
}
|