@vectros-ai/blueprints 0.5.0 → 0.6.3

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 CHANGED
@@ -3,6 +3,73 @@
3
3
  All notable changes to `@vectros-ai/blueprints` are documented here.
4
4
  This project adheres to [Semantic Versioning](https://semver.org).
5
5
 
6
+ ## 0.6.3 — 2026-07-01
7
+
8
+ ### Added
9
+
10
+ - **`agentic-sdlc` now declares an `editor` role for the human owner.** `bootstrap`
11
+ provisions a scoped key for your *agent*, but doesn't join *you* — so a blueprint's
12
+ context doesn't appear in the data-plane app until your own user is granted access
13
+ there. The blueprint now ships a reusable `editor` role at **parity with the service
14
+ key** (`records:r/c/u`, `search:r`, `schemas:r`, `inference:r`, `documents:r/c`,
15
+ `folders:r/c`; no delete, no control-plane), which `bootstrap` creates in the context.
16
+ Bind it to your user once to browse and curate the KB in the app:
17
+ `vectros access grant --principal usr_<your-user-id> --context agentic-sdlc --role editor`
18
+ (or via the admin app's Access → Contexts → Profiles). The guide and walkthrough
19
+ document the one-time join, and the package README now documents the top-level
20
+ `roles` format field (previously undocumented — no bundled blueprint used it).
21
+
22
+ ## 0.6.2 — 2026-06-29
23
+
24
+ ### Changed
25
+
26
+ - **`agentic-sdlc` ingest guidance corrected for explicit upsert.** The guide and the
27
+ ingest-agent prompt now describe syncing accurately: re-ingesting an unchanged item
28
+ returns it as-is (`created: false`), and propagating **edited** source requires
29
+ `upsert: true` — a plain re-create returns the existing item unchanged rather than
30
+ applying the edit. Pick stable `externalId`s and re-ingest with `upsert` to keep the
31
+ knowledge base in sync; a from-scratch rebuild into an empty context is unaffected.
32
+
33
+ ## 0.6.1 — 2026-06-28
34
+
35
+ ### Added
36
+
37
+ - New bundled blueprint **`agentic-sdlc`** — a whole-SDLC system of
38
+ record for an AI development team, organized by **content vs structure**. Nine
39
+ schemas: ADRs (`decision`), `design`/specs, `reference`, `runbook`, and
40
+ `postmortem` bind the **document** surface (the markdown body is the artifact);
41
+ `control`, `convention`, `gotcha`, and a glossary `term` are **records** (the
42
+ typed fields are the artifact). They form a **cross-surface knowledge graph** —
43
+ records reference documents (`control` → the `runbook` that verifies it;
44
+ `convention`/`term` → the `decision` behind them) and documents reference
45
+ documents (a `design` → its `decision`, a `runbook` → the `postmortem` it was
46
+ born from, an ADR → the one it supersedes). Shows hybrid search + grounded
47
+ `rag_ask` over document bodies, range/sort on every artifact's date, a
48
+ governance `control` that carries its evidence, a `convention` with distinct
49
+ rule/why/howToApply fields, and a glossary `term` with a `unique` lookup. Ships
50
+ without bundled seeds (the cross-surface graph is populated by the ingest agent).
51
+ - Usage guide (`guides/agentic-sdlc.md`) and drop-in agent orientation prompt
52
+ (`prompts/agentic-sdlc-agent.md`) shipped with the package.
53
+
54
+ ## 0.6.0 — 2026-06-28
55
+
56
+ ### Added
57
+
58
+ - **Document seeds.** A seed entry now declares a **surface**: `surface: record`
59
+ (a structured record — the existing behavior) or `surface: document` (a
60
+ text-ingested document carrying a `title` and `text`, with optional structured
61
+ `fields`). A blueprint can now pre-populate documents, not just records, and
62
+ model a **cross-surface graph** — a record's `reference` can target a seeded
63
+ document by `externalId`, and vice versa. A seed's surface is validated against
64
+ the bound schema's `allowedSurfaces`.
65
+
66
+ ### Changed
67
+
68
+ - **Breaking (format):** every seed entry must now declare `surface`. Existing
69
+ record seeds add `surface: record`. The discriminator is explicit by design — a
70
+ document seed's first-class `title`/`text` are distinct from a record's
71
+ `fields`, so the two shapes are validated separately.
72
+
6
73
  ## 0.5.0 — 2026-06-20
7
74
 
8
75
  Initial public release of the Vectros blueprints library.
package/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # @vectros-ai/blueprints
2
2
 
3
+ [![npm](https://img.shields.io/npm/v/@vectros-ai/blueprints)](https://www.npmjs.com/package/@vectros-ai/blueprints)
4
+ [![license](https://img.shields.io/npm/l/@vectros-ai/blueprints)](https://www.apache.org/licenses/LICENSE-2.0)
5
+
3
6
  The Vectros **blueprint** format + the curated bundled library.
4
7
 
5
8
  A **blueprint** is a versioned, reviewed bundle for one use case: a schema
@@ -39,8 +42,14 @@ already-parsed object. Both throw `BlueprintValidationError` on a bad shape.
39
42
  `MCP — <name>` when the blueprint omits `contextName`.
40
43
  - `BUNDLED_BLUEPRINTS` / `BLUEPRINT_NAMES` / `getBlueprint(name)` — the
41
44
  curated library: `task-management` (the minimal authoring exemplar),
42
- `coding-agent-memory`, `second-brain`, and `clinical-intake` (the flagship
43
- use-case blueprints).
45
+ `coding-agent-memory`, `agentic-sdlc` (a whole-SDLC system of
46
+ record for an AI dev team: nine schemas split by content vs structure — ADRs,
47
+ designs, references, runbooks, and post-mortems as **documents**; controls,
48
+ conventions, gotchas, and a glossary as **records** — linked into a
49
+ **cross-surface** knowledge graph, with hybrid search + grounded `rag_ask`; see
50
+ [`guides/agentic-sdlc.md`](guides/agentic-sdlc.md) and the drop-in agent prompt
51
+ [`prompts/agentic-sdlc-agent.md`](prompts/agentic-sdlc-agent.md)),
52
+ `second-brain`, and `clinical-intake` (the PHI/sensitive-field exemplar).
44
53
 
45
54
  ## The format, field by field
46
55
 
@@ -106,6 +115,16 @@ The `accessProfile.dataScope` value lists accept a **`null` sentinel** — e.g.
106
115
  (owner-less / shared) records. Omitting `null` restricts the key to the listed
107
116
  owners only.
108
117
 
118
+ A blueprint may also declare top-level **`roles`** — a map of `roleId` → ordered
119
+ scope clauses (each an `allowedActions` list with an optional `dataScope`). Unlike
120
+ `accessProfile` (which scopes the service-principal key `bootstrap` mints), roles
121
+ are reusable, identity-agnostic rules you bind to a principal *after* bootstrap with
122
+ `vectros access grant --principal <p> --role <roleId>`. `bootstrap` provisions the
123
+ declared roles in the context but binds them to no one. The bundled `agentic-sdlc`
124
+ ships an `editor` role for this — join your own user to the context so you can
125
+ browse and curate the knowledge base in the app. Role clauses pass the same
126
+ data-plane scope gate as `accessProfile`.
127
+
109
128
  All of the above are **optional and backward-compatible** — a blueprint that
110
129
  omits them parses and provisions exactly as before.
111
130
 
package/dist/index.d.mts CHANGED
@@ -751,19 +751,89 @@ declare const IdentitiesDeclSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
751
751
  displayName?: string | undefined;
752
752
  metadata?: Record<string, unknown> | undefined;
753
753
  }>>;
754
- declare const BlueprintSeedRecordSchema: z.ZodObject<{
754
+ declare const RecordSeedSchema: z.ZodObject<{
755
+ /** The record payload, validated against the bound schema. */
756
+ fields: z.ZodRecord<z.ZodString, z.ZodUnknown>;
755
757
  typeName: z.ZodString;
756
758
  externalId: z.ZodString;
757
- fields: z.ZodRecord<z.ZodString, z.ZodUnknown>;
759
+ surface: z.ZodLiteral<"record">;
758
760
  }, "strict", z.ZodTypeAny, {
759
761
  typeName: string;
760
762
  fields: Record<string, unknown>;
761
763
  externalId: string;
764
+ surface: "record";
762
765
  }, {
763
766
  typeName: string;
764
767
  fields: Record<string, unknown>;
765
768
  externalId: string;
769
+ surface: "record";
766
770
  }>;
771
+ declare const DocumentSeedSchema: z.ZodObject<{
772
+ /** Human-readable document title — REQUIRED by the text-ingest path. */
773
+ title: z.ZodString;
774
+ /** Raw text content to ingest + index — REQUIRED and non-empty (the platform rejects a blank ingest). */
775
+ text: z.ZodString;
776
+ /** Optional structured payload bound to the schema (the document's `fields`). */
777
+ fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
778
+ typeName: z.ZodString;
779
+ externalId: z.ZodString;
780
+ surface: z.ZodLiteral<"document">;
781
+ }, "strict", z.ZodTypeAny, {
782
+ typeName: string;
783
+ text: string;
784
+ externalId: string;
785
+ surface: "document";
786
+ title: string;
787
+ fields?: Record<string, unknown> | undefined;
788
+ }, {
789
+ typeName: string;
790
+ text: string;
791
+ externalId: string;
792
+ surface: "document";
793
+ title: string;
794
+ fields?: Record<string, unknown> | undefined;
795
+ }>;
796
+ declare const BlueprintSeedRecordSchema: z.ZodDiscriminatedUnion<"surface", [z.ZodObject<{
797
+ /** The record payload, validated against the bound schema. */
798
+ fields: z.ZodRecord<z.ZodString, z.ZodUnknown>;
799
+ typeName: z.ZodString;
800
+ externalId: z.ZodString;
801
+ surface: z.ZodLiteral<"record">;
802
+ }, "strict", z.ZodTypeAny, {
803
+ typeName: string;
804
+ fields: Record<string, unknown>;
805
+ externalId: string;
806
+ surface: "record";
807
+ }, {
808
+ typeName: string;
809
+ fields: Record<string, unknown>;
810
+ externalId: string;
811
+ surface: "record";
812
+ }>, z.ZodObject<{
813
+ /** Human-readable document title — REQUIRED by the text-ingest path. */
814
+ title: z.ZodString;
815
+ /** Raw text content to ingest + index — REQUIRED and non-empty (the platform rejects a blank ingest). */
816
+ text: z.ZodString;
817
+ /** Optional structured payload bound to the schema (the document's `fields`). */
818
+ fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
819
+ typeName: z.ZodString;
820
+ externalId: z.ZodString;
821
+ surface: z.ZodLiteral<"document">;
822
+ }, "strict", z.ZodTypeAny, {
823
+ typeName: string;
824
+ text: string;
825
+ externalId: string;
826
+ surface: "document";
827
+ title: string;
828
+ fields?: Record<string, unknown> | undefined;
829
+ }, {
830
+ typeName: string;
831
+ text: string;
832
+ externalId: string;
833
+ surface: "document";
834
+ title: string;
835
+ fields?: Record<string, unknown> | undefined;
836
+ }>]>;
767
837
  declare const BlueprintSchema: z.ZodEffects<z.ZodObject<{
768
838
  /** Stable blueprint id (the `--blueprint <name>` selector + idempotency key). */
769
839
  name: z.ZodString;
@@ -1167,19 +1237,47 @@ declare const BlueprintSchema: z.ZodEffects<z.ZodObject<{
1167
1237
  displayName: string;
1168
1238
  externalId: string;
1169
1239
  }>;
1170
- seed: z.ZodOptional<z.ZodArray<z.ZodObject<{
1240
+ seed: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"surface", [z.ZodObject<{
1241
+ /** The record payload, validated against the bound schema. */
1242
+ fields: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1171
1243
  typeName: z.ZodString;
1172
1244
  externalId: z.ZodString;
1173
- fields: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1245
+ surface: z.ZodLiteral<"record">;
1174
1246
  }, "strict", z.ZodTypeAny, {
1175
1247
  typeName: string;
1176
1248
  fields: Record<string, unknown>;
1177
1249
  externalId: string;
1250
+ surface: "record";
1178
1251
  }, {
1179
1252
  typeName: string;
1180
1253
  fields: Record<string, unknown>;
1181
1254
  externalId: string;
1182
- }>, "many">>;
1255
+ surface: "record";
1256
+ }>, z.ZodObject<{
1257
+ /** Human-readable document title — REQUIRED by the text-ingest path. */
1258
+ title: z.ZodString;
1259
+ /** Raw text content to ingest + index — REQUIRED and non-empty (the platform rejects a blank ingest). */
1260
+ text: z.ZodString;
1261
+ /** Optional structured payload bound to the schema (the document's `fields`). */
1262
+ fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1263
+ typeName: z.ZodString;
1264
+ externalId: z.ZodString;
1265
+ surface: z.ZodLiteral<"document">;
1266
+ }, "strict", z.ZodTypeAny, {
1267
+ typeName: string;
1268
+ text: string;
1269
+ externalId: string;
1270
+ surface: "document";
1271
+ title: string;
1272
+ fields?: Record<string, unknown> | undefined;
1273
+ }, {
1274
+ typeName: string;
1275
+ text: string;
1276
+ externalId: string;
1277
+ surface: "document";
1278
+ title: string;
1279
+ fields?: Record<string, unknown> | undefined;
1280
+ }>]>, "many">>;
1183
1281
  /** Optional multi-clause roles, bound to principals via `access grant --role`. */
1184
1282
  roles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
1185
1283
  allowedActions: z.ZodArray<z.ZodString, "many">;
@@ -1280,11 +1378,19 @@ declare const BlueprintSchema: z.ZodEffects<z.ZodObject<{
1280
1378
  externalId: string;
1281
1379
  };
1282
1380
  contextName?: string | undefined;
1283
- seed?: {
1381
+ seed?: ({
1284
1382
  typeName: string;
1285
1383
  fields: Record<string, unknown>;
1286
1384
  externalId: string;
1287
- }[] | undefined;
1385
+ surface: "record";
1386
+ } | {
1387
+ typeName: string;
1388
+ text: string;
1389
+ externalId: string;
1390
+ surface: "document";
1391
+ title: string;
1392
+ fields?: Record<string, unknown> | undefined;
1393
+ })[] | undefined;
1288
1394
  roles?: Record<string, {
1289
1395
  allowedActions: string[];
1290
1396
  dataScope?: Record<string, (string | null)[]> | undefined;
@@ -1367,11 +1473,19 @@ declare const BlueprintSchema: z.ZodEffects<z.ZodObject<{
1367
1473
  orgId?: string | undefined;
1368
1474
  clientId?: string | undefined;
1369
1475
  }[] | undefined;
1370
- seed?: {
1476
+ seed?: ({
1371
1477
  typeName: string;
1372
1478
  fields: Record<string, unknown>;
1373
1479
  externalId: string;
1374
- }[] | undefined;
1480
+ surface: "record";
1481
+ } | {
1482
+ typeName: string;
1483
+ text: string;
1484
+ externalId: string;
1485
+ surface: "document";
1486
+ title: string;
1487
+ fields?: Record<string, unknown> | undefined;
1488
+ })[] | undefined;
1375
1489
  roles?: Record<string, {
1376
1490
  allowedActions: string[];
1377
1491
  dataScope?: Record<string, (string | null)[]> | undefined;
@@ -1454,11 +1568,19 @@ declare const BlueprintSchema: z.ZodEffects<z.ZodObject<{
1454
1568
  externalId: string;
1455
1569
  };
1456
1570
  contextName?: string | undefined;
1457
- seed?: {
1571
+ seed?: ({
1458
1572
  typeName: string;
1459
1573
  fields: Record<string, unknown>;
1460
1574
  externalId: string;
1461
- }[] | undefined;
1575
+ surface: "record";
1576
+ } | {
1577
+ typeName: string;
1578
+ text: string;
1579
+ externalId: string;
1580
+ surface: "document";
1581
+ title: string;
1582
+ fields?: Record<string, unknown> | undefined;
1583
+ })[] | undefined;
1462
1584
  roles?: Record<string, {
1463
1585
  allowedActions: string[];
1464
1586
  dataScope?: Record<string, (string | null)[]> | undefined;
@@ -1541,11 +1663,19 @@ declare const BlueprintSchema: z.ZodEffects<z.ZodObject<{
1541
1663
  orgId?: string | undefined;
1542
1664
  clientId?: string | undefined;
1543
1665
  }[] | undefined;
1544
- seed?: {
1666
+ seed?: ({
1545
1667
  typeName: string;
1546
1668
  fields: Record<string, unknown>;
1547
1669
  externalId: string;
1548
- }[] | undefined;
1670
+ surface: "record";
1671
+ } | {
1672
+ typeName: string;
1673
+ text: string;
1674
+ externalId: string;
1675
+ surface: "document";
1676
+ title: string;
1677
+ fields?: Record<string, unknown> | undefined;
1678
+ })[] | undefined;
1549
1679
  roles?: Record<string, {
1550
1680
  allowedActions: string[];
1551
1681
  dataScope?: Record<string, (string | null)[]> | undefined;
@@ -1560,7 +1690,14 @@ declare const BlueprintSchema: z.ZodEffects<z.ZodObject<{
1560
1690
  type Blueprint = z.infer<typeof BlueprintSchema>;
1561
1691
  type BlueprintFieldDef = z.infer<typeof BlueprintFieldDefSchema>;
1562
1692
  type BlueprintSchemaDef = z.infer<typeof BlueprintSchemaSchema>;
1563
- type BlueprintSeedRecord = z.infer<typeof BlueprintSeedRecordSchema>;
1693
+ /** A single seed entry — a record seed OR a document seed (discriminated on `surface`). */
1694
+ type BlueprintSeed = z.infer<typeof BlueprintSeedRecordSchema>;
1695
+ /** The record-surface seed variant (`surface: 'record'`; the default). */
1696
+ type BlueprintRecordSeed = z.infer<typeof RecordSeedSchema>;
1697
+ /** The document-surface seed variant (`surface: 'document'`; carries `title` + `text`). */
1698
+ type BlueprintDocumentSeed = z.infer<typeof DocumentSeedSchema>;
1699
+ /** @deprecated The element type of `seed[]`, now a union — use {@link BlueprintSeed}. */
1700
+ type BlueprintSeedRecord = BlueprintSeed;
1564
1701
  type BlueprintValidationRules = z.infer<typeof ValidationRulesSchema>;
1565
1702
  type BlueprintRenderHints = z.infer<typeof RenderHintsSchema>;
1566
1703
  type BlueprintLookupField = z.infer<typeof BlueprintLookupFieldSchema>;
@@ -1769,4 +1906,4 @@ declare const BLUEPRINT_NAMES: readonly string[];
1769
1906
  /** Look up a bundled blueprint by name; `undefined` if none matches. */
1770
1907
  declare function getBlueprint(name: string): Blueprint | undefined;
1771
1908
 
1772
- export { BLUEPRINT_NAMES, BUNDLED_BLUEPRINTS, type Blueprint, type BlueprintFieldDef, BlueprintIdentityError, BlueprintInputError, type BlueprintIssue, type BlueprintLookupField, type BlueprintRenderHints, type BlueprintRoleClause, type BlueprintRoles, BlueprintSchema, type BlueprintSchemaDef, type BlueprintSeedRecord, BlueprintValidationError, type BlueprintValidationRules, type IdentitiesDecl, type IdentityDecl, type IdentityResolver, type InputDecl, type InputScalar, type InputsDecl, InputsDeclSchema, collectIdentityReferences, contextNameOf, deriveSuffix, getBlueprint, parseBlueprint, parseBlueprintJson, resolveBlueprintIdentities, resolveBlueprintInputs };
1909
+ export { BLUEPRINT_NAMES, BUNDLED_BLUEPRINTS, type Blueprint, type BlueprintDocumentSeed, type BlueprintFieldDef, BlueprintIdentityError, BlueprintInputError, type BlueprintIssue, type BlueprintLookupField, type BlueprintRecordSeed, type BlueprintRenderHints, type BlueprintRoleClause, type BlueprintRoles, BlueprintSchema, type BlueprintSchemaDef, type BlueprintSeed, type BlueprintSeedRecord, BlueprintValidationError, type BlueprintValidationRules, type IdentitiesDecl, type IdentityDecl, type IdentityResolver, type InputDecl, type InputScalar, type InputsDecl, InputsDeclSchema, collectIdentityReferences, contextNameOf, deriveSuffix, getBlueprint, parseBlueprint, parseBlueprintJson, resolveBlueprintIdentities, resolveBlueprintInputs };
package/dist/index.d.ts CHANGED
@@ -751,19 +751,89 @@ declare const IdentitiesDeclSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
751
751
  displayName?: string | undefined;
752
752
  metadata?: Record<string, unknown> | undefined;
753
753
  }>>;
754
- declare const BlueprintSeedRecordSchema: z.ZodObject<{
754
+ declare const RecordSeedSchema: z.ZodObject<{
755
+ /** The record payload, validated against the bound schema. */
756
+ fields: z.ZodRecord<z.ZodString, z.ZodUnknown>;
755
757
  typeName: z.ZodString;
756
758
  externalId: z.ZodString;
757
- fields: z.ZodRecord<z.ZodString, z.ZodUnknown>;
759
+ surface: z.ZodLiteral<"record">;
758
760
  }, "strict", z.ZodTypeAny, {
759
761
  typeName: string;
760
762
  fields: Record<string, unknown>;
761
763
  externalId: string;
764
+ surface: "record";
762
765
  }, {
763
766
  typeName: string;
764
767
  fields: Record<string, unknown>;
765
768
  externalId: string;
769
+ surface: "record";
766
770
  }>;
771
+ declare const DocumentSeedSchema: z.ZodObject<{
772
+ /** Human-readable document title — REQUIRED by the text-ingest path. */
773
+ title: z.ZodString;
774
+ /** Raw text content to ingest + index — REQUIRED and non-empty (the platform rejects a blank ingest). */
775
+ text: z.ZodString;
776
+ /** Optional structured payload bound to the schema (the document's `fields`). */
777
+ fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
778
+ typeName: z.ZodString;
779
+ externalId: z.ZodString;
780
+ surface: z.ZodLiteral<"document">;
781
+ }, "strict", z.ZodTypeAny, {
782
+ typeName: string;
783
+ text: string;
784
+ externalId: string;
785
+ surface: "document";
786
+ title: string;
787
+ fields?: Record<string, unknown> | undefined;
788
+ }, {
789
+ typeName: string;
790
+ text: string;
791
+ externalId: string;
792
+ surface: "document";
793
+ title: string;
794
+ fields?: Record<string, unknown> | undefined;
795
+ }>;
796
+ declare const BlueprintSeedRecordSchema: z.ZodDiscriminatedUnion<"surface", [z.ZodObject<{
797
+ /** The record payload, validated against the bound schema. */
798
+ fields: z.ZodRecord<z.ZodString, z.ZodUnknown>;
799
+ typeName: z.ZodString;
800
+ externalId: z.ZodString;
801
+ surface: z.ZodLiteral<"record">;
802
+ }, "strict", z.ZodTypeAny, {
803
+ typeName: string;
804
+ fields: Record<string, unknown>;
805
+ externalId: string;
806
+ surface: "record";
807
+ }, {
808
+ typeName: string;
809
+ fields: Record<string, unknown>;
810
+ externalId: string;
811
+ surface: "record";
812
+ }>, z.ZodObject<{
813
+ /** Human-readable document title — REQUIRED by the text-ingest path. */
814
+ title: z.ZodString;
815
+ /** Raw text content to ingest + index — REQUIRED and non-empty (the platform rejects a blank ingest). */
816
+ text: z.ZodString;
817
+ /** Optional structured payload bound to the schema (the document's `fields`). */
818
+ fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
819
+ typeName: z.ZodString;
820
+ externalId: z.ZodString;
821
+ surface: z.ZodLiteral<"document">;
822
+ }, "strict", z.ZodTypeAny, {
823
+ typeName: string;
824
+ text: string;
825
+ externalId: string;
826
+ surface: "document";
827
+ title: string;
828
+ fields?: Record<string, unknown> | undefined;
829
+ }, {
830
+ typeName: string;
831
+ text: string;
832
+ externalId: string;
833
+ surface: "document";
834
+ title: string;
835
+ fields?: Record<string, unknown> | undefined;
836
+ }>]>;
767
837
  declare const BlueprintSchema: z.ZodEffects<z.ZodObject<{
768
838
  /** Stable blueprint id (the `--blueprint <name>` selector + idempotency key). */
769
839
  name: z.ZodString;
@@ -1167,19 +1237,47 @@ declare const BlueprintSchema: z.ZodEffects<z.ZodObject<{
1167
1237
  displayName: string;
1168
1238
  externalId: string;
1169
1239
  }>;
1170
- seed: z.ZodOptional<z.ZodArray<z.ZodObject<{
1240
+ seed: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"surface", [z.ZodObject<{
1241
+ /** The record payload, validated against the bound schema. */
1242
+ fields: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1171
1243
  typeName: z.ZodString;
1172
1244
  externalId: z.ZodString;
1173
- fields: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1245
+ surface: z.ZodLiteral<"record">;
1174
1246
  }, "strict", z.ZodTypeAny, {
1175
1247
  typeName: string;
1176
1248
  fields: Record<string, unknown>;
1177
1249
  externalId: string;
1250
+ surface: "record";
1178
1251
  }, {
1179
1252
  typeName: string;
1180
1253
  fields: Record<string, unknown>;
1181
1254
  externalId: string;
1182
- }>, "many">>;
1255
+ surface: "record";
1256
+ }>, z.ZodObject<{
1257
+ /** Human-readable document title — REQUIRED by the text-ingest path. */
1258
+ title: z.ZodString;
1259
+ /** Raw text content to ingest + index — REQUIRED and non-empty (the platform rejects a blank ingest). */
1260
+ text: z.ZodString;
1261
+ /** Optional structured payload bound to the schema (the document's `fields`). */
1262
+ fields: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1263
+ typeName: z.ZodString;
1264
+ externalId: z.ZodString;
1265
+ surface: z.ZodLiteral<"document">;
1266
+ }, "strict", z.ZodTypeAny, {
1267
+ typeName: string;
1268
+ text: string;
1269
+ externalId: string;
1270
+ surface: "document";
1271
+ title: string;
1272
+ fields?: Record<string, unknown> | undefined;
1273
+ }, {
1274
+ typeName: string;
1275
+ text: string;
1276
+ externalId: string;
1277
+ surface: "document";
1278
+ title: string;
1279
+ fields?: Record<string, unknown> | undefined;
1280
+ }>]>, "many">>;
1183
1281
  /** Optional multi-clause roles, bound to principals via `access grant --role`. */
1184
1282
  roles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodObject<{
1185
1283
  allowedActions: z.ZodArray<z.ZodString, "many">;
@@ -1280,11 +1378,19 @@ declare const BlueprintSchema: z.ZodEffects<z.ZodObject<{
1280
1378
  externalId: string;
1281
1379
  };
1282
1380
  contextName?: string | undefined;
1283
- seed?: {
1381
+ seed?: ({
1284
1382
  typeName: string;
1285
1383
  fields: Record<string, unknown>;
1286
1384
  externalId: string;
1287
- }[] | undefined;
1385
+ surface: "record";
1386
+ } | {
1387
+ typeName: string;
1388
+ text: string;
1389
+ externalId: string;
1390
+ surface: "document";
1391
+ title: string;
1392
+ fields?: Record<string, unknown> | undefined;
1393
+ })[] | undefined;
1288
1394
  roles?: Record<string, {
1289
1395
  allowedActions: string[];
1290
1396
  dataScope?: Record<string, (string | null)[]> | undefined;
@@ -1367,11 +1473,19 @@ declare const BlueprintSchema: z.ZodEffects<z.ZodObject<{
1367
1473
  orgId?: string | undefined;
1368
1474
  clientId?: string | undefined;
1369
1475
  }[] | undefined;
1370
- seed?: {
1476
+ seed?: ({
1371
1477
  typeName: string;
1372
1478
  fields: Record<string, unknown>;
1373
1479
  externalId: string;
1374
- }[] | undefined;
1480
+ surface: "record";
1481
+ } | {
1482
+ typeName: string;
1483
+ text: string;
1484
+ externalId: string;
1485
+ surface: "document";
1486
+ title: string;
1487
+ fields?: Record<string, unknown> | undefined;
1488
+ })[] | undefined;
1375
1489
  roles?: Record<string, {
1376
1490
  allowedActions: string[];
1377
1491
  dataScope?: Record<string, (string | null)[]> | undefined;
@@ -1454,11 +1568,19 @@ declare const BlueprintSchema: z.ZodEffects<z.ZodObject<{
1454
1568
  externalId: string;
1455
1569
  };
1456
1570
  contextName?: string | undefined;
1457
- seed?: {
1571
+ seed?: ({
1458
1572
  typeName: string;
1459
1573
  fields: Record<string, unknown>;
1460
1574
  externalId: string;
1461
- }[] | undefined;
1575
+ surface: "record";
1576
+ } | {
1577
+ typeName: string;
1578
+ text: string;
1579
+ externalId: string;
1580
+ surface: "document";
1581
+ title: string;
1582
+ fields?: Record<string, unknown> | undefined;
1583
+ })[] | undefined;
1462
1584
  roles?: Record<string, {
1463
1585
  allowedActions: string[];
1464
1586
  dataScope?: Record<string, (string | null)[]> | undefined;
@@ -1541,11 +1663,19 @@ declare const BlueprintSchema: z.ZodEffects<z.ZodObject<{
1541
1663
  orgId?: string | undefined;
1542
1664
  clientId?: string | undefined;
1543
1665
  }[] | undefined;
1544
- seed?: {
1666
+ seed?: ({
1545
1667
  typeName: string;
1546
1668
  fields: Record<string, unknown>;
1547
1669
  externalId: string;
1548
- }[] | undefined;
1670
+ surface: "record";
1671
+ } | {
1672
+ typeName: string;
1673
+ text: string;
1674
+ externalId: string;
1675
+ surface: "document";
1676
+ title: string;
1677
+ fields?: Record<string, unknown> | undefined;
1678
+ })[] | undefined;
1549
1679
  roles?: Record<string, {
1550
1680
  allowedActions: string[];
1551
1681
  dataScope?: Record<string, (string | null)[]> | undefined;
@@ -1560,7 +1690,14 @@ declare const BlueprintSchema: z.ZodEffects<z.ZodObject<{
1560
1690
  type Blueprint = z.infer<typeof BlueprintSchema>;
1561
1691
  type BlueprintFieldDef = z.infer<typeof BlueprintFieldDefSchema>;
1562
1692
  type BlueprintSchemaDef = z.infer<typeof BlueprintSchemaSchema>;
1563
- type BlueprintSeedRecord = z.infer<typeof BlueprintSeedRecordSchema>;
1693
+ /** A single seed entry — a record seed OR a document seed (discriminated on `surface`). */
1694
+ type BlueprintSeed = z.infer<typeof BlueprintSeedRecordSchema>;
1695
+ /** The record-surface seed variant (`surface: 'record'`; the default). */
1696
+ type BlueprintRecordSeed = z.infer<typeof RecordSeedSchema>;
1697
+ /** The document-surface seed variant (`surface: 'document'`; carries `title` + `text`). */
1698
+ type BlueprintDocumentSeed = z.infer<typeof DocumentSeedSchema>;
1699
+ /** @deprecated The element type of `seed[]`, now a union — use {@link BlueprintSeed}. */
1700
+ type BlueprintSeedRecord = BlueprintSeed;
1564
1701
  type BlueprintValidationRules = z.infer<typeof ValidationRulesSchema>;
1565
1702
  type BlueprintRenderHints = z.infer<typeof RenderHintsSchema>;
1566
1703
  type BlueprintLookupField = z.infer<typeof BlueprintLookupFieldSchema>;
@@ -1769,4 +1906,4 @@ declare const BLUEPRINT_NAMES: readonly string[];
1769
1906
  /** Look up a bundled blueprint by name; `undefined` if none matches. */
1770
1907
  declare function getBlueprint(name: string): Blueprint | undefined;
1771
1908
 
1772
- export { BLUEPRINT_NAMES, BUNDLED_BLUEPRINTS, type Blueprint, type BlueprintFieldDef, BlueprintIdentityError, BlueprintInputError, type BlueprintIssue, type BlueprintLookupField, type BlueprintRenderHints, type BlueprintRoleClause, type BlueprintRoles, BlueprintSchema, type BlueprintSchemaDef, type BlueprintSeedRecord, BlueprintValidationError, type BlueprintValidationRules, type IdentitiesDecl, type IdentityDecl, type IdentityResolver, type InputDecl, type InputScalar, type InputsDecl, InputsDeclSchema, collectIdentityReferences, contextNameOf, deriveSuffix, getBlueprint, parseBlueprint, parseBlueprintJson, resolveBlueprintIdentities, resolveBlueprintInputs };
1909
+ export { BLUEPRINT_NAMES, BUNDLED_BLUEPRINTS, type Blueprint, type BlueprintDocumentSeed, type BlueprintFieldDef, BlueprintIdentityError, BlueprintInputError, type BlueprintIssue, type BlueprintLookupField, type BlueprintRecordSeed, type BlueprintRenderHints, type BlueprintRoleClause, type BlueprintRoles, BlueprintSchema, type BlueprintSchemaDef, type BlueprintSeed, type BlueprintSeedRecord, BlueprintValidationError, type BlueprintValidationRules, type IdentitiesDecl, type IdentityDecl, type IdentityResolver, type InputDecl, type InputScalar, type InputsDecl, InputsDeclSchema, collectIdentityReferences, contextNameOf, deriveSuffix, getBlueprint, parseBlueprint, parseBlueprintJson, resolveBlueprintIdentities, resolveBlueprintInputs };