@prenta/plugin-ai 2.0.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/README.md +16 -3
  3. package/dist/__tests__/index.test.js +30 -27
  4. package/dist/__tests__/index.test.js.map +1 -1
  5. package/dist/index.d.ts +9 -38
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +9 -47
  8. package/dist/index.js.map +1 -1
  9. package/package.json +3 -2
  10. package/dist/__tests__/alt-text-prompt.test.d.ts +0 -2
  11. package/dist/__tests__/alt-text-prompt.test.d.ts.map +0 -1
  12. package/dist/__tests__/alt-text-prompt.test.js +0 -15
  13. package/dist/__tests__/alt-text-prompt.test.js.map +0 -1
  14. package/dist/__tests__/content-generator.test.d.ts +0 -2
  15. package/dist/__tests__/content-generator.test.d.ts.map +0 -1
  16. package/dist/__tests__/content-generator.test.js +0 -200
  17. package/dist/__tests__/content-generator.test.js.map +0 -1
  18. package/dist/__tests__/http.test.d.ts +0 -2
  19. package/dist/__tests__/http.test.d.ts.map +0 -1
  20. package/dist/__tests__/http.test.js +0 -44
  21. package/dist/__tests__/http.test.js.map +0 -1
  22. package/dist/__tests__/media-vision.test.d.ts +0 -2
  23. package/dist/__tests__/media-vision.test.d.ts.map +0 -1
  24. package/dist/__tests__/media-vision.test.js +0 -63
  25. package/dist/__tests__/media-vision.test.js.map +0 -1
  26. package/dist/__tests__/meta-generator.test.d.ts +0 -2
  27. package/dist/__tests__/meta-generator.test.d.ts.map +0 -1
  28. package/dist/__tests__/meta-generator.test.js +0 -28
  29. package/dist/__tests__/meta-generator.test.js.map +0 -1
  30. package/dist/__tests__/plugin-config.test.d.ts +0 -2
  31. package/dist/__tests__/plugin-config.test.d.ts.map +0 -1
  32. package/dist/__tests__/plugin-config.test.js +0 -65
  33. package/dist/__tests__/plugin-config.test.js.map +0 -1
  34. package/dist/__tests__/prompt.test.d.ts +0 -2
  35. package/dist/__tests__/prompt.test.d.ts.map +0 -1
  36. package/dist/__tests__/prompt.test.js +0 -28
  37. package/dist/__tests__/prompt.test.js.map +0 -1
  38. package/dist/media/alt-text-generator.d.ts +0 -27
  39. package/dist/media/alt-text-generator.d.ts.map +0 -1
  40. package/dist/media/alt-text-generator.js +0 -68
  41. package/dist/media/alt-text-generator.js.map +0 -1
  42. package/dist/media/alt-text-prompt.d.ts +0 -6
  43. package/dist/media/alt-text-prompt.d.ts.map +0 -1
  44. package/dist/media/alt-text-prompt.js +0 -32
  45. package/dist/media/alt-text-prompt.js.map +0 -1
  46. package/dist/media/json.d.ts +0 -4
  47. package/dist/media/json.d.ts.map +0 -1
  48. package/dist/media/json.js +0 -8
  49. package/dist/media/json.js.map +0 -1
  50. package/dist/prompt.d.ts +0 -30
  51. package/dist/prompt.d.ts.map +0 -1
  52. package/dist/prompt.js +0 -46
  53. package/dist/prompt.js.map +0 -1
  54. package/dist/providers/anthropic.d.ts +0 -8
  55. package/dist/providers/anthropic.d.ts.map +0 -1
  56. package/dist/providers/anthropic.js +0 -156
  57. package/dist/providers/anthropic.js.map +0 -1
  58. package/dist/providers/http.d.ts +0 -23
  59. package/dist/providers/http.d.ts.map +0 -1
  60. package/dist/providers/http.js +0 -40
  61. package/dist/providers/http.js.map +0 -1
  62. package/dist/providers/index.d.ts +0 -49
  63. package/dist/providers/index.d.ts.map +0 -1
  64. package/dist/providers/index.js +0 -34
  65. package/dist/providers/index.js.map +0 -1
  66. package/dist/providers/openai.d.ts +0 -7
  67. package/dist/providers/openai.d.ts.map +0 -1
  68. package/dist/providers/openai.js +0 -143
  69. package/dist/providers/openai.js.map +0 -1
  70. package/dist/search/embeddings.d.ts +0 -12
  71. package/dist/search/embeddings.d.ts.map +0 -1
  72. package/dist/search/embeddings.js +0 -35
  73. package/dist/search/embeddings.js.map +0 -1
  74. package/dist/search/semantic-search.d.ts +0 -31
  75. package/dist/search/semantic-search.d.ts.map +0 -1
  76. package/dist/search/semantic-search.js +0 -59
  77. package/dist/search/semantic-search.js.map +0 -1
  78. package/dist/writing/assistant.d.ts +0 -26
  79. package/dist/writing/assistant.d.ts.map +0 -1
  80. package/dist/writing/assistant.js +0 -114
  81. package/dist/writing/assistant.js.map +0 -1
  82. package/dist/writing/content-generator.d.ts +0 -104
  83. package/dist/writing/content-generator.d.ts.map +0 -1
  84. package/dist/writing/content-generator.js +0 -278
  85. package/dist/writing/content-generator.js.map +0 -1
  86. package/dist/writing/meta-generator.d.ts +0 -17
  87. package/dist/writing/meta-generator.d.ts.map +0 -1
  88. package/dist/writing/meta-generator.js +0 -55
  89. package/dist/writing/meta-generator.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # @actuate-media/plugin-ai
