@happyvertical/smrt-comments 0.57.35 → 0.57.37

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.
@@ -1,7 +1,7 @@
1
1
  import { ObjectRegistry, SmrtCollection, SmrtObject, digestRunOnceContent, field, smrt } from "@happyvertical/smrt-core";
2
2
  import { TenantScoped, tenantId, withTenant } from "@happyvertical/smrt-tenancy";
3
3
  //#region src/__smrt-register__.ts
4
- ObjectRegistry.registerPackageManifest(JSON.parse(`{"version":"1.0.0","timestamp":0,"packageName":"@happyvertical/smrt-comments","packageVersion":"0.57.35","objects":{"@happyvertical/smrt-comments:CommentCollection":{"name":"commentcollection","className":"CommentCollection","qualifiedName":"@happyvertical/smrt-comments:CommentCollection","collection":"comments","filePath":"/home/runner/work/smrt/smrt/packages/comments/src/collections/CommentCollection.ts","packageName":"@happyvertical/smrt-comments","fields":{},"methods":{"listForRecord":{"name":"listForRecord","async":true,"parameters":[{"name":"recordType","type":"string","optional":false},{"name":"recordId","type":"string","optional":false}],"returnType":"Promise<Comment[]>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"record_comments","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Comment","exportName":"CommentCollection","collectionExportName":"CommentCollectionCollection","schema":{"tableName":"record_comments","ddl":"CREATE TABLE IF NOT EXISTS \\"record_comments\\" (\\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 \\"meta_type\\" TEXT NOT NULL,\\n \\"meta_id\\" TEXT NOT NULL,\\n \\"role\\" TEXT NOT NULL,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"author_user_id\\" UUID NOT NULL,\\n \\"body\\" TEXT NOT NULL,\\n \\"mentions\\" TEXT,\\n \\"idempotency_key\\" TEXT,\\n \\"retry_tenant_id\\" TEXT,\\n \\"request_digest\\" TEXT,\\n \\"parent_comment_id\\" UUID,\\n \\"status\\" TEXT NOT NULL DEFAULT 'visible',\\n \\"participation_snapshot\\" TEXT,\\n \\"edited_at\\" TIMESTAMP\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"meta_type":{"type":"TEXT","notNull":true,"unique":false},"meta_id":{"type":"TEXT","notNull":true,"unique":false},"role":{"type":"TEXT","notNull":true,"unique":false},"sort_order":{"type":"INTEGER","notNull":false,"unique":false,"default":0},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"author_user_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"body":{"type":"TEXT","notNull":true,"unique":false},"mentions":{"type":"TEXT","notNull":false,"unique":false},"idempotency_key":{"type":"TEXT","notNull":false,"unique":false},"retry_tenant_id":{"type":"TEXT","notNull":false,"unique":false},"request_digest":{"type":"TEXT","notNull":false,"unique":false},"parent_comment_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false},"status":{"type":"TEXT","notNull":true,"unique":false,"default":"visible"},"participation_snapshot":{"type":"TEXT","notNull":false,"unique":false},"edited_at":{"type":"TIMESTAMP","notNull":false,"unique":false}},"indexes":[{"name":"record_comments_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"record_comments_tenant_request_key","columns":["retry_tenant_id","idempotency_key"],"unique":true},{"name":"record_comments_record_created_idx","columns":["tenant_id","meta_type","meta_id","created_at"]},{"name":"record_comments_parent_created_idx","columns":["tenant_id","parent_comment_id","created_at"]},{"name":"record_comments_moderation_idx","columns":["tenant_id","status","created_at"]},{"name":"record_comments_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"record_comments_meta_type_meta_id_idx","columns":["meta_type","meta_id"]},{"name":"record_comments_author_user_id_idx","columns":["author_user_id"]},{"name":"record_comments_parent_comment_id_idx","columns":["parent_comment_id"]}],"version":"35c502ab"},"importPath":"@happyvertical/smrt-comments"},"@happyvertical/smrt-comments:CommentReportCollection":{"name":"commentreportcollection","className":"CommentReportCollection","qualifiedName":"@happyvertical/smrt-comments:CommentReportCollection","collection":"commentreports","filePath":"/home/runner/work/smrt/smrt/packages/comments/src/collections/CommentReportCollection.ts","packageName":"@happyvertical/smrt-comments","fields":{},"methods":{},"decoratorConfig":{"tableName":"comment_reports","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"CommentReport","exportName":"CommentReportCollection","collectionExportName":"CommentReportCollectionCollection","schema":{"tableName":"comment_reports","ddl":"CREATE TABLE IF NOT EXISTS \\"comment_reports\\" (\\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 \\"tenant_id\\" UUID NOT NULL,\\n \\"comment_id\\" UUID NOT NULL,\\n \\"reporter_user_id\\" UUID NOT NULL,\\n \\"reason\\" TEXT NOT NULL,\\n \\"status\\" TEXT NOT NULL DEFAULT 'open'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"comment_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false},"reporter_user_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"reason":{"type":"TEXT","notNull":true,"unique":false},"status":{"type":"TEXT","notNull":true,"unique":false,"default":"open"}},"indexes":[{"name":"comment_reports_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"comment_reports_actor_target_unique","columns":["tenant_id","reporter_user_id","comment_id"],"unique":true},{"name":"comment_reports_queue_idx","columns":["tenant_id","status","created_at"]},{"name":"comment_reports_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"comment_reports_comment_id_idx","columns":["comment_id"]},{"name":"comment_reports_reporter_user_id_idx","columns":["reporter_user_id"]}],"version":"001951c2"},"importPath":"@happyvertical/smrt-comments"},"@happyvertical/smrt-comments:CommentRevisionCollection":{"name":"commentrevisioncollection","className":"CommentRevisionCollection","qualifiedName":"@happyvertical/smrt-comments:CommentRevisionCollection","collection":"commentrevisions","filePath":"/home/runner/work/smrt/smrt/packages/comments/src/collections/CommentRevisionCollection.ts","packageName":"@happyvertical/smrt-comments","fields":{},"methods":{},"decoratorConfig":{"tableName":"comment_revisions","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"CommentRevision","exportName":"CommentRevisionCollection","collectionExportName":"CommentRevisionCollectionCollection","schema":{"tableName":"comment_revisions","ddl":"CREATE TABLE IF NOT EXISTS \\"comment_revisions\\" (\\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 \\"tenant_id\\" UUID NOT NULL,\\n \\"comment_id\\" UUID NOT NULL,\\n \\"editor_user_id\\" UUID NOT NULL,\\n \\"body\\" TEXT NOT NULL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"comment_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false},"editor_user_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"body":{"type":"TEXT","notNull":true,"unique":false}},"indexes":[{"name":"comment_revisions_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"comment_revisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"comment_revisions_comment_id_idx","columns":["comment_id"]},{"name":"comment_revisions_editor_user_id_idx","columns":["editor_user_id"]}],"version":"69ea301e"},"importPath":"@happyvertical/smrt-comments"},"@happyvertical/smrt-comments:ParticipationPolicyCollection":{"name":"participationpolicycollection","className":"ParticipationPolicyCollection","qualifiedName":"@happyvertical/smrt-comments:ParticipationPolicyCollection","collection":"participationpolicies","filePath":"/home/runner/work/smrt/smrt/packages/comments/src/collections/ParticipationCollection.ts","packageName":"@happyvertical/smrt-comments","fields":{},"methods":{},"decoratorConfig":{"tableName":"participation_policies","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"ParticipationPolicy","exportName":"ParticipationPolicyCollection","collectionExportName":"ParticipationPolicyCollectionCollection","schema":{"tableName":"participation_policies","ddl":"CREATE TABLE IF NOT EXISTS \\"participation_policies\\" (\\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 \\"tenant_id\\" UUID NOT NULL,\\n \\"record_type\\" TEXT,\\n \\"record_id\\" TEXT,\\n \\"action\\" TEXT NOT NULL,\\n \\"moderation_mode\\" TEXT NOT NULL DEFAULT 'open',\\n \\"max_actions\\" INTEGER NOT NULL DEFAULT 0,\\n \\"window_seconds\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"record_type":{"type":"TEXT","notNull":false,"unique":false},"record_id":{"type":"TEXT","notNull":false,"unique":false},"action":{"type":"TEXT","notNull":true,"unique":false},"moderation_mode":{"type":"TEXT","notNull":true,"unique":false,"default":"open"},"max_actions":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"window_seconds":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"participation_policies_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"participation_policies_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"7f2fdd9d"},"importPath":"@happyvertical/smrt-comments"},"@happyvertical/smrt-comments:ParticipationBanCollection":{"name":"participationbancollection","className":"ParticipationBanCollection","qualifiedName":"@happyvertical/smrt-comments:ParticipationBanCollection","collection":"participationbans","filePath":"/home/runner/work/smrt/smrt/packages/comments/src/collections/ParticipationCollection.ts","packageName":"@happyvertical/smrt-comments","fields":{},"methods":{},"decoratorConfig":{"tableName":"participation_bans","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"ParticipationBan","exportName":"ParticipationBanCollection","collectionExportName":"ParticipationBanCollectionCollection","schema":{"tableName":"participation_bans","ddl":"CREATE TABLE IF NOT EXISTS \\"participation_bans\\" (\\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 \\"tenant_id\\" UUID NOT NULL,\\n \\"actor_user_id\\" TEXT NOT NULL,\\n \\"record_type\\" TEXT,\\n \\"record_id\\" TEXT,\\n \\"reason\\" TEXT NOT NULL,\\n \\"expires_at\\" TIMESTAMP\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"actor_user_id":{"type":"TEXT","notNull":true,"unique":false},"record_type":{"type":"TEXT","notNull":false,"unique":false},"record_id":{"type":"TEXT","notNull":false,"unique":false},"reason":{"type":"TEXT","notNull":true,"unique":false},"expires_at":{"type":"TIMESTAMP","notNull":false,"unique":false}},"indexes":[{"name":"participation_bans_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"participation_bans_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"27bbfb94"},"importPath":"@happyvertical/smrt-comments"},"@happyvertical/smrt-comments:ParticipationRateBucketCollection":{"name":"participationratebucketcollection","className":"ParticipationRateBucketCollection","qualifiedName":"@happyvertical/smrt-comments:ParticipationRateBucketCollection","collection":"participationratebuckets","filePath":"/home/runner/work/smrt/smrt/packages/comments/src/collections/ParticipationCollection.ts","packageName":"@happyvertical/smrt-comments","fields":{},"methods":{},"decoratorConfig":{"tableName":"participation_rate_buckets","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"ParticipationRateBucket","exportName":"ParticipationRateBucketCollection","collectionExportName":"ParticipationRateBucketCollectionCollection","schema":{"tableName":"participation_rate_buckets","ddl":"CREATE TABLE IF NOT EXISTS \\"participation_rate_buckets\\" (\\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 \\"tenant_id\\" UUID NOT NULL,\\n \\"bucket_key\\" TEXT NOT NULL,\\n \\"action_count\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"bucket_key":{"type":"TEXT","notNull":true,"unique":false},"action_count":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"participation_rate_buckets_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"participation_rate_bucket_unique","columns":["tenant_id","bucket_key"],"unique":true},{"name":"participation_rate_buckets_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"9f3707e0"},"importPath":"@happyvertical/smrt-comments"},"@happyvertical/smrt-comments:Comment":{"name":"comment","className":"Comment","qualifiedName":"@happyvertical/smrt-comments:Comment","collection":"comments","filePath":"/home/runner/work/smrt/smrt/packages/comments/src/models/Comment.ts","packageName":"@happyvertical/smrt-comments","fields":{"metaType":{"type":"text","required":true,"_meta":{"required":true}},"metaId":{"type":"text","required":true,"_meta":{"required":true}},"role":{"type":"text","required":true,"_meta":{"required":true}},"sortOrder":{"type":"integer","required":false,"default":0},"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"authorUserId":{"type":"crossPackageRef","required":true,"related":"@happyvertical/smrt-users:User"},"body":{"type":"text","required":true,"_meta":{"required":true}},"mentions":{"type":"text","required":false},"idempotencyKey":{"type":"text","required":false,"_meta":{"nullable":true,"readonly":true},"readonly":true},"retryTenantId":{"type":"text","required":false,"_meta":{"nullable":true,"readonly":true},"readonly":true},"requestDigest":{"type":"text","required":false,"_meta":{"nullable":true,"readonly":true},"readonly":true},"parentCommentId":{"type":"foreignKey","required":false,"related":"Comment","_meta":{"nullable":true,"constraint":false}},"status":{"type":"text","required":true,"default":"visible","_meta":{"required":true},"enum":["visible","hidden","pending","deleted"]},"participationSnapshot":{"type":"text","required":false,"_meta":{"nullable":true,"readonly":true},"readonly":true},"editedAt":{"type":"datetime","required":false,"_meta":{"nullable":true,"readonly":true},"readonly":true}},"methods":{"hydrate":{"name":"hydrate","async":true,"parameters":[],"returnType":"Promise<T | null>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"record_comments","api":false,"mcp":false,"cli":false,"indexes":[{"name":"record_comments_tenant_request_key","columns":["retryTenantId","idempotencyKey"],"unique":true},{"name":"record_comments_record_created_idx","columns":["tenantId","metaType","metaId","createdAt"]},{"name":"record_comments_parent_created_idx","columns":["tenantId","parentCommentId","createdAt"]},{"name":"record_comments_moderation_idx","columns":["tenantId","status","createdAt"]}],"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtPolymorphicAssociation","exportName":"Comment","collectionExportName":"CommentCollection","validationRules":[{"field":"metaType","rule":"required","fieldType":"text"},{"field":"metaId","rule":"required","fieldType":"text"},{"field":"role","rule":"required","fieldType":"text"},{"field":"authorUserId","rule":"required","fieldType":"crossPackageRef"},{"field":"body","rule":"required","fieldType":"text"},{"field":"status","rule":"required","fieldType":"text"}],"schema":{"tableName":"record_comments","ddl":"CREATE TABLE IF NOT EXISTS \\"record_comments\\" (\\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 \\"meta_type\\" TEXT NOT NULL,\\n \\"meta_id\\" TEXT NOT NULL,\\n \\"role\\" TEXT NOT NULL,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"author_user_id\\" UUID NOT NULL,\\n \\"body\\" TEXT NOT NULL,\\n \\"mentions\\" TEXT,\\n \\"idempotency_key\\" TEXT,\\n \\"retry_tenant_id\\" TEXT,\\n \\"request_digest\\" TEXT,\\n \\"parent_comment_id\\" UUID,\\n \\"status\\" TEXT NOT NULL DEFAULT 'visible',\\n \\"participation_snapshot\\" TEXT,\\n \\"edited_at\\" TIMESTAMP\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"meta_type":{"type":"TEXT","notNull":true,"unique":false},"meta_id":{"type":"TEXT","notNull":true,"unique":false},"role":{"type":"TEXT","notNull":true,"unique":false},"sort_order":{"type":"INTEGER","notNull":false,"unique":false,"default":0},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"author_user_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"body":{"type":"TEXT","notNull":true,"unique":false},"mentions":{"type":"TEXT","notNull":false,"unique":false},"idempotency_key":{"type":"TEXT","notNull":false,"unique":false},"retry_tenant_id":{"type":"TEXT","notNull":false,"unique":false},"request_digest":{"type":"TEXT","notNull":false,"unique":false},"parent_comment_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false},"status":{"type":"TEXT","notNull":true,"unique":false,"default":"visible"},"participation_snapshot":{"type":"TEXT","notNull":false,"unique":false},"edited_at":{"type":"TIMESTAMP","notNull":false,"unique":false}},"indexes":[{"name":"record_comments_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"record_comments_tenant_request_key","columns":["retry_tenant_id","idempotency_key"],"unique":true},{"name":"record_comments_record_created_idx","columns":["tenant_id","meta_type","meta_id","created_at"]},{"name":"record_comments_parent_created_idx","columns":["tenant_id","parent_comment_id","created_at"]},{"name":"record_comments_moderation_idx","columns":["tenant_id","status","created_at"]},{"name":"record_comments_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"record_comments_meta_type_meta_id_idx","columns":["meta_type","meta_id"]},{"name":"record_comments_author_user_id_idx","columns":["author_user_id"]},{"name":"record_comments_parent_comment_id_idx","columns":["parent_comment_id"]}],"version":"35c502ab"},"importPath":"@happyvertical/smrt-comments"},"@happyvertical/smrt-comments:CommentReport":{"name":"commentreport","className":"CommentReport","qualifiedName":"@happyvertical/smrt-comments:CommentReport","collection":"commentreports","description":"A tenant-local report; moderation resolution never deletes the report.","filePath":"/home/runner/work/smrt/smrt/packages/comments/src/models/CommentReport.ts","packageName":"@happyvertical/smrt-comments","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"commentId":{"type":"foreignKey","required":true,"related":"Comment","_meta":{"required":true,"constraint":false}},"reporterUserId":{"type":"crossPackageRef","required":true,"related":"@happyvertical/smrt-users:User"},"reason":{"type":"text","required":true,"_meta":{"required":true}},"status":{"type":"text","required":true,"default":"open","_meta":{"required":true},"enum":["open","resolved","dismissed"]}},"methods":{},"decoratorConfig":{"tableName":"comment_reports","api":false,"mcp":false,"cli":false,"indexes":[{"name":"comment_reports_actor_target_unique","columns":["tenantId","reporterUserId","commentId"],"unique":true},{"name":"comment_reports_queue_idx","columns":["tenantId","status","createdAt"]}],"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"CommentReport","collectionExportName":"CommentReportCollection","validationRules":[{"field":"commentId","rule":"required","fieldType":"foreignKey"},{"field":"reporterUserId","rule":"required","fieldType":"crossPackageRef"},{"field":"reason","rule":"required","fieldType":"text"},{"field":"status","rule":"required","fieldType":"text"}],"schema":{"tableName":"comment_reports","ddl":"CREATE TABLE IF NOT EXISTS \\"comment_reports\\" (\\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 \\"tenant_id\\" UUID NOT NULL,\\n \\"comment_id\\" UUID NOT NULL,\\n \\"reporter_user_id\\" UUID NOT NULL,\\n \\"reason\\" TEXT NOT NULL,\\n \\"status\\" TEXT NOT NULL DEFAULT 'open'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"comment_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false},"reporter_user_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"reason":{"type":"TEXT","notNull":true,"unique":false},"status":{"type":"TEXT","notNull":true,"unique":false,"default":"open"}},"indexes":[{"name":"comment_reports_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"comment_reports_actor_target_unique","columns":["tenant_id","reporter_user_id","comment_id"],"unique":true},{"name":"comment_reports_queue_idx","columns":["tenant_id","status","created_at"]},{"name":"comment_reports_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"comment_reports_comment_id_idx","columns":["comment_id"]},{"name":"comment_reports_reporter_user_id_idx","columns":["reporter_user_id"]}],"version":"001951c2"},"importPath":"@happyvertical/smrt-comments"},"@happyvertical/smrt-comments:CommentRevision":{"name":"commentrevision","className":"CommentRevision","qualifiedName":"@happyvertical/smrt-comments:CommentRevision","collection":"commentrevisions","description":"Immutable prior body retained whenever an author edits a comment.","filePath":"/home/runner/work/smrt/smrt/packages/comments/src/models/CommentRevision.ts","packageName":"@happyvertical/smrt-comments","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"commentId":{"type":"foreignKey","required":true,"related":"Comment","_meta":{"required":true,"constraint":false}},"editorUserId":{"type":"crossPackageRef","required":true,"related":"@happyvertical/smrt-users:User"},"body":{"type":"text","required":true,"_meta":{"required":true}}},"methods":{},"decoratorConfig":{"tableName":"comment_revisions","api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"CommentRevision","collectionExportName":"CommentRevisionCollection","validationRules":[{"field":"commentId","rule":"required","fieldType":"foreignKey"},{"field":"editorUserId","rule":"required","fieldType":"crossPackageRef"},{"field":"body","rule":"required","fieldType":"text"}],"schema":{"tableName":"comment_revisions","ddl":"CREATE TABLE IF NOT EXISTS \\"comment_revisions\\" (\\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 \\"tenant_id\\" UUID NOT NULL,\\n \\"comment_id\\" UUID NOT NULL,\\n \\"editor_user_id\\" UUID NOT NULL,\\n \\"body\\" TEXT NOT NULL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"comment_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false},"editor_user_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"body":{"type":"TEXT","notNull":true,"unique":false}},"indexes":[{"name":"comment_revisions_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"comment_revisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"comment_revisions_comment_id_idx","columns":["comment_id"]},{"name":"comment_revisions_editor_user_id_idx","columns":["editor_user_id"]}],"version":"69ea301e"},"importPath":"@happyvertical/smrt-comments"},"@happyvertical/smrt-comments:ParticipationBan":{"name":"participationban","className":"ParticipationBan","qualifiedName":"@happyvertical/smrt-comments:ParticipationBan","collection":"participationbans","description":"Tenant-local, reusable participation ban; a blank target applies tenant-wide.","filePath":"/home/runner/work/smrt/smrt/packages/comments/src/models/ParticipationBan.ts","packageName":"@happyvertical/smrt-comments","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"actorUserId":{"type":"text","required":true,"_meta":{"required":true}},"recordType":{"type":"text","required":false},"recordId":{"type":"text","required":false},"reason":{"type":"text","required":true,"_meta":{"required":true}},"expiresAt":{"type":"datetime","required":false,"_meta":{"nullable":true}}},"methods":{},"decoratorConfig":{"tableName":"participation_bans","api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"ParticipationBan","collectionExportName":"ParticipationBanCollection","validationRules":[{"field":"actorUserId","rule":"required","fieldType":"text"},{"field":"reason","rule":"required","fieldType":"text"}],"schema":{"tableName":"participation_bans","ddl":"CREATE TABLE IF NOT EXISTS \\"participation_bans\\" (\\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 \\"tenant_id\\" UUID NOT NULL,\\n \\"actor_user_id\\" TEXT NOT NULL,\\n \\"record_type\\" TEXT,\\n \\"record_id\\" TEXT,\\n \\"reason\\" TEXT NOT NULL,\\n \\"expires_at\\" TIMESTAMP\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"actor_user_id":{"type":"TEXT","notNull":true,"unique":false},"record_type":{"type":"TEXT","notNull":false,"unique":false},"record_id":{"type":"TEXT","notNull":false,"unique":false},"reason":{"type":"TEXT","notNull":true,"unique":false},"expires_at":{"type":"TIMESTAMP","notNull":false,"unique":false}},"indexes":[{"name":"participation_bans_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"participation_bans_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"27bbfb94"},"importPath":"@happyvertical/smrt-comments"},"@happyvertical/smrt-comments:ParticipationPolicy":{"name":"participationpolicy","className":"ParticipationPolicy","qualifiedName":"@happyvertical/smrt-comments:ParticipationPolicy","collection":"participationpolicies","description":"A generic tenant default or exact-record override for participation actions.","filePath":"/home/runner/work/smrt/smrt/packages/comments/src/models/ParticipationPolicy.ts","packageName":"@happyvertical/smrt-comments","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"recordType":{"type":"text","required":false},"recordId":{"type":"text","required":false},"action":{"type":"text","required":true,"_meta":{"required":true}},"moderationMode":{"type":"text","required":true,"default":"open","_meta":{"required":true},"enum":["open","pre_moderated","members_only","closed"]},"maxActions":{"type":"integer","required":true,"default":0,"_meta":{"required":true}},"windowSeconds":{"type":"integer","required":true,"default":0,"_meta":{"required":true}}},"methods":{},"decoratorConfig":{"tableName":"participation_policies","api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"ParticipationPolicy","collectionExportName":"ParticipationPolicyCollection","validationRules":[{"field":"action","rule":"required","fieldType":"text"},{"field":"moderationMode","rule":"required","fieldType":"text"},{"field":"maxActions","rule":"required","fieldType":"integer"},{"field":"windowSeconds","rule":"required","fieldType":"integer"}],"schema":{"tableName":"participation_policies","ddl":"CREATE TABLE IF NOT EXISTS \\"participation_policies\\" (\\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 \\"tenant_id\\" UUID NOT NULL,\\n \\"record_type\\" TEXT,\\n \\"record_id\\" TEXT,\\n \\"action\\" TEXT NOT NULL,\\n \\"moderation_mode\\" TEXT NOT NULL DEFAULT 'open',\\n \\"max_actions\\" INTEGER NOT NULL DEFAULT 0,\\n \\"window_seconds\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"record_type":{"type":"TEXT","notNull":false,"unique":false},"record_id":{"type":"TEXT","notNull":false,"unique":false},"action":{"type":"TEXT","notNull":true,"unique":false},"moderation_mode":{"type":"TEXT","notNull":true,"unique":false,"default":"open"},"max_actions":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"window_seconds":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"participation_policies_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"participation_policies_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"7f2fdd9d"},"importPath":"@happyvertical/smrt-comments"},"@happyvertical/smrt-comments:ParticipationRateBucket":{"name":"participationratebucket","className":"ParticipationRateBucket","qualifiedName":"@happyvertical/smrt-comments:ParticipationRateBucket","collection":"participationratebuckets","description":"Service-owned fixed-window counter. Never delete a currently active bucket.","filePath":"/home/runner/work/smrt/smrt/packages/comments/src/models/ParticipationRateBucket.ts","packageName":"@happyvertical/smrt-comments","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"bucketKey":{"type":"text","required":true,"_meta":{"required":true}},"actionCount":{"type":"integer","required":true,"default":0,"_meta":{"required":true}}},"methods":{},"decoratorConfig":{"tableName":"participation_rate_buckets","api":false,"mcp":false,"cli":false,"indexes":[{"name":"participation_rate_bucket_unique","columns":["tenantId","bucketKey"],"unique":true}],"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"ParticipationRateBucket","collectionExportName":"ParticipationRateBucketCollection","validationRules":[{"field":"bucketKey","rule":"required","fieldType":"text"},{"field":"actionCount","rule":"required","fieldType":"integer"}],"schema":{"tableName":"participation_rate_buckets","ddl":"CREATE TABLE IF NOT EXISTS \\"participation_rate_buckets\\" (\\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 \\"tenant_id\\" UUID NOT NULL,\\n \\"bucket_key\\" TEXT NOT NULL,\\n \\"action_count\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"bucket_key":{"type":"TEXT","notNull":true,"unique":false},"action_count":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"participation_rate_buckets_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"participation_rate_bucket_unique","columns":["tenant_id","bucket_key"],"unique":true},{"name":"participation_rate_buckets_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"9f3707e0"},"importPath":"@happyvertical/smrt-comments"}},"moduleType":"smrt","recipes":[{"id":"comments.records","className":"RecordCommentsRecipe","label":"Record comments","summary":"Discuss work directly on the records it concerns.","synonyms":["comments","mentions","discussion"],"models":["@happyvertical/smrt-comments:Comment","@happyvertical/smrt-comments:CommentRevision","@happyvertical/smrt-comments:CommentReport","@happyvertical/smrt-comments:ParticipationPolicy","@happyvertical/smrt-comments:ParticipationBan","@happyvertical/smrt-comments:ParticipationRateBucket"],"nav":[],"requires":[],"group":{"id":"comments","label":"Comments","summary":"Keep discussions alongside the records your team works on."},"help":{"markdown":"## Overview\\n\\nRecord comments keep a discussion next to the work it concerns. Open a record\\nyou can access to read its discussion or add a comment. Comments are part of\\nthe record page, rather than a separate list of every discussion.\\n\\n## Tasks\\n\\n### Add a comment\\n\\nOpen the record, find Comments, write your message and choose Post comment.\\nYour app controls who can read the record and who can contribute to its discussion.\\n\\n### Mention someone\\n\\nIf your app provides mention selection, choose a teammate who can access the\\nrecord. When mention notifications are connected, that person receives a\\nnotification. Typing a name alone does not select a recipient.\\n\\n### Check a failed post\\n\\nIf posting reports an error, refresh the discussion before trying again. A\\ncomment may have been saved even when its mention notification could not be\\ndelivered. If it appears in the discussion, do not post it a second time.\\n","fieldRefs":[]},"surfaces":[{"kind":"playground","export":"@happyvertical/smrt-comments/svelte#RecordCommentsPlayground","label":"Record discussion preview"}],"runtime":"both","demoSeed":{"export":"@happyvertical/smrt-comments/svelte#recordCommentsDemo"},"demo":{"mode":"server","reasons":["Needs a server because its package depends on @happyvertical/smrt-tenancy, which do not build for a browser (#3624)."]}}],"smrtDependencies":["@happyvertical/smrt-core","@happyvertical/smrt-messages","@happyvertical/smrt-tenancy"],"browser":{"status":"server-only","issues":["#3624"],"via":["@happyvertical/smrt-tenancy"]},"stampsConstructors":true}`));
4
+ ObjectRegistry.registerPackageManifest(JSON.parse(`{"version":"1.0.0","timestamp":0,"packageName":"@happyvertical/smrt-comments","packageVersion":"0.57.37","objects":{"@happyvertical/smrt-comments:CommentCollection":{"name":"commentcollection","className":"CommentCollection","qualifiedName":"@happyvertical/smrt-comments:CommentCollection","collection":"comments","filePath":"/home/runner/work/smrt/smrt/packages/comments/src/collections/CommentCollection.ts","packageName":"@happyvertical/smrt-comments","fields":{},"methods":{"listForRecord":{"name":"listForRecord","async":true,"parameters":[{"name":"recordType","type":"string","optional":false},{"name":"recordId","type":"string","optional":false}],"returnType":"Promise<Comment[]>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"record_comments","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"Comment","exportName":"CommentCollection","collectionExportName":"CommentCollectionCollection","schema":{"tableName":"record_comments","ddl":"CREATE TABLE IF NOT EXISTS \\"record_comments\\" (\\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 \\"meta_type\\" TEXT NOT NULL,\\n \\"meta_id\\" TEXT NOT NULL,\\n \\"role\\" TEXT NOT NULL,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"author_user_id\\" UUID NOT NULL,\\n \\"body\\" TEXT NOT NULL,\\n \\"mentions\\" TEXT,\\n \\"idempotency_key\\" TEXT,\\n \\"retry_tenant_id\\" TEXT,\\n \\"request_digest\\" TEXT,\\n \\"parent_comment_id\\" UUID,\\n \\"status\\" TEXT NOT NULL DEFAULT 'visible',\\n \\"participation_snapshot\\" TEXT,\\n \\"edited_at\\" TIMESTAMP\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"meta_type":{"type":"TEXT","notNull":true,"unique":false},"meta_id":{"type":"TEXT","notNull":true,"unique":false},"role":{"type":"TEXT","notNull":true,"unique":false},"sort_order":{"type":"INTEGER","notNull":false,"unique":false,"default":0},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"author_user_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"body":{"type":"TEXT","notNull":true,"unique":false},"mentions":{"type":"TEXT","notNull":false,"unique":false},"idempotency_key":{"type":"TEXT","notNull":false,"unique":false},"retry_tenant_id":{"type":"TEXT","notNull":false,"unique":false},"request_digest":{"type":"TEXT","notNull":false,"unique":false},"parent_comment_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false},"status":{"type":"TEXT","notNull":true,"unique":false,"default":"visible"},"participation_snapshot":{"type":"TEXT","notNull":false,"unique":false},"edited_at":{"type":"TIMESTAMP","notNull":false,"unique":false}},"indexes":[{"name":"record_comments_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"record_comments_tenant_request_key","columns":["retry_tenant_id","idempotency_key"],"unique":true},{"name":"record_comments_record_created_idx","columns":["tenant_id","meta_type","meta_id","created_at"]},{"name":"record_comments_parent_created_idx","columns":["tenant_id","parent_comment_id","created_at"]},{"name":"record_comments_moderation_idx","columns":["tenant_id","status","created_at"]},{"name":"record_comments_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"record_comments_meta_type_meta_id_idx","columns":["meta_type","meta_id"]},{"name":"record_comments_author_user_id_idx","columns":["author_user_id"]},{"name":"record_comments_parent_comment_id_idx","columns":["parent_comment_id"]}],"version":"35c502ab"},"importPath":"@happyvertical/smrt-comments"},"@happyvertical/smrt-comments:CommentReportCollection":{"name":"commentreportcollection","className":"CommentReportCollection","qualifiedName":"@happyvertical/smrt-comments:CommentReportCollection","collection":"commentreports","filePath":"/home/runner/work/smrt/smrt/packages/comments/src/collections/CommentReportCollection.ts","packageName":"@happyvertical/smrt-comments","fields":{},"methods":{},"decoratorConfig":{"tableName":"comment_reports","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"CommentReport","exportName":"CommentReportCollection","collectionExportName":"CommentReportCollectionCollection","schema":{"tableName":"comment_reports","ddl":"CREATE TABLE IF NOT EXISTS \\"comment_reports\\" (\\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 \\"tenant_id\\" UUID NOT NULL,\\n \\"comment_id\\" UUID NOT NULL,\\n \\"reporter_user_id\\" UUID NOT NULL,\\n \\"reason\\" TEXT NOT NULL,\\n \\"status\\" TEXT NOT NULL DEFAULT 'open'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"comment_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false},"reporter_user_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"reason":{"type":"TEXT","notNull":true,"unique":false},"status":{"type":"TEXT","notNull":true,"unique":false,"default":"open"}},"indexes":[{"name":"comment_reports_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"comment_reports_actor_target_unique","columns":["tenant_id","reporter_user_id","comment_id"],"unique":true},{"name":"comment_reports_queue_idx","columns":["tenant_id","status","created_at"]},{"name":"comment_reports_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"comment_reports_comment_id_idx","columns":["comment_id"]},{"name":"comment_reports_reporter_user_id_idx","columns":["reporter_user_id"]}],"version":"001951c2"},"importPath":"@happyvertical/smrt-comments"},"@happyvertical/smrt-comments:CommentRevisionCollection":{"name":"commentrevisioncollection","className":"CommentRevisionCollection","qualifiedName":"@happyvertical/smrt-comments:CommentRevisionCollection","collection":"commentrevisions","filePath":"/home/runner/work/smrt/smrt/packages/comments/src/collections/CommentRevisionCollection.ts","packageName":"@happyvertical/smrt-comments","fields":{},"methods":{},"decoratorConfig":{"tableName":"comment_revisions","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"CommentRevision","exportName":"CommentRevisionCollection","collectionExportName":"CommentRevisionCollectionCollection","schema":{"tableName":"comment_revisions","ddl":"CREATE TABLE IF NOT EXISTS \\"comment_revisions\\" (\\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 \\"tenant_id\\" UUID NOT NULL,\\n \\"comment_id\\" UUID NOT NULL,\\n \\"editor_user_id\\" UUID NOT NULL,\\n \\"body\\" TEXT NOT NULL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"comment_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false},"editor_user_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"body":{"type":"TEXT","notNull":true,"unique":false}},"indexes":[{"name":"comment_revisions_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"comment_revisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"comment_revisions_comment_id_idx","columns":["comment_id"]},{"name":"comment_revisions_editor_user_id_idx","columns":["editor_user_id"]}],"version":"69ea301e"},"importPath":"@happyvertical/smrt-comments"},"@happyvertical/smrt-comments:ParticipationPolicyCollection":{"name":"participationpolicycollection","className":"ParticipationPolicyCollection","qualifiedName":"@happyvertical/smrt-comments:ParticipationPolicyCollection","collection":"participationpolicies","filePath":"/home/runner/work/smrt/smrt/packages/comments/src/collections/ParticipationCollection.ts","packageName":"@happyvertical/smrt-comments","fields":{},"methods":{},"decoratorConfig":{"tableName":"participation_policies","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"ParticipationPolicy","exportName":"ParticipationPolicyCollection","collectionExportName":"ParticipationPolicyCollectionCollection","schema":{"tableName":"participation_policies","ddl":"CREATE TABLE IF NOT EXISTS \\"participation_policies\\" (\\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 \\"tenant_id\\" UUID NOT NULL,\\n \\"record_type\\" TEXT,\\n \\"record_id\\" TEXT,\\n \\"action\\" TEXT NOT NULL,\\n \\"moderation_mode\\" TEXT NOT NULL DEFAULT 'open',\\n \\"max_actions\\" INTEGER NOT NULL DEFAULT 0,\\n \\"window_seconds\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"record_type":{"type":"TEXT","notNull":false,"unique":false},"record_id":{"type":"TEXT","notNull":false,"unique":false},"action":{"type":"TEXT","notNull":true,"unique":false},"moderation_mode":{"type":"TEXT","notNull":true,"unique":false,"default":"open"},"max_actions":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"window_seconds":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"participation_policies_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"participation_policies_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"7f2fdd9d"},"importPath":"@happyvertical/smrt-comments"},"@happyvertical/smrt-comments:ParticipationBanCollection":{"name":"participationbancollection","className":"ParticipationBanCollection","qualifiedName":"@happyvertical/smrt-comments:ParticipationBanCollection","collection":"participationbans","filePath":"/home/runner/work/smrt/smrt/packages/comments/src/collections/ParticipationCollection.ts","packageName":"@happyvertical/smrt-comments","fields":{},"methods":{},"decoratorConfig":{"tableName":"participation_bans","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"ParticipationBan","exportName":"ParticipationBanCollection","collectionExportName":"ParticipationBanCollectionCollection","schema":{"tableName":"participation_bans","ddl":"CREATE TABLE IF NOT EXISTS \\"participation_bans\\" (\\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 \\"tenant_id\\" UUID NOT NULL,\\n \\"actor_user_id\\" TEXT NOT NULL,\\n \\"record_type\\" TEXT,\\n \\"record_id\\" TEXT,\\n \\"reason\\" TEXT NOT NULL,\\n \\"expires_at\\" TIMESTAMP\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"actor_user_id":{"type":"TEXT","notNull":true,"unique":false},"record_type":{"type":"TEXT","notNull":false,"unique":false},"record_id":{"type":"TEXT","notNull":false,"unique":false},"reason":{"type":"TEXT","notNull":true,"unique":false},"expires_at":{"type":"TIMESTAMP","notNull":false,"unique":false}},"indexes":[{"name":"participation_bans_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"participation_bans_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"27bbfb94"},"importPath":"@happyvertical/smrt-comments"},"@happyvertical/smrt-comments:ParticipationRateBucketCollection":{"name":"participationratebucketcollection","className":"ParticipationRateBucketCollection","qualifiedName":"@happyvertical/smrt-comments:ParticipationRateBucketCollection","collection":"participationratebuckets","filePath":"/home/runner/work/smrt/smrt/packages/comments/src/collections/ParticipationCollection.ts","packageName":"@happyvertical/smrt-comments","fields":{},"methods":{},"decoratorConfig":{"tableName":"participation_rate_buckets","api":false,"mcp":false,"cli":false},"extends":"SmrtCollection","extendsTypeArg":"ParticipationRateBucket","exportName":"ParticipationRateBucketCollection","collectionExportName":"ParticipationRateBucketCollectionCollection","schema":{"tableName":"participation_rate_buckets","ddl":"CREATE TABLE IF NOT EXISTS \\"participation_rate_buckets\\" (\\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 \\"tenant_id\\" UUID NOT NULL,\\n \\"bucket_key\\" TEXT NOT NULL,\\n \\"action_count\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"bucket_key":{"type":"TEXT","notNull":true,"unique":false},"action_count":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"participation_rate_buckets_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"participation_rate_bucket_unique","columns":["tenant_id","bucket_key"],"unique":true},{"name":"participation_rate_buckets_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"9f3707e0"},"importPath":"@happyvertical/smrt-comments"},"@happyvertical/smrt-comments:Comment":{"name":"comment","className":"Comment","qualifiedName":"@happyvertical/smrt-comments:Comment","collection":"comments","filePath":"/home/runner/work/smrt/smrt/packages/comments/src/models/Comment.ts","packageName":"@happyvertical/smrt-comments","fields":{"metaType":{"type":"text","required":true,"_meta":{"required":true}},"metaId":{"type":"text","required":true,"_meta":{"required":true}},"role":{"type":"text","required":true,"_meta":{"required":true}},"sortOrder":{"type":"integer","required":false,"default":0},"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"authorUserId":{"type":"crossPackageRef","required":true,"related":"@happyvertical/smrt-users:User"},"body":{"type":"text","required":true,"_meta":{"required":true}},"mentions":{"type":"text","required":false},"idempotencyKey":{"type":"text","required":false,"_meta":{"nullable":true,"readonly":true},"readonly":true},"retryTenantId":{"type":"text","required":false,"_meta":{"nullable":true,"readonly":true},"readonly":true},"requestDigest":{"type":"text","required":false,"_meta":{"nullable":true,"readonly":true},"readonly":true},"parentCommentId":{"type":"foreignKey","required":false,"related":"Comment","_meta":{"nullable":true,"constraint":false}},"status":{"type":"text","required":true,"default":"visible","_meta":{"required":true},"enum":["visible","hidden","pending","deleted"]},"participationSnapshot":{"type":"text","required":false,"_meta":{"nullable":true,"readonly":true},"readonly":true},"editedAt":{"type":"datetime","required":false,"_meta":{"nullable":true,"readonly":true},"readonly":true}},"methods":{"hydrate":{"name":"hydrate","async":true,"parameters":[],"returnType":"Promise<T | null>","isStatic":false,"isPublic":true}},"decoratorConfig":{"tableName":"record_comments","api":false,"mcp":false,"cli":false,"indexes":[{"name":"record_comments_tenant_request_key","columns":["retryTenantId","idempotencyKey"],"unique":true},{"name":"record_comments_record_created_idx","columns":["tenantId","metaType","metaId","createdAt"]},{"name":"record_comments_parent_created_idx","columns":["tenantId","parentCommentId","createdAt"]},{"name":"record_comments_moderation_idx","columns":["tenantId","status","createdAt"]}],"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtPolymorphicAssociation","exportName":"Comment","collectionExportName":"CommentCollection","validationRules":[{"field":"metaType","rule":"required","fieldType":"text"},{"field":"metaId","rule":"required","fieldType":"text"},{"field":"role","rule":"required","fieldType":"text"},{"field":"authorUserId","rule":"required","fieldType":"crossPackageRef"},{"field":"body","rule":"required","fieldType":"text"},{"field":"status","rule":"required","fieldType":"text"}],"schema":{"tableName":"record_comments","ddl":"CREATE TABLE IF NOT EXISTS \\"record_comments\\" (\\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 \\"meta_type\\" TEXT NOT NULL,\\n \\"meta_id\\" TEXT NOT NULL,\\n \\"role\\" TEXT NOT NULL,\\n \\"sort_order\\" INTEGER DEFAULT 0,\\n \\"tenant_id\\" UUID NOT NULL,\\n \\"author_user_id\\" UUID NOT NULL,\\n \\"body\\" TEXT NOT NULL,\\n \\"mentions\\" TEXT,\\n \\"idempotency_key\\" TEXT,\\n \\"retry_tenant_id\\" TEXT,\\n \\"request_digest\\" TEXT,\\n \\"parent_comment_id\\" UUID,\\n \\"status\\" TEXT NOT NULL DEFAULT 'visible',\\n \\"participation_snapshot\\" TEXT,\\n \\"edited_at\\" TIMESTAMP\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"meta_type":{"type":"TEXT","notNull":true,"unique":false},"meta_id":{"type":"TEXT","notNull":true,"unique":false},"role":{"type":"TEXT","notNull":true,"unique":false},"sort_order":{"type":"INTEGER","notNull":false,"unique":false,"default":0},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"author_user_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"body":{"type":"TEXT","notNull":true,"unique":false},"mentions":{"type":"TEXT","notNull":false,"unique":false},"idempotency_key":{"type":"TEXT","notNull":false,"unique":false},"retry_tenant_id":{"type":"TEXT","notNull":false,"unique":false},"request_digest":{"type":"TEXT","notNull":false,"unique":false},"parent_comment_id":{"type":"UUID","referenceKind":"foreignKey","notNull":false,"unique":false},"status":{"type":"TEXT","notNull":true,"unique":false,"default":"visible"},"participation_snapshot":{"type":"TEXT","notNull":false,"unique":false},"edited_at":{"type":"TIMESTAMP","notNull":false,"unique":false}},"indexes":[{"name":"record_comments_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"record_comments_tenant_request_key","columns":["retry_tenant_id","idempotency_key"],"unique":true},{"name":"record_comments_record_created_idx","columns":["tenant_id","meta_type","meta_id","created_at"]},{"name":"record_comments_parent_created_idx","columns":["tenant_id","parent_comment_id","created_at"]},{"name":"record_comments_moderation_idx","columns":["tenant_id","status","created_at"]},{"name":"record_comments_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"record_comments_meta_type_meta_id_idx","columns":["meta_type","meta_id"]},{"name":"record_comments_author_user_id_idx","columns":["author_user_id"]},{"name":"record_comments_parent_comment_id_idx","columns":["parent_comment_id"]}],"version":"35c502ab"},"importPath":"@happyvertical/smrt-comments"},"@happyvertical/smrt-comments:CommentReport":{"name":"commentreport","className":"CommentReport","qualifiedName":"@happyvertical/smrt-comments:CommentReport","collection":"commentreports","description":"A tenant-local report; moderation resolution never deletes the report.","filePath":"/home/runner/work/smrt/smrt/packages/comments/src/models/CommentReport.ts","packageName":"@happyvertical/smrt-comments","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"commentId":{"type":"foreignKey","required":true,"related":"Comment","_meta":{"required":true,"constraint":false}},"reporterUserId":{"type":"crossPackageRef","required":true,"related":"@happyvertical/smrt-users:User"},"reason":{"type":"text","required":true,"_meta":{"required":true}},"status":{"type":"text","required":true,"default":"open","_meta":{"required":true},"enum":["open","resolved","dismissed"]}},"methods":{},"decoratorConfig":{"tableName":"comment_reports","api":false,"mcp":false,"cli":false,"indexes":[{"name":"comment_reports_actor_target_unique","columns":["tenantId","reporterUserId","commentId"],"unique":true},{"name":"comment_reports_queue_idx","columns":["tenantId","status","createdAt"]}],"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"CommentReport","collectionExportName":"CommentReportCollection","validationRules":[{"field":"commentId","rule":"required","fieldType":"foreignKey"},{"field":"reporterUserId","rule":"required","fieldType":"crossPackageRef"},{"field":"reason","rule":"required","fieldType":"text"},{"field":"status","rule":"required","fieldType":"text"}],"schema":{"tableName":"comment_reports","ddl":"CREATE TABLE IF NOT EXISTS \\"comment_reports\\" (\\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 \\"tenant_id\\" UUID NOT NULL,\\n \\"comment_id\\" UUID NOT NULL,\\n \\"reporter_user_id\\" UUID NOT NULL,\\n \\"reason\\" TEXT NOT NULL,\\n \\"status\\" TEXT NOT NULL DEFAULT 'open'\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"comment_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false},"reporter_user_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"reason":{"type":"TEXT","notNull":true,"unique":false},"status":{"type":"TEXT","notNull":true,"unique":false,"default":"open"}},"indexes":[{"name":"comment_reports_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"comment_reports_actor_target_unique","columns":["tenant_id","reporter_user_id","comment_id"],"unique":true},{"name":"comment_reports_queue_idx","columns":["tenant_id","status","created_at"]},{"name":"comment_reports_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"comment_reports_comment_id_idx","columns":["comment_id"]},{"name":"comment_reports_reporter_user_id_idx","columns":["reporter_user_id"]}],"version":"001951c2"},"importPath":"@happyvertical/smrt-comments"},"@happyvertical/smrt-comments:CommentRevision":{"name":"commentrevision","className":"CommentRevision","qualifiedName":"@happyvertical/smrt-comments:CommentRevision","collection":"commentrevisions","description":"Immutable prior body retained whenever an author edits a comment.","filePath":"/home/runner/work/smrt/smrt/packages/comments/src/models/CommentRevision.ts","packageName":"@happyvertical/smrt-comments","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"commentId":{"type":"foreignKey","required":true,"related":"Comment","_meta":{"required":true,"constraint":false}},"editorUserId":{"type":"crossPackageRef","required":true,"related":"@happyvertical/smrt-users:User"},"body":{"type":"text","required":true,"_meta":{"required":true}}},"methods":{},"decoratorConfig":{"tableName":"comment_revisions","api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"CommentRevision","collectionExportName":"CommentRevisionCollection","validationRules":[{"field":"commentId","rule":"required","fieldType":"foreignKey"},{"field":"editorUserId","rule":"required","fieldType":"crossPackageRef"},{"field":"body","rule":"required","fieldType":"text"}],"schema":{"tableName":"comment_revisions","ddl":"CREATE TABLE IF NOT EXISTS \\"comment_revisions\\" (\\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 \\"tenant_id\\" UUID NOT NULL,\\n \\"comment_id\\" UUID NOT NULL,\\n \\"editor_user_id\\" UUID NOT NULL,\\n \\"body\\" TEXT NOT NULL\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"comment_id":{"type":"UUID","referenceKind":"foreignKey","notNull":true,"unique":false},"editor_user_id":{"type":"UUID","referenceKind":"crossPackageRef","notNull":true,"unique":false},"body":{"type":"TEXT","notNull":true,"unique":false}},"indexes":[{"name":"comment_revisions_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"comment_revisions_tenant_id_created_at_idx","columns":["tenant_id","created_at"]},{"name":"comment_revisions_comment_id_idx","columns":["comment_id"]},{"name":"comment_revisions_editor_user_id_idx","columns":["editor_user_id"]}],"version":"69ea301e"},"importPath":"@happyvertical/smrt-comments"},"@happyvertical/smrt-comments:ParticipationBan":{"name":"participationban","className":"ParticipationBan","qualifiedName":"@happyvertical/smrt-comments:ParticipationBan","collection":"participationbans","description":"Tenant-local, reusable participation ban; a blank target applies tenant-wide.","filePath":"/home/runner/work/smrt/smrt/packages/comments/src/models/ParticipationBan.ts","packageName":"@happyvertical/smrt-comments","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"actorUserId":{"type":"text","required":true,"_meta":{"required":true}},"recordType":{"type":"text","required":false},"recordId":{"type":"text","required":false},"reason":{"type":"text","required":true,"_meta":{"required":true}},"expiresAt":{"type":"datetime","required":false,"_meta":{"nullable":true}}},"methods":{},"decoratorConfig":{"tableName":"participation_bans","api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"ParticipationBan","collectionExportName":"ParticipationBanCollection","validationRules":[{"field":"actorUserId","rule":"required","fieldType":"text"},{"field":"reason","rule":"required","fieldType":"text"}],"schema":{"tableName":"participation_bans","ddl":"CREATE TABLE IF NOT EXISTS \\"participation_bans\\" (\\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 \\"tenant_id\\" UUID NOT NULL,\\n \\"actor_user_id\\" TEXT NOT NULL,\\n \\"record_type\\" TEXT,\\n \\"record_id\\" TEXT,\\n \\"reason\\" TEXT NOT NULL,\\n \\"expires_at\\" TIMESTAMP\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"actor_user_id":{"type":"TEXT","notNull":true,"unique":false},"record_type":{"type":"TEXT","notNull":false,"unique":false},"record_id":{"type":"TEXT","notNull":false,"unique":false},"reason":{"type":"TEXT","notNull":true,"unique":false},"expires_at":{"type":"TIMESTAMP","notNull":false,"unique":false}},"indexes":[{"name":"participation_bans_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"participation_bans_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"27bbfb94"},"importPath":"@happyvertical/smrt-comments"},"@happyvertical/smrt-comments:ParticipationPolicy":{"name":"participationpolicy","className":"ParticipationPolicy","qualifiedName":"@happyvertical/smrt-comments:ParticipationPolicy","collection":"participationpolicies","description":"A generic tenant default or exact-record override for participation actions.","filePath":"/home/runner/work/smrt/smrt/packages/comments/src/models/ParticipationPolicy.ts","packageName":"@happyvertical/smrt-comments","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"recordType":{"type":"text","required":false},"recordId":{"type":"text","required":false},"action":{"type":"text","required":true,"_meta":{"required":true}},"moderationMode":{"type":"text","required":true,"default":"open","_meta":{"required":true},"enum":["open","pre_moderated","members_only","closed"]},"maxActions":{"type":"integer","required":true,"default":0,"_meta":{"required":true}},"windowSeconds":{"type":"integer","required":true,"default":0,"_meta":{"required":true}}},"methods":{},"decoratorConfig":{"tableName":"participation_policies","api":false,"mcp":false,"cli":false,"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"ParticipationPolicy","collectionExportName":"ParticipationPolicyCollection","validationRules":[{"field":"action","rule":"required","fieldType":"text"},{"field":"moderationMode","rule":"required","fieldType":"text"},{"field":"maxActions","rule":"required","fieldType":"integer"},{"field":"windowSeconds","rule":"required","fieldType":"integer"}],"schema":{"tableName":"participation_policies","ddl":"CREATE TABLE IF NOT EXISTS \\"participation_policies\\" (\\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 \\"tenant_id\\" UUID NOT NULL,\\n \\"record_type\\" TEXT,\\n \\"record_id\\" TEXT,\\n \\"action\\" TEXT NOT NULL,\\n \\"moderation_mode\\" TEXT NOT NULL DEFAULT 'open',\\n \\"max_actions\\" INTEGER NOT NULL DEFAULT 0,\\n \\"window_seconds\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"record_type":{"type":"TEXT","notNull":false,"unique":false},"record_id":{"type":"TEXT","notNull":false,"unique":false},"action":{"type":"TEXT","notNull":true,"unique":false},"moderation_mode":{"type":"TEXT","notNull":true,"unique":false,"default":"open"},"max_actions":{"type":"INTEGER","notNull":true,"unique":false,"default":0},"window_seconds":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"participation_policies_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"participation_policies_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"7f2fdd9d"},"importPath":"@happyvertical/smrt-comments"},"@happyvertical/smrt-comments:ParticipationRateBucket":{"name":"participationratebucket","className":"ParticipationRateBucket","qualifiedName":"@happyvertical/smrt-comments:ParticipationRateBucket","collection":"participationratebuckets","description":"Service-owned fixed-window counter. Never delete a currently active bucket.","filePath":"/home/runner/work/smrt/smrt/packages/comments/src/models/ParticipationRateBucket.ts","packageName":"@happyvertical/smrt-comments","fields":{"tenantId":{"type":"text","required":true,"_meta":{"sqlType":"UUID","__tenancy":{"isTenantIdField":true,"autoFilter":true,"required":true,"autoPopulate":true,"nullable":false,"mode":"required","field":"tenantId","allowSuperAdminBypass":false}}},"bucketKey":{"type":"text","required":true,"_meta":{"required":true}},"actionCount":{"type":"integer","required":true,"default":0,"_meta":{"required":true}}},"methods":{},"decoratorConfig":{"tableName":"participation_rate_buckets","api":false,"mcp":false,"cli":false,"indexes":[{"name":"participation_rate_bucket_unique","columns":["tenantId","bucketKey"],"unique":true}],"tenantScoped":{"mode":"required"},"conflictColumns":["tenant_id","slug","context"]},"extends":"SmrtObject","exportName":"ParticipationRateBucket","collectionExportName":"ParticipationRateBucketCollection","validationRules":[{"field":"bucketKey","rule":"required","fieldType":"text"},{"field":"actionCount","rule":"required","fieldType":"integer"}],"schema":{"tableName":"participation_rate_buckets","ddl":"CREATE TABLE IF NOT EXISTS \\"participation_rate_buckets\\" (\\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 \\"tenant_id\\" UUID NOT NULL,\\n \\"bucket_key\\" TEXT NOT NULL,\\n \\"action_count\\" INTEGER NOT NULL DEFAULT 0\\n);","columns":{"id":{"type":"UUID","primaryKey":true,"referenceKind":"id","notNull":true},"slug":{"type":"TEXT","notNull":true},"context":{"type":"TEXT","notNull":true,"default":""},"created_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"updated_at":{"type":"TIMESTAMP","notNull":true,"default":"current_timestamp"},"tenant_id":{"type":"UUID","referenceKind":"tenantId","notNull":true,"unique":false},"bucket_key":{"type":"TEXT","notNull":true,"unique":false},"action_count":{"type":"INTEGER","notNull":true,"unique":false,"default":0}},"indexes":[{"name":"participation_rate_buckets_slug_context_idx","columns":["tenant_id","slug","context"],"unique":true},{"name":"participation_rate_bucket_unique","columns":["tenant_id","bucket_key"],"unique":true},{"name":"participation_rate_buckets_tenant_id_created_at_idx","columns":["tenant_id","created_at"]}],"version":"9f3707e0"},"importPath":"@happyvertical/smrt-comments"}},"moduleType":"smrt","recipes":[{"id":"comments.records","className":"RecordCommentsRecipe","label":"Record comments","summary":"Discuss work directly on the records it concerns.","synonyms":["comments","mentions","discussion"],"models":["@happyvertical/smrt-comments:Comment","@happyvertical/smrt-comments:CommentRevision","@happyvertical/smrt-comments:CommentReport","@happyvertical/smrt-comments:ParticipationPolicy","@happyvertical/smrt-comments:ParticipationBan","@happyvertical/smrt-comments:ParticipationRateBucket"],"nav":[],"requires":[],"group":{"id":"comments","label":"Comments","summary":"Keep discussions alongside the records your team works on."},"help":{"markdown":"## Overview\\n\\nRecord comments keep a discussion next to the work it concerns. Open a record\\nyou can access to read its discussion or add a comment. Comments are part of\\nthe record page, rather than a separate list of every discussion.\\n\\n## Tasks\\n\\n### Add a comment\\n\\nOpen the record, find Comments, write your message and choose Post comment.\\nYour app controls who can read the record and who can contribute to its discussion.\\n\\n### Mention someone\\n\\nIf your app provides mention selection, choose a teammate who can access the\\nrecord. When mention notifications are connected, that person receives a\\nnotification. Typing a name alone does not select a recipient.\\n\\n### Check a failed post\\n\\nIf posting reports an error, refresh the discussion before trying again. A\\ncomment may have been saved even when its mention notification could not be\\ndelivered. If it appears in the discussion, do not post it a second time.\\n","fieldRefs":[]},"surfaces":[{"kind":"playground","export":"@happyvertical/smrt-comments/svelte#RecordCommentsPlayground","label":"Record discussion preview"}],"runtime":"both","demoSeed":{"export":"@happyvertical/smrt-comments/svelte#recordCommentsDemo"},"demo":{"mode":"server","reasons":["Needs a server because its package depends on @happyvertical/smrt-tenancy, which do not build for a browser (#3624)."]}}],"smrtDependencies":["@happyvertical/smrt-core","@happyvertical/smrt-messages","@happyvertical/smrt-tenancy"],"browser":{"status":"server-only","issues":["#3624"],"via":["@happyvertical/smrt-tenancy"]},"stampsConstructors":true}`));
5
5
  //#endregion
