gooseworks 0.3.6 → 0.3.7
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.
|
@@ -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,CA8K9C;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAoOhD;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,CA8K9C;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,uBAAuB,IAAI,MAAM,CAoOhD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,yBAAyB,IAAI,MAAM,CAiPlD"}
|
|
@@ -496,9 +496,24 @@ id). The app NEVER runs you — it is the viewer + review surface; you are the r
|
|
|
496
496
|
(the render-file route) from the org's DEFAULT agent, but MCP file writes default to your
|
|
497
497
|
token's pinned agent — which can be a DIFFERENT agent, so a render written with the default
|
|
498
498
|
scope is **invisible in the app**. First resolve the Ads agent: \`list_accessible_scopes\` → the
|
|
499
|
-
scope with \`is_org_default: true\`
|
|
500
|
-
|
|
501
|
-
|
|
499
|
+
scope with \`is_org_default: true\` (the ORG default — NOT the \`is_default\` / \`default_agent_id\`
|
|
500
|
+
fields, which are the *user's* default agent and are often a DIFFERENT agent). Its \`agent_id\` is
|
|
501
|
+
\`ADS_AGENT\` (name "Ads agent", slug \`org-default\`; usually also the \`agent_id\` in
|
|
502
|
+
credentials.json). Then pass \`target: { type: "agent", agent_id: ADS_AGENT }\` on EVERY
|
|
503
|
+
\`get_upload_url\` / \`get_download_url\` / \`write_file\` / \`list_directory\` / \`read_file\` — NEVER
|
|
504
|
+
omit \`target\`.
|
|
505
|
+
- **CRITICAL — publish under the PROJECT FOLDER, not the workspace root (the #1 "video renders but
|
|
506
|
+
is invisible" bug).** \`get_upload_url\` stores at \`<ADS_AGENT>/files/<path>\` verbatim, but the
|
|
507
|
+
render-file route reads from
|
|
508
|
+
\`<ADS_AGENT>/files/agent-config/brands/<brand_slug>/projects/<project_id>/<path>\`
|
|
509
|
+
(see backend \`resolveProjectFileKey\`). So EVERY publish/preview \`path\` MUST be prefixed with
|
|
510
|
+
\`agent-config/brands/<brand_slug>/projects/<project_id>/\` — e.g. upload to
|
|
511
|
+
\`agent-config/brands/<brand_slug>/projects/<project_id>/working/final.mp4\`, NEVER bare
|
|
512
|
+
\`working/final.mp4\`. A bare path 404s in the app even though the render row AND a bare-path
|
|
513
|
+
\`get_download_url\` both "succeed" (they resolve the wrong key). The render \`output_url\` still
|
|
514
|
+
stays the project-relative \`...render-file?path=working/final.mp4\` — the route re-prepends the
|
|
515
|
+
prefix itself. Always verify with \`get_download_url\` on the FULL \`agent-config/...\` path (must
|
|
516
|
+
be non-empty; curl it for HTTP 200) BEFORE marking the render complete.
|
|
502
517
|
- Media generation (FAL / ElevenLabs) is billed to the agent through the GooseWorks proxies.
|
|
503
518
|
\`submit_render { kind: "full" }\` debits **1 ad credit at row creation** — so sequence it LAST
|
|
504
519
|
(render + verify a good MP4 first), and never re-submit on a guess (that double-bills). Call
|
|
@@ -515,14 +530,21 @@ id). The app NEVER runs you — it is the viewer + review surface; you are the r
|
|
|
515
530
|
|
|
516
531
|
## Step 2 — fetch the recipe + its pack skills for the format
|
|
517
532
|
|
|
518
|
-
The video-ad format skills live in
|
|
519
|
-
|
|
533
|
+
The video-ad format skills live in two goose-skills packs — **\`video-ad-formats\`** (phone-surface
|
|
534
|
+
HTML-mockup renders) and **\`ugc-video-formats\`** (GPT-image-2 + Seedance 2.0 reference-to-video).
|
|
535
|
+
Map the project's \`format\` to its recipe slug:
|
|
520
536
|
|
|
521
537
|
| format | recipe slug | renderer + atoms it drives |
|
|
522
538
|
| --- | --- | --- |
|
|
523
539
|
| \`imessage\` | \`remix-imessage-ad-from-sample\` | create-imessage-video-ad, create-imessage-mockup, stitch-videos-ffmpeg, mix-master, watch |
|
|
524
540
|
| \`chatgpt\` | \`remix-chatgpt-ad-from-sample\` | create-chatgpt-video-ad, create-chatgpt-mockup, render-ios-keyboard, stitch-videos-ffmpeg, watch |
|
|
525
541
|
| \`apple-notes\` | \`remix-apple-notes-ad-from-sample\` | create-apple-notes-video-ad, create-apple-notes-mockup, stitch-videos-ffmpeg, watch |
|
|
542
|
+
| \`ugc-product\` | \`remix-ugc-product-from-sample\` | create-ugc-product-video-from-refs, create-video-seedance-2-fal, create-image-gpt-image-fal, watch |
|
|
543
|
+
| \`ugc-grwm\` | \`remix-ugc-grwm-from-sample\` | create-ugc-grwm-video-from-refs, create-video-seedance-2-fal, create-image-gpt-image-fal, watch |
|
|
544
|
+
| \`ugc-skincare\` | \`remix-ugc-skincare-from-sample\` | create-ugc-skincare-demo-video-from-refs, create-video-seedance-2-fal, create-image-gpt-image-fal, watch |
|
|
545
|
+
| \`ugc-car-confessional\` | \`remix-ugc-car-confessional-from-sample\` | create-ugc-car-confessional-video-from-refs, create-video-seedance-2-fal, create-image-gpt-image-fal, watch |
|
|
546
|
+
| \`ugc-walk-and-talk\` | \`remix-ugc-walk-and-talk-from-sample\` | create-ugc-walk-and-talk-video-from-refs, create-video-seedance-2-fal, create-image-gpt-image-fal, watch |
|
|
547
|
+
| \`ugc-street-testimonial\` | \`remix-ugc-street-testimonial-from-sample\` | create-ugc-street-testimonial-video-from-refs, create-video-seedance-2-fal, create-image-gpt-image-fal, watch |
|
|
526
548
|
|
|
527
549
|
(photo-grid + music-video coming.) Pack skills are fetchable individually by slug but do NOT
|
|
528
550
|
auto-resolve dependencies (no \`dependencySkills\`), so \`gooseworks fetch\` the recipe **and** each
|
|
@@ -549,7 +571,10 @@ ingredients out one at a time.
|
|
|
549
571
|
that's typically: the **script** (the bubble thread), the **image(s)** shown in the conversation
|
|
550
572
|
(one or more), and the **end card**. Richer templates add more (hook frame, background, product
|
|
551
573
|
shots, music bed…). Read the recipe for the exact ingredient list. Generate the visuals NOW
|
|
552
|
-
(media proxies / recipe), and \`get_upload_url\` each preview asset to
|
|
574
|
+
(media proxies / recipe), and \`get_upload_url\` each preview asset to the project folder
|
|
575
|
+
\`agent-config/brands/<brand_slug>/projects/<project_id>/working/review/<name>\` (the same
|
|
576
|
+
path-prefix rule as final publish — a bare \`working/review/<name>\` won't render in the panel).
|
|
577
|
+
In \`script_drafts\`, set each ingredient's \`path\` to the project-relative \`working/review/<name>\`.
|
|
553
578
|
You may ask the user a couple of clarifying questions about the generation first if the recipe
|
|
554
579
|
calls for it (angle, which product, offer/code) — batch them, then prepare everything.
|
|
555
580
|
2. **Mirror the whole ingredient set for review** — \`update_ad_project_script { project_id,
|
|
@@ -581,11 +606,18 @@ ingredients out one at a time.
|
|
|
581
606
|
\`append_project_message\` instead.
|
|
582
607
|
3. QC by watching: run the \`watch\` skill on the master — verify bubble/beat order + SFX, that
|
|
583
608
|
the brand's product (not the source's) is shown, the end card has the real wordmark + code,
|
|
584
|
-
and the duration is within ~20% of the source.
|
|
609
|
+
and the duration is within ~20% of the source. For UGC/Seedance formats there are no captions
|
|
610
|
+
and often no local Whisper key: extract frames with ffmpeg for the visual pass, and get the
|
|
611
|
+
spoken transcript by running \`fal-ai/whisper\` through the SAME \`fal-proxy\` (upload the audio,
|
|
612
|
+
pass its \`get_download_url\` as \`audio_url\`) — confirm the transcript matches the script and the
|
|
613
|
+
brand name is pronounced right, with no word-repeat dysfluency, BEFORE spending the render credit.
|
|
585
614
|
4. Publish: \`get_upload_url { target: { type: "agent", agent_id: ADS_AGENT } }\` → PUT the master
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
615
|
+
and poster **under the project folder** (see Identity's path-prefix rule) — to
|
|
616
|
+
\`agent-config/brands/<brand_slug>/projects/<project_id>/working/final.mp4\` and
|
|
617
|
+
\`.../working/final-thumb.jpg\`. **Always target ADS_AGENT AND use the full project-folder path**
|
|
618
|
+
— a bare \`working/final.mp4\`, even on the right agent, 404s in the app. Verify servable:
|
|
619
|
+
\`get_download_url { target: ADS_AGENT, path: "agent-config/brands/<brand_slug>/projects/<project_id>/working/final.mp4" }\`
|
|
620
|
+
must return a non-empty URL (curl it for HTTP 200).
|
|
589
621
|
Then \`update_render_status { render_id, status: "complete", output_url, thumbnail_url }\` where
|
|
590
622
|
**output_url MUST be the durable render-file URL**
|
|
591
623
|
\`/api/ads/projects/<project_id>/render-file?path=working/final.mp4\` (the app re-presigns it on
|
|
@@ -643,7 +675,9 @@ def fal_generate(model_path, payload, timeout_s=180, poll_s=3):
|
|
|
643
675
|
|
|
644
676
|
ElevenLabs (VO / music) is the same shape against \`<api_base>/api/internal/elevenlabs-proxy\`
|
|
645
677
|
with \`?token=&agent_id=\`. Feed FAL a local image by storing it (\`get_upload_url\`) and passing its
|
|
646
|
-
\`get_download_url\` presigned URL as an \`image_urls\` entry
|
|
678
|
+
\`get_download_url\` presigned URL as an \`image_urls\` / \`audio_url\` entry — this is the reliable
|
|
679
|
+
path. (\`fal-storage-proxy\` may 404 depending on the install; don't block on it — prefer the
|
|
680
|
+
\`get_download_url\` presigned URL.)
|
|
647
681
|
|
|
648
682
|
## Rules
|
|
649
683
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"master-skill.js","sourceRoot":"","sources":["../../src/skills/master-skill.ts"],"names":[],"mappings":";;AA4BA,wCAMC;AAWD,sDA8KC;AAiBD,0DAoOC;AAcD,
|
|
1
|
+
{"version":3,"file":"master-skill.js","sourceRoot":"","sources":["../../src/skills/master-skill.ts"],"names":[],"mappings":";;AA4BA,wCAMC;AAWD,sDA8KC;AAiBD,0DAoOC;AAcD,8DAiPC;AAprBD,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4KR,CAAC;AACF,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,SAAgB,uBAAuB;IACrC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkOR,CAAC;AACF,CAAC;AAED;;;;;;;;;;;GAWG;AACH,SAAgB,yBAAyB;IACvC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+OR,CAAC;AACF,CAAC"}
|