@rizom/brain 0.2.0-alpha.6 → 0.2.0-alpha.61

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 (40) hide show
  1. package/README.md +1 -1
  2. package/dist/brain.js +4763 -26510
  3. package/dist/deploy.d.ts +17 -26
  4. package/dist/deploy.js +25 -25
  5. package/dist/deploy.js.map +4 -4
  6. package/dist/entities.d.ts +561 -0
  7. package/dist/entities.js +172 -0
  8. package/dist/entities.js.map +242 -0
  9. package/dist/index.d.ts +65 -0
  10. package/dist/index.js +5 -0
  11. package/dist/index.js.map +11 -0
  12. package/dist/interfaces.d.ts +923 -0
  13. package/dist/interfaces.js +172 -0
  14. package/dist/interfaces.js.map +209 -0
  15. package/dist/plugins.d.ts +1195 -0
  16. package/dist/plugins.js +178 -0
  17. package/dist/plugins.js.map +294 -0
  18. package/dist/seed-content/relay/README.md +28 -371
  19. package/dist/seed-content/relay/anchor-profile/anchor-profile.md +8 -11
  20. package/dist/seed-content/relay/brain-character/brain-character.md +5 -4
  21. package/dist/seed-content/relay/site-content/about/about.md +20 -0
  22. package/dist/seed-content/relay/site-content/home/diagram.md +184 -0
  23. package/dist/seed-content/relay/site-info/site-info.md +11 -1
  24. package/dist/services.d.ts +601 -0
  25. package/dist/services.js +172 -0
  26. package/dist/services.js.map +242 -0
  27. package/dist/site.d.ts +56 -157
  28. package/dist/site.js +323 -463
  29. package/dist/site.js.map +131 -249
  30. package/dist/templates.d.ts +302 -0
  31. package/dist/templates.js +172 -0
  32. package/dist/templates.js.map +206 -0
  33. package/dist/themes.d.ts +5 -44
  34. package/dist/themes.js +91 -8
  35. package/dist/themes.js.map +2 -2
  36. package/package.json +35 -4
  37. package/templates/deploy/scripts/provision-server.ts +109 -0
  38. package/templates/deploy/scripts/update-dns.ts +65 -0
  39. package/templates/deploy/scripts/write-ssh-key.ts +17 -0
  40. package/tsconfig.instance.json +31 -0
