@usenaive-sdk/blueprints 0.8.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,12 +28,6 @@ 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
@@ -115,9 +104,9 @@ declare const AgentDeclSchema: z.ZodObject<{
115
104
  cap_micro_usd: z.ZodNumber;
116
105
  max_task_micro_usd: z.ZodNumber;
117
106
  period: z.ZodEnum<{
107
+ month: "month";
118
108
  day: "day";
119
109
  week: "week";
120
- month: "month";
121
110
  }>;
122
111
  }, z.core.$strip>;
123
112
  description: z.ZodOptional<z.ZodString>;
@@ -128,16 +117,16 @@ declare const AgentDeclSchema: z.ZodObject<{
128
117
  default_config: z.ZodObject<{
129
118
  permission: z.ZodEnum<{
130
119
  allow: "allow";
131
- ask: "ask";
132
120
  deny: "deny";
121
+ ask: "ask";
133
122
  }>;
134
123
  }, z.core.$strip>;
135
124
  configs: z.ZodRecord<z.ZodString, z.ZodObject<{
136
125
  enabled: z.ZodBoolean;
137
126
  permission: z.ZodEnum<{
138
127
  allow: "allow";
139
- ask: "ask";
140
128
  deny: "deny";
129
+ ask: "ask";
141
130
  }>;
142
131
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
143
132
  }, z.core.$strip>>;
@@ -231,33 +220,9 @@ declare const SkillDeclSchema: z.ZodObject<{
231
220
  slug: z.ZodString;
232
221
  file: z.ZodString;
233
222
  }, z.core.$strip>;
234
- /**
235
- * `connections` is the accounts the studio asks an operator to connect to this persona BEFORE the
236
- * crew exists (`canonical-spec §31.10`): `social.from` names a declared `choice` question and
237
- * `social.map` maps its option labels to publishing networks. Published on the artifact, never read
238
- * by the apply.
239
- */
240
223
  declare const IdentityDeclSchema: z.ZodObject<{
241
224
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
242
225
  name: z.ZodString;
243
- connections: z.ZodOptional<z.ZodObject<{
244
- social: z.ZodOptional<z.ZodObject<{
245
- from: z.ZodString;
246
- map: z.ZodRecord<z.ZodString, z.ZodEnum<{
247
- bluesky: "bluesky";
248
- facebook: "facebook";
249
- instagram: "instagram";
250
- linkedin: "linkedin";
251
- mastodon: "mastodon";
252
- pinterest: "pinterest";
253
- reddit: "reddit";
254
- threads: "threads";
255
- tiktok: "tiktok";
256
- x: "x";
257
- youtube: "youtube";
258
- }>>;
259
- }, z.core.$strip>>;
260
- }, z.core.$strip>>;
261
226
  legal: z.ZodOptional<z.ZodArray<z.ZodObject<{
262
227
  description: z.ZodString;
263
228
  state: z.ZodEnum<{
@@ -360,6 +325,230 @@ declare const ProjectSchema: z.ZodObject<{
360
325
  name: z.ZodString;
361
326
  blueprint: z.ZodOptional<z.ZodString>;
362
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>>>;
363
552
  questions: z.ZodDefault<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
364
553
  type: z.ZodLiteral<"text">;
365
554
  placeholder: z.ZodOptional<z.ZodString>;
@@ -384,24 +573,6 @@ declare const ProjectSchema: z.ZodObject<{
384
573
  identities: z.ZodDefault<z.ZodArray<z.ZodObject<{
385
574
  description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
386
575
  name: z.ZodString;
387
- connections: z.ZodOptional<z.ZodObject<{
388
- social: z.ZodOptional<z.ZodObject<{
389
- from: z.ZodString;
390
- map: z.ZodRecord<z.ZodString, z.ZodEnum<{
391
- bluesky: "bluesky";
392
- facebook: "facebook";
393
- instagram: "instagram";
394
- linkedin: "linkedin";
395
- mastodon: "mastodon";
396
- pinterest: "pinterest";
397
- reddit: "reddit";
398
- threads: "threads";
399
- tiktok: "tiktok";
400
- x: "x";
401
- youtube: "youtube";
402
- }>>;
403
- }, z.core.$strip>>;
404
- }, z.core.$strip>>;
405
576
  legal: z.ZodOptional<z.ZodArray<z.ZodObject<{
406
577
  description: z.ZodString;
407
578
  state: z.ZodEnum<{
@@ -532,9 +703,9 @@ declare const ProjectSchema: z.ZodObject<{
532
703
  cap_micro_usd: z.ZodNumber;
533
704
  max_task_micro_usd: z.ZodNumber;
534
705
  period: z.ZodEnum<{
706
+ month: "month";
535
707
  day: "day";
536
708
  week: "week";
537
- month: "month";
538
709
  }>;
539
710
  }, z.core.$strip>;
540
711
  description: z.ZodOptional<z.ZodString>;
@@ -545,16 +716,16 @@ declare const ProjectSchema: z.ZodObject<{
545
716
  default_config: z.ZodObject<{
546
717
  permission: z.ZodEnum<{
547
718
  allow: "allow";
548
- ask: "ask";
549
719
  deny: "deny";
720
+ ask: "ask";
550
721
  }>;
551
722
  }, z.core.$strip>;
552
723
  configs: z.ZodRecord<z.ZodString, z.ZodObject<{
553
724
  enabled: z.ZodBoolean;
554
725
  permission: z.ZodEnum<{
555
726
  allow: "allow";
556
- ask: "ask";
557
727
  deny: "deny";
728
+ ask: "ask";
558
729
  }>;
559
730
  config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
560
731
  }, z.core.$strip>>;
@@ -1061,4 +1232,4 @@ declare function up(config: Readonly<ProjectConfig>, client: VettaClient, opts?:
1061
1232
  */
1062
1233
  declare const PROJECT_CONTEXT_PREAMBLE: string;
1063
1234
 
1064
- 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 };