gooseworks 0.3.12 → 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.
@@ -6,6 +6,13 @@ interface OAuthResult {
6
6
  default_agent_id?: string;
7
7
  mcp_server_url?: string;
8
8
  }
9
- export declare function runOAuthFlow(apiBase: string): Promise<OAuthResult>;
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,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,CA6HxE"}
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
- async function runOAuthFlow(apiBase) {
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
- const authUrl = `${frontendBase}/cli/auth?callback_port=${port}&state=${state}&api_base=${encodeURIComponent(apiBase)}`;
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":"","s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K,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;AAuBpC,wBAAgB,oBAAoB,IAAI,OAAO,CAoK9C;AAED,eAAO,MAAM,cAAc,SAAyB,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"}
@@ -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...');
@@ -182,23 +183,13 @@ Examples:
182
183
  }
183
184
  }
184
185
  const agentNames = targetAgents.map((a) => a === 'claude' ? 'Claude Code' : a === 'codex' ? 'Codex' : 'Cursor').join(' and ');
185
- logger.done(`Setup complete! Open ${agentNames} and try one of these:`);
186
- logger.info('Data & GTM:');
187
- logger.example('/gooseworks find people who know <linkedin-profile-url>');
188
- logger.example('/gooseworks find leads similar to <linkedin-company-url>');
189
- logger.example('/gooseworks research <company name>');
190
- // goose-ads is a vendored entry skill — always installed, so always shown.
186
+ logger.done(`Setup complete! Open ${agentNames} and pick one to get started:`);
191
187
  console.log('');
192
- logger.info('Ads (create, edit & analyze):');
193
- logger.example('/goose-ads remix template <id-or-url> for <your-product>');
194
- logger.example('/goose-ads make an ad for <your-product>');
195
- logger.example('/goose-ads why is my Meta campaign underperforming?');
196
- // Graphics is a standalone skill — only suggest it if it was installed.
197
- if ((opts.with || []).includes('goose-graphics')) {
198
- console.log('');
199
- logger.info('Graphics:');
200
- logger.example('/goose-graphics make a chart from <data>');
201
- }
188
+ logger.info('New here? Get set up in 30 seconds:');
189
+ logger.example('/gooseworks onboard me');
190
+ console.log('');
191
+ logger.info('Or jump straight into making an ad:');
192
+ logger.example('/goose-ads make an ad for <your brand>');
202
193
  console.log('');
203
194
  });
204
195
  }
@@ -1 +1 @@
1
- {"version":3,"file":"install.js","sourceRoot":"","sources":["../../src/commands/install.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAuBA,oDAoKC;AA3LD,yCAAoC;AACpC,mCAAyC;AACzC,mDAAyG;AACzG,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AC;IACxC,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,SAAS,gBAAgB,CAAC,KAAa,EAAE,QAAkB;IACzD,OAAO,CAAC,GAAG,QAAQ,EAAE,KAAK,CAAC,CAAC;AAC9B,CAAC"}
@@ -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;AA2CpC,eAAO,MAAM,YAAY,SAuBrB,CAAC;AAEL;;;GAGG;AACH,wBAAsB,cAAc,CAAC,OAAO,GAAE,MAAiB,sDAW9D"}
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"}
@@ -32,10 +32,14 @@ var __importStar = (this && this.__importStar) || (function () {
32
32
  return result;
33
33
  };
34
34
  })();
35
+ var __importDefault = (this && this.__importDefault) || function (mod) {
36
+ return (mod && mod.__esModule) ? mod : { "default": mod };
37
+ };
35
38
  Object.defineProperty(exports, "__esModule", { value: true });
36
39
  exports.loginCommand = void 0;
37
40
  exports.ensureLoggedIn = ensureLoggedIn;
38
41
  const commander_1 = require("commander");
42
+ const open_1 = __importDefault(require("open"));
39
43
  const credentials_1 = require("../auth/credentials");
40
44
  const oauth_server_1 = require("../auth/oauth-server");
41
45
  const installer_1 = require("../skills/installer");
@@ -78,9 +82,27 @@ function syncMcpRegistration() {
78
82
  logger.info(`Synced the gooseworks MCP → ${creds?.mcp_server_url ?? 'the configured server'}`);
79
83
  }