@@ -0,0 +1,561 @@
1
+ import { z } from 'zod';
2
+
3
+ /**
4
+ * Entity type for unstructured notes (the "base" entity type).
5
+ * Used as a sentinel for the default catch-all markdown file shape —
6
+ * no typed frontmatter schema required, content is the entire file body.
7
+ */
8
+ declare const BASE_ENTITY_TYPE = "base";
9
+ /**
10
+ * Options for entity mutation operations (create, update, upsert)
11
+ */
12
+ interface EntityJobOptions {
13
+ priority?: number;
14
+ maxRetries?: number;
15
+ }
16
+ /**
17
+ * Options for entity creation (extends EntityJobOptions with deduplication)
18
+ */
19
+ interface CreateEntityOptions extends EntityJobOptions {
20
+ deduplicateId?: boolean;
21
+ }
22
+ /**
23
+ * Result of an entity mutation that triggers an embedding job.
24
+ * When skipped is true, content was unchanged — no DB write, no event, no embedding job.
25
+ */
26
+ interface EntityMutationResult {
27
+ entityId: string;
28
+ jobId: string;
29
+ skipped: boolean;
30
+ }
31
+ /**
32
+ * Input for adapter-validated direct creation from finalized markdown.
33
+ */
34
+ interface CreateEntityFromMarkdownInput {
35
+ entityType: string;
36
+ id: string;
37
+ markdown: string;
38
+ }
39
+ /**
40
+ * Data for storing an embedding for an entity
41
+ */
42
+ interface StoreEmbeddingData {
43
+ entityId: string;
44
+ entityType: string;
45
+ embedding: Float32Array;
46
+ contentHash: string;
47
+ }
48
+ /**
49
+ * Base entity schema that all entities must extend
50
+ */
51
+ declare const baseEntitySchema: z.ZodObject<{
52
+ id: z.ZodString;
53
+ entityType: z.ZodString;
54
+ content: z.ZodString;
55
+ created: z.ZodString;
56
+ updated: z.ZodString;
57
+ metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
58
+ contentHash: z.ZodString;
59
+ }, "strip", z.ZodTypeAny, {
60
+ id: string;
61
+ entityType: string;
62
+ content: string;
63
+ created: string;
64
+ updated: string;
65
+ metadata: Record<string, unknown>;
66
+ contentHash: string;
67
+ }, {
68
+ id: string;
69
+ entityType: string;
70
+ content: string;
71
+ created: string;
72
+ updated: string;
73
+ metadata: Record<string, unknown>;
74
+ contentHash: string;
75
+ }>;
76
+ /**
77
+ * Base entity type - generic to support typed metadata
78
+ * TMetadata defaults to Record<string, unknown> for backward compatibility
79
+ */
80
+ interface BaseEntity<TMetadata = Record<string, unknown>> {
81
+ id: string;
82
+ entityType: string;
83
+ content: string;
84
+ created: string;
85
+ updated: string;
86
+ metadata: TMetadata;
87
+ /** SHA256 hash of content for change detection */
88
+ contentHash: string;
89
+ }
90
+ /**
91
+ * Entity input type for creation - allows partial entities with optional system fields
92
+ * contentHash is excluded because it's computed automatically by the entity service
93
+ */
94
+ type EntityInput<T extends BaseEntity> = Omit<T, "id" | "created" | "updated" | "contentHash"> & {
95
+ id?: string;
96
+ created?: string;
97
+ updated?: string;
98
+ };
99
+ /**
100
+ * Search result type
101
+ */
102
+ interface SearchResult<T extends BaseEntity = BaseEntity> {
103
+ entity: T;
104
+ score: number;
105
+ excerpt: string;
106
+ }
107
+ /**
108
+ * Normalized system_create input shape used by plugin create interceptors.
109
+ */
110
+ interface CreateInput {
111
+ entityType: string;
112
+ prompt?: string;
113
+ title?: string;
114
+ content?: string;
115
+ url?: string;
116
+ targetEntityType?: string;
117
+ targetEntityId?: string;
118
+ }
119
+ /**
120
+ * Minimal caller context forwarded to plugin create interceptors.
121
+ */
122
+ interface CreateExecutionContext {
123
+ interfaceType: string;
124
+ userId: string;
125
+ channelId?: string;
126
+ channelName?: string;
127
+ }
128
+ /**
129
+ * Result returned to system_create when a plugin fully handles creation.
130
+ */
131
+ type CreateResult = {
132
+ success: true;
133
+ data: {
134
+ entityId?: string;
135
+ jobId?: string;
136
+ status: string;
137
+ };
138
+ } | {
139
+ success: false;
140
+ error: string;
141
+ };
142
+ /**
143
+ * Plugin create interceptors can either fully handle creation,
144
+ * or continue with a rewritten normalized input.
145
+ */
146
+ type CreateInterceptionResult = {
147
+ kind: "handled";
148
+ result: CreateResult;
149
+ } | {
150
+ kind: "continue";
151
+ input: CreateInput;
152
+ };
153
+ type CreateInterceptor = (input: CreateInput, executionContext: CreateExecutionContext) => Promise<CreateInterceptionResult>;
154
+ /**
155
+ * Interface for entity adapter - handles conversion between entities and markdown
156
+ * following the hybrid storage model
157
+ *
158
+ * @template TEntity - The full entity type
159
+ * @template TMetadata - The metadata type (defaults to Record<string, unknown>)
160
+ */
161
+ interface EntityAdapter<TEntity extends BaseEntity<TMetadata>, TMetadata = Record<string, unknown>> {
162
+ entityType: string;
163
+ schema: z.ZodSchema<TEntity>;
164
+ toMarkdown(entity: TEntity): string;
165
+ fromMarkdown(markdown: string): Partial<TEntity>;
166
+ extractMetadata(entity: TEntity): TMetadata;
167
+ parseFrontMatter<TFrontmatter>(markdown: string, schema: z.ZodSchema<TFrontmatter>): TFrontmatter;
168
+ generateFrontMatter(entity: TEntity): string;
169
+ /** Optional: Zod schema for frontmatter fields. Used by CMS config generation. */
170
+ frontmatterSchema?: z.ZodObject<z.ZodRawShape>;
171
+ /** Optional: Declares this entity type is a singleton (one file, e.g., identity/identity.md). Used by CMS to generate files collection. */
172
+ isSingleton?: boolean;
173
+ /** Optional: Whether this entity has a free-form markdown body below frontmatter. Defaults to true. When false, CMS omits the body widget. */
174
+ hasBody?: boolean;
175
+ /** Returns a markdown body template with section headings for this entity type. Empty string for free-form entities. */
176
+ getBodyTemplate(): string;
177
+ /** Optional: Declares that this entity type supports cover images via coverImageId in frontmatter */
178
+ supportsCoverImage?: boolean;
179
+ /** Optional: Extract coverImageId from entity content/frontmatter */
180
+ getCoverImageId?(entity: TEntity): string | undefined;
181
+ }
182
+ /**
183
+ * Sort field specification for multi-field sorting
184
+ */
185
+ interface SortField {
186
+ /** Field to sort by - "created", "updated", or a metadata field name */
187
+ field: string;
188
+ /** Sort direction */
189
+ direction: "asc" | "desc";
190
+ /** Sort NULL values before non-NULL values (default: false / SQLite default) */
191
+ nullsFirst?: boolean;
192
+ }
193
+ /**
194
+ * List entities options
195
+ * Generic over metadata type for type-safe filtering
196
+ */
197
+ interface ListOptions<TMetadata = Record<string, unknown>> {
198
+ limit?: number;
199
+ offset?: number;
200
+ /** Multi-field sorting - supports system fields (created, updated) and metadata fields */
201
+ sortFields?: SortField[];
202
+ filter?: {
203
+ metadata?: Partial<TMetadata>;
204
+ };
205
+ /** Filter to only entities with metadata.status = "published" */
206
+ publishedOnly?: boolean;
207
+ }
208
+ /**
209
+ * Search options
210
+ */
211
+ interface SearchOptions {
212
+ limit?: number;
213
+ offset?: number;
214
+ types?: string[];
215
+ excludeTypes?: string[];
216
+ sortBy?: "relevance" | "created" | "updated";
217
+ sortDirection?: "asc" | "desc";
218
+ /** Score multipliers per entity type - applied after initial search */
219
+ weight?: Record<string, number>;
220
+ }
221
+ /**
222
+ * Configuration for entity type registration
223
+ */
224
+ interface EntityTypeConfig {
225
+ /** Score multiplier for search results (default: 1.0) */
226
+ weight?: number;
227
+ /** Whether to generate embeddings for this entity type (default: true).
228
+ * Set to false for entity types with non-textual content (e.g., images). */
229
+ embeddable?: boolean;
230
+ }
231
+ /**
232
+ * Core entity service interface for read-only operations
233
+ * Used by core plugins that need entity access but shouldn't modify entities
234
+ */
235
+ interface GetEntityRequest {
236
+ entityType: string;
237
+ id: string;
238
+ }
239
+ type GetEntityRawRequest = GetEntityRequest;
240
+ interface ListEntitiesRequest {
241
+ entityType: string;
242
+ options?: ListOptions | undefined;
243
+ }
244
+ interface CountEntitiesRequest {
245
+ entityType: string;
246
+ options?: Pick<ListOptions, "publishedOnly" | "filter"> | undefined;
247
+ }
248
+ interface CreateEntityRequest<T extends BaseEntity> {
249
+ entity: EntityInput<T>;
250
+ options?: CreateEntityOptions | undefined;
251
+ }
252
+ interface CreateEntityFromMarkdownRequest {
253
+ input: CreateEntityFromMarkdownInput;
254
+ options?: CreateEntityOptions | undefined;
255
+ }
256
+ interface UpdateEntityRequest<T extends BaseEntity> {
257
+ entity: T;
258
+ options?: EntityJobOptions | undefined;
259
+ }
260
+ interface DeleteEntityRequest {
261
+ entityType: string;
262
+ id: string;
263
+ }
264
+ interface UpsertEntityRequest<T extends BaseEntity> {
265
+ entity: T;
266
+ options?: EntityJobOptions | undefined;
267
+ }
268
+ interface EntitySearchRequest {
269
+ query: string;
270
+ options?: SearchOptions | undefined;
271
+ }
272
+ interface SearchWithDistancesRequest {
273
+ query: string;
274
+ }
275
+ interface ICoreEntityService {
276
+ getEntity<T extends BaseEntity>(request: GetEntityRequest): Promise<T | null>;
277
+ /**
278
+ * Get entity without content resolution (raw)
279
+ * Used internally to avoid recursion when resolving image references
280
+ */
281
+ getEntityRaw<T extends BaseEntity>(request: GetEntityRawRequest): Promise<T | null>;
282
+ listEntities<T extends BaseEntity>(request: ListEntitiesRequest): Promise<T[]>;
283
+ search<T extends BaseEntity = BaseEntity>(request: EntitySearchRequest): Promise<SearchResult<T>[]>;
284
+ getEntityTypes(): string[];
285
+ hasEntityType(type: string): boolean;
286
+ countEntities(request: CountEntitiesRequest): Promise<number>;
287
+ getEntityCounts(): Promise<Array<{
288
+ entityType: string;
289
+ count: number;
290
+ }>>;
291
+ /** Get weight map for all registered entity types with non-default weights */
292
+ getWeightMap(): Record<string, number>;
293
+ }
294
+ /**
295
+ * Entity service interface for managing brain entities
296
+ */
297
+ interface EntityService extends ICoreEntityService {
298
+ createEntity<T extends BaseEntity>(request: CreateEntityRequest<T>): Promise<EntityMutationResult>;
299
+ createEntityFromMarkdown(request: CreateEntityFromMarkdownRequest): Promise<EntityMutationResult>;
300
+ updateEntity<T extends BaseEntity>(request: UpdateEntityRequest<T>): Promise<EntityMutationResult>;
301
+ deleteEntity(request: DeleteEntityRequest): Promise<boolean>;
302
+ upsertEntity<T extends BaseEntity>(request: UpsertEntityRequest<T>): Promise<EntityMutationResult & {
303
+ created: boolean;
304
+ }>;
305
+ storeEmbedding(data: StoreEmbeddingData): Promise<void>;
306
+ serializeEntity(entity: BaseEntity): string;
307
+ deserializeEntity(markdown: string, entityType: string): Partial<BaseEntity>;
308
+ countEmbeddings(): Promise<number>;
309
+ searchWithDistances(request: SearchWithDistancesRequest): Promise<Array<{
310
+ entityId: string;
311
+ entityType: string;
312
+ distance: number;
313
+ }>>;
314
+ initialize(): Promise<void>;
315
+ getAsyncJobStatus(jobId: string): Promise<{
316
+ status: "pending" | "processing" | "completed" | "failed";
317
+ error?: string;
318
+ } | null>;
319
+ }
320
+
321
+ /** Interface for objects that can generate a body template. */
322
+ interface BodyTemplateProvider {
323
+ generateBodyTemplate(): string;
324
+ }
325
+ interface BaseEntityAdapterConfig<TEntity extends BaseEntity<TMetadata>, TMetadata extends object> {
326
+ entityType: string;
327
+ schema: z.ZodSchema<TEntity>;
328
+ frontmatterSchema: z.ZodObject<z.ZodRawShape>;
329
+ isSingleton?: boolean;
330
+ hasBody?: boolean;
331
+ supportsCoverImage?: boolean;
332
+ bodyFormatter?: BodyTemplateProvider;
333
+ }
334
+ /**
335
+ * Abstract base class for entity adapters.
336
+ *
337
+ * Provides default implementations for the 3 boilerplate methods
338
+ * (extractMetadata, parseFrontMatter, generateFrontMatter) and
339
+ * protected helpers for common patterns in toMarkdown/fromMarkdown.
340
+ *
341
+ * Subclasses must implement toMarkdown() and fromMarkdown().
342
+ */
343
+ declare abstract class BaseEntityAdapter<TEntity extends BaseEntity<TMetadata>, TMetadata extends object = Record<string, unknown>, TFrontmatter = TMetadata> implements EntityAdapter<TEntity, TMetadata> {
344
+ readonly entityType: string;
345
+ readonly schema: z.ZodSchema<TEntity>;
346
+ readonly frontmatterSchema: z.ZodObject<z.ZodRawShape>;
347
+ readonly isSingleton?: boolean;
348
+ readonly hasBody?: boolean;
349
+ readonly supportsCoverImage?: boolean;
350
+ private readonly fmSchema;
351
+ private readonly bodyFormatter;
352
+ constructor(config: BaseEntityAdapterConfig<TEntity, TMetadata>);
353
+ abstract fromMarkdown(markdown: string): Partial<TEntity>;
354
+ /**
355
+ * Serialize an entity to markdown.
356
+ *
357
+ * Rebuilds frontmatter from entity.metadata overlaid on any existing
358
+ * frontmatter parsed from entity.content. Body comes from renderBody,
359
+ * which defaults to the body portion of entity.content (frontmatter
360
+ * stripped).
361
+ *
362
+ * Adapters that want the body to reflect typed fields (e.g. a
363
+ * structured about/skills section) override renderBody. Adapters that
364
+ * need entirely custom serialization override toMarkdown.
365
+ */
366
+ toMarkdown(entity: TEntity): string;
367
+ /**
368
+ * Render the body section of the entity.
369
+ *
370
+ * Default returns the body portion of entity.content (frontmatter
371
+ * stripped). Override when the body should be rebuilt from typed
372
+ * fields on the entity.
373
+ */
374
+ protected renderBody(entity: TEntity): string;
375
+ private readExistingFrontmatter;
376
+ extractMetadata(entity: TEntity): TMetadata;
377
+ parseFrontMatter<T>(markdown: string, schema: z.ZodSchema<T>): T;
378
+ getBodyTemplate(): string;
379
+ generateFrontMatter(entity: TEntity): string;
380
+ /** Strip frontmatter and return the body content. */
381
+ protected extractBody(markdown: string): string;
382
+ /** Parse frontmatter using this adapter's frontmatter schema. */
383
+ protected parseFrontmatter(markdown: string): TFrontmatter;
384
+ /** Combine body and frontmatter into a markdown string. */
385
+ protected buildMarkdown(body: string, frontmatter: Record<string, unknown>): string;
386
+ }
387
+
388
+ /**
389
+ * Configuration for frontmatter handling
390
+ */
391
+ interface FrontmatterConfig<T extends BaseEntity> {
392
+ /**
393
+ * Fields to explicitly include in frontmatter
394
+ * If not specified, includes all non-system fields
395
+ */
396
+ includeFields?: (keyof T)[];
397
+ /**
398
+ * Fields to exclude from frontmatter
399
+ * By default excludes: id, entityType, content, created, updated
400
+ */
401
+ excludeFields?: (keyof T)[];
402
+ /**
403
+ * Custom serializers for complex fields
404
+ */
405
+ customSerializers?: {
406
+ [K in keyof T]?: (value: T[K]) => unknown;
407
+ };
408
+ /**
409
+ * Custom deserializers for complex fields
410
+ */
411
+ customDeserializers?: {
412
+ [K in keyof T]?: (value: unknown) => T[K];
413
+ };
414
+ }
415
+ /**
416
+ * Generate markdown with frontmatter from content and metadata
417
+ */
418
+ declare function generateMarkdownWithFrontmatter(content: string, metadata: Record<string, unknown>): string;
419
+ /**
420
+ * Parse markdown with frontmatter into content and metadata
421
+ */
422
+ declare function parseMarkdownWithFrontmatter<T>(markdown: string, schema: z.ZodSchema<T>): {
423
+ content: string;
424
+ metadata: T;
425
+ };
426
+ /**
427
+ * Generate frontmatter string from metadata
428
+ */
429
+ declare function generateFrontmatter(metadata: Record<string, unknown>): string;
430
+
431
+ /**
432
+ * Context passed to all DataSource operations
433
+ * Contains internal state that should not be mixed with user query parameters
434
+ */
435
+ interface BaseDataSourceContext {
436
+ /**
437
+ * Whether to filter to only published/complete content
438
+ * Set by site-builder: true for production, false for preview
439
+ */
440
+ publishedOnly?: boolean;
441
+ /**
442
+ * Scoped entity service that auto-applies publishedOnly filter
443
+ * Datasources should use this instead of their injected entityService
444
+ * to ensure consistent filtering behavior across environments
445
+ */
446
+ entityService: EntityService;
447
+ }
448
+ /**
449
+ * DataSource Interface
450
+ *
451
+ * Provides data for templates through fetch, generate, or transform operations.
452
+ * DataSources are registered in the DataSourceRegistry and referenced by templates
453
+ * via their dataSourceId property.
454
+ */
455
+ interface DataSource {
456
+ /**
457
+ * Unique identifier for this data source
458
+ */
459
+ id: string;
460
+ /**
461
+ * Human-readable name for this data source
462
+ */
463
+ name: string;
464
+ /**
465
+ * Optional description of what this data source provides
466
+ */
467
+ description?: string;
468
+ /**
469
+ * Optional: Fetch existing data
470
+ * Used by data sources that aggregate or retrieve data (e.g., dashboard stats, API data)
471
+ * DataSources validate output using the provided schema
472
+ * @param query - Query parameters for fetching data
473
+ * @param outputSchema - Schema for validating output data
474
+ * @param context - Context with environment
475
+ */
476
+ fetch?: <T>(query: unknown, outputSchema: z.ZodSchema<T>, context: BaseDataSourceContext) => Promise<T>;
477
+ /**
478
+ * Optional: Generate new content
479
+ * Used by data sources that create content (e.g., AI-generated content, reports)
480
+ */
481
+ generate?: <T>(request: unknown, schema: z.ZodSchema<T>) => Promise<T>;
482
+ /**
483
+ * Optional: Transform content between formats
484
+ * Used by data sources that convert content (e.g., markdown to HTML, data formatting)
485
+ */
486
+ transform?: <T>(content: unknown, format: string, schema: z.ZodSchema<T>) => Promise<T>;
487
+ }
488
+ /**
489
+ * DataSource capabilities for discovery and validation
490
+ */
491
+ interface DataSourceCapabilities {
492
+ canFetch: boolean;
493
+ canGenerate: boolean;
494
+ canTransform: boolean;
495
+ }
496
+
497
+ /**
498
+ * Schema for pagination information
499
+ * Used by datasources that return paginated lists
500
+ */
501
+ declare const paginationInfoSchema: z.ZodObject<{
502
+ currentPage: z.ZodNumber;
503
+ totalPages: z.ZodNumber;
504
+ totalItems: z.ZodNumber;
505
+ pageSize: z.ZodNumber;
506
+ hasNextPage: z.ZodBoolean;
507
+ hasPrevPage: z.ZodBoolean;
508
+ }, "strip", z.ZodTypeAny, {
509
+ currentPage: number;
510
+ totalPages: number;
511
+ totalItems: number;
512
+ pageSize: number;
513
+ hasNextPage: boolean;
514
+ hasPrevPage: boolean;
515
+ }, {
516
+ currentPage: number;
517
+ totalPages: number;
518
+ totalItems: number;
519
+ pageSize: number;
520
+ hasNextPage: boolean;
521
+ hasPrevPage: boolean;
522
+ }>;
523
+ /**
524
+ * Pagination information type
525
+ */
526
+ type PaginationInfo = z.infer<typeof paginationInfoSchema>;
527
+ /**
528
+ * Build pagination info from total count and page parameters
529
+ * Used for database-level pagination where we have a separate count query
530
+ */
531
+ declare function buildPaginationInfo(totalItems: number, page: number, pageSize: number): PaginationInfo;
532
+ /**
533
+ * Options for paginating items
534
+ */
535
+ interface PaginateOptions {
536
+ page?: number | undefined;
537
+ limit?: number | undefined;
538
+ pageSize?: number | undefined;
539
+ }
540
+ /**
541
+ * Result of paginating items
542
+ */
543
+ interface PaginateResult<T> {
544
+ items: T[];
545
+ pagination: PaginationInfo | null;
546
+ }
547
+ /**
548
+ * Paginate a list of items
549
+ *
550
+ * When `page` is specified, returns paginated results with pagination info.
551
+ * When only `limit` is specified, returns first N items without pagination info.
552
+ * When neither is specified, returns all items without pagination info.
553
+ *
554
+ * @param items - The full list of items to paginate (should already be sorted)
555
+ * @param options - Pagination options
556
+ * @returns Paginated items and optional pagination info
557
+ */
558
+ declare function paginateItems<T>(items: T[], options: PaginateOptions): PaginateResult<T>;
559
+
560
+ export { BASE_ENTITY_TYPE, BaseEntityAdapter, baseEntitySchema, buildPaginationInfo, generateFrontmatter, generateMarkdownWithFrontmatter, paginateItems, paginationInfoSchema, parseMarkdownWithFrontmatter };
561
+ export type { BaseDataSourceContext, BaseEntity, CreateExecutionContext, CreateInput, CreateInterceptionResult, CreateInterceptor, CreateResult, DataSource, DataSourceCapabilities, EntityAdapter, EntityInput, EntityMutationResult, EntityTypeConfig, FrontmatterConfig, ListOptions, PaginateOptions, PaginateResult, PaginationInfo, SearchOptions, SearchResult };