bazaar.it 0.2.3 → 0.2.4
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/README.md +121 -20
- package/dist/commands/auth.js +2 -2
- package/dist/lib/api.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -52,7 +52,7 @@ $ baz
|
|
|
52
52
|
██████╔╝██║ ██║███████╗
|
|
53
53
|
╚═════╝ ╚═╝ ╚═╝╚══════╝
|
|
54
54
|
|
|
55
|
-
AI-powered video generation v0.2.
|
|
55
|
+
AI-powered video generation v0.2.4
|
|
56
56
|
─────────────────────────────────────
|
|
57
57
|
Type a command or prompt. Use 'help' for commands.
|
|
58
58
|
|
|
@@ -100,6 +100,22 @@ baz project use <project-id>
|
|
|
100
100
|
|
|
101
101
|
# Show current project
|
|
102
102
|
baz project current
|
|
103
|
+
|
|
104
|
+
# Duplicate a project (optionally changing format)
|
|
105
|
+
baz project duplicate <id> --name "Copy" --format portrait
|
|
106
|
+
|
|
107
|
+
# View or change project settings
|
|
108
|
+
baz project settings
|
|
109
|
+
baz project settings --format portrait --width 1080 --height 1920
|
|
110
|
+
|
|
111
|
+
# Change format by duplicating into a new project
|
|
112
|
+
baz project format landscape
|
|
113
|
+
|
|
114
|
+
# Validate timeline structure
|
|
115
|
+
baz project validate --json
|
|
116
|
+
|
|
117
|
+
# Delete a project
|
|
118
|
+
baz project delete <id>
|
|
103
119
|
```
|
|
104
120
|
|
|
105
121
|
### Prompts
|
|
@@ -257,6 +273,109 @@ baz logs --since 24h --limit 100
|
|
|
257
273
|
baz logs --project
|
|
258
274
|
```
|
|
259
275
|
|
|
276
|
+
### Context
|
|
277
|
+
|
|
278
|
+
Attach goals, requirements, reference URLs, and files to a project. The AI agent uses this context when generating content.
|
|
279
|
+
|
|
280
|
+
```bash
|
|
281
|
+
# Add text context
|
|
282
|
+
baz context add --text "Brand colors: #FF6B00, #1A1A2E" --label "brand"
|
|
283
|
+
|
|
284
|
+
# Add a URL reference
|
|
285
|
+
baz context add --url https://example.com/brand-guide --label "brand guide"
|
|
286
|
+
|
|
287
|
+
# Add a file (uploaded to media library)
|
|
288
|
+
baz context add --file ./brief.pdf --label "creative brief"
|
|
289
|
+
|
|
290
|
+
# List all context entries
|
|
291
|
+
baz context list
|
|
292
|
+
|
|
293
|
+
# Show context (alias for list)
|
|
294
|
+
baz context show
|
|
295
|
+
|
|
296
|
+
# Remove a specific entry
|
|
297
|
+
baz context remove <context-id>
|
|
298
|
+
|
|
299
|
+
# Clear all context
|
|
300
|
+
baz context clear
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
### Recipe (Agent Handshake)
|
|
304
|
+
|
|
305
|
+
Recipes implement the REVIEW → APPROVE/EDIT → EXECUTE flow for multi-step operations like voiceovers or AI video generation.
|
|
306
|
+
|
|
307
|
+
```bash
|
|
308
|
+
# Show the current recipe for review
|
|
309
|
+
baz recipe show
|
|
310
|
+
|
|
311
|
+
# Execute (approve and run)
|
|
312
|
+
baz recipe execute
|
|
313
|
+
|
|
314
|
+
# Edit recipe before executing
|
|
315
|
+
baz recipe edit --steps '[...]'
|
|
316
|
+
|
|
317
|
+
# Clear/abandon the current recipe
|
|
318
|
+
baz recipe clear
|
|
319
|
+
|
|
320
|
+
# List assets generated by recipe execution
|
|
321
|
+
baz recipe assets
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
### Templates
|
|
325
|
+
|
|
326
|
+
```bash
|
|
327
|
+
# List available templates
|
|
328
|
+
baz template list
|
|
329
|
+
|
|
330
|
+
# Filter by category or format
|
|
331
|
+
baz template list --category "product" --format landscape
|
|
332
|
+
|
|
333
|
+
# Search templates
|
|
334
|
+
baz template list --search "intro"
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
### Review
|
|
338
|
+
|
|
339
|
+
Full project state dump for external agent evaluation. Returns scenes with code, voiceovers, timing, and AI-generated asset prompts.
|
|
340
|
+
|
|
341
|
+
```bash
|
|
342
|
+
# Get full project state for agent evaluation
|
|
343
|
+
baz review --json
|
|
344
|
+
```
|
|
345
|
+
|
|
346
|
+
### Share
|
|
347
|
+
|
|
348
|
+
```bash
|
|
349
|
+
# Create a share link for the active project
|
|
350
|
+
baz share create
|
|
351
|
+
|
|
352
|
+
# List all your shared projects
|
|
353
|
+
baz share list
|
|
354
|
+
|
|
355
|
+
# Delete a share link
|
|
356
|
+
baz share delete <share-id>
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
### Capabilities
|
|
360
|
+
|
|
361
|
+
```bash
|
|
362
|
+
# Describe CLI capabilities (JSON for agents)
|
|
363
|
+
baz capabilities --json
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
### Loop (Basic OODA)
|
|
367
|
+
|
|
368
|
+
```bash
|
|
369
|
+
# Iterate prompt → review with optional requirements
|
|
370
|
+
baz loop "Create a 15s intro for Acme" --requirements "logo visible, CTA present"
|
|
371
|
+
|
|
372
|
+
# Use agent mode + NDJSON for bots
|
|
373
|
+
BAZ_AGENT=1 baz loop "Create a 15s intro" --requirements "logo visible, CTA present"
|
|
374
|
+
|
|
375
|
+
# Stop on failure and set a time budget
|
|
376
|
+
baz loop "Create a 15s intro" --requirements "logo visible" --stop-on-fail --budget 90s
|
|
377
|
+
```
|
|
378
|
+
|
|
260
379
|
## Agent Capabilities
|
|
261
380
|
|
|
262
381
|
The agent has access to the same tools as the web app:
|
|
@@ -352,6 +471,7 @@ Environment variables override config file:
|
|
|
352
471
|
- `BAZ_API_KEY` — API key
|
|
353
472
|
- `BAZ_API_URL` — API URL
|
|
354
473
|
- `BAZ_PROJECT_ID` — Active project
|
|
474
|
+
- `BAZ_JSON=1` — Force JSON output (equivalent to `--json`)
|
|
355
475
|
- `BAZ_AGENT=1` — Agent auto-mode (default `--json`, `--compact`, `--events-only`, and `--stream-json` on prompt/loop)
|
|
356
476
|
|
|
357
477
|
## Examples
|
|
@@ -450,22 +570,3 @@ npm run build # Build for production
|
|
|
450
570
|
## License
|
|
451
571
|
|
|
452
572
|
Copyright © 2024 Bazaar.it. All rights reserved.
|
|
453
|
-
### Capabilities
|
|
454
|
-
|
|
455
|
-
```bash
|
|
456
|
-
# Describe CLI capabilities (JSON for agents)
|
|
457
|
-
baz capabilities --json
|
|
458
|
-
```
|
|
459
|
-
|
|
460
|
-
### Loop (Basic OODA)
|
|
461
|
-
|
|
462
|
-
```bash
|
|
463
|
-
# Iterate prompt → review with optional requirements
|
|
464
|
-
baz loop "Create a 15s intro for Acme" --requirements "logo visible, CTA present"
|
|
465
|
-
|
|
466
|
-
# Use agent mode + NDJSON for bots
|
|
467
|
-
BAZ_AGENT=1 baz loop "Create a 15s intro" --requirements "logo visible, CTA present"
|
|
468
|
-
|
|
469
|
-
# Stop on failure and set a time budget
|
|
470
|
-
baz loop "Create a 15s intro" --requirements "logo visible" --stop-on-fail --budget 90s
|
|
471
|
-
```
|
package/dist/commands/auth.js
CHANGED
|
@@ -39,7 +39,7 @@ authCommand
|
|
|
39
39
|
console.log(' 1. Pass directly: baz auth login <your-api-key>');
|
|
40
40
|
console.log(' 2. Environment: export BAZ_API_KEY=<your-api-key>');
|
|
41
41
|
console.log();
|
|
42
|
-
console.log(chalk.gray('
|
|
42
|
+
console.log(chalk.gray('Sign in at bazaar.it, click your balance in the top bar, then select API Keys'));
|
|
43
43
|
process.exit(1);
|
|
44
44
|
}
|
|
45
45
|
// Validate key format
|
|
@@ -62,7 +62,7 @@ authCommand
|
|
|
62
62
|
catch (err) {
|
|
63
63
|
if (err instanceof ApiError && err.category === 'auth') {
|
|
64
64
|
saveConfig({ apiKey: undefined, apiUrl: config.apiUrl }, { configPath: globalOpts.config });
|
|
65
|
-
error('Invalid API key', 'The key was not recognized by the server. Check for typos or generate a new key.');
|
|
65
|
+
error('Invalid API key', 'The key was not recognized by the server. Check for typos or generate a new key from the balance menu at bazaar.it');
|
|
66
66
|
process.exit(1);
|
|
67
67
|
}
|
|
68
68
|
// Non-auth error (500, network issue) — save key anyway, warn
|
package/dist/lib/api.js
CHANGED
|
@@ -181,7 +181,7 @@ function parseApiError(status, statusText, body, headers) {
|
|
|
181
181
|
const serverCode = json.error?.code || json.code;
|
|
182
182
|
if (serverCode === 'INSUFFICIENT_BALANCE') {
|
|
183
183
|
code = ErrorCodes.BALANCE;
|
|
184
|
-
suggestion = '
|
|
184
|
+
suggestion = 'Sign in at bazaar.it and click your balance in the top bar to upgrade';
|
|
185
185
|
}
|
|
186
186
|
else if (serverCode === 'CONTENT_POLICY_VIOLATION' || serverCode === 'SAFETY_FILTER') {
|
|
187
187
|
code = ErrorCodes.CONTENT_FILTER;
|
|
@@ -223,7 +223,7 @@ function parseApiError(status, statusText, body, headers) {
|
|
|
223
223
|
case 402:
|
|
224
224
|
code = ErrorCodes.BALANCE;
|
|
225
225
|
message = 'Insufficient balance';
|
|
226
|
-
suggestion = '
|
|
226
|
+
suggestion = 'Sign in at bazaar.it and click your balance in the top bar to upgrade';
|
|
227
227
|
break;
|
|
228
228
|
case 429:
|
|
229
229
|
code = ErrorCodes.RATE_LIMIT;
|