@mccaskie-labs/workbench-config 0.2.3 → 0.2.5
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/CHANGELOG.md +12 -0
- package/capabilities/ai.json +183 -3
- package/capabilities/analytics.json +47 -3
- package/capabilities/country.json +160 -3
- package/capabilities/image-search.json +154 -3
- package/capabilities/images.json +192 -3
- package/capabilities/ui.json +27 -2
- package/dist/capabilities.gen.d.ts +602 -7
- package/dist/capabilities.gen.js +759 -13
- package/dist/capability-schema.d.ts +1 -1
- package/dist/capability-schema.js +1 -1
- package/dist/skills.js +1 -1
- package/package.json +1 -1
package/capabilities/images.json
CHANGED
|
@@ -7,8 +7,7 @@
|
|
|
7
7
|
"status": "built",
|
|
8
8
|
"delivery": {
|
|
9
9
|
"choice": "built_in",
|
|
10
|
-
"intro": "Pictures made by AI from a description."
|
|
11
|
-
"when": "The client wants a picture made by AI, such as an illustration, a hero image or a product mock-up, as a feature visitors use or once for the site."
|
|
10
|
+
"intro": "Pictures made by AI from a description."
|
|
12
11
|
},
|
|
13
12
|
"surfaces": {
|
|
14
13
|
"gateway": [
|
|
@@ -209,5 +208,195 @@
|
|
|
209
208
|
"refusal": "invalid_request",
|
|
210
209
|
"cost_hint_usd": 0
|
|
211
210
|
}
|
|
212
|
-
]
|
|
211
|
+
],
|
|
212
|
+
"offer": {
|
|
213
|
+
"pattern": "feature_or_content",
|
|
214
|
+
"when": "The client wants a picture made by AI, such as an illustration, a hero image or a product mock-up, as a feature visitors use or once for the site.",
|
|
215
|
+
"say": "I'll make this with Workbench pictures, made by AI through Workbench, so the app holds no image key and spending has a monthly cap.",
|
|
216
|
+
"answers_file": "workbench/images/<name>.json",
|
|
217
|
+
"per": "feature or picture",
|
|
218
|
+
"answers_format": "For a feature: `{ \"format\": 1, \"route\": \"feature\", \"name\", \"about\" (the client's words), \"who\", \"cap_usd\", \"job\" }`, where `job` is the `X-Workbench-Job` the feature's calls send (`<name>` with dots, such as `quotes.estimate`), so its spending shows on its own line in Control. Write it, then build the feature with the package. For a picture made once: `npx workbench-ai pick <name> <round>-<draft>` copies the picked picture to `public/images/<name>.png` (or .jpg) and writes the answers file with its prompt, model, request id and cost; never write one from nothing. Show it on the page from `/images/<name>.png`, with alt text that says what it shows. Drafts and their previews stay in `workbench/images/drafts/`, which isn't committed.",
|
|
219
|
+
"questions": [
|
|
220
|
+
{
|
|
221
|
+
"id": "images.route",
|
|
222
|
+
"sets": "route",
|
|
223
|
+
"ask": "Is this something visitors use on the site, or something made once for the site?",
|
|
224
|
+
"style": "cards",
|
|
225
|
+
"answers": [
|
|
226
|
+
{
|
|
227
|
+
"label": "Visitors use it",
|
|
228
|
+
"value": "feature",
|
|
229
|
+
"means": "A feature that makes a new picture each time someone uses it, such as a mock-up of their own design."
|
|
230
|
+
},
|
|
231
|
+
{
|
|
232
|
+
"label": "Made once for the site",
|
|
233
|
+
"value": "content",
|
|
234
|
+
"means": "A picture for the site, made once and kept: a hero image, an illustration for a page."
|
|
235
|
+
}
|
|
236
|
+
],
|
|
237
|
+
"must_ask": true,
|
|
238
|
+
"note": "Ask it even when the client's words seem to say, as a quick check: the two routes are built and paid for differently."
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"id": "images.who",
|
|
242
|
+
"sets": "feature.who",
|
|
243
|
+
"ask": "Who may use it?",
|
|
244
|
+
"style": "cards",
|
|
245
|
+
"answers": [
|
|
246
|
+
{
|
|
247
|
+
"label": "People who are signed in",
|
|
248
|
+
"value": "signed_in",
|
|
249
|
+
"means": "Anyone with an account. Each use is tied to a person, so misuse can be traced and stopped."
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
"label": "Admins only",
|
|
253
|
+
"value": "admins",
|
|
254
|
+
"means": "Only the business's own admins, for example a tool for writing their own posts."
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"label": "Anyone visiting",
|
|
258
|
+
"value": "anyone",
|
|
259
|
+
"means": "No sign-in. The page checks for bots (Turnstile) and limits how often one visitor can use it."
|
|
260
|
+
}
|
|
261
|
+
],
|
|
262
|
+
"when": {
|
|
263
|
+
"id": "images.route",
|
|
264
|
+
"is": [
|
|
265
|
+
"feature"
|
|
266
|
+
]
|
|
267
|
+
},
|
|
268
|
+
"note": "Signed in means `requireUser` and admins means `app_admins`, as the workbench-sign-in skill says. For anyone, check Turnstile on every use and keep a per-visitor limit; say plainly that strangers can run up the cost. Pass `subject` on every call so the Gateway can tell people apart: `user:<id>` for a signed-in person, and for anyone a random id kept in a cookie (`visitor:<id>`), never an email address or name."
|
|
269
|
+
},
|
|
270
|
+
{
|
|
271
|
+
"id": "images.cap",
|
|
272
|
+
"sets": "feature.cap_usd",
|
|
273
|
+
"ask": "How much may it spend in a month, at most? When it's reached, the feature stops until next month.",
|
|
274
|
+
"style": "cards",
|
|
275
|
+
"answers": [
|
|
276
|
+
{
|
|
277
|
+
"label": "US$5 a month",
|
|
278
|
+
"value": 5,
|
|
279
|
+
"means": "A small trial, or light use."
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"label": "US$20 a month",
|
|
283
|
+
"value": 20,
|
|
284
|
+
"means": "Steady use by a small business's visitors."
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
"label": "US$50 a month",
|
|
288
|
+
"value": 50,
|
|
289
|
+
"means": "Heavy use. It can be raised later."
|
|
290
|
+
}
|
|
291
|
+
],
|
|
292
|
+
"other": {
|
|
293
|
+
"kind": "money",
|
|
294
|
+
"min": 1,
|
|
295
|
+
"max": 1000,
|
|
296
|
+
"description": "US dollars a month, whole or with cents."
|
|
297
|
+
},
|
|
298
|
+
"must_ask": true,
|
|
299
|
+
"when": {
|
|
300
|
+
"id": "images.route",
|
|
301
|
+
"is": [
|
|
302
|
+
"feature"
|
|
303
|
+
]
|
|
304
|
+
},
|
|
305
|
+
"note": "Say roughly what one use costs (about US$0.07 a picture with image-default) so the owner can judge. The cap is the project's production cap for the `images` tool in the Gateway, shared by every feature that uses it: set it with Workbench Control's `gw_budget_set` (env production, tool images, monthly_usd). Raising a cap waits for the owner's approval on Control's approval page. When it is reached, calls fail with `budget_exceeded`: the page says the feature is resting until next month, never an error."
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
"id": "images.what",
|
|
309
|
+
"sets": [
|
|
310
|
+
"content.name",
|
|
311
|
+
"content.about"
|
|
312
|
+
],
|
|
313
|
+
"ask": "What picture do you need?",
|
|
314
|
+
"style": "cards",
|
|
315
|
+
"answers": [
|
|
316
|
+
{
|
|
317
|
+
"label": "A hero image",
|
|
318
|
+
"value": "hero",
|
|
319
|
+
"means": "The large picture across the top of a page."
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
"label": "An illustration",
|
|
323
|
+
"value": "illustration",
|
|
324
|
+
"means": "A drawing for a page or a section."
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"label": "A product mock-up",
|
|
328
|
+
"value": "mockup",
|
|
329
|
+
"means": "A product shown in use or in a setting."
|
|
330
|
+
}
|
|
331
|
+
],
|
|
332
|
+
"other": {
|
|
333
|
+
"kind": "text",
|
|
334
|
+
"min": 3,
|
|
335
|
+
"max": 200,
|
|
336
|
+
"description": "What the picture is, in a few words."
|
|
337
|
+
},
|
|
338
|
+
"when": {
|
|
339
|
+
"id": "images.route",
|
|
340
|
+
"is": [
|
|
341
|
+
"content"
|
|
342
|
+
]
|
|
343
|
+
},
|
|
344
|
+
"note": "Name the picture after where it goes (home_hero): lower case and underscores. The client's own words about what it shows and the feel they want go in --about."
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
"id": "images.shape",
|
|
348
|
+
"sets": "content.aspect",
|
|
349
|
+
"ask": "What shape should it be?",
|
|
350
|
+
"style": "cards",
|
|
351
|
+
"answers": [
|
|
352
|
+
{
|
|
353
|
+
"label": "Landscape (3:2)",
|
|
354
|
+
"value": "3:2",
|
|
355
|
+
"means": "Wider than tall, the usual shape for a page."
|
|
356
|
+
},
|
|
357
|
+
{
|
|
358
|
+
"label": "Wide banner (16:9)",
|
|
359
|
+
"value": "16:9",
|
|
360
|
+
"means": "For a picture across the top of a page."
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"label": "Square (1:1)",
|
|
364
|
+
"value": "1:1",
|
|
365
|
+
"means": "For cards and social posts."
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
"label": "Portrait (2:3)",
|
|
369
|
+
"value": "2:3",
|
|
370
|
+
"means": "Taller than wide."
|
|
371
|
+
}
|
|
372
|
+
],
|
|
373
|
+
"when": {
|
|
374
|
+
"id": "images.route",
|
|
375
|
+
"is": [
|
|
376
|
+
"content"
|
|
377
|
+
]
|
|
378
|
+
},
|
|
379
|
+
"note": "Recommend the banner for a hero image. Pass it to the drafts command as --aspect."
|
|
380
|
+
}
|
|
381
|
+
],
|
|
382
|
+
"not_asked": [
|
|
383
|
+
{
|
|
384
|
+
"sets": "model",
|
|
385
|
+
"why": "Drafts and features use image-default. image-pro costs about twice as much for finer detail and image-openai is cheapest; suggest one only when the client asks about quality or cost."
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
"sets": "references",
|
|
389
|
+
"why": "A reference picture (to make something like it) is only for a feature that needs one, and works with Google aliases only; offer it when the client mentions one."
|
|
390
|
+
}
|
|
391
|
+
],
|
|
392
|
+
"drafts": {
|
|
393
|
+
"of": "pictures",
|
|
394
|
+
"surface": "images",
|
|
395
|
+
"alias": "image-default",
|
|
396
|
+
"count": 3,
|
|
397
|
+
"max_rounds": 3,
|
|
398
|
+
"job": "images.drafts",
|
|
399
|
+
"command": "npx workbench-ai drafts image <name> --about \"<what it shows, in the client's words>\" --aspect <shape>"
|
|
400
|
+
}
|
|
401
|
+
}
|
|
213
402
|
}
|
package/capabilities/ui.json
CHANGED
|
@@ -7,8 +7,7 @@
|
|
|
7
7
|
"status": "built",
|
|
8
8
|
"delivery": {
|
|
9
9
|
"choice": "optional",
|
|
10
|
-
"intro": "A ready-made look for the pages only you and your admins see."
|
|
11
|
-
"when": "The client wants a page only the owner or the app's admins see: a dashboard, a list, a settings page or a status page."
|
|
10
|
+
"intro": "A ready-made look for the pages only you and your admins see."
|
|
12
11
|
},
|
|
13
12
|
"surfaces": {
|
|
14
13
|
"package": [
|
|
@@ -95,5 +94,31 @@
|
|
|
95
94
|
],
|
|
96
95
|
"styles": {
|
|
97
96
|
"prefix": "wb-ui-"
|
|
97
|
+
},
|
|
98
|
+
"offer": {
|
|
99
|
+
"pattern": "switch_on",
|
|
100
|
+
"when": "The client wants a page only the owner or the app's admins see: a dashboard, a list, a settings page or a status page.",
|
|
101
|
+
"say": "I'll build this with the Workbench owner-page look, the same top bar, cards and pills as the other admin pages, so it's quick to build and consistent. Your customers never see it.",
|
|
102
|
+
"answers_file": "workbench/ui.json",
|
|
103
|
+
"answers_format": "`{ \"format\": 1, \"pages\": [{ \"path\": \"/admin/orders\", \"what\": \"every order this month, newest first\", \"who\": \"admins\" }] }`. Build each page with `shell`, `topBar`, `card` and `pill`. An `admins` page lives under `/admin/` and checks `requireUser` and `app_admins` (the workbench-sign-in skill); an `owner` page lives under `/owner/` and is behind Access in production.",
|
|
104
|
+
"questions": [
|
|
105
|
+
{
|
|
106
|
+
"id": "ui.pages",
|
|
107
|
+
"sets": "pages",
|
|
108
|
+
"ask": "Which admin pages should the app have?",
|
|
109
|
+
"style": "table",
|
|
110
|
+
"note": "Propose the pages the request needs, each with its path, what it shows or lets them change in the client's words, and who sees it: `admins` (the business's people, who sign in to the app) or `owner` (whoever runs the app's Workbench, through Access). Recommend `admins` unless the page is about running the app itself, such as a status page. The client accepts, removes or adds pages."
|
|
111
|
+
}
|
|
112
|
+
],
|
|
113
|
+
"not_asked": [
|
|
114
|
+
{
|
|
115
|
+
"sets": "look",
|
|
116
|
+
"why": "Every admin page has the same Workbench look, so the business's people learn it once. Restyle it in project.css (see Restyling) if the client wants their colours."
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"sets": "formats",
|
|
120
|
+
"why": "Times, amounts and durations on these pages come from workbench-ui's `when`, `money` and `duration`. What customers see uses the readers' formats (the workbench-country skill)."
|
|
121
|
+
}
|
|
122
|
+
]
|
|
98
123
|
}
|
|
99
124
|
}
|