@happyvertical/smrt-core 0.43.2 → 0.43.4

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 (42) hide show
  1. package/agents/collection-reads.md +30 -0
  2. package/agents/generators.md +18 -0
  3. package/dist/__typechecks__/custom-action-metadata.d.ts +2 -0
  4. package/dist/__typechecks__/custom-action-metadata.d.ts.map +1 -0
  5. package/dist/browser.js +2 -2
  6. package/dist/collection.d.ts +56 -3
  7. package/dist/collection.d.ts.map +1 -1
  8. package/dist/collection.js +61 -56
  9. package/dist/collection.js.map +1 -1
  10. package/dist/generators/custom-action.d.ts +11 -2
  11. package/dist/generators/custom-action.d.ts.map +1 -1
  12. package/dist/generators/custom-action.js +18 -1
  13. package/dist/generators/custom-action.js.map +1 -1
  14. package/dist/generators/index.d.ts +1 -1
  15. package/dist/generators/index.d.ts.map +1 -1
  16. package/dist/generators/rest.d.ts.map +1 -1
  17. package/dist/generators/rest.js +3 -2
  18. package/dist/generators/rest.js.map +1 -1
  19. package/dist/generators/tool-schema.d.ts +8 -2
  20. package/dist/generators/tool-schema.d.ts.map +1 -1
  21. package/dist/generators/tool-schema.js +46 -8
  22. package/dist/generators/tool-schema.js.map +1 -1
  23. package/dist/index.js +2 -2
  24. package/dist/manifest/static-manifest.js +3 -3
  25. package/dist/manifest/static-manifest.js.map +1 -1
  26. package/dist/manifest/store.js +1 -1
  27. package/dist/manifest/store.js.map +1 -1
  28. package/dist/manifest.json +3 -3
  29. package/dist/prebuild/index.d.ts.map +1 -1
  30. package/dist/prebuild/index.js +17 -0
  31. package/dist/prebuild/index.js.map +1 -1
  32. package/dist/registry/types.d.ts +13 -0
  33. package/dist/registry/types.d.ts.map +1 -1
  34. package/dist/smrt-knowledge.json +9 -9
  35. package/dist/vite-plugin/index.d.ts.map +1 -1
  36. package/dist/vite-plugin/index.js +23 -1
  37. package/dist/vite-plugin/index.js.map +1 -1
  38. package/dist/vite-plugin/web-collections.d.ts +49 -1
  39. package/dist/vite-plugin/web-collections.d.ts.map +1 -1
  40. package/dist/vite-plugin/web-collections.js +185 -19
  41. package/dist/vite-plugin/web-collections.js.map +1 -1
  42. package/package.json +4 -4
