@cliangdev/conductor 0.21.0 → 0.23.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/assets/claude/skills/conductor-creative/SKILL.md +168 -0
- package/assets/claude/skills/conductor-publisher/SKILL.md +4 -0
- package/assets/cli-manifest.json +99 -0
- package/dist/commands/creative.d.ts +3 -0
- package/dist/commands/creative.d.ts.map +1 -0
- package/dist/commands/creative.js +63 -0
- package/dist/commands/creative.js.map +1 -0
- package/dist/creative/assertions.js +221 -0
- package/dist/creative/font.js +39 -0
- package/dist/creative/frame.css +126 -0
- package/dist/creative/frame.html +29 -0
- package/dist/creative/frame.js +76 -0
- package/dist/creative/job/render.mjs +203 -0
- package/dist/creative/job/server.mjs +72 -0
- package/dist/creative/job/transport.mjs +167 -0
- package/dist/creative/layouts/bleed/layout.css +47 -0
- package/dist/creative/layouts/bleed/layout.json +17 -0
- package/dist/creative/layouts/card/layout.css +24 -0
- package/dist/creative/layouts/card/layout.json +17 -0
- package/dist/creative/layouts/index.js +62 -0
- package/dist/creative/layouts/index.json +1 -0
- package/dist/creative/layouts/split/layout.css +22 -0
- package/dist/creative/layouts/split/layout.json +17 -0
- package/dist/creative/layouts/stacked/layout.css +40 -0
- package/dist/creative/layouts/stacked/layout.json +23 -0
- package/dist/creative/placements.js +228 -0
- package/dist/creative/placements.json +268 -0
- package/dist/creative/render.js +457 -0
- package/dist/creative/sheet.html +27 -0
- package/dist/creative/sheet.js +94 -0
- package/dist/creative/styles.css +314 -0
- package/dist/creative/tokens.css +33 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/creative-browser.d.ts +25 -0
- package/dist/lib/creative-browser.d.ts.map +1 -0
- package/dist/lib/creative-browser.js +36 -0
- package/dist/lib/creative-browser.js.map +1 -0
- package/dist/lib/creative-id.d.ts +8 -0
- package/dist/lib/creative-id.d.ts.map +1 -0
- package/dist/lib/creative-id.js +14 -0
- package/dist/lib/creative-id.js.map +1 -0
- package/dist/lib/creative-render.d.ts +38 -0
- package/dist/lib/creative-render.d.ts.map +1 -0
- package/dist/lib/creative-render.js +95 -0
- package/dist/lib/creative-render.js.map +1 -0
- package/dist/lib/image-dimensions.d.ts +20 -0
- package/dist/lib/image-dimensions.d.ts.map +1 -0
- package/dist/lib/image-dimensions.js +115 -0
- package/dist/lib/image-dimensions.js.map +1 -0
- package/dist/lib/media-probe.d.ts +55 -0
- package/dist/lib/media-probe.d.ts.map +1 -0
- package/dist/lib/media-probe.js +221 -0
- package/dist/lib/media-probe.js.map +1 -0
- package/dist/lib/plugin-assets.d.ts.map +1 -1
- package/dist/lib/plugin-assets.js +1 -0
- package/dist/lib/plugin-assets.js.map +1 -1
- package/dist/lib/poster-sheet.d.ts +10 -0
- package/dist/lib/poster-sheet.d.ts.map +1 -0
- package/dist/lib/poster-sheet.js +57 -0
- package/dist/lib/poster-sheet.js.map +1 -0
- package/dist/mcp/index.d.ts +18 -0
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +313 -1
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/tools/creatives.d.ts +114 -0
- package/dist/mcp/tools/creatives.d.ts.map +1 -0
- package/dist/mcp/tools/creatives.js +477 -0
- package/dist/mcp/tools/creatives.js.map +1 -0
- package/dist/mcp/tools/insights.d.ts.map +1 -1
- package/dist/mcp/tools/insights.js +14 -0
- package/dist/mcp/tools/insights.js.map +1 -1
- package/package.json +6 -3
- package/scripts/build-creative.mjs +93 -0
|
@@ -42,6 +42,19 @@ function topGroups(groups) {
|
|
|
42
42
|
.slice(0, 3)
|
|
43
43
|
.map(trimGroup);
|
|
44
44
|
}
|
|
45
|
+
/** The fields worth an agent's context for one Creative variant's attributed performance. */
|
|
46
|
+
function trimCreative(entry) {
|
|
47
|
+
return omitNulls({
|
|
48
|
+
creativeId: entry.creativeId,
|
|
49
|
+
label: entry.label,
|
|
50
|
+
headline: entry.headline,
|
|
51
|
+
posts: entry.posts,
|
|
52
|
+
views: entry.views,
|
|
53
|
+
engagementRate: round4(entry.engagementRate),
|
|
54
|
+
avgViewPct: round4(entry.avgViewPct),
|
|
55
|
+
views72h: entry.views72h,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
45
58
|
/**
|
|
46
59
|
* What is working across the project's published Posts, trimmed to what an agent needs to reason from:
|
|
47
60
|
* totals and per-platform/per-format engagement, the best hours and weekdays to post, the best and worst
|
|
@@ -66,6 +79,7 @@ export async function getMarketingInsights(config, params) {
|
|
|
66
79
|
bottomPosts: data.bottomPosts.slice(0, 3).map(trimPost),
|
|
67
80
|
movers: data.movers.map((m) => omitNulls({ metric: m.metric, current: round4(m.current), previous: round4(m.previous), deltaPct: round4(m.deltaPct) })),
|
|
68
81
|
coverage: data.coverage,
|
|
82
|
+
topCreatives: (data.creatives ?? []).slice(0, 5).map(trimCreative),
|
|
69
83
|
};
|
|
70
84
|
}
|
|
71
85
|
//# sourceMappingURL=insights.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insights.js","sourceRoot":"","sources":["../../../src/mcp/tools/insights.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"insights.js","sourceRoot":"","sources":["../../../src/mcp/tools/insights.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAgGlC,4EAA4E;AAC5E,SAAS,MAAM,CAAC,CAA4B;IAC1C,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,KAAK,SAAS;QAAE,OAAO,CAAC,CAAA;IAC3C,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,KAAK,CAAA;AACtC,CAAC;AAED,yFAAyF;AACzF,SAAS,SAAS,CAAoC,GAAM;IAC1D,MAAM,GAAG,GAAe,EAAE,CAAA;IAC1B,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,I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SAAS,CAAC;QACtC,YAAY,EAAE,SAAS,CAAC,IAAI,CAAC,MAAM,CAAC;QACpC,YAAY,EAAE,SAAS,CAAC,IAAI,CAAC,SAAS,CAAC;QACvC,QAAQ,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC;QACjD,WAAW,EAAE,IAAI,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC;QACvD,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAC5B,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CACxH;QACD,QAAQ,EAAE,IAAI,CAAC,QAAQ;QACvB,YAAY,EAAE,CAAC,IAAI,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,YAAY,CAAC;KACnE,CAAA;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cliangdev/conductor",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.23.0",
|
|
4
4
|
"description": "Agentic software development platform — AI-driven PRD, implementation, and beyond",
|
|
5
5
|
"license": "SEE LICENSE IN ../LICENSE",
|
|
6
6
|
"repository": {
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"scripts/"
|
|
24
24
|
],
|
|
25
25
|
"scripts": {
|
|
26
|
-
"build": "tsc",
|
|
26
|
+
"build": "tsc && node scripts/build-creative.mjs",
|
|
27
27
|
"typecheck:fast": "tsgo --noEmit",
|
|
28
28
|
"dev": "ts-node src/index.ts",
|
|
29
29
|
"test": "vitest run",
|
|
@@ -35,8 +35,11 @@
|
|
|
35
35
|
"chalk": "^6.0.0",
|
|
36
36
|
"chokidar": "^5.0.0",
|
|
37
37
|
"commander": "^15.0.0",
|
|
38
|
+
"ffmpeg-static": "^5.3.0",
|
|
39
|
+
"ffprobe-static": "^3.1.0",
|
|
38
40
|
"open": "^11.0.0",
|
|
39
|
-
"ora": "^9.4.0"
|
|
41
|
+
"ora": "^9.4.0",
|
|
42
|
+
"playwright-core": "1.63.0"
|
|
40
43
|
},
|
|
41
44
|
"devDependencies": {
|
|
42
45
|
"@types/node": "^26.0.0",
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/* build-creative.mjs — copies the runtime files of the sibling
|
|
3
|
+
* `conductor-creative/` package into this package's `dist/creative/`, run by
|
|
4
|
+
* `npm run build` alongside `tsc`.
|
|
5
|
+
*
|
|
6
|
+
* Why a copy rather than a dependency: conductor-tools is published to npm
|
|
7
|
+
* (`@cliangdev/conductor`), so it cannot `file:`-depend on a sibling
|
|
8
|
+
* directory that only exists in this monorepo checkout at runtime — the
|
|
9
|
+
* published package has to carry what it needs itself. `conductor-creative/`
|
|
10
|
+
* has no build step of its own (plain ESM, no bundler), so "build" here just
|
|
11
|
+
* means "select the files the render job actually needs and lay them out at
|
|
12
|
+
* the same relative paths dist/creative/job/render.mjs's own
|
|
13
|
+
* `PACKAGE_ROOT = join(HERE, '..')` expects".
|
|
14
|
+
*
|
|
15
|
+
* Deliberately excluded: `mount.js`/`copy-rules.js` (editor-only, not
|
|
16
|
+
* imported by frame.js/sheet.js — the render core never reaches for them),
|
|
17
|
+
* `test/`, `node_modules/`, `job/package.json` (its `playwright` dependency
|
|
18
|
+
* is for running the job directly out of that repo; conductor-tools drives
|
|
19
|
+
* the same `run()` with its own `playwright-core`-based browser discovery —
|
|
20
|
+
* see src/lib/creative-browser.ts), and `README.md`.
|
|
21
|
+
*
|
|
22
|
+
* Kept in one explicit list (rather than "copy everything except...") so a
|
|
23
|
+
* new file added to conductor-creative/ has to be a deliberate decision here
|
|
24
|
+
* too, and `src/__tests__/build-creative.test.ts` asserts every listed file
|
|
25
|
+
* actually lands in dist/creative/ after this runs.
|
|
26
|
+
*/
|
|
27
|
+
import { existsSync, mkdirSync, copyFileSync } from 'node:fs'
|
|
28
|
+
import { dirname, join } from 'node:path'
|
|
29
|
+
import { fileURLToPath } from 'node:url'
|
|
30
|
+
|
|
31
|
+
const __dirname = dirname(fileURLToPath(import.meta.url))
|
|
32
|
+
const REPO_ROOT = join(__dirname, '..', '..')
|
|
33
|
+
export const SOURCE_ROOT = join(REPO_ROOT, 'conductor-creative')
|
|
34
|
+
export const DEST_ROOT = join(__dirname, '..', 'dist', 'creative')
|
|
35
|
+
|
|
36
|
+
/** Relative paths (from conductor-creative/) this build needs. Order doesn't matter. */
|
|
37
|
+
export const CREATIVE_RUNTIME_FILES = [
|
|
38
|
+
'render.js',
|
|
39
|
+
'assertions.js',
|
|
40
|
+
'placements.js',
|
|
41
|
+
'placements.json',
|
|
42
|
+
'styles.css',
|
|
43
|
+
'tokens.css',
|
|
44
|
+
'frame.css',
|
|
45
|
+
'frame.html',
|
|
46
|
+
'font.js',
|
|
47
|
+
'frame.js',
|
|
48
|
+
'sheet.html',
|
|
49
|
+
'sheet.js',
|
|
50
|
+
'layouts/index.js',
|
|
51
|
+
'layouts/index.json',
|
|
52
|
+
'layouts/stacked/layout.json',
|
|
53
|
+
'layouts/stacked/layout.css',
|
|
54
|
+
'layouts/bleed/layout.json',
|
|
55
|
+
'layouts/bleed/layout.css',
|
|
56
|
+
'layouts/card/layout.json',
|
|
57
|
+
'layouts/card/layout.css',
|
|
58
|
+
'layouts/split/layout.json',
|
|
59
|
+
'layouts/split/layout.css',
|
|
60
|
+
'job/render.mjs',
|
|
61
|
+
'job/server.mjs',
|
|
62
|
+
'job/transport.mjs',
|
|
63
|
+
]
|
|
64
|
+
|
|
65
|
+
export function copyCreativeRuntime(sourceRoot = SOURCE_ROOT, destRoot = DEST_ROOT) {
|
|
66
|
+
const missing = []
|
|
67
|
+
for (const rel of CREATIVE_RUNTIME_FILES) {
|
|
68
|
+
const src = join(sourceRoot, rel)
|
|
69
|
+
if (!existsSync(src)) {
|
|
70
|
+
missing.push(rel)
|
|
71
|
+
continue
|
|
72
|
+
}
|
|
73
|
+
const dest = join(destRoot, rel)
|
|
74
|
+
mkdirSync(dirname(dest), { recursive: true })
|
|
75
|
+
copyFileSync(src, dest)
|
|
76
|
+
}
|
|
77
|
+
if (missing.length > 0) {
|
|
78
|
+
throw new Error(
|
|
79
|
+
`build-creative.mjs: expected file(s) missing from ${sourceRoot}:\n` +
|
|
80
|
+
missing.map((f) => ` - ${f}`).join('\n')
|
|
81
|
+
)
|
|
82
|
+
}
|
|
83
|
+
return CREATIVE_RUNTIME_FILES.map((rel) => join(destRoot, rel))
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function isMain() {
|
|
87
|
+
return process.argv[1] && import.meta.url === `file://${process.argv[1]}`
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
if (isMain()) {
|
|
91
|
+
const written = copyCreativeRuntime()
|
|
92
|
+
console.log(`build-creative: copied ${written.length} file(s) into ${DEST_ROOT}`)
|
|
93
|
+
}
|