@usenaive-sdk/blueprints 0.7.0 → 0.9.0

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/dist/index.d.ts CHANGED
@@ -5,9 +5,10 @@ import { VettaClient } from '@usenaive-sdk/vetta';
5
5
  * Blueprints and their templates.
6
6
  *
7
7
  * A **blueprint** is the machine: screens, `/api/*`, the store, build and deploy, the approval
8
- * flow. It is one repository, and it is shared across its templates. A **template** is DATA — the
9
- * crew and its prompts, the tool allow-lists, the kinds of work it files, its schedules, the demo
10
- * seed and the words its screens print. One repo carries every template its blueprint has, so
8
+ * flow — or, for a data-only blueprint, none of those. It is one repository, and it is shared across
9
+ * its templates. A **template** is DATA — the crew and its prompts, the tool allow-lists and its
10
+ * schedules. What a blueprint's own screens print per template is the blueprint's business, and
11
+ * the engine never reads it (ADR-0903). One repo carries every template its blueprint has, so
11
12
  * switching is an edit plus `naive up`: never a re-clone, never a new app.
12
13
  *
13
14
  * The pair is checked here and refused at define time (`define.ts`), in the author's own
@@ -15,12 +16,6 @@ import { VettaClient } from '@usenaive-sdk/vetta';
15
16
  * discovered against a half-provisioned organization.
16
17
  */
17
18
 
18
- /** One kind of work a template files — a deliverable kind, a post kind. `id` is what rows carry. */
19
- interface TemplateKind {
20
- id: string;
21
- label: string;
22
- description?: string;
23
- }
24
19
  /**
25
20
  * The data module a blueprint repo exports, one per template it carries. Everything here is data:
26
21
  * nothing in it is a function, a component or a route, because those are the blueprint's and are
@@ -33,18 +28,13 @@ interface Template {
33
28
  /** One line for the operator: what this crew does. */
34
29
  description: string;
35
30
  agents: AgentDecl[];
36
- /** The kinds this template's queue holds; the screens list them in this order. */
37
- kinds: TemplateKind[];
38
- /** The demo rows the store seeds on first run, keyed by collection (`clients`, `posts`, …). */
39
- seed: Record<string, unknown>;
40
- /** Every word a screen prints that changes with the template — headings, labels, onboarding copy. */
41
- words: Record<string, string>;
42
31
  }
43
32
  /**
44
33
  * Every blueprint and the templates it carries. `agency` defaults to `blank` — a working agency
45
34
  * with no specialism is a safe thing to get by accident. `media` has NO default on purpose: its
46
- * two crews spend money in different ways, so defaulting one of them is a bill the operator did
47
- * not choose. `web` carries one crew today, so `publisher` is its default for the reason `blank` is
35
+ * three crews spend money in different ways — a long-form piece renders a minute-plus of video
36
+ * where a clip only cuts one — so defaulting any of them is a bill the operator did not choose.
37
+ * `web` carries one crew today, so `publisher` is its default for the reason `blank` is
48
38
  * `agency`'s: the only thing you can get is the thing you meant.
49
39
  */
