@happyvertical/smrt-content 0.57.35 → 0.57.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +1 -0
- package/dist/chunks/{content-corrections-BYT3Qdw5.js → content-corrections-QyinPkfN.js} +10 -3
- package/dist/chunks/content-corrections-QyinPkfN.js.map +1 -0
- package/dist/chunks/{content-query-jQhfFnhO.js → content-query-DxZAmAPW.js} +36 -37
- package/dist/chunks/content-query-DxZAmAPW.js.map +1 -0
- package/dist/chunks/{content-reviews-B6h2aJ9m.js → content-reviews-H9ANWEi7.js} +9 -3
- package/dist/chunks/content-reviews-H9ANWEi7.js.map +1 -0
- package/dist/chunks/{content-versions-BKAWUCzE.js → content-versions-D0VjHrvd.js} +10 -4
- package/dist/chunks/content-versions-D0VjHrvd.js.map +1 -0
- package/dist/chunks/{contents-DYBgt7rZ.js → contents-C9eZRig7.js} +2 -2
- package/dist/chunks/{contents-DYBgt7rZ.js.map → contents-C9eZRig7.js.map} +1 -1
- package/dist/content-contribution.d.ts.map +1 -1
- package/dist/content-contributor.d.ts.map +1 -1
- package/dist/content-correction.d.ts.map +1 -1
- package/dist/content-query.d.ts.map +1 -1
- package/dist/content-review.d.ts.map +1 -1
- package/dist/content-version.d.ts.map +1 -1
- package/dist/content.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +315 -11
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +795 -59
- package/dist/recipes.d.ts +423 -0
- package/dist/recipes.d.ts.map +1 -0
- package/dist/server.js +1 -1
- package/dist/smrt-knowledge.json +613 -79
- package/package.json +24 -24
- package/dist/chunks/content-corrections-BYT3Qdw5.js.map +0 -1
- package/dist/chunks/content-query-jQhfFnhO.js.map +0 -1
- package/dist/chunks/content-reviews-B6h2aJ9m.js.map +0 -1
- package/dist/chunks/content-versions-BKAWUCzE.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@happyvertical/smrt-content",
|
|
3
|
-
"version": "0.57.
|
|
3
|
+
"version": "0.57.37",
|
|
4
4
|
"smrtJsdoc": "strict",
|
|
5
5
|
"description": "Content processing module for SMRT framework - handles documents, web content, and media",
|
|
6
6
|
"type": "module",
|
|
@@ -48,29 +48,29 @@
|
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@happyvertical/ai": "^0.
|
|
52
|
-
"@happyvertical/documents": "^0.
|
|
53
|
-
"@happyvertical/files": "^0.
|
|
54
|
-
"@happyvertical/geo": "^0.
|
|
55
|
-
"@happyvertical/images": "^0.
|
|
56
|
-
"@happyvertical/logger": "^0.
|
|
51
|
+
"@happyvertical/ai": "^0.110.0",
|
|
52
|
+
"@happyvertical/documents": "^0.110.0",
|
|
53
|
+
"@happyvertical/files": "^0.110.0",
|
|
54
|
+
"@happyvertical/geo": "^0.110.0",
|
|
55
|
+
"@happyvertical/images": "^0.110.0",
|
|
56
|
+
"@happyvertical/logger": "^0.110.0",
|
|
57
57
|
"@happyvertical/ocr": "^0.62.1",
|
|
58
58
|
"@happyvertical/pdf": "^0.65.9",
|
|
59
|
-
"@happyvertical/smrt-assets": "0.57.
|
|
60
|
-
"@happyvertical/smrt-agents": "0.57.
|
|
61
|
-
"@happyvertical/smrt-chat": "0.57.
|
|
62
|
-
"@happyvertical/smrt-core": "0.57.
|
|
63
|
-
"@happyvertical/smrt-facts": "0.57.
|
|
64
|
-
"@happyvertical/smrt-images": "0.57.
|
|
65
|
-
"@happyvertical/smrt-messages": "0.57.
|
|
66
|
-
"@happyvertical/smrt-prompts": "0.57.
|
|
67
|
-
"@happyvertical/smrt-profiles": "0.57.
|
|
68
|
-
"@happyvertical/smrt-tenancy": "0.57.
|
|
69
|
-
"@happyvertical/smrt-types": "0.57.
|
|
70
|
-
"@happyvertical/smrt-ui": "0.57.
|
|
59
|
+
"@happyvertical/smrt-assets": "0.57.37",
|
|
60
|
+
"@happyvertical/smrt-agents": "0.57.37",
|
|
61
|
+
"@happyvertical/smrt-chat": "0.57.37",
|
|
62
|
+
"@happyvertical/smrt-core": "0.57.37",
|
|
63
|
+
"@happyvertical/smrt-facts": "0.57.37",
|
|
64
|
+
"@happyvertical/smrt-images": "0.57.37",
|
|
65
|
+
"@happyvertical/smrt-messages": "0.57.37",
|
|
66
|
+
"@happyvertical/smrt-prompts": "0.57.37",
|
|
67
|
+
"@happyvertical/smrt-profiles": "0.57.37",
|
|
68
|
+
"@happyvertical/smrt-tenancy": "0.57.37",
|
|
69
|
+
"@happyvertical/smrt-types": "0.57.37",
|
|
70
|
+
"@happyvertical/smrt-ui": "0.57.37",
|
|
71
71
|
"@happyvertical/spider": "^1.1.13",
|
|
72
|
-
"@happyvertical/sql": "^0.
|
|
73
|
-
"@happyvertical/utils": "^0.
|
|
72
|
+
"@happyvertical/sql": "^0.110.0",
|
|
73
|
+
"@happyvertical/utils": "^0.110.0",
|
|
74
74
|
"fast-xml-parser": "^5.11.1",
|
|
75
75
|
"sanitize-html": "^2.17.7",
|
|
76
76
|
"undici": "^7.30.1",
|
|
@@ -86,9 +86,9 @@
|
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
88
88
|
"@faker-js/faker": "^10.6.0",
|
|
89
|
-
"@happyvertical/smrt-playground": "0.57.
|
|
90
|
-
"@happyvertical/smrt-users": "0.57.
|
|
91
|
-
"@happyvertical/smrt-vitest": "0.57.
|
|
89
|
+
"@happyvertical/smrt-playground": "0.57.37",
|
|
90
|
+
"@happyvertical/smrt-users": "0.57.37",
|
|
91
|
+
"@happyvertical/smrt-vitest": "0.57.37",
|
|
92
92
|
"@sveltejs/kit": "2.69.1",
|
|
93
93
|
"@sveltejs/package": "^2.5.8",
|
|
94
94
|
"@sveltejs/vite-plugin-svelte": "^7.3.0",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"content-corrections-BYT3Qdw5.js","names":[],"sources":["../../src/content-correction.ts","../../src/content-corrections.ts"],"sourcesContent":["import type { SmrtObjectOptions } from '@happyvertical/smrt-core';\nimport {\n crossPackageRef,\n foreignKey,\n SmrtObject,\n smrt,\n} from '@happyvertical/smrt-core';\nimport { TenantScoped, tenantId } from '@happyvertical/smrt-tenancy';\nimport type {\n ContentCorrectionStatus,\n ContentCorrectionType,\n} from './content-governance';\n\nexport interface ContentCorrectionOptions extends SmrtObjectOptions {\n contentId?: string;\n contentVersionId?: string;\n factId?: string;\n replacementFactId?: string;\n correctionType?: ContentCorrectionType;\n status?: ContentCorrectionStatus;\n summary?: string;\n incorrectText?: string;\n correctedText?: string;\n publicNote?: string;\n metadata?: string | Record<string, unknown>;\n tenantId?: string | null;\n publishedAt?: Date | null;\n createdAt?: Date;\n updatedAt?: Date;\n}\n\n@TenantScoped({ mode: 'optional' })\n@smrt({\n tableName: 'content_corrections',\n api: { include: ['list', 'get', 'create', 'update'] },\n mcp: { include: ['list', 'get', 'create', 'update'] },\n cli: { skipApiCheck: true },\n})\nexport class ContentCorrection extends SmrtObject { static __smrtPackage__ = \"@happyvertical/smrt-content\";\n @foreignKey('Content', { required: true, onDelete: 'CASCADE' })\n contentId = '';\n\n @foreignKey('ContentVersion', { onDelete: 'CASCADE' })\n contentVersionId = '';\n\n @crossPackageRef('@happyvertical/smrt-facts:Fact')\n factId = '';\n\n @crossPackageRef('@happyvertical/smrt-facts:Fact')\n replacementFactId = '';\n correctionType: ContentCorrectionType = 'fact';\n status: ContentCorrectionStatus = 'draft';\n summary = '';\n incorrectText = '';\n correctedText = '';\n publicNote = '';\n metadata = '';\n\n @tenantId({ nullable: true })\n tenantId: string | null = null;\n\n publishedAt: Date | null = null;\n createdAt = new Date();\n updatedAt = new Date();\n\n constructor(options: ContentCorrectionOptions = {}) {\n super(options);\n if (options.contentId) this.contentId = options.contentId;\n if (options.contentVersionId !== undefined)\n this.contentVersionId = options.contentVersionId;\n if (options.factId !== undefined) this.factId = options.factId;\n if (options.replacementFactId !== undefined)\n this.replacementFactId = options.replacementFactId;\n if (options.correctionType !== undefined)\n this.correctionType = options.correctionType;\n if (options.status !== undefined) this.status = options.status;\n if (options.summary !== undefined) this.summary = options.summary;\n if (options.incorrectText !== undefined)\n this.incorrectText = options.incorrectText;\n if (options.correctedText !== undefined)\n this.correctedText = options.correctedText;\n if (options.publicNote !== undefined) this.publicNote = options.publicNote;\n if (options.tenantId !== undefined) this.tenantId = options.tenantId;\n if (options.publishedAt !== undefined)\n this.publishedAt = options.publishedAt;\n if (options.createdAt) this.createdAt = options.createdAt;\n if (options.updatedAt) this.updatedAt = options.updatedAt;\n\n if (options.metadata !== undefined) {\n this.metadata =\n typeof options.metadata === 'string'\n ? options.metadata\n : JSON.stringify(options.metadata);\n }\n }\n\n getMetadata(): Record<string, unknown> {\n try {\n return this.metadata ? JSON.parse(this.metadata) : {};\n } catch {\n return {};\n }\n }\n}\n","import { SmrtCollection, smrt } from '@happyvertical/smrt-core';\nimport { ContentCorrection } from './content-correction';\n\n// The collection's own @smrt() surface: its read helpers are published\n// operations (the API explorer and the workbench call them). A collection\n// inherits only its model's CRUD verbs, so it lists the helpers it opens here.\n// The CRUD verbs repeat the model's because a collection decorator's config\n// is merged over its model's at runtime.\n@smrt({\n // Mirror the model's storage so the collection decorator cannot plan a\n // different table for it.\n tableName: 'content_corrections',\n api: {\n include: [\n 'list',\n 'get',\n 'create',\n 'update',\n 'listForContent',\n 'getPublishedForContent',\n ],\n },\n mcp: {\n include: [\n 'list',\n 'get',\n 'create',\n 'update',\n 'listForContent',\n 'getPublishedForContent',\n ],\n },\n})\nexport class ContentCorrectionCollection extends SmrtCollection<ContentCorrection> { static __smrtPackage__ = \"@happyvertical/smrt-content\";\n static readonly _itemClass = ContentCorrection;\n\n async listForContent(contentId: string): Promise<ContentCorrection[]> {\n return this.list({\n where: { contentId },\n orderBy: 'created_at DESC',\n });\n }\n\n async getPublishedForContent(\n contentId: string,\n ): Promise<ContentCorrection[]> {\n return this.list({\n where: { contentId, status: 'published' },\n orderBy: 'published_at DESC',\n });\n }\n\n async issue(\n options: ConstructorParameters<typeof ContentCorrection>[0],\n ): Promise<ContentCorrection> {\n if (!options) {\n return this.create({});\n }\n\n return this.create({\n ...options,\n metadata:\n typeof options.metadata === 'string'\n ? options.metadata\n : options.metadata\n ? JSON.stringify(options.metadata)\n : undefined,\n });\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAsCO,IAAM,oBAAN,cAAgC,WAAW;CAEhD,YAAY;CAGZ,mBAAmB;CAGnB,SAAS;CAGT,oBAAoB;CACpB,iBAAwC;CACxC,SAAkC;CAClC,UAAU;CACV,gBAAgB;CAChB,gBAAgB;CAChB,aAAa;CACb,WAAW;CAGX,WAA0B;CAE1B,cAA2B;CAC3B,4BAAY,IAAI,KAAK;CACrB,4BAAY,IAAI,KAAK;CAErB,YAAY,UAAoC,CAAC,GAAG;EAClD,MAAM,OAAO;EACb,IAAI,QAAQ,WAAW,KAAK,YAAY,QAAQ;EAChD,IAAI,QAAQ,qBAAqB,KAAA,GAC/B,KAAK,mBAAmB,QAAQ;EAClC,IAAI,QAAQ,WAAW,KAAA,GAAW,KAAK,SAAS,QAAQ;EACxD,IAAI,QAAQ,sBAAsB,KAAA,GAChC,KAAK,oBAAoB,QAAQ;EACnC,IAAI,QAAQ,mBAAmB,KAAA,GAC7B,KAAK,iBAAiB,QAAQ;EAChC,IAAI,QAAQ,WAAW,KAAA,GAAW,KAAK,SAAS,QAAQ;EACxD,IAAI,QAAQ,YAAY,KAAA,GAAW,KAAK,UAAU,QAAQ;EAC1D,IAAI,QAAQ,kBAAkB,KAAA,GAC5B,KAAK,gBAAgB,QAAQ;EAC/B,IAAI,QAAQ,kBAAkB,KAAA,GAC5B,KAAK,gBAAgB,QAAQ;EAC/B,IAAI,QAAQ,eAAe,KAAA,GAAW,KAAK,aAAa,QAAQ;EAChE,IAAI,QAAQ,aAAa,KAAA,GAAW,KAAK,WAAW,QAAQ;EAC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