@usenaive-sdk/blueprints 0.9.0 → 0.10.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
@@ -561,6 +561,18 @@ declare const ProjectSchema: z.ZodObject<{
561
561
  options: z.ZodArray<z.ZodString>;
562
562
  multiple: z.ZodDefault<z.ZodBoolean>;
563
563
  other: z.ZodDefault<z.ZodBoolean>;
564
+ details: z.ZodOptional<z.ZodArray<z.ZodObject<{
565
+ option: z.ZodString;
566
+ note: z.ZodOptional<z.ZodString>;
567
+ image: z.ZodOptional<z.ZodString>;
568
+ }, z.core.$strip>>>;
569
+ key: z.ZodString;
570
+ label: z.ZodString;
571
+ help: z.ZodOptional<z.ZodString>;
572
+ optional: z.ZodOptional<z.ZodBoolean>;
573
+ }, z.core.$strip>, z.ZodObject<{
574
+ type: z.ZodLiteral<"media">;
575
+ placeholder: z.ZodOptional<z.ZodString>;
564
576
  key: z.ZodString;
565
577
  label: z.ZodString;
566
578
  help: z.ZodOptional<z.ZodString>;
@@ -845,10 +857,10 @@ declare function defineProject({ templates, ...input }: DefineInput): Readonly<P
845
857
  * names unchanged, so nothing downstream of it learns a second word for the same thing.
846
858
  */
847
859
  declare const ResourceActionSchema: z.ZodEnum<{
860
+ deleted: "deleted";
848
861
  created: "created";
849
862
  updated: "updated";
850
863
  unchanged: "unchanged";
851
- deleted: "deleted";
852
864
  refused: "refused";
853
865
  }>;
854
866
  type ResourceAction = z.infer<typeof ResourceActionSchema>;
@@ -856,10 +868,10 @@ type ResourceAction = z.infer<typeof ResourceActionSchema>;
856
868
  declare const ResourceReportSchema: z.ZodObject<{
857
869
  name: z.ZodString;
858
870
  action: z.ZodEnum<{
871
+ deleted: "deleted";
859
872
  created: "created";
860
873
  updated: "updated";
861
874
  unchanged: "unchanged";
862
- deleted: "deleted";
863
875
  refused: "refused";
864
876
  }>;
865
877
  id: z.ZodOptional<z.ZodString>;
@@ -1188,6 +1200,13 @@ interface UpOptions {
1188
1200
  * applied install lands on the row that exists.
1189
1201
  */
1190
1202
  project?: string;
1203
+ /**
1204
+ * An install that shares the organization by its own names (ADR-1104, `scoped.ts`): its crew is
1205
+ * filed under `project` rather than the template, and an identity is stamped with `project` and
1206
+ * adopted only when it already carries it — another project's persona, or one nobody stamped, is
1207
+ * refused rather than taken. Absent is every apply before that rule, exactly as it was.
1208
+ */
1209
+ isolated?: boolean;
1191
1210
  /**
1192
1211
  * What dials an app's own address before its crew is briefed (`awaitServing`). The platform's
1193
1212
  * `fetch` by default; a test hands in a fake. It is NOT the client's `fetch`, which on a hosted
@@ -1204,6 +1223,28 @@ declare function selectCrew(config: Readonly<ProjectConfig>, select: BlueprintSe
1204
1223
  /** Plan → apply → report. Every refusal is one line in the report, never a thrown escape. */
1205
1224
  declare function up(config: Readonly<ProjectConfig>, client: VettaClient, opts?: UpOptions): Promise<UpReport>;
1206
1225
 
1226
+ /**
1227
+ * ONE TEMPLATE, TWICE IN ONE ORGANIZATION (`canonical-spec §29.6`, ADR-1104).
1228
+ *
1229
+ * Everything `up()` provisions is keyed by name in the organization, and ADR-0785 refuses a name
1230
+ * another project holds — so a second install of a template found every agent taken and hired no
1231
+ * one. An install that must share the organization with those names takes its own: every agent,
1232
+ * app, identity and vault name, and every reference to one, starts with the install's prefix. The
1233
+ * API decides the prefix once, when the install row is created, and passes it here on every apply.
1234
+ *
1235
+ * `config.name` becomes the install's `project`, so app ownership (ADR-0375), `NAIVE_PROJECT` and
1236
+ * the board's card keys (`<project>:<key>`) are the install's own and never another install's.
1237
+ *
1238
+ * Prose is not rewritten. A system prompt that says "hand the script to the editor" still says it;
1239
+ * the agent is told, in one generated line at the end of its `system`, what each name is here.
1240
+ */
1241
+
1242
+ /**
1243
+ * The config an install with `prefix` applies. `""` renames nothing and only files it under `project`.
1244
+ * Skills stay shared by slug, so no install's `removed` deletes one another install's crew runs.
1245
+ */
1246
+ declare function scoped(config: Readonly<ProjectConfig>, prefix: string, project: string): ProjectConfig;
1247
+
1207
1248
  /**
1208
1249
  * Agents in `naive up`: upsert by name with a drift-only PATCH, `allowed_apps` names resolved to
1209
1250
  * app ids in the `apps` tool config (§29.3), the platform config passthrough (`system`, `skills`,
@@ -1232,4 +1273,4 @@ declare function up(config: Readonly<ProjectConfig>, client: VettaClient, opts?:
1232
1273
  */
1233
1274
  declare const PROJECT_CONTEXT_PREAMBLE: string;
1234
1275
 
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 };
1276
+ 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, scoped, selectCrew, up };