@happyvertical/smrt-comments 0.60.9 → 0.60.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/participation-CLI-gl0-.js +276 -0
- package/dist/chunks/participation-CLI-gl0-.js.map +1 -0
- package/dist/index.js +1 -1
- package/dist/manifest.json +97 -25
- package/dist/participation.js +1 -1
- package/dist/smrt-knowledge.json +3 -3
- package/dist/smrt-knowledge.okf.md +70 -0
- package/package.json +5 -5
- package/dist/chunks/participation-BOKtvJ26.js +0 -276
- package/dist/chunks/participation-BOKtvJ26.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"participation-CLI-gl0-.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.60.11\\\",\\\"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\\\",\\\"collectionOf\\\":\\\"@happyvertical/smrt-comments:Comment\\\",\\\"inheritedExposure\\\":[\\\"api\\\",\\\"mcp\\\",\\\"cli\\\"],\\\"schema\\\":{\\\"tableName\\\":\\\"record_comments\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"record_comments\\\\\\\" (\\\\n \\\\\\\"_sync_origin_device_id\\\\\\\" TEXT,\\\\n \\\\\\\"_sync_revision\\\\\\\" INTEGER,\\\\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\\\":{\\\"_sync_origin_device_id\\\":{\\\"type\\\":\\\"TEXT\\\"},\\\"_sync_revision\\\":{\\\"type\\\":\\\"INTEGER\\\"},\\\"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\\\":\\\"b3737a6a\\\"},\\\"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\\\",\\\"collectionOf\\\":\\\"@happyvertical/smrt-comments:CommentReport\\\",\\\"inheritedExposure\\\":[\\\"api\\\",\\\"mcp\\\",\\\"cli\\\"],\\\"schema\\\":{\\\"tableName\\\":\\\"comment_reports\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"comment_reports\\\\\\\" (\\\\n \\\\\\\"_sync_origin_device_id\\\\\\\" TEXT,\\\\n \\\\\\\"_sync_revision\\\\\\\" INTEGER,\\\\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\\\":{\\\"_sync_origin_device_id\\\":{\\\"type\\\":\\\"TEXT\\\"},\\\"_sync_revision\\\":{\\\"type\\\":\\\"INTEGER\\\"},\\\"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\\\":\\\"ccf437e5\\\"},\\\"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\\\",\\\"collectionOf\\\":\\\"@happyvertical/smrt-comments:CommentRevision\\\",\\\"inheritedExposure\\\":[\\\"api\\\",\\\"mcp\\\",\\\"cli\\\"],\\\"schema\\\":{\\\"tableName\\\":\\\"comment_revisions\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"comment_revisions\\\\\\\" (\\\\n \\\\\\\"_sync_origin_device_id\\\\\\\" TEXT,\\\\n \\\\\\\"_sync_revision\\\\\\\" INTEGER,\\\\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\\\":{\\\"_sync_origin_device_id\\\":{\\\"type\\\":\\\"TEXT\\\"},\\\"_sync_revision\\\":{\\\"type\\\":\\\"INTEGER\\\"},\\\"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\\\":\\\"4004817b\\\"},\\\"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\\\",\\\"collectionOf\\\":\\\"@happyvertical/smrt-comments:ParticipationPolicy\\\",\\\"inheritedExposure\\\":[\\\"api\\\",\\\"mcp\\\",\\\"cli\\\"],\\\"schema\\\":{\\\"tableName\\\":\\\"participation_policies\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"participation_policies\\\\\\\" (\\\\n \\\\\\\"_sync_origin_device_id\\\\\\\" TEXT,\\\\n \\\\\\\"_sync_revision\\\\\\\" INTEGER,\\\\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\\\":{\\\"_sync_origin_device_id\\\":{\\\"type\\\":\\\"TEXT\\\"},\\\"_sync_revision\\\":{\\\"type\\\":\\\"INTEGER\\\"},\\\"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\\\":\\\"0aa39678\\\"},\\\"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\\\",\\\"collectionOf\\\":\\\"@happyvertical/smrt-comments:ParticipationBan\\\",\\\"inheritedExposure\\\":[\\\"api\\\",\\\"mcp\\\",\\\"cli\\\"],\\\"schema\\\":{\\\"tableName\\\":\\\"participation_bans\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"participation_bans\\\\\\\" (\\\\n \\\\\\\"_sync_origin_device_id\\\\\\\" TEXT,\\\\n \\\\\\\"_sync_revision\\\\\\\" INTEGER,\\\\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\\\":{\\\"_sync_origin_device_id\\\":{\\\"type\\\":\\\"TEXT\\\"},\\\"_sync_revision\\\":{\\\"type\\\":\\\"INTEGER\\\"},\\\"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\\\":\\\"39a82352\\\"},\\\"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\\\",\\\"collectionOf\\\":\\\"@happyvertical/smrt-comments:ParticipationRateBucket\\\",\\\"inheritedExposure\\\":[\\\"api\\\",\\\"mcp\\\",\\\"cli\\\"],\\\"schema\\\":{\\\"tableName\\\":\\\"participation_rate_buckets\\\",\\\"ddl\\\":\\\"CREATE TABLE IF NOT EXISTS \\\\\\\"participation_rate_buckets\\\\\\\" (\\\\n \\\\\\\"_sync_origin_device_id\\\\\\\" TEXT,\\\\n \\\\\\\"_sync_revision\\\\\\\" INTEGER,\\\\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\\\":{\\\"_sync_origin_device_id\\\":{\\\"type\\\":\\\"TEXT\\\"},\\\"_sync_revision\\\":{\\\"type\\\":\\\"INTEGER\\\"},\\\"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\\\":\\\"73800b88\\\"},\\\"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 \\\\\\\"_sync_origin_device_id\\\\\\\" TEXT,\\\\n \\\\\\\"_sync_revision\\\\\\\" INTEGER,\\\\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\\\":{\\\"_sync_origin_device_id\\\":{\\\"type\\\":\\\"TEXT\\\"},\\\"_sync_revision\\\":{\\\"type\\\":\\\"INTEGER\\\"},\\\"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\\\":\\\"b3737a6a\\\"},\\\"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 \\\\\\\"_sync_origin_device_id\\\\\\\" TEXT,\\\\n \\\\\\\"_sync_revision\\\\\\\" INTEGER,\\\\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\\\":{\\\"_sync_origin_device_id\\\":{\\\"type\\\":\\\"TEXT\\\"},\\\"_sync_revision\\\":{\\\"type\\\":\\\"INTEGER\\\"},\\\"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\\\":\\\"ccf437e5\\\"},\\\"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 \\\\\\\"_sync_origin_device_id\\\\\\\" TEXT,\\\\n \\\\\\\"_sync_revision\\\\\\\" INTEGER,\\\\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\\\":{\\\"_sync_origin_device_id\\\":{\\\"type\\\":\\\"TEXT\\\"},\\\"_sync_revision\\\":{\\\"type\\\":\\\"INTEGER\\\"},\\\"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\\\":\\\"4004817b\\\"},\\\"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 \\\\\\\"_sync_origin_device_id\\\\\\\" TEXT,\\\\n \\\\\\\"_sync_revision\\\\\\\" INTEGER,\\\\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\\\":{\\\"_sync_origin_device_id\\\":{\\\"type\\\":\\\"TEXT\\\"},\\\"_sync_revision\\\":{\\\"type\\\":\\\"INTEGER\\\"},\\\"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\\\":\\\"39a82352\\\"},\\\"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 \\\\\\\"_sync_origin_device_id\\\\\\\" TEXT,\\\\n \\\\\\\"_sync_revision\\\\\\\" INTEGER,\\\\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\\\":{\\\"_sync_origin_device_id\\\":{\\\"type\\\":\\\"TEXT\\\"},\\\"_sync_revision\\\":{\\\"type\\\":\\\"INTEGER\\\"},\\\"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\\\":\\\"0aa39678\\\"},\\\"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 \\\\\\\"_sync_origin_device_id\\\\\\\" TEXT,\\\\n \\\\\\\"_sync_revision\\\\\\\" INTEGER,\\\\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\\\":{\\\"_sync_origin_device_id\\\":{\\\"type\\\":\\\"TEXT\\\"},\\\"_sync_revision\\\":{\\\"type\\\":\\\"INTEGER\\\"},\\\"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\\\":\\\"73800b88\\\"},\\\"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-
|
|
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-CLI-gl0-.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
|
package/dist/manifest.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"version": "1.0.0",
|
|
3
3
|
"timestamp": 0,
|
|
4
4
|
"packageName": "@happyvertical/smrt-comments",
|
|
5
|
-
"packageVersion": "0.60.
|
|
5
|
+
"packageVersion": "0.60.11",
|
|
6
6
|
"objects": {
|
|
7
7
|
"@happyvertical/smrt-comments:CommentCollection": {
|
|
8
8
|
"name": "commentcollection",
|
|
@@ -51,8 +51,14 @@
|
|
|
51
51
|
],
|
|
52
52
|
"schema": {
|
|
53
53
|
"tableName": "record_comments",
|
|
54
|
-
"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);",
|
|
54
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"record_comments\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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);",
|
|
55
55
|
"columns": {
|
|
56
|
+
"_sync_origin_device_id": {
|
|
57
|
+
"type": "TEXT"
|
|
58
|
+
},
|
|
59
|
+
"_sync_revision": {
|
|
60
|
+
"type": "INTEGER"
|
|
61
|
+
},
|
|
56
62
|
"id": {
|
|
57
63
|
"type": "UUID",
|
|
58
64
|
"primaryKey": true,
|
|
@@ -229,7 +235,7 @@
|
|
|
229
235
|
]
|
|
230
236
|
}
|
|
231
237
|
],
|
|
232
|
-
"version": "
|
|
238
|
+
"version": "b3737a6a"
|
|
233
239
|
},
|
|
234
240
|
"importPath": "@happyvertical/smrt-comments"
|
|
235
241
|
},
|
|
@@ -260,8 +266,14 @@
|
|
|
260
266
|
],
|
|
261
267
|
"schema": {
|
|
262
268
|
"tableName": "comment_reports",
|
|
263
|
-
"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);",
|
|
269
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"comment_reports\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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);",
|
|
264
270
|
"columns": {
|
|
271
|
+
"_sync_origin_device_id": {
|
|
272
|
+
"type": "TEXT"
|
|
273
|
+
},
|
|
274
|
+
"_sync_revision": {
|
|
275
|
+
"type": "INTEGER"
|
|
276
|
+
},
|
|
265
277
|
"id": {
|
|
266
278
|
"type": "UUID",
|
|
267
279
|
"primaryKey": true,
|
|
@@ -364,7 +376,7 @@
|
|
|
364
376
|
]
|
|
365
377
|
}
|
|
366
378
|
],
|
|
367
|
-
"version": "
|
|
379
|
+
"version": "ccf437e5"
|
|
368
380
|
},
|
|
369
381
|
"importPath": "@happyvertical/smrt-comments"
|
|
370
382
|
},
|
|
@@ -395,8 +407,14 @@
|
|
|
395
407
|
],
|
|
396
408
|
"schema": {
|
|
397
409
|
"tableName": "comment_revisions",
|
|
398
|
-
"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);",
|
|
410
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"comment_revisions\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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);",
|
|
399
411
|
"columns": {
|
|
412
|
+
"_sync_origin_device_id": {
|
|
413
|
+
"type": "TEXT"
|
|
414
|
+
},
|
|
415
|
+
"_sync_revision": {
|
|
416
|
+
"type": "INTEGER"
|
|
417
|
+
},
|
|
400
418
|
"id": {
|
|
401
419
|
"type": "UUID",
|
|
402
420
|
"primaryKey": true,
|
|
@@ -476,7 +494,7 @@
|
|
|
476
494
|
]
|
|
477
495
|
}
|
|
478
496
|
],
|
|
479
|
-
"version": "
|
|
497
|
+
"version": "4004817b"
|
|
480
498
|
},
|
|
481
499
|
"importPath": "@happyvertical/smrt-comments"
|
|
482
500
|
},
|
|
@@ -507,8 +525,14 @@
|
|
|
507
525
|
],
|
|
508
526
|
"schema": {
|
|
509
527
|
"tableName": "participation_policies",
|
|
510
|
-
"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);",
|
|
528
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"participation_policies\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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);",
|
|
511
529
|
"columns": {
|
|
530
|
+
"_sync_origin_device_id": {
|
|
531
|
+
"type": "TEXT"
|
|
532
|
+
},
|
|
533
|
+
"_sync_revision": {
|
|
534
|
+
"type": "INTEGER"
|
|
535
|
+
},
|
|
512
536
|
"id": {
|
|
513
537
|
"type": "UUID",
|
|
514
538
|
"primaryKey": true,
|
|
@@ -592,7 +616,7 @@
|
|
|
592
616
|
]
|
|
593
617
|
}
|
|
594
618
|
],
|
|
595
|
-
"version": "
|
|
619
|
+
"version": "0aa39678"
|
|
596
620
|
},
|
|
597
621
|
"importPath": "@happyvertical/smrt-comments"
|
|
598
622
|
},
|
|
@@ -623,8 +647,14 @@
|
|
|
623
647
|
],
|
|
624
648
|
"schema": {
|
|
625
649
|
"tableName": "participation_bans",
|
|
626
|
-
"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);",
|
|
650
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"participation_bans\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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);",
|
|
627
651
|
"columns": {
|
|
652
|
+
"_sync_origin_device_id": {
|
|
653
|
+
"type": "TEXT"
|
|
654
|
+
},
|
|
655
|
+
"_sync_revision": {
|
|
656
|
+
"type": "INTEGER"
|
|
657
|
+
},
|
|
628
658
|
"id": {
|
|
629
659
|
"type": "UUID",
|
|
630
660
|
"primaryKey": true,
|
|
@@ -700,7 +730,7 @@
|
|
|
700
730
|
]
|
|
701
731
|
}
|
|
702
732
|
],
|
|
703
|
-
"version": "
|
|
733
|
+
"version": "39a82352"
|
|
704
734
|
},
|
|
705
735
|
"importPath": "@happyvertical/smrt-comments"
|
|
706
736
|
},
|
|
@@ -731,8 +761,14 @@
|
|
|
731
761
|
],
|
|
732
762
|
"schema": {
|
|
733
763
|
"tableName": "participation_rate_buckets",
|
|
734
|
-
"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);",
|
|
764
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"participation_rate_buckets\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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);",
|
|
735
765
|
"columns": {
|
|
766
|
+
"_sync_origin_device_id": {
|
|
767
|
+
"type": "TEXT"
|
|
768
|
+
},
|
|
769
|
+
"_sync_revision": {
|
|
770
|
+
"type": "INTEGER"
|
|
771
|
+
},
|
|
736
772
|
"id": {
|
|
737
773
|
"type": "UUID",
|
|
738
774
|
"primaryKey": true,
|
|
@@ -802,7 +838,7 @@
|
|
|
802
838
|
]
|
|
803
839
|
}
|
|
804
840
|
],
|
|
805
|
-
"version": "
|
|
841
|
+
"version": "73800b88"
|
|
806
842
|
},
|
|
807
843
|
"importPath": "@happyvertical/smrt-comments"
|
|
808
844
|
},
|
|
@@ -1038,8 +1074,14 @@
|
|
|
1038
1074
|
],
|
|
1039
1075
|
"schema": {
|
|
1040
1076
|
"tableName": "record_comments",
|
|
1041
|
-
"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);",
|
|
1077
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"record_comments\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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);",
|
|
1042
1078
|
"columns": {
|
|
1079
|
+
"_sync_origin_device_id": {
|
|
1080
|
+
"type": "TEXT"
|
|
1081
|
+
},
|
|
1082
|
+
"_sync_revision": {
|
|
1083
|
+
"type": "INTEGER"
|
|
1084
|
+
},
|
|
1043
1085
|
"id": {
|
|
1044
1086
|
"type": "UUID",
|
|
1045
1087
|
"primaryKey": true,
|
|
@@ -1216,7 +1258,7 @@
|
|
|
1216
1258
|
]
|
|
1217
1259
|
}
|
|
1218
1260
|
],
|
|
1219
|
-
"version": "
|
|
1261
|
+
"version": "b3737a6a"
|
|
1220
1262
|
},
|
|
1221
1263
|
"importPath": "@happyvertical/smrt-comments"
|
|
1222
1264
|
},
|
|
@@ -1342,8 +1384,14 @@
|
|
|
1342
1384
|
],
|
|
1343
1385
|
"schema": {
|
|
1344
1386
|
"tableName": "comment_reports",
|
|
1345
|
-
"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);",
|
|
1387
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"comment_reports\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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);",
|
|
1346
1388
|
"columns": {
|
|
1389
|
+
"_sync_origin_device_id": {
|
|
1390
|
+
"type": "TEXT"
|
|
1391
|
+
},
|
|
1392
|
+
"_sync_revision": {
|
|
1393
|
+
"type": "INTEGER"
|
|
1394
|
+
},
|
|
1347
1395
|
"id": {
|
|
1348
1396
|
"type": "UUID",
|
|
1349
1397
|
"primaryKey": true,
|
|
@@ -1446,7 +1494,7 @@
|
|
|
1446
1494
|
]
|
|
1447
1495
|
}
|
|
1448
1496
|
],
|
|
1449
|
-
"version": "
|
|
1497
|
+
"version": "ccf437e5"
|
|
1450
1498
|
},
|
|
1451
1499
|
"importPath": "@happyvertical/smrt-comments"
|
|
1452
1500
|
},
|
|
@@ -1535,8 +1583,14 @@
|
|
|
1535
1583
|
],
|
|
1536
1584
|
"schema": {
|
|
1537
1585
|
"tableName": "comment_revisions",
|
|
1538
|
-
"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);",
|
|
1586
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"comment_revisions\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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);",
|
|
1539
1587
|
"columns": {
|
|
1588
|
+
"_sync_origin_device_id": {
|
|
1589
|
+
"type": "TEXT"
|
|
1590
|
+
},
|
|
1591
|
+
"_sync_revision": {
|
|
1592
|
+
"type": "INTEGER"
|
|
1593
|
+
},
|
|
1540
1594
|
"id": {
|
|
1541
1595
|
"type": "UUID",
|
|
1542
1596
|
"primaryKey": true,
|
|
@@ -1616,7 +1670,7 @@
|
|
|
1616
1670
|
]
|
|
1617
1671
|
}
|
|
1618
1672
|
],
|
|
1619
|
-
"version": "
|
|
1673
|
+
"version": "4004817b"
|
|
1620
1674
|
},
|
|
1621
1675
|
"importPath": "@happyvertical/smrt-comments"
|
|
1622
1676
|
},
|
|
@@ -1708,8 +1762,14 @@
|
|
|
1708
1762
|
],
|
|
1709
1763
|
"schema": {
|
|
1710
1764
|
"tableName": "participation_bans",
|
|
1711
|
-
"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);",
|
|
1765
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"participation_bans\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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);",
|
|
1712
1766
|
"columns": {
|
|
1767
|
+
"_sync_origin_device_id": {
|
|
1768
|
+
"type": "TEXT"
|
|
1769
|
+
},
|
|
1770
|
+
"_sync_revision": {
|
|
1771
|
+
"type": "INTEGER"
|
|
1772
|
+
},
|
|
1713
1773
|
"id": {
|
|
1714
1774
|
"type": "UUID",
|
|
1715
1775
|
"primaryKey": true,
|
|
@@ -1785,7 +1845,7 @@
|
|
|
1785
1845
|
]
|
|
1786
1846
|
}
|
|
1787
1847
|
],
|
|
1788
|
-
"version": "
|
|
1848
|
+
"version": "39a82352"
|
|
1789
1849
|
},
|
|
1790
1850
|
"importPath": "@happyvertical/smrt-comments"
|
|
1791
1851
|
},
|
|
@@ -1903,8 +1963,14 @@
|
|
|
1903
1963
|
],
|
|
1904
1964
|
"schema": {
|
|
1905
1965
|
"tableName": "participation_policies",
|
|
1906
|
-
"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);",
|
|
1966
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"participation_policies\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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);",
|
|
1907
1967
|
"columns": {
|
|
1968
|
+
"_sync_origin_device_id": {
|
|
1969
|
+
"type": "TEXT"
|
|
1970
|
+
},
|
|
1971
|
+
"_sync_revision": {
|
|
1972
|
+
"type": "INTEGER"
|
|
1973
|
+
},
|
|
1908
1974
|
"id": {
|
|
1909
1975
|
"type": "UUID",
|
|
1910
1976
|
"primaryKey": true,
|
|
@@ -1988,7 +2054,7 @@
|
|
|
1988
2054
|
]
|
|
1989
2055
|
}
|
|
1990
2056
|
],
|
|
1991
|
-
"version": "
|
|
2057
|
+
"version": "0aa39678"
|
|
1992
2058
|
},
|
|
1993
2059
|
"importPath": "@happyvertical/smrt-comments"
|
|
1994
2060
|
},
|
|
@@ -2076,8 +2142,14 @@
|
|
|
2076
2142
|
],
|
|
2077
2143
|
"schema": {
|
|
2078
2144
|
"tableName": "participation_rate_buckets",
|
|
2079
|
-
"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);",
|
|
2145
|
+
"ddl": "CREATE TABLE IF NOT EXISTS \"participation_rate_buckets\" (\n \"_sync_origin_device_id\" TEXT,\n \"_sync_revision\" INTEGER,\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);",
|
|
2080
2146
|
"columns": {
|
|
2147
|
+
"_sync_origin_device_id": {
|
|
2148
|
+
"type": "TEXT"
|
|
2149
|
+
},
|
|
2150
|
+
"_sync_revision": {
|
|
2151
|
+
"type": "INTEGER"
|
|
2152
|
+
},
|
|
2081
2153
|
"id": {
|
|
2082
2154
|
"type": "UUID",
|
|
2083
2155
|
"primaryKey": true,
|
|
@@ -2147,7 +2219,7 @@
|
|
|
2147
2219
|
]
|
|
2148
2220
|
}
|
|
2149
2221
|
],
|
|
2150
|
-
"version": "
|
|
2222
|
+
"version": "73800b88"
|
|
2151
2223
|
},
|
|
2152
2224
|
"importPath": "@happyvertical/smrt-comments"
|
|
2153
2225
|
}
|
package/dist/participation.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as ParticipationDeniedError, t as ParticipationService } from "./chunks/participation-
|
|
1
|
+
import { n as ParticipationDeniedError, t as ParticipationService } from "./chunks/participation-CLI-gl0-.js";
|
|
2
2
|
export { ParticipationDeniedError, ParticipationService };
|
package/dist/smrt-knowledge.json
CHANGED
|
@@ -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.60.
|
|
6
|
+
"packageVersion": "0.60.11",
|
|
7
7
|
"sourceManifestPath": "dist/manifest.json",
|
|
8
8
|
"agentDocPath": "AGENTS.md",
|
|
9
9
|
"sourceHashes": {
|
|
10
|
-
"manifest": "
|
|
11
|
-
"packageJson": "
|
|
10
|
+
"manifest": "f943944aec2bf36d8d72dfab10016b86704b4b4f06dd352e5a1230bf81850311",
|
|
11
|
+
"packageJson": "4f9df9d518f70f1efa4136ce9830326a35d135d2166e423ea1fb43b71f1b191d",
|
|
12
12
|
"agents": "2fba6876673cef06bc76868cfd0afca51508c6b8b4aa20c1bd09fce67e5574fd",
|
|
13
13
|
"moduleDoc:agents/test-design.md": "c30a6d4694f838b8f61b3762559cf9434588132d6df681a0da63087297c985d3",
|
|
14
14
|
"moduleDoc:agents/idempotent-create.md": "51e9512a7891ac7296e121167f9eed61842ee444e121d8896fb04a47315662c7"
|