6
6
  //#region src/models/ParticipationBan.ts
7
7
  var __defProp$2 = Object.defineProperty;
@@ -273,4 +273,4 @@ var ParticipationService = class {
273
273
  //#endregion
274
274
  export { ParticipationRateBucketCollection as a, ParticipationBan as c, ParticipationPolicyCollection as i, ParticipationDeniedError as n, ParticipationRateBucket as o, ParticipationBanCollection as r, ParticipationPolicy as s, ParticipationService as t };
275
275
 
276
- //# sourceMappingURL=participation-BLfy61X0.js.map
276
+ //# sourceMappingURL=participation-rg06tjqx.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"participation-BLfy61X0.js","names":[],"sources":["../../src/__smrt-register__.ts","../../src/models/ParticipationBan.ts","../../src/models/ParticipationPolicy.ts","../../src/models/ParticipationRateBucket.ts","../../src/collections/ParticipationCollection.ts","../../src/participation-contract.ts","../../src/services/ParticipationService.ts"],"sourcesContent":["// Generated by @happyvertical/smrt-core smrtPlugin at library build time.\n// The package manifest is inlined so self-registration cannot miss when a\n// downstream bundler relocates this module away from dist/manifest.json\n// (https://github.com/happyvertical/smrt/issues/1506,\n// https://github.com/happyvertical/smrt/issues/1507).\nimport { ObjectRegistry } from '@happyvertical/smrt-core';\n\nObjectRegistry.registerPackageManifest(JSON.parse(\"{\\\"version\\\":\\\"1.0.0\\\",\\\"timestamp\\\":0,\\\"packageName\\\":\\\"@happyvertical/smrt-comments\\\",\\\"packageVersion\\\":\\\"0.57.35\\\",\\\"objects\\\":{\\\"@happyvertical/smrt-comments:CommentCollection\\\":{\\\"name\\\":\\\"commentcollection\\\",\\\"className\\\":\\\"CommentCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-comments:CommentCollection\\\",\\\"collection\\\":\\\"comments\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/comments/src/collections/CommentCollection.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-comments\\\",\\\"fields\\\":{},\\\"methods\\\":{\\\"listForRecord\\\":{\\\"name\\\":\\\"listForRecord\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"recordType\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"recordId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Comment[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"record_comments\\\",\\\"api\\\":false,\\\"mcp\\\":false,\\\"cli\\\":false},\\\"extends\\\":\\\"SmrtCollection\\\",\\\"extendsTypeArg\\\":\\\"Comment\\\",\\\"exportName\\\":\\\"CommentCollection\\\",\\\"collectionExportName\\\":\\\"CommentCollectionCollection\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"record_comments\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"record_comments\\\\\\\" (\\\\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 \\\\\\\"meta_type\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"meta_id\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"role\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"sort_order\\\\\\\" INTEGER DEFAULT 0,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"author_user_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"body\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"mentions\\\\\\\" TEXT,\\\\n \\\\\\\"idempotency_key\\\\\\\" TEXT,\\\\n \\\\\\\"retry_tenant_id\\\\\\\" TEXT,\\\\n \\\\\\\"request_digest\\\\\\\" TEXT,\\\\n \\\\\\\"parent_comment_id\\\\\\\" UUID,\\\\n \\\\\\\"status\\\\\\\" TEXT NOT NULL DEFAULT 'visible',\\\\n \\\\\\\"participation_snapshot\\\\\\\" TEXT,\\\\n \\\\\\\"edited_at\\\\\\\" TIMESTAMP\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"meta_type\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"meta_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"role\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"sort_order\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"default\\\":0},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"author_user_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"crossPackageRef\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"body\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"mentions\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"idempotency_key\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"retry_tenant_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"request_digest\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"parent_comment_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"status\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false,\\\"default\\\":\\\"visible\\\"},\\\"participation_snapshot\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"edited_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"record_comments_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"record_comments_tenant_request_key\\\",\\\"columns\\\":[\\\"retry_tenant_id\\\",\\\"idempotency_key\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"record_comments_record_created_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"meta_type\\\",\\\"meta_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"record_comments_parent_created_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"parent_comment_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"record_comments_moderation_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"status\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"record_comments_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"record_comments_meta_type_meta_id_idx\\\",\\\"columns\\\":[\\\"meta_type\\\",\\\"meta_id\\\"]},{\\\"name\\\":\\\"record_comments_author_user_id_idx\\\",\\\"columns\\\":[\\\"author_user_id\\\"]},{\\\"name\\\":\\\"record_comments_parent_comment_id_idx\\\",\\\"columns\\\":[\\\"parent_comment_id\\\"]}],\\\"version\\\":\\\"35c502ab\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-comments\\\"},\\\"@happyvertical/smrt-comments:CommentReportCollection\\\":{\\\"name\\\":\\\"commentreportcollection\\\",\\\"className\\\":\\\"CommentReportCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-comments:CommentReportCollection\\\",\\\"collection\\\":\\\"commentreports\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/comments/src/collections/CommentReportCollection.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-comments\\\",\\\"fields\\\":{},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"comment_reports\\\",\\\"api\\\":false,\\\"mcp\\\":false,\\\"cli\\\":false},\\\"extends\\\":\\\"SmrtCollection\\\",\\\"extendsTypeArg\\\":\\\"CommentReport\\\",\\\"exportName\\\":\\\"CommentReportCollection\\\",\\\"collectionExportName\\\":\\\"CommentReportCollectionCollection\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"comment_reports\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"comment_reports\\\\\\\" (\\\\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 \\\\\\\"tenant_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"comment_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"reporter_user_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"reason\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"status\\\\\\\" TEXT NOT NULL DEFAULT 'open'\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"comment_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"reporter_user_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"crossPackageRef\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"reason\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"status\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false,\\\"default\\\":\\\"open\\\"}},\\\"indexes\\\":[{\\\"name\\\":\\\"comment_reports_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"comment_reports_actor_target_unique\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"reporter_user_id\\\",\\\"comment_id\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"comment_reports_queue_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"status\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"comment_reports_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"comment_reports_comment_id_idx\\\",\\\"columns\\\":[\\\"comment_id\\\"]},{\\\"name\\\":\\\"comment_reports_reporter_user_id_idx\\\",\\\"columns\\\":[\\\"reporter_user_id\\\"]}],\\\"version\\\":\\\"001951c2\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-comments\\\"},\\\"@happyvertical/smrt-comments:CommentRevisionCollection\\\":{\\\"name\\\":\\\"commentrevisioncollection\\\",\\\"className\\\":\\\"CommentRevisionCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-comments:CommentRevisionCollection\\\",\\\"collection\\\":\\\"commentrevisions\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/comments/src/collections/CommentRevisionCollection.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-comments\\\",\\\"fields\\\":{},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"comment_revisions\\\",\\\"api\\\":false,\\\"mcp\\\":false,\\\"cli\\\":false},\\\"extends\\\":\\\"SmrtCollection\\\",\\\"extendsTypeArg\\\":\\\"CommentRevision\\\",\\\"exportName\\\":\\\"CommentRevisionCollection\\\",\\\"collectionExportName\\\":\\\"CommentRevisionCollectionCollection\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"comment_revisions\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"comment_revisions\\\\\\\" (\\\\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 \\\\\\\"tenant_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"comment_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"editor_user_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"body\\\\\\\" TEXT NOT NULL\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"comment_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"editor_user_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"crossPackageRef\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"body\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"comment_revisions_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"comment_revisions_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"comment_revisions_comment_id_idx\\\",\\\"columns\\\":[\\\"comment_id\\\"]},{\\\"name\\\":\\\"comment_revisions_editor_user_id_idx\\\",\\\"columns\\\":[\\\"editor_user_id\\\"]}],\\\"version\\\":\\\"69ea301e\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-comments\\\"},\\\"@happyvertical/smrt-comments:ParticipationPolicyCollection\\\":{\\\"name\\\":\\\"participationpolicycollection\\\",\\\"className\\\":\\\"ParticipationPolicyCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-comments:ParticipationPolicyCollection\\\",\\\"collection\\\":\\\"participationpolicies\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/comments/src/collections/ParticipationCollection.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-comments\\\",\\\"fields\\\":{},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"participation_policies\\\",\\\"api\\\":false,\\\"mcp\\\":false,\\\"cli\\\":false},\\\"extends\\\":\\\"SmrtCollection\\\",\\\"extendsTypeArg\\\":\\\"ParticipationPolicy\\\",\\\"exportName\\\":\\\"ParticipationPolicyCollection\\\",\\\"collectionExportName\\\":\\\"ParticipationPolicyCollectionCollection\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"participation_policies\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"participation_policies\\\\\\\" (\\\\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 \\\\\\\"tenant_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"record_type\\\\\\\" TEXT,\\\\n \\\\\\\"record_id\\\\\\\" TEXT,\\\\n \\\\\\\"action\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"moderation_mode\\\\\\\" TEXT NOT NULL DEFAULT 'open',\\\\n \\\\\\\"max_actions\\\\\\\" INTEGER NOT NULL DEFAULT 0,\\\\n \\\\\\\"window_seconds\\\\\\\" INTEGER NOT NULL DEFAULT 0\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"record_type\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"record_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"action\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"moderation_mode\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false,\\\"default\\\":\\\"open\\\"},\\\"max_actions\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false,\\\"default\\\":0},\\\"window_seconds\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false,\\\"default\\\":0}},\\\"indexes\\\":[{\\\"name\\\":\\\"participation_policies_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"participation_policies_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"7f2fdd9d\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-comments\\\"},\\\"@happyvertical/smrt-comments:ParticipationBanCollection\\\":{\\\"name\\\":\\\"participationbancollection\\\",\\\"className\\\":\\\"ParticipationBanCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-comments:ParticipationBanCollection\\\",\\\"collection\\\":\\\"participationbans\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/comments/src/collections/ParticipationCollection.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-comments\\\",\\\"fields\\\":{},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"participation_bans\\\",\\\"api\\\":false,\\\"mcp\\\":false,\\\"cli\\\":false},\\\"extends\\\":\\\"SmrtCollection\\\",\\\"extendsTypeArg\\\":\\\"ParticipationBan\\\",\\\"exportName\\\":\\\"ParticipationBanCollection\\\",\\\"collectionExportName\\\":\\\"ParticipationBanCollectionCollection\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"participation_bans\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"participation_bans\\\\\\\" (\\\\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 \\\\\\\"tenant_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"actor_user_id\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"record_type\\\\\\\" TEXT,\\\\n \\\\\\\"record_id\\\\\\\" TEXT,\\\\n \\\\\\\"reason\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"expires_at\\\\\\\" TIMESTAMP\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"actor_user_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"record_type\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"record_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"reason\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"expires_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"participation_bans_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"participation_bans_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"27bbfb94\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-comments\\\"},\\\"@happyvertical/smrt-comments:ParticipationRateBucketCollection\\\":{\\\"name\\\":\\\"participationratebucketcollection\\\",\\\"className\\\":\\\"ParticipationRateBucketCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-comments:ParticipationRateBucketCollection\\\",\\\"collection\\\":\\\"participationratebuckets\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/comments/src/collections/ParticipationCollection.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-comments\\\",\\\"fields\\\":{},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"participation_rate_buckets\\\",\\\"api\\\":false,\\\"mcp\\\":false,\\\"cli\\\":false},\\\"extends\\\":\\\"SmrtCollection\\\",\\\"extendsTypeArg\\\":\\\"ParticipationRateBucket\\\",\\\"exportName\\\":\\\"ParticipationRateBucketCollection\\\",\\\"collectionExportName\\\":\\\"ParticipationRateBucketCollectionCollection\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"participation_rate_buckets\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"participation_rate_buckets\\\\\\\" (\\\\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 \\\\\\\"tenant_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"bucket_key\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"action_count\\\\\\\" INTEGER NOT NULL DEFAULT 0\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"bucket_key\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"action_count\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false,\\\"default\\\":0}},\\\"indexes\\\":[{\\\"name\\\":\\\"participation_rate_buckets_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"participation_rate_bucket_unique\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"bucket_key\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"participation_rate_buckets_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"9f3707e0\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-comments\\\"},\\\"@happyvertical/smrt-comments:Comment\\\":{\\\"name\\\":\\\"comment\\\",\\\"className\\\":\\\"Comment\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-comments:Comment\\\",\\\"collection\\\":\\\"comments\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/comments/src/models/Comment.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-comments\\\",\\\"fields\\\":{\\\"metaType\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"metaId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"role\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"sortOrder\\\":{\\\"type\\\":\\\"integer\\\",\\\"required\\\":false,\\\"default\\\":0},\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"sqlType\\\":\\\"UUID\\\",\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"autoFilter\\\":true,\\\"required\\\":true,\\\"autoPopulate\\\":true,\\\"nullable\\\":false,\\\"mode\\\":\\\"required\\\",\\\"field\\\":\\\"tenantId\\\",\\\"allowSuperAdminBypass\\\":false}}},\\\"authorUserId\\\":{\\\"type\\\":\\\"crossPackageRef\\\",\\\"required\\\":true,\\\"related\\\":\\\"@happyvertical/smrt-users:User\\\"},\\\"body\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"mentions\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"idempotencyKey\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"nullable\\\":true,\\\"readonly\\\":true},\\\"readonly\\\":true},\\\"retryTenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"nullable\\\":true,\\\"readonly\\\":true},\\\"readonly\\\":true},\\\"requestDigest\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"nullable\\\":true,\\\"readonly\\\":true},\\\"readonly\\\":true},\\\"parentCommentId\\\":{\\\"type\\\":\\\"foreignKey\\\",\\\"required\\\":false,\\\"related\\\":\\\"Comment\\\",\\\"_meta\\\":{\\\"nullable\\\":true,\\\"constraint\\\":false}},\\\"status\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"default\\\":\\\"visible\\\",\\\"_meta\\\":{\\\"required\\\":true},\\\"enum\\\":[\\\"visible\\\",\\\"hidden\\\",\\\"pending\\\",\\\"deleted\\\"]},\\\"participationSnapshot\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"nullable\\\":true,\\\"readonly\\\":true},\\\"readonly\\\":true},\\\"editedAt\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"nullable\\\":true,\\\"readonly\\\":true},\\\"readonly\\\":true}},\\\"methods\\\":{\\\"hydrate\\\":{\\\"name\\\":\\\"hydrate\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<T | null>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"record_comments\\\",\\\"api\\\":false,\\\"mcp\\\":false,\\\"cli\\\":false,\\\"indexes\\\":[{\\\"name\\\":\\\"record_comments_tenant_request_key\\\",\\\"columns\\\":[\\\"retryTenantId\\\",\\\"idempotencyKey\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"record_comments_record_created_idx\\\",\\\"columns\\\":[\\\"tenantId\\\",\\\"metaType\\\",\\\"metaId\\\",\\\"createdAt\\\"]},{\\\"name\\\":\\\"record_comments_parent_created_idx\\\",\\\"columns\\\":[\\\"tenantId\\\",\\\"parentCommentId\\\",\\\"createdAt\\\"]},{\\\"name\\\":\\\"record_comments_moderation_idx\\\",\\\"columns\\\":[\\\"tenantId\\\",\\\"status\\\",\\\"createdAt\\\"]}],\\\"tenantScoped\\\":{\\\"mode\\\":\\\"required\\\"},\\\"conflictColumns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"]},\\\"extends\\\":\\\"SmrtPolymorphicAssociation\\\",\\\"exportName\\\":\\\"Comment\\\",\\\"collectionExportName\\\":\\\"CommentCollection\\\",\\\"validationRules\\\":[{\\\"field\\\":\\\"metaType\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"metaId\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"role\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"authorUserId\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"crossPackageRef\\\"},{\\\"field\\\":\\\"body\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"status\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"}],\\\"schema\\\":{\\\"tableName\\\":\\\"record_comments\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"record_comments\\\\\\\" (\\\\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 \\\\\\\"meta_type\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"meta_id\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"role\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"sort_order\\\\\\\" INTEGER DEFAULT 0,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"author_user_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"body\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"mentions\\\\\\\" TEXT,\\\\n \\\\\\\"idempotency_key\\\\\\\" TEXT,\\\\n \\\\\\\"retry_tenant_id\\\\\\\" TEXT,\\\\n \\\\\\\"request_digest\\\\\\\" TEXT,\\\\n \\\\\\\"parent_comment_id\\\\\\\" UUID,\\\\n \\\\\\\"status\\\\\\\" TEXT NOT NULL DEFAULT 'visible',\\\\n \\\\\\\"participation_snapshot\\\\\\\" TEXT,\\\\n \\\\\\\"edited_at\\\\\\\" TIMESTAMP\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"meta_type\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"meta_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"role\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"sort_order\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"default\\\":0},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"author_user_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"crossPackageRef\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"body\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"mentions\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"idempotency_key\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"retry_tenant_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"request_digest\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"parent_comment_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"status\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false,\\\"default\\\":\\\"visible\\\"},\\\"participation_snapshot\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"edited_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"record_comments_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"record_comments_tenant_request_key\\\",\\\"columns\\\":[\\\"retry_tenant_id\\\",\\\"idempotency_key\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"record_comments_record_created_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"meta_type\\\",\\\"meta_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"record_comments_parent_created_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"parent_comment_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"record_comments_moderation_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"status\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"record_comments_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"record_comments_meta_type_meta_id_idx\\\",\\\"columns\\\":[\\\"meta_type\\\",\\\"meta_id\\\"]},{\\\"name\\\":\\\"record_comments_author_user_id_idx\\\",\\\"columns\\\":[\\\"author_user_id\\\"]},{\\\"name\\\":\\\"record_comments_parent_comment_id_idx\\\",\\\"columns\\\":[\\\"parent_comment_id\\\"]}],\\\"version\\\":\\\"35c502ab\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-comments\\\"},\\\"@happyvertical/smrt-comments:CommentReport\\\":{\\\"name\\\":\\\"commentreport\\\",\\\"className\\\":\\\"CommentReport\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-comments:CommentReport\\\",\\\"collection\\\":\\\"commentreports\\\",\\\"description\\\":\\\"A tenant-local report; moderation resolution never deletes the report.\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/comments/src/models/CommentReport.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-comments\\\",\\\"fields\\\":{\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"sqlType\\\":\\\"UUID\\\",\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"autoFilter\\\":true,\\\"required\\\":true,\\\"autoPopulate\\\":true,\\\"nullable\\\":false,\\\"mode\\\":\\\"required\\\",\\\"field\\\":\\\"tenantId\\\",\\\"allowSuperAdminBypass\\\":false}}},\\\"commentId\\\":{\\\"type\\\":\\\"foreignKey\\\",\\\"required\\\":true,\\\"related\\\":\\\"Comment\\\",\\\"_meta\\\":{\\\"required\\\":true,\\\"constraint\\\":false}},\\\"reporterUserId\\\":{\\\"type\\\":\\\"crossPackageRef\\\",\\\"required\\\":true,\\\"related\\\":\\\"@happyvertical/smrt-users:User\\\"},\\\"reason\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"status\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"default\\\":\\\"open\\\",\\\"_meta\\\":{\\\"required\\\":true},\\\"enum\\\":[\\\"open\\\",\\\"resolved\\\",\\\"dismissed\\\"]}},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"comment_reports\\\",\\\"api\\\":false,\\\"mcp\\\":false,\\\"cli\\\":false,\\\"indexes\\\":[{\\\"name\\\":\\\"comment_reports_actor_target_unique\\\",\\\"columns\\\":[\\\"tenantId\\\",\\\"reporterUserId\\\",\\\"commentId\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"comment_reports_queue_idx\\\",\\\"columns\\\":[\\\"tenantId\\\",\\\"status\\\",\\\"createdAt\\\"]}],\\\"tenantScoped\\\":{\\\"mode\\\":\\\"required\\\"},\\\"conflictColumns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"]},\\\"extends\\\":\\\"SmrtObject\\\",\\\"exportName\\\":\\\"CommentReport\\\",\\\"collectionExportName\\\":\\\"CommentReportCollection\\\",\\\"validationRules\\\":[{\\\"field\\\":\\\"commentId\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"foreignKey\\\"},{\\\"field\\\":\\\"reporterUserId\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"crossPackageRef\\\"},{\\\"field\\\":\\\"reason\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"status\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"}],\\\"schema\\\":{\\\"tableName\\\":\\\"comment_reports\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"comment_reports\\\\\\\" (\\\\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 \\\\\\\"tenant_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"comment_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"reporter_user_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"reason\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"status\\\\\\\" TEXT NOT NULL DEFAULT 'open'\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"comment_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"reporter_user_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"crossPackageRef\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"reason\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"status\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false,\\\"default\\\":\\\"open\\\"}},\\\"indexes\\\":[{\\\"name\\\":\\\"comment_reports_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"comment_reports_actor_target_unique\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"reporter_user_id\\\",\\\"comment_id\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"comment_reports_queue_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"status\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"comment_reports_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"comment_reports_comment_id_idx\\\",\\\"columns\\\":[\\\"comment_id\\\"]},{\\\"name\\\":\\\"comment_reports_reporter_user_id_idx\\\",\\\"columns\\\":[\\\"reporter_user_id\\\"]}],\\\"version\\\":\\\"001951c2\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-comments\\\"},\\\"@happyvertical/smrt-comments:CommentRevision\\\":{\\\"name\\\":\\\"commentrevision\\\",\\\"className\\\":\\\"CommentRevision\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-comments:CommentRevision\\\",\\\"collection\\\":\\\"commentrevisions\\\",\\\"description\\\":\\\"Immutable prior body retained whenever an author edits a comment.\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/comments/src/models/CommentRevision.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-comments\\\",\\\"fields\\\":{\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"sqlType\\\":\\\"UUID\\\",\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"autoFilter\\\":true,\\\"required\\\":true,\\\"autoPopulate\\\":true,\\\"nullable\\\":false,\\\"mode\\\":\\\"required\\\",\\\"field\\\":\\\"tenantId\\\",\\\"allowSuperAdminBypass\\\":false}}},\\\"commentId\\\":{\\\"type\\\":\\\"foreignKey\\\",\\\"required\\\":true,\\\"related\\\":\\\"Comment\\\",\\\"_meta\\\":{\\\"required\\\":true,\\\"constraint\\\":false}},\\\"editorUserId\\\":{\\\"type\\\":\\\"crossPackageRef\\\",\\\"required\\\":true,\\\"related\\\":\\\"@happyvertical/smrt-users:User\\\"},\\\"body\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}}},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"comment_revisions\\\",\\\"api\\\":false,\\\"mcp\\\":false,\\\"cli\\\":false,\\\"tenantScoped\\\":{\\\"mode\\\":\\\"required\\\"},\\\"conflictColumns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"]},\\\"extends\\\":\\\"SmrtObject\\\",\\\"exportName\\\":\\\"CommentRevision\\\",\\\"collectionExportName\\\":\\\"CommentRevisionCollection\\\",\\\"validationRules\\\":[{\\\"field\\\":\\\"commentId\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"foreignKey\\\"},{\\\"field\\\":\\\"editorUserId\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"crossPackageRef\\\"},{\\\"field\\\":\\\"body\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"}],\\\"schema\\\":{\\\"tableName\\\":\\\"comment_revisions\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"comment_revisions\\\\\\\" (\\\\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 \\\\\\\"tenant_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"comment_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"editor_user_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"body\\\\\\\" TEXT NOT NULL\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"comment_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"editor_user_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"crossPackageRef\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"body\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"comment_revisions_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"comment_revisions_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"comment_revisions_comment_id_idx\\\",\\\"columns\\\":[\\\"comment_id\\\"]},{\\\"name\\\":\\\"comment_revisions_editor_user_id_idx\\\",\\\"columns\\\":[\\\"editor_user_id\\\"]}],\\\"version\\\":\\\"69ea301e\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-comments\\\"},\\\"@happyvertical/smrt-comments:ParticipationBan\\\":{\\\"name\\\":\\\"participationban\\\",\\\"className\\\":\\\"ParticipationBan\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-comments:ParticipationBan\\\",\\\"collection\\\":\\\"participationbans\\\",\\\"description\\\":\\\"Tenant-local, reusable participation ban; a blank target applies tenant-wide.\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/comments/src/models/ParticipationBan.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-comments\\\",\\\"fields\\\":{\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"sqlType\\\":\\\"UUID\\\",\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"autoFilter\\\":true,\\\"required\\\":true,\\\"autoPopulate\\\":true,\\\"nullable\\\":false,\\\"mode\\\":\\\"required\\\",\\\"field\\\":\\\"tenantId\\\",\\\"allowSuperAdminBypass\\\":false}}},\\\"actorUserId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"recordType\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"recordId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"reason\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"expiresAt\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"nullable\\\":true}}},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"participation_bans\\\",\\\"api\\\":false,\\\"mcp\\\":false,\\\"cli\\\":false,\\\"tenantScoped\\\":{\\\"mode\\\":\\\"required\\\"},\\\"conflictColumns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"]},\\\"extends\\\":\\\"SmrtObject\\\",\\\"exportName\\\":\\\"ParticipationBan\\\",\\\"collectionExportName\\\":\\\"ParticipationBanCollection\\\",\\\"validationRules\\\":[{\\\"field\\\":\\\"actorUserId\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"reason\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"}],\\\"schema\\\":{\\\"tableName\\\":\\\"participation_bans\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"participation_bans\\\\\\\" (\\\\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 \\\\\\\"tenant_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"actor_user_id\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"record_type\\\\\\\" TEXT,\\\\n \\\\\\\"record_id\\\\\\\" TEXT,\\\\n \\\\\\\"reason\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"expires_at\\\\\\\" TIMESTAMP\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"actor_user_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"record_type\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"record_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"reason\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"expires_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"participation_bans_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"participation_bans_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"27bbfb94\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-comments\\\"},\\\"@happyvertical/smrt-comments:ParticipationPolicy\\\":{\\\"name\\\":\\\"participationpolicy\\\",\\\"className\\\":\\\"ParticipationPolicy\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-comments:ParticipationPolicy\\\",\\\"collection\\\":\\\"participationpolicies\\\",\\\"description\\\":\\\"A generic tenant default or exact-record override for participation actions.\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/comments/src/models/ParticipationPolicy.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-comments\\\",\\\"fields\\\":{\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"sqlType\\\":\\\"UUID\\\",\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"autoFilter\\\":true,\\\"required\\\":true,\\\"autoPopulate\\\":true,\\\"nullable\\\":false,\\\"mode\\\":\\\"required\\\",\\\"field\\\":\\\"tenantId\\\",\\\"allowSuperAdminBypass\\\":false}}},\\\"recordType\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"recordId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"action\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"moderationMode\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"default\\\":\\\"open\\\",\\\"_meta\\\":{\\\"required\\\":true},\\\"enum\\\":[\\\"open\\\",\\\"pre_moderated\\\",\\\"members_only\\\",\\\"closed\\\"]},\\\"maxActions\\\":{\\\"type\\\":\\\"integer\\\",\\\"required\\\":true,\\\"default\\\":0,\\\"_meta\\\":{\\\"required\\\":true}},\\\"windowSeconds\\\":{\\\"type\\\":\\\"integer\\\",\\\"required\\\":true,\\\"default\\\":0,\\\"_meta\\\":{\\\"required\\\":true}}},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"participation_policies\\\",\\\"api\\\":false,\\\"mcp\\\":false,\\\"cli\\\":false,\\\"tenantScoped\\\":{\\\"mode\\\":\\\"required\\\"},\\\"conflictColumns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"]},\\\"extends\\\":\\\"SmrtObject\\\",\\\"exportName\\\":\\\"ParticipationPolicy\\\",\\\"collectionExportName\\\":\\\"ParticipationPolicyCollection\\\",\\\"validationRules\\\":[{\\\"field\\\":\\\"action\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"moderationMode\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"maxActions\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"integer\\\"},{\\\"field\\\":\\\"windowSeconds\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"integer\\\"}],\\\"schema\\\":{\\\"tableName\\\":\\\"participation_policies\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"participation_policies\\\\\\\" (\\\\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 \\\\\\\"tenant_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"record_type\\\\\\\" TEXT,\\\\n \\\\\\\"record_id\\\\\\\" TEXT,\\\\n \\\\\\\"action\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"moderation_mode\\\\\\\" TEXT NOT NULL DEFAULT 'open',\\\\n \\\\\\\"max_actions\\\\\\\" INTEGER NOT NULL DEFAULT 0,\\\\n \\\\\\\"window_seconds\\\\\\\" INTEGER NOT NULL DEFAULT 0\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"record_type\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"record_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"action\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"moderation_mode\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false,\\\"default\\\":\\\"open\\\"},\\\"max_actions\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false,\\\"default\\\":0},\\\"window_seconds\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false,\\\"default\\\":0}},\\\"indexes\\\":[{\\\"name\\\":\\\"participation_policies_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"participation_policies_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"7f2fdd9d\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-comments\\\"},\\\"@happyvertical/smrt-comments:ParticipationRateBucket\\\":{\\\"name\\\":\\\"participationratebucket\\\",\\\"className\\\":\\\"ParticipationRateBucket\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-comments:ParticipationRateBucket\\\",\\\"collection\\\":\\\"participationratebuckets\\\",\\\"description\\\":\\\"Service-owned fixed-window counter. Never delete a currently active bucket.\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/comments/src/models/ParticipationRateBucket.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-comments\\\",\\\"fields\\\":{\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"sqlType\\\":\\\"UUID\\\",\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"autoFilter\\\":true,\\\"required\\\":true,\\\"autoPopulate\\\":true,\\\"nullable\\\":false,\\\"mode\\\":\\\"required\\\",\\\"field\\\":\\\"tenantId\\\",\\\"allowSuperAdminBypass\\\":false}}},\\\"bucketKey\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"actionCount\\\":{\\\"type\\\":\\\"integer\\\",\\\"required\\\":true,\\\"default\\\":0,\\\"_meta\\\":{\\\"required\\\":true}}},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"participation_rate_buckets\\\",\\\"api\\\":false,\\\"mcp\\\":false,\\\"cli\\\":false,\\\"indexes\\\":[{\\\"name\\\":\\\"participation_rate_bucket_unique\\\",\\\"columns\\\":[\\\"tenantId\\\",\\\"bucketKey\\\"],\\\"unique\\\":true}],\\\"tenantScoped\\\":{\\\"mode\\\":\\\"required\\\"},\\\"conflictColumns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"]},\\\"extends\\\":\\\"SmrtObject\\\",\\\"exportName\\\":\\\"ParticipationRateBucket\\\",\\\"collectionExportName\\\":\\\"ParticipationRateBucketCollection\\\",\\\"validationRules\\\":[{\\\"field\\\":\\\"bucketKey\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"actionCount\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"integer\\\"}],\\\"schema\\\":{\\\"tableName\\\":\\\"participation_rate_buckets\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"participation_rate_buckets\\\\\\\" (\\\\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 \\\\\\\"tenant_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"bucket_key\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"action_count\\\\\\\" INTEGER NOT NULL DEFAULT 0\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"bucket_key\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"action_count\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false,\\\"default\\\":0}},\\\"indexes\\\":[{\\\"name\\\":\\\"participation_rate_buckets_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"participation_rate_bucket_unique\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"bucket_key\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"participation_rate_buckets_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"9f3707e0\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-comments\\\"}},\\\"moduleType\\\":\\\"smrt\\\",\\\"recipes\\\":[{\\\"id\\\":\\\"comments.records\\\",\\\"className\\\":\\\"RecordCommentsRecipe\\\",\\\"label\\\":\\\"Record comments\\\",\\\"summary\\\":\\\"Discuss work directly on the records it concerns.\\\",\\\"synonyms\\\":[\\\"comments\\\",\\\"mentions\\\",\\\"discussion\\\"],\\\"models\\\":[\\\"@happyvertical/smrt-comments:Comment\\\",\\\"@happyvertical/smrt-comments:CommentRevision\\\",\\\"@happyvertical/smrt-comments:CommentReport\\\",\\\"@happyvertical/smrt-comments:ParticipationPolicy\\\",\\\"@happyvertical/smrt-comments:ParticipationBan\\\",\\\"@happyvertical/smrt-comments:ParticipationRateBucket\\\"],\\\"nav\\\":[],\\\"requires\\\":[],\\\"group\\\":{\\\"id\\\":\\\"comments\\\",\\\"label\\\":\\\"Comments\\\",\\\"summary\\\":\\\"Keep discussions alongside the records your team works on.\\\"},\\\"help\\\":{\\\"markdown\\\":\\\"## Overview\\\\n\\\\nRecord comments keep a discussion next to the work it concerns. Open a record\\\\nyou can access to read its discussion or add a comment. Comments are part of\\\\nthe record page, rather than a separate list of every discussion.\\\\n\\\\n## Tasks\\\\n\\\\n### Add a comment\\\\n\\\\nOpen the record, find Comments, write your message and choose Post comment.\\\\nYour app controls who can read the record and who can contribute to its discussion.\\\\n\\\\n### Mention someone\\\\n\\\\nIf your app provides mention selection, choose a teammate who can access the\\\\nrecord. When mention notifications are connected, that person receives a\\\\nnotification. Typing a name alone does not select a recipient.\\\\n\\\\n### Check a failed post\\\\n\\\\nIf posting reports an error, refresh the discussion before trying again. A\\\\ncomment may have been saved even when its mention notification could not be\\\\ndelivered. If it appears in the discussion, do not post it a second time.\\\\n\\\",\\\"fieldRefs\\\":[]},\\\"surfaces\\\":[{\\\"kind\\\":\\\"playground\\\",\\\"export\\\":\\\"@happyvertical/smrt-comments/svelte#RecordCommentsPlayground\\\",\\\"label\\\":\\\"Record discussion preview\\\"}],\\\"runtime\\\":\\\"both\\\",\\\"demoSeed\\\":{\\\"export\\\":\\\"@happyvertical/smrt-comments/svelte#recordCommentsDemo\\\"},\\\"demo\\\":{\\\"mode\\\":\\\"server\\\",\\\"reasons\\\":[\\\"Needs a server because its package depends on @happyvertical/smrt-tenancy, which do not build for a browser (#3624).\\\"]}}],\\\"smrtDependencies\\\":[\\\"@happyvertical/smrt-core\\\",\\\"@happyvertical/smrt-messages\\\",\\\"@happyvertical/smrt-tenancy\\\"],\\\"browser\\\":{\\\"status\\\":\\\"server-only\\\",\\\"issues\\\":[\\\"#3624\\\"],\\\"via\\\":[\\\"@happyvertical/smrt-tenancy\\\"]},\\\"stampsConstructors\\\":true}\"));\n","import { field, SmrtObject, smrt } from '@happyvertical/smrt-core';\nimport { TenantScoped, tenantId } from '@happyvertical/smrt-tenancy';\n\n/** Tenant-local, reusable participation ban; a blank target applies tenant-wide. */\n@TenantScoped({ mode: 'required' })\n@smrt({ tableName: 'participation_bans', api: false, mcp: false, cli: false })\nexport class ParticipationBan extends SmrtObject { static __smrtPackage__ = \"@happyvertical/smrt-comments\";\n @tenantId() tenantId = '';\n @field({ required: true }) actorUserId = '';\n @field() recordType = '';\n @field() recordId = '';\n @field({ required: true }) reason = '';\n @field({ type: 'datetime', nullable: true }) expiresAt: Date | null = null;\n protected override async validateBeforeSave(): Promise<void> {\n for (const identity of [this.tenantId, this.actorUserId, this.recordId]) {\n if (\n /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(\n identity,\n ) &&\n identity !== identity.toLowerCase()\n )\n throw new TypeError(\n 'Participation administrative UUIDs must be lowercase.',\n );\n }\n if (Boolean(this.recordType) !== Boolean(this.recordId))\n throw new TypeError(\n 'Participation target requires both recordType and recordId.',\n );\n await super.validateBeforeSave();\n }\n}\n","import { field, SmrtObject, smrt } from '@happyvertical/smrt-core';\nimport { TenantScoped, tenantId } from '@happyvertical/smrt-tenancy';\n\n/** A generic tenant default or exact-record override for participation actions. */\n@TenantScoped({ mode: 'required' })\n@smrt({\n tableName: 'participation_policies',\n api: false,\n mcp: false,\n cli: false,\n})\nexport class ParticipationPolicy extends SmrtObject { static __smrtPackage__ = \"@happyvertical/smrt-comments\";\n @tenantId() tenantId = '';\n @field() recordType = '';\n @field() recordId = '';\n @field({ required: true }) action = 'comment';\n @field({ required: true }) moderationMode:\n | 'open'\n | 'pre_moderated'\n | 'members_only'\n | 'closed' = 'open';\n @field({ required: true }) maxActions = 0;\n @field({ required: true }) windowSeconds = 0;\n protected override async validateBeforeSave(): Promise<void> {\n for (const identity of [this.tenantId, this.recordId]) {\n if (\n /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(\n identity,\n ) &&\n identity !== identity.toLowerCase()\n )\n throw new TypeError(\n 'Participation administrative UUIDs must be lowercase.',\n );\n }\n if (Boolean(this.recordType) !== Boolean(this.recordId))\n throw new TypeError(\n 'Participation target requires both recordType and recordId.',\n );\n if (\n !['comment', 'react', 'vote', 'report'].includes(this.action) ||\n !['open', 'pre_moderated', 'members_only', 'closed'].includes(\n this.moderationMode,\n ) ||\n !Number.isSafeInteger(this.maxActions) ||\n this.maxActions < 0 ||\n !Number.isSafeInteger(this.windowSeconds) ||\n this.windowSeconds < 0 ||\n (this.maxActions > 0 && this.windowSeconds === 0)\n )\n throw new TypeError('Invalid participation policy.');\n await super.validateBeforeSave();\n }\n}\n","import { field, SmrtObject, smrt } from '@happyvertical/smrt-core';\nimport { TenantScoped, tenantId } from '@happyvertical/smrt-tenancy';\n\n/** Service-owned fixed-window counter. Never delete a currently active bucket. */\n@TenantScoped({ mode: 'required' })\n@smrt({\n tableName: 'participation_rate_buckets',\n api: false,\n mcp: false,\n cli: false,\n indexes: [\n {\n name: 'participation_rate_bucket_unique',\n columns: ['tenantId', 'bucketKey'],\n unique: true,\n },\n ],\n})\nexport class ParticipationRateBucket extends SmrtObject { static __smrtPackage__ = \"@happyvertical/smrt-comments\";\n @tenantId() tenantId = '';\n @field({ required: true }) bucketKey = '';\n @field({ required: true }) actionCount = 0;\n}\n","import { SmrtCollection } from '@happyvertical/smrt-core';\nimport { ParticipationBan } from '../models/ParticipationBan.js';\nimport { ParticipationPolicy } from '../models/ParticipationPolicy.js';\nimport { ParticipationRateBucket } from '../models/ParticipationRateBucket.js';\n\nexport class ParticipationPolicyCollection extends SmrtCollection<ParticipationPolicy> {\n static readonly _itemClass = ParticipationPolicy;\n}\nexport class ParticipationBanCollection extends SmrtCollection<ParticipationBan> {\n static readonly _itemClass = ParticipationBan;\n}\nexport class ParticipationRateBucketCollection extends SmrtCollection<ParticipationRateBucket> {\n static readonly _itemClass = ParticipationRateBucket;\n}\n","/**\n * Neutral participation boundary shared by record discussions and lightweight\n * reactions/votes. This package owns the generic policy/ban schema; hosts bind\n * only identity and entitlement facts through the authorizer.\n */\nexport type ParticipationAction = 'comment' | 'react' | 'vote' | 'report';\n\nexport interface ParticipationTarget {\n tenantId: string;\n recordType: string;\n recordId: string;\n}\n\nexport interface ParticipationRequest extends ParticipationTarget {\n actorUserId: string;\n action: ParticipationAction;\n}\n\nexport interface ParticipationDecision {\n allowed: boolean;\n /** Trusted entitlement fact required by members_only policy. */\n member?: boolean;\n /** Immutable host-provided entitlement/roll evidence retained by the row. */\n snapshot?: Record<string, unknown>;\n /** Comments may enter the moderation queue without exposing host policy. */\n initialCommentStatus?: 'visible' | 'pending';\n reason?: string;\n}\n\n/**\n * The host supplies entitlement facts; the package's policy/ban/rate service\n * combines them with its tenant-scoped generic anti-abuse records.\n */\nexport interface ParticipationAuthorizer {\n authorize(request: ParticipationRequest): Promise<ParticipationDecision>;\n}\n\nexport class ParticipationDeniedError extends Error {\n constructor(readonly reason?: string) {\n super(reason ? `Participation denied: ${reason}` : 'Participation denied.');\n this.name = 'ParticipationDeniedError';\n }\n}\n","import {\n digestRunOnceContent,\n type SmrtClassOptions,\n} from '@happyvertical/smrt-core';\nimport { withTenant } from '@happyvertical/smrt-tenancy';\nimport {\n ParticipationBanCollection,\n ParticipationPolicyCollection,\n ParticipationRateBucketCollection,\n} from '../collections/ParticipationCollection.js';\nimport type { ParticipationPolicy } from '../models/ParticipationPolicy.js';\nimport {\n type ParticipationAuthorizer,\n type ParticipationDecision,\n ParticipationDeniedError,\n type ParticipationRequest,\n} from '../participation-contract.js';\n\ntype Database = ParticipationRateBucketCollection['db'];\nconst canonical = (value: string) =>\n /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(value)\n ? value.toLowerCase()\n : value;\n\n/** Shared generic policy, ban, and transactional quota enforcement. */\nexport class ParticipationService {\n constructor(\n private readonly options: {\n db: SmrtClassOptions['db'];\n entitlement?: ParticipationAuthorizer;\n /** Trusted clock for deterministic fixed-window boundaries. */\n now?: () => Date;\n },\n ) {}\n\n private normalize(request: ParticipationRequest): ParticipationRequest {\n if (\n !request ||\n !['comment', 'react', 'vote', 'report'].includes(request.action) ||\n [\n request.tenantId,\n request.actorUserId,\n request.recordType,\n request.recordId,\n ].some((value) => typeof value !== 'string' || !value.trim())\n ) {\n throw new TypeError('Invalid participation request.');\n }\n return {\n ...request,\n tenantId: canonical(request.tenantId),\n actorUserId: canonical(request.actorUserId),\n recordId: canonical(request.recordId),\n };\n }\n\n private async evaluate(\n request: ParticipationRequest,\n db: SmrtClassOptions['db'],\n ) {\n const now = (this.options.now?.() ?? new Date()).getTime();\n if (!Number.isFinite(now))\n throw new TypeError('Invalid participation clock.');\n const policies = await ParticipationPolicyCollection.create({ db });\n const rows = await policies.list({\n where: { tenantId: request.tenantId, action: request.action },\n });\n const exact = rows.filter(\n (p) =>\n p.recordType === request.recordType && p.recordId === request.recordId,\n );\n const defaults = rows.filter(\n (p) => p.recordType === '' && p.recordId === '',\n );\n if (exact.length > 1 || defaults.length > 1)\n throw new ParticipationDeniedError('Ambiguous participation policy.');\n const policy = exact[0] ?? defaults[0];\n if (\n policy &&\n (!['open', 'pre_moderated', 'members_only', 'closed'].includes(\n policy.moderationMode,\n ) ||\n !Number.isSafeInteger(policy.maxActions) ||\n policy.maxActions < 0 ||\n !Number.isSafeInteger(policy.windowSeconds) ||\n policy.windowSeconds < 0 ||\n (policy.maxActions > 0 && policy.windowSeconds < 1))\n ) {\n throw new ParticipationDeniedError('Invalid participation policy.');\n }\n if (policy?.moderationMode === 'closed')\n throw new ParticipationDeniedError('Participation is closed.');\n const bans = await ParticipationBanCollection.create({ db });\n for (const ban of await bans.list({\n where: { tenantId: request.tenantId, actorUserId: request.actorUserId },\n })) {\n if (\n (ban.recordType === '' && ban.recordId === '') ||\n (ban.recordType === request.recordType &&\n ban.recordId === request.recordId)\n ) {\n const expiry =\n ban.expiresAt === null ? null : new Date(ban.expiresAt).getTime();\n if (expiry === null || !Number.isFinite(expiry) || expiry > now)\n throw new ParticipationDeniedError('Actor is banned.');\n }\n }\n const decision = this.options.entitlement\n ? await this.options.entitlement.authorize(request)\n : { allowed: true };\n if (\n decision?.allowed !== true ||\n (policy?.moderationMode === 'members_only' && decision.member !== true)\n ) {\n throw new ParticipationDeniedError(\n decision?.reason ?? 'Membership required.',\n );\n }\n if (\n decision.initialCommentStatus !== undefined &&\n !['visible', 'pending'].includes(decision.initialCommentStatus)\n )\n throw new ParticipationDeniedError('Invalid moderation decision.');\n return {\n policy,\n now,\n decision: {\n ...decision,\n initialCommentStatus:\n policy?.moderationMode === 'pre_moderated'\n ? ('pending' as const)\n : decision.initialCommentStatus,\n },\n };\n }\n\n /** Checks current permission without consuming quota (including keyed replays). */\n async authorize(input: ParticipationRequest): Promise<ParticipationDecision> {\n const request = this.normalize(input);\n return withTenant(\n { tenantId: request.tenantId },\n async () => (await this.evaluate(request, this.options.db)).decision,\n );\n }\n\n private async reserve(\n db: Database,\n request: ParticipationRequest,\n policy: ParticipationPolicy | undefined,\n now: number,\n ) {\n if (!policy?.maxActions) return;\n const buckets = await ParticipationRateBucketCollection.create({ db });\n const bucketKey = digestRunOnceContent({\n actor: request.actorUserId,\n action: request.action,\n recordType: policy.recordType,\n recordId: policy.recordId,\n windowSeconds: policy.windowSeconds,\n window: Math.floor(now / (policy.windowSeconds * 1000)),\n });\n const table = `\"${buckets.tableName.replace(/\"/g, '\"\"')}\"`;\n const id = crypto.randomUUID();\n // One bounded atomic upsert arbitrates all service instances and processes.\n // The supplied transaction also owns the guarded mutation; failures release quota.\n const result = await db.query(\n `INSERT INTO ${table} (id, slug, context, tenant_id, bucket_key, action_count) VALUES (?, ?, '', ?, ?, 1) ON CONFLICT (tenant_id, bucket_key) DO UPDATE SET action_count = ${table}.action_count + 1 WHERE ${table}.action_count < ? RETURNING action_count`,\n id,\n id,\n request.tenantId,\n bucketKey,\n policy.maxActions,\n );\n if (result.rows.length !== 1)\n throw new ParticipationDeniedError('Rate limit exceeded.');\n }\n\n /** Run one new mutation atomically with its reservation. Caller owns retry identity. */\n async execute<T>(\n input: ParticipationRequest,\n work: (db: Database, decision: ParticipationDecision) => Promise<T>,\n ): Promise<T> {\n const request = this.normalize(input);\n return withTenant({ tenantId: request.tenantId }, async () => {\n const collection = await ParticipationRateBucketCollection.create({\n db: this.options.db,\n });\n if (!collection.db.transaction)\n throw new Error('Participation requires transactions.');\n return collection.db.transaction((tx) =>\n this.executeInTransaction(tx, request, work),\n );\n });\n }\n\n /** Compose with an existing caller-owned transaction; propagate failures to roll it back. */\n async executeInTransaction<T>(\n tx: Database,\n input: ParticipationRequest,\n work: (db: Database, decision: ParticipationDecision) => Promise<T>,\n ): Promise<T> {\n const request = this.normalize(input);\n return withTenant({ tenantId: request.tenantId }, async () => {\n const { policy, now, decision } = await this.evaluate(request, tx);\n await this.reserve(tx, request, policy, now);\n return work(tx, decision);\n });\n }\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"participation-rg06tjqx.js","names":[],"sources":["../../src/__smrt-register__.ts","../../src/models/ParticipationBan.ts","../../src/models/ParticipationPolicy.ts","../../src/models/ParticipationRateBucket.ts","../../src/collections/ParticipationCollection.ts","../../src/participation-contract.ts","../../src/services/ParticipationService.ts"],"sourcesContent":["// Generated by @happyvertical/smrt-core smrtPlugin at library build time.\n// The package manifest is inlined so self-registration cannot miss when a\n// downstream bundler relocates this module away from dist/manifest.json\n// (https://github.com/happyvertical/smrt/issues/1506,\n// https://github.com/happyvertical/smrt/issues/1507).\nimport { ObjectRegistry } from '@happyvertical/smrt-core';\n\nObjectRegistry.registerPackageManifest(JSON.parse(\"{\\\"version\\\":\\\"1.0.0\\\",\\\"timestamp\\\":0,\\\"packageName\\\":\\\"@happyvertical/smrt-comments\\\",\\\"packageVersion\\\":\\\"0.57.37\\\",\\\"objects\\\":{\\\"@happyvertical/smrt-comments:CommentCollection\\\":{\\\"name\\\":\\\"commentcollection\\\",\\\"className\\\":\\\"CommentCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-comments:CommentCollection\\\",\\\"collection\\\":\\\"comments\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/comments/src/collections/CommentCollection.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-comments\\\",\\\"fields\\\":{},\\\"methods\\\":{\\\"listForRecord\\\":{\\\"name\\\":\\\"listForRecord\\\",\\\"async\\\":true,\\\"parameters\\\":[{\\\"name\\\":\\\"recordType\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false},{\\\"name\\\":\\\"recordId\\\",\\\"type\\\":\\\"string\\\",\\\"optional\\\":false}],\\\"returnType\\\":\\\"Promise<Comment[]>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"record_comments\\\",\\\"api\\\":false,\\\"mcp\\\":false,\\\"cli\\\":false},\\\"extends\\\":\\\"SmrtCollection\\\",\\\"extendsTypeArg\\\":\\\"Comment\\\",\\\"exportName\\\":\\\"CommentCollection\\\",\\\"collectionExportName\\\":\\\"CommentCollectionCollection\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"record_comments\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"record_comments\\\\\\\" (\\\\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 \\\\\\\"meta_type\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"meta_id\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"role\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"sort_order\\\\\\\" INTEGER DEFAULT 0,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"author_user_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"body\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"mentions\\\\\\\" TEXT,\\\\n \\\\\\\"idempotency_key\\\\\\\" TEXT,\\\\n \\\\\\\"retry_tenant_id\\\\\\\" TEXT,\\\\n \\\\\\\"request_digest\\\\\\\" TEXT,\\\\n \\\\\\\"parent_comment_id\\\\\\\" UUID,\\\\n \\\\\\\"status\\\\\\\" TEXT NOT NULL DEFAULT 'visible',\\\\n \\\\\\\"participation_snapshot\\\\\\\" TEXT,\\\\n \\\\\\\"edited_at\\\\\\\" TIMESTAMP\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"meta_type\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"meta_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"role\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"sort_order\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"default\\\":0},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"author_user_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"crossPackageRef\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"body\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"mentions\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"idempotency_key\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"retry_tenant_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"request_digest\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"parent_comment_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"status\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false,\\\"default\\\":\\\"visible\\\"},\\\"participation_snapshot\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"edited_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"record_comments_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"record_comments_tenant_request_key\\\",\\\"columns\\\":[\\\"retry_tenant_id\\\",\\\"idempotency_key\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"record_comments_record_created_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"meta_type\\\",\\\"meta_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"record_comments_parent_created_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"parent_comment_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"record_comments_moderation_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"status\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"record_comments_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"record_comments_meta_type_meta_id_idx\\\",\\\"columns\\\":[\\\"meta_type\\\",\\\"meta_id\\\"]},{\\\"name\\\":\\\"record_comments_author_user_id_idx\\\",\\\"columns\\\":[\\\"author_user_id\\\"]},{\\\"name\\\":\\\"record_comments_parent_comment_id_idx\\\",\\\"columns\\\":[\\\"parent_comment_id\\\"]}],\\\"version\\\":\\\"35c502ab\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-comments\\\"},\\\"@happyvertical/smrt-comments:CommentReportCollection\\\":{\\\"name\\\":\\\"commentreportcollection\\\",\\\"className\\\":\\\"CommentReportCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-comments:CommentReportCollection\\\",\\\"collection\\\":\\\"commentreports\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/comments/src/collections/CommentReportCollection.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-comments\\\",\\\"fields\\\":{},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"comment_reports\\\",\\\"api\\\":false,\\\"mcp\\\":false,\\\"cli\\\":false},\\\"extends\\\":\\\"SmrtCollection\\\",\\\"extendsTypeArg\\\":\\\"CommentReport\\\",\\\"exportName\\\":\\\"CommentReportCollection\\\",\\\"collectionExportName\\\":\\\"CommentReportCollectionCollection\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"comment_reports\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"comment_reports\\\\\\\" (\\\\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 \\\\\\\"tenant_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"comment_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"reporter_user_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"reason\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"status\\\\\\\" TEXT NOT NULL DEFAULT 'open'\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"comment_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"reporter_user_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"crossPackageRef\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"reason\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"status\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false,\\\"default\\\":\\\"open\\\"}},\\\"indexes\\\":[{\\\"name\\\":\\\"comment_reports_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"comment_reports_actor_target_unique\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"reporter_user_id\\\",\\\"comment_id\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"comment_reports_queue_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"status\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"comment_reports_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"comment_reports_comment_id_idx\\\",\\\"columns\\\":[\\\"comment_id\\\"]},{\\\"name\\\":\\\"comment_reports_reporter_user_id_idx\\\",\\\"columns\\\":[\\\"reporter_user_id\\\"]}],\\\"version\\\":\\\"001951c2\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-comments\\\"},\\\"@happyvertical/smrt-comments:CommentRevisionCollection\\\":{\\\"name\\\":\\\"commentrevisioncollection\\\",\\\"className\\\":\\\"CommentRevisionCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-comments:CommentRevisionCollection\\\",\\\"collection\\\":\\\"commentrevisions\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/comments/src/collections/CommentRevisionCollection.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-comments\\\",\\\"fields\\\":{},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"comment_revisions\\\",\\\"api\\\":false,\\\"mcp\\\":false,\\\"cli\\\":false},\\\"extends\\\":\\\"SmrtCollection\\\",\\\"extendsTypeArg\\\":\\\"CommentRevision\\\",\\\"exportName\\\":\\\"CommentRevisionCollection\\\",\\\"collectionExportName\\\":\\\"CommentRevisionCollectionCollection\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"comment_revisions\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"comment_revisions\\\\\\\" (\\\\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 \\\\\\\"tenant_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"comment_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"editor_user_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"body\\\\\\\" TEXT NOT NULL\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"comment_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"editor_user_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"crossPackageRef\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"body\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"comment_revisions_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"comment_revisions_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"comment_revisions_comment_id_idx\\\",\\\"columns\\\":[\\\"comment_id\\\"]},{\\\"name\\\":\\\"comment_revisions_editor_user_id_idx\\\",\\\"columns\\\":[\\\"editor_user_id\\\"]}],\\\"version\\\":\\\"69ea301e\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-comments\\\"},\\\"@happyvertical/smrt-comments:ParticipationPolicyCollection\\\":{\\\"name\\\":\\\"participationpolicycollection\\\",\\\"className\\\":\\\"ParticipationPolicyCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-comments:ParticipationPolicyCollection\\\",\\\"collection\\\":\\\"participationpolicies\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/comments/src/collections/ParticipationCollection.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-comments\\\",\\\"fields\\\":{},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"participation_policies\\\",\\\"api\\\":false,\\\"mcp\\\":false,\\\"cli\\\":false},\\\"extends\\\":\\\"SmrtCollection\\\",\\\"extendsTypeArg\\\":\\\"ParticipationPolicy\\\",\\\"exportName\\\":\\\"ParticipationPolicyCollection\\\",\\\"collectionExportName\\\":\\\"ParticipationPolicyCollectionCollection\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"participation_policies\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"participation_policies\\\\\\\" (\\\\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 \\\\\\\"tenant_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"record_type\\\\\\\" TEXT,\\\\n \\\\\\\"record_id\\\\\\\" TEXT,\\\\n \\\\\\\"action\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"moderation_mode\\\\\\\" TEXT NOT NULL DEFAULT 'open',\\\\n \\\\\\\"max_actions\\\\\\\" INTEGER NOT NULL DEFAULT 0,\\\\n \\\\\\\"window_seconds\\\\\\\" INTEGER NOT NULL DEFAULT 0\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"record_type\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"record_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"action\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"moderation_mode\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false,\\\"default\\\":\\\"open\\\"},\\\"max_actions\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false,\\\"default\\\":0},\\\"window_seconds\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false,\\\"default\\\":0}},\\\"indexes\\\":[{\\\"name\\\":\\\"participation_policies_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"participation_policies_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"7f2fdd9d\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-comments\\\"},\\\"@happyvertical/smrt-comments:ParticipationBanCollection\\\":{\\\"name\\\":\\\"participationbancollection\\\",\\\"className\\\":\\\"ParticipationBanCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-comments:ParticipationBanCollection\\\",\\\"collection\\\":\\\"participationbans\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/comments/src/collections/ParticipationCollection.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-comments\\\",\\\"fields\\\":{},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"participation_bans\\\",\\\"api\\\":false,\\\"mcp\\\":false,\\\"cli\\\":false},\\\"extends\\\":\\\"SmrtCollection\\\",\\\"extendsTypeArg\\\":\\\"ParticipationBan\\\",\\\"exportName\\\":\\\"ParticipationBanCollection\\\",\\\"collectionExportName\\\":\\\"ParticipationBanCollectionCollection\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"participation_bans\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"participation_bans\\\\\\\" (\\\\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 \\\\\\\"tenant_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"actor_user_id\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"record_type\\\\\\\" TEXT,\\\\n \\\\\\\"record_id\\\\\\\" TEXT,\\\\n \\\\\\\"reason\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"expires_at\\\\\\\" TIMESTAMP\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"actor_user_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"record_type\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"record_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"reason\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"expires_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"participation_bans_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"participation_bans_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"27bbfb94\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-comments\\\"},\\\"@happyvertical/smrt-comments:ParticipationRateBucketCollection\\\":{\\\"name\\\":\\\"participationratebucketcollection\\\",\\\"className\\\":\\\"ParticipationRateBucketCollection\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-comments:ParticipationRateBucketCollection\\\",\\\"collection\\\":\\\"participationratebuckets\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/comments/src/collections/ParticipationCollection.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-comments\\\",\\\"fields\\\":{},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"participation_rate_buckets\\\",\\\"api\\\":false,\\\"mcp\\\":false,\\\"cli\\\":false},\\\"extends\\\":\\\"SmrtCollection\\\",\\\"extendsTypeArg\\\":\\\"ParticipationRateBucket\\\",\\\"exportName\\\":\\\"ParticipationRateBucketCollection\\\",\\\"collectionExportName\\\":\\\"ParticipationRateBucketCollectionCollection\\\",\\\"schema\\\":{\\\"tableName\\\":\\\"participation_rate_buckets\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"participation_rate_buckets\\\\\\\" (\\\\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 \\\\\\\"tenant_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"bucket_key\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"action_count\\\\\\\" INTEGER NOT NULL DEFAULT 0\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"bucket_key\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"action_count\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false,\\\"default\\\":0}},\\\"indexes\\\":[{\\\"name\\\":\\\"participation_rate_buckets_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"participation_rate_bucket_unique\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"bucket_key\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"participation_rate_buckets_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"9f3707e0\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-comments\\\"},\\\"@happyvertical/smrt-comments:Comment\\\":{\\\"name\\\":\\\"comment\\\",\\\"className\\\":\\\"Comment\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-comments:Comment\\\",\\\"collection\\\":\\\"comments\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/comments/src/models/Comment.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-comments\\\",\\\"fields\\\":{\\\"metaType\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"metaId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"role\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"sortOrder\\\":{\\\"type\\\":\\\"integer\\\",\\\"required\\\":false,\\\"default\\\":0},\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"sqlType\\\":\\\"UUID\\\",\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"autoFilter\\\":true,\\\"required\\\":true,\\\"autoPopulate\\\":true,\\\"nullable\\\":false,\\\"mode\\\":\\\"required\\\",\\\"field\\\":\\\"tenantId\\\",\\\"allowSuperAdminBypass\\\":false}}},\\\"authorUserId\\\":{\\\"type\\\":\\\"crossPackageRef\\\",\\\"required\\\":true,\\\"related\\\":\\\"@happyvertical/smrt-users:User\\\"},\\\"body\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"mentions\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"idempotencyKey\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"nullable\\\":true,\\\"readonly\\\":true},\\\"readonly\\\":true},\\\"retryTenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"nullable\\\":true,\\\"readonly\\\":true},\\\"readonly\\\":true},\\\"requestDigest\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"nullable\\\":true,\\\"readonly\\\":true},\\\"readonly\\\":true},\\\"parentCommentId\\\":{\\\"type\\\":\\\"foreignKey\\\",\\\"required\\\":false,\\\"related\\\":\\\"Comment\\\",\\\"_meta\\\":{\\\"nullable\\\":true,\\\"constraint\\\":false}},\\\"status\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"default\\\":\\\"visible\\\",\\\"_meta\\\":{\\\"required\\\":true},\\\"enum\\\":[\\\"visible\\\",\\\"hidden\\\",\\\"pending\\\",\\\"deleted\\\"]},\\\"participationSnapshot\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"nullable\\\":true,\\\"readonly\\\":true},\\\"readonly\\\":true},\\\"editedAt\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"nullable\\\":true,\\\"readonly\\\":true},\\\"readonly\\\":true}},\\\"methods\\\":{\\\"hydrate\\\":{\\\"name\\\":\\\"hydrate\\\",\\\"async\\\":true,\\\"parameters\\\":[],\\\"returnType\\\":\\\"Promise<T | null>\\\",\\\"isStatic\\\":false,\\\"isPublic\\\":true}},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"record_comments\\\",\\\"api\\\":false,\\\"mcp\\\":false,\\\"cli\\\":false,\\\"indexes\\\":[{\\\"name\\\":\\\"record_comments_tenant_request_key\\\",\\\"columns\\\":[\\\"retryTenantId\\\",\\\"idempotencyKey\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"record_comments_record_created_idx\\\",\\\"columns\\\":[\\\"tenantId\\\",\\\"metaType\\\",\\\"metaId\\\",\\\"createdAt\\\"]},{\\\"name\\\":\\\"record_comments_parent_created_idx\\\",\\\"columns\\\":[\\\"tenantId\\\",\\\"parentCommentId\\\",\\\"createdAt\\\"]},{\\\"name\\\":\\\"record_comments_moderation_idx\\\",\\\"columns\\\":[\\\"tenantId\\\",\\\"status\\\",\\\"createdAt\\\"]}],\\\"tenantScoped\\\":{\\\"mode\\\":\\\"required\\\"},\\\"conflictColumns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"]},\\\"extends\\\":\\\"SmrtPolymorphicAssociation\\\",\\\"exportName\\\":\\\"Comment\\\",\\\"collectionExportName\\\":\\\"CommentCollection\\\",\\\"validationRules\\\":[{\\\"field\\\":\\\"metaType\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"metaId\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"role\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"authorUserId\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"crossPackageRef\\\"},{\\\"field\\\":\\\"body\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"status\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"}],\\\"schema\\\":{\\\"tableName\\\":\\\"record_comments\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"record_comments\\\\\\\" (\\\\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 \\\\\\\"meta_type\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"meta_id\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"role\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"sort_order\\\\\\\" INTEGER DEFAULT 0,\\\\n \\\\\\\"tenant_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"author_user_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"body\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"mentions\\\\\\\" TEXT,\\\\n \\\\\\\"idempotency_key\\\\\\\" TEXT,\\\\n \\\\\\\"retry_tenant_id\\\\\\\" TEXT,\\\\n \\\\\\\"request_digest\\\\\\\" TEXT,\\\\n \\\\\\\"parent_comment_id\\\\\\\" UUID,\\\\n \\\\\\\"status\\\\\\\" TEXT NOT NULL DEFAULT 'visible',\\\\n \\\\\\\"participation_snapshot\\\\\\\" TEXT,\\\\n \\\\\\\"edited_at\\\\\\\" TIMESTAMP\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"meta_type\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"meta_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"role\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"sort_order\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":false,\\\"unique\\\":false,\\\"default\\\":0},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"author_user_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"crossPackageRef\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"body\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"mentions\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"idempotency_key\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"retry_tenant_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"request_digest\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"parent_comment_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"status\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false,\\\"default\\\":\\\"visible\\\"},\\\"participation_snapshot\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"edited_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"record_comments_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"record_comments_tenant_request_key\\\",\\\"columns\\\":[\\\"retry_tenant_id\\\",\\\"idempotency_key\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"record_comments_record_created_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"meta_type\\\",\\\"meta_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"record_comments_parent_created_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"parent_comment_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"record_comments_moderation_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"status\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"record_comments_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"record_comments_meta_type_meta_id_idx\\\",\\\"columns\\\":[\\\"meta_type\\\",\\\"meta_id\\\"]},{\\\"name\\\":\\\"record_comments_author_user_id_idx\\\",\\\"columns\\\":[\\\"author_user_id\\\"]},{\\\"name\\\":\\\"record_comments_parent_comment_id_idx\\\",\\\"columns\\\":[\\\"parent_comment_id\\\"]}],\\\"version\\\":\\\"35c502ab\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-comments\\\"},\\\"@happyvertical/smrt-comments:CommentReport\\\":{\\\"name\\\":\\\"commentreport\\\",\\\"className\\\":\\\"CommentReport\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-comments:CommentReport\\\",\\\"collection\\\":\\\"commentreports\\\",\\\"description\\\":\\\"A tenant-local report; moderation resolution never deletes the report.\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/comments/src/models/CommentReport.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-comments\\\",\\\"fields\\\":{\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"sqlType\\\":\\\"UUID\\\",\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"autoFilter\\\":true,\\\"required\\\":true,\\\"autoPopulate\\\":true,\\\"nullable\\\":false,\\\"mode\\\":\\\"required\\\",\\\"field\\\":\\\"tenantId\\\",\\\"allowSuperAdminBypass\\\":false}}},\\\"commentId\\\":{\\\"type\\\":\\\"foreignKey\\\",\\\"required\\\":true,\\\"related\\\":\\\"Comment\\\",\\\"_meta\\\":{\\\"required\\\":true,\\\"constraint\\\":false}},\\\"reporterUserId\\\":{\\\"type\\\":\\\"crossPackageRef\\\",\\\"required\\\":true,\\\"related\\\":\\\"@happyvertical/smrt-users:User\\\"},\\\"reason\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"status\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"default\\\":\\\"open\\\",\\\"_meta\\\":{\\\"required\\\":true},\\\"enum\\\":[\\\"open\\\",\\\"resolved\\\",\\\"dismissed\\\"]}},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"comment_reports\\\",\\\"api\\\":false,\\\"mcp\\\":false,\\\"cli\\\":false,\\\"indexes\\\":[{\\\"name\\\":\\\"comment_reports_actor_target_unique\\\",\\\"columns\\\":[\\\"tenantId\\\",\\\"reporterUserId\\\",\\\"commentId\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"comment_reports_queue_idx\\\",\\\"columns\\\":[\\\"tenantId\\\",\\\"status\\\",\\\"createdAt\\\"]}],\\\"tenantScoped\\\":{\\\"mode\\\":\\\"required\\\"},\\\"conflictColumns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"]},\\\"extends\\\":\\\"SmrtObject\\\",\\\"exportName\\\":\\\"CommentReport\\\",\\\"collectionExportName\\\":\\\"CommentReportCollection\\\",\\\"validationRules\\\":[{\\\"field\\\":\\\"commentId\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"foreignKey\\\"},{\\\"field\\\":\\\"reporterUserId\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"crossPackageRef\\\"},{\\\"field\\\":\\\"reason\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"status\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"}],\\\"schema\\\":{\\\"tableName\\\":\\\"comment_reports\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"comment_reports\\\\\\\" (\\\\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 \\\\\\\"tenant_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"comment_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"reporter_user_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"reason\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"status\\\\\\\" TEXT NOT NULL DEFAULT 'open'\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"comment_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"reporter_user_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"crossPackageRef\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"reason\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"status\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false,\\\"default\\\":\\\"open\\\"}},\\\"indexes\\\":[{\\\"name\\\":\\\"comment_reports_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"comment_reports_actor_target_unique\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"reporter_user_id\\\",\\\"comment_id\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"comment_reports_queue_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"status\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"comment_reports_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"comment_reports_comment_id_idx\\\",\\\"columns\\\":[\\\"comment_id\\\"]},{\\\"name\\\":\\\"comment_reports_reporter_user_id_idx\\\",\\\"columns\\\":[\\\"reporter_user_id\\\"]}],\\\"version\\\":\\\"001951c2\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-comments\\\"},\\\"@happyvertical/smrt-comments:CommentRevision\\\":{\\\"name\\\":\\\"commentrevision\\\",\\\"className\\\":\\\"CommentRevision\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-comments:CommentRevision\\\",\\\"collection\\\":\\\"commentrevisions\\\",\\\"description\\\":\\\"Immutable prior body retained whenever an author edits a comment.\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/comments/src/models/CommentRevision.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-comments\\\",\\\"fields\\\":{\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"sqlType\\\":\\\"UUID\\\",\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"autoFilter\\\":true,\\\"required\\\":true,\\\"autoPopulate\\\":true,\\\"nullable\\\":false,\\\"mode\\\":\\\"required\\\",\\\"field\\\":\\\"tenantId\\\",\\\"allowSuperAdminBypass\\\":false}}},\\\"commentId\\\":{\\\"type\\\":\\\"foreignKey\\\",\\\"required\\\":true,\\\"related\\\":\\\"Comment\\\",\\\"_meta\\\":{\\\"required\\\":true,\\\"constraint\\\":false}},\\\"editorUserId\\\":{\\\"type\\\":\\\"crossPackageRef\\\",\\\"required\\\":true,\\\"related\\\":\\\"@happyvertical/smrt-users:User\\\"},\\\"body\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}}},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"comment_revisions\\\",\\\"api\\\":false,\\\"mcp\\\":false,\\\"cli\\\":false,\\\"tenantScoped\\\":{\\\"mode\\\":\\\"required\\\"},\\\"conflictColumns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"]},\\\"extends\\\":\\\"SmrtObject\\\",\\\"exportName\\\":\\\"CommentRevision\\\",\\\"collectionExportName\\\":\\\"CommentRevisionCollection\\\",\\\"validationRules\\\":[{\\\"field\\\":\\\"commentId\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"foreignKey\\\"},{\\\"field\\\":\\\"editorUserId\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"crossPackageRef\\\"},{\\\"field\\\":\\\"body\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"}],\\\"schema\\\":{\\\"tableName\\\":\\\"comment_revisions\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"comment_revisions\\\\\\\" (\\\\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 \\\\\\\"tenant_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"comment_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"editor_user_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"body\\\\\\\" TEXT NOT NULL\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"comment_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"foreignKey\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"editor_user_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"crossPackageRef\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"body\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"comment_revisions_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"comment_revisions_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]},{\\\"name\\\":\\\"comment_revisions_comment_id_idx\\\",\\\"columns\\\":[\\\"comment_id\\\"]},{\\\"name\\\":\\\"comment_revisions_editor_user_id_idx\\\",\\\"columns\\\":[\\\"editor_user_id\\\"]}],\\\"version\\\":\\\"69ea301e\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-comments\\\"},\\\"@happyvertical/smrt-comments:ParticipationBan\\\":{\\\"name\\\":\\\"participationban\\\",\\\"className\\\":\\\"ParticipationBan\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-comments:ParticipationBan\\\",\\\"collection\\\":\\\"participationbans\\\",\\\"description\\\":\\\"Tenant-local, reusable participation ban; a blank target applies tenant-wide.\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/comments/src/models/ParticipationBan.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-comments\\\",\\\"fields\\\":{\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"sqlType\\\":\\\"UUID\\\",\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"autoFilter\\\":true,\\\"required\\\":true,\\\"autoPopulate\\\":true,\\\"nullable\\\":false,\\\"mode\\\":\\\"required\\\",\\\"field\\\":\\\"tenantId\\\",\\\"allowSuperAdminBypass\\\":false}}},\\\"actorUserId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"recordType\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"recordId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"reason\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"expiresAt\\\":{\\\"type\\\":\\\"datetime\\\",\\\"required\\\":false,\\\"_meta\\\":{\\\"nullable\\\":true}}},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"participation_bans\\\",\\\"api\\\":false,\\\"mcp\\\":false,\\\"cli\\\":false,\\\"tenantScoped\\\":{\\\"mode\\\":\\\"required\\\"},\\\"conflictColumns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"]},\\\"extends\\\":\\\"SmrtObject\\\",\\\"exportName\\\":\\\"ParticipationBan\\\",\\\"collectionExportName\\\":\\\"ParticipationBanCollection\\\",\\\"validationRules\\\":[{\\\"field\\\":\\\"actorUserId\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"reason\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"}],\\\"schema\\\":{\\\"tableName\\\":\\\"participation_bans\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"participation_bans\\\\\\\" (\\\\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 \\\\\\\"tenant_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"actor_user_id\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"record_type\\\\\\\" TEXT,\\\\n \\\\\\\"record_id\\\\\\\" TEXT,\\\\n \\\\\\\"reason\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"expires_at\\\\\\\" TIMESTAMP\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"actor_user_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"record_type\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"record_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"reason\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"expires_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":false,\\\"unique\\\":false}},\\\"indexes\\\":[{\\\"name\\\":\\\"participation_bans_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"participation_bans_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"27bbfb94\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-comments\\\"},\\\"@happyvertical/smrt-comments:ParticipationPolicy\\\":{\\\"name\\\":\\\"participationpolicy\\\",\\\"className\\\":\\\"ParticipationPolicy\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-comments:ParticipationPolicy\\\",\\\"collection\\\":\\\"participationpolicies\\\",\\\"description\\\":\\\"A generic tenant default or exact-record override for participation actions.\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/comments/src/models/ParticipationPolicy.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-comments\\\",\\\"fields\\\":{\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"sqlType\\\":\\\"UUID\\\",\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"autoFilter\\\":true,\\\"required\\\":true,\\\"autoPopulate\\\":true,\\\"nullable\\\":false,\\\"mode\\\":\\\"required\\\",\\\"field\\\":\\\"tenantId\\\",\\\"allowSuperAdminBypass\\\":false}}},\\\"recordType\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"recordId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":false},\\\"action\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"moderationMode\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"default\\\":\\\"open\\\",\\\"_meta\\\":{\\\"required\\\":true},\\\"enum\\\":[\\\"open\\\",\\\"pre_moderated\\\",\\\"members_only\\\",\\\"closed\\\"]},\\\"maxActions\\\":{\\\"type\\\":\\\"integer\\\",\\\"required\\\":true,\\\"default\\\":0,\\\"_meta\\\":{\\\"required\\\":true}},\\\"windowSeconds\\\":{\\\"type\\\":\\\"integer\\\",\\\"required\\\":true,\\\"default\\\":0,\\\"_meta\\\":{\\\"required\\\":true}}},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"participation_policies\\\",\\\"api\\\":false,\\\"mcp\\\":false,\\\"cli\\\":false,\\\"tenantScoped\\\":{\\\"mode\\\":\\\"required\\\"},\\\"conflictColumns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"]},\\\"extends\\\":\\\"SmrtObject\\\",\\\"exportName\\\":\\\"ParticipationPolicy\\\",\\\"collectionExportName\\\":\\\"ParticipationPolicyCollection\\\",\\\"validationRules\\\":[{\\\"field\\\":\\\"action\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"moderationMode\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"maxActions\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"integer\\\"},{\\\"field\\\":\\\"windowSeconds\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"integer\\\"}],\\\"schema\\\":{\\\"tableName\\\":\\\"participation_policies\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"participation_policies\\\\\\\" (\\\\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 \\\\\\\"tenant_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"record_type\\\\\\\" TEXT,\\\\n \\\\\\\"record_id\\\\\\\" TEXT,\\\\n \\\\\\\"action\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"moderation_mode\\\\\\\" TEXT NOT NULL DEFAULT 'open',\\\\n \\\\\\\"max_actions\\\\\\\" INTEGER NOT NULL DEFAULT 0,\\\\n \\\\\\\"window_seconds\\\\\\\" INTEGER NOT NULL DEFAULT 0\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"record_type\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"record_id\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":false,\\\"unique\\\":false},\\\"action\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"moderation_mode\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false,\\\"default\\\":\\\"open\\\"},\\\"max_actions\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false,\\\"default\\\":0},\\\"window_seconds\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false,\\\"default\\\":0}},\\\"indexes\\\":[{\\\"name\\\":\\\"participation_policies_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"participation_policies_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"7f2fdd9d\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-comments\\\"},\\\"@happyvertical/smrt-comments:ParticipationRateBucket\\\":{\\\"name\\\":\\\"participationratebucket\\\",\\\"className\\\":\\\"ParticipationRateBucket\\\",\\\"qualifiedName\\\":\\\"@happyvertical/smrt-comments:ParticipationRateBucket\\\",\\\"collection\\\":\\\"participationratebuckets\\\",\\\"description\\\":\\\"Service-owned fixed-window counter. Never delete a currently active bucket.\\\",\\\"filePath\\\":\\\"/home/runner/work/smrt/smrt/packages/comments/src/models/ParticipationRateBucket.ts\\\",\\\"packageName\\\":\\\"@happyvertical/smrt-comments\\\",\\\"fields\\\":{\\\"tenantId\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"sqlType\\\":\\\"UUID\\\",\\\"__tenancy\\\":{\\\"isTenantIdField\\\":true,\\\"autoFilter\\\":true,\\\"required\\\":true,\\\"autoPopulate\\\":true,\\\"nullable\\\":false,\\\"mode\\\":\\\"required\\\",\\\"field\\\":\\\"tenantId\\\",\\\"allowSuperAdminBypass\\\":false}}},\\\"bucketKey\\\":{\\\"type\\\":\\\"text\\\",\\\"required\\\":true,\\\"_meta\\\":{\\\"required\\\":true}},\\\"actionCount\\\":{\\\"type\\\":\\\"integer\\\",\\\"required\\\":true,\\\"default\\\":0,\\\"_meta\\\":{\\\"required\\\":true}}},\\\"methods\\\":{},\\\"decoratorConfig\\\":{\\\"tableName\\\":\\\"participation_rate_buckets\\\",\\\"api\\\":false,\\\"mcp\\\":false,\\\"cli\\\":false,\\\"indexes\\\":[{\\\"name\\\":\\\"participation_rate_bucket_unique\\\",\\\"columns\\\":[\\\"tenantId\\\",\\\"bucketKey\\\"],\\\"unique\\\":true}],\\\"tenantScoped\\\":{\\\"mode\\\":\\\"required\\\"},\\\"conflictColumns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"]},\\\"extends\\\":\\\"SmrtObject\\\",\\\"exportName\\\":\\\"ParticipationRateBucket\\\",\\\"collectionExportName\\\":\\\"ParticipationRateBucketCollection\\\",\\\"validationRules\\\":[{\\\"field\\\":\\\"bucketKey\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"text\\\"},{\\\"field\\\":\\\"actionCount\\\",\\\"rule\\\":\\\"required\\\",\\\"fieldType\\\":\\\"integer\\\"}],\\\"schema\\\":{\\\"tableName\\\":\\\"participation_rate_buckets\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"participation_rate_buckets\\\\\\\" (\\\\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 \\\\\\\"tenant_id\\\\\\\" UUID NOT NULL,\\\\n \\\\\\\"bucket_key\\\\\\\" TEXT NOT NULL,\\\\n \\\\\\\"action_count\\\\\\\" INTEGER NOT NULL DEFAULT 0\\\\n);\\\",\\\"columns\\\":{\\\"id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"primaryKey\\\":true,\\\"referenceKind\\\":\\\"id\\\",\\\"notNull\\\":true},\\\"slug\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true},\\\"context\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"\\\"},\\\"created_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"updated_at\\\":{\\\"type\\\":\\\"TIMESTAMP\\\",\\\"notNull\\\":true,\\\"default\\\":\\\"current_timestamp\\\"},\\\"tenant_id\\\":{\\\"type\\\":\\\"UUID\\\",\\\"referenceKind\\\":\\\"tenantId\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"bucket_key\\\":{\\\"type\\\":\\\"TEXT\\\",\\\"notNull\\\":true,\\\"unique\\\":false},\\\"action_count\\\":{\\\"type\\\":\\\"INTEGER\\\",\\\"notNull\\\":true,\\\"unique\\\":false,\\\"default\\\":0}},\\\"indexes\\\":[{\\\"name\\\":\\\"participation_rate_buckets_slug_context_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"slug\\\",\\\"context\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"participation_rate_bucket_unique\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"bucket_key\\\"],\\\"unique\\\":true},{\\\"name\\\":\\\"participation_rate_buckets_tenant_id_created_at_idx\\\",\\\"columns\\\":[\\\"tenant_id\\\",\\\"created_at\\\"]}],\\\"version\\\":\\\"9f3707e0\\\"},\\\"importPath\\\":\\\"@happyvertical/smrt-comments\\\"}},\\\"moduleType\\\":\\\"smrt\\\",\\\"recipes\\\":[{\\\"id\\\":\\\"comments.records\\\",\\\"className\\\":\\\"RecordCommentsRecipe\\\",\\\"label\\\":\\\"Record comments\\\",\\\"summary\\\":\\\"Discuss work directly on the records it concerns.\\\",\\\"synonyms\\\":[\\\"comments\\\",\\\"mentions\\\",\\\"discussion\\\"],\\\"models\\\":[\\\"@happyvertical/smrt-comments:Comment\\\",\\\"@happyvertical/smrt-comments:CommentRevision\\\",\\\"@happyvertical/smrt-comments:CommentReport\\\",\\\"@happyvertical/smrt-comments:ParticipationPolicy\\\",\\\"@happyvertical/smrt-comments:ParticipationBan\\\",\\\"@happyvertical/smrt-comments:ParticipationRateBucket\\\"],\\\"nav\\\":[],\\\"requires\\\":[],\\\"group\\\":{\\\"id\\\":\\\"comments\\\",\\\"label\\\":\\\"Comments\\\",\\\"summary\\\":\\\"Keep discussions alongside the records your team works on.\\\"},\\\"help\\\":{\\\"markdown\\\":\\\"## Overview\\\\n\\\\nRecord comments keep a discussion next to the work it concerns. Open a record\\\\nyou can access to read its discussion or add a comment. Comments are part of\\\\nthe record page, rather than a separate list of every discussion.\\\\n\\\\n## Tasks\\\\n\\\\n### Add a comment\\\\n\\\\nOpen the record, find Comments, write your message and choose Post comment.\\\\nYour app controls who can read the record and who can contribute to its discussion.\\\\n\\\\n### Mention someone\\\\n\\\\nIf your app provides mention selection, choose a teammate who can access the\\\\nrecord. When mention notifications are connected, that person receives a\\\\nnotification. Typing a name alone does not select a recipient.\\\\n\\\\n### Check a failed post\\\\n\\\\nIf posting reports an error, refresh the discussion before trying again. A\\\\ncomment may have been saved even when its mention notification could not be\\\\ndelivered. If it appears in the discussion, do not post it a second time.\\\\n\\\",\\\"fieldRefs\\\":[]},\\\"surfaces\\\":[{\\\"kind\\\":\\\"playground\\\",\\\"export\\\":\\\"@happyvertical/smrt-comments/svelte#RecordCommentsPlayground\\\",\\\"label\\\":\\\"Record discussion preview\\\"}],\\\"runtime\\\":\\\"both\\\",\\\"demoSeed\\\":{\\\"export\\\":\\\"@happyvertical/smrt-comments/svelte#recordCommentsDemo\\\"},\\\"demo\\\":{\\\"mode\\\":\\\"server\\\",\\\"reasons\\\":[\\\"Needs a server because its package depends on @happyvertical/smrt-tenancy, which do not build for a browser (#3624).\\\"]}}],\\\"smrtDependencies\\\":[\\\"@happyvertical/smrt-core\\\",\\\"@happyvertical/smrt-messages\\\",\\\"@happyvertical/smrt-tenancy\\\"],\\\"browser\\\":{\\\"status\\\":\\\"server-only\\\",\\\"issues\\\":[\\\"#3624\\\"],\\\"via\\\":[\\\"@happyvertical/smrt-tenancy\\\"]},\\\"stampsConstructors\\\":true}\"));\n","import { field, SmrtObject, smrt } from '@happyvertical/smrt-core';\nimport { TenantScoped, tenantId } from '@happyvertical/smrt-tenancy';\n\n/** Tenant-local, reusable participation ban; a blank target applies tenant-wide. */\n@TenantScoped({ mode: 'required' })\n@smrt({ tableName: 'participation_bans', api: false, mcp: false, cli: false })\nexport class ParticipationBan extends SmrtObject { static __smrtPackage__ = \"@happyvertical/smrt-comments\";\n @tenantId() tenantId = '';\n @field({ required: true }) actorUserId = '';\n @field() recordType = '';\n @field() recordId = '';\n @field({ required: true }) reason = '';\n @field({ type: 'datetime', nullable: true }) expiresAt: Date | null = null;\n protected override async validateBeforeSave(): Promise<void> {\n for (const identity of [this.tenantId, this.actorUserId, this.recordId]) {\n if (\n /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(\n identity,\n ) &&\n identity !== identity.toLowerCase()\n )\n throw new TypeError(\n 'Participation administrative UUIDs must be lowercase.',\n );\n }\n if (Boolean(this.recordType) !== Boolean(this.recordId))\n throw new TypeError(\n 'Participation target requires both recordType and recordId.',\n );\n await super.validateBeforeSave();\n }\n}\n","import { field, SmrtObject, smrt } from '@happyvertical/smrt-core';\nimport { TenantScoped, tenantId } from '@happyvertical/smrt-tenancy';\n\n/** A generic tenant default or exact-record override for participation actions. */\n@TenantScoped({ mode: 'required' })\n@smrt({\n tableName: 'participation_policies',\n api: false,\n mcp: false,\n cli: false,\n})\nexport class ParticipationPolicy extends SmrtObject { static __smrtPackage__ = \"@happyvertical/smrt-comments\";\n @tenantId() tenantId = '';\n @field() recordType = '';\n @field() recordId = '';\n @field({ required: true }) action = 'comment';\n @field({ required: true }) moderationMode:\n | 'open'\n | 'pre_moderated'\n | 'members_only'\n | 'closed' = 'open';\n @field({ required: true }) maxActions = 0;\n @field({ required: true }) windowSeconds = 0;\n protected override async validateBeforeSave(): Promise<void> {\n for (const identity of [this.tenantId, this.recordId]) {\n if (\n /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(\n identity,\n ) &&\n identity !== identity.toLowerCase()\n )\n throw new TypeError(\n 'Participation administrative UUIDs must be lowercase.',\n );\n }\n if (Boolean(this.recordType) !== Boolean(this.recordId))\n throw new TypeError(\n 'Participation target requires both recordType and recordId.',\n );\n if (\n !['comment', 'react', 'vote', 'report'].includes(this.action) ||\n !['open', 'pre_moderated', 'members_only', 'closed'].includes(\n this.moderationMode,\n ) ||\n !Number.isSafeInteger(this.maxActions) ||\n this.maxActions < 0 ||\n !Number.isSafeInteger(this.windowSeconds) ||\n this.windowSeconds < 0 ||\n (this.maxActions > 0 && this.windowSeconds === 0)\n )\n throw new TypeError('Invalid participation policy.');\n await super.validateBeforeSave();\n }\n}\n","import { field, SmrtObject, smrt } from '@happyvertical/smrt-core';\nimport { TenantScoped, tenantId } from '@happyvertical/smrt-tenancy';\n\n/** Service-owned fixed-window counter. Never delete a currently active bucket. */\n@TenantScoped({ mode: 'required' })\n@smrt({\n tableName: 'participation_rate_buckets',\n api: false,\n mcp: false,\n cli: false,\n indexes: [\n {\n name: 'participation_rate_bucket_unique',\n columns: ['tenantId', 'bucketKey'],\n unique: true,\n },\n ],\n})\nexport class ParticipationRateBucket extends SmrtObject { static __smrtPackage__ = \"@happyvertical/smrt-comments\";\n @tenantId() tenantId = '';\n @field({ required: true }) bucketKey = '';\n @field({ required: true }) actionCount = 0;\n}\n","import { SmrtCollection } from '@happyvertical/smrt-core';\nimport { ParticipationBan } from '../models/ParticipationBan.js';\nimport { ParticipationPolicy } from '../models/ParticipationPolicy.js';\nimport { ParticipationRateBucket } from '../models/ParticipationRateBucket.js';\n\nexport class ParticipationPolicyCollection extends SmrtCollection<ParticipationPolicy> {\n static readonly _itemClass = ParticipationPolicy;\n}\nexport class ParticipationBanCollection extends SmrtCollection<ParticipationBan> {\n static readonly _itemClass = ParticipationBan;\n}\nexport class ParticipationRateBucketCollection extends SmrtCollection<ParticipationRateBucket> {\n static readonly _itemClass = ParticipationRateBucket;\n}\n","/**\n * Neutral participation boundary shared by record discussions and lightweight\n * reactions/votes. This package owns the generic policy/ban schema; hosts bind\n * only identity and entitlement facts through the authorizer.\n */\nexport type ParticipationAction = 'comment' | 'react' | 'vote' | 'report';\n\nexport interface ParticipationTarget {\n tenantId: string;\n recordType: string;\n recordId: string;\n}\n\nexport interface ParticipationRequest extends ParticipationTarget {\n actorUserId: string;\n action: ParticipationAction;\n}\n\nexport interface ParticipationDecision {\n allowed: boolean;\n /** Trusted entitlement fact required by members_only policy. */\n member?: boolean;\n /** Immutable host-provided entitlement/roll evidence retained by the row. */\n snapshot?: Record<string, unknown>;\n /** Comments may enter the moderation queue without exposing host policy. */\n initialCommentStatus?: 'visible' | 'pending';\n reason?: string;\n}\n\n/**\n * The host supplies entitlement facts; the package's policy/ban/rate service\n * combines them with its tenant-scoped generic anti-abuse records.\n */\nexport interface ParticipationAuthorizer {\n authorize(request: ParticipationRequest): Promise<ParticipationDecision>;\n}\n\nexport class ParticipationDeniedError extends Error {\n constructor(readonly reason?: string) {\n super(reason ? `Participation denied: ${reason}` : 'Participation denied.');\n this.name = 'ParticipationDeniedError';\n }\n}\n","import {\n digestRunOnceContent,\n type SmrtClassOptions,\n} from '@happyvertical/smrt-core';\nimport { withTenant } from '@happyvertical/smrt-tenancy';\nimport {\n ParticipationBanCollection,\n ParticipationPolicyCollection,\n ParticipationRateBucketCollection,\n} from '../collections/ParticipationCollection.js';\nimport type { ParticipationPolicy } from '../models/ParticipationPolicy.js';\nimport {\n type ParticipationAuthorizer,\n type ParticipationDecision,\n ParticipationDeniedError,\n type ParticipationRequest,\n} from '../participation-contract.js';\n\ntype Database = ParticipationRateBucketCollection['db'];\nconst canonical = (value: string) =>\n /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i.test(value)\n ? value.toLowerCase()\n : value;\n\n/** Shared generic policy, ban, and transactional quota enforcement. */\nexport class ParticipationService {\n constructor(\n private readonly options: {\n db: SmrtClassOptions['db'];\n entitlement?: ParticipationAuthorizer;\n /** Trusted clock for deterministic fixed-window boundaries. */\n now?: () => Date;\n },\n ) {}\n\n private normalize(request: ParticipationRequest): ParticipationRequest {\n if (\n !request ||\n !['comment', 'react', 'vote', 'report'].includes(request.action) ||\n [\n request.tenantId,\n request.actorUserId,\n request.recordType,\n request.recordId,\n ].some((value) => typeof value !== 'string' || !value.trim())\n ) {\n throw new TypeError('Invalid participation request.');\n }\n return {\n ...request,\n tenantId: canonical(request.tenantId),\n actorUserId: canonical(request.actorUserId),\n recordId: canonical(request.recordId),\n };\n }\n\n private async evaluate(\n request: ParticipationRequest,\n db: SmrtClassOptions['db'],\n ) {\n const now = (this.options.now?.() ?? new Date()).getTime();\n if (!Number.isFinite(now))\n throw new TypeError('Invalid participation clock.');\n const policies = await ParticipationPolicyCollection.create({ db });\n const rows = await policies.list({\n where: { tenantId: request.tenantId, action: request.action },\n });\n const exact = rows.filter(\n (p) =>\n p.recordType === request.recordType && p.recordId === request.recordId,\n );\n const defaults = rows.filter(\n (p) => p.recordType === '' && p.recordId === '',\n );\n if (exact.length > 1 || defaults.length > 1)\n throw new ParticipationDeniedError('Ambiguous participation policy.');\n const policy = exact[0] ?? defaults[0];\n if (\n policy &&\n (!['open', 'pre_moderated', 'members_only', 'closed'].includes(\n policy.moderationMode,\n ) ||\n !Number.isSafeInteger(policy.maxActions) ||\n policy.maxActions < 0 ||\n !Number.isSafeInteger(policy.windowSeconds) ||\n policy.windowSeconds < 0 ||\n (policy.maxActions > 0 && policy.windowSeconds < 1))\n ) {\n throw new ParticipationDeniedError('Invalid participation policy.');\n }\n if (policy?.moderationMode === 'closed')\n throw new ParticipationDeniedError('Participation is closed.');\n const bans = await ParticipationBanCollection.create({ db });\n for (const ban of await bans.list({\n where: { tenantId: request.tenantId, actorUserId: request.actorUserId },\n })) {\n if (\n (ban.recordType === '' && ban.recordId === '') ||\n (ban.recordType === request.recordType &&\n ban.recordId === request.recordId)\n ) {\n const expiry =\n ban.expiresAt === null ? null : new Date(ban.expiresAt).getTime();\n if (expiry === null || !Number.isFinite(expiry) || expiry > now)\n throw new ParticipationDeniedError('Actor is banned.');\n }\n }\n const decision = this.options.entitlement\n ? await this.options.entitlement.authorize(request)\n : { allowed: true };\n if (\n decision?.allowed !== true ||\n (policy?.moderationMode === 'members_only' && decision.member !== true)\n ) {\n throw new ParticipationDeniedError(\n decision?.reason ?? 'Membership required.',\n );\n }\n if (\n decision.initialCommentStatus !== undefined &&\n !['visible', 'pending'].includes(decision.initialCommentStatus)\n )\n throw new ParticipationDeniedError('Invalid moderation decision.');\n return {\n policy,\n now,\n decision: {\n ...decision,\n initialCommentStatus:\n policy?.moderationMode === 'pre_moderated'\n ? ('pending' as const)\n : decision.initialCommentStatus,\n },\n };\n }\n\n /** Checks current permission without consuming quota (including keyed replays). */\n async authorize(input: ParticipationRequest): Promise<ParticipationDecision> {\n const request = this.normalize(input);\n return withTenant(\n { tenantId: request.tenantId },\n async () => (await this.evaluate(request, this.options.db)).decision,\n );\n }\n\n private async reserve(\n db: Database,\n request: ParticipationRequest,\n policy: ParticipationPolicy | undefined,\n now: number,\n ) {\n if (!policy?.maxActions) return;\n const buckets = await ParticipationRateBucketCollection.create({ db });\n const bucketKey = digestRunOnceContent({\n actor: request.actorUserId,\n action: request.action,\n recordType: policy.recordType,\n recordId: policy.recordId,\n windowSeconds: policy.windowSeconds,\n window: Math.floor(now / (policy.windowSeconds * 1000)),\n });\n const table = `\"${buckets.tableName.replace(/\"/g, '\"\"')}\"`;\n const id = crypto.randomUUID();\n // One bounded atomic upsert arbitrates all service instances and processes.\n // The supplied transaction also owns the guarded mutation; failures release quota.\n const result = await db.query(\n `INSERT INTO ${table} (id, slug, context, tenant_id, bucket_key, action_count) VALUES (?, ?, '', ?, ?, 1) ON CONFLICT (tenant_id, bucket_key) DO UPDATE SET action_count = ${table}.action_count + 1 WHERE ${table}.action_count < ? RETURNING action_count`,\n id,\n id,\n request.tenantId,\n bucketKey,\n policy.maxActions,\n );\n if (result.rows.length !== 1)\n throw new ParticipationDeniedError('Rate limit exceeded.');\n }\n\n /** Run one new mutation atomically with its reservation. Caller owns retry identity. */\n async execute<T>(\n input: ParticipationRequest,\n work: (db: Database, decision: ParticipationDecision) => Promise<T>,\n ): Promise<T> {\n const request = this.normalize(input);\n return withTenant({ tenantId: request.tenantId }, async () => {\n const collection = await ParticipationRateBucketCollection.create({\n db: this.options.db,\n });\n if (!collection.db.transaction)\n throw new Error('Participation requires transactions.');\n return collection.db.transaction((tx) =>\n this.executeInTransaction(tx, request, work),\n );\n });\n }\n\n /** Compose with an existing caller-owned transaction; propagate failures to roll it back. */\n async executeInTransaction<T>(\n tx: Database,\n input: ParticipationRequest,\n work: (db: Database, decision: ParticipationDecision) => Promise<T>,\n ): Promise<T> {\n const request = this.normalize(input);\n return withTenant({ tenantId: request.tenantId }, async () => {\n const { policy, now, decision } = await this.evaluate(request, tx);\n await this.reserve(tx, request, policy, now);\n return work(tx, decision);\n });\n }\n}\n"],"mappings":"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"}
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as ParticipationRateBucketCollection, c as ParticipationBan, i as ParticipationPolicyCollection, n as ParticipationDeniedError, o as ParticipationRateBucket, r as ParticipationBanCollection, s as ParticipationPolicy, t as ParticipationService } from "./chunks/participation-BLfy61X0.js";
1
+ import { a as ParticipationRateBucketCollection, c as ParticipationBan, i as ParticipationPolicyCollection, n as ParticipationDeniedError, o as ParticipationRateBucket, r as ParticipationBanCollection, s as ParticipationPolicy, t as ParticipationService } from "./chunks/participation-rg06tjqx.js";
2
2
  import { SmrtCollection, SmrtObject, SmrtPolymorphicAssociation, SmrtRecipe, crossPackageRef, digestRunOnceContent, field, foreignKey, runOnce, smrt } from "@happyvertical/smrt-core";