@@ -1 +1 @@
1
- {"version":3,"file":"tool-schema.js","names":[],"sources":["../../src/generators/tool-schema.ts"],"sourcesContent":["import {\n buildCustomActionInputSchema,\n type CustomActionMetadata,\n} from './custom-action.js';\n\n/**\n * Transport-agnostic tool-descriptor builder (#1812, tracer).\n *\n * The single source of truth for turning a model's fields + exposed actions into\n * MCP-shaped tool descriptors (`{ name, description, inputSchema }`). This is the\n * shape both the Model Context Protocol AND Chrome's WebMCP\n * (`document.modelContext.registerTool`) consume — see\n * https://developer.chrome.com/docs/ai/webmcp.\n *\n * It is deliberately pure and free of `ObjectRegistry` / manifest coupling: it\n * takes a normalized {@link ToolFieldMeta}[] so BOTH callers can share it —\n * - `MCPGenerator` (`src/generators/mcp.ts`) for the Node stdio server, and\n * - the web-collections emitter (`src/vite-plugin/web-collections.ts`) for the\n * browser client-data runtime's WebMCP descriptors.\n *\n * Keeping one implementation removes the field-mapping drift risk the\n * \"three emission sites must agree\" contract in web-collections.ts already warns\n * about. The `fieldTypeToJsonSchema` / per-action skeletons below are ported\n * verbatim from mcp.ts's `fieldToMCPSchema` + `generateObjectTools`, so wiring\n * mcp.ts to call this helper is a mechanical, behavior-preserving refactor.\n */\n\n/**\n * A JSON Schema fragment. Values vary by field kind, so this is only ever\n * serialized into tool descriptors, never read back structurally.\n */\nexport type ToolJsonSchema = Record<string, unknown>;\n\n/** The only JSON Schema dialect emitted by generated MCP and WebMCP tools. */\nexport const JSON_SCHEMA_2020_12 =\n 'https://json-schema.org/draft/2020-12/schema';\n\n/**\n * Bounds for generated schemas. Field metadata is authored input, so it must\n * not turn a tools/list response into an unbounded composition or validation\n * workload. These limits are deliberately far above normal SMRT objects while\n * still keeping schemas comfortably inside MCP transport budgets.\n */\nexport const MCP_SCHEMA_LIMITS = {\n maxDepth: 16,\n maxNodes: 2_048,\n maxSerializedBytes: 65_536,\n} as const;\n\n/**\n * Apply the draft-2020-12 dialect and reject schemas that violate MCP's\n * bounded-composition contract. Generated schemas only ever reference local\n * `$defs`; external refs are neither emitted nor followed.\n */\nexport function finalizeMcpJsonSchema(schema: ToolJsonSchema): ToolJsonSchema {\n const finalized = {\n ...schema,\n $schema: JSON_SCHEMA_2020_12,\n };\n assertMcpJsonSchemaSafety(finalized);\n return finalized;\n}\n\n/**\n * Validate the resource envelope of an emitted schema without resolving refs.\n * This is intentionally structural rather than a general JSON-Schema\n * evaluator: the server already owns every schema it emits, and this guard\n * exists to keep authored metadata from introducing hostile shape growth.\n */\nexport function assertMcpJsonSchemaSafety(schema: ToolJsonSchema): void {\n let nodes = 0;\n const ancestors = new WeakSet<object>();\n\n const visit = (value: unknown, depth: number, key?: string): void => {\n nodes += 1;\n if (nodes > MCP_SCHEMA_LIMITS.maxNodes) {\n throw new Error(\n `MCP JSON Schema exceeds ${MCP_SCHEMA_LIMITS.maxNodes} nodes`,\n );\n }\n if (depth > MCP_SCHEMA_LIMITS.maxDepth) {\n throw new Error(\n `MCP JSON Schema exceeds ${MCP_SCHEMA_LIMITS.maxDepth} levels of depth`,\n );\n }\n if (key === '$ref') {\n if (\n typeof value !== 'string' ||\n !value.startsWith('#/$defs/') ||\n value.includes('://')\n ) {\n throw new Error(\n 'MCP JSON Schema may only use local #/$defs/ references',\n );\n }\n return;\n }\n if (value === null || typeof value !== 'object') return;\n if (ancestors.has(value)) {\n throw new Error('MCP JSON Schema must not contain cyclic values');\n }\n\n ancestors.add(value);\n if (Array.isArray(value)) {\n for (const entry of value) visit(entry, depth + 1);\n } else {\n for (const [childKey, child] of Object.entries(value)) {\n visit(child, depth + 1, childKey);\n }\n }\n ancestors.delete(value);\n };\n\n visit(schema, 0);\n\n let serialized: string;\n try {\n serialized = JSON.stringify(schema);\n } catch {\n throw new Error('MCP JSON Schema must be JSON-serializable');\n }\n if (\n new TextEncoder().encode(serialized).byteLength >\n MCP_SCHEMA_LIMITS.maxSerializedBytes\n ) {\n throw new Error(\n `MCP JSON Schema exceeds ${MCP_SCHEMA_LIMITS.maxSerializedBytes} serialized bytes`,\n );\n }\n}\n\n/**\n * Normalized field metadata — the intersection of what the runtime registry\n * (`FieldDefinition._meta`) and the build-time manifest (`WebFieldDefinition`)\n * can each supply. Callers flatten their own field source into this shape.\n */\nexport interface ToolFieldMeta {\n name: string;\n /** Field kind: text | integer | decimal | boolean | datetime | json | foreignKey | … */\n type: string;\n required?: boolean;\n description?: string;\n default?: unknown;\n maxLength?: number;\n minLength?: number;\n min?: number;\n max?: number;\n /** Field values may explicitly be null in the runtime/manifest contract. */\n nullable?: boolean;\n /** For `foreignKey`: the related class name, for the generated description. */\n related?: string;\n}\n\n/** Storage contract for the synthetic primary identifier. */\nexport type ToolIdType = 'uuid' | 'text';\n\n/** The CRUD verbs with dedicated input-schema skeletons; anything else is custom. */\nconst CRUD_ACTIONS = new Set(['list', 'get', 'create', 'update', 'delete']);\n\nexport interface ToolRouteDescriptor {\n /** HTTP method emitted for the route. */\n method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';\n /** Whether the route targets one item or the whole collection. */\n scope: 'item' | 'collection';\n /** Route segments below the collection endpoint. Dynamic segments use `[x]`. */\n path: string[];\n /** Transport names rewritten by the tool schema (e.g. `actionId` → `id`). */\n parameterAliases?: Record<string, string>;\n /** The generated method accepts one `options` bag as its sole argument. */\n optionsBag?: boolean;\n}\n\n/** A single generated tool descriptor — the WebMCP / MCP tool shape. */\nexport interface ToolDescriptor {\n /** The action this tool performs (`list` | `get` | … | a custom method name). */\n action: string;\n /** Tool id, `${toolPrefix}_${action}` (e.g. `product_list`). */\n name: string;\n description: string;\n inputSchema: ToolJsonSchema;\n /** True for non-mutating reads (`list`/`get`) → WebMCP `annotations.readOnlyHint`. */\n readOnly: boolean;\n /** Generated custom-route transport metadata, when the action has a route. */\n route?: ToolRouteDescriptor;\n}\n\n/**\n * Map one normalized field to its JSON-Schema fragment. Ported from\n * `MCPGenerator.fieldToMCPSchema` (mcp.ts) — keep the two in lockstep until\n * mcp.ts is switched to call this.\n */\nexport function fieldTypeToJsonSchema(field: ToolFieldMeta): ToolJsonSchema {\n const schema: ToolJsonSchema = {\n description: field.description || `${field.type} field`,\n };\n\n switch (field.type) {\n case 'text':\n schema.type = 'string';\n if (field.maxLength !== undefined) schema.maxLength = field.maxLength;\n if (field.minLength !== undefined) schema.minLength = field.minLength;\n break;\n case 'integer':\n schema.type = 'integer';\n if (field.min !== undefined) schema.minimum = field.min;\n if (field.max !== undefined) schema.maximum = field.max;\n break;\n case 'decimal':\n schema.type = 'number';\n if (field.min !== undefined) schema.minimum = field.min;\n if (field.max !== undefined) schema.maximum = field.max;\n break;\n case 'boolean':\n schema.type = 'boolean';\n break;\n case 'datetime':\n schema.type = 'string';\n schema.format = 'date-time';\n break;\n case 'json':\n schema.type = 'object';\n break;\n case 'foreignKey':\n case 'crossPackageRef':\n schema.type = 'string';\n // The generic relation hint is a fallback only — an authored\n // `@field({ description })` wins (#2046 threads descriptions into web\n // tool descriptors; clobbering them here would strip the help text).\n if (!field.description) {\n schema.description = `ID of related ${field.related || 'object'}`;\n }\n break;\n default:\n schema.type = 'string';\n }\n\n if (field.default !== undefined) {\n schema.default = field.default;\n }\n\n if (field.nullable && typeof schema.type === 'string') {\n schema.type = [schema.type, 'null'];\n }\n\n return schema;\n}\n\nfunction buildFieldProperties(fields: ToolFieldMeta[]): {\n properties: Record<string, ToolJsonSchema>;\n defs: Record<string, ToolJsonSchema>;\n} {\n const properties: Record<string, ToolJsonSchema> = {};\n const defs: Record<string, ToolJsonSchema> = {};\n\n fields.forEach((field, index) => {\n // Numeric keys avoid JSON Pointer escaping and keep output deterministic\n // even for an authored field name containing `/` or `~`.\n const defKey = `field_${index}`;\n defs[defKey] = fieldTypeToJsonSchema(field);\n properties[field.name] = { $ref: `#/$defs/${defKey}` };\n });\n\n return { properties, defs };\n}\n\n/**\n * Build the `inputSchema` for one action. CRUD verbs get the fixed skeletons\n * ported from mcp.ts's `generateObjectTools`; any other action is treated as a\n * custom method taking `{ id, options }`.\n */\nexport function buildToolInputSchema(\n action: string,\n fields: ToolFieldMeta[],\n customAction?: CustomActionMetadata,\n idType: ToolIdType = 'uuid',\n): ToolJsonSchema {\n const identifierSchema = (description: string): ToolJsonSchema => ({\n type: 'string',\n ...(idType === 'uuid' ? { format: 'uuid' } : {}),\n description,\n });\n\n switch (action) {\n case 'list':\n return finalizeMcpJsonSchema({\n type: 'object',\n properties: {\n limit: {\n type: 'integer',\n description: 'Maximum number of items to return',\n default: 50,\n minimum: 1,\n maximum: 1000,\n },\n offset: {\n type: 'integer',\n description: 'Number of items to skip',\n default: 0,\n minimum: 0,\n },\n orderBy: {\n type: 'string',\n description: 'Field to order by (e.g., \"created_at DESC\")',\n },\n where: {\n type: 'object',\n description: 'Filter conditions as key-value pairs',\n additionalProperties: true,\n },\n },\n });\n\n case 'get':\n // Either `id` OR `slug` identifies the object (collection.get resolves\n // both). The schema must require one of them just as the handler does,\n // while still allowing slug-only lookups.\n return finalizeMcpJsonSchema({\n type: 'object',\n anyOf: [{ required: ['id'] }, { required: ['slug'] }],\n properties: {\n id: identifierSchema('Unique identifier of the object'),\n slug: {\n type: 'string',\n description: 'URL-friendly identifier of the object',\n },\n },\n });\n\n case 'create': {\n const { properties, defs } = buildFieldProperties(fields);\n const required: string[] = [];\n for (const field of fields) {\n if (field.required) required.push(field.name);\n }\n return finalizeMcpJsonSchema({\n type: 'object',\n properties,\n ...(required.length > 0 ? { required } : {}),\n ...(Object.keys(defs).length > 0 ? { $defs: defs } : {}),\n });\n }\n\n case 'update': {\n const { properties: fieldProperties, defs } =\n buildFieldProperties(fields);\n const properties: Record<string, ToolJsonSchema> = {\n id: identifierSchema('ID of the object to update'),\n ...fieldProperties,\n };\n return finalizeMcpJsonSchema({\n type: 'object',\n properties,\n required: ['id'],\n ...(Object.keys(defs).length > 0 ? { $defs: defs } : {}),\n });\n }\n\n case 'delete':\n return finalizeMcpJsonSchema({\n type: 'object',\n properties: {\n id: identifierSchema('ID of the object to delete'),\n },\n required: ['id'],\n });\n\n default:\n return finalizeMcpJsonSchema(\n buildCustomActionInputSchema(\n customAction ?? {\n scope: 'item',\n idRequired: true,\n isStatic: false,\n },\n ),\n );\n }\n}\n\n/**\n * Human-readable description for a tool, matching mcp.ts's phrasing so the Node\n * MCP and WebMCP surfaces read identically.\n */\nfunction describeAction(action: string, className: string): string {\n switch (action) {\n case 'list':\n return `List ${className} objects with optional filtering`;\n case 'get':\n return `Get a specific ${className} by ID or slug`;\n case 'create':\n return `Create a new ${className}`;\n case 'update':\n return `Update an existing ${className}`;\n case 'delete':\n return `Delete a ${className} by ID`;\n default:\n return `Execute ${action} action on ${className}`;\n }\n}\n\n/**\n * Build the full descriptor set for a model. `toolPrefix` defaults to the\n * lowercased class name so tool ids match the existing Node MCP surface exactly\n * (`product_list`, `invoice_record_payment`), giving one stable tool vocabulary\n * across MCP and WebMCP.\n */\nexport function buildToolDescriptors(opts: {\n className: string;\n fields: ToolFieldMeta[];\n actions: string[];\n customActions?: Record<string, CustomActionMetadata>;\n toolPrefix?: string;\n idType?: ToolIdType;\n}): ToolDescriptor[] {\n const { className, fields, actions } = opts;\n const prefix = (opts.toolPrefix ?? className).toLowerCase();\n\n return actions.map((action) => ({\n action,\n // Custom method names can contain underscores; the runtime splits on the\n // FIRST underscore only (mcp.ts #1378), so a lowercased join is safe here.\n name: `${prefix}_${action}`.toLowerCase(),\n description: describeAction(action, className),\n inputSchema: buildToolInputSchema(\n action,\n fields,\n opts.customActions?.[action],\n opts.idType,\n ),\n readOnly: action === 'list' || action === 'get',\n }));\n}\n\n/** True when `action` is one of the fixed CRUD verbs (vs. a custom method). */\nexport function isCrudAction(action: string): boolean {\n return CRUD_ACTIONS.has(action);\n}\n"],"mappings":";;;AAkCA,IAAa,sBACX;;;;;;;AAQF,IAAa,oBAAoB;CAC/B,UAAU;CACV,UAAU;CAC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;KACjD,GAAG;IAIH;IACA,UAAU,CAAC,IAAI;IACf,GAAI,OAAO,KAAK,IAAI,CAAC,CAAC,SAAS,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;GACxD,CAAC;EACH;EAEA,KAAK,UACH,OAAO,sBAAsB;GAC3B,MAAM;GACN,YAAY,EACV,IAAI,iBAAiB,4BAA4B,EACnD;GACA,UAAU,CAAC,IAAI;EACjB,CAAC;EAEH,SACE,OAAO,sBACL,6BACE,gBAAgB;GACd,OAAO;GACP,YAAY;GACZ,UAAU;EACZ,CACF,CACF;CACJ;AACF;;;;;AAMA,SAAS,eAAe,QAAgB,WAA2B;CACjE,QAAQ,QAAR;EACE,KAAK,QACH,OAAO,QAAQ,UAAU;EAC3B,KAAK,OACH,OAAO,kBAAkB,UAAU;EACrC,KAAK,UACH,OAAO,gBAAgB;EACzB,KAAK,UACH,OAAO,sBAAsB;EAC/B,KAAK,UACH,OAAO,YAAY,UAAU;EAC/B,SACE,OAAO,WAAW,OAAO,aAAa;CAC1C;AACF;;;;;;;AAQA,SAAgB,qBAAqB,MAOhB;CACnB,MAAM,EAAE,WAAW,QAAQ,YAAY;CACvC,MAAM,UAAU,KAAK,cAAc,UAAA,CAAW,YAAY;CAE1D,OAAO,QAAQ,KAAK,YAAY;EAC9B;EAGA,MAAM,GAAG,OAAO,GAAG,SAAS,YAAY;EACxC,aAAa,eAAe,QAAQ,SAAS;EAC7C,aAAa,qBACX,QACA,QACA,KAAK,gBAAgB,SACrB,KAAK,MACP;EACA,UAAU,WAAW,UAAU,WAAW;CAC5C,EAAE;AACJ;;AAGA,SAAgB,aAAa,QAAyB;CACpD,OAAO,aAAa,IAAI,MAAM;AAChC"}
1
+ {"version":3,"file":"tool-schema.js","names":[],"sources":["../../src/generators/tool-schema.ts"],"sourcesContent":["import {\n buildCustomActionInputSchema,\n type CustomActionMetadata,\n type ToolEffect,\n} from './custom-action.js';\n\n/**\n * Transport-agnostic tool-descriptor builder (#1812, tracer).\n *\n * The single source of truth for turning a model's fields + exposed actions into\n * MCP-shaped tool descriptors (`{ name, description, inputSchema }`). This is the\n * shape both the Model Context Protocol AND Chrome's WebMCP\n * (`document.modelContext.registerTool`) consume — see\n * https://developer.chrome.com/docs/ai/webmcp.\n *\n * It is deliberately pure and free of `ObjectRegistry` / manifest coupling: it\n * takes a normalized {@link ToolFieldMeta}[] so BOTH callers can share it —\n * - `MCPGenerator` (`src/generators/mcp.ts`) for the Node stdio server, and\n * - the web-collections emitter (`src/vite-plugin/web-collections.ts`) for the\n * browser client-data runtime's WebMCP descriptors.\n *\n * Keeping one implementation removes the field-mapping drift risk the\n * \"three emission sites must agree\" contract in web-collections.ts already warns\n * about. The `fieldTypeToJsonSchema` / per-action skeletons below are ported\n * verbatim from mcp.ts's `fieldToMCPSchema` + `generateObjectTools`, so wiring\n * mcp.ts to call this helper is a mechanical, behavior-preserving refactor.\n */\n\n/**\n * A JSON Schema fragment. Values vary by field kind, so this is only ever\n * serialized into tool descriptors, never read back structurally.\n */\nexport type ToolJsonSchema = Record<string, unknown>;\n\n/** The only JSON Schema dialect emitted by generated MCP and WebMCP tools. */\nexport const JSON_SCHEMA_2020_12 =\n 'https://json-schema.org/draft/2020-12/schema';\n\n/**\n * Bounds for generated schemas. Field metadata is authored input, so it must\n * not turn a tools/list response into an unbounded composition or validation\n * workload. These limits are deliberately far above normal SMRT objects while\n * still keeping schemas comfortably inside MCP transport budgets.\n */\nexport const MCP_SCHEMA_LIMITS = {\n maxDepth: 16,\n maxNodes: 2_048,\n maxSerializedBytes: 65_536,\n} as const;\n\n/**\n * Apply the draft-2020-12 dialect and reject schemas that violate MCP's\n * bounded-composition contract. Generated schemas only ever reference local\n * `$defs`; external refs are neither emitted nor followed.\n */\nexport function finalizeMcpJsonSchema(schema: ToolJsonSchema): ToolJsonSchema {\n const finalized = {\n ...schema,\n $schema: JSON_SCHEMA_2020_12,\n };\n assertMcpJsonSchemaSafety(finalized);\n return finalized;\n}\n\n/**\n * Validate the resource envelope of an emitted schema without resolving refs.\n * This is intentionally structural rather than a general JSON-Schema\n * evaluator: the server already owns every schema it emits, and this guard\n * exists to keep authored metadata from introducing hostile shape growth.\n */\nexport function assertMcpJsonSchemaSafety(schema: ToolJsonSchema): void {\n let nodes = 0;\n const ancestors = new WeakSet<object>();\n\n const visit = (value: unknown, depth: number, key?: string): void => {\n nodes += 1;\n if (nodes > MCP_SCHEMA_LIMITS.maxNodes) {\n throw new Error(\n `MCP JSON Schema exceeds ${MCP_SCHEMA_LIMITS.maxNodes} nodes`,\n );\n }\n if (depth > MCP_SCHEMA_LIMITS.maxDepth) {\n throw new Error(\n `MCP JSON Schema exceeds ${MCP_SCHEMA_LIMITS.maxDepth} levels of depth`,\n );\n }\n if (key === '$ref') {\n if (\n typeof value !== 'string' ||\n !value.startsWith('#/$defs/') ||\n value.includes('://')\n ) {\n throw new Error(\n 'MCP JSON Schema may only use local #/$defs/ references',\n );\n }\n return;\n }\n if (value === null || typeof value !== 'object') return;\n if (ancestors.has(value)) {\n throw new Error('MCP JSON Schema must not contain cyclic values');\n }\n\n ancestors.add(value);\n if (Array.isArray(value)) {\n for (const entry of value) visit(entry, depth + 1);\n } else {\n for (const [childKey, child] of Object.entries(value)) {\n visit(child, depth + 1, childKey);\n }\n }\n ancestors.delete(value);\n };\n\n visit(schema, 0);\n\n let serialized: string;\n try {\n serialized = JSON.stringify(schema);\n } catch {\n throw new Error('MCP JSON Schema must be JSON-serializable');\n }\n if (\n new TextEncoder().encode(serialized).byteLength >\n MCP_SCHEMA_LIMITS.maxSerializedBytes\n ) {\n throw new Error(\n `MCP JSON Schema exceeds ${MCP_SCHEMA_LIMITS.maxSerializedBytes} serialized bytes`,\n );\n }\n}\n\n/**\n * Normalized field metadata — the intersection of what the runtime registry\n * (`FieldDefinition._meta`) and the build-time manifest (`WebFieldDefinition`)\n * can each supply. Callers flatten their own field source into this shape.\n */\nexport interface ToolFieldMeta {\n name: string;\n /** Field kind: text | integer | decimal | boolean | datetime | json | foreignKey | … */\n type: string;\n required?: boolean;\n description?: string;\n default?: unknown;\n maxLength?: number;\n minLength?: number;\n min?: number;\n max?: number;\n /** Field values may explicitly be null in the runtime/manifest contract. */\n nullable?: boolean;\n /** For `foreignKey`: the related class name, for the generated description. */\n related?: string;\n}\n\n/** Storage contract for the synthetic primary identifier. */\nexport type ToolIdType = 'uuid' | 'text';\n\n/** The CRUD verbs with dedicated input-schema skeletons; anything else is custom. */\nconst CRUD_ACTIONS = new Set(['list', 'get', 'create', 'update', 'delete']);\n\nexport interface ToolRouteDescriptor {\n /** HTTP method emitted for the route. */\n method: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';\n /** Whether the route targets one item or the whole collection. */\n scope: 'item' | 'collection';\n /** Route segments below the collection endpoint. Dynamic segments use `[x]`. */\n path: string[];\n /** Transport names rewritten by the tool schema (e.g. `actionId` → `id`). */\n parameterAliases?: Record<string, string>;\n /** The generated method accepts one `options` bag as its sole argument. */\n optionsBag?: boolean;\n}\n\n/** A single generated tool descriptor — the WebMCP / MCP tool shape. */\nexport interface ToolDescriptor {\n /** The action this tool performs (`list` | `get` | … | a custom method name). */\n action: string;\n /** Tool id, `${toolPrefix}_${action}` (e.g. `product_list`). */\n name: string;\n description: string;\n inputSchema: ToolJsonSchema;\n /** True when the declared effect is `read` → WebMCP `annotations.readOnlyHint`. */\n readOnly: boolean;\n /** Capability effect used by browser-tool exposure policy. */\n effect: ToolEffect;\n /** Whether repeating this tool with the same arguments is safe. */\n idempotent: boolean;\n /** Whether the tool may interact outside the SMRT application. */\n openWorld: boolean;\n /** Generated custom-route transport metadata, when the action has a route. */\n route?: ToolRouteDescriptor;\n}\n\n/**\n * Map one normalized field to its JSON-Schema fragment. Ported from\n * `MCPGenerator.fieldToMCPSchema` (mcp.ts) — keep the two in lockstep until\n * mcp.ts is switched to call this.\n */\nexport function fieldTypeToJsonSchema(field: ToolFieldMeta): ToolJsonSchema {\n const schema: ToolJsonSchema = {\n description: field.description || `${field.type} field`,\n };\n\n switch (field.type) {\n case 'text':\n schema.type = 'string';\n if (field.maxLength !== undefined) schema.maxLength = field.maxLength;\n if (field.minLength !== undefined) schema.minLength = field.minLength;\n break;\n case 'integer':\n schema.type = 'integer';\n if (field.min !== undefined) schema.minimum = field.min;\n if (field.max !== undefined) schema.maximum = field.max;\n break;\n case 'decimal':\n schema.type = 'number';\n if (field.min !== undefined) schema.minimum = field.min;\n if (field.max !== undefined) schema.maximum = field.max;\n break;\n case 'boolean':\n schema.type = 'boolean';\n break;\n case 'datetime':\n schema.type = 'string';\n schema.format = 'date-time';\n break;\n case 'json':\n schema.type = 'object';\n break;\n case 'foreignKey':\n case 'crossPackageRef':\n schema.type = 'string';\n // The generic relation hint is a fallback only — an authored\n // `@field({ description })` wins (#2046 threads descriptions into web\n // tool descriptors; clobbering them here would strip the help text).\n if (!field.description) {\n schema.description = `ID of related ${field.related || 'object'}`;\n }\n break;\n default:\n schema.type = 'string';\n }\n\n if (field.default !== undefined) {\n schema.default = field.default;\n }\n\n if (field.nullable && typeof schema.type === 'string') {\n schema.type = [schema.type, 'null'];\n }\n\n return schema;\n}\n\nfunction buildFieldProperties(fields: ToolFieldMeta[]): {\n properties: Record<string, ToolJsonSchema>;\n defs: Record<string, ToolJsonSchema>;\n} {\n const properties: Record<string, ToolJsonSchema> = {};\n const defs: Record<string, ToolJsonSchema> = {};\n\n fields.forEach((field, index) => {\n // Numeric keys avoid JSON Pointer escaping and keep output deterministic\n // even for an authored field name containing `/` or `~`.\n const defKey = `field_${index}`;\n defs[defKey] = fieldTypeToJsonSchema(field);\n properties[field.name] = { $ref: `#/$defs/${defKey}` };\n });\n\n return { properties, defs };\n}\n\n/**\n * Build the `inputSchema` for one action. CRUD verbs get the fixed skeletons\n * ported from mcp.ts's `generateObjectTools`; any other action is treated as a\n * custom method taking `{ id, options }`.\n */\nexport function buildToolInputSchema(\n action: string,\n fields: ToolFieldMeta[],\n customAction?: CustomActionMetadata,\n idType: ToolIdType = 'uuid',\n): ToolJsonSchema {\n const identifierSchema = (description: string): ToolJsonSchema => ({\n type: 'string',\n ...(idType === 'uuid' ? { format: 'uuid' } : {}),\n description,\n });\n\n switch (action) {\n case 'list':\n return finalizeMcpJsonSchema({\n type: 'object',\n properties: {\n limit: {\n type: 'integer',\n description: 'Maximum number of items to return',\n default: 50,\n minimum: 1,\n maximum: 1000,\n },\n offset: {\n type: 'integer',\n description: 'Number of items to skip',\n default: 0,\n minimum: 0,\n },\n orderBy: {\n type: 'string',\n description: 'Field to order by (e.g., \"created_at DESC\")',\n },\n where: {\n type: 'object',\n description: 'Filter conditions as key-value pairs',\n additionalProperties: true,\n },\n },\n });\n\n case 'get':\n // Either `id` OR `slug` identifies the object (collection.get resolves\n // both). The schema must require one of them just as the handler does,\n // while still allowing slug-only lookups.\n return finalizeMcpJsonSchema({\n type: 'object',\n anyOf: [{ required: ['id'] }, { required: ['slug'] }],\n properties: {\n id: identifierSchema('Unique identifier of the object'),\n slug: {\n type: 'string',\n description: 'URL-friendly identifier of the object',\n },\n },\n });\n\n case 'create': {\n const { properties, defs } = buildFieldProperties(fields);\n const required: string[] = [];\n for (const field of fields) {\n if (field.required) required.push(field.name);\n }\n return finalizeMcpJsonSchema({\n type: 'object',\n properties,\n ...(required.length > 0 ? { required } : {}),\n ...(Object.keys(defs).length > 0 ? { $defs: defs } : {}),\n });\n }\n\n case 'update': {\n const { properties: fieldProperties, defs } =\n buildFieldProperties(fields);\n const properties: Record<string, ToolJsonSchema> = {\n id: identifierSchema('ID of the object to update'),\n ...fieldProperties,\n };\n return finalizeMcpJsonSchema({\n type: 'object',\n properties,\n required: ['id'],\n ...(Object.keys(defs).length > 0 ? { $defs: defs } : {}),\n });\n }\n\n case 'delete':\n return finalizeMcpJsonSchema({\n type: 'object',\n properties: {\n id: identifierSchema('ID of the object to delete'),\n },\n required: ['id'],\n });\n\n default:\n return finalizeMcpJsonSchema(\n buildCustomActionInputSchema(\n customAction ?? {\n scope: 'item',\n idRequired: true,\n isStatic: false,\n effect: 'destructive',\n idempotent: false,\n openWorld: true,\n },\n ),\n );\n }\n}\n\n/**\n * Human-readable description for a tool, matching mcp.ts's phrasing so the Node\n * MCP and WebMCP surfaces read identically.\n */\nfunction describeAction(action: string, className: string): string {\n switch (action) {\n case 'list':\n return `List ${className} objects with optional filtering`;\n case 'get':\n return `Get a specific ${className} by ID or slug`;\n case 'create':\n return `Create a new ${className}`;\n case 'update':\n return `Update an existing ${className}`;\n case 'delete':\n return `Delete a ${className} by ID`;\n default:\n return `Execute ${action} action on ${className}`;\n }\n}\n\n/**\n * Build the full descriptor set for a model. `toolPrefix` defaults to the\n * lowercased class name so tool ids match the existing Node MCP surface exactly\n * (`product_list`, `invoice_record_payment`), giving one stable tool vocabulary\n * across MCP and WebMCP.\n */\nexport function buildToolDescriptors(opts: {\n className: string;\n fields: ToolFieldMeta[];\n actions: string[];\n customActions?: Record<string, CustomActionMetadata>;\n toolPrefix?: string;\n idType?: ToolIdType;\n}): ToolDescriptor[] {\n const { className, fields, actions } = opts;\n const prefix = (opts.toolPrefix ?? className).toLowerCase();\n\n return actions.map((action) => {\n const customAction = opts.customActions?.[action];\n const semantics = toolSemantics(action, customAction);\n return {\n action,\n // Custom method names can contain underscores; the runtime splits on the\n // FIRST underscore only (mcp.ts #1378), so a lowercased join is safe here.\n name: `${prefix}_${action}`.toLowerCase(),\n description: describeAction(action, className),\n inputSchema: buildToolInputSchema(\n action,\n fields,\n customAction,\n opts.idType,\n ),\n readOnly: semantics.effect === 'read',\n ...semantics,\n };\n });\n}\n\nfunction toolSemantics(\n action: string,\n customAction?: CustomActionMetadata,\n): Pick<ToolDescriptor, 'effect' | 'idempotent' | 'openWorld'> {\n switch (action) {\n case 'list':\n case 'get':\n return { effect: 'read', idempotent: true, openWorld: false };\n case 'create':\n return { effect: 'write', idempotent: false, openWorld: false };\n case 'update':\n return { effect: 'write', idempotent: true, openWorld: false };\n case 'delete':\n return { effect: 'destructive', idempotent: true, openWorld: false };\n default:\n return {\n effect: customAction?.effect ?? 'destructive',\n idempotent: customAction?.idempotent ?? false,\n openWorld: customAction?.openWorld ?? true,\n };\n }\n}\n\n/** True when `action` is one of the fixed CRUD verbs (vs. a custom method). */\nexport function isCrudAction(action: string): boolean {\n return CRUD_ACTIONS.has(action);\n}\n"],"mappings":";;;AAmCA,IAAa,sBACX;;;;;;;AAQF,IAAa,oBAAoB;CAC/B,UAAU;CACV,UAAU;CACV,oBAAoB;AACtB;;;;;;AAOA,SAAgB,sBAAsB,QAAwC;CAC5E,MAAM,YAAY;EAChB,GAAG;EACH,SAAS;CACX;CACA,0BAA0B,SAAS;CACnC,OAAO;AACT;;;;;;;AAQA,SAAgB,0BAA0B,QAA8B;CACtE,IAAI,QAAQ;CACZ,MAAM,4BAAY,IAAI,QAAgB;CAEtC,MAAM,SAAS,OAAgB,OAAe,QAAuB;EACnE,SAAS;EACT,IAAI,QAAQ,kBAAkB,UAC5B,MAAM,IAAI,MACR,2BAA2B,kBAAkB,SAAS,OACxD;EAEF,IAAI,QAAQ,kBAAkB,UAC5B,MAAM,IAAI,MACR,2BAA2B,kBAAkB,SAAS,iBACxD;EAEF,IAAI,QAAQ,QAAQ;GAClB,IACE,OAAO,UAAU,YACjB,CAAC,MAAM,WAAW,UAAU,KAC5B,MAAM,SAAS,KAAK,GAEpB,MAAM,IAAI,MACR,wDACF;GAEF;EACF;EACA,IAAI,UAAU,QAAQ,OAAO,UAAU,UAAU;EACjD,IAAI,UAAU,IAAI,KAAK,GACrB,MAAM,IAAI,MAAM,gDAAgD;EAGlE,UAAU,IAAI,KAAK;EACnB,IAAI,MAAM,QAAQ,KAAK,GACrB,KAAK,MAAM,SAAS,OAAO,MAAM,OAAO,QAAQ,CAAC;OAEjD,KAAK,MAAM,CAAC,UAAU,UAAU,OAAO,QAAQ,KAAK,GAClD,MAAM,OAAO,QAAQ,GAAG,QAAQ;EAGpC,UAAU,OAAO,KAAK;CACxB;CAEA,MAAM,QAAQ,CAAC;CAEf,IAAI;CACJ,IAAI;EACF,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AAQ,SAAS;GAC7C,aAAa,qBACX,QACA,QACA,cACA,KAAK,MACP;GACA,UAAU,UAAU,WAAW;GAC/B,GAAG;EACL;CACF,CAAC;AACH;AAEA,SAAS,cACP,QACA,cAC6D;CAC7D,QAAQ,QAAR;EACE,KAAK;EACL,KAAK,OACH,OAAO;GAAE,QAAQ;GAAQ,YAAY;GAAM,WAAW;EAAM;EAC9D,KAAK,UACH,OAAO;GAAE,QAAQ;GAAS,YAAY;GAAO,WAAW;EAAM;EAChE,KAAK,UACH,OAAO;GAAE,QAAQ;GAAS,YAAY;GAAM,WAAW;EAAM;EAC/D,KAAK,UACH,OAAO;GAAE,QAAQ;GAAe,YAAY;GAAM,WAAW;EAAM;EACrE,SACE,OAAO;GACL,QAAQ,cAAc,UAAU;GAChC,YAAY,cAAc,cAAc;GACxC,WAAW,cAAc,aAAa;EACxC;CACJ;AACF;;AAGA,SAAgB,aAAa,QAAyB;CACpD,OAAO,aAAa,IAAI,MAAM;AAChC"}
package/dist/index.js CHANGED
@@ -41,7 +41,7 @@ import { executeToolCall, executeToolCalls, formatToolResults, validateToolCall
41
41
  import { SmrtObject } from "./object.js";
42
42
  import { SMRT_COLLECTION_BASE_NAMES, isSmrtCollectionExtendsName } from "./registry/collection-resolution.js";
43
43
  import { ObjectRegistry, smrt } from "./registry.js";
44
- import { DEFAULT_FACET_LIMIT, MAX_FACET_FIELDS, MAX_FACET_LIMIT, SmrtCollection } from "./collection.js";
44
+ import { DEFAULT_FACET_LIMIT, MAX_FACET_FIELDS, MAX_FACET_LIMIT, MAX_STI_READ_SCOPE_TYPES, SmrtCollection } from "./collection.js";
45
45
  import { executeCollectionReadPlan } from "./collection-read-plan.js";
46
46
  import { DEFAULT_DATA_QUERY_PAGE_LIMIT, DEFAULT_DATA_QUERY_RESULT_BYTES, DataQueryValidationError, MAX_DATA_QUERY_CURSOR_LENGTH, MAX_DATA_QUERY_FACETS, MAX_DATA_QUERY_FILTERS, MAX_DATA_QUERY_FILTER_DEPTH, MAX_DATA_QUERY_IN_VALUES, MAX_DATA_QUERY_OFFSET, MAX_DATA_QUERY_PAGE_LIMIT, MAX_DATA_QUERY_REQUEST_BYTES, MAX_DATA_QUERY_RESULT_BYTES, MAX_DATA_QUERY_WARNINGS, canonicalizeDataQuery, createDataQueryFingerprint, normalizeDataQueryRequest, normalizeDataQueryResult, normalizeDataQuerySchema } from "./data-query.js";
47
47
  import { isDatabaseInterface, resolveDatabase } from "./database.js";
@@ -84,4 +84,4 @@ import "./system/index.js";
84
84
  import { getTestDatabase } from "./testing/database.js";
85
85
  import "./tools/index.js";
86
86
  import { smrtPlugin } from "./vite-plugin/index.js";
87
- export { AIError, APIGenerator, AiUsageCollector, AiUsagePersistenceHandler, CACHE_INVALIDATION_CHANNEL, CHANGE_FEED_INTERCEPTOR_NAME, CHANGE_FEED_TABLE, CHANGE_SIGNAL_CHANNEL, CLIGenerator, ConfigurationError, ContentHasher, CosineSimilarity, DEFAULT_AI_COST_RATES, DEFAULT_CHANGES_LIMIT, DEFAULT_DATA_QUERY_PAGE_LIMIT, DEFAULT_DATA_QUERY_RESULT_BYTES, DEFAULT_EMBEDDING_CONFIG, DEFAULT_EVENTS_HEARTBEAT_MS, DEFAULT_EVENTS_MAX_SUBSCRIBERS, DEFAULT_EVENTS_RETRY_AFTER_SECONDS, DEFAULT_FACET_LIMIT, DEFAULT_LEARNING_CONFIG, DEFAULT_LIST_LIMIT, DEFAULT_LIST_ORDER_BY, DEFAULT_POSTGRES_TIMEOUTS, DEFAULT_RETENTION_POLICY, DataQueryValidationError, DatabaseError, Dispatch, DispatchBus, DispatchCollection, DispatchSubscription, DispatchSubscriptionCollection, EmbeddingProvider, EmbeddingStorage, ErrorUtils, FilesystemError, GlobalInterceptors, LearningMemory, LiveSchemaParityError, MAX_CHANGES_LIMIT, MAX_DATA_QUERY_CURSOR_LENGTH, MAX_DATA_QUERY_FACETS, MAX_DATA_QUERY_FILTERS, MAX_DATA_QUERY_FILTER_DEPTH, MAX_DATA_QUERY_IN_VALUES, MAX_DATA_QUERY_OFFSET, MAX_DATA_QUERY_PAGE_LIMIT, MAX_DATA_QUERY_REQUEST_BYTES, MAX_DATA_QUERY_RESULT_BYTES, MAX_DATA_QUERY_WARNINGS, MAX_FACET_FIELDS, MAX_FACET_LIMIT, MAX_LIST_LIMIT, MAX_SYNC_APPLY_BATCH_SIZE, MCPGenerator, MCP_STABLE_CATALOG_TTL_MS, MODULE_DOC_HASH_PREFIX, ManifestBuilder, ManifestGenerator, ManifestManager, MetricsAdapter, NetworkError, ObjectRegistry, POSTGRES_TIMEOUT_ENV_VARS, PRIVATE_READ_CACHE_CONTROL, PubSubAdapter, QueryBoundsError, QueryOrderByError, RuntimeError, SMRT_COLLECTION_BASE_NAMES, SMRT_CUSTOM_ACTION_ERROR_METADATA_KEY, SYNC_APPLY_ROUTE_SEGMENTS, SYNC_APPLY_UUID_PATTERN, SYSTEM_TABLE_NAMES, SchemaComparer, SignalBus, SignalSanitizer, SmrtClass, SmrtCollection, SmrtError, SmrtHierarchical, SmrtJunction, SmrtMCPServer, SmrtObject, SmrtPolymorphicAssociation, TenantIsolationError, ValidationError, ValidationReport, ValidationUtils, appendChange, applyOneToManyChildAccessors, applyPendingDecoratorRegistrations, applyPostgresRuntimeTimeouts, applySyncWritablePolicy, assertPostgresSystemTimestampsCurrent, broadcastCacheInvalidation, buildCascadePlan, buildChangeEventStream, buildCustomActionInputSchema, buildCustomActionInvocationArgs, buildDefaultListOrderBy, buildDomainKnowledgeManifest, bumpChangeFeed, canonicalReadRepresentation, canonicalizeDataQuery, cascadeReferencesTo, changeEventSubscribersAtCapacity, checkLiveSchemaParity, childAccessorName, classifyDatabaseError, classifyDialectMessage, clearRetentionTasks, clone, computeBodyEtag, computeRuntimeWebManifestHash, computeTableVersionEtag, conditionalJsonResponse, config, convertTypeToJsonSchema, createDataQueryFingerprint, createDispatchBus, createFilesystemAdapter, createInterceptorContext, createMCPServer, createQualifiedName, createRestServer, createSmrtClient, createSmrtServer, crossPackageRef, customActionParameterInputName, detectEngine, discoverManifestEntry, ensureBootstrapSystemTableCompatibility, ensureCacheInvalidationListener, ensureChangeFeedTable, ensureDeferredSystemTableCompatibility, ensureDispatchSubscriptionsSystemTableCompatibility, ensureDispatchSystemTableCompatibility, ensureJobEventsSystemTableCompatibility, ensureJobsSystemTableCompatibility, ensureLegacySystemTableCompatibility, ensureSystemTables, estimateAiUsageCost, eventStreamCapacityExceededResponse, executeCollectionReadPlan, executeToolCall, executeToolCalls, field, findManifestEntryByQualifiedName, foreignKey, formatToolResults, generateDDLForEngine, generateOpenAPISpec, generateSchemaDiff, generateToolFromMethod, generateToolManifest, getAdapterInfo, getCLIHandler, getCacheGeneration, getChangesSince, getClassConfigResolvers, getClassName, getConfigResolver, getDatabaseEngine, getManifest, getPackageFromQualifiedName, getRetentionTasks, getSQLFromDiff, getSystemTableShapes, getTableVersion, getTenantScopedChangesSince, getTestDatabase, hasActionableChanges, ifNoneMatchHasConcreteMatch, ifNoneMatchSatisfied, importOptionalDependency, invalidateCollectionCache, isAbortedTransactionError, isAdvisoryOnlyChange, isDatabaseInterface, isDeterministicDatabaseError, isFromPackage, isLazyConfigSentinel, isManualOrAdvisoryChange, isNotNullViolationError, isQualifiedName, isSmrtCollectionExtendsName, isStaleWrite, isTenantScopedClassResolved, isTransientDatabaseError, isType, isUniqueViolationError, isValid, listConfigResolvers, loadExternalManifest, loadExternalManifestSync, loadLocalTestManifestSync, loadManifestFromPathSync, manifest, manyToMany, meta, migratePostgresSystemTimestamps, normalizeCustomActionFailure, normalizeDataQueryRequest, normalizeDataQueryResult, normalizeDataQuerySchema, normalizeEventsMaxSubscribers, normalizeOnDelete, normalizeTypedHttpError, oneToMany, parse, parseQualifiedName, parseSyncApplyBatch, payloadMatchesRow, planForeignKeyCreation, planPostgresSystemTimestampMigrations, processSyncApplyBatch, pruneAiUsage, pruneChangeFeed, pruneExpiredContexts, qualifiedNamesEqual, readAgentModuleDocs, registerChangeFeedWriter, registerCompatibleFieldDecorator, registerConfigResolver, registerFilesystemAdapterFactory, registerOptionalDependency, registerRetentionTask, resetChangeFeedWarnings, resetChangeSignals, resetCollectionCache, resetConfigResolvers, resetVerifiedTables, resolveAgentModuleDocPaths, resolveCustomActionMetadata, resolveDatabase, resolveDbCacheKey, resolveDispatchTenantId, resolveDispatchTenantScope, resolveGetStringFilter, resolveLazyConfig, resolveListLimit, resolveListOffset, resolveMCPToolListCacheHint, resolvePostgresTimeouts, resolveReadCacheControl, resolveTenantEtagDiscriminator, runCascadeDelete, runRetentionSweep, runWithTenantGate, safeParse, safeStringify, setDispatchTenantResolver, setTenantEntryPointRunner, setTenantScopedClassResolver, setupCLI, setupSwaggerUI, shouldIncludeMethod, signalVisibleToTenant, smrt, smrtPlugin, smrt as smrtRegistry, sortMCPTools, startRestServer, staticManifest, stopCacheInvalidationListeners, stopChangeSignalListeners, stringify, subscribeToChangeSignals, tableExists, tryReserveChangeEventSubscriberSlot, unregisterChangeFeedWriter, unregisterConfigResolver, unregisterRetentionTask, validateSyncApplyItem, validateToolCall, versionConditionalResponse, warnIfSharedCacheNeutralized };
87
+ export { AIError, APIGenerator, AiUsageCollector, AiUsagePersistenceHandler, CACHE_INVALIDATION_CHANNEL, CHANGE_FEED_INTERCEPTOR_NAME, CHANGE_FEED_TABLE, CHANGE_SIGNAL_CHANNEL, CLIGenerator, ConfigurationError, ContentHasher, CosineSimilarity, DEFAULT_AI_COST_RATES, DEFAULT_CHANGES_LIMIT, DEFAULT_DATA_QUERY_PAGE_LIMIT, DEFAULT_DATA_QUERY_RESULT_BYTES, DEFAULT_EMBEDDING_CONFIG, DEFAULT_EVENTS_HEARTBEAT_MS, DEFAULT_EVENTS_MAX_SUBSCRIBERS, DEFAULT_EVENTS_RETRY_AFTER_SECONDS, DEFAULT_FACET_LIMIT, DEFAULT_LEARNING_CONFIG, DEFAULT_LIST_LIMIT, DEFAULT_LIST_ORDER_BY, DEFAULT_POSTGRES_TIMEOUTS, DEFAULT_RETENTION_POLICY, DataQueryValidationError, DatabaseError, Dispatch, DispatchBus, DispatchCollection, DispatchSubscription, DispatchSubscriptionCollection, EmbeddingProvider, EmbeddingStorage, ErrorUtils, FilesystemError, GlobalInterceptors, LearningMemory, LiveSchemaParityError, MAX_CHANGES_LIMIT, MAX_DATA_QUERY_CURSOR_LENGTH, MAX_DATA_QUERY_FACETS, MAX_DATA_QUERY_FILTERS, MAX_DATA_QUERY_FILTER_DEPTH, MAX_DATA_QUERY_IN_VALUES, MAX_DATA_QUERY_OFFSET, MAX_DATA_QUERY_PAGE_LIMIT, MAX_DATA_QUERY_REQUEST_BYTES, MAX_DATA_QUERY_RESULT_BYTES, MAX_DATA_QUERY_WARNINGS, MAX_FACET_FIELDS, MAX_FACET_LIMIT, MAX_LIST_LIMIT, MAX_STI_READ_SCOPE_TYPES, MAX_SYNC_APPLY_BATCH_SIZE, MCPGenerator, MCP_STABLE_CATALOG_TTL_MS, MODULE_DOC_HASH_PREFIX, ManifestBuilder, ManifestGenerator, ManifestManager, MetricsAdapter, NetworkError, ObjectRegistry, POSTGRES_TIMEOUT_ENV_VARS, PRIVATE_READ_CACHE_CONTROL, PubSubAdapter, QueryBoundsError, QueryOrderByError, RuntimeError, SMRT_COLLECTION_BASE_NAMES, SMRT_CUSTOM_ACTION_ERROR_METADATA_KEY, SYNC_APPLY_ROUTE_SEGMENTS, SYNC_APPLY_UUID_PATTERN, SYSTEM_TABLE_NAMES, SchemaComparer, SignalBus, SignalSanitizer, SmrtClass, SmrtCollection, SmrtError, SmrtHierarchical, SmrtJunction, SmrtMCPServer, SmrtObject, SmrtPolymorphicAssociation, TenantIsolationError, ValidationError, ValidationReport, ValidationUtils, appendChange, applyOneToManyChildAccessors, applyPendingDecoratorRegistrations, applyPostgresRuntimeTimeouts, applySyncWritablePolicy, assertPostgresSystemTimestampsCurrent, broadcastCacheInvalidation, buildCascadePlan, buildChangeEventStream, buildCustomActionInputSchema, buildCustomActionInvocationArgs, buildDefaultListOrderBy, buildDomainKnowledgeManifest, bumpChangeFeed, canonicalReadRepresentation, canonicalizeDataQuery, cascadeReferencesTo, changeEventSubscribersAtCapacity, checkLiveSchemaParity, childAccessorName, classifyDatabaseError, classifyDialectMessage, clearRetentionTasks, clone, computeBodyEtag, computeRuntimeWebManifestHash, computeTableVersionEtag, conditionalJsonResponse, config, convertTypeToJsonSchema, createDataQueryFingerprint, createDispatchBus, createFilesystemAdapter, createInterceptorContext, createMCPServer, createQualifiedName, createRestServer, createSmrtClient, createSmrtServer, crossPackageRef, customActionParameterInputName, detectEngine, discoverManifestEntry, ensureBootstrapSystemTableCompatibility, ensureCacheInvalidationListener, ensureChangeFeedTable, ensureDeferredSystemTableCompatibility, ensureDispatchSubscriptionsSystemTableCompatibility, ensureDispatchSystemTableCompatibility, ensureJobEventsSystemTableCompatibility, ensureJobsSystemTableCompatibility, ensureLegacySystemTableCompatibility, ensureSystemTables, estimateAiUsageCost, eventStreamCapacityExceededResponse, executeCollectionReadPlan, executeToolCall, executeToolCalls, field, findManifestEntryByQualifiedName, foreignKey, formatToolResults, generateDDLForEngine, generateOpenAPISpec, generateSchemaDiff, generateToolFromMethod, generateToolManifest, getAdapterInfo, getCLIHandler, getCacheGeneration, getChangesSince, getClassConfigResolvers, getClassName, getConfigResolver, getDatabaseEngine, getManifest, getPackageFromQualifiedName, getRetentionTasks, getSQLFromDiff, getSystemTableShapes, getTableVersion, getTenantScopedChangesSince, getTestDatabase, hasActionableChanges, ifNoneMatchHasConcreteMatch, ifNoneMatchSatisfied, importOptionalDependency, invalidateCollectionCache, isAbortedTransactionError, isAdvisoryOnlyChange, isDatabaseInterface, isDeterministicDatabaseError, isFromPackage, isLazyConfigSentinel, isManualOrAdvisoryChange, isNotNullViolationError, isQualifiedName, isSmrtCollectionExtendsName, isStaleWrite, isTenantScopedClassResolved, isTransientDatabaseError, isType, isUniqueViolationError, isValid, listConfigResolvers, loadExternalManifest, loadExternalManifestSync, loadLocalTestManifestSync, loadManifestFromPathSync, manifest, manyToMany, meta, migratePostgresSystemTimestamps, normalizeCustomActionFailure, normalizeDataQueryRequest, normalizeDataQueryResult, normalizeDataQuerySchema, normalizeEventsMaxSubscribers, normalizeOnDelete, normalizeTypedHttpError, oneToMany, parse, parseQualifiedName, parseSyncApplyBatch, payloadMatchesRow, planForeignKeyCreation, planPostgresSystemTimestampMigrations, processSyncApplyBatch, pruneAiUsage, pruneChangeFeed, pruneExpiredContexts, qualifiedNamesEqual, readAgentModuleDocs, registerChangeFeedWriter, registerCompatibleFieldDecorator, registerConfigResolver, registerFilesystemAdapterFactory, registerOptionalDependency, registerRetentionTask, resetChangeFeedWarnings, resetChangeSignals, resetCollectionCache, resetConfigResolvers, resetVerifiedTables, resolveAgentModuleDocPaths, resolveCustomActionMetadata, resolveDatabase, resolveDbCacheKey, resolveDispatchTenantId, resolveDispatchTenantScope, resolveGetStringFilter, resolveLazyConfig, resolveListLimit, resolveListOffset, resolveMCPToolListCacheHint, resolvePostgresTimeouts, resolveReadCacheControl, resolveTenantEtagDiscriminator, runCascadeDelete, runRetentionSweep, runWithTenantGate, safeParse, safeStringify, setDispatchTenantResolver, setTenantEntryPointRunner, setTenantScopedClassResolver, setupCLI, setupSwaggerUI, shouldIncludeMethod, signalVisibleToTenant, smrt, smrtPlugin, smrt as smrtRegistry, sortMCPTools, startRestServer, staticManifest, stopCacheInvalidationListeners, stopChangeSignalListeners, stringify, subscribeToChangeSignals, tableExists, tryReserveChangeEventSubscriberSlot, unregisterChangeFeedWriter, unregisterConfigResolver, unregisterRetentionTask, validateSyncApplyItem, validateToolCall, versionConditionalResponse, warnIfSharedCacheNeutralized };
@@ -3,7 +3,7 @@ var staticManifest = {
3
3
  "version": "1.0.0",
4
4
  "timestamp": 0,
5
5
  "packageName": "@happyvertical/smrt-core",
6
- "packageVersion": "0.43.2",
6
+ "packageVersion": "0.43.4",
7
7
  "objects": {
8
8
  "@happyvertical/smrt-core:SmrtClass": {
9
9
  "name": "smrtclass",
@@ -140,7 +140,7 @@ var staticManifest = {
140
140
  "type": "SmrtLatestRelatedListOptions<ModelType>",
141
141
  "optional": false
142
142
  }],
143
- "returnType": "Promise<SmrtLatestRelatedRow<ModelType>[]>",
143
+ "returnType": "Promise<SmrtLatestRelatedRow<SmrtObject>[]>",
144
144
  "isStatic": false,
145
145
  "isPublic": true
146
146
  },
@@ -260,7 +260,7 @@ var staticManifest = {
260
260
  "type": "SmrtListOptions<ModelType>",
261
261
  "optional": true
262
262
  }],
263
- "returnType": "Promise<ModelType[] | Record<string>[]>",
263
+ "returnType": "Promise<SmrtObject[] | Record<string>[]>",
264
264
  "isStatic": false,
265
265
  "isPublic": true
266
266
  },
