@cliangdev/conductor 0.20.6 → 0.22.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 +144 -0
- package/assets/claude/skills/conductor-publisher/SKILL.md +4 -0
- package/assets/cli-manifest.json +100 -0
- package/dist/commands/creative.d.ts +3 -0
- package/dist/commands/creative.d.ts.map +1 -0
- package/dist/commands/creative.js +60 -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 +200 -0
- package/dist/creative/placements.json +232 -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 +32 -0
- package/dist/lib/creative-render.d.ts.map +1 -0
- package/dist/lib/creative-render.js +71 -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/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/mcp/index.d.ts +18 -0
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +301 -0
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/tools/creatives.d.ts +93 -0
- package/dist/mcp/tools/creatives.d.ts.map +1 -0
- package/dist/mcp/tools/creatives.js +291 -0
- package/dist/mcp/tools/creatives.js.map +1 -0
- package/dist/mcp/tools/insights.d.ts +11 -0
- package/dist/mcp/tools/insights.d.ts.map +1 -0
- package/dist/mcp/tools/insights.js +85 -0
- package/dist/mcp/tools/insights.js.map +1 -0
- package/package.json +4 -3
- package/scripts/build-creative.mjs +93 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Runs a Creative render locally: loads the render core copied into `dist/creative/` at build time
|
|
3
|
+
* (see `scripts/build-creative.mjs`), drives it against the external v2 creatives API with this
|
|
4
|
+
* project's own API key, and reads back the stored result. Shared by the `conductor creative render`
|
|
5
|
+
* CLI command and the `render_creative` MCP tool so the two never drift.
|
|
6
|
+
*
|
|
7
|
+
* The render core itself (`conductor-creative/job/render.mjs`'s `run()`) knows nothing about how it's
|
|
8
|
+
* launched or what browser it gets — that's `job/transport.mjs`'s and this file's job respectively.
|
|
9
|
+
*/
|
|
10
|
+
import { existsSync } from 'node:fs';
|
|
11
|
+
import { dirname, join } from 'node:path';
|
|
12
|
+
import { fileURLToPath } from 'node:url';
|
|
13
|
+
import { apiGet } from '../mcp/api.js';
|
|
14
|
+
import { findBrowserFactory } from './creative-browser.js';
|
|
15
|
+
/** Where `npm run build` copies `conductor-creative/`'s runtime files, relative to this file's own
|
|
16
|
+
* compiled location (`dist/lib/creative-render.js` -> `dist/creative/job/`). */
|
|
17
|
+
function jobDir() {
|
|
18
|
+
const here = dirname(fileURLToPath(import.meta.url));
|
|
19
|
+
return join(here, '..', 'creative', 'job');
|
|
20
|
+
}
|
|
21
|
+
async function loadRenderCore() {
|
|
22
|
+
const dir = jobDir();
|
|
23
|
+
const renderPath = join(dir, 'render.mjs');
|
|
24
|
+
const transportPath = join(dir, 'transport.mjs');
|
|
25
|
+
if (!existsSync(renderPath) || !existsSync(transportPath)) {
|
|
26
|
+
throw new Error(`Creative render core not found under ${dir}. This is a packaging bug in @cliangdev/conductor ` +
|
|
27
|
+
'(the build step that copies conductor-creative/ into dist/creative/ did not run) — ' +
|
|
28
|
+
'reinstall the CLI, or in this repo run `npm run build`.');
|
|
29
|
+
}
|
|
30
|
+
const [renderMod, transportMod] = await Promise.all([
|
|
31
|
+
import(renderPath),
|
|
32
|
+
import(transportPath),
|
|
33
|
+
]);
|
|
34
|
+
return { run: renderMod.run, createApiTransport: transportMod.createApiTransport };
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Renders a Creative end to end: finds a local browser, runs the render core against the external
|
|
38
|
+
* API, and reads back the stored render (frames with signed URLs, final state) whether or not the
|
|
39
|
+
* render itself succeeded — a FAILED render still has an id and an error message worth returning.
|
|
40
|
+
*/
|
|
41
|
+
export async function renderCreative(params, config, log = () => { }) {
|
|
42
|
+
const { run, createApiTransport } = await loadRenderCore();
|
|
43
|
+
const transport = createApiTransport({
|
|
44
|
+
apiUrl: config.apiUrl,
|
|
45
|
+
apiKey: config.apiKey,
|
|
46
|
+
projectId: config.projectId,
|
|
47
|
+
creativeId: params.creativeId,
|
|
48
|
+
previewOnly: !!params.previewOnly,
|
|
49
|
+
renderer: params.renderer,
|
|
50
|
+
workflowRunId: params.workflowRunId,
|
|
51
|
+
});
|
|
52
|
+
const browserFactory = await findBrowserFactory(log);
|
|
53
|
+
const ok = await run({ transport, browserFactory, log });
|
|
54
|
+
const renderId = transport.getRenderId();
|
|
55
|
+
if (!renderId) {
|
|
56
|
+
return { ok: false, error: 'The render was never started — the API rejected the request before a render id was assigned.', frames: [] };
|
|
57
|
+
}
|
|
58
|
+
try {
|
|
59
|
+
const detail = await apiGet(`/api/v2/projects/${config.projectId}/marketing/creatives/${params.creativeId}/renders/${renderId}`, config);
|
|
60
|
+
return { ok, renderId, state: detail.state, error: detail.error ?? null, frames: detail.frames ?? [] };
|
|
61
|
+
}
|
|
62
|
+
catch (err) {
|
|
63
|
+
return {
|
|
64
|
+
ok,
|
|
65
|
+
renderId,
|
|
66
|
+
error: `Render finished (${ok ? 'succeeded' : 'failed'}) but reading the result back failed: ${err instanceof Error ? err.message : String(err)}`,
|
|
67
|
+
frames: [],
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
//# sourceMappingURL=creative-render.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"creative-render.js","sourceRoot":"","sources":["../../src/lib/creative-render.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AACzC,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAExC,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACtC,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AA0D1D;gFACgF;AAChF,SAAS,MAAM;IACb,MAAM,IAAI,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAA;IACpD,OAAO,IAAI,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,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AG,MAAM,kBAAkB,CAAC,GAAG,CAAC,CAAA;IAEpD,MAAM,EAAE,GAAG,MAAM,GAAG,CAAC,EAAE,SAAS,EAAE,cAAc,EAAE,GAAG,EAAE,CAAC,CAAA;IACxD,MAAM,QAAQ,GAAG,SAAS,CAAC,WAAW,EAAE,CAAA;IACxC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,8FAA8F,EAAE,MAAM,EAAE,EAAE,EAAE,CAAA;IACzI,CAAC;IAED,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,MAAM,CACzB,oBAAoB,MAAM,CAAC,SAAS,wBAAwB,MAAM,CAAC,UAAU,YAAY,QAAQ,EAAE,EACnG,MAAM,CACP,CAAA;QACD,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,IAAI,EAAE,EAAE,CAAA;IACxG,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO;YACL,EAAE;YACF,QAAQ;YACR,KAAK,EAAE,oBAAoB,EAAE,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,yCAAyC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE;YACjJ,MAAM,EAAE,EAAE;SACX,CAAA;IACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads an image's format and pixel dimensions straight from its file header — no decode, no
|
|
3
|
+
* external image library. Used by `upload_creative_photo`, which needs width/height and content
|
|
4
|
+
* type before minting an upload (the backend's `CreateCreativePhotoRequest` requires both, since
|
|
5
|
+
* Conductor has no server-side image pipeline and WebP in particular cannot be probed there).
|
|
6
|
+
*
|
|
7
|
+
* Covers exactly the three formats the Creative photo API accepts (image/png, image/jpeg,
|
|
8
|
+
* image/webp). Returns `null` for anything else or a header that doesn't parse — callers should
|
|
9
|
+
* treat that as "not a usable photo" rather than guessing.
|
|
10
|
+
*/
|
|
11
|
+
export type CreativePhotoContentType = 'image/png' | 'image/jpeg' | 'image/webp';
|
|
12
|
+
export interface ImageInfo {
|
|
13
|
+
contentType: CreativePhotoContentType;
|
|
14
|
+
width: number;
|
|
15
|
+
height: number;
|
|
16
|
+
}
|
|
17
|
+
/** Sniffs the format from magic bytes and parses width/height from the header. `null` when the
|
|
18
|
+
* bytes aren't a recognizable PNG, JPEG or WebP, or the header is truncated/malformed. */
|
|
19
|
+
export declare function readImageDimensions(bytes: Uint8Array): ImageInfo | null;
|
|
20
|
+
//# sourceMappingURL=image-dimensions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-dimensions.d.ts","sourceRoot":"","sources":["../../src/lib/image-dimensions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,MAAM,wBAAwB,GAAG,WAAW,GAAG,YAAY,GAAG,YAAY,CAAA;AAEhF,MAAM,WAAW,SAAS;IACxB,WAAW,EAAE,wBAAwB,CAAA;IACrC,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE,MAAM,CAAA;CACf;AAuGD;0FAC0F;AAC1F,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,UAAU,GAAG,SAAS,GAAG,IAAI,CAEvE"}
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads an image's format and pixel dimensions straight from its file header — no decode, no
|
|
3
|
+
* external image library. Used by `upload_creative_photo`, which needs width/height and content
|
|
4
|
+
* type before minting an upload (the backend's `CreateCreativePhotoRequest` requires both, since
|
|
5
|
+
* Conductor has no server-side image pipeline and WebP in particular cannot be probed there).
|
|
6
|
+
*
|
|
7
|
+
* Covers exactly the three formats the Creative photo API accepts (image/png, image/jpeg,
|
|
8
|
+
* image/webp). Returns `null` for anything else or a header that doesn't parse — callers should
|
|
9
|
+
* treat that as "not a usable photo" rather than guessing.
|
|
10
|
+
*/
|
|
11
|
+
function readUInt32BE(bytes, offset) {
|
|
12
|
+
return ((bytes[offset] << 24) | (bytes[offset + 1] << 16) | (bytes[offset + 2] << 8) | bytes[offset + 3]) >>> 0;
|
|
13
|
+
}
|
|
14
|
+
function readUInt16BE(bytes, offset) {
|
|
15
|
+
return ((bytes[offset] << 8) | bytes[offset + 1]) >>> 0;
|
|
16
|
+
}
|
|
17
|
+
function readUInt24LE(bytes, offset) {
|
|
18
|
+
return (bytes[offset] | (bytes[offset + 1] << 8) | (bytes[offset + 2] << 16)) >>> 0;
|
|
19
|
+
}
|
|
20
|
+
const PNG_SIGNATURE = [0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a];
|
|
21
|
+
function readPng(bytes) {
|
|
22
|
+
if (bytes.length < 24)
|
|
23
|
+
return null;
|
|
24
|
+
if (!PNG_SIGNATURE.every((b, i) => bytes[i] === b))
|
|
25
|
+
return null;
|
|
26
|
+
// IHDR is always the first chunk: 4-byte length, 4-byte type "IHDR", then width/height (4 bytes
|
|
27
|
+
// each, big-endian) at offsets 16 and 20.
|
|
28
|
+
return { contentType: 'image/png', width: readUInt32BE(bytes, 16), height: readUInt32BE(bytes, 20) };
|
|
29
|
+
}
|
|
30
|
+
// SOFn (start-of-frame) markers that carry dimensions. Excludes 0xC4 (DHT), 0xC8 (JPG extension,
|
|
31
|
+
// unused in practice) and 0xCC (DAC) — those share the 0xC0-0xCF range but aren't SOF markers.
|
|
32
|
+
const JPEG_SOF_MARKERS = new Set([0xc0, 0xc1, 0xc2, 0xc3, 0xc5, 0xc6, 0xc7, 0xc9, 0xca, 0xcb, 0xcd, 0xce, 0xcf]);
|
|
33
|
+
// Standalone markers with no length-prefixed payload following them.
|
|
34
|
+
const JPEG_NO_PAYLOAD_MARKERS = new Set([0x01, 0xd8, 0xd9]);
|
|
35
|
+
function readJpeg(bytes) {
|
|
36
|
+
if (bytes.length < 4 || bytes[0] !== 0xff || bytes[1] !== 0xd8)
|
|
37
|
+
return null;
|
|
38
|
+
let offset = 2;
|
|
39
|
+
while (offset + 4 <= bytes.length) {
|
|
40
|
+
if (bytes[offset] !== 0xff) {
|
|
41
|
+
offset += 1; // resync on a stray fill byte (0xFF00 stuffing, etc.)
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
const marker = bytes[offset + 1];
|
|
45
|
+
if (marker === 0xd9)
|
|
46
|
+
break; // EOI, no dimensions found
|
|
47
|
+
if (JPEG_NO_PAYLOAD_MARKERS.has(marker) || (marker >= 0xd0 && marker <= 0xd7)) {
|
|
48
|
+
offset += 2;
|
|
49
|
+
continue;
|
|
50
|
+
}
|
|
51
|
+
const segmentLength = readUInt16BE(bytes, offset + 2);
|
|
52
|
+
if (JPEG_SOF_MARKERS.has(marker)) {
|
|
53
|
+
const payloadStart = offset + 4;
|
|
54
|
+
if (payloadStart + 5 > bytes.length)
|
|
55
|
+
return null;
|
|
56
|
+
const height = readUInt16BE(bytes, payloadStart + 1);
|
|
57
|
+
const width = readUInt16BE(bytes, payloadStart + 3);
|
|
58
|
+
return { contentType: 'image/jpeg', width, height };
|
|
59
|
+
}
|
|
60
|
+
if (segmentLength < 2)
|
|
61
|
+
return null; // malformed — refuse to loop forever
|
|
62
|
+
offset += 2 + segmentLength;
|
|
63
|
+
}
|
|
64
|
+
return null;
|
|
65
|
+
}
|
|
66
|
+
function isRiffWebp(bytes) {
|
|
67
|
+
return (bytes.length >= 21 && // enough to read the fourCC at 12-15 and reach the chunk data at 20
|
|
68
|
+
bytes[0] === 0x52 &&
|
|
69
|
+
bytes[1] === 0x49 &&
|
|
70
|
+
bytes[2] === 0x46 &&
|
|
71
|
+
bytes[3] === 0x46 && // "RIFF"
|
|
72
|
+
bytes[8] === 0x57 &&
|
|
73
|
+
bytes[9] === 0x45 &&
|
|
74
|
+
bytes[10] === 0x42 &&
|
|
75
|
+
bytes[11] === 0x50 // "WEBP"
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
function readWebp(bytes) {
|
|
79
|
+
if (!isRiffWebp(bytes))
|
|
80
|
+
return null;
|
|
81
|
+
const fourCc = String.fromCharCode(bytes[12], bytes[13], bytes[14], bytes[15]);
|
|
82
|
+
const chunkStart = 20; // after the 8-byte RIFF header, "WEBP", fourCC and 4-byte chunk size
|
|
83
|
+
if (fourCc === 'VP8X') {
|
|
84
|
+
// flags (1 byte) + reserved (3 bytes), then 3-byte little-endian (width-1) and (height-1).
|
|
85
|
+
if (bytes.length < chunkStart + 10)
|
|
86
|
+
return null;
|
|
87
|
+
return {
|
|
88
|
+
contentType: 'image/webp',
|
|
89
|
+
width: readUInt24LE(bytes, chunkStart + 4) + 1,
|
|
90
|
+
height: readUInt24LE(bytes, chunkStart + 7) + 1,
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
if (fourCc === 'VP8 ') {
|
|
94
|
+
// 3-byte frame tag + 3-byte start code (0x9d 0x01 0x2a), then 14-bit width/height, little-endian.
|
|
95
|
+
if (bytes.length < chunkStart + 10)
|
|
96
|
+
return null;
|
|
97
|
+
const widthRaw = bytes[chunkStart + 6] | (bytes[chunkStart + 7] << 8);
|
|
98
|
+
const heightRaw = bytes[chunkStart + 8] | (bytes[chunkStart + 9] << 8);
|
|
99
|
+
return { contentType: 'image/webp', width: widthRaw & 0x3fff, height: heightRaw & 0x3fff };
|
|
100
|
+
}
|
|
101
|
+
if (fourCc === 'VP8L') {
|
|
102
|
+
// 1-byte signature (0x2f), then a little-endian 32-bit field: 14-bit (width-1), 14-bit (height-1).
|
|
103
|
+
if (bytes.length < chunkStart + 5)
|
|
104
|
+
return null;
|
|
105
|
+
const bits = (bytes[chunkStart + 1] | (bytes[chunkStart + 2] << 8) | (bytes[chunkStart + 3] << 16) | (bytes[chunkStart + 4] << 24)) >>> 0;
|
|
106
|
+
return { contentType: 'image/webp', width: (bits & 0x3fff) + 1, height: ((bits >>> 14) & 0x3fff) + 1 };
|
|
107
|
+
}
|
|
108
|
+
return null;
|
|
109
|
+
}
|
|
110
|
+
/** Sniffs the format from magic bytes and parses width/height from the header. `null` when the
|
|
111
|
+
* bytes aren't a recognizable PNG, JPEG or WebP, or the header is truncated/malformed. */
|
|
112
|
+
export function readImageDimensions(bytes) {
|
|
113
|
+
return readPng(bytes) ?? readJpeg(bytes) ?? readWebp(bytes);
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=image-dimensions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-dimensions.js","sourceRoot":"","sources":["../../src/lib/image-dimensions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAUH,SAAS,YAAY,CAAC,KAAiB,EAAE,MAAc;IACrD,OAAO,CAAC,CAAC,KAAK,CAAC,MAAM,CAAE,IAAI,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAE,IAAI,EAAE,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAE,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAE,CAAC,KAAK,CAAC,CAAA;AACrH,CAAC;AAED,SAAS,YAAY,CAAC,KAAiB,EAAE,MAAc;IACrD,OAAO,CAAC,CAAC,KAAK,CAAC,MAAM,CAAE,IAAI,CAAC,CAAC,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAE,CAAC,KAAK,CAAC,CAAA;AAC3D,CAAC;AAED,SAAS,YAAY,CAAC,KAAiB,EAAE,MAAc;IACrD,OAAO,CAAC,KAAK,CAAC,MAAM,CAAE,GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAE,IAAI,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAE,IAAI,EAAE,CAAC,CA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in-assets.d.ts","sourceRoot":"","sources":["../../src/lib/plugin-assets.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"plugin-assets.d.ts","sourceRoot":"","sources":["../../src/lib/plugin-assets.ts"],"names":[],"mappings":"AA4CA,wBAAgB,cAAc,IAAI,MAAM,CAKvC;AAmCD,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,SAAS,GAAG,SAAS,CAAA;AAE/D;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CACjC,SAAS,EAAE,MAAM,EACjB,WAAW,EAAE,MAAM,EACnB,WAAW,CAAC,EAAE,MAAM,GACnB,aAAa,CA4Cf;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,WAAW,EAAE,MAAM,EACnB,eAAe,EAAE,MAAM,EACvB,cAAc,EAAE,MAAM,GACrB;IAAE,QAAQ,EAAE,QAAQ,GAAG,OAAO,GAAG,MAAM,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,CA0B9D"}
|
|
@@ -11,6 +11,7 @@ const PLUGIN_FILES = [
|
|
|
11
11
|
'skills/conductor-ux-ui-design/references/design-tokens.md',
|
|
12
12
|
'skills/conductor-coder/SKILL.md',
|
|
13
13
|
'skills/conductor-publisher/SKILL.md',
|
|
14
|
+
'skills/conductor-creative/SKILL.md',
|
|
14
15
|
];
|
|
15
16
|
// Paths removed in previous versions — deleted on `conductor init` to clean up stale installs.
|
|
16
17
|
const LEGACY_PATHS = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-assets.js","sourceRoot":"","sources":["../../src/lib/plugin-assets.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAA;AACxB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAC5B,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAA;AAEnC,MAAM,YAAY,GAAG;IACnB,2BAA2B;IAC3B,iCAAiC;IACjC,2BAA2B;IAC3B,gCAAgC;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B,IAAI,aAAa,EAAE,CAAC;QAClB,IAAI,CAAC;YACH,MAAM,SAAS,GAAG,EAAE,CAAC,YAAY,CAAC,aAAa,EAAE,MAAM,CAAC,CAAA;YACxD,MAAM,OAAO,GAAG,EAAE,CAAC,YAAY,CAAC,cAAc,EAAE,MAAM,CAAC,CAAA;YACvD,QAAQ,GAAG,SAAS,KAAK,OAAO,CAAA;QAClC,CAAC;QAAC,MAAM,CAAC,CAAC,qCAAqC,CAAC,CAAC;IACnD,CAAC;IAED,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAA;AAC/B,CAAC"}
|
package/dist/mcp/index.d.ts
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* An image content block (base64-encoded bytes + MIME type) plus an optional text block of
|
|
4
|
+
* metadata — the shape a client needs to actually render the image rather than just read about it.
|
|
5
|
+
* `preview_creative` is the first tool to need this; every other tool emits text only.
|
|
6
|
+
*/
|
|
7
|
+
export declare function imageResponse(image: {
|
|
8
|
+
data: Buffer;
|
|
9
|
+
mimeType: string;
|
|
10
|
+
}, meta?: unknown): {
|
|
11
|
+
content: ({
|
|
12
|
+
type: "image";
|
|
13
|
+
data: string;
|
|
14
|
+
mimeType: string;
|
|
15
|
+
} | {
|
|
16
|
+
type: "text";
|
|
17
|
+
text: string;
|
|
18
|
+
})[];
|
|
19
|
+
};
|
|
2
20
|
export declare function runMcpServer(): Promise<void>;
|
|
3
21
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/mcp/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mcp/index.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mcp/index.ts"],"names":[],"mappings":";AAywCA;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,EAAE,IAAI,CAAC,EAAE,OAAO;;cACxD,OAAO;cAAQ,MAAM;kBAAY,MAAM;;cAAa,MAAM;cAAQ,MAAM;;EAOtG;AAoBD,wBAAsB,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CA4zBlD"}
|