gooseworks 0.3.13 → 0.3.14
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/dist/auth/oauth-server.d.ts +8 -1
- package/dist/auth/oauth-server.d.ts.map +1 -1
- package/dist/auth/oauth-server.js +14 -2
- package/dist/auth/oauth-server.js.map +1 -1
- package/dist/commands/install.d.ts.map +1 -1
- package/dist/commands/install.js +2 -1
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/login.d.ts +1 -1
- package/dist/commands/login.d.ts.map +1 -1
- package/dist/commands/login.js +4 -3
- package/dist/commands/login.js.map +1 -1
- package/dist/skills/master-skill.d.ts.map +1 -1
- package/dist/skills/master-skill.js +64 -10
- package/dist/skills/master-skill.js.map +1 -1
- package/package.json +1 -1
- package/skills/goose-video/SKILL.md +64 -10
|
@@ -6,6 +6,13 @@ interface OAuthResult {
|
|
|
6
6
|
default_agent_id?: string;
|
|
7
7
|
mcp_server_url?: string;
|
|
8
8
|
}
|
|
9
|
-
|
|
9
|
+
/**
|
|
10
|
+
* @param creatorRef Creator Program referral code (from `--ref`). Forwarded to
|
|
11
|
+
* the `/cli/auth` page as `?creator_ref=`, which passes it onto `/auth/google`
|
|
12
|
+
* so the backend attributes a first-time signup to that creator's cash rail.
|
|
13
|
+
* No-op for users who are already signed in (attribution only lands on the
|
|
14
|
+
* OAuth signup, not on token re-exchange).
|
|
15
|
+
*/
|
|
16
|
+
export declare function runOAuthFlow(apiBase: string, creatorRef?: string): Promise<OAuthResult>;
|
|
10
17
|
export {};
|
|
11
18
|
//# sourceMappingURL=oauth-server.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth-server.d.ts","sourceRoot":"","sources":["../../src/auth/oauth-server.ts"],"names":[],"mappings":"AAUA,UAAU,WAAW;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,wBAAsB,YAAY,
|
|
1
|
+
{"version":3,"file":"oauth-server.d.ts","sourceRoot":"","sources":["../../src/auth/oauth-server.ts"],"names":[],"mappings":"AAUA,UAAU,WAAW;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;GAMG;AACH,wBAAsB,YAAY,CAChC,OAAO,EAAE,MAAM,EACf,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,WAAW,CAAC,CAkItB"}
|
|
@@ -44,7 +44,14 @@ const credentials_1 = require("./credentials");
|
|
|
44
44
|
const logger = __importStar(require("../utils/logger"));
|
|
45
45
|
const config_1 = require("../config");
|
|
46
46
|
const OAUTH_TIMEOUT_MS = 120_000;
|
|
47
|
-
|
|
47
|
+
/**
|
|
48
|
+
* @param creatorRef Creator Program referral code (from `--ref`). Forwarded to
|
|
49
|
+
* the `/cli/auth` page as `?creator_ref=`, which passes it onto `/auth/google`
|
|
50
|
+
* so the backend attributes a first-time signup to that creator's cash rail.
|
|
51
|
+
* No-op for users who are already signed in (attribution only lands on the
|
|
52
|
+
* OAuth signup, not on token re-exchange).
|
|
53
|
+
*/
|
|
54
|
+
async function runOAuthFlow(apiBase, creatorRef) {
|
|
48
55
|
const state = crypto.randomBytes(16).toString('hex');
|
|
49
56
|
const frontendBase = config_1.FRONTEND_URL;
|
|
50
57
|
return new Promise((resolve, reject) => {
|
|
@@ -132,7 +139,12 @@ async function runOAuthFlow(apiBase) {
|
|
|
132
139
|
// Pass api_base so the frontend can route Google OAuth back through the
|
|
133
140
|
// correct backend (e.g. http://localhost:5999 for local dev vs. the
|
|
134
141
|
// ngrok/prod URL baked into NEXT_PUBLIC_API_URL).
|
|
135
|
-
|
|
142
|
+
let authUrl = `${frontendBase}/cli/auth?callback_port=${port}&state=${state}&api_base=${encodeURIComponent(apiBase)}`;
|
|
143
|
+
// Carry the creator referral code through so the frontend can forward it
|
|
144
|
+
// to /auth/google as ?creator_ref= for signup attribution.
|
|
145
|
+
if (creatorRef) {
|
|
146
|
+
authUrl += `&creator_ref=${encodeURIComponent(creatorRef)}`;
|
|
147
|
+
}
|
|
136
148
|
logger.info('Opening browser for Google sign-in...');
|
|
137
149
|
(0, open_1.default)(authUrl).catch(() => {
|
|
138
150
|
logger.warn(`Could not open browser. Please visit:\n ${authUrl}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"oauth-server.js","sourceRoot":"","sources":["../../src/auth/oauth-server.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"oauth-server.js","sourceRoot":"","sources":["../../src/auth/oauth-server.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,oCAqIC;AA/JD,2CAA6B;AAE7B,+CAAiC;AACjC,gDAAwB;AACxB,+CAAkE;AAClE,wDAA0C;AAC1C,sCAAyC;AAEzC,MAAM,gBAAgB,GAAG,OAAO,CAAC;AAWjC;;;;;;GAMG;AACI,KAAK,UAAU,YAAY,CAChC,OAAe,EACf,UAAmB;IAEnB,MAAM,KAAK,GAAG,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;IACrD,MAAM,YAAY,GAAG,qBAAY,CAAC;IAElC,OAAO,IAAI,OAAO,CAAc,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QAClD,2DAA2D;QAC3D,MAAM,OAAO,GAAG,I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AA2B,IAAI,UAAU,KAAK,aAAa,kBAAkB,CAAC,OAAO,CAAC,EAAE,CAAC;YACtH,yEAAyE;YACzE,2DAA2D;YAC3D,IAAI,UAAU,EAAE,CAAC;gBACf,OAAO,IAAI,gBAAgB,kBAAkB,CAAC,UAAU,CAAC,EAAE,CAAC;YAC9D,CAAC;YAED,MAAM,CAAC,IAAI,CAAC,uCAAuC,CAAC,CAAC;YACrD,IAAA,cAAI,EAAC,OAAO,CAAC,CAAC,KAAK,CAAC,GAAG,EAAE;gBACvB,MAAM,CAAC,IAAI,CAAC,gDAAgD,OAAO,EAAE,CAAC,CAAC;YACzE,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,MAAM,OAAO,GAAG,UAAU,CAAC,GAAG,EAAE;YAC9B,OAAO,EAAE,CAAC;YACV,MAAM,CAAC,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC,CAAC;QACrF,CAAC,EAAE,gBAAgB,CAAC,CAAC;QAErB,MAAM,OAAO,GAAG,GAAG,EAAE;YACnB,YAAY,CAAC,OAAO,CAAC,CAAC;YACtB,MAAM,CAAC,KAAK,EAAE,CAAC;YACf,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE,CAAC;gBAC7B,MAAM,CAAC,OAAO,EAAE,CAAC;YACnB,CAAC;QACH,CAAC,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QAChC,OAAO,CAAC,IAAI,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/commands/install.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"install.d.ts","sourceRoot":"","sources":["../../src/commands/install.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAwBpC,wBAAgB,oBAAoB,IAAI,OAAO,CA0J9C;AAED,eAAO,MAAM,cAAc,SAAyB,CAAC"}
|
package/dist/commands/install.js
CHANGED
|
@@ -61,6 +61,7 @@ Examples:
|
|
|
61
61
|
.option('--mcp', 'Also register the GooseWorks MCP server')
|
|
62
62
|
.option('--with <skill-slug>', 'Also install a standalone GooseWorks skill (repeatable)', collectSkillSlug, [])
|
|
63
63
|
.option('--api-base <url>', 'API base URL', config_1.API_BASE)
|
|
64
|
+
.option('--ref <code>', 'Creator referral code — attributes your signup to the GooseWorks creator who referred you')
|
|
64
65
|
.action(async (opts) => {
|
|
65
66
|
logger.banner((0, version_1.getVersion)());
|
|
66
67
|
const targetAgents = resolveTargetAgents(opts);
|
|
@@ -72,7 +73,7 @@ Examples:
|
|
|
72
73
|
const wantMcp = !!(opts.mcp || opts.all);
|
|
73
74
|
// Step 1: Authenticate
|
|
74
75
|
logger.step(1, 3, 'Authenticating...');
|
|
75
|
-
const creds = await (0, login_1.ensureLoggedIn)(opts.apiBase);
|
|
76
|
+
const creds = await (0, login_1.ensureLoggedIn)(opts.apiBase, opts.ref);
|
|
76
77
|
logger.success(`Logged in as ${creds.email}`);
|
|
77
78
|
// Step 2: Install entry skills (clean old skills first)
|
|
78
79
|
logger.step(2, 3, 'Installing GooseWorks skills...');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../src/commands/install.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"install.js","sourceRoot":"","sources":["../../src/commands/install.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwBA,oDA0JC;AAlLD,yCAAoC;AACpC,mCAAyC;AACzC,mDAAyG;AACzG,6CAAmD;AACnD,qDAA8E;AAC9E,2CAAoE;AACpE,6CAAmD;AACnD,6CAAg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AAC,CAAC;QACzD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IAClB,CAAC,CAAC,CAAC;AACL,CAAC;AAEY,QAAA,cAAc,GAAG,oBAAoB,EAAE,CAAC;AAErD,SAAS,mBAAmB,CAAC,IAAoB;IAC/C,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;QACb,MAAM,QAAQ,GAAG,IAAA,qBAAY,GAAE,CAAC;QAChC,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC1B,MAAM,CAAC,IAAI,CAAC,oDAAoD,CAAC,CAAC;YAClE,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,gCAAgC;QACrD,CAAC;QACD,OAAO,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IACrC,CAAC;IAED,MAAM,OAAO,GAAgB,EAAE,CAAC;IAChC,IAAI,IAAI,CAAC,MAAM;QAAE,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACxC,IAAI,IAAI,CAAC,KAAK;QAAE,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACtC,IAAI,IAAI,CAAC,MAAM;QAAE,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IACxC,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAa,EAAE,QAAkB;IACzD,OAAO,CAAC,GAAG,QAAQ,EAAE,KAAK,CAAC,CAAC;AAC9B,CAAC"}
|
package/dist/commands/login.d.ts
CHANGED
|
@@ -4,5 +4,5 @@ export declare const loginCommand: Command;
|
|
|
4
4
|
* Ensures the user is logged in, running OAuth if needed.
|
|
5
5
|
* Returns credentials or exits the process.
|
|
6
6
|
*/
|
|
7
|
-
export declare function ensureLoggedIn(apiBase?: string): Promise<import("../auth/credentials").Credentials>;
|
|
7
|
+
export declare function ensureLoggedIn(apiBase?: string, creatorRef?: string): Promise<import("../auth/credentials").Credentials>;
|
|
8
8
|
//# sourceMappingURL=login.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/commands/login.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA+DpC,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/commands/login.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AA+DpC,eAAO,MAAM,YAAY,SA0BrB,CAAC;AAEL;;;GAGG;AACH,wBAAsB,cAAc,CAAC,OAAO,GAAE,MAAiB,EAAE,UAAU,CAAC,EAAE,MAAM,sDAcnF"}
|
package/dist/commands/login.js
CHANGED
|
@@ -102,6 +102,7 @@ function showNextSteps() {
|
|
|
102
102
|
exports.loginCommand = new commander_1.Command('login')
|
|
103
103
|
.description('Sign in to GooseWorks with Google')
|
|
104
104
|
.option('--api-base <url>', 'API base URL', config_1.API_BASE)
|
|
105
|
+
.option('--ref <code>', 'Creator referral code — attributes your signup to the GooseWorks creator who referred you')
|
|
105
106
|
.action(async (opts) => {
|
|
106
107
|
const existing = (0, credentials_1.getCredentials)();
|
|
107
108
|
if (existing) {
|
|
@@ -112,7 +113,7 @@ exports.loginCommand = new commander_1.Command('login')
|
|
|
112
113
|
return;
|
|
113
114
|
}
|
|
114
115
|
try {
|
|
115
|
-
const result = await (0, oauth_server_1.runOAuthFlow)(opts.apiBase);
|
|
116
|
+
const result = await (0, oauth_server_1.runOAuthFlow)(opts.apiBase, opts.ref);
|
|
116
117
|
logger.success(`Logged in as ${result.email}`);
|
|
117
118
|
refreshEntrySkillsOnLogin();
|
|
118
119
|
syncMcpRegistration();
|
|
@@ -129,11 +130,11 @@ exports.loginCommand = new commander_1.Command('login')
|
|
|
129
130
|
* Ensures the user is logged in, running OAuth if needed.
|
|
130
131
|
* Returns credentials or exits the process.
|
|
131
132
|
*/
|
|
132
|
-
async function ensureLoggedIn(apiBase = config_1.API_BASE) {
|
|
133
|
+
async function ensureLoggedIn(apiBase = config_1.API_BASE, creatorRef) {
|
|
133
134
|
const existing = (0, credentials_1.getCredentials)();
|
|
134
135
|
if (existing)
|
|
135
136
|
return existing;
|
|
136
|
-
const result = await (0, oauth_server_1.runOAuthFlow)(apiBase);
|
|
137
|
+
const result = await (0, oauth_server_1.runOAuthFlow)(apiBase, creatorRef);
|
|
137
138
|
const creds = (0, credentials_1.getCredentials)();
|
|
138
139
|
if (!creds) {
|
|
139
140
|
logger.error('Failed to save credentials after login');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../src/commands/login.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"login.js","sourceRoot":"","sources":["../../src/commands/login.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+FA,wCAcC;AA7GD,yCAAoC;AACpC,gDAAwB;AACxB,qDAAqD;AACrD,uDAAoD;AACpD,mDAAoF;AACpF,yDAAwD;AACxD,6CAAmD;AACnD,qDAA0D;AAC1D,6CAAoD;AACpD,wDAA0C;AAC1C,sCAA8C;AAE9C;;;;;;GAMG;AACH,SAAS,yBAAyB;IAChC,IAAI,CAAC,IAAA,8BAAkB,GAAE,CAAC,QAAQ,CAAC,YAAY,CAAC;QAAE,OAAO;IACzD,MAAM,OAAO,GAAG,IAAA,qCAAyB,EAAC,IAAA,6BAAc,GAAE,CAAC;SACxD,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,WAAW,CAAC;SACvC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC;IACtB,IAAI,OAAO,CAAC,MAAM,KAAK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AAc,EAAE,CAAC;IACjB,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"master-skill.d.ts","sourceRoot":"","sources":["../../src/skills/master-skill.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,WAAW,UAAU;IACzB,qEAAqE;IACrE,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,oDAAoD;AACpD,wBAAgB,cAAc,IAAI,UAAU,EAAE,CAM7C;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CA8N9C;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAsUhD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,yBAAyB,IAAI,MAAM,
|
|
1
|
+
{"version":3,"file":"master-skill.d.ts","sourceRoot":"","sources":["../../src/skills/master-skill.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,WAAW,UAAU;IACzB,qEAAqE;IACrE,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,oDAAoD;AACpD,wBAAgB,cAAc,IAAI,UAAU,EAAE,CAM7C;AAED;;;;;;;;GAQG;AACH,wBAAgB,qBAAqB,IAAI,MAAM,CA8N9C;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAsUhD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,yBAAyB,IAAI,MAAM,CAoalD"}
|
|
@@ -606,11 +606,12 @@ description: >
|
|
|
606
606
|
GooseWorks video ads — remix a video ad template (iMessage chat-reveal, more coming) into a
|
|
607
607
|
branded video ad for the user's product. Renders LOCALLY on the user's machine (Playwright +
|
|
608
608
|
ffmpeg + GooseWorks media proxies) and saves the finished MP4 back to the project over MCP.
|
|
609
|
-
Use when the user says "make the video for project <id>",
|
|
610
|
-
template, or asks to remix a video ad. Unlike goose-ads (static images,
|
|
611
|
-
video renders locally and reports progress + the result back through the
|
|
609
|
+
Use when the user says "make the video for project <id>", "for video batch <id>", references a
|
|
610
|
+
video ad project/batch or template, or asks to remix a video ad. Unlike goose-ads (static images,
|
|
611
|
+
generated server-side), video renders locally and reports progress + the result back through the
|
|
612
|
+
gooseworks MCP tools.
|
|
612
613
|
category: ads
|
|
613
|
-
version: 0.
|
|
614
|
+
version: 0.3.0
|
|
614
615
|
author: GooseWorks
|
|
615
616
|
tags: [gooseworks, ads, video, remix, imessage, local-render, byoa]
|
|
616
617
|
---
|
|
@@ -705,11 +706,63 @@ says to shell out, use the MCP equivalent:
|
|
|
705
706
|
re-submit on a guess (that double-bills). The final-video QC gate (Step 4.3) then sits between
|
|
706
707
|
that master and PINNING it. Call \`get_ad_credits\` first; the user can check \`gooseworks credits\`.
|
|
707
708
|
|
|
709
|
+
## Step 0 — project id, or video BATCH id? (fan out before anything else)
|
|
710
|
+
|
|
711
|
+
The handoff you were pasted is EITHER a single \`project <id>\` OR a \`video batch <id>\`. A batch is
|
|
712
|
+
the app's "N concepts" flow: one composer submission fans out into **N independent concept projects**
|
|
713
|
+
(the user picked a concept count, default 3), and the app expects EACH to be rendered. **Handle both:**
|
|
714
|
+
|
|
715
|
+
- **\`project <id>\`** → you have one project. Treat it as a batch of one and continue to Step 1.
|
|
716
|
+
- **\`video batch <id>\`** → call \`get_ad_video_batch { video_batch_id }\`. It returns every child
|
|
717
|
+
concept under \`projects[]\` — each is a normal project with its own \`id\`, \`variant_index\`
|
|
718
|
+
(Concept 1..N), and its own \`creative_brief\` (the per-concept angle/hook/offer/message). **You
|
|
719
|
+
MUST process every concept, not just the first** — dropping concepts 2..N is the #1 batch bug.
|
|
720
|
+
|
|
721
|
+
**Loop shape (one agent, sequential, ONE approval for the whole batch):**
|
|
722
|
+
1. Run **Step 1 + Step 1.5 + Step 2 + Step 3-assemble** for EACH concept project (each has its own
|
|
723
|
+
\`project_id\`, brief, and \`working/\` folder — never cross-write between concepts).
|
|
724
|
+
2. Mirror EVERY concept's review set (Step 3's \`update_ad_project_script\` per project), then stop
|
|
725
|
+
for **ONE** approval that covers all concepts — show the per-concept credit estimate and the
|
|
726
|
+
batch total. Set the batch to \`review\` (\`update_ad_video_batch { status: "review" }\`).
|
|
727
|
+
3. On approval, set the batch to \`rendering\` and run **Step 4 (the expensive render)** for each
|
|
728
|
+
concept **sequentially** (finish Concept 1's master before starting Concept 2 — one machine can't
|
|
729
|
+
render them in parallel). Deliver each (Step 5). When all concepts are pinned, set the batch to
|
|
730
|
+
\`complete\`.
|
|
731
|
+
|
|
732
|
+
If a single concept fails, keep going with the rest, mark that concept blocked, and report which
|
|
733
|
+
ones shipped — never abort the whole batch on one bad concept. Everything below (Steps 1–5) is
|
|
734
|
+
written per-project; a batch just runs it N times with the shared approval gate above.
|
|
735
|
+
|
|
708
736
|
## Step 1 — resolve the project, source, brand
|
|
709
737
|
|
|
710
|
-
1. \`get_ad_project { project_id }\` → keep \`brand_id\`, \`source_sample_id\`, \`name\`, \`status\`,
|
|
711
|
-
|
|
712
|
-
|
|
738
|
+
1. \`get_ad_project { project_id }\` → keep \`brand_id\`, \`source_sample_id\`, \`name\`, \`status\`, the
|
|
739
|
+
**top-level** \`app_url\` + \`brand_url\` (returned alongside \`project\`, NOT inside it — the links
|
|
740
|
+
you hand the user for the in-app review in Step 3 and delivery in Step 5), AND the user's
|
|
741
|
+
**\`creative_brief\`**, project **\`assets\`**, \`character_id\`, \`default_voice_id\` — these are the
|
|
742
|
+
authoritative inputs the user chose in the composer (see Step 1.5). Do NOT discard them.
|
|
743
|
+
|
|
744
|
+
### Step 1.5 — the project brief is AUTHORITATIVE (honor it; don't re-ask)
|
|
745
|
+
|
|
746
|
+
The composer already collected the user's creative direction onto the project. **Read it and treat
|
|
747
|
+
it as ground truth — it OVERRIDES the template recipe's defaults, and it REPLACES the clarifying
|
|
748
|
+
questions you would otherwise ask.** Only fall back to the recipe default (then, last, to asking)
|
|
749
|
+
for a field the brief leaves empty. Map the fields you WILL honor:
|
|
750
|
+
|
|
751
|
+
- \`creative_brief.productName\` / \`.offer\` / \`.angle\` → the product, offer/code, and angle. Do
|
|
752
|
+
**not** ask "which product / what offer / what angle" if these are set.
|
|
753
|
+
- \`creative_brief.concept\` (on a batch child) → this concept's **\`angle\` / \`hook\` / \`offer\` /
|
|
754
|
+
\`message\` / \`note\`** — the per-concept differentiator. Honor it verbatim; it's WHY the user asked
|
|
755
|
+
for N concepts. \`angle: "auto"\` or empty means "you choose."
|
|
756
|
+
- Project \`assets\` + \`creative_brief.reference_image_urls\` → the user's **own reference images**.
|
|
757
|
+
Use them as the product/brand refs (alongside the brand kit), don't ignore them for generic recipe
|
|
758
|
+
assets.
|
|
759
|
+
- \`character_id\` → the avatar/creator to use. \`default_voice_id\` → the voice for any VO (put its
|
|
760
|
+
NAME in the review \`subtitle\`). Use these instead of picking your own.
|
|
761
|
+
- \`creative_brief.ratio\` / \`.durationSeconds\` → target aspect ratio + length. Honor when the
|
|
762
|
+
format's render pipeline supports it; if the format physically can't (e.g. a fixed phone-mockup
|
|
763
|
+
aspect), keep the format's native value and note the constraint in the review rather than silently
|
|
764
|
+
ignoring the request.
|
|
765
|
+
- \`polish_policy\` (\`standard\` | \`extra\`) → \`extra\` means spend the extra pass on QC/polish.
|
|
713
766
|
2. \`get_ad_template { template_id: source_sample_id }\` → the source video: \`media_url\`,
|
|
714
767
|
\`recipe\`, \`format\` (e.g. "imessage"), \`extracted_script\`, \`how_to\`, \`remix_spec\`.
|
|
715
768
|
3. Brand gate: \`get_brand_kit { brand_id }\`. If \`researchStatus\` is \`complete\`, REUSE it —
|
|
@@ -791,9 +844,10 @@ ingredient here is only a genuinely separate SOURCE clip the format needs (e.g.
|
|
|
791
844
|
the **exact prompt/spec** (and any ref image URLs) in the tile's \`text\` / \`subtitle\` so the
|
|
792
845
|
user reviews what will be spent on. No \`path\` yet — it's generated in Step 4.
|
|
793
846
|
Include the **estimated cost in CREDITS** (never dollars) of the cheap pieces already generated +
|
|
794
|
-
the pending render, so the user approves knowing the total spend.
|
|
795
|
-
|
|
796
|
-
|
|
847
|
+
the pending render, so the user approves knowing the total spend. **Answer clarifying questions
|
|
848
|
+
from the project brief FIRST (Step 1.5)** — only ask the user for a field (angle, which product,
|
|
849
|
+
offer/code) the \`creative_brief\` leaves empty AND the recipe can't default. Do not re-ask for
|
|
850
|
+
anything the composer already captured.
|
|
797
851
|
2. **Mirror the whole ingredient set for review** — \`update_ad_project_script { project_id,
|
|
798
852
|
script_drafts, script }\`. \`script_drafts\` is a structured payload of **container-tagged
|
|
799
853
|
ingredients** so the app renders each piece the right way:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"master-skill.js","sourceRoot":"","sources":["../../src/skills/master-skill.ts"],"names":[],"mappings":";;AA4BA,wCAMC;AAWD,sDA8NC;AAiBD,0DAsUC;AAcD,
|
|
1
|
+
{"version":3,"file":"master-skill.js","sourceRoot":"","sources":["../../src/skills/master-skill.ts"],"names":[],"mappings":";;AA4BA,wCAMC;AAWD,sDA8NC;AAiBD,0DAsUC;AAcD,8DAoaC;AAz/BD,oDAAoD;AACpD,SAAgB,cAAc;IAC5B,OAAO;QACL,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,qBAAqB,EAAE,EAAE;QACxD,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,uBAAuB,EAAE,EAAE;QACzD,EAAE,IAAI,EAAE,aAAa,EAAE,OAAO,EAAE,yBAAyB,EAAE,EAAE;KAC9D,CAAC;AACJ,CAAC;AAED;;;;;;;;GAQG;AACH,SAAgB,qBAAqB;IACnC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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
|
|
5
5
|
GooseWorks video ads — remix a video ad template (iMessage chat-reveal, more coming) into a
|
|
6
6
|
branded video ad for the user's product. Renders LOCALLY on the user's machine (Playwright +
|
|
7
7
|
ffmpeg + GooseWorks media proxies) and saves the finished MP4 back to the project over MCP.
|
|
8
|
-
Use when the user says "make the video for project <id>",
|
|
9
|
-
template, or asks to remix a video ad. Unlike goose-ads (static images,
|
|
10
|
-
video renders locally and reports progress + the result back through the
|
|
8
|
+
Use when the user says "make the video for project <id>", "for video batch <id>", references a
|
|
9
|
+
video ad project/batch or template, or asks to remix a video ad. Unlike goose-ads (static images,
|
|
10
|
+
generated server-side), video renders locally and reports progress + the result back through the
|
|
11
|
+
gooseworks MCP tools.
|
|
11
12
|
category: ads
|
|
12
|
-
version: 0.
|
|
13
|
+
version: 0.3.0
|
|
13
14
|
author: GooseWorks
|
|
14
15
|
tags: [gooseworks, ads, video, remix, imessage, local-render, byoa]
|
|
15
16
|
---
|
|
@@ -104,11 +105,63 @@ says to shell out, use the MCP equivalent:
|
|
|
104
105
|
re-submit on a guess (that double-bills). The final-video QC gate (Step 4.3) then sits between
|
|
105
106
|
that master and PINNING it. Call `get_ad_credits` first; the user can check `gooseworks credits`.
|
|
106
107
|
|
|
108
|
+
## Step 0 — project id, or video BATCH id? (fan out before anything else)
|
|
109
|
+
|
|
110
|
+
The handoff you were pasted is EITHER a single `project <id>` OR a `video batch <id>`. A batch is
|
|
111
|
+
the app's "N concepts" flow: one composer submission fans out into **N independent concept projects**
|
|
112
|
+
(the user picked a concept count, default 3), and the app expects EACH to be rendered. **Handle both:**
|
|
113
|
+
|
|
114
|
+
- **`project <id>`** → you have one project. Treat it as a batch of one and continue to Step 1.
|
|
115
|
+
- **`video batch <id>`** → call `get_ad_video_batch { video_batch_id }`. It returns every child
|
|
116
|
+
concept under `projects[]` — each is a normal project with its own `id`, `variant_index`
|
|
117
|
+
(Concept 1..N), and its own `creative_brief` (the per-concept angle/hook/offer/message). **You
|
|
118
|
+
MUST process every concept, not just the first** — dropping concepts 2..N is the #1 batch bug.
|
|
119
|
+
|
|
120
|
+
**Loop shape (one agent, sequential, ONE approval for the whole batch):**
|
|
121
|
+
1. Run **Step 1 + Step 1.5 + Step 2 + Step 3-assemble** for EACH concept project (each has its own
|
|
122
|
+
`project_id`, brief, and `working/` folder — never cross-write between concepts).
|
|
123
|
+
2. Mirror EVERY concept's review set (Step 3's `update_ad_project_script` per project), then stop
|
|
124
|
+
for **ONE** approval that covers all concepts — show the per-concept credit estimate and the
|
|
125
|
+
batch total. Set the batch to `review` (`update_ad_video_batch { status: "review" }`).
|
|
126
|
+
3. On approval, set the batch to `rendering` and run **Step 4 (the expensive render)** for each
|
|
127
|
+
concept **sequentially** (finish Concept 1's master before starting Concept 2 — one machine can't
|
|
128
|
+
render them in parallel). Deliver each (Step 5). When all concepts are pinned, set the batch to
|
|
129
|
+
`complete`.
|
|
130
|
+
|
|
131
|
+
If a single concept fails, keep going with the rest, mark that concept blocked, and report which
|
|
132
|
+
ones shipped — never abort the whole batch on one bad concept. Everything below (Steps 1–5) is
|
|
133
|
+
written per-project; a batch just runs it N times with the shared approval gate above.
|
|
134
|
+
|
|
107
135
|
## Step 1 — resolve the project, source, brand
|
|
108
136
|
|
|
109
|
-
1. `get_ad_project { project_id }` → keep `brand_id`, `source_sample_id`, `name`, `status`,
|
|
110
|
-
|
|
111
|
-
|
|
137
|
+
1. `get_ad_project { project_id }` → keep `brand_id`, `source_sample_id`, `name`, `status`, the
|
|
138
|
+
**top-level** `app_url` + `brand_url` (returned alongside `project`, NOT inside it — the links
|
|
139
|
+
you hand the user for the in-app review in Step 3 and delivery in Step 5), AND the user's
|
|
140
|
+
**`creative_brief`**, project **`assets`**, `character_id`, `default_voice_id` — these are the
|
|
141
|
+
authoritative inputs the user chose in the composer (see Step 1.5). Do NOT discard them.
|
|
142
|
+
|
|
143
|
+
### Step 1.5 — the project brief is AUTHORITATIVE (honor it; don't re-ask)
|
|
144
|
+
|
|
145
|
+
The composer already collected the user's creative direction onto the project. **Read it and treat
|
|
146
|
+
it as ground truth — it OVERRIDES the template recipe's defaults, and it REPLACES the clarifying
|
|
147
|
+
questions you would otherwise ask.** Only fall back to the recipe default (then, last, to asking)
|
|
148
|
+
for a field the brief leaves empty. Map the fields you WILL honor:
|
|
149
|
+
|
|
150
|
+
- `creative_brief.productName` / `.offer` / `.angle` → the product, offer/code, and angle. Do
|
|
151
|
+
**not** ask "which product / what offer / what angle" if these are set.
|
|
152
|
+
- `creative_brief.concept` (on a batch child) → this concept's **`angle` / `hook` / `offer` /
|
|
153
|
+
`message` / `note`** — the per-concept differentiator. Honor it verbatim; it's WHY the user asked
|
|
154
|
+
for N concepts. `angle: "auto"` or empty means "you choose."
|
|
155
|
+
- Project `assets` + `creative_brief.reference_image_urls` → the user's **own reference images**.
|
|
156
|
+
Use them as the product/brand refs (alongside the brand kit), don't ignore them for generic recipe
|
|
157
|
+
assets.
|
|
158
|
+
- `character_id` → the avatar/creator to use. `default_voice_id` → the voice for any VO (put its
|
|
159
|
+
NAME in the review `subtitle`). Use these instead of picking your own.
|
|
160
|
+
- `creative_brief.ratio` / `.durationSeconds` → target aspect ratio + length. Honor when the
|
|
161
|
+
format's render pipeline supports it; if the format physically can't (e.g. a fixed phone-mockup
|
|
162
|
+
aspect), keep the format's native value and note the constraint in the review rather than silently
|
|
163
|
+
ignoring the request.
|
|
164
|
+
- `polish_policy` (`standard` | `extra`) → `extra` means spend the extra pass on QC/polish.
|
|
112
165
|
2. `get_ad_template { template_id: source_sample_id }` → the source video: `media_url`,
|
|
113
166
|
`recipe`, `format` (e.g. "imessage"), `extracted_script`, `how_to`, `remix_spec`.
|
|
114
167
|
3. Brand gate: `get_brand_kit { brand_id }`. If `researchStatus` is `complete`, REUSE it —
|
|
@@ -190,9 +243,10 @@ ingredient here is only a genuinely separate SOURCE clip the format needs (e.g.
|
|
|
190
243
|
the **exact prompt/spec** (and any ref image URLs) in the tile's `text` / `subtitle` so the
|
|
191
244
|
user reviews what will be spent on. No `path` yet — it's generated in Step 4.
|
|
192
245
|
Include the **estimated cost in CREDITS** (never dollars) of the cheap pieces already generated +
|
|
193
|
-
the pending render, so the user approves knowing the total spend.
|
|
194
|
-
|
|
195
|
-
|
|
246
|
+
the pending render, so the user approves knowing the total spend. **Answer clarifying questions
|
|
247
|
+
from the project brief FIRST (Step 1.5)** — only ask the user for a field (angle, which product,
|
|
248
|
+
offer/code) the `creative_brief` leaves empty AND the recipe can't default. Do not re-ask for
|
|
249
|
+
anything the composer already captured.
|
|
196
250
|
2. **Mirror the whole ingredient set for review** — `update_ad_project_script { project_id,
|
|
197
251
|
script_drafts, script }`. `script_drafts` is a structured payload of **container-tagged
|
|
198
252
|
ingredients** so the app renders each piece the right way:
|