create-cogenta 0.0.3 → 0.1.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.
Files changed (98) hide show
  1. package/dist/bin.d.ts +3 -0
  2. package/dist/bin.d.ts.map +1 -0
  3. package/dist/bin.js +17 -0
  4. package/dist/bin.js.map +1 -0
  5. package/dist/blueprints/association.d.ts +73 -0
  6. package/dist/blueprints/association.d.ts.map +1 -0
  7. package/dist/blueprints/association.js +176 -0
  8. package/dist/blueprints/association.js.map +1 -0
  9. package/dist/blueprints/blog.d.ts +211 -0
  10. package/dist/blueprints/blog.d.ts.map +1 -0
  11. package/dist/blueprints/blog.js +297 -0
  12. package/dist/blueprints/blog.js.map +1 -0
  13. package/dist/blueprints/content-pack.d.ts +54 -0
  14. package/dist/blueprints/content-pack.d.ts.map +1 -0
  15. package/dist/blueprints/content-pack.js +40 -0
  16. package/dist/blueprints/content-pack.js.map +1 -0
  17. package/dist/blueprints/content-packs.d.ts +10 -0
  18. package/dist/blueprints/content-packs.d.ts.map +1 -0
  19. package/dist/blueprints/content-packs.js +26 -0
  20. package/dist/blueprints/content-packs.js.map +1 -0
  21. package/dist/blueprints/documentation.d.ts +71 -0
  22. package/dist/blueprints/documentation.d.ts.map +1 -0
  23. package/dist/blueprints/documentation.js +153 -0
  24. package/dist/blueprints/documentation.js.map +1 -0
  25. package/dist/blueprints/magazine.d.ts +79 -0
  26. package/dist/blueprints/magazine.d.ts.map +1 -0
  27. package/dist/blueprints/magazine.js +163 -0
  28. package/dist/blueprints/magazine.js.map +1 -0
  29. package/dist/blueprints/portfolio.d.ts +73 -0
  30. package/dist/blueprints/portfolio.d.ts.map +1 -0
  31. package/dist/blueprints/portfolio.js +171 -0
  32. package/dist/blueprints/portfolio.js.map +1 -0
  33. package/dist/blueprints/registry.d.ts +23 -0
  34. package/dist/blueprints/registry.d.ts.map +1 -0
  35. package/dist/blueprints/registry.js +42 -0
  36. package/dist/blueprints/registry.js.map +1 -0
  37. package/dist/blueprints/restaurant.d.ts +79 -0
  38. package/dist/blueprints/restaurant.d.ts.map +1 -0
  39. package/dist/blueprints/restaurant.js +175 -0
  40. package/dist/blueprints/restaurant.js.map +1 -0
  41. package/dist/blueprints/saas.d.ts +66 -0
  42. package/dist/blueprints/saas.d.ts.map +1 -0
  43. package/dist/blueprints/saas.js +165 -0
  44. package/dist/blueprints/saas.js.map +1 -0
  45. package/dist/blueprints/vitrine.d.ts +100 -0
  46. package/dist/blueprints/vitrine.d.ts.map +1 -0
  47. package/dist/blueprints/vitrine.js +214 -0
  48. package/dist/blueprints/vitrine.js.map +1 -0
  49. package/dist/config-file.d.ts +13 -0
  50. package/dist/config-file.d.ts.map +1 -0
  51. package/dist/config-file.js +93 -0
  52. package/dist/config-file.js.map +1 -0
  53. package/dist/environment.d.ts +27 -0
  54. package/dist/environment.d.ts.map +1 -0
  55. package/dist/environment.js +91 -0
  56. package/dist/environment.js.map +1 -0
  57. package/dist/index.d.ts +37 -0
  58. package/dist/index.d.ts.map +1 -0
  59. package/dist/index.js +79 -0
  60. package/dist/index.js.map +1 -0
  61. package/dist/llm-setup.d.ts +39 -0
  62. package/dist/llm-setup.d.ts.map +1 -0
  63. package/dist/llm-setup.js +47 -0
  64. package/dist/llm-setup.js.map +1 -0
  65. package/dist/playground-reset.d.ts +27 -0
  66. package/dist/playground-reset.d.ts.map +1 -0
  67. package/dist/playground-reset.js +40 -0
  68. package/dist/playground-reset.js.map +1 -0
  69. package/dist/prompts.d.ts +30 -0
  70. package/dist/prompts.d.ts.map +1 -0
  71. package/dist/prompts.js +63 -0
  72. package/dist/prompts.js.map +1 -0
  73. package/dist/recap.d.ts +19 -0
  74. package/dist/recap.d.ts.map +1 -0
  75. package/dist/recap.js +74 -0
  76. package/dist/recap.js.map +1 -0
  77. package/dist/scaffold.d.ts +49 -0
  78. package/dist/scaffold.d.ts.map +1 -0
  79. package/dist/scaffold.js +170 -0
  80. package/dist/scaffold.js.map +1 -0
  81. package/dist/skin-flow.d.ts +35 -0
  82. package/dist/skin-flow.d.ts.map +1 -0
  83. package/dist/skin-flow.js +56 -0
  84. package/dist/skin-flow.js.map +1 -0
  85. package/dist/skin-preview.d.ts +8 -0
  86. package/dist/skin-preview.d.ts.map +1 -0
  87. package/dist/skin-preview.js +130 -0
  88. package/dist/skin-preview.js.map +1 -0
  89. package/dist/types.d.ts +19 -0
  90. package/dist/types.d.ts.map +1 -0
  91. package/dist/types.js +13 -0
  92. package/dist/types.js.map +1 -0
  93. package/dist/wizard.d.ts +17 -0
  94. package/dist/wizard.d.ts.map +1 -0
  95. package/dist/wizard.js +157 -0
  96. package/dist/wizard.js.map +1 -0
  97. package/package.json +45 -6
  98. package/README.md +0 -39
