gooseworks 0.4.4 → 0.4.5-dev.15.facf60fb

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.
Files changed (120) hide show
  1. package/README.md +42 -11
  2. package/dist/agents/staging.d.ts +38 -0
  3. package/dist/agents/staging.d.ts.map +1 -0
  4. package/dist/agents/staging.js +309 -0
  5. package/dist/agents/staging.js.map +1 -0
  6. package/dist/auth/credentials.d.ts +1 -0
  7. package/dist/auth/credentials.d.ts.map +1 -1
  8. package/dist/auth/credentials.js +26 -8
  9. package/dist/auth/credentials.js.map +1 -1
  10. package/dist/auth/device-flow.d.ts +79 -0
  11. package/dist/auth/device-flow.d.ts.map +1 -0
  12. package/dist/auth/device-flow.js +411 -0
  13. package/dist/auth/device-flow.js.map +1 -0
  14. package/dist/auth/login-mode.d.ts +25 -0
  15. package/dist/auth/login-mode.d.ts.map +1 -0
  16. package/dist/auth/login-mode.js +87 -0
  17. package/dist/auth/login-mode.js.map +1 -0
  18. package/dist/auth/oauth-server.d.ts +2 -2
  19. package/dist/auth/oauth-server.d.ts.map +1 -1
  20. package/dist/auth/oauth-server.js +28 -5
  21. package/dist/auth/oauth-server.js.map +1 -1
  22. package/dist/auth/paste-login.d.ts +27 -0
  23. package/dist/auth/paste-login.d.ts.map +1 -0
  24. package/dist/auth/paste-login.js +203 -0
  25. package/dist/auth/paste-login.js.map +1 -0
  26. package/dist/commands/doctor.d.ts.map +1 -1
  27. package/dist/commands/doctor.js +17 -8
  28. package/dist/commands/doctor.js.map +1 -1
  29. package/dist/commands/formats.js +2 -2
  30. package/dist/commands/formats.js.map +1 -1
  31. package/dist/commands/graphics/publish-flow.js +1 -1
  32. package/dist/commands/graphics/publish-flow.js.map +1 -1
  33. package/dist/commands/install.d.ts.map +1 -1
  34. package/dist/commands/install.js +101 -34
  35. package/dist/commands/install.js.map +1 -1
  36. package/dist/commands/launch.d.ts +3 -0
  37. package/dist/commands/launch.d.ts.map +1 -0
  38. package/dist/commands/launch.js +35 -0
  39. package/dist/commands/launch.js.map +1 -0
  40. package/dist/commands/login.d.ts +21 -1
  41. package/dist/commands/login.d.ts.map +1 -1
  42. package/dist/commands/login.js +106 -29
  43. package/dist/commands/login.js.map +1 -1
  44. package/dist/commands/logout.d.ts.map +1 -1
  45. package/dist/commands/logout.js +7 -1
  46. package/dist/commands/logout.js.map +1 -1
  47. package/dist/commands/skills.d.ts +16 -0
  48. package/dist/commands/skills.d.ts.map +1 -1
  49. package/dist/commands/skills.js +52 -1
  50. package/dist/commands/skills.js.map +1 -1
  51. package/dist/commands/styles.js +2 -2
  52. package/dist/commands/styles.js.map +1 -1
  53. package/dist/commands/tool.d.ts +17 -0
  54. package/dist/commands/tool.d.ts.map +1 -0
  55. package/dist/commands/tool.js +239 -0
  56. package/dist/commands/tool.js.map +1 -0
  57. package/dist/commands/update.d.ts.map +1 -1
  58. package/dist/commands/update.js +20 -0
  59. package/dist/commands/update.js.map +1 -1
  60. package/dist/commands/video-local.d.ts.map +1 -1
  61. package/dist/commands/video-local.js +2 -2
  62. package/dist/commands/video-local.js.map +1 -1
  63. package/dist/config.d.ts.map +1 -1
  64. package/dist/config.js +14 -3
  65. package/dist/config.js.map +1 -1
  66. package/dist/environment.d.ts +9 -0
  67. package/dist/environment.d.ts.map +1 -0
  68. package/dist/environment.js +105 -0
  69. package/dist/environment.js.map +1 -0
  70. package/dist/index.js +12 -45
  71. package/dist/index.js.map +1 -1
  72. package/dist/lib/graphics-cache.d.ts.map +1 -1
  73. package/dist/lib/graphics-cache.js +2 -2
  74. package/dist/lib/graphics-cache.js.map +1 -1
  75. package/dist/lib/mcp-client.d.ts +53 -0
  76. package/dist/lib/mcp-client.d.ts.map +1 -0
  77. package/dist/lib/mcp-client.js +196 -0
  78. package/dist/lib/mcp-client.js.map +1 -0
  79. package/dist/program.d.ts +2 -0
  80. package/dist/program.d.ts.map +1 -0
  81. package/dist/program.js +56 -0
  82. package/dist/program.js.map +1 -0
  83. package/dist/skills/custom-video-skill.d.ts +1 -1
  84. package/dist/skills/custom-video-skill.d.ts.map +1 -1
  85. package/dist/skills/custom-video-skill.js +1 -1
  86. package/dist/skills/custom-video-skill.js.map +1 -1
  87. package/dist/skills/installer.d.ts.map +1 -1
  88. package/dist/skills/installer.js +42 -24
  89. package/dist/skills/installer.js.map +1 -1
  90. package/dist/skills/master-skill.d.ts +12 -9
  91. package/dist/skills/master-skill.d.ts.map +1 -1
  92. package/dist/skills/master-skill.js +857 -372
  93. package/dist/skills/master-skill.js.map +1 -1
  94. package/dist/skills/releases.d.ts +1 -1
  95. package/dist/skills/releases.d.ts.map +1 -1
  96. package/dist/skills/releases.js +8 -5
  97. package/dist/skills/releases.js.map +1 -1
  98. package/dist/skills/routes.js +8 -8
  99. package/dist/skills/routes.js.map +1 -1
  100. package/dist/skills/staging-content.d.ts +3 -0
  101. package/dist/skills/staging-content.d.ts.map +1 -0
  102. package/dist/skills/staging-content.js +12 -0
  103. package/dist/skills/staging-content.js.map +1 -0
  104. package/dist/utils/http.d.ts +7 -1
  105. package/dist/utils/http.d.ts.map +1 -1
  106. package/dist/utils/http.js +5 -1
  107. package/dist/utils/http.js.map +1 -1
  108. package/package.json +12 -4
  109. package/skills/goose-ads/SKILL.md +386 -224
  110. package/skills/goose-product-photos/SKILL.md +107 -58
  111. package/skills/goose-video/SKILL.md +300 -36
  112. package/skills/goose-video-local/SKILL.md +239 -31
  113. package/skills/gooseworks/SKILL.md +133 -26
  114. package/skills/make-custom-video/SKILL.md +256 -11
  115. package/skills/manifest.json +7 -7
  116. package/skills/routes.json +8 -8
  117. package/dist/skills/fetcher.d.ts +0 -18
  118. package/dist/skills/fetcher.d.ts.map +0 -1
  119. package/dist/skills/fetcher.js +0 -118
  120. package/dist/skills/fetcher.js.map +0 -1