2
2
 
3
+ ## 3.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - 075cce2: plugin-ai 3.0 is a deterministic content-quality toolkit. The provider layer, writing / media / search helpers, and the prompt utilities moved out (prompt builders now live in `@prenta/core`'s `ai/tasks/*`; every model call runs through the governed Settings > AI runtime). Spec B of the SEO AI audit roadmap (item 8).
8
+
9
+ **Breaking — removed exports**
10
+ - Providers: `getAIProvider`, `requireAIProvider`, `createAnthropicProvider`, `createOpenAIProvider`, and types `AIProvider`, `GenerateOptions`, `GenerateResult`, `StreamOptions`.
11
+ - Writing: `generate`, `expand`, `compress`, `rewrite`, `proofread`, and types `WritingContext`, `ProofreadResult`.
12
+ - Meta: `generateMetaDescription`, `generateKeyTakeaway`, `generateTitle`, and type `TitleOptions`.
13
+ - Documents: `generateDocumentContent`, and types `FieldShape`, `DocumentGenerationContext`, `GenerateDocumentInput`, `GenerateDocumentResult`, `CollectionShape`.
14
+ - Media: `generateAltText`.
15
+ - Search: `generateEmbedding`, `cosineSimilarity`, `semanticSearch`, and types `SemanticSearchOptions`, `SemanticSearchResult`.
16
+ - `AIPluginConfig` is deleted. `aiPlugin()` takes **no argument** — `aiPlugin({ provider, apiKey, model, openaiApiKey })` is now a type error.
17
+
18
+ **Kept**
19
+
20
+ `aiPlugin`, `auditDocument` (+ `AuditDocumentInput`, `AuditDocumentResult`), `calculateSEOScore`, `getReadabilityScore`, `calculateAccessibilityScore`, `calculateFreshnessScore`, `calculateCompositeScore`, `suggestInternalLinks` (+ `PageReference`, `LinkSuggestion`).
21
+
22
+ **Migration**
23
+ 1. Change `aiPlugin({ ... })` to `aiPlugin()`.
24
+ 2. Set the provider API key env var on the host (`OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, or `XAI_API_KEY`) — an env-managed connection and the provider's curated default model are used automatically — or add a connection and pick a default model in Settings > AI.
25
+ 3. Replace direct calls to the removed helpers with the `/api/cms/ai/*` routes (co-author, SEO field generation, `POST /collections/:slug/ai-create`, `POST /ai/media-metadata`), which are governed and metered.
26
+
3
27
  ## 2.0.0
4
28
 
5
29
  ### Major Changes
package/README.md CHANGED
@@ -1,8 +1,9 @@
1
1
  # @prenta/plugin-ai
2
2
 
3
- AI features for [Prenta CMS](https://github.com/actuate-media/prenta) —
4
- governed model routing, inline co-author actions, and AI-assisted content
5
- tooling.
3
+ Deterministic content-quality tooling for
4
+ [Prenta CMS](https://github.com/actuate-media/prenta) — document audit,
5
+ SEO / readability / accessibility / freshness scores, and smart internal-link
6
+ suggestions.
6
7
 
7
8
  ```bash
8
9
  npm install @prenta/plugin-ai
@@ -19,6 +20,18 @@ export default defineConfig({
19
20
  })
20
21
  ```
21
22
 
23
+ `aiPlugin()` takes no options. AI model access (providers, keys, models,
24
+ feature toggles, budgets, brand voice) is configured in **Settings → AI** in
25
+ the admin, or — for zero-config hosts — by setting `OPENAI_API_KEY`,
26
+ `ANTHROPIC_API_KEY`, or `XAI_API_KEY`. Every model call runs through
27
+ `@prenta/core`'s governed runtime; this package never calls a model itself.
28
+
29
+ ## Exports
30
+
31
+ - `auditDocument` — deterministic content audit (SEO, readability, accessibility, freshness, composite score)
32
+ - `calculateSEOScore`, `getReadabilityScore`, `calculateAccessibilityScore`, `calculateFreshnessScore`, `calculateCompositeScore`
33
+ - `suggestInternalLinks` — phrase-match internal-link candidates
34
+
22
35
  ## Release notes
23
36
 
24
37
  See [CHANGELOG.md](./CHANGELOG.md) (shipped with the package) or the
@@ -1,32 +1,35 @@
1
- import { describe, it, expect } from 'vitest';
1
+ import { describe, expect, it } from 'vitest';
2
+ import * as pkg from '../index.js';
2
3
  import { aiPlugin } from '../index.js';
3
- describe('plugin-ai', () => {
4
- describe('structure', () => {
5
- it('returns name plugin-ai', () => {
6
- expect(aiPlugin().name).toBe('plugin-ai');
7
- });
8
- it('registers no fields, collections, or hooks', () => {
9
- // plugin-ai is a capability package: every AI feature is reached through
10
- // cms-core's routes and the governed runtime. The old afterCreate
11
- // (_embedding) and afterUpdate (_aiScore) hooks wrote fields nothing read
12
- // (roadmap item 8) and the fields/collections maps were empty stubs.
13
- const plugin = aiPlugin();
14
- expect(plugin.fields).toBeUndefined();
15
- expect(plugin.collections).toBeUndefined();
16
- expect(plugin.hooks).toBeUndefined();
17
- });
18
- it('does not register dead admin nav items', () => {
19
- // The old /ai/* nav paths had no admin view - plugins cannot register
20
- // views and plugin-ai registers no backing collection - so they 404ed.
21
- // Guarded centrally by cms-admin's plugin-nav-resolves test.
22
- const plugin = aiPlugin();
23
- expect(plugin.adminNavItems).toBeUndefined();
24
- });
4
+ describe('plugin-ai 3.0 surface', () => {
5
+ it('exports exactly the deterministic toolkit', () => {
6
+ // Spec B: the provider layer, writing/media/search helpers and their
7
+ // types left the package. Model calls run through @prenta/core's governed
8
+ // runtime (Settings > AI); this package is scoring + audit + smart links.
9
+ expect(Object.keys(pkg).sort()).toEqual([
10
+ 'aiPlugin',
11
+ 'auditDocument',
12
+ 'calculateAccessibilityScore',
13
+ 'calculateCompositeScore',
14
+ 'calculateFreshnessScore',
15
+ 'calculateSEOScore',
16
+ 'getReadabilityScore',
17
+ 'suggestInternalLinks',
18
+ ].sort());
25
19
  });
26
- describe('configuration', () => {
27
- it('does not throw when no provider is configured', () => {
28
- expect(() => aiPlugin()).not.toThrow();
29
- });
20
+ it('aiPlugin() takes no configuration and registers nothing', () => {
21
+ // No fields, collections, hooks, or adminNavItems: every AI capability is
22
+ // reached through cms-core routes. The admin router has no /ai/* views
23
+ // (guarded by cms-admin's plugin-nav-resolves test).
24
+ const plugin = aiPlugin();
25
+ expect(plugin.name).toBe('plugin-ai');
26
+ expect(plugin.fields).toBeUndefined();
27
+ expect(plugin.collections).toBeUndefined();
28
+ expect(plugin.hooks).toBeUndefined();
29
+ expect(plugin.adminNavItems).toBeUndefined();
30
+ });
31
+ it('aiPlugin() does not throw without any provider configuration', () => {
32
+ expect(() => aiPlugin()).not.toThrow();
30
33
  });
31
34
  });
32
35
  //# sourceMappingURL=index.test.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.test.js","sourceRoot":"","sources":["../../src/__tests__/index.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAA;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AAEtC,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;IACzB,QAAQ,CAAC,WAAW,EAAE,GAAG,EAAE;QACzB,EAAE,CAAC,wBAAwB,EAAE,GAAG,EAAE;YAChC,MAAM,CAAC,QAAQ,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;QAC3C,CAAC,CAAC,CAAA;QAEF,EAAE,CAAC,4CAA4C,EAAE,GAAG,EAAE;YACpD,yEAAyE;YACzE,kEAAkE;YAClE,0EAA0E;YAC1E,qEAAqE;YACrE,MAAM,MAAM,GAAG,QAAQ,EAAE,CAAA;YACzB,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,aAAa,EAAE,CAAA;YACrC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,aAAa,EAAE,CAAA;YAC1C,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,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AE;QACjE,0EAA0E;QAC1E,uEAAuE;QACvE,qDAAqD;QACrD,MAAM,MAAM,GAAG,QAAQ,EAAE,CAAA;QACzB,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAA;QACrC,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,aAAa,EAAE,CAAA;QACrC,MAAM,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC,aAAa,EAAE,CAAA;QAC1C,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,aAAa,EAAE,CAAA;QACpC,MAAM,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,aAAa,EAAE,CAAA;IAC9C,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,8DAA8D,EAAE,GAAG,EAAE;QACtE,MAAM,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,CAAA;IACxC,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
package/dist/index.d.ts CHANGED
@@ -1,8 +1,4 @@
1
1
  import { type PluginDefinition } from '@prenta/core/config';
2
- export { getAIProvider, requireAIProvider } from './providers/index.js';
3
- export type { AIProvider, GenerateOptions, GenerateResult, StreamOptions, } from './providers/index.js';
4
- export { createAnthropicProvider } from './providers/anthropic.js';
5
- export { createOpenAIProvider } from './providers/openai.js';
6
2
  export { getReadabilityScore } from './scoring/readability.js';
7
3
  export { calculateSEOScore } from './scoring/seo-score.js';
8
4
  export { calculateAccessibilityScore } from './scoring/accessibility.js';
@@ -10,44 +6,19 @@ export { calculateFreshnessScore } from './scoring/freshness.js';
10
6
  export { calculateCompositeScore } from './scoring/composite.js';
11
7
  export { auditDocument } from './audit/document-auditor.js';
12
8
  export type { AuditDocumentInput, AuditDocumentResult } from './audit/document-auditor.js';
13
- export { generate, expand, compress, rewrite, proofread } from './writing/assistant.js';
14
- export type { WritingContext, ProofreadResult } from './writing/assistant.js';
15
- export { generateMetaDescription, generateKeyTakeaway, generateTitle, } from './writing/meta-generator.js';
16
- export type { TitleOptions } from './writing/meta-generator.js';
17
- export { generateDocumentContent } from './writing/content-generator.js';
18
- export type { FieldShape, DocumentGenerationContext, GenerateDocumentInput, GenerateDocumentResult, CollectionShape, } from './writing/content-generator.js';
19
9
  export { suggestInternalLinks } from './links/smart-links.js';
20
10
  export type { PageReference, LinkSuggestion } from './links/smart-links.js';
21
- export { generateAltText } from './media/alt-text-generator.js';
22
- export { generateEmbedding, cosineSimilarity } from './search/embeddings.js';
23
- export { semanticSearch } from './search/semantic-search.js';
24
- export type { SemanticSearchOptions, SemanticSearchResult } from './search/semantic-search.js';
25
- export interface AIPluginConfig {
26
- provider?: 'anthropic' | 'openai';
27
- apiKey?: string;
28
- model?: string;
29
- openaiApiKey?: string;
30
- }
31
11
  /**
32
12
  * Creates the Prenta AI plugin.
33
13
  *
34
- * Configuration example:
35
- * ```ts
36
- * aiPlugin({
37
- * provider: "openai", // or "anthropic"
38
- * apiKey: process.env.OPENAI_API_KEY,
39
- * model: "gpt-4o", // optional, defaults to gpt-4o or claude-sonnet-4-20250514
40
- * })
41
- * ```
42
- *
43
- * For Anthropic with embeddings support:
44
- * ```ts
45
- * aiPlugin({
46
- * provider: "anthropic",
47
- * apiKey: process.env.ANTHROPIC_API_KEY,
48
- * openaiApiKey: process.env.OPENAI_API_KEY, // for embeddings fallback
49
- * })
50
- * ```
14
+ * Since 3.0 this package is a deterministic content-quality toolkit (document
15
+ * audit, SEO / readability / accessibility / freshness scoring, smart internal
16
+ * links). Model access is configured in Settings > AI — or, for zero-config
17
+ * hosts, by setting `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, or `XAI_API_KEY` —
18
+ * and every model call runs through `@prenta/core`'s governed runtime. The
19
+ * plugin takes no options and registers no fields, collections, hooks, or
20
+ * admin navigation (the admin router has no /ai/* views; guarded by
21
+ * cms-admin's plugin-nav-resolves test).
51
22
  */
52
- export declare function aiPlugin(config?: AIPluginConfig): PluginDefinition;
23
+ export declare function aiPlugin(): PluginDefinition;
53
24
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,gBAAgB,EAAE,MAAM,qBAAqB,CAAA;AAKzE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AACvE,YAAY,EACV,UAAU,EACV,eAAe,EACf,cAAc,EACd,aAAa,GACd,MAAM,sBAAsB,CAAA;AAC7B,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAA;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAA;AAG5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAA;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAA;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAA;AAEhE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAC3D,YAAY,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAA;AAG1F,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAA;AACvF,YAAY,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AAC7E,OAAO,EACL,uBAAuB,EACvB,mBAAmB,EACnB,aAAa,GACd,MAAM,6BAA6B,CAAA;AACpC,YAAY,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAA;AACxE,YAAY,EACV,UA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AE,MAAM,6BAA6B,CAAA;AAE1F,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAE3E;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,IAAI,gBAAgB,CAE3C"}
package/dist/index.js CHANGED
@@ -1,10 +1,4 @@
1
1
  import { definePlugin } from '@prenta/core/config';
2
- import { createAIProvider, setAIProvider } from './providers/index.js';
3
- // Provider singleton. `createAIProvider` / `setAIProvider` stay internal:
4
- // `aiPlugin()` is the only supported way to wire the legacy provider.
5
- export { getAIProvider, requireAIProvider } from './providers/index.js';
6
- export { createAnthropicProvider } from './providers/anthropic.js';
7
- export { createOpenAIProvider } from './providers/openai.js';
8
2
  // Deterministic scoring (used by auditDocument and exposed for hosts).
9
3
  export { getReadabilityScore } from './scoring/readability.js';
10
4
  export { calculateSEOScore } from './scoring/seo-score.js';
@@ -12,52 +6,20 @@ export { calculateAccessibilityScore } from './scoring/accessibility.js';
12
6
  export { calculateFreshnessScore } from './scoring/freshness.js';
13
7
  export { calculateCompositeScore } from './scoring/composite.js';
14
8
  export { auditDocument } from './audit/document-auditor.js';
15
- // Writing helpers reached by cms-core through `import('@prenta/plugin-ai')`.
16
- export { generate, expand, compress, rewrite, proofread } from './writing/assistant.js';
17
- export { generateMetaDescription, generateKeyTakeaway, generateTitle, } from './writing/meta-generator.js';
18
- export { generateDocumentContent } from './writing/content-generator.js';
19
9
  export { suggestInternalLinks } from './links/smart-links.js';
20
- export { generateAltText } from './media/alt-text-generator.js';
21
- export { generateEmbedding, cosineSimilarity } from './search/embeddings.js';
22
- export { semanticSearch } from './search/semantic-search.js';
23
10
  /**
24
11
  * Creates the Prenta AI plugin.
25
12
  *
26
- * Configuration example:
27
- * ```ts
28
- * aiPlugin({
29
- * provider: "openai", // or "anthropic"
30
- * apiKey: process.env.OPENAI_API_KEY,
31
- * model: "gpt-4o", // optional, defaults to gpt-4o or claude-sonnet-4-20250514
32
- * })
33
- * ```
34
- *
35
- * For Anthropic with embeddings support:
36
- * ```ts
37
- * aiPlugin({
38
- * provider: "anthropic",
39
- * apiKey: process.env.ANTHROPIC_API_KEY,
40
- * openaiApiKey: process.env.OPENAI_API_KEY, // for embeddings fallback
41
- * })
42
- * ```
13
+ * Since 3.0 this package is a deterministic content-quality toolkit (document
14
+ * audit, SEO / readability / accessibility / freshness scoring, smart internal
15
+ * links). Model access is configured in Settings > AI — or, for zero-config
16
+ * hosts, by setting `OPENAI_API_KEY`, `ANTHROPIC_API_KEY`, or `XAI_API_KEY` —
17
+ * and every model call runs through `@prenta/core`'s governed runtime. The
18
+ * plugin takes no options and registers no fields, collections, hooks, or
19
+ * admin navigation (the admin router has no /ai/* views; guarded by
20
+ * cms-admin's plugin-nav-resolves test).
43
21
  */
44
- export function aiPlugin(config) {
45
- if (config?.provider && config?.apiKey) {
46
- const provider = createAIProvider({
47
- provider: config.provider,
48
- apiKey: config.apiKey,
49
- model: config.model,
50
- openaiApiKey: config.openaiApiKey,
51
- });
52
- setAIProvider(provider);
53
- }
54
- // plugin-ai registers no fields, collections, hooks, or adminNavItems. Every
55
- // AI capability is exposed through cms-core routes and the governed runtime;
56
- // the plugin's only registration-time job is wiring the legacy provider
57
- // singleton when a host passes provider + apiKey (Spec B retires that too).
58
- // The admin router has no /ai/* views (plugins cannot register views), so
59
- // advertising nav links only produced dead 404s - guarded by cms-admin's
60
- // plugin-nav-resolves test.
22
+ export function aiPlugin() {
61
23
  return definePlugin({ name: 'plugin-ai' });
62
24
  }
63
25
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAyB,MAAM,qBAAqB,CAAA;AACzE,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEtE,0EAA0E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EAAE,MAAM,CAAC,MAAM;YACrB,KAAK,EAAE,MAAM,CAAC,KAAK;YACnB,YAAY,EAAE,MAAM,CAAC,YAAY;SAClC,CAAC,CAAA;QACF,aAAa,CAAC,QAAQ,CAAC,CAAA;IACzB,CAAC;IAED,6EAA6E;IAC7E,6EAA6E;IAC7E,wEAAwE;IACxE,4EAA4E;IAC5E,0EAA0E;IAC1E,yEAAyE;IACzE,4BAA4B;IAC5B,OAAO,YAAY,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAA;AAC5C,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAyB,MAAM,qBAAqB,CAAA;AAEzE,uEAAuE;AACvE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAC9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAAE,2BAA2B,EAAE,MAAM,4BAA4B,CAAA;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAA;AAChE,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAA;AAEhE,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAG3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAG7D;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,QAAQ;IACtB,OAAO,YAAY,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,CAAA;AAC5C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@prenta/plugin-ai",
3
- "version": "2.0.0",
3
+ "version": "3.0.0",
4
+ "description": "Deterministic content-quality tooling for Prenta CMS: document audit, SEO/readability/accessibility/freshness scores, smart internal links. AI model calls are governed by @prenta/core (Settings > AI).",
4
5
  "license": "MIT",
5
6
  "repository": {
6
7
  "type": "git",
@@ -27,7 +28,7 @@
27
28
  "devDependencies": {
28
29
  "typescript": "^5.7.0",
29
30
  "vitest": "^4.1.0",
30
- "@prenta/core": "6.0.0"
31
+ "@prenta/core": "7.0.0"
31
32
  },
32
33
  "peerDependencies": {
33
34
  "@prenta/core": ">=0.1.0"
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=alt-text-prompt.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"alt-text-prompt.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/alt-text-prompt.test.ts"],"names":[],"mappings":""}
@@ -1,15 +0,0 @@
1
- import { describe, expect, it } from 'vitest';
2
- import { normalizeGeneratedAltText } from '../media/alt-text-prompt.js';
3
- describe('normalizeGeneratedAltText', () => {
4
- it('returns empty for decorative', () => {
5
- expect(normalizeGeneratedAltText('anything', true)).toBe('');
6
- });
7
- it('strips redundant "image of" prefix', () => {
8
- expect(normalizeGeneratedAltText('Image of a red bicycle parked outside', false)).toBe('a red bicycle parked outside');
9
- });
10
- it('clamps to 125 characters', () => {
11
- const long = 'a'.repeat(200);
12
- expect(normalizeGeneratedAltText(long, false).length).toBeLessThanOrEqual(125);
13
- });
14
- });
15
- //# sourceMappingURL=alt-text-prompt.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"alt-text-prompt.test.js","sourceRoot":"","sources":["../../src/__tests__/alt-text-prompt.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAE7C,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAEvE,QAAQ,CAAC,2BAA2B,EAAE,GAAG,EAAE;IACzC,EAAE,CAAC,8BAA8B,EAAE,GAAG,EAAE;QACtC,MAAM,CAAC,yBAAyB,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;IAC9D,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,oCAAoC,EAAE,GAAG,EAAE;QAC5C,MAAM,CAAC,yBAAyB,CAAC,uCAAuC,EAAE,KAAK,CAAC,CAAC,CAAC,IAAI,CACpF,8BAA8B,CAC/B,CAAA;IACH,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,0BAA0B,EAAE,GAAG,EAAE;QAClC,MAAM,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAA;QAC5B,MAAM,CAAC,yBAAyB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC,MAAM,CAAC,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAA;IAChF,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=content-generator.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"content-generator.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/content-generator.test.ts"],"names":[],"mappings":""}
@@ -1,200 +0,0 @@
1
- import { describe, it, expect } from 'vitest';
2
- import { generateDocumentContent } from '../writing/content-generator.js';
3
- function makeProvider(responseText, usage = { promptTokens: 0, completionTokens: 0 }) {
4
- return {
5
- async generateText() {
6
- return { text: responseText, usage };
7
- },
8
- async generateEmbedding() {
9
- return [];
10
- },
11
- async *streamText() {
12
- yield responseText;
13
- },
14
- };
15
- }
16
- const blogPostCollection = {
17
- slug: 'posts',
18
- labels: { singular: 'Post', plural: 'Posts' },
19
- type: 'post',
20
- seo: { defaultSchemaType: 'BlogPosting' },
21
- fields: {
22
- title: { type: 'text', label: 'Title', required: true, maxLength: 200 },
23
- slug: { type: 'slug', label: 'Slug', required: true },
24
- excerpt: { type: 'text', label: 'Excerpt', maxLength: 280 },
25
- body: { type: 'richText', label: 'Body', required: true },
26
- authorName: { type: 'text', label: 'Author' },
27
- publishedDate: { type: 'date', label: 'Published date' },
28
- tags: {
29
- type: 'array',
30
- label: 'Tags',
31
- fields: { tag: { type: 'text', label: 'Tag' } },
32
- },
33
- featuredImage: { type: 'media', label: 'Featured image' },
34
- metaTitle: { type: 'text', label: 'SEO title', maxLength: 70 },
35
- metaDescription: { type: 'text', label: 'SEO description', maxLength: 200 },
36
- },
37
- };
38
- describe('generateDocumentContent', () => {
39
- it('parses LLM JSON output and maps fields to types', async () => {
40
- const provider = makeProvider(JSON.stringify({
41
- title: 'Five Tips for Spring Cleaning',
42
- excerpt: 'A practical guide.',
43
- body: 'When spring arrives, kitchens deserve attention.',
44
- authorName: 'Jane Doe',
45
- publishedDate: '2026-04-01',
46
- tags: [{ tag: 'cleaning' }, { tag: 'tips' }],
47
- metaTitle: 'Spring Cleaning Tips',
48
- metaDescription: 'Five practical spring cleaning tips for busy households.',
49
- }));
50
- const result = await generateDocumentContent({
51
- prompt: 'Write a blog post about spring cleaning',
52
- collection: blogPostCollection,
53
- context: { provider },
54
- });
55
- expect(result.data.title).toBe('Five Tips for Spring Cleaning');
56
- expect(result.data.body).toContain('spring');
57
- expect(result.data.authorName).toBe('Jane Doe');
58
- expect(result.data.publishedDate).toBe('2026-04-01T00:00:00.000Z');
59
- expect(Array.isArray(result.data.tags)).toBe(true);
60
- expect(result.data.tags[0].tag).toBe('cleaning');
61
- // Media fields are excluded from the LLM prompt so they never appear in
62
- // generator output — humans upload assets via the admin.
63
- expect(result.data).not.toHaveProperty('featuredImage');
64
- expect(result.title).toBe('Five Tips for Spring Cleaning');
65
- expect(result.slug).toBe('five-tips-for-spring-cleaning');
66
- expect(result.seo.metaTitle).toBe('Spring Cleaning Tips');
67
- expect(result.seo.metaDescription).toContain('Five practical');
68
- expect(result.seo.schemaType).toBe('BlogPosting');
69
- });
70
- it('strips fields not declared in the collection schema', async () => {
71
- const provider = makeProvider(JSON.stringify({
72
- title: 'Hello',
73
- body: 'World',
74
- // Field not declared in schema — should not appear in output.
75
- secretInternalField: 'leaked',
76
- }));
77
- const result = await generateDocumentContent({
78
- prompt: 'test',
79
- collection: blogPostCollection,
80
- context: { provider },
81
- });
82
- expect(result.data.title).toBe('Hello');
83
- expect(result.data).not.toHaveProperty('secretInternalField');
84
- });
85
- it('coerces string numbers and boolean strings', async () => {
86
- const provider = makeProvider(JSON.stringify({ title: 'X', body: 'Y', rating: '4.5', featured: 'true' }));
87
- const result = await generateDocumentContent({
88
- prompt: 'test',
89
- collection: {
90
- slug: 'testimonials',
91
- labels: { singular: 'T', plural: 'T' },
92
- fields: {
93
- title: { type: 'text', label: 'T' },
94
- body: { type: 'text', label: 'B' },
95
- rating: { type: 'number', label: 'Rating', min: 1, max: 5 },
96
- featured: { type: 'boolean', label: 'Featured' },
97
- },
98
- },
99
- context: { provider },
100
- });
101
- expect(result.data.rating).toBe(4.5);
102
- expect(result.data.featured).toBe(true);
103
- });
104
- it('drops unknown select option values rather than persisting them', async () => {
105
- const provider = makeProvider(JSON.stringify({ title: 'X', body: 'Y', category: 'made-up-category' }));
106
- const result = await generateDocumentContent({
107
- prompt: 'test',
108
- collection: {
109
- slug: 'portfolio',
110
- labels: { singular: 'P', plural: 'P' },
111
- fields: {
112
- title: { type: 'text', label: 'T' },
113
- body: { type: 'text', label: 'B' },
114
- category: {
115
- type: 'select',
116
- label: 'Category',
117
- options: [
118
- { label: 'Web', value: 'web' },
119
- { label: 'Mobile', value: 'mobile' },
120
- ],
121
- },
122
- },
123
- },
124
- context: { provider },
125
- });
126
- expect(result.data).not.toHaveProperty('category');
127
- });
128
- it('extracts JSON when LLM wraps it in markdown commentary', async () => {
129
- const provider = makeProvider(`Sure! Here's the blog post:\n\n\`\`\`json\n${JSON.stringify({
130
- title: 'Test',
131
- body: 'Content',
132
- })}\n\`\`\`\n\nLet me know if you want changes.`);
133
- const result = await generateDocumentContent({
134
- prompt: 'test',
135
- collection: blogPostCollection,
136
- context: { provider },
137
- });
138
- expect(result.data.title).toBe('Test');
139
- expect(result.data.body).toBe('Content');
140
- });
141
- it('throws when the LLM returns no JSON', async () => {
142
- const provider = makeProvider('I cannot generate this content.');
143
- await expect(generateDocumentContent({
144
- prompt: 'test',
145
- collection: blogPostCollection,
146
- context: { provider },
147
- })).rejects.toThrow(/no JSON object/);
148
- });
149
- it('throws when the LLM returns invalid JSON', async () => {
150
- // Balanced braces (so extractJsonObject succeeds) but with single-quoted
151
- // values that JSON.parse rejects.
152
- const provider = makeProvider("{ 'title': 'X', 'body': 'Y' }");
153
- await expect(generateDocumentContent({
154
- prompt: 'test',
155
- collection: blogPostCollection,
156
- context: { provider },
157
- })).rejects.toThrow(/invalid JSON/);
158
- });
159
- it('uses a question field as the title when no title field exists (FAQ)', async () => {
160
- const provider = makeProvider(JSON.stringify({
161
- question: 'How do I reset my password?',
162
- answer: 'Click "Forgot password".',
163
- }));
164
- const result = await generateDocumentContent({
165
- prompt: 'test',
166
- collection: {
167
- slug: 'faqs',
168
- labels: { singular: 'FAQ', plural: 'FAQs' },
169
- fields: {
170
- question: { type: 'text', label: 'Question', required: true },
171
- answer: { type: 'richText', label: 'Answer', required: true },
172
- },
173
- },
174
- context: { provider },
175
- });
176
- expect(result.title).toBe('How do I reset my password?');
177
- expect(result.slug).toBe('how-do-i-reset-my-password');
178
- });
179
- it('caps slug to 80 chars', async () => {
180
- const longTitle = 'A'.repeat(200);
181
- const provider = makeProvider(JSON.stringify({ title: longTitle, body: 'x' }));
182
- const result = await generateDocumentContent({
183
- prompt: 'test',
184
- collection: blogPostCollection,
185
- context: { provider },
186
- });
187
- expect(result.slug.length).toBeLessThanOrEqual(80);
188
- });
189
- it('honors caller-supplied slug in result.data.slug', async () => {
190
- const provider = makeProvider(JSON.stringify({ title: 'Hello', slug: 'custom-slug', body: 'x' }));
191
- const result = await generateDocumentContent({
192
- prompt: 'test',
193
- collection: blogPostCollection,
194
- context: { provider },
195
- });
196
- expect(result.slug).toBe('custom-slug');
197
- expect(result.data.slug).toBe('custom-slug');
198
- });
199
- });
200
- //# sourceMappingURL=content-generator.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"content-generator.test.js","sourceRoot":"","sources":["../../src/__tests__/content-generator.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SACtB,CAAC,CAAA;QACF,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,mBAAmB,CAAC,EAAE,CAAC,CAAA;IACpD,CAAC,CAAC,CAAA;IAEF,EAAE,CAAC,iDAAiD,EAAE,KAAK,IAAI,EAAE;QAC/D,MAAM,QAAQ,GAAG,YAAY,CAC3B,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CACnE,CAAA;QACD,MAAM,MAAM,GAAG,MAAM,uBAAuB,CAAC;YAC3C,MAAM,EAAE,MAAM;YACd,UAAU,EAAE,kBAAkB;YAC9B,OAAO,EAAE,EAAE,QAAQ,EAAE;SACtB,CAAC,CAAA;QACF,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;QACvC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA;IAC9C,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=http.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"http.test.d.ts","sourceRoot":"","sources":["../../src/__tests__/http.test.ts"],"names":[],"mappings":""}
@@ -1,44 +0,0 @@
1
- import { afterEach, describe, expect, it, vi } from 'vitest';
2
- import { fetchWithTimeout, readErrorBody } from '../providers/http.js';
3
- /**
4
- * Reliability regression (security audit H2 + L2): provider calls must be
5
- * bounded by a timeout, and upstream error bodies must be truncated before they
6
- * reach error messages/logs.
7
- */
8
- describe('fetchWithTimeout', () => {
9
- afterEach(() => vi.restoreAllMocks());
10
- it('throws a clear timeout error when the request exceeds the budget', async () => {
11
- vi.stubGlobal('fetch', vi.fn((_url, init) => {
12
- // Reject when the (timeout) signal aborts, like the real fetch does.
13
- return new Promise((_resolve, reject) => {
14
- const signal = init?.signal;
15
- signal?.addEventListener('abort', () => reject(new DOMException('The operation timed out.', 'TimeoutError')));
16
- });
17
- }));
18
- await expect(fetchWithTimeout('https://example.test', { method: 'POST' }, 10)).rejects.toThrow(/timed out after 10ms/);
19
- });
20
- it('returns the response when fetch resolves in time', async () => {
21
- const res = new Response('ok', { status: 200 });
22
- vi.stubGlobal('fetch', vi.fn(async () => res));
23
- await expect(fetchWithTimeout('https://example.test', {}, 1000)).resolves.toBe(res);
24
- });
25
- it('passes through non-timeout errors unchanged', async () => {
26
- vi.stubGlobal('fetch', vi.fn(async () => {
27
- throw new TypeError('network down');
28
- }));
29
- await expect(fetchWithTimeout('https://example.test', {})).rejects.toThrow('network down');
30
- });
31
- });
32
- describe('readErrorBody', () => {
33
- it('truncates oversized upstream bodies', async () => {
34
- const huge = 'x'.repeat(5000);
35
- const body = await readErrorBody(new Response(huge, { status: 500 }));
36
- expect(body.length).toBeLessThan(huge.length);
37
- expect(body.endsWith('…')).toBe(true);
38
- });
39
- it('returns short bodies verbatim', async () => {
40
- const body = await readErrorBody(new Response('boom', { status: 400 }));
41
- expect(body).toBe('boom');
42
- });
43
- });
44
- //# sourceMappingURL=http.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"http.test.js","sourceRoot":"","sources":["../../src/__tests__/http.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAA;AAE5D,OAAO,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAEtE;;;;GAIG;AACH,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,SAAS,CAAC,GAAG,EAAE,CAAC,EAAE,CAAC,eAAe,EAAE,CAAC,CAAA;IAErC,EAAE,CAAC,kEAAkE,EAAE,KAAK,IAAI,EAAE;QAChF,EAAE,CAAC,UAAU,CACX,OAAO,EACP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