50
40
  declare const BLUEPRINTS: Record<string, {
@@ -114,9 +104,9 @@ declare const AgentDeclSchema: z.ZodObject<{
114
104
  cap_micro_usd: z.ZodNumber;
115
105
  max_task_micro_usd: z.ZodNumber;
116
106
  period: z.ZodEnum<{
107
+ month: "month";
117
108
  day: "day";
118
109
  week: "week";
119
- month: "month";
120
110
  }>;
121
111
  }, z.core.$strip>;
122
112
  description: z.ZodOptional<z.ZodString>;
@@ -127,16 +117,16 @@ declare const AgentDeclSchema: z.ZodObject<{
127
117
  default_config: z.ZodObject<{
128
118
  permission: z.ZodEnum<{
129
119
  allow: "allow";
130
- ask: "ask";
131
120
  deny: "deny";
121
+ ask: "ask";
132
122
  }>;
133
123
  }, z.core.$strip>;
134
124
  configs: z.ZodRecord<z.ZodString, z.ZodObject<{
135
125
  enabled: z.ZodBoolean;
136
126
  permission: z.ZodEnum<{
137
127
  allow: "allow";
138
- ask: "ask";
139
128
  deny: "deny";
129
+ ask: "ask";
140
130
  }>;
141
131
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
142
132
  }, z.core.$strip>>;
@@ -230,33 +220,9 @@ declare const SkillDeclSchema: z.ZodObject<{
230
220
  slug: z.ZodString;
231
221
  file: z.ZodString;
232
222
  }, z.core.$strip>;
233
- /**
234
- * `connections` is the accounts the studio asks an operator to connect to this persona BEFORE the
235
- * crew exists (`canonical-spec §31.10`): `social.from` names a declared `choice` question and
236
- * `social.map` maps its option labels to publishing networks. Published on the artifact, never read
237
- * by the apply.
238
- */
239
223
  declare const IdentityDeclSchema: z.ZodObject<{
240
224
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
241
225
  name: z.ZodString;
242
- connections: z.ZodOptional<z.ZodObject<{
243
- social: z.ZodOptional<z.ZodObject<{
244
- from: z.ZodString;
245
- map: z.ZodRecord<z.ZodString, z.ZodEnum<{
246
- bluesky: "bluesky";
247
- facebook: "facebook";
248
- instagram: "instagram";
249
- linkedin: "linkedin";
250
- mastodon: "mastodon";
251
- pinterest: "pinterest";
252
- reddit: "reddit";
253
- threads: "threads";
254
- tiktok: "tiktok";
255
- x: "x";
256
- youtube: "youtube";
257
- }>>;
258
- }, z.core.$strip>>;
259
- }, z.core.$strip>>;
260
226
  legal: z.ZodOptional<z.ZodArray<z.ZodObject<{
261
227
  description: z.ZodString;
262
228
  state: z.ZodEnum<{
@@ -359,6 +325,230 @@ declare const ProjectSchema: z.ZodObject<{
359
325
  name: z.ZodString;
360
326
  blueprint: z.ZodOptional<z.ZodString>;
361
327
  template: z.ZodOptional<z.ZodString>;
328
+ title: z.ZodOptional<z.ZodString>;
329
+ description: z.ZodOptional<z.ZodString>;
330
+ platforms: z.ZodOptional<z.ZodArray<z.ZodEnum<{
331
+ bluesky: "bluesky";
332
+ facebook: "facebook";
333
+ instagram: "instagram";
334
+ linkedin: "linkedin";
335
+ mastodon: "mastodon";
336
+ pinterest: "pinterest";
337
+ reddit: "reddit";
338
+ threads: "threads";
339
+ tiktok: "tiktok";
340
+ x: "x";
341
+ youtube: "youtube";
342
+ }>>>;
343
+ mini_apps: z.ZodOptional<z.ZodArray<z.ZodObject<{
344
+ slug: z.ZodString;
345
+ name: z.ZodString;
346
+ icon: z.ZodEnum<{
347
+ calendar: "calendar";
348
+ grid: "grid";
349
+ list: "list";
350
+ chart: "chart";
351
+ play: "play";
352
+ }>;
353
+ pages: z.ZodArray<z.ZodObject<{
354
+ slug: z.ZodString;
355
+ title: z.ZodString;
356
+ spec: z.ZodObject<{
357
+ root: z.ZodString;
358
+ elements: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
359
+ type: z.ZodLiteral<"Page">;
360
+ props: z.ZodObject<{}, z.core.$strict>;
361
+ children: z.ZodArray<z.ZodString>;
362
+ }, z.core.$strict>, z.ZodObject<{
363
+ type: z.ZodLiteral<"Section">;
364
+ props: z.ZodObject<{
365
+ title: z.ZodString;
366
+ to: z.ZodOptional<z.ZodString>;
367
+ hide_empty: z.ZodOptional<z.ZodBoolean>;
368
+ }, z.core.$strict>;
369
+ children: z.ZodArray<z.ZodString>;
370
+ }, z.core.$strict>, z.ZodObject<{
371
+ type: z.ZodLiteral<"Stack">;
372
+ props: z.ZodObject<{}, z.core.$strict>;
373
+ children: z.ZodArray<z.ZodString>;
374
+ }, z.core.$strict>, z.ZodObject<{
375
+ type: z.ZodLiteral<"Grid">;
376
+ props: z.ZodObject<{
377
+ columns: z.ZodLiteral<2 | 1 | 3>;
378
+ }, z.core.$strict>;
379
+ children: z.ZodArray<z.ZodString>;
380
+ }, z.core.$strict>, z.ZodObject<{
381
+ type: z.ZodLiteral<"Metric">;
382
+ props: z.ZodObject<{
383
+ label: z.ZodString;
384
+ value: z.ZodObject<{
385
+ $source: z.ZodEnum<{
386
+ views_total: "views_total";
387
+ spend_total: "spend_total";
388
+ }>;
389
+ days: z.ZodDefault<z.ZodNumber>;
390
+ }, z.core.$strict>;
391
+ delta: z.ZodOptional<z.ZodObject<{
392
+ $source: z.ZodEnum<{
393
+ views_change: "views_change";
394
+ }>;
395
+ }, z.core.$strict>>;
396
+ }, z.core.$strict>;
397
+ children: z.ZodOptional<z.ZodArray<z.ZodString>>;
398
+ }, z.core.$strict>, z.ZodObject<{
399
+ type: z.ZodLiteral<"LineChart">;
400
+ props: z.ZodObject<{
401
+ label: z.ZodOptional<z.ZodString>;
402
+ series: z.ZodObject<{
403
+ $source: z.ZodEnum<{
404
+ spend_by_day: "spend_by_day";
405
+ }>;
406
+ days: z.ZodDefault<z.ZodNumber>;
407
+ }, z.core.$strict>;
408
+ }, z.core.$strict>;
409
+ children: z.ZodOptional<z.ZodArray<z.ZodString>>;
410
+ }, z.core.$strict>, z.ZodObject<{
411
+ type: z.ZodLiteral<"BarList">;
412
+ props: z.ZodObject<{
413
+ label: z.ZodOptional<z.ZodString>;
414
+ bars: z.ZodObject<{
415
+ $source: z.ZodEnum<{
416
+ post_views: "post_views";
417
+ }>;
418
+ limit: z.ZodDefault<z.ZodNumber>;
419
+ }, z.core.$strict>;
420
+ }, z.core.$strict>;
421
+ children: z.ZodOptional<z.ZodArray<z.ZodString>>;
422
+ }, z.core.$strict>, z.ZodObject<{
423
+ type: z.ZodLiteral<"Progress">;
424
+ props: z.ZodObject<{
425
+ label: z.ZodString;
426
+ progress: z.ZodObject<{
427
+ $source: z.ZodEnum<{
428
+ posts_this_week: "posts_this_week";
429
+ }>;
430
+ }, z.core.$strict>;
431
+ }, z.core.$strict>;
432
+ children: z.ZodOptional<z.ZodArray<z.ZodString>>;
433
+ }, z.core.$strict>, z.ZodObject<{
434
+ type: z.ZodLiteral<"Roadmap">;
435
+ props: z.ZodObject<{
436
+ label: z.ZodOptional<z.ZodString>;
437
+ board: z.ZodObject<{
438
+ $source: z.ZodEnum<{
439
+ roadmap: "roadmap";
440
+ }>;
441
+ per_group: z.ZodDefault<z.ZodNumber>;
442
+ }, z.core.$strict>;
443
+ }, z.core.$strict>;
444
+ children: z.ZodOptional<z.ZodArray<z.ZodString>>;
445
+ }, z.core.$strict>, z.ZodObject<{
446
+ type: z.ZodLiteral<"Schedule">;
447
+ props: z.ZodObject<{
448
+ label: z.ZodOptional<z.ZodString>;
449
+ week: z.ZodObject<{
450
+ $source: z.ZodEnum<{
451
+ schedule: "schedule";
452
+ }>;
453
+ }, z.core.$strict>;
454
+ }, z.core.$strict>;
455
+ children: z.ZodOptional<z.ZodArray<z.ZodString>>;
456
+ }, z.core.$strict>, z.ZodObject<{
457
+ type: z.ZodLiteral<"Media">;
458
+ props: z.ZodObject<{
459
+ label: z.ZodOptional<z.ZodString>;
460
+ files: z.ZodObject<{
461
+ $source: z.ZodEnum<{
462
+ latest_media: "latest_media";
463
+ newest_media: "newest_media";
464
+ }>;
465
+ count: z.ZodDefault<z.ZodNumber>;
466
+ }, z.core.$strict>;
467
+ }, z.core.$strict>;
468
+ children: z.ZodOptional<z.ZodArray<z.ZodString>>;
469
+ }, z.core.$strict>, z.ZodObject<{
470
+ type: z.ZodLiteral<"Text">;
471
+ props: z.ZodObject<{
472
+ text: z.ZodString;
473
+ }, z.core.$strict>;
474
+ children: z.ZodOptional<z.ZodArray<z.ZodString>>;
475
+ }, z.core.$strict>, z.ZodObject<{
476
+ type: z.ZodLiteral<"Needs">;
477
+ props: z.ZodObject<{
478
+ label: z.ZodOptional<z.ZodString>;
479
+ needs: z.ZodObject<{
480
+ $source: z.ZodEnum<{
481
+ needs: "needs";
482
+ }>;
483
+ }, z.core.$strict>;
484
+ }, z.core.$strict>;
485
+ children: z.ZodOptional<z.ZodArray<z.ZodString>>;
486
+ }, z.core.$strict>, z.ZodObject<{
487
+ type: z.ZodLiteral<"Activity">;
488
+ props: z.ZodObject<{
489
+ label: z.ZodOptional<z.ZodString>;
490
+ agents: z.ZodObject<{
491
+ $source: z.ZodEnum<{
492
+ agents_activity: "agents_activity";
493
+ }>;
494
+ }, z.core.$strict>;
495
+ }, z.core.$strict>;
496
+ children: z.ZodOptional<z.ZodArray<z.ZodString>>;
497
+ }, z.core.$strict>, z.ZodObject<{
498
+ type: z.ZodLiteral<"Accounts">;
499
+ props: z.ZodObject<{
500
+ accounts: z.ZodObject<{
501
+ $source: z.ZodEnum<{
502
+ accounts: "accounts";
503
+ }>;
504
+ }, z.core.$strict>;
505
+ }, z.core.$strict>;
506
+ children: z.ZodOptional<z.ZodArray<z.ZodString>>;
507
+ }, z.core.$strict>, z.ZodObject<{
508
+ type: z.ZodLiteral<"Posts">;
509
+ props: z.ZodObject<{
510
+ label: z.ZodOptional<z.ZodString>;
511
+ layout: z.ZodOptional<z.ZodEnum<{
512
+ grid: "grid";
513
+ list: "list";
514
+ row: "row";
515
+ }>>;
516
+ posts: z.ZodObject<{
517
+ $source: z.ZodEnum<{
518
+ posts: "posts";
519
+ }>;
520
+ status: z.ZodUnion<readonly [z.ZodEnum<{
521
+ scheduled: "scheduled";
522
+ posted: "posted";
523
+ waiting: "waiting";
524
+ }>, z.ZodArray<z.ZodEnum<{
525
+ scheduled: "scheduled";
526
+ posted: "posted";
527
+ waiting: "waiting";
528
+ }>>]>;
529
+ limit: z.ZodDefault<z.ZodNumber>;
530
+ }, z.core.$strict>;
531
+ }, z.core.$strict>;
532
+ children: z.ZodOptional<z.ZodArray<z.ZodString>>;
533
+ }, z.core.$strict>, z.ZodObject<{
534
+ type: z.ZodLiteral<"Answers">;
535
+ props: z.ZodObject<{
536
+ answers: z.ZodObject<{
537
+ $source: z.ZodEnum<{
538
+ answers: "answers";
539
+ }>;
540
+ keys: z.ZodArray<z.ZodString>;
541
+ }, z.core.$strict>;
542
+ }, z.core.$strict>;
543
+ children: z.ZodOptional<z.ZodArray<z.ZodString>>;
544
+ }, z.core.$strict>, z.ZodObject<{
545
+ type: z.ZodLiteral<"MediaLibrary">;
546
+ props: z.ZodObject<{}, z.core.$strict>;
547
+ children: z.ZodOptional<z.ZodArray<z.ZodString>>;
548
+ }, z.core.$strict>], "type">>;
549
+ }, z.core.$strict>;
550
+ }, z.core.$strict>>;
551
+ }, z.core.$strict>>>;
362
552
  questions: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
363
553
  type: z.ZodLiteral<"text">;
364
554
  placeholder: z.ZodOptional<z.ZodString>;
@@ -383,24 +573,6 @@ declare const ProjectSchema: z.ZodObject<{
383
573
  identities: z.ZodDefault<z.ZodArray<z.ZodObject<{
384
574
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
385
575
  name: z.ZodString;
386
- connections: z.ZodOptional<z.ZodObject<{
387
- social: z.ZodOptional<z.ZodObject<{
388
- from: z.ZodString;
389
- map: z.ZodRecord<z.ZodString, z.ZodEnum<{
390
- bluesky: "bluesky";
391
- facebook: "facebook";
392
- instagram: "instagram";
393
- linkedin: "linkedin";
394
- mastodon: "mastodon";
395
- pinterest: "pinterest";
396
- reddit: "reddit";
397
- threads: "threads";
398
- tiktok: "tiktok";
399
- x: "x";
400
- youtube: "youtube";
401
- }>>;
402
- }, z.core.$strip>>;
403
- }, z.core.$strip>>;
404
576
  legal: z.ZodOptional<z.ZodArray<z.ZodObject<{
405
577
  description: z.ZodString;
406
578
  state: z.ZodEnum<{
@@ -531,9 +703,9 @@ declare const ProjectSchema: z.ZodObject<{
531
703
  cap_micro_usd: z.ZodNumber;
532
704
  max_task_micro_usd: z.ZodNumber;
533
705
  period: z.ZodEnum<{
706
+ month: "month";
534
707
  day: "day";
535
708
  week: "week";
536
- month: "month";
537
709
  }>;
538
710
  }, z.core.$strip>;
539
711
  description: z.ZodOptional<z.ZodString>;
@@ -544,16 +716,16 @@ declare const ProjectSchema: z.ZodObject<{
544
716
  default_config: z.ZodObject<{
545
717
  permission: z.ZodEnum<{
546
718
  allow: "allow";
547
- ask: "ask";
548
719
  deny: "deny";
720
+ ask: "ask";
549
721
  }>;
550
722
  }, z.core.$strip>;
551
723
  configs: z.ZodRecord<z.ZodString, z.ZodObject<{
552
724
  enabled: z.ZodBoolean;
553
725
  permission: z.ZodEnum<{
554
726
  allow: "allow";
555
- ask: "ask";
556
727
  deny: "deny";
728
+ ask: "ask";
557
729
  }>;
558
730
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
559
731
  }, z.core.$strip>>;
@@ -1060,4 +1232,4 @@ declare function up(config: Readonly<ProjectConfig>, client: VettaClient, opts?:
1060
1232
  */
1061
1233
  declare const PROJECT_CONTEXT_PREAMBLE: string;
1062
1234
 
1063
- export { type AgentDecl, type AppDecl, BLUEPRINTS, BlueprintRefusal, CONFIG_CANDIDATES, type ConfigLoad, type CredentialDecl, type CrewPerClientDecl, type DefineInput, type FileSource, type IdentityDecl, type MigrationFile, PLATFORM_ENV, PROJECT_CONTEXT_PREAMBLE, type PlatformEnv, type ProjectConfig, type ResourceAction, type ResourceReport, type ScheduleDecl, type SkillDecl, type TaskDecl, type Template, type TemplateChoice, type TemplateKind, type UpOptions, type UpReport, type VaultDecl, chooseTemplate, collectFiles, contentHash, defineProject, generatedPassword, generatedSecret, hasRoster, loadConfig, migrationFiles, parseProject, selectCrew, up };
1235
+ export { type AgentDecl, type AppDecl, BLUEPRINTS, BlueprintRefusal, CONFIG_CANDIDATES, type ConfigLoad, type CredentialDecl, type CrewPerClientDecl, type DefineInput, type FileSource, type IdentityDecl, type MigrationFile, PLATFORM_ENV, PROJECT_CONTEXT_PREAMBLE, type PlatformEnv, type ProjectConfig, type ResourceAction, type ResourceReport, type ScheduleDecl, type SkillDecl, type TaskDecl, type Template, type TemplateChoice, type UpOptions, type UpReport, type VaultDecl, chooseTemplate, collectFiles, contentHash, defineProject, generatedPassword, generatedSecret, hasRoster, loadConfig, migrationFiles, parseProject, selectCrew, up };