80
84
  }
85
+ /**
86
+ * After a FRESH login, open the onboarding page so the user lands on a "get
87
+ * started" experience and is nudged to run `/gooseworks onboard me` (GOOSE-2596).
88
+ * The `?onboard=true` param is analytics-only today. Only fires on a genuine new
89
+ * login — never when reusing existing creds — so the browser opens at most once.
90
+ * Best-effort: a headless / CI box that can't open a browser just prints the URL.
91
+ */
92
+ function openOnboarding() {
93
+ const url = `${config_1.HUB_URL}/?onboard=true`;
94
+ (0, open_1.default)(url).catch(() => logger.info(`Get started: ${url}`));
95
+ }
96
+ /** Two focused next-steps after auth: onboard, or jump straight into an ad. */
97
+ function showNextSteps() {
98
+ logger.info('Open Claude/Codex and pick one to get started:');
99
+ logger.info(' • New here? Get set up: /gooseworks onboard me');
100
+ logger.info(' • Or make an ad now: /goose-ads make an ad for <your brand>');
101
+ }
81
102
  exports.loginCommand = new commander_1.Command('login')
82
103
  .description('Sign in to GooseWorks with Google')
83
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')
84
106
  .action(async (opts) => {
85
107
  const existing = (0, credentials_1.getCredentials)();
86
108
  if (existing) {
@@ -91,10 +113,12 @@ exports.loginCommand = new commander_1.Command('login')
91
113
  return;
92
114
  }
93
115
  try {
94
- const result = await (0, oauth_server_1.runOAuthFlow)(opts.apiBase);
116
+ const result = await (0, oauth_server_1.runOAuthFlow)(opts.apiBase, opts.ref);
95
117
  logger.success(`Logged in as ${result.email}`);
96
118
  refreshEntrySkillsOnLogin();
97
119
  syncMcpRegistration();
120
+ openOnboarding();
121
+ showNextSteps();
98
122
  }
99
123
  catch (err) {
100
124
  const message = err instanceof Error ? err.message : 'Login failed';
@@ -106,16 +130,19 @@ exports.loginCommand = new commander_1.Command('login')
106
130
  * Ensures the user is logged in, running OAuth if needed.
107
131
  * Returns credentials or exits the process.
108
132
  */
109
- async function ensureLoggedIn(apiBase = config_1.API_BASE) {
133
+ async function ensureLoggedIn(apiBase = config_1.API_BASE, creatorRef) {
110
134
  const existing = (0, credentials_1.getCredentials)();
111
135
  if (existing)
112
136
  return existing;
113
- const result = await (0, oauth_server_1.runOAuthFlow)(apiBase);
137
+ const result = await (0, oauth_server_1.runOAuthFlow)(apiBase, creatorRef);
114
138
  const creds = (0, credentials_1.getCredentials)();
115
139
  if (!creds) {
116
140
  logger.error('Failed to save credentials after login');
117
141
  process.exit(1);
118
142
  }
143
+ // Fresh login via an install/other command path — nudge onboarding too, so
144
+ // `gooseworks install --all` on a logged-out machine also opens the page.
145
+ openOnboarding();
119
146
  return creds;
120
147
  }
121
148
  //# sourceMappingURL=login.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"login.js","sourceRoot":"","sources":["../../src/commands/login.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwEA,wCAWC;AAnFD,yCAAoC;AACpC,qDAAqD;AACrD,uDAAoD;AACpD,mDAAoF;AACpF,yDAAwD;AACxD,6CAAmD;AACnD,qDAA0D;AAC1D,6CAAoD;AACpD,wDAA0C;AAC1C,sCAAqC;AAErC;;;;;;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,KAA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,CAAC;QACvD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IACD,2EAA2E;IAC3E,0EAA0E;IAC1E,cAAc,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,CA0L9C;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAsUhD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,yBAAyB,IAAI,MAAM,CA8WlD"}
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"}
@@ -78,6 +78,42 @@ To check credit balance:
78
78
  gooseworks credits
79
79
  \`\`\`
80
80
 
81
+ ## User Context (onboarding)
82
+
83
+ You have two MCP tools for the user's onboarding CONTEXT — who they are and what they want GooseWorks for. It's stored server-side (org-scoped), separate from the ads brand kit.
84
+
85
+ - \`get_user_context\` — read it. **At the START of a session, call this once** and use what you learn (company, role, the use-cases they picked, their goals, freeform notes) to tailor which skills/APIs you reach for. Best-effort: if the \`mcp__gooseworks__*\` tools aren't connected, skip silently and carry on.
86
+ - \`update_user_context\` — save it (partial update; only the fields you pass are touched).
87
+
88
+ ### Running "onboard me" (or a first run with empty context)
89
+
90
+ If the user says "onboard me" — or \`get_user_context\` returns \`onboarded: false\` and they're starting fresh — run a short, friendly interview, then save the answers. Open with this framing:
91
+
92
+ > Gooseworks gives your AI agent access to skills and APIs for growth and marketing work. For example: making ad creatives, finding influencers, scraping social profiles and posts from X/LinkedIn, scraping ads from Meta/LinkedIn, scraping reddit, and finding leads to target and their emails — and much more. Visit skills.gooseworks.ai to see the full library of skills.
93
+
94
+ Then ask (a few at a time is fine — don't interrogate):
95
+ 1. **What's your company's website?** → \`company_website\`
96
+ 2. **What's your role?** → \`role\`
97
+ 3. **What are you hoping to use Goose skills for?** (multi-select — pick any): generate ad creatives · research and run ads end-to-end · finding influencers · data scraping (social / ads / reddit) · finding leads & emails · something else → \`use_cases\` (array)
98
+ 4. **What high-priority growth / marketing tasks would you like help with right now?** The more context they share, the better you can help. → \`goals\`
99
+
100
+ **Save** with \`update_user_context { company_website, role, use_cases, goals, context_md }\` — put any extra detail you learned into \`context_md\` as a short summary.
101
+
102
+ **Then recommend REAL next steps — grounded, not from memory. This is the WHOLE POINT of onboarding; do not skip it or wing a generic playbook:**
103
+ 1. **Route each answer to the RIGHT tool first — don't blindly search one catalog. Match their use-cases to domains (same routing as "Route to the right skill FIRST" above):**
104
+ - **Make / edit / analyze ADS** (generate ad creatives, research & run ads) → the **\`goose-ads\`** skill (brand research + template remix). Do NOT \`gooseworks search\` for these — ad creation is NOT in the data catalog.
105
+ - **VIDEO ads** → **\`goose-video\`**. **Charts / slides / graphics** → **\`goose-graphics\`**.
106
+ - **GTM / DATA** (finding leads & emails, influencers, scraping social / ads / reddit, enrichment, competitor intel) → run \`gooseworks search "<that task>"\` (free) and recommend the REAL skill slugs it returns.
107
+ Recommend specific, real things BY NAME — never a from-memory playbook, never a skill you assume exists; if a GTM search returns nothing relevant, say so.
108
+ 2. **Ground it in THEIR business.** If they gave a company website, read it with your web tools to infer their actual product + ICP, so suggestions are about their company — not a template. (For ad work, prefer \`goose-ads\`'s own brand research over a raw read.)
109
+ 3. **Be honest about cost.** Data / lead / enrichment / ad-generation skills bill GooseWorks credits — say so, and estimate before running anything (\`gooseworks credits\` to check balance).
110
+ 4. **Offer to start ONE concrete play** built from the ROUTED skill (\`goose-ads\` for ads, a real searched skill for GTM) and ask for the one or two inputs it needs.
111
+
112
+ A suggestion is only "grounded" if it came from routing to the right domain skill (\`goose-ads\` / \`goose-video\` / \`goose-graphics\`) or from \`gooseworks search\` (a real GTM skill) — plus, ideally, reading their site. Do that BEFORE you suggest; never present a from-memory capability list as if you'd checked.
113
+
114
+ ### Update as needed
115
+ Whenever the user reveals durable context mid-session (their company, role, what they're trying to accomplish), persist it with \`update_user_context\` so future sessions start smarter.
116
+
81
117
  ## How to Use
82
118
 
83
119
  ### If a specific skill is requested (e.g. --skill <slug> or "use the <name> skill")
@@ -570,11 +606,12 @@ description: >
570
606
  GooseWorks video ads — remix a video ad template (iMessage chat-reveal, more coming) into a
571
607
  branded video ad for the user's product. Renders LOCALLY on the user's machine (Playwright +
572
608
  ffmpeg + GooseWorks media proxies) and saves the finished MP4 back to the project over MCP.
573
- Use when the user says "make the video for project <id>", references a video ad project or
574
- template, or asks to remix a video ad. Unlike goose-ads (static images, generated server-side),
575
- video renders locally and reports progress + the result back through the gooseworks MCP tools.
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.
576
613
  category: ads
577
- version: 0.2.0
614
+ version: 0.3.0
578
615
  author: GooseWorks
579
616
  tags: [gooseworks, ads, video, remix, imessage, local-render, byoa]
580
617
  ---
@@ -669,11 +706,63 @@ says to shell out, use the MCP equivalent:
669
706
  re-submit on a guess (that double-bills). The final-video QC gate (Step 4.3) then sits between
670
707
  that master and PINNING it. Call \`get_ad_credits\` first; the user can check \`gooseworks credits\`.
671
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
+
672
736
  ## Step 1 — resolve the project, source, brand
673
737
 
674
- 1. \`get_ad_project { project_id }\` → keep \`brand_id\`, \`source_sample_id\`, \`name\`, \`status\`, and
675
- the **top-level** \`app_url\` + \`brand_url\` (returned alongside \`project\`, NOT inside it)these
676
- are the links you hand the user for the in-app review (Step 3) and the final delivery (Step 5).
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.
677
766
  2. \`get_ad_template { template_id: source_sample_id }\` → the source video: \`media_url\`,
678
767
  \`recipe\`, \`format\` (e.g. "imessage"), \`extracted_script\`, \`how_to\`, \`remix_spec\`.
679
768
  3. Brand gate: \`get_brand_kit { brand_id }\`. If \`researchStatus\` is \`complete\`, REUSE it —
@@ -755,9 +844,10 @@ ingredient here is only a genuinely separate SOURCE clip the format needs (e.g.
755
844
  the **exact prompt/spec** (and any ref image URLs) in the tile's \`text\` / \`subtitle\` so the
756
845
  user reviews what will be spent on. No \`path\` yet — it's generated in Step 4.
757
846
  Include the **estimated cost in CREDITS** (never dollars) of the cheap pieces already generated +
758
- the pending render, so the user approves knowing the total spend. You may batch a couple of
759
- clarifying questions first if the recipe calls for it (angle, which product, offer/code), then
760
- assemble everything.
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.
761
851
  2. **Mirror the whole ingredient set for review** — \`update_ad_project_script { project_id,
762
852
  script_drafts, script }\`. \`script_drafts\` is a structured payload of **container-tagged
763
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,sDA0LC;AAiBD,0DAsUC;AAcD,8DA8WC;AA/5BD,oDAAoD;AACpD,SAAgB,cAAc;IAC5B,OAAO;QACL,EAAE,IAAI,EAAE,YAAY,EAAE,OAAO,EAAE,qBAAqB,EAAE,EAAE;QACxD,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoUR,CAAC;AACF,CAAC;AAED;;;;;;;;;;;GAWG;AACH,SAAgB,yBAAyB;IACvC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkaR,CAAC;AACF,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gooseworks",
3
- "version": "0.3.12",
3
+ "version": "0.3.14",
4
4
  "description": "GooseWorks CLI — give your coding agent real data tools",
5
5
  "bin": {
6
6
  "gooseworks": "./dist/index.js"
@@ -5,11 +5,12 @@ description: >
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>", references a video ad project or
9
- template, or asks to remix a video ad. Unlike goose-ads (static images, generated server-side),
10
- video renders locally and reports progress + the result back through the gooseworks MCP tools.
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.2.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`, and
110
- the **top-level** `app_url` + `brand_url` (returned alongside `project`, NOT inside it)these
111
- are the links you hand the user for the in-app review (Step 3) and the final delivery (Step 5).
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. You may batch a couple of
194
- clarifying questions first if the recipe calls for it (angle, which product, offer/code), then
195
- assemble everything.
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:
@@ -54,6 +54,42 @@ To check credit balance:
54
54
  gooseworks credits
55
55
  ```
56
56
 
57
+ ## User Context (onboarding)
58
+
59
+ You have two MCP tools for the user's onboarding CONTEXT — who they are and what they want GooseWorks for. It's stored server-side (org-scoped), separate from the ads brand kit.
60
+
61
+ - `get_user_context` — read it. **At the START of a session, call this once** and use what you learn (company, role, the use-cases they picked, their goals, freeform notes) to tailor which skills/APIs you reach for. Best-effort: if the `mcp__gooseworks__*` tools aren't connected, skip silently and carry on.
62
+ - `update_user_context` — save it (partial update; only the fields you pass are touched).
63
+
64
+ ### Running "onboard me" (or a first run with empty context)
65
+
66
+ If the user says "onboard me" — or `get_user_context` returns `onboarded: false` and they're starting fresh — run a short, friendly interview, then save the answers. Open with this framing:
67
+
68
+ > Gooseworks gives your AI agent access to skills and APIs for growth and marketing work. For example: making ad creatives, finding influencers, scraping social profiles and posts from X/LinkedIn, scraping ads from Meta/LinkedIn, scraping reddit, and finding leads to target and their emails — and much more. Visit skills.gooseworks.ai to see the full library of skills.
69
+
70
+ Then ask (a few at a time is fine — don't interrogate):
71
+ 1. **What's your company's website?** → `company_website`
72
+ 2. **What's your role?** → `role`
73
+ 3. **What are you hoping to use Goose skills for?** (multi-select — pick any): generate ad creatives · research and run ads end-to-end · finding influencers · data scraping (social / ads / reddit) · finding leads & emails · something else → `use_cases` (array)
74
+ 4. **What high-priority growth / marketing tasks would you like help with right now?** The more context they share, the better you can help. → `goals`
75
+
76
+ **Save** with `update_user_context { company_website, role, use_cases, goals, context_md }` — put any extra detail you learned into `context_md` as a short summary.
77
+
78
+ **Then recommend REAL next steps — grounded, not from memory. This is the WHOLE POINT of onboarding; do not skip it or wing a generic playbook:**
79
+ 1. **Route each answer to the RIGHT tool first — don't blindly search one catalog. Match their use-cases to domains (same routing as "Route to the right skill FIRST" above):**
80
+ - **Make / edit / analyze ADS** (generate ad creatives, research & run ads) → the **`goose-ads`** skill (brand research + template remix). Do NOT `gooseworks search` for these — ad creation is NOT in the data catalog.
81
+ - **VIDEO ads** → **`goose-video`**. **Charts / slides / graphics** → **`goose-graphics`**.
82
+ - **GTM / DATA** (finding leads & emails, influencers, scraping social / ads / reddit, enrichment, competitor intel) → run `gooseworks search "<that task>"` (free) and recommend the REAL skill slugs it returns.
83
+ Recommend specific, real things BY NAME — never a from-memory playbook, never a skill you assume exists; if a GTM search returns nothing relevant, say so.
84
+ 2. **Ground it in THEIR business.** If they gave a company website, read it with your web tools to infer their actual product + ICP, so suggestions are about their company — not a template. (For ad work, prefer `goose-ads`'s own brand research over a raw read.)
85
+ 3. **Be honest about cost.** Data / lead / enrichment / ad-generation skills bill GooseWorks credits — say so, and estimate before running anything (`gooseworks credits` to check balance).
86
+ 4. **Offer to start ONE concrete play** built from the ROUTED skill (`goose-ads` for ads, a real searched skill for GTM) and ask for the one or two inputs it needs.
87
+
88
+ A suggestion is only "grounded" if it came from routing to the right domain skill (`goose-ads` / `goose-video` / `goose-graphics`) or from `gooseworks search` (a real GTM skill) — plus, ideally, reading their site. Do that BEFORE you suggest; never present a from-memory capability list as if you'd checked.
89
+
90
+ ### Update as needed
91
+ Whenever the user reveals durable context mid-session (their company, role, what they're trying to accomplish), persist it with `update_user_context` so future sessions start smarter.
92
+
57
93
  ## How to Use
58
94
 
59
95
  ### If a specific skill is requested (e.g. --skill <slug> or "use the <name> skill")