3
3
  import { TenantIsolationError, TenantScoped, getCurrentTenant, tenantId, withTenant } from "@happyvertical/smrt-tenancy";
4
4
  //#region src/models/Comment.ts
@@ -2,7 +2,7 @@
2
2
  "version": "1.0.0",
3
3
  "timestamp": 0,
4
4
  "packageName": "@happyvertical/smrt-comments",
5
- "packageVersion": "0.57.35",
5
+ "packageVersion": "0.57.37",
6
6
  "objects": {
7
7
  "@happyvertical/smrt-comments:CommentCollection": {
8
8
  "name": "commentcollection",
@@ -1,2 +1,2 @@
1
- import { n as ParticipationDeniedError, t as ParticipationService } from "./chunks/participation-BLfy61X0.js";
1
+ import { n as ParticipationDeniedError, t as ParticipationService } from "./chunks/participation-rg06tjqx.js";
2
2
  export { ParticipationDeniedError, ParticipationService };
@@ -3,12 +3,12 @@
3
3
  "sensitiveFieldsExcluded": true,
4
4
  "generatedAt": "1970-01-01T00:00:00.000Z",
5
5
  "packageName": "@happyvertical/smrt-comments",
6
- "packageVersion": "0.57.35",
6
+ "packageVersion": "0.57.37",
7
7
  "sourceManifestPath": "dist/manifest.json",
8
8
  "agentDocPath": "AGENTS.md",
9
9
  "sourceHashes": {
10
- "manifest": "721b301a2e085cc650a05c01e84c86ac18a5468d3fd9b68c77bfc64816a67a5a",
11
- "packageJson": "ca134aed307ea57e5f22ea3aa3b8179627cbc72b071db00bfd108980b9bdc669",
10
+ "manifest": "4768300aab6968471046e9429d9926926647496ea80de8635334deff81de0cef",
11
+ "packageJson": "72224f5406b67d003ba5dfcaed631b1ef98d50f394ca90c5a37c9a17e710bda0",
12
12
  "agents": "2fba6876673cef06bc76868cfd0afca51508c6b8b4aa20c1bd09fce67e5574fd",
13
13
  "moduleDoc:agents/test-design.md": "c30a6d4694f838b8f61b3762559cf9434588132d6df681a0da63087297c985d3",
14
14
  "moduleDoc:agents/idempotent-create.md": "51e9512a7891ac7296e121167f9eed61842ee444e121d8896fb04a47315662c7"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@happyvertical/smrt-comments",
3
- "version": "0.57.35",
3
+ "version": "0.57.37",
4
4
  "description": "Record comments and mention hooks for SMRT applications",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -28,8 +28,8 @@
28
28
  "./manifest.json": "./dist/manifest.json"
29
29
  },
30
30
  "dependencies": {
31
- "@happyvertical/smrt-core": "0.57.35",
32
- "@happyvertical/smrt-tenancy": "0.57.35"
31
+ "@happyvertical/smrt-core": "0.57.37",
32
+ "@happyvertical/smrt-tenancy": "0.57.37"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "svelte": "^5.57.0"
@@ -47,7 +47,7 @@
47
47
  "directory": "packages/comments"
48
48
  },
49
49
  "devDependencies": {
50
- "@happyvertical/smrt-vitest": "0.57.35",
50
+ "@happyvertical/smrt-vitest": "0.57.37",
51
51
  "@sveltejs/package": "^2.5.8",
52
52
  "@sveltejs/vite-plugin-svelte": "^7.3.0",
53
53
  "@testing-library/svelte": "^5.4.2",
@@ -57,7 +57,7 @@
57
57
  "typescript": "6.0.3",
58
58
  "vite": "8.1.6",
59
59
  "vitest": "4.1.10",
60
- "@happyvertical/smrt-messages": "0.57.35"
60
+ "@happyvertical/smrt-messages": "0.57.37"
61
61
  },
62
62
  "scripts": {
63
63
  "build": "vite build --mode library && svelte-package -i src/svelte -o dist/svelte --tsconfig tsconfig.svelte.json && node ../../scripts/prune-svelte-package-artifacts.js dist",