@@ -11,7 +11,7 @@ description: >
11
11
  references a product to photograph. Unlike goose-ads (ad creative) this produces clean PRODUCT
12
12
  photos that can then feed the ad workflow.
13
13
  category: ads
14
- version: 0.2.0
14
+ version: 0.3.0
15
15
  author: GooseWorks
16
16
  tags: [gooseworks, ads, product-photos, photoshoot, product, ecommerce, studio, lifestyle, on-model]
17
17
  ---
@@ -19,13 +19,16 @@ tags: [gooseworks, ads, product-photos, photoshoot, product, ecommerce, studio,
19
19
  # GooseWorks Product Photos — branded product photography
20
20
 
21
21
  The GooseWorks Product Photos skill. You **pick a brand + product and submit one generation**;
22
- the **backend** runs the whole pipeline (compose the shot prompt → generate on `gpt_image_2` →
23
- judge for product fidelity → auto-retry a few times for free) and stores the results. You do NOT
22
+ the **backend** runs the whole pipeline (compose the shot prompt → generate → judge for product
23
+ fidelity → auto-retry a few times for free) and stores the results. You do NOT
24
24
  generate images, call a model, or manage files — this is the exact same workflow the Product
25
25
  Photos studio uses, so the skill and the app can never drift. The point is to **enrich a brand's
26
26
  usable product imagery** — approved photos join the brand kit and can then feed the ad workflow
27
27
  (`goose-ads`).
28
28
 
29
+ It shoots a **physical catalog product** (apparel, beauty, consumer goods). A software
30
+ screenshot or an app mockup is not a product photo: that is an image edit, not this skill.
31
+
29
32
  ## How to talk to the customer (applies to every message you send them)
30
33
 
31
34
  The customer is a marketer or founder, not an engineer. Everything in this skill about tools,
@@ -78,19 +81,54 @@ and approval before spending. Hosted installed snapshots use the existing Skills
78
81
  Skill content and a host's cached MCP tool schemas are separate: refreshing one does not refresh
79
82
  the other. Check the actual advertised tools before using new fields.
80
83
 
81
- ## Prerequisite — the GooseWorks MCP server is REQUIRED
84
+ ## No GooseWorks tools in this session? Call them through the CLI
85
+
86
+ The GooseWorks tools named here (for example `account_whoami`, `brand_onboarding`,
87
+ `brand_read`) normally come from the GooseWorks connector. If they are not registered in this
88
+ session but you have a shell with the `gooseworks` CLI signed in (a cloud sandbox such as
89
+ ChatGPT agent, Meta AI or Grok), call the same tool from the shell:
90
+
91
+ ```bash
92
+ npx gooseworks tool <name> '<arguments as a JSON object>'
93
+ ```
94
+
95
+ - Run `npx gooseworks tool --list` once first. It prints the server's rules for using the tools
96
+ and every tool name; `npx gooseworks tool <name> --schema` shows one tool's arguments.
97
+ - The result prints as JSON. When a tool answers with a one-line summary, the fields you act on
98
+ (such as `next_step` and ids) follow under "Data:". It exits 1 when the tool reports an error.
99
+ - Nothing renders as a widget here, so tell the user the result in plain words.
100
+ - The same rules apply as over the connector: state the credit total and get the user's yes
101
+ before paid work.
102
+ - If it says you are not logged in, run `npx gooseworks login --device --no-wait`, show the
103
+ user the link and code it prints, and run `npx gooseworks login --device` once they approve.
104
+
105
+ When the tools are registered in this session, call them directly instead.
106
+
107
+ ## Prerequisite — the GooseWorks connector tools
108
+
109
+ Everything below runs through the GooseWorks connector's tools, by the names this skill uses.
110
+ Match on the tool name: a coding agent may show a server prefix (for example
111
+ `mcp__gooseworks__photos_generate`), a chat app may not.
112
+
113
+ If a tool named here is missing, the GooseWorks connection or its tool list is stale: ask the
114
+ user to reconnect or refresh GooseWorks in their app's connector settings. Installing or
115
+ updating the `gooseworks` CLI never fixes a missing connector tool, so never send a chat-app
116
+ user to a terminal for it. Only a terminal coding agent (Claude Code, Codex, Cursor) that has no
117
+ GooseWorks tools at all connects them, in that terminal, with `gooseworks install --mcp` plus
118
+ `--claude`, `--codex` or `--cursor`, then a restart.
82
119
 
83
- Everything goes through the `mcp__gooseworks__*` tools. If they are not available, **stop and
84
- tell the user to run `gooseworks install --claude --mcp`** (and restart Claude Code). There is no
85
- HTTP/file fallback.
120
+ Older notes or skill copies may name tools the connector no longer lists. Use the tool this skill
121
+ names instead; `catalog_fetch { type: "skill", slug: "gooseworks-guide" }` maps every old name.
86
122
 
87
123
  ## Start from the brand context — don't re-ask what it already answers
88
124
 
89
125
  If the `gooseworks` router handed you brand context, USE IT. If you were invoked directly, call
90
- `brand_read` yourself first. It answers most of the setup questions below, so **do not ask
91
- the user for them**:
126
+ `brand_read { brand_id, sections: ["summary","kit","products","learnings"] }` yourself first, then
127
+ `knowledge_search { brand_id, query: "<the shoot, in the user's words>" }` for saved rules and past
128
+ feedback (an archived photo's reason is saved as a `dont` rule). They answer most of the setup
129
+ questions below, so **do not ask the user for them**:
92
130
 
93
- - **Which product?** — the context's `products[]` are the real catalog entries. Offer them; never
131
+ - **Which product?** — the context's `products` are the real catalog entries. Offer them; never
94
132
  invent a product or ask the user to describe one you can already see.
95
133
  - **What does it look like / what is it made of?** — grounded in the product's stored images and
96
134
  description. Never guess a material, colorway, or silhouette.
@@ -102,79 +140,90 @@ the user for them**:
102
140
  Ask only for the genuinely open choices: the shot `category`, how many photos, quality, and
103
141
  whether a human model is wanted (which needs explicit consent — see the rules).
104
142
 
105
- ## Identity & credits
143
+ ## Credits — state the total, then get a yes
106
144
 
107
- - One agent-scoped token authenticates the tools; they resolve your org automatically. Never
108
- print the token. (You may pass an optional `target` to operate on a specific agent/org, exactly
109
- as the other GooseWorks tools; omit it to use your pinned scope.)
110
- - **Credits are handled by the backend.** `generate_product_photos` reserves the estimated cost up
111
- front and bills only the photos that pass the judge — **automatic retries are free**, and a photo
112
- the judge can't get right (`flagged`) is shown but **never billed**. Call
113
- `estimate_product_photos` first to quote the cost; `get_ad_credits` shows the balance.
145
+ - One token authenticates the tools and resolves your org; never print it. Omit `target`.
146
+ - **Quote first.** Call `photos_generate` with the exact arguments you will submit plus
147
+ `dry_run: true`. It reserves nothing and returns `creditsPerOutput` and `totalCredits`. Pass
148
+ `count` and `quality` explicitly in both calls so the quote matches the run.
149
+ - **Nothing paid runs without the user's explicit yes in this chat, given after you state that
150
+ credit total.** Then submit the same call without `dry_run`.
151
+ - The submit reserves the quoted credits and bills only the photos that pass the judge:
152
+ **automatic retries are free**, and a photo the judge can't get right (`flagged`) is shown but
153
+ **never billed**. The balance is `credits.available_credits` from `account_whoami`. If the
154
+ wallet is short, say so plainly with the total and the balance, and stop.
114
155
 
115
156
  ## The tools
116
157
 
117
158
  **Pick the brand + product**
118
- - `list_ad_brands` — the user's ad brands (get a `brand_id`; also carries `slug`).
119
- - `list_brand_products { brand_id, search?, page?, page_size? }` — the brand's imported products.
120
- Pick a `product_id` to shoot. `search` matches name / type / variant / SKU.
121
- - `import_product { brand_id, kind, url, product_name? }` — import a product if it isn't in the
122
- catalog yet. `kind` is `product_url` (a single product page), `shopify_store` (a store URL →
123
- imports the catalog), or `image_url` (a direct image; requires `product_name`). Returns an import
124
- row with an `id`; if its `status` isn't `complete`, poll `get_product_import` until it is, then
125
- `list_brand_products` to find the new product. (File uploads aren't available over MCP — use a URL.)
126
- - `get_product_import { import_id }` — poll an import until `status` is `complete` or `failed`.
159
+ - `brand_read` with no `brand_id` — the user's brands (each row's `id` is the `brand_id`).
160
+ - `brand_read { brand_id, sections: ["products"], products_query: "<name>" }` — the brand's
161
+ imported products in `products.items`; a product's `id` is the `product_id` to shoot.
162
+ `products_query` matches name / type / variant / SKU / description.
163
+ - Import a product that isn't in the catalog yet (free):
164
+ `brand_update { brand_id, patch: { products: [{ import_url, import_kind, name? }] } }`.
165
+ `import_kind` is `product_url` (a single product page), `shopify_store` (a store URL → imports
166
+ the catalog), or `image_url` (a direct image; also needs `name`). It returns `jobs[]`: poll
167
+ `job_get { job_id, kind: "product_import" }` until it finishes, then read the products again.
168
+ To add a photo the user attached to an existing product:
169
+ `media_upload { brand_id, scope: "product", scope_id: <product_id>, kind: "reference", source: { type: "bytes", filename, content_base64 } }`.
127
170
 
128
171
  **Generate**
129
- - `estimate_product_photos { count, quality? }` — cost preview (per-photo + total credits). `count`
130
- is 1, 2, 4, or 8; `quality` is `low` | `medium` | `high` (default `medium`). Reserves nothing.
131
- - `generate_product_photos { brand_id, product_id, variant_id?, category, controls?, prompt?,
132
- count?, quality?, reference_image_urls?, attestation_accepted? }` — **the one call that makes
133
- photos.** `category` is `apparel` | `beauty` | `cpg` (seeds sensible scene/framing defaults).
134
- Omit `controls` to use the category preset; pass `prompt` as free-text steering **added on top of**
135
- the settings (it doesn't replace them). Returns a generation with an `id` **immediately** — poll
136
- `get_product_photo_generation` until done, then read each `outputs[].final_image_url`.
172
+ - `photos_generate { brand_id, product_id, variant_id?, category, controls?, prompt?, count,
173
+ quality, reference_image_urls?, attestation_accepted?, dry_run? }` — **the one call that makes
174
+ photos** (and, with `dry_run: true`, its free quote). `category` is `apparel` | `beauty` |
175
+ `cpg` (seeds sensible scene/framing defaults). `count` is 1, 2, 4, or 8; `quality` is
176
+ `low` | `medium` | `high`. Omit `controls` to use the category preset; pass `prompt` as
177
+ free-text steering **added on top of** the settings (it doesn't replace them). Returns the
178
+ generation with its `id` **immediately**.
137
179
  **If you request a human model** (`controls.model.presence` is not `none`) you MUST pass
138
180
  `attestation_accepted: true` to confirm the user has the rights for model imagery.
139
- - `get_product_photo_generation { generation_id }` — poll until `status` is `complete`,
140
- `partial_failure`, or `failed`. Each `outputs[]` entry has its own `status` and, once ready, a
181
+ - `photos_read { brand_id, generation_id }` — poll until `status` is `complete`,
182
+ `partial_failure`, or `failed` (`job_get { job_id: <generation id>, kind: "photo_generation" }`
183
+ works too). Each `outputs[]` entry has its own `id`, `status` and, once ready, a
141
184
  `final_image_url`. A `flagged` output is the best attempt but wasn't billed.
142
185
 
143
186
  **Use the results**
144
- - `list_product_photos { brand_id, archived? }` — the brand's generated photos (`archived: false`
145
- = active, `true` = archived).
146
- - `approve_product_photo { output_id }` — approve a photo: links it to the product and makes it
147
- available in the **brand kit**, so `goose-ads` can use it. **Photos are not used anywhere until
148
- approved.**
149
- - `archive_product_photo { output_id, reason? }` — archive a photo; archived photos are **excluded**
150
- from ad generation.
187
+ - `photos_read { brand_id, archived?, product_id?, status? }` — the brand's generated photos
188
+ (`archived: false` = active, `true` = archived).
189
+ - `photos_update { brand_id, output_id, action: "approve" }` — approve a photo: links it to the
190
+ product and makes it available in the **brand kit**, so `goose-ads` can use it. **Photos are
191
+ not used anywhere until approved.**
192
+ - `photos_update { brand_id, output_id, action: "archive", reason? }` — archive a photo; archived
193
+ photos are **excluded** from ad generation, and the reason is saved as a `dont` rule.
151
194
 
152
195
  ## Workflow — shoot a product
153
196
 
154
- 1. **Load the brand context** (`brand_read`, or reuse what the router passed you) and
155
- **resolve the brand + product.** `list_ad_brands` → `brand_id`. `list_brand_products` → pick a
156
- `product_id` from the catalog you already know about. If the product genuinely isn't there,
157
- `import_product` (poll `get_product_import`).
158
- 2. **Quote the cost.** `estimate_product_photos { count, quality }` → tell the user credits.
159
- 3. **Generate.** `generate_product_photos { brand_id, product_id, category, count, quality, prompt? }`.
160
- Build `prompt` from the brand's voice/positioning you already have — don't interview the user for it.
161
- Returns a generation `id` right away.
162
- 4. **Poll.** `get_product_photo_generation { generation_id }` until terminal; hand back each
197
+ 1. **Load the brand context** (`brand_read` + `knowledge_search`, or reuse what the router passed
198
+ you) and **resolve the brand + product.** Pick a `product_id` from the catalog you already
199
+ know about. If the product genuinely isn't there, import it and poll the import.
200
+ 2. **Quote the cost.** `photos_generate` with `dry_run: true` and the exact `brand_id`,
201
+ `product_id`, `category`, `count` and `quality` → tell the user the credit total and wait
202
+ for their explicit yes.
203
+ 3. **Generate.** The same `photos_generate` call without `dry_run` (add `prompt` built from the
204
+ brand's voice/positioning you already have — don't interview the user for it). Returns a
205
+ generation `id` right away.
206
+ 4. **Poll.** `photos_read { brand_id, generation_id }` every ~20-30s until terminal; show each
163
207
  `final_image_url`.
164
- 5. **Approve the keepers.** Show the results and let the user pick; `approve_product_photo` the ones
165
- they'd publish (that's what puts them in the brand kit for ads), `archive_product_photo` the rest.
208
+ 5. **Approve the keepers.** Show the results and let the user pick; `photos_update` with
209
+ `action: "approve"` the ones they'd publish (that's what puts them in the brand kit for ads),
210
+ `action: "archive"` the rest.
166
211
 
167
212
  ## Rules
168
213
 
214
+ - **Connector tools only** — a missing tool means the GooseWorks connection is stale: ask the
215
+ user to reconnect or refresh GooseWorks. Never send a chat-app user to a terminal or a CLI
216
+ install.
169
217
  - **Never invent product facts.** The backend grounds the shot on the product's real images; don't
170
218
  describe a product you can't see.
171
219
  - **Use the brand context instead of interviewing the user.** Product, audience, voice, positioning,
172
220
  logo/colors/fonts all come from `brand_read` / the brand kit. Ask only for the shot
173
221
  category, count, quality, and model consent.
174
- - **Ask before spending.** Quote the estimate and confirm `count` / `quality` before
175
- `generate_product_photos` — it reserves credits.
222
+ - **Ask before spending.** State the dry-run credit total and get the user's explicit yes before
223
+ the real `photos_generate` — it reserves credits.
176
224
  - **Poll, don't re-submit.** A generation that's still `running` is not stuck; re-submitting
177
- double-bills. Only a `failed` generation should be retried.
225
+ double-bills. A `failed` generation may still hold `flagged` photos (shown, never billed):
226
+ show those first, and run again only after a new quote and the user's yes.
178
227
  - **Model imagery needs consent.** Only set a human model when the user asks, and pass
179
228
  `attestation_accepted: true`.
180
229
  - **Approval is the hand-off to ads.** Remind the user that only **approved** photos reach the brand