@@ -1 +1 @@
1
- {"version":3,"file":"static-manifest.js","names":[],"sources":["../../src/manifest/static-manifest.ts"],"sourcesContent":["/**\n * Auto-generated static manifest\n * Generated at build time from SMRT object scanning\n * DO NOT EDIT - This file is automatically generated\n */\n\nimport type { SmartObjectManifest } from '../scanner/types.js';\n\nexport const staticManifest: SmartObjectManifest = {\n \"version\": \"1.0.0\",\n \"timestamp\": 0,\n \"packageName\": \"@happyvertical/smrt-core\",\n \"packageVersion\": \"0.43.2\",\n \"objects\": {\n \"@happyvertical/smrt-core:SmrtClass\": {\n \"name\": \"smrtclass\",\n \"className\": \"SmrtClass\",\n \"qualifiedName\": \"@happyvertical/smrt-core:SmrtClass\",\n \"collection\": \"smrtclasses\",\n \"filePath\": \"packages/core/src/class.ts\",\n \"packageName\": \"@happyvertical/smrt-core\",\n \"fields\": {},\n \"methods\": {\n \"withDatabase\": {\n \"name\": \"withDatabase\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"db\",\n \"type\": \"DatabaseInterface\",\n \"optional\": false\n },\n {\n \"name\": \"operation\",\n \"type\": \"Function\",\n \"optional\": false\n }\n ],\n \"returnType\": \"Promise<T>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"getAiUsageSnapshot\": {\n \"name\": \"getAiUsageSnapshot\",\n \"async\": false,\n \"parameters\": [],\n \"returnType\": \"AiUsageSnapshot | undefined\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"resetAiUsage\": {\n \"name\": \"resetAiUsage\",\n \"async\": false,\n \"parameters\": [],\n \"returnType\": \"void\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"listAiUsage\": {\n \"name\": \"listAiUsage\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"AiUsageListOptions\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<SmrtAiUsageRecord[]>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"summarizeAiUsage\": {\n \"name\": \"summarizeAiUsage\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"AiUsageSummaryOptions\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<Record<string, AiUsageStats>>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"destroy\": {\n \"name\": \"destroy\",\n \"async\": false,\n \"parameters\": [],\n \"returnType\": \"void\",\n \"isStatic\": false,\n \"isPublic\": true\n }\n },\n \"decoratorConfig\": {},\n \"exportName\": \"SmrtClass\",\n \"collectionExportName\": \"SmrtClassCollection\",\n \"schema\": {\n \"tableName\": \"smrt_classes\",\n \"ddl\": \"CREATE TABLE IF NOT EXISTS \\\"smrt_classes\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp\\n);\",\n \"columns\": {\n \"id\": {\n \"type\": \"UUID\",\n \"primaryKey\": true,\n \"referenceKind\": \"id\",\n \"notNull\": true\n },\n \"slug\": {\n \"type\": \"TEXT\",\n \"notNull\": true\n },\n \"context\": {\n \"type\": \"TEXT\",\n \"notNull\": true,\n \"default\": \"\"\n },\n \"created_at\": {\n \"type\": \"TIMESTAMP\",\n \"notNull\": true,\n \"default\": \"current_timestamp\"\n },\n \"updated_at\": {\n \"type\": \"TIMESTAMP\",\n \"notNull\": true,\n \"default\": \"current_timestamp\"\n }\n },\n \"indexes\": [\n {\n \"name\": \"smrt_classes_slug_context_idx\",\n \"columns\": [\n \"slug\",\n \"context\"\n ],\n \"unique\": true\n },\n {\n \"name\": \"smrt_classes_created_at_idx\",\n \"columns\": [\n \"created_at\"\n ]\n }\n ],\n \"version\": \"234a72b0\"\n }\n },\n \"@happyvertical/smrt-core:SmrtCollection\": {\n \"name\": \"smrtcollection\",\n \"className\": \"SmrtCollection\",\n \"qualifiedName\": \"@happyvertical/smrt-core:SmrtCollection\",\n \"collection\": \"smrtcollections\",\n \"filePath\": \"packages/core/src/collection.ts\",\n \"packageName\": \"@happyvertical/smrt-core\",\n \"fields\": {},\n \"methods\": {\n \"listWithLatestRelated\": {\n \"name\": \"listWithLatestRelated\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"SmrtLatestRelatedListOptions<ModelType>\",\n \"optional\": false\n }\n ],\n \"returnType\": \"Promise<SmrtLatestRelatedRow<ModelType>[]>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"getItemClass\": {\n \"name\": \"getItemClass\",\n \"async\": false,\n \"parameters\": [],\n \"returnType\": \"SmrtCollectionItemClass<ModelType>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"validate\": {\n \"name\": \"validate\",\n \"async\": false,\n \"parameters\": [],\n \"returnType\": \"void\",\n \"isStatic\": true,\n \"isPublic\": true\n },\n \"create\": {\n \"name\": \"create\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"SmrtCreateInput<ModelType>\",\n \"optional\": false\n }\n ],\n \"returnType\": \"any\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"initialize\": {\n \"name\": \"initialize\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"Promise\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"ensureStorageReady\": {\n \"name\": \"ensureStorageReady\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"Promise<void>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"findOne\": {\n \"name\": \"findOne\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": false\n }\n ],\n \"returnType\": \"Promise<ModelType | null>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"findById\": {\n \"name\": \"findById\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"id\",\n \"type\": \"string\",\n \"optional\": false\n }\n ],\n \"returnType\": \"Promise<ModelType | null>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"findAll\": {\n \"name\": \"findAll\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<ModelType[]>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"listByIds\": {\n \"name\": \"listByIds\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"ids\",\n \"type\": \"string[]\",\n \"optional\": false\n }\n ],\n \"returnType\": \"Promise<ModelType[]>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"get\": {\n \"name\": \"get\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"filter\",\n \"type\": \"string | SmrtWhereClause<ModelType>\",\n \"optional\": false\n },\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<ModelType | null>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"list\": {\n \"name\": \"list\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"SmrtListOptions<ModelType>\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<ModelType[] | Record<string>[]>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"getOrUpsert\": {\n \"name\": \"getOrUpsert\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"data\",\n \"type\": \"Record<string>\",\n \"optional\": false\n },\n {\n \"name\": \"defaults\",\n \"type\": \"Record<string>\",\n \"optional\": true\n }\n ],\n \"returnType\": \"any\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"getDiff\": {\n \"name\": \"getDiff\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"existing\",\n \"type\": \"SmrtObject | Record<string>\",\n \"optional\": false\n },\n {\n \"name\": \"data\",\n \"type\": \"Record<string>\",\n \"optional\": false\n }\n ],\n \"returnType\": \"Promise<Record<string> | null>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"getFields\": {\n \"name\": \"getFields\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"Promise<Record<string, CollectionFieldDefinition>>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"getFieldsSync\": {\n \"name\": \"getFieldsSync\",\n \"async\": false,\n \"parameters\": [],\n \"returnType\": \"Record<string, CollectionFieldDefinition>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"generateSchema\": {\n \"name\": \"generateSchema\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"any\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"generateTableName\": {\n \"name\": \"generateTableName\",\n \"async\": false,\n \"parameters\": [],\n \"returnType\": \"any\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"delete\": {\n \"name\": \"delete\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"id\",\n \"type\": \"string\",\n \"optional\": false\n }\n ],\n \"returnType\": \"Promise<boolean>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"count\": {\n \"name\": \"count\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": true\n }\n ],\n \"returnType\": \"any\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"facets\": {\n \"name\": \"facets\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"SmrtFacetOptions<ModelType>\",\n \"optional\": false\n }\n ],\n \"returnType\": \"Promise<SmrtFacetResult[]>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"counts\": {\n \"name\": \"counts\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<SmrtCollectionCounts>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"getStiChildMetaType\": {\n \"name\": \"getStiChildMetaType\",\n \"async\": false,\n \"parameters\": [],\n \"returnType\": \"string | null\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"query\": {\n \"name\": \"query\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"sql\",\n \"type\": \"string\",\n \"optional\": false\n },\n {\n \"name\": \"params\",\n \"type\": \"any\",\n \"optional\": true\n },\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<ModelType[]>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"remember\": {\n \"name\": \"remember\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": false\n }\n ],\n \"returnType\": \"Promise<void>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"recall\": {\n \"name\": \"recall\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": false\n }\n ],\n \"returnType\": \"Promise\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"recallAll\": {\n \"name\": \"recallAll\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<Map<string>>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"forget\": {\n \"name\": \"forget\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": false\n }\n ],\n \"returnType\": \"Promise<void>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"forgetScope\": {\n \"name\": \"forgetScope\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": false\n }\n ],\n \"returnType\": \"Promise<number>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"semanticSearch\": {\n \"name\": \"semanticSearch\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"query\",\n \"type\": \"string\",\n \"optional\": false\n },\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<Array>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"findSimilar\": {\n \"name\": \"findSimilar\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"object\",\n \"type\": \"ModelType | string\",\n \"optional\": false\n },\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<Array>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"findSimilarToEmbedding\": {\n \"name\": \"findSimilarToEmbedding\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"embedding\",\n \"type\": \"number[]\",\n \"optional\": false\n },\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<Array>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"generateMissingEmbeddings\": {\n \"name\": \"generateMissingEmbeddings\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<object>\",\n \"isStatic\": false,\n \"isPublic\": true\n }\n },\n \"decoratorConfig\": {},\n \"extends\": \"SmrtClass\",\n \"exportName\": \"SmrtCollection\",\n \"collectionExportName\": \"SmrtCollectionCollection\",\n \"schema\": {\n \"tableName\": \"smrt_collections\",\n \"ddl\": \"CREATE TABLE IF NOT EXISTS \\\"smrt_collections\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp\\n);\",\n \"columns\": {\n \"id\": {\n \"type\": \"UUID\",\n \"primaryKey\": true,\n \"referenceKind\": \"id\",\n \"notNull\": true\n },\n \"slug\": {\n \"type\": \"TEXT\",\n \"notNull\": true\n },\n \"context\": {\n \"type\": \"TEXT\",\n \"notNull\": true,\n \"default\": \"\"\n },\n \"created_at\": {\n \"type\": \"TIMESTAMP\",\n \"notNull\": true,\n \"default\": \"current_timestamp\"\n },\n \"updated_at\": {\n \"type\": \"TIMESTAMP\",\n \"notNull\": true,\n \"default\": \"current_timestamp\"\n }\n },\n \"indexes\": [\n {\n \"name\": \"smrt_collections_slug_context_idx\",\n \"columns\": [\n \"slug\",\n \"context\"\n ],\n \"unique\": true\n },\n {\n \"name\": \"smrt_collections_created_at_idx\",\n \"columns\": [\n \"created_at\"\n ]\n }\n ],\n \"version\": \"295b0a80\"\n }\n },\n \"@happyvertical/smrt-core:SmrtHierarchical\": {\n \"name\": \"smrthierarchical\",\n \"className\": \"SmrtHierarchical\",\n \"qualifiedName\": \"@happyvertical/smrt-core:SmrtHierarchical\",\n \"collection\": \"smrthierarchicals\",\n \"filePath\": \"packages/core/src/hierarchical.ts\",\n \"packageName\": \"@happyvertical/smrt-core\",\n \"fields\": {\n \"parentId\": {\n \"type\": \"text\",\n \"required\": false\n }\n },\n \"methods\": {\n \"getParent\": {\n \"name\": \"getParent\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"Promise<null>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"getChildren\": {\n \"name\": \"getChildren\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"Promise\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"getAncestors\": {\n \"name\": \"getAncestors\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"Promise\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"getDescendants\": {\n \"name\": \"getDescendants\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"Promise\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"getHierarchy\": {\n \"name\": \"getHierarchy\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"Promise<HierarchyView>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"moveTo\": {\n \"name\": \"moveTo\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"newParent\",\n \"type\": \"string | null\",\n \"optional\": false\n }\n ],\n \"returnType\": \"Promise<void>\",\n \"isStatic\": false,\n \"isPublic\": true\n }\n },\n \"decoratorConfig\": {},\n \"extends\": \"SmrtObject\",\n \"exportName\": \"SmrtHierarchical\",\n \"collectionExportName\": \"SmrtHierarchicalCollection\"\n },\n \"@happyvertical/smrt-core:SmrtJunction\": {\n \"name\": \"smrtjunction\",\n \"className\": \"SmrtJunction\",\n \"qualifiedName\": \"@happyvertical/smrt-core:SmrtJunction\",\n \"collection\": \"smrtjunctions\",\n \"filePath\": \"packages/core/src/junction.ts\",\n \"packageName\": \"@happyvertical/smrt-core\",\n \"fields\": {},\n \"methods\": {\n \"byLeft\": {\n \"name\": \"byLeft\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"leftId\",\n \"type\": \"string\",\n \"optional\": false\n },\n {\n \"name\": \"opts\",\n \"type\": \"JunctionFilterOptions\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<TItem[]>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"byRight\": {\n \"name\": \"byRight\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"rightId\",\n \"type\": \"string\",\n \"optional\": false\n },\n {\n \"name\": \"opts\",\n \"type\": \"JunctionFilterOptions\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<TItem[]>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"attach\": {\n \"name\": \"attach\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"leftId\",\n \"type\": \"string\",\n \"optional\": false\n },\n {\n \"name\": \"rightId\",\n \"type\": \"string\",\n \"optional\": false\n },\n {\n \"name\": \"opts\",\n \"type\": \"JunctionAttachOptions\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<TItem>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"detach\": {\n \"name\": \"detach\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"leftId\",\n \"type\": \"string\",\n \"optional\": false\n },\n {\n \"name\": \"rightId\",\n \"type\": \"string\",\n \"optional\": false\n },\n {\n \"name\": \"opts\",\n \"type\": \"JunctionFilterOptions\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<void>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"setLinks\": {\n \"name\": \"setLinks\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"leftId\",\n \"type\": \"string\",\n \"optional\": false\n },\n {\n \"name\": \"rightIds\",\n \"type\": \"string[]\",\n \"optional\": false\n },\n {\n \"name\": \"opts\",\n \"type\": \"JunctionAttachOptions\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<void>\",\n \"isStatic\": false,\n \"isPublic\": true\n }\n },\n \"decoratorConfig\": {},\n \"extends\": \"SmrtCollection\",\n \"extendsTypeArg\": \"TItem\",\n \"exportName\": \"SmrtJunction\",\n \"collectionExportName\": \"SmrtJunctionCollection\"\n },\n \"@happyvertical/smrt-core:SmrtObject\": {\n \"name\": \"smrtobject\",\n \"className\": \"SmrtObject\",\n \"qualifiedName\": \"@happyvertical/smrt-core:SmrtObject\",\n \"collection\": \"smrtobjects\",\n \"filePath\": \"packages/core/src/object.ts\",\n \"packageName\": \"@happyvertical/smrt-core\",\n \"fields\": {\n \"created_at\": {\n \"type\": \"datetime\",\n \"required\": false\n },\n \"updated_at\": {\n \"type\": \"datetime\",\n \"required\": false\n }\n },\n \"methods\": {\n \"markAsPersisted\": {\n \"name\": \"markAsPersisted\",\n \"async\": false,\n \"parameters\": [],\n \"returnType\": \"void\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"requireInsertOnSave\": {\n \"name\": \"requireInsertOnSave\",\n \"async\": false,\n \"parameters\": [],\n \"returnType\": \"void\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"initialize\": {\n \"name\": \"initialize\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"Promise\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"loadDataFromDb\": {\n \"name\": \"loadDataFromDb\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"data\",\n \"type\": \"Record<string>\",\n \"optional\": false\n }\n ],\n \"returnType\": \"any\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"getFields\": {\n \"name\": \"getFields\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"Promise<any>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"toJSON\": {\n \"name\": \"toJSON\",\n \"async\": false,\n \"parameters\": [],\n \"returnType\": \"any\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"toPlainObject\": {\n \"name\": \"toPlainObject\",\n \"async\": false,\n \"parameters\": [],\n \"returnType\": \"Record<string>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"toPublicJSON\": {\n \"name\": \"toPublicJSON\",\n \"async\": false,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"PublicJsonOptions\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Record<string>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"getId\": {\n \"name\": \"getId\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"any\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"getSlug\": {\n \"name\": \"getSlug\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"any\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"getSavedId\": {\n \"name\": \"getSavedId\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"any\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"isSaved\": {\n \"name\": \"isSaved\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"any\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"save\": {\n \"name\": \"save\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"any\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"classifyConstraintError\": {\n \"name\": \"classifyConstraintError\",\n \"async\": false,\n \"parameters\": [\n {\n \"name\": \"message\",\n \"type\": \"string\",\n \"optional\": false\n }\n ],\n \"returnType\": \"'unique' | 'not_null' | null\",\n \"isStatic\": true,\n \"isPublic\": true\n },\n \"loadFromId\": {\n \"name\": \"loadFromId\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"any\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"loadFromSlug\": {\n \"name\": \"loadFromSlug\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"any\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"is\": {\n \"name\": \"is\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"criteria\",\n \"type\": \"string\",\n \"optional\": false\n },\n {\n \"name\": \"options\",\n \"type\": \"AiOperationOptions\",\n \"optional\": true\n }\n ],\n \"returnType\": \"any\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"do\": {\n \"name\": \"do\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"instructions\",\n \"type\": \"string\",\n \"optional\": false\n },\n {\n \"name\": \"options\",\n \"type\": \"AiOperationOptions\",\n \"optional\": true\n }\n ],\n \"returnType\": \"any\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"describe\": {\n \"name\": \"describe\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"AiOperationOptions\",\n \"optional\": true\n }\n ],\n \"returnType\": \"any\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"delete\": {\n \"name\": \"delete\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"Promise<void>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"isRelatedLoaded\": {\n \"name\": \"isRelatedLoaded\",\n \"async\": false,\n \"parameters\": [\n {\n \"name\": \"fieldName\",\n \"type\": \"string\",\n \"optional\": false\n }\n ],\n \"returnType\": \"boolean\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"_setLoadedRelationship\": {\n \"name\": \"_setLoadedRelationship\",\n \"async\": false,\n \"parameters\": [\n {\n \"name\": \"fieldName\",\n \"type\": \"string\",\n \"optional\": false\n },\n {\n \"name\": \"value\",\n \"type\": \"any\",\n \"optional\": false\n }\n ],\n \"returnType\": \"void\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"loadRelated\": {\n \"name\": \"loadRelated\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"fieldName\",\n \"type\": \"string\",\n \"optional\": false\n },\n {\n \"name\": \"opts\",\n \"type\": \"LoadRelatedOptions\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<any>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"loadRelatedMany\": {\n \"name\": \"loadRelatedMany\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"fieldName\",\n \"type\": \"string\",\n \"optional\": false\n },\n {\n \"name\": \"opts\",\n \"type\": \"LoadRelatedOptions\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<any[]>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"getRelated\": {\n \"name\": \"getRelated\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"fieldName\",\n \"type\": \"string\",\n \"optional\": false\n },\n {\n \"name\": \"opts\",\n \"type\": \"LoadRelatedOptions\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<any>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"getAvailableTools\": {\n \"name\": \"getAvailableTools\",\n \"async\": false,\n \"parameters\": [],\n \"returnType\": \"AITool[]\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"executeToolCall\": {\n \"name\": \"executeToolCall\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"toolCall\",\n \"type\": \"ToolCall\",\n \"optional\": false\n }\n ],\n \"returnType\": \"Promise<ToolCallResult>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"remember\": {\n \"name\": \"remember\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": false\n }\n ],\n \"returnType\": \"Promise<void>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"recall\": {\n \"name\": \"recall\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": false\n }\n ],\n \"returnType\": \"Promise\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"recallAll\": {\n \"name\": \"recallAll\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<Map<string>>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"forget\": {\n \"name\": \"forget\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": false\n }\n ],\n \"returnType\": \"Promise<void>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"forgetScope\": {\n \"name\": \"forgetScope\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": false\n }\n ],\n \"returnType\": \"Promise<number>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"generateEmbeddings\": {\n \"name\": \"generateEmbeddings\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"GenerateEmbeddingsOptions\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<void>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"getEmbedding\": {\n \"name\": \"getEmbedding\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"fieldName\",\n \"type\": \"string\",\n \"optional\": false\n },\n {\n \"name\": \"model\",\n \"type\": \"string\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<number[] | null>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"hasStaleEmbeddings\": {\n \"name\": \"hasStaleEmbeddings\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"Promise<boolean>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"clearEmbeddings\": {\n \"name\": \"clearEmbeddings\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"Promise<void>\",\n \"isStatic\": false,\n \"isPublic\": true\n }\n },\n \"decoratorConfig\": {},\n \"extends\": \"SmrtClass\",\n \"exportName\": \"SmrtObject\",\n \"collectionExportName\": \"SmrtObjectCollection\",\n \"schema\": {\n \"tableName\": \"smrt_objects\",\n \"ddl\": \"CREATE TABLE IF NOT EXISTS \\\"smrt_objects\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp\\n);\",\n \"columns\": {\n \"id\": {\n \"type\": \"UUID\",\n \"primaryKey\": true,\n \"referenceKind\": \"id\",\n \"notNull\": true\n },\n \"slug\": {\n \"type\": \"TEXT\",\n \"notNull\": true\n },\n \"context\": {\n \"type\": \"TEXT\",\n \"notNull\": true,\n \"default\": \"\"\n },\n \"created_at\": {\n \"type\": \"TIMESTAMP\",\n \"notNull\": true,\n \"default\": \"current_timestamp\"\n },\n \"updated_at\": {\n \"type\": \"TIMESTAMP\",\n \"notNull\": true,\n \"default\": \"current_timestamp\"\n }\n },\n \"indexes\": [\n {\n \"name\": \"smrt_objects_slug_context_idx\",\n \"columns\": [\n \"slug\",\n \"context\"\n ],\n \"unique\": true\n },\n {\n \"name\": \"smrt_objects_created_at_idx\",\n \"columns\": [\n \"created_at\"\n ]\n }\n ],\n \"version\": \"204bf3c4\"\n }\n },\n \"@happyvertical/smrt-core:SmrtPolymorphicAssociation\": {\n \"name\": \"smrtpolymorphicassociation\",\n \"className\": \"SmrtPolymorphicAssociation\",\n \"qualifiedName\": \"@happyvertical/smrt-core:SmrtPolymorphicAssociation\",\n \"collection\": \"smrtpolymorphicassociations\",\n \"filePath\": \"packages/core/src/polymorphic-association.ts\",\n \"packageName\": \"@happyvertical/smrt-core\",\n \"fields\": {\n \"metaType\": {\n \"type\": \"text\",\n \"required\": true,\n \"_meta\": {\n \"required\": true\n }\n },\n \"metaId\": {\n \"type\": \"text\",\n \"required\": true,\n \"_meta\": {\n \"required\": true\n }\n },\n \"role\": {\n \"type\": \"text\",\n \"required\": true,\n \"_meta\": {\n \"required\": true\n }\n },\n \"sortOrder\": {\n \"type\": \"integer\",\n \"required\": false,\n \"default\": 0\n }\n },\n \"methods\": {\n \"hydrate\": {\n \"name\": \"hydrate\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"Promise<T | null>\",\n \"isStatic\": false,\n \"isPublic\": true\n }\n },\n \"decoratorConfig\": {},\n \"extends\": \"SmrtObject\",\n \"exportName\": \"SmrtPolymorphicAssociation\",\n \"collectionExportName\": \"SmrtPolymorphicAssociationCollection\",\n \"validationRules\": [\n {\n \"field\": \"metaType\",\n \"rule\": \"required\",\n \"fieldType\": \"text\"\n },\n {\n \"field\": \"metaId\",\n \"rule\": \"required\",\n \"fieldType\": \"text\"\n },\n {\n \"field\": \"role\",\n \"rule\": \"required\",\n \"fieldType\": \"text\"\n }\n ]\n }\n },\n \"moduleType\": \"smrt\"\n} as const;\n\nexport default staticManifest;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ACF;IACA,WAAW;GACb;EACF;EACA,uDAAuD;GACrD,QAAQ;GACR,aAAa;GACb,iBAAiB;GACjB,cAAc;GACd,YAAY;GACZ,eAAe;GACf,UAAU;IACR,YAAY;KACV,QAAQ;KACR,YAAY;KACZ,SAAS,EACP,YAAY,KACd;IACF;IACA,UAAU;KACR,QAAQ;KACR,YAAY;KACZ,SAAS,EACP,YAAY,KACd;IACF;IACA,QAAQ;KACN,QAAQ;KACR,YAAY;KACZ,SAAS,EACP,YAAY,KACd;IACF;IACA,aAAa;KACX,QAAQ;KACR,YAAY;KACZ,WAAW;IACb;GACF;GACA,WAAW,EACT,WAAW;IACT,QAAQ;IACR,SAAS;IACT,cAAc,CAAC;IACf,cAAc;IACd,YAAY;IACZ,YAAY;GACd,EACF;GACA,mBAAmB,CAAC;GACpB,WAAW;GACX,cAAc;GACd,wBAAwB;GACxB,mBAAmB;IACjB;KACE,SAAS;KACT,QAAQ;KACR,aAAa;IACf;IACA;KACE,SAAS;KACT,QAAQ;KACR,aAAa;IACf;IACA;KACE,SAAS;KACT,QAAQ;KACR,aAAa;IACf;GACF;EACF;CACF;CACA,cAAc;AAChB"}
1
+ {"version":3,"file":"static-manifest.js","names":[],"sources":["../../src/manifest/static-manifest.ts"],"sourcesContent":["/**\n * Auto-generated static manifest\n * Generated at build time from SMRT object scanning\n * DO NOT EDIT - This file is automatically generated\n */\n\nimport type { SmartObjectManifest } from '../scanner/types.js';\n\nexport const staticManifest: SmartObjectManifest = {\n \"version\": \"1.0.0\",\n \"timestamp\": 0,\n \"packageName\": \"@happyvertical/smrt-core\",\n \"packageVersion\": \"0.43.4\",\n \"objects\": {\n \"@happyvertical/smrt-core:SmrtClass\": {\n \"name\": \"smrtclass\",\n \"className\": \"SmrtClass\",\n \"qualifiedName\": \"@happyvertical/smrt-core:SmrtClass\",\n \"collection\": \"smrtclasses\",\n \"filePath\": \"packages/core/src/class.ts\",\n \"packageName\": \"@happyvertical/smrt-core\",\n \"fields\": {},\n \"methods\": {\n \"withDatabase\": {\n \"name\": \"withDatabase\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"db\",\n \"type\": \"DatabaseInterface\",\n \"optional\": false\n },\n {\n \"name\": \"operation\",\n \"type\": \"Function\",\n \"optional\": false\n }\n ],\n \"returnType\": \"Promise<T>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"getAiUsageSnapshot\": {\n \"name\": \"getAiUsageSnapshot\",\n \"async\": false,\n \"parameters\": [],\n \"returnType\": \"AiUsageSnapshot | undefined\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"resetAiUsage\": {\n \"name\": \"resetAiUsage\",\n \"async\": false,\n \"parameters\": [],\n \"returnType\": \"void\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"listAiUsage\": {\n \"name\": \"listAiUsage\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"AiUsageListOptions\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<SmrtAiUsageRecord[]>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"summarizeAiUsage\": {\n \"name\": \"summarizeAiUsage\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"AiUsageSummaryOptions\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<Record<string, AiUsageStats>>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"destroy\": {\n \"name\": \"destroy\",\n \"async\": false,\n \"parameters\": [],\n \"returnType\": \"void\",\n \"isStatic\": false,\n \"isPublic\": true\n }\n },\n \"decoratorConfig\": {},\n \"exportName\": \"SmrtClass\",\n \"collectionExportName\": \"SmrtClassCollection\",\n \"schema\": {\n \"tableName\": \"smrt_classes\",\n \"ddl\": \"CREATE TABLE IF NOT EXISTS \\\"smrt_classes\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp\\n);\",\n \"columns\": {\n \"id\": {\n \"type\": \"UUID\",\n \"primaryKey\": true,\n \"referenceKind\": \"id\",\n \"notNull\": true\n },\n \"slug\": {\n \"type\": \"TEXT\",\n \"notNull\": true\n },\n \"context\": {\n \"type\": \"TEXT\",\n \"notNull\": true,\n \"default\": \"\"\n },\n \"created_at\": {\n \"type\": \"TIMESTAMP\",\n \"notNull\": true,\n \"default\": \"current_timestamp\"\n },\n \"updated_at\": {\n \"type\": \"TIMESTAMP\",\n \"notNull\": true,\n \"default\": \"current_timestamp\"\n }\n },\n \"indexes\": [\n {\n \"name\": \"smrt_classes_slug_context_idx\",\n \"columns\": [\n \"slug\",\n \"context\"\n ],\n \"unique\": true\n },\n {\n \"name\": \"smrt_classes_created_at_idx\",\n \"columns\": [\n \"created_at\"\n ]\n }\n ],\n \"version\": \"234a72b0\"\n }\n },\n \"@happyvertical/smrt-core:SmrtCollection\": {\n \"name\": \"smrtcollection\",\n \"className\": \"SmrtCollection\",\n \"qualifiedName\": \"@happyvertical/smrt-core:SmrtCollection\",\n \"collection\": \"smrtcollections\",\n \"filePath\": \"packages/core/src/collection.ts\",\n \"packageName\": \"@happyvertical/smrt-core\",\n \"fields\": {},\n \"methods\": {\n \"listWithLatestRelated\": {\n \"name\": \"listWithLatestRelated\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"SmrtLatestRelatedListOptions<ModelType>\",\n \"optional\": false\n }\n ],\n \"returnType\": \"Promise<SmrtLatestRelatedRow<SmrtObject>[]>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"getItemClass\": {\n \"name\": \"getItemClass\",\n \"async\": false,\n \"parameters\": [],\n \"returnType\": \"SmrtCollectionItemClass<ModelType>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"validate\": {\n \"name\": \"validate\",\n \"async\": false,\n \"parameters\": [],\n \"returnType\": \"void\",\n \"isStatic\": true,\n \"isPublic\": true\n },\n \"create\": {\n \"name\": \"create\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"SmrtCreateInput<ModelType>\",\n \"optional\": false\n }\n ],\n \"returnType\": \"any\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"initialize\": {\n \"name\": \"initialize\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"Promise\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"ensureStorageReady\": {\n \"name\": \"ensureStorageReady\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"Promise<void>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"findOne\": {\n \"name\": \"findOne\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": false\n }\n ],\n \"returnType\": \"Promise<ModelType | null>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"findById\": {\n \"name\": \"findById\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"id\",\n \"type\": \"string\",\n \"optional\": false\n }\n ],\n \"returnType\": \"Promise<ModelType | null>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"findAll\": {\n \"name\": \"findAll\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<ModelType[]>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"listByIds\": {\n \"name\": \"listByIds\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"ids\",\n \"type\": \"string[]\",\n \"optional\": false\n }\n ],\n \"returnType\": \"Promise<ModelType[]>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"get\": {\n \"name\": \"get\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"filter\",\n \"type\": \"string | SmrtWhereClause<ModelType>\",\n \"optional\": false\n },\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<ModelType | null>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"list\": {\n \"name\": \"list\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"SmrtListOptions<ModelType>\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<SmrtObject[] | Record<string>[]>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"getOrUpsert\": {\n \"name\": \"getOrUpsert\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"data\",\n \"type\": \"Record<string>\",\n \"optional\": false\n },\n {\n \"name\": \"defaults\",\n \"type\": \"Record<string>\",\n \"optional\": true\n }\n ],\n \"returnType\": \"any\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"getDiff\": {\n \"name\": \"getDiff\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"existing\",\n \"type\": \"SmrtObject | Record<string>\",\n \"optional\": false\n },\n {\n \"name\": \"data\",\n \"type\": \"Record<string>\",\n \"optional\": false\n }\n ],\n \"returnType\": \"Promise<Record<string> | null>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"getFields\": {\n \"name\": \"getFields\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"Promise<Record<string, CollectionFieldDefinition>>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"getFieldsSync\": {\n \"name\": \"getFieldsSync\",\n \"async\": false,\n \"parameters\": [],\n \"returnType\": \"Record<string, CollectionFieldDefinition>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"generateSchema\": {\n \"name\": \"generateSchema\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"any\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"generateTableName\": {\n \"name\": \"generateTableName\",\n \"async\": false,\n \"parameters\": [],\n \"returnType\": \"any\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"delete\": {\n \"name\": \"delete\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"id\",\n \"type\": \"string\",\n \"optional\": false\n }\n ],\n \"returnType\": \"Promise<boolean>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"count\": {\n \"name\": \"count\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": true\n }\n ],\n \"returnType\": \"any\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"facets\": {\n \"name\": \"facets\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"SmrtFacetOptions<ModelType>\",\n \"optional\": false\n }\n ],\n \"returnType\": \"Promise<SmrtFacetResult[]>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"counts\": {\n \"name\": \"counts\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<SmrtCollectionCounts>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"getStiChildMetaType\": {\n \"name\": \"getStiChildMetaType\",\n \"async\": false,\n \"parameters\": [],\n \"returnType\": \"string | null\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"query\": {\n \"name\": \"query\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"sql\",\n \"type\": \"string\",\n \"optional\": false\n },\n {\n \"name\": \"params\",\n \"type\": \"any\",\n \"optional\": true\n },\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<ModelType[]>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"remember\": {\n \"name\": \"remember\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": false\n }\n ],\n \"returnType\": \"Promise<void>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"recall\": {\n \"name\": \"recall\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": false\n }\n ],\n \"returnType\": \"Promise\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"recallAll\": {\n \"name\": \"recallAll\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<Map<string>>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"forget\": {\n \"name\": \"forget\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": false\n }\n ],\n \"returnType\": \"Promise<void>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"forgetScope\": {\n \"name\": \"forgetScope\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": false\n }\n ],\n \"returnType\": \"Promise<number>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"semanticSearch\": {\n \"name\": \"semanticSearch\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"query\",\n \"type\": \"string\",\n \"optional\": false\n },\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<Array>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"findSimilar\": {\n \"name\": \"findSimilar\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"object\",\n \"type\": \"ModelType | string\",\n \"optional\": false\n },\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<Array>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"findSimilarToEmbedding\": {\n \"name\": \"findSimilarToEmbedding\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"embedding\",\n \"type\": \"number[]\",\n \"optional\": false\n },\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<Array>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"generateMissingEmbeddings\": {\n \"name\": \"generateMissingEmbeddings\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<object>\",\n \"isStatic\": false,\n \"isPublic\": true\n }\n },\n \"decoratorConfig\": {},\n \"extends\": \"SmrtClass\",\n \"exportName\": \"SmrtCollection\",\n \"collectionExportName\": \"SmrtCollectionCollection\",\n \"schema\": {\n \"tableName\": \"smrt_collections\",\n \"ddl\": \"CREATE TABLE IF NOT EXISTS \\\"smrt_collections\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp\\n);\",\n \"columns\": {\n \"id\": {\n \"type\": \"UUID\",\n \"primaryKey\": true,\n \"referenceKind\": \"id\",\n \"notNull\": true\n },\n \"slug\": {\n \"type\": \"TEXT\",\n \"notNull\": true\n },\n \"context\": {\n \"type\": \"TEXT\",\n \"notNull\": true,\n \"default\": \"\"\n },\n \"created_at\": {\n \"type\": \"TIMESTAMP\",\n \"notNull\": true,\n \"default\": \"current_timestamp\"\n },\n \"updated_at\": {\n \"type\": \"TIMESTAMP\",\n \"notNull\": true,\n \"default\": \"current_timestamp\"\n }\n },\n \"indexes\": [\n {\n \"name\": \"smrt_collections_slug_context_idx\",\n \"columns\": [\n \"slug\",\n \"context\"\n ],\n \"unique\": true\n },\n {\n \"name\": \"smrt_collections_created_at_idx\",\n \"columns\": [\n \"created_at\"\n ]\n }\n ],\n \"version\": \"295b0a80\"\n }\n },\n \"@happyvertical/smrt-core:SmrtHierarchical\": {\n \"name\": \"smrthierarchical\",\n \"className\": \"SmrtHierarchical\",\n \"qualifiedName\": \"@happyvertical/smrt-core:SmrtHierarchical\",\n \"collection\": \"smrthierarchicals\",\n \"filePath\": \"packages/core/src/hierarchical.ts\",\n \"packageName\": \"@happyvertical/smrt-core\",\n \"fields\": {\n \"parentId\": {\n \"type\": \"text\",\n \"required\": false\n }\n },\n \"methods\": {\n \"getParent\": {\n \"name\": \"getParent\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"Promise<null>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"getChildren\": {\n \"name\": \"getChildren\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"Promise\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"getAncestors\": {\n \"name\": \"getAncestors\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"Promise\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"getDescendants\": {\n \"name\": \"getDescendants\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"Promise\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"getHierarchy\": {\n \"name\": \"getHierarchy\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"Promise<HierarchyView>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"moveTo\": {\n \"name\": \"moveTo\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"newParent\",\n \"type\": \"string | null\",\n \"optional\": false\n }\n ],\n \"returnType\": \"Promise<void>\",\n \"isStatic\": false,\n \"isPublic\": true\n }\n },\n \"decoratorConfig\": {},\n \"extends\": \"SmrtObject\",\n \"exportName\": \"SmrtHierarchical\",\n \"collectionExportName\": \"SmrtHierarchicalCollection\"\n },\n \"@happyvertical/smrt-core:SmrtJunction\": {\n \"name\": \"smrtjunction\",\n \"className\": \"SmrtJunction\",\n \"qualifiedName\": \"@happyvertical/smrt-core:SmrtJunction\",\n \"collection\": \"smrtjunctions\",\n \"filePath\": \"packages/core/src/junction.ts\",\n \"packageName\": \"@happyvertical/smrt-core\",\n \"fields\": {},\n \"methods\": {\n \"byLeft\": {\n \"name\": \"byLeft\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"leftId\",\n \"type\": \"string\",\n \"optional\": false\n },\n {\n \"name\": \"opts\",\n \"type\": \"JunctionFilterOptions\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<TItem[]>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"byRight\": {\n \"name\": \"byRight\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"rightId\",\n \"type\": \"string\",\n \"optional\": false\n },\n {\n \"name\": \"opts\",\n \"type\": \"JunctionFilterOptions\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<TItem[]>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"attach\": {\n \"name\": \"attach\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"leftId\",\n \"type\": \"string\",\n \"optional\": false\n },\n {\n \"name\": \"rightId\",\n \"type\": \"string\",\n \"optional\": false\n },\n {\n \"name\": \"opts\",\n \"type\": \"JunctionAttachOptions\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<TItem>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"detach\": {\n \"name\": \"detach\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"leftId\",\n \"type\": \"string\",\n \"optional\": false\n },\n {\n \"name\": \"rightId\",\n \"type\": \"string\",\n \"optional\": false\n },\n {\n \"name\": \"opts\",\n \"type\": \"JunctionFilterOptions\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<void>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"setLinks\": {\n \"name\": \"setLinks\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"leftId\",\n \"type\": \"string\",\n \"optional\": false\n },\n {\n \"name\": \"rightIds\",\n \"type\": \"string[]\",\n \"optional\": false\n },\n {\n \"name\": \"opts\",\n \"type\": \"JunctionAttachOptions\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<void>\",\n \"isStatic\": false,\n \"isPublic\": true\n }\n },\n \"decoratorConfig\": {},\n \"extends\": \"SmrtCollection\",\n \"extendsTypeArg\": \"TItem\",\n \"exportName\": \"SmrtJunction\",\n \"collectionExportName\": \"SmrtJunctionCollection\"\n },\n \"@happyvertical/smrt-core:SmrtObject\": {\n \"name\": \"smrtobject\",\n \"className\": \"SmrtObject\",\n \"qualifiedName\": \"@happyvertical/smrt-core:SmrtObject\",\n \"collection\": \"smrtobjects\",\n \"filePath\": \"packages/core/src/object.ts\",\n \"packageName\": \"@happyvertical/smrt-core\",\n \"fields\": {\n \"created_at\": {\n \"type\": \"datetime\",\n \"required\": false\n },\n \"updated_at\": {\n \"type\": \"datetime\",\n \"required\": false\n }\n },\n \"methods\": {\n \"markAsPersisted\": {\n \"name\": \"markAsPersisted\",\n \"async\": false,\n \"parameters\": [],\n \"returnType\": \"void\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"requireInsertOnSave\": {\n \"name\": \"requireInsertOnSave\",\n \"async\": false,\n \"parameters\": [],\n \"returnType\": \"void\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"initialize\": {\n \"name\": \"initialize\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"Promise\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"loadDataFromDb\": {\n \"name\": \"loadDataFromDb\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"data\",\n \"type\": \"Record<string>\",\n \"optional\": false\n }\n ],\n \"returnType\": \"any\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"getFields\": {\n \"name\": \"getFields\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"Promise<any>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"toJSON\": {\n \"name\": \"toJSON\",\n \"async\": false,\n \"parameters\": [],\n \"returnType\": \"any\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"toPlainObject\": {\n \"name\": \"toPlainObject\",\n \"async\": false,\n \"parameters\": [],\n \"returnType\": \"Record<string>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"toPublicJSON\": {\n \"name\": \"toPublicJSON\",\n \"async\": false,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"PublicJsonOptions\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Record<string>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"getId\": {\n \"name\": \"getId\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"any\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"getSlug\": {\n \"name\": \"getSlug\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"any\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"getSavedId\": {\n \"name\": \"getSavedId\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"any\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"isSaved\": {\n \"name\": \"isSaved\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"any\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"save\": {\n \"name\": \"save\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"any\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"classifyConstraintError\": {\n \"name\": \"classifyConstraintError\",\n \"async\": false,\n \"parameters\": [\n {\n \"name\": \"message\",\n \"type\": \"string\",\n \"optional\": false\n }\n ],\n \"returnType\": \"'unique' | 'not_null' | null\",\n \"isStatic\": true,\n \"isPublic\": true\n },\n \"loadFromId\": {\n \"name\": \"loadFromId\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"any\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"loadFromSlug\": {\n \"name\": \"loadFromSlug\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"any\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"is\": {\n \"name\": \"is\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"criteria\",\n \"type\": \"string\",\n \"optional\": false\n },\n {\n \"name\": \"options\",\n \"type\": \"AiOperationOptions\",\n \"optional\": true\n }\n ],\n \"returnType\": \"any\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"do\": {\n \"name\": \"do\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"instructions\",\n \"type\": \"string\",\n \"optional\": false\n },\n {\n \"name\": \"options\",\n \"type\": \"AiOperationOptions\",\n \"optional\": true\n }\n ],\n \"returnType\": \"any\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"describe\": {\n \"name\": \"describe\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"AiOperationOptions\",\n \"optional\": true\n }\n ],\n \"returnType\": \"any\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"delete\": {\n \"name\": \"delete\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"Promise<void>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"isRelatedLoaded\": {\n \"name\": \"isRelatedLoaded\",\n \"async\": false,\n \"parameters\": [\n {\n \"name\": \"fieldName\",\n \"type\": \"string\",\n \"optional\": false\n }\n ],\n \"returnType\": \"boolean\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"_setLoadedRelationship\": {\n \"name\": \"_setLoadedRelationship\",\n \"async\": false,\n \"parameters\": [\n {\n \"name\": \"fieldName\",\n \"type\": \"string\",\n \"optional\": false\n },\n {\n \"name\": \"value\",\n \"type\": \"any\",\n \"optional\": false\n }\n ],\n \"returnType\": \"void\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"loadRelated\": {\n \"name\": \"loadRelated\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"fieldName\",\n \"type\": \"string\",\n \"optional\": false\n },\n {\n \"name\": \"opts\",\n \"type\": \"LoadRelatedOptions\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<any>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"loadRelatedMany\": {\n \"name\": \"loadRelatedMany\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"fieldName\",\n \"type\": \"string\",\n \"optional\": false\n },\n {\n \"name\": \"opts\",\n \"type\": \"LoadRelatedOptions\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<any[]>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"getRelated\": {\n \"name\": \"getRelated\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"fieldName\",\n \"type\": \"string\",\n \"optional\": false\n },\n {\n \"name\": \"opts\",\n \"type\": \"LoadRelatedOptions\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<any>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"getAvailableTools\": {\n \"name\": \"getAvailableTools\",\n \"async\": false,\n \"parameters\": [],\n \"returnType\": \"AITool[]\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"executeToolCall\": {\n \"name\": \"executeToolCall\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"toolCall\",\n \"type\": \"ToolCall\",\n \"optional\": false\n }\n ],\n \"returnType\": \"Promise<ToolCallResult>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"remember\": {\n \"name\": \"remember\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": false\n }\n ],\n \"returnType\": \"Promise<void>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"recall\": {\n \"name\": \"recall\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": false\n }\n ],\n \"returnType\": \"Promise\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"recallAll\": {\n \"name\": \"recallAll\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<Map<string>>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"forget\": {\n \"name\": \"forget\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": false\n }\n ],\n \"returnType\": \"Promise<void>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"forgetScope\": {\n \"name\": \"forgetScope\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"object\",\n \"optional\": false\n }\n ],\n \"returnType\": \"Promise<number>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"generateEmbeddings\": {\n \"name\": \"generateEmbeddings\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"options\",\n \"type\": \"GenerateEmbeddingsOptions\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<void>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"getEmbedding\": {\n \"name\": \"getEmbedding\",\n \"async\": true,\n \"parameters\": [\n {\n \"name\": \"fieldName\",\n \"type\": \"string\",\n \"optional\": false\n },\n {\n \"name\": \"model\",\n \"type\": \"string\",\n \"optional\": true\n }\n ],\n \"returnType\": \"Promise<number[] | null>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"hasStaleEmbeddings\": {\n \"name\": \"hasStaleEmbeddings\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"Promise<boolean>\",\n \"isStatic\": false,\n \"isPublic\": true\n },\n \"clearEmbeddings\": {\n \"name\": \"clearEmbeddings\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"Promise<void>\",\n \"isStatic\": false,\n \"isPublic\": true\n }\n },\n \"decoratorConfig\": {},\n \"extends\": \"SmrtClass\",\n \"exportName\": \"SmrtObject\",\n \"collectionExportName\": \"SmrtObjectCollection\",\n \"schema\": {\n \"tableName\": \"smrt_objects\",\n \"ddl\": \"CREATE TABLE IF NOT EXISTS \\\"smrt_objects\\\" (\\n \\\"id\\\" UUID PRIMARY KEY NOT NULL,\\n \\\"slug\\\" TEXT NOT NULL,\\n \\\"context\\\" TEXT NOT NULL DEFAULT '',\\n \\\"created_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp,\\n \\\"updated_at\\\" TIMESTAMP NOT NULL DEFAULT current_timestamp\\n);\",\n \"columns\": {\n \"id\": {\n \"type\": \"UUID\",\n \"primaryKey\": true,\n \"referenceKind\": \"id\",\n \"notNull\": true\n },\n \"slug\": {\n \"type\": \"TEXT\",\n \"notNull\": true\n },\n \"context\": {\n \"type\": \"TEXT\",\n \"notNull\": true,\n \"default\": \"\"\n },\n \"created_at\": {\n \"type\": \"TIMESTAMP\",\n \"notNull\": true,\n \"default\": \"current_timestamp\"\n },\n \"updated_at\": {\n \"type\": \"TIMESTAMP\",\n \"notNull\": true,\n \"default\": \"current_timestamp\"\n }\n },\n \"indexes\": [\n {\n \"name\": \"smrt_objects_slug_context_idx\",\n \"columns\": [\n \"slug\",\n \"context\"\n ],\n \"unique\": true\n },\n {\n \"name\": \"smrt_objects_created_at_idx\",\n \"columns\": [\n \"created_at\"\n ]\n }\n ],\n \"version\": \"204bf3c4\"\n }\n },\n \"@happyvertical/smrt-core:SmrtPolymorphicAssociation\": {\n \"name\": \"smrtpolymorphicassociation\",\n \"className\": \"SmrtPolymorphicAssociation\",\n \"qualifiedName\": \"@happyvertical/smrt-core:SmrtPolymorphicAssociation\",\n \"collection\": \"smrtpolymorphicassociations\",\n \"filePath\": \"packages/core/src/polymorphic-association.ts\",\n \"packageName\": \"@happyvertical/smrt-core\",\n \"fields\": {\n \"metaType\": {\n \"type\": \"text\",\n \"required\": true,\n \"_meta\": {\n \"required\": true\n }\n },\n \"metaId\": {\n \"type\": \"text\",\n \"required\": true,\n \"_meta\": {\n \"required\": true\n }\n },\n \"role\": {\n \"type\": \"text\",\n \"required\": true,\n \"_meta\": {\n \"required\": true\n }\n },\n \"sortOrder\": {\n \"type\": \"integer\",\n \"required\": false,\n \"default\": 0\n }\n },\n \"methods\": {\n \"hydrate\": {\n \"name\": \"hydrate\",\n \"async\": true,\n \"parameters\": [],\n \"returnType\": \"Promise<T | null>\",\n \"isStatic\": false,\n \"isPublic\": true\n }\n },\n \"decoratorConfig\": {},\n \"extends\": \"SmrtObject\",\n \"exportName\": \"SmrtPolymorphicAssociation\",\n \"collectionExportName\": \"SmrtPolymorphicAssociationCollection\",\n \"validationRules\": [\n {\n \"field\": \"metaType\",\n \"rule\": \"required\",\n \"fieldType\": \"text\"\n },\n {\n \"field\": \"metaId\",\n \"rule\": \"required\",\n \"fieldType\": \"text\"\n },\n {\n \"field\": \"role\",\n \"rule\": \"required\",\n \"fieldType\": \"text\"\n }\n ]\n }\n },\n \"moduleType\": \"smrt\"\n} as const;\n\nexport default staticManifest;\n"],"mappings":";AAQA,IAAa,iBAAsC;CACjD,WAAW;CACX,aAAa;CACb,eAAe;CACf,kBAAkB;CAClB,WAAW;EACT,sCAAsC;GACpC,QAAQ;GACR,aAAa;GACb,iBAAiB;GACjB,cAAc;GACd,YAAY;GACZ,eAAe;GACf,UAAU,CAAC;GACX,WAAW;IACT,gBAAgB;KACd,QAAQ;KACR,SAAS;KACT,cAAc,CACZ;MACE,QAAQ;MACR,QAAQ;MACR,YAAY;KACd,GACA;MACE,QAAQ;MACR,QAAQ;MACR,YAAY;KACd,CACF;KACA,cAAc;KACd,YAAY;KACZ,YAAY;IACd;IACA,sBAAsB;KACpB,QAAQ;KACR,SAAS;KACT,cAAc,CAAC;KACf,cAAc;KACd,YAAY;KACZ,YAAY;IACd;IACA,gBAAgB;KACd,QAAQ;KACR,SAAS;KACT,cAAc,CAAC;KACf,cAAc;KACd,YAAY;KACZ,YAAY;IACd;IACA,eAAe;KACb,QAAQ;KACR,SAAS;KACT,cAAc,CACZ;MACE,QAAQ;MACR,QAAQ;MACR,YAAY;KACd,CACF;KACA,cAAc;KACd,YAAY;KACZ,YAAY;IACd;IACA,oBAAoB;KAClB,QAAQ;KACR,SAAS;KACT,cAAc,CACZ;MACE,QAAQ;MACR,QAAQ;MACR,YAAY;KACd,CACF;KACA,cAAc;KACd,YAAY;KACZ,YAAY;IACd;IACA,WAAW;KACT,QAAQ;KACR,SAAS;KACT,cAAc,CAAC;KACf,cAAc;KACd,YAAY;KACZ,YAA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