package/dist/bin.d.ts ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=bin.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bin.d.ts","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":""}
package/dist/bin.js ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env node
2
+ import process from 'node:process';
3
+ import { run } from './index.js';
4
+ // Same reasoning as `@cogenta/cli`'s `bin.ts`: Node's own "SQLite is
5
+ // experimental" notice is unactionable noise on every command that opens a
6
+ // database, which here is every successful install.
7
+ process.removeAllListeners('warning');
8
+ process.on('warning', (warning) => {
9
+ const isSqliteNotice = warning.name === 'ExperimentalWarning' && warning.message.includes('SQLite');
10
+ if (!isSqliteNotice)
11
+ process.stderr.write(`${warning.stack ?? warning.message}\n`);
12
+ });
13
+ process.exitCode = await run({
14
+ argv: process.argv.slice(2),
15
+ isTty: process.stdout.isTTY === true,
16
+ });
17
+ //# sourceMappingURL=bin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AACA,OAAO,OAAO,MAAM,cAAc,CAAA;AAClC,OAAO,EAAE,GAAG,EAAE,MAAM,YAAY,CAAA;AAEhC,qEAAqE;AACrE,2EAA2E;AAC3E,oDAAoD;AACpD,OAAO,CAAC,kBAAkB,CAAC,SAAS,CAAC,CAAA;AACrC,OAAO,CAAC,EAAE,CAAC,SAAS,EAAE,CAAC,OAAO,EAAE,EAAE;IAChC,MAAM,cAAc,GAClB,OAAO,CAAC,IAAI,KAAK,qBAAqB,IAAI,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAA;IAC9E,IAAI,CAAC,cAAc;QAAE,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,OAAO,CAAC,KAAK,IAAI,OAAO,CAAC,OAAO,IAAI,CAAC,CAAA;AACpF,CAAC,CAAC,CAAA;AAEF,OAAO,CAAC,QAAQ,GAAG,MAAM,GAAG,CAAC;IAC3B,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;IAC3B,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,KAAK,KAAK,IAAI;CACrC,CAAC,CAAA"}
@@ -0,0 +1,73 @@
1
+ import type { VocabularyBlock } from '@cogenta/blocks';
2
+ import { type CollectionDefinition } from '@cogenta/schema';
3
+ import { type BlueprintContentPack, type RecommendedAgentHint } from './content-pack.js';
4
+ /**
5
+ * The `association` blueprint's content model (L9 task 8, batch B): a
6
+ * nonprofit's public site — an `event` collection (what a visitor comes
7
+ * back to check), and two pages built around the mission and a call to
8
+ * act (donate, volunteer, attend).
9
+ */
10
+ export declare const event: {
11
+ readonly name: "event";
12
+ readonly labels: {
13
+ readonly singular: "Event";
14
+ readonly plural: "Events";
15
+ };
16
+ readonly routing: {
17
+ readonly pattern: "/events/:slug";
18
+ };
19
+ readonly fields: {
20
+ title: import("@cogenta/schema").FieldDefinition & {
21
+ readonly kind: "text";
22
+ readonly options: Readonly<Record<string, unknown>>;
23
+ };
24
+ slug: import("@cogenta/schema").FieldDefinition & {
25
+ readonly kind: "slug";
26
+ readonly options: Readonly<Record<string, unknown>>;
27
+ };
28
+ date: import("@cogenta/schema").FieldDefinition & {
29
+ readonly kind: "datetime";
30
+ readonly options: {};
31
+ };
32
+ location: import("@cogenta/schema").FieldDefinition & {
33
+ readonly kind: "text";
34
+ readonly options: Readonly<Record<string, unknown>>;
35
+ };
36
+ description: import("@cogenta/schema").FieldDefinition & {
37
+ readonly kind: "text";
38
+ readonly options: Readonly<Record<string, unknown>>;
39
+ };
40
+ };
41
+ readonly indexes: readonly [readonly ["slug"], readonly ["date"]];
42
+ readonly permissions: {
43
+ readonly read: readonly ["public"];
44
+ readonly create: readonly ["editor", "admin"];
45
+ readonly update: readonly ["editor", "admin"];
46
+ readonly delete: readonly ["admin"];
47
+ };
48
+ };
49
+ export declare const page: CollectionDefinition;
50
+ export declare const ASSOCIATION_COLLECTIONS: readonly CollectionDefinition[];
51
+ export interface AssociationDemoEvent {
52
+ readonly title: string;
53
+ readonly slug: string;
54
+ readonly date: string;
55
+ readonly location: string;
56
+ readonly description: string;
57
+ }
58
+ export declare const ASSOCIATION_DEMO_EVENTS: readonly AssociationDemoEvent[];
59
+ export interface AssociationDemoPage {
60
+ readonly title: string;
61
+ readonly slug: string;
62
+ readonly blocks: readonly VocabularyBlock[];
63
+ }
64
+ /**
65
+ * `home` (hero + mission prose + a live list of upcoming events + a cta to
66
+ * donate) and `mission` (a longer prose statement plus a static `stats`
67
+ * summary of impact — the kind of number a nonprofit reports periodically,
68
+ * not something to model as its own queryable collection).
69
+ */
70
+ export declare const ASSOCIATION_DEMO_PAGES: readonly AssociationDemoPage[];
71
+ export declare const ASSOCIATION_RECOMMENDED_AGENTS: readonly RecommendedAgentHint[];
72
+ export declare const associationContentPack: BlueprintContentPack;
73
+ //# sourceMappingURL=association.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"association.d.ts","sourceRoot":"","sources":["../../src/blueprints/association.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEtD,OAAO,EACL,KAAK,oBAAoB,EAK1B,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,KAAK,oBAAoB,EAEzB,KAAK,oBAAoB,EAE1B,MAAM,mBAAmB,CAAA;AAE1B;;;;;GAKG;AAEH,eAAO,MAAM,KAAK;;;;;;;;;;QAKd,KAAK;;;;QACL,IAAI;;;;QACJ,IAAI;;;;QACJ,QAAQ;;;;QACR,WAAW;;;;;;;;;;;;CASb,CAAA;AAEF,eAAO,MAAM,IAAI,sBAAiC,CAAA;AAElD,eAAO,MAAM,uBAAuB,EAAE,SAAS,oBAAoB,EAAkB,CAAA;AAIrF,MAAM,WAAW,oBAAoB;IACnC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;CAC7B;AAED,eAAO,MAAM,uBAAuB,EAAE,SAAS,oBAAoB,EAsBlE,CAAA;AAqBD,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,MAAM,EAAE,SAAS,eAAe,EAAE,CAAA;CAC5C;AAED;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,EAAE,SAAS,mBAAmB,EA2DhE,CAAA;AAED,eAAO,MAAM,8BAA8B,EAAE,SAAS,oBAAoB,EAWzE,CAAA;AAsCD,eAAO,MAAM,sBAAsB,EAAE,oBAIpC,CAAA"}
@@ -0,0 +1,176 @@
1
+ import { createContentStore, defineCollection, f, validateCollectionSet, } from '@cogenta/schema';
2
+ import { definePageCollection, toBlockZoneEntry, } from './content-pack.js';
3
+ /**
4
+ * The `association` blueprint's content model (L9 task 8, batch B): a
5
+ * nonprofit's public site — an `event` collection (what a visitor comes
6
+ * back to check), and two pages built around the mission and a call to
7
+ * act (donate, volunteer, attend).
8
+ */
9
+ export const event = defineCollection({
10
+ name: 'event',
11
+ labels: { singular: 'Event', plural: 'Events' },
12
+ routing: { pattern: '/events/:slug' },
13
+ fields: {
14
+ title: f.text({ required: true, max: 200 }),
15
+ slug: f.slug({ from: 'title', unique: true }),
16
+ date: f.datetime({ required: true }),
17
+ location: f.text({ max: 200 }),
18
+ description: f.text({ max: 500, multiline: true }),
19
+ },
20
+ indexes: [['slug'], ['date']],
21
+ permissions: {
22
+ read: ['public'],
23
+ create: ['editor', 'admin'],
24
+ update: ['editor', 'admin'],
25
+ delete: ['admin'],
26
+ },
27
+ });
28
+ export const page = definePageCollection('/:slug');
29
+ export const ASSOCIATION_COLLECTIONS = [event, page];
30
+ validateCollectionSet(ASSOCIATION_COLLECTIONS);
31
+ export const ASSOCIATION_DEMO_EVENTS = [
32
+ {
33
+ title: 'Community clean-up day',
34
+ slug: 'community-clean-up-day',
35
+ date: '2026-09-12T09:00:00.000Z',
36
+ location: 'Riverside Park',
37
+ description: 'A morning of volunteering, open to everyone, no experience needed.',
38
+ },
39
+ {
40
+ title: 'Annual fundraising dinner',
41
+ slug: 'annual-fundraising-dinner',
42
+ date: '2026-10-03T18:30:00.000Z',
43
+ location: 'Town Hall',
44
+ description: "This year's proceeds go directly to the winter shelter programme.",
45
+ },
46
+ {
47
+ title: 'Volunteer orientation',
48
+ slug: 'volunteer-orientation',
49
+ date: '2026-08-22T17:00:00.000Z',
50
+ location: 'Community Centre, Room 2',
51
+ description: 'A short session for anyone new to volunteering with us.',
52
+ },
53
+ ];
54
+ const BLOCK_VERSION = '1.0.0';
55
+ function proseParagraph(key, text) {
56
+ return {
57
+ _key: key,
58
+ _type: 'prose',
59
+ _version: BLOCK_VERSION,
60
+ body: [
61
+ {
62
+ _key: `${key}-block`,
63
+ _type: 'block',
64
+ style: 'normal',
65
+ children: [{ _key: `${key}-span`, _type: 'span', text, marks: [] }],
66
+ markDefs: [],
67
+ },
68
+ ],
69
+ };
70
+ }
71
+ /**
72
+ * `home` (hero + mission prose + a live list of upcoming events + a cta to
73
+ * donate) and `mission` (a longer prose statement plus a static `stats`
74
+ * summary of impact — the kind of number a nonprofit reports periodically,
75
+ * not something to model as its own queryable collection).
76
+ */
77
+ export const ASSOCIATION_DEMO_PAGES = [
78
+ {
79
+ title: 'Home',
80
+ slug: 'home',
81
+ blocks: [
82
+ {
83
+ _key: 'demo-home-hero',
84
+ _type: 'hero',
85
+ _version: BLOCK_VERSION,
86
+ eyebrow: 'Association',
87
+ title: 'Working together, close to home',
88
+ subtitle: 'Scaffolded by create-cogenta from the "association" blueprint, with real demo events already in place.',
89
+ },
90
+ proseParagraph('demo-home-mission', 'This is a demo nonprofit site, scaffolded by create-cogenta from the "association" blueprint. Its events and this page were seeded by the installer so there is real content to look at from the first run.'),
91
+ {
92
+ _key: 'demo-home-events',
93
+ _type: 'collectionList',
94
+ _version: BLOCK_VERSION,
95
+ title: 'Upcoming events',
96
+ collection: 'event',
97
+ sort: { field: 'createdAt', direction: 'asc' },
98
+ limit: 10,
99
+ layout: 'list',
100
+ },
101
+ {
102
+ _key: 'demo-home-cta',
103
+ _type: 'cta',
104
+ _version: BLOCK_VERSION,
105
+ title: 'Help us do more',
106
+ text: 'Every donation and every volunteer hour goes straight back into the community.',
107
+ actions: [{ label: 'Donate', target: { href: '/mission' }, emphasis: 'primary' }],
108
+ },
109
+ ],
110
+ },
111
+ {
112
+ title: 'Our mission',
113
+ slug: 'mission',
114
+ blocks: [
115
+ proseParagraph('demo-mission-prose', 'Everything here — the schema, the content, the skin — is a normal part of the site and is meant to be edited, renamed or deleted the moment the defaults stop fitting.'),
116
+ {
117
+ _key: 'demo-mission-stats',
118
+ _type: 'stats',
119
+ _version: BLOCK_VERSION,
120
+ title: 'Our impact',
121
+ items: [
122
+ { _key: 'demo-stat-1', value: '12', unit: 'years', label: 'serving the community' },
123
+ { _key: 'demo-stat-2', value: '340+', label: 'volunteers this year' },
124
+ { _key: 'demo-stat-3', value: '60', label: 'families supported' },
125
+ ],
126
+ },
127
+ ],
128
+ },
129
+ ];
130
+ export const ASSOCIATION_RECOMMENDED_AGENTS = [
131
+ {
132
+ name: 'contentAgent',
133
+ package: '@cogenta/agents-builtin',
134
+ reason: 'Flags terminology drift across event descriptions written by different volunteers.',
135
+ },
136
+ {
137
+ name: 'seoAgent',
138
+ package: '@cogenta/agents-builtin',
139
+ reason: 'Audits the mission and event pages so newcomers can find them from a search engine.',
140
+ },
141
+ ];
142
+ /**
143
+ * Inserts the `association` blueprint's demo content through the real
144
+ * `ContentStore` — never mocked (house rule).
145
+ */
146
+ async function seedAssociationDemoContent(db, defaultLocale, adminId) {
147
+ const eventStore = createContentStore({ db, collection: event, defaultLocale });
148
+ const pageStore = createContentStore({ db, collection: page, defaultLocale });
149
+ for (const demo of ASSOCIATION_DEMO_EVENTS) {
150
+ await eventStore.create({
151
+ status: 'published',
152
+ createdBy: adminId,
153
+ values: {
154
+ title: demo.title,
155
+ slug: demo.slug,
156
+ date: demo.date,
157
+ location: demo.location,
158
+ description: demo.description,
159
+ },
160
+ });
161
+ }
162
+ for (const demo of ASSOCIATION_DEMO_PAGES) {
163
+ await pageStore.create({
164
+ status: 'published',
165
+ createdBy: adminId,
166
+ values: { title: demo.title, slug: demo.slug },
167
+ blocks: { blocks: demo.blocks.map(toBlockZoneEntry) },
168
+ });
169
+ }
170
+ }
171
+ export const associationContentPack = {
172
+ collections: ASSOCIATION_COLLECTIONS,
173
+ recommendedAgents: ASSOCIATION_RECOMMENDED_AGENTS,
174
+ seedDemoContent: seedAssociationDemoContent,
175
+ };
176
+ //# sourceMappingURL=association.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"association.js","sourceRoot":"","sources":["../../src/blueprints/association.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,kBAAkB,EAClB,gBAAgB,EAChB,CAAC,EACD,qBAAqB,GACtB,MAAM,iBA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AC;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAyB;IAC1D,WAAW,EAAE,uBAAuB;IACpC,iBAAiB,EAAE,8BAA8B;IACjD,eAAe,EAAE,0BAA0B;CAC5C,CAAA"}
@@ -0,0 +1,211 @@
1
+ import type { VocabularyBlock } from '@cogenta/blocks';
2
+ import { type CollectionDefinition, type RichTextDocument } from '@cogenta/schema';
3
+ import { type BlueprintContentPack, type RecommendedAgentHint } from './content-pack.js';
4
+ /**
5
+ * The `blog` blueprint's content model (L9 task 3).
6
+ *
7
+ * `post` reuses `SystemFields.status`/`createdAt` for publish state and
8
+ * publish date rather than declaring its own — contract A already carries
9
+ * both on every entry. Authorship reuses `SystemFields.createdBy`, which
10
+ * points at the real user/actor system, rather than a separate author
11
+ * collection this blueprint would have to invent and keep in sync.
12
+ */
13
+ export declare const category: {
14
+ readonly name: "category";
15
+ readonly labels: {
16
+ readonly singular: "Category";
17
+ readonly plural: "Categories";
18
+ };
19
+ readonly routing: {
20
+ readonly pattern: "/blog/category/:slug";
21
+ };
22
+ readonly fields: {
23
+ name: import("@cogenta/schema").FieldDefinition & {
24
+ readonly kind: "text";
25
+ readonly options: Readonly<Record<string, unknown>>;
26
+ };
27
+ slug: import("@cogenta/schema").FieldDefinition & {
28
+ readonly kind: "slug";
29
+ readonly options: Readonly<Record<string, unknown>>;
30
+ };
31
+ };
32
+ readonly indexes: readonly [readonly ["slug"]];
33
+ readonly permissions: {
34
+ readonly read: readonly ["public"];
35
+ readonly create: readonly ["editor", "admin"];
36
+ readonly update: readonly ["editor", "admin"];
37
+ readonly delete: readonly ["admin"];
38
+ };
39
+ };
40
+ export declare const tag: {
41
+ readonly name: "tag";
42
+ readonly labels: {
43
+ readonly singular: "Tag";
44
+ readonly plural: "Tags";
45
+ };
46
+ readonly fields: {
47
+ name: import("@cogenta/schema").FieldDefinition & {
48
+ readonly kind: "text";
49
+ readonly options: Readonly<Record<string, unknown>>;
50
+ };
51
+ slug: import("@cogenta/schema").FieldDefinition & {
52
+ readonly kind: "slug";
53
+ readonly options: Readonly<Record<string, unknown>>;
54
+ };
55
+ };
56
+ readonly indexes: readonly [readonly ["slug"]];
57
+ readonly permissions: {
58
+ readonly read: readonly ["public"];
59
+ readonly create: readonly ["editor", "admin"];
60
+ readonly update: readonly ["editor", "admin"];
61
+ readonly delete: readonly ["admin"];
62
+ };
63
+ };
64
+ export declare const post: {
65
+ readonly name: "post";
66
+ readonly labels: {
67
+ readonly singular: "Post";
68
+ readonly plural: "Posts";
69
+ };
70
+ readonly routing: {
71
+ readonly pattern: "/blog/:slug";
72
+ };
73
+ readonly versioning: {
74
+ readonly drafts: true;
75
+ readonly history: true;
76
+ };
77
+ readonly fields: {
78
+ title: import("@cogenta/schema").FieldDefinition & {
79
+ readonly kind: "text";
80
+ readonly options: Readonly<Record<string, unknown>>;
81
+ };
82
+ slug: import("@cogenta/schema").FieldDefinition & {
83
+ readonly kind: "slug";
84
+ readonly options: Readonly<Record<string, unknown>>;
85
+ };
86
+ excerpt: import("@cogenta/schema").FieldDefinition & {
87
+ readonly kind: "text";
88
+ readonly options: Readonly<Record<string, unknown>>;
89
+ };
90
+ body: import("@cogenta/schema").FieldDefinition & {
91
+ readonly kind: "richText";
92
+ readonly options: {};
93
+ };
94
+ coverImage: import("@cogenta/schema").FieldDefinition & {
95
+ readonly kind: "media";
96
+ readonly options: {
97
+ accept: readonly ("audio" | "file" | "image" | "video")[];
98
+ many: boolean;
99
+ };
100
+ };
101
+ category: import("@cogenta/schema").FieldDefinition & {
102
+ readonly kind: "relation";
103
+ readonly options: {
104
+ to: string;
105
+ many: boolean;
106
+ onDelete: import("@cogenta/schema").OnDelete;
107
+ };
108
+ };
109
+ tags: import("@cogenta/schema").FieldDefinition & {
110
+ readonly kind: "relation";
111
+ readonly options: {
112
+ to: string;
113
+ many: boolean;
114
+ onDelete: import("@cogenta/schema").OnDelete;
115
+ };
116
+ };
117
+ };
118
+ readonly indexes: readonly [readonly ["slug"]];
119
+ readonly permissions: {
120
+ readonly read: readonly ["public"];
121
+ readonly create: readonly ["editor", "admin"];
122
+ readonly update: readonly ["editor", "admin"];
123
+ readonly delete: readonly ["admin"];
124
+ readonly publish: readonly ["admin"];
125
+ };
126
+ };
127
+ /**
128
+ * The blueprint's "page types" (L9 task 4): standalone pages composed of
129
+ * vocabulary blocks rather than a bespoke template each — the same
130
+ * title-plus-block-zone shape `theme-canonical`'s own test fixtures already
131
+ * use for `{ collection: 'page', id: … }` internal-link targets, formalised
132
+ * here as a real `CollectionDefinition` for the first time. `blocks` uses
133
+ * `f.blocks()` (contract A), the field kind a `BlockZone` — an ordered list of
134
+ * vocabulary blocks — is stored under; `renderPage` (`@cogenta/theme-canonical`)
135
+ * takes exactly a title plus that list.
136
+ */
137
+ export declare const page: {
138
+ readonly name: "page";
139
+ readonly labels: {
140
+ readonly singular: "Page";
141
+ readonly plural: "Pages";
142
+ };
143
+ readonly routing: {
144
+ readonly pattern: "/:slug";
145
+ };
146
+ readonly fields: {
147
+ title: import("@cogenta/schema").FieldDefinition & {
148
+ readonly kind: "text";
149
+ readonly options: Readonly<Record<string, unknown>>;
150
+ };
151
+ slug: import("@cogenta/schema").FieldDefinition & {
152
+ readonly kind: "slug";
153
+ readonly options: Readonly<Record<string, unknown>>;
154
+ };
155
+ blocks: import("@cogenta/schema").FieldDefinition & {
156
+ readonly kind: "blocks";
157
+ readonly options: {
158
+ allow: "*" | readonly string[];
159
+ };
160
+ };
161
+ };
162
+ readonly indexes: readonly [readonly ["slug"]];
163
+ readonly permissions: {
164
+ readonly read: readonly ["public"];
165
+ readonly create: readonly ["editor", "admin"];
166
+ readonly update: readonly ["editor", "admin"];
167
+ readonly delete: readonly ["admin"];
168
+ };
169
+ };
170
+ /**
171
+ * Also the export written into the scaffolded site's `cogenta.schema.mjs`
172
+ * (`scaffold.ts`), so `loadCollections` (`@cogenta/cli`) reads back exactly
173
+ * these four collections.
174
+ */
175
+ export declare const BLOG_COLLECTIONS: readonly CollectionDefinition[];
176
+ export interface BlogDemoCategory {
177
+ readonly name: string;
178
+ readonly slug: string;
179
+ }
180
+ export interface BlogDemoTag {
181
+ readonly name: string;
182
+ readonly slug: string;
183
+ }
184
+ export interface BlogDemoPost {
185
+ readonly title: string;
186
+ readonly slug: string;
187
+ readonly excerpt: string;
188
+ readonly body: RichTextDocument;
189
+ readonly categorySlug: string;
190
+ readonly tagSlugs: readonly string[];
191
+ }
192
+ export declare const BLOG_DEMO_CATEGORIES: readonly BlogDemoCategory[];
193
+ export declare const BLOG_DEMO_TAGS: readonly BlogDemoTag[];
194
+ export declare const BLOG_DEMO_POSTS: readonly BlogDemoPost[];
195
+ export interface BlogDemoPage {
196
+ readonly title: string;
197
+ readonly slug: string;
198
+ readonly blocks: readonly VocabularyBlock[];
199
+ }
200
+ /**
201
+ * `home` and `about` — the two demo pages a freshly scaffolded blog needs so
202
+ * its front page is not the empty admin screen. `home` pairs a `hero` with a
203
+ * `collectionList` scoped to `post`, both part of the frozen block vocabulary
204
+ * (contract B) and both already rendered generically by
205
+ * `@cogenta/theme-canonical`'s `renderPage`/`renderBlock` — no bespoke
206
+ * "home page" or "about page" template is needed for either.
207
+ */
208
+ export declare const BLOG_DEMO_PAGES: readonly BlogDemoPage[];
209
+ export declare const BLOG_RECOMMENDED_AGENTS: readonly RecommendedAgentHint[];
210
+ export declare const blogContentPack: BlueprintContentPack;
211
+ //# sourceMappingURL=blog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blog.d.ts","sourceRoot":"","sources":["../../src/blueprints/blog.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAEtD,OAAO,EACL,KAAK,oBAAoB,EAIzB,KAAK,gBAAgB,EAEtB,MAAM,iBAAiB,CAAA;AACxB,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EAE1B,MAAM,mBAAmB,CAAA;AAE1B;;;;;;;;GAQG;AAEH,eAAO,MAAM,QAAQ;;;;;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