@webiny/ai-powerups 6.5.0-beta.6 → 6.5.0-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import { AiCapability } from "../../../api/features/Capabilities/index.js";
2
- export declare const FM_IMAGE_ENRICHMENT_CAPABILITY = "fm.imageEnrichment";
2
+ export declare const FM_IMAGE_ENRICHMENT_CAPABILITY = "fmImageEnrichment";
3
3
  declare class FmImageEnrichmentCapabilityImpl implements AiCapability.Interface {
4
- readonly id = "fm.imageEnrichment";
4
+ readonly id = "fmImageEnrichment";
5
5
  readonly label = "Image enrichment";
6
6
  readonly description = "Reads an uploaded image and writes its alt text, title and tags. Needs a model that accepts image input.";
7
7
  readonly defaultRole: "vision";
@@ -1,5 +1,5 @@
1
1
  import { AiCapability } from "../Capabilities/index.js";
2
- const FM_IMAGE_ENRICHMENT_CAPABILITY = "fm.imageEnrichment";
2
+ const FM_IMAGE_ENRICHMENT_CAPABILITY = "fmImageEnrichment";
3
3
  const guidance = "Analyze this image and return up to 5 lowercase descriptive tags and one short sentence describing the image.";
4
4
  class FmImageEnrichmentCapabilityImpl {
5
5
  constructor(){
@@ -1 +1 @@
1
- {"version":3,"file":"api/features/AiImageEnrichment/capability.js","sources":["../../../../src/api/features/AiImageEnrichment/capability.ts"],"sourcesContent":["import { AiCapability } from \"~/api/features/Capabilities/index.js\";\n\nexport const FM_IMAGE_ENRICHMENT_CAPABILITY = \"fm.imageEnrichment\";\n\n/**\n * The prompt lives here rather than in the task now, because it is the capability's, and the\n * resolver hands it back with the project's additional instructions already appended.\n *\n * This is the one AI prompt whose structure does not come from the prose: `Output.object(...)` in\n * the task enforces the tags/description shape. House tag vocabularies go in additional\n * instructions (\"use our taxonomy\", \"no more than three tags\", \"British spelling\").\n */\nconst guidance =\n \"Analyze this image and return up to 5 lowercase descriptive tags and one short sentence describing the image.\";\n\nclass FmImageEnrichmentCapabilityImpl implements AiCapability.Interface {\n readonly id = FM_IMAGE_ENRICHMENT_CAPABILITY;\n readonly label = \"Image enrichment\";\n readonly description =\n \"Reads an uploaded image and writes its alt text, title and tags. Needs a model that accepts image input.\";\n readonly defaultRole = \"vision\" as const;\n readonly guidance = guidance;\n}\n\nexport const FmImageEnrichmentCapability = AiCapability.createImplementation({\n implementation: FmImageEnrichmentCapabilityImpl,\n dependencies: []\n});\n"],"names":["FM_IMAGE_ENRICHMENT_CAPABILITY","guidance","FmImageEnrichmentCapabilityImpl","FmImageEnrichmentCapability","AiCapability"],"mappings":";AAEO,MAAMA,iCAAiC;AAU9C,MAAMC,WACF;AAEJ,MAAMC;;aACO,EAAE,GAAGF;aACL,KAAK,GAAG;aACR,WAAW,GAChB;aACK,WAAW,GAAG;aACd,QAAQ,GAAGC;;AACxB;AAEO,MAAME,8BAA8BC,aAAa,oBAAoB,CAAC;IACzE,gBAAgBF;IAChB,cAAc,EAAE;AACpB"}
1
+ {"version":3,"file":"api/features/AiImageEnrichment/capability.js","sources":["../../../../src/api/features/AiImageEnrichment/capability.ts"],"sourcesContent":["import { AiCapability } from \"~/api/features/Capabilities/index.js\";\n\nexport const FM_IMAGE_ENRICHMENT_CAPABILITY = \"fmImageEnrichment\";\n\n/**\n * The prompt lives here rather than in the task now, because it is the capability's, and the\n * resolver hands it back with the project's additional instructions already appended.\n *\n * This is the one AI prompt whose structure does not come from the prose: `Output.object(...)` in\n * the task enforces the tags/description shape. House tag vocabularies go in additional\n * instructions (\"use our taxonomy\", \"no more than three tags\", \"British spelling\").\n */\nconst guidance =\n \"Analyze this image and return up to 5 lowercase descriptive tags and one short sentence describing the image.\";\n\nclass FmImageEnrichmentCapabilityImpl implements AiCapability.Interface {\n readonly id = FM_IMAGE_ENRICHMENT_CAPABILITY;\n readonly label = \"Image enrichment\";\n readonly description =\n \"Reads an uploaded image and writes its alt text, title and tags. Needs a model that accepts image input.\";\n readonly defaultRole = \"vision\" as const;\n readonly guidance = guidance;\n}\n\nexport const FmImageEnrichmentCapability = AiCapability.createImplementation({\n implementation: FmImageEnrichmentCapabilityImpl,\n dependencies: []\n});\n"],"names":["FM_IMAGE_ENRICHMENT_CAPABILITY","guidance","FmImageEnrichmentCapabilityImpl","FmImageEnrichmentCapability","AiCapability"],"mappings":";AAEO,MAAMA,iCAAiC;AAU9C,MAAMC,WACF;AAEJ,MAAMC;;aACO,EAAE,GAAGF;aACL,KAAK,GAAG;aACR,WAAW,GAChB;aACK,WAAW,GAAG;aACd,QAAQ,GAAGC;;AACxB;AAEO,MAAME,8BAA8BC,aAAa,oBAAoB,CAAC;IACzE,gBAAgBF;IAChB,cAAc,EAAE;AACpB"}
@@ -8,7 +8,13 @@ import type { AiModelRoleId } from "../../../api/features/ModelRoles/index.js";
8
8
  * row in Settings for free by registering a capability alongside it.
9
9
  */
10
10
  export interface IAiCapability {
11
- /** Stable, namespaced, and persisted as a settings key. Renaming one orphans its overrides. */
11
+ /**
12
+ * Stable, prefixed with its app (`cmsGenerateEntry`), and persisted as a settings key. Renaming
13
+ * one orphans its overrides.
14
+ *
15
+ * No dots. The id becomes a key under `capabilities.items`, and the settings form names its
16
+ * fields by dotted path, so `cms.generateEntry` reads as two levels of nesting.
17
+ */
12
18
  readonly id: string;
13
19
  readonly label: string;
14
20
  readonly description: string;
@@ -1 +1 @@
1
- {"version":3,"file":"api/features/Capabilities/abstractions.js","sources":["../../../../src/api/features/Capabilities/abstractions.ts"],"sourcesContent":["import { createAbstraction, Result } from \"@webiny/feature/api\";\nimport type { AiModelRoleId } from \"~/api/features/ModelRoles/index.js\";\n\n/**\n * One AI feature, declared so the settings screen can list it and a project can point it at a\n * different model or adjust its prompt.\n *\n * Features register these; nothing hardcodes the list. An extension that adds an AI feature gets a\n * row in Settings for free by registering a capability alongside it.\n */\nexport interface IAiCapability {\n /** Stable, namespaced, and persisted as a settings key. Renaming one orphans its overrides. */\n readonly id: string;\n readonly label: string;\n readonly description: string;\n /** Which role supplies the model when the project has not overridden this capability. */\n readonly defaultRole: AiModelRoleId;\n /**\n * The capability's fixed system-prompt block, owned by the code and not configurable.\n *\n * Leave it undefined when the prompt is assembled per request (from a content model schema, a\n * component catalog, a persona) and the use case builds its own system text instead.\n *\n * Either way a project can only append to it, via `additionalInstructions`. These prompts carry\n * the output contract the surrounding code parses, so they are implementation, not settings.\n */\n readonly guidance?: string;\n}\n\nexport const AiCapability = createAbstraction<IAiCapability>(\"AiPowerUpsAiCapability\");\n\nexport namespace AiCapability {\n export type Interface = IAiCapability;\n}\n\n/**\n * What a capability looks like to a caller outside the api.\n *\n * `guidance` is deliberately absent: a prompt is implementation, and there is no reason to ship ours\n * over the wire to anyone who can read settings.\n */\nexport interface IAiCapabilitySummary {\n id: string;\n label: string;\n description: string;\n defaultRole: AiModelRoleId;\n}\n\nexport interface IListAiCapabilitiesUseCase {\n execute(): Promise<IAiCapabilitySummary[]>;\n}\n\n/** Everything registered, for the settings screen to render a row per feature. */\nexport const ListAiCapabilitiesUseCase = createAbstraction<IListAiCapabilitiesUseCase>(\n \"AiPowerUpsListAiCapabilitiesUseCase\"\n);\n\nexport namespace ListAiCapabilitiesUseCase {\n export type Interface = IListAiCapabilitiesUseCase;\n export type Summary = IAiCapabilitySummary;\n}\n\nexport interface IResolvedAiCapability {\n capabilityId: string;\n /** Fully qualified, e.g. `\"anthropic/claude-sonnet-4-5\"`. */\n model: string;\n connection: {\n sdkName: string;\n apiKey: string;\n };\n /** Which role supplied the model. `null` when a capability override pinned it directly. */\n roleId: AiModelRoleId | null;\n /** True when the requested role was empty and `standard` filled in for it. */\n fellBackToStandard: boolean;\n /** The capability's own guidance. Empty when it assembles its prompt per request. */\n guidance: string;\n /** Project text to append to the system prompt. Empty when unset. */\n additionalInstructions: string;\n}\n\nexport interface IResolveAiCapabilityUseCase {\n execute(capabilityId: string): Promise<Result<IResolvedAiCapability, Error>>;\n}\n\nexport const ResolveAiCapabilityUseCase = createAbstraction<IResolveAiCapabilityUseCase>(\n \"AiPowerUpsResolveAiCapabilityUseCase\"\n);\n\nexport namespace ResolveAiCapabilityUseCase {\n export type Interface = IResolveAiCapabilityUseCase;\n export type Resolution = IResolvedAiCapability;\n}\n"],"names":["AiCapability","createAbstraction","ListAiCapabilitiesUseCase","ResolveAiCapabilityUseCase"],"mappings":";AA6BO,MAAMA,eAAeC,kBAAiC;AAwBtD,MAAMC,4BAA4BD,kBACrC;AA8BG,MAAME,6BAA6BF,kBACtC"}
1
+ {"version":3,"file":"api/features/Capabilities/abstractions.js","sources":["../../../../src/api/features/Capabilities/abstractions.ts"],"sourcesContent":["import { createAbstraction, Result } from \"@webiny/feature/api\";\nimport type { AiModelRoleId } from \"~/api/features/ModelRoles/index.js\";\n\n/**\n * One AI feature, declared so the settings screen can list it and a project can point it at a\n * different model or adjust its prompt.\n *\n * Features register these; nothing hardcodes the list. An extension that adds an AI feature gets a\n * row in Settings for free by registering a capability alongside it.\n */\nexport interface IAiCapability {\n /**\n * Stable, prefixed with its app (`cmsGenerateEntry`), and persisted as a settings key. Renaming\n * one orphans its overrides.\n *\n * No dots. The id becomes a key under `capabilities.items`, and the settings form names its\n * fields by dotted path, so `cms.generateEntry` reads as two levels of nesting.\n */\n readonly id: string;\n readonly label: string;\n readonly description: string;\n /** Which role supplies the model when the project has not overridden this capability. */\n readonly defaultRole: AiModelRoleId;\n /**\n * The capability's fixed system-prompt block, owned by the code and not configurable.\n *\n * Leave it undefined when the prompt is assembled per request (from a content model schema, a\n * component catalog, a persona) and the use case builds its own system text instead.\n *\n * Either way a project can only append to it, via `additionalInstructions`. These prompts carry\n * the output contract the surrounding code parses, so they are implementation, not settings.\n */\n readonly guidance?: string;\n}\n\nexport const AiCapability = createAbstraction<IAiCapability>(\"AiPowerUpsAiCapability\");\n\nexport namespace AiCapability {\n export type Interface = IAiCapability;\n}\n\n/**\n * What a capability looks like to a caller outside the api.\n *\n * `guidance` is deliberately absent: a prompt is implementation, and there is no reason to ship ours\n * over the wire to anyone who can read settings.\n */\nexport interface IAiCapabilitySummary {\n id: string;\n label: string;\n description: string;\n defaultRole: AiModelRoleId;\n}\n\nexport interface IListAiCapabilitiesUseCase {\n execute(): Promise<IAiCapabilitySummary[]>;\n}\n\n/** Everything registered, for the settings screen to render a row per feature. */\nexport const ListAiCapabilitiesUseCase = createAbstraction<IListAiCapabilitiesUseCase>(\n \"AiPowerUpsListAiCapabilitiesUseCase\"\n);\n\nexport namespace ListAiCapabilitiesUseCase {\n export type Interface = IListAiCapabilitiesUseCase;\n export type Summary = IAiCapabilitySummary;\n}\n\nexport interface IResolvedAiCapability {\n capabilityId: string;\n /** Fully qualified, e.g. `\"anthropic/claude-sonnet-4-5\"`. */\n model: string;\n connection: {\n sdkName: string;\n apiKey: string;\n };\n /** Which role supplied the model. `null` when a capability override pinned it directly. */\n roleId: AiModelRoleId | null;\n /** True when the requested role was empty and `standard` filled in for it. */\n fellBackToStandard: boolean;\n /** The capability's own guidance. Empty when it assembles its prompt per request. */\n guidance: string;\n /** Project text to append to the system prompt. Empty when unset. */\n additionalInstructions: string;\n}\n\nexport interface IResolveAiCapabilityUseCase {\n execute(capabilityId: string): Promise<Result<IResolvedAiCapability, Error>>;\n}\n\nexport const ResolveAiCapabilityUseCase = createAbstraction<IResolveAiCapabilityUseCase>(\n \"AiPowerUpsResolveAiCapabilityUseCase\"\n);\n\nexport namespace ResolveAiCapabilityUseCase {\n export type Interface = IResolveAiCapabilityUseCase;\n export type Resolution = IResolvedAiCapability;\n}\n"],"names":["AiCapability","createAbstraction","ListAiCapabilitiesUseCase","ResolveAiCapabilityUseCase"],"mappings":";AAmCO,MAAMA,eAAeC,kBAAiC;AAwBtD,MAAMC,4BAA4BD,kBACrC;AA8BG,MAAME,6BAA6BF,kBACtC"}
@@ -1,7 +1,7 @@
1
1
  import { AiCapability } from "../../../api/features/Capabilities/index.js";
2
- export declare const CMS_COMPARE_ENTRY_REVISIONS_CAPABILITY = "cms.compareEntryRevisions";
2
+ export declare const CMS_COMPARE_ENTRY_REVISIONS_CAPABILITY = "cmsCompareEntryRevisions";
3
3
  declare class CmsCompareEntryRevisionsCapabilityImpl implements AiCapability.Interface {
4
- readonly id = "cms.compareEntryRevisions";
4
+ readonly id = "cmsCompareEntryRevisions";
5
5
  readonly label = "CMS revision comparison";
6
6
  readonly description = "Summarises what changed between two revisions of an entry. Short, structural work that a smaller model handles well.";
7
7
  readonly defaultRole: "fast";
@@ -1,5 +1,5 @@
1
1
  import { AiCapability } from "../Capabilities/index.js";
2
- const CMS_COMPARE_ENTRY_REVISIONS_CAPABILITY = "cms.compareEntryRevisions";
2
+ const CMS_COMPARE_ENTRY_REVISIONS_CAPABILITY = "cmsCompareEntryRevisions";
3
3
  const guidance = `You are a content intelligence assistant specialized in version comparison for headless CMS platforms.
4
4
 
5
5
  I will provide:
@@ -1 +1 @@
1
- {"version":3,"file":"api/features/CmsCompareEntryRevisions/capability.js","sources":["../../../../src/api/features/CmsCompareEntryRevisions/capability.ts"],"sourcesContent":["import { AiCapability } from \"~/api/features/Capabilities/index.js\";\n\nexport const CMS_COMPARE_ENTRY_REVISIONS_CAPABILITY = \"cms.compareEntryRevisions\";\n\n/**\n * The output contract lives in this prompt: the use case regex-matches the HTML table it specifies\n * to build the summary, down to the literal \"No differences detected\" sentence and a count of\n * `<tr>` tags, and the dialog styles those classes. That is why a project can only append to it.\n */\nconst guidance = `You are a content intelligence assistant specialized in version comparison for headless CMS platforms.\n\nI will provide:\n\n1. The content model JSON Schema that defines the structure of the entry.\n2. Two versions of the content entry values in JSON format: Version A and Version B.\n\nYour task:\n\n- Parse both versions according to the JSON Schema.\n- Identify all differences between Version A and Version B.\n- For each difference, explain:\n - The field name (use the human-readable label from the schema description if available)\n - The value in Version A\n - The value in Version B\n - A brief summary of the change (e.g., \"Title changed from 'Old' to 'New'\")\n- If nested fields or objects exist, perform a deep comparison.\n- Return the comparison in clean HTML format.\n\nOutput format:\n\n<div class=\"comparison-report\">\n <table class=\"comparison-table\">\n <thead>\n <tr>\n <th>Field</th>\n <th>Version A</th>\n <th>Version B</th>\n <th>Change Summary</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td><strong>title</strong></td>\n <td>Launch Plan</td>\n <td>Updated Launch Plan</td>\n <td>Title changed from 'Launch Plan' to 'Updated Launch Plan'</td>\n </tr>\n </tbody>\n </table>\n</div>\n\nIf no differences are found, return: <div class=\"no-changes\"><h3>No differences detected between Version A and Version B.</h3></div>\n\nUse semantic HTML with appropriate CSS classes for styling. Do not include <style> tags or CSS — only return the HTML structure.\nFor rich text or complex nested values, show a concise summary rather than raw JSON.`;\n\nclass CmsCompareEntryRevisionsCapabilityImpl implements AiCapability.Interface {\n readonly id = CMS_COMPARE_ENTRY_REVISIONS_CAPABILITY;\n readonly label = \"CMS revision comparison\";\n readonly description =\n \"Summarises what changed between two revisions of an entry. Short, structural work that a smaller model handles well.\";\n readonly defaultRole = \"fast\" as const;\n readonly guidance = guidance;\n}\n\nexport const CmsCompareEntryRevisionsCapability = AiCapability.createImplementation({\n implementation: CmsCompareEntryRevisionsCapabilityImpl,\n dependencies: []\n});\n"],"names":["CMS_COMPARE_ENTRY_REVISIONS_CAPABILITY","guidance","CmsCompareEntryRevisionsCapabilityImpl","CmsCompareEntryRevisionsCapability","AiCapability"],"mappings":";AAEO,MAAMA,yCAAyC;AAOtD,MAAMC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oFA6CkE,CAAC;AAErF,MAAMC;;aACO,EAAE,GAAGF;aACL,KAAK,GAAG;aACR,WAAW,GAChB;aACK,WAAW,GAAG;aACd,QAAQ,GAAGC;;AACxB;AAEO,MAAME,qCAAqCC,aAAa,oBAAoB,CAAC;IAChF,gBAAgBF;IAChB,cAAc,EAAE;AACpB"}
1
+ {"version":3,"file":"api/features/CmsCompareEntryRevisions/capability.js","sources":["../../../../src/api/features/CmsCompareEntryRevisions/capability.ts"],"sourcesContent":["import { AiCapability } from \"~/api/features/Capabilities/index.js\";\n\nexport const CMS_COMPARE_ENTRY_REVISIONS_CAPABILITY = \"cmsCompareEntryRevisions\";\n\n/**\n * The output contract lives in this prompt: the use case regex-matches the HTML table it specifies\n * to build the summary, down to the literal \"No differences detected\" sentence and a count of\n * `<tr>` tags, and the dialog styles those classes. That is why a project can only append to it.\n */\nconst guidance = `You are a content intelligence assistant specialized in version comparison for headless CMS platforms.\n\nI will provide:\n\n1. The content model JSON Schema that defines the structure of the entry.\n2. Two versions of the content entry values in JSON format: Version A and Version B.\n\nYour task:\n\n- Parse both versions according to the JSON Schema.\n- Identify all differences between Version A and Version B.\n- For each difference, explain:\n - The field name (use the human-readable label from the schema description if available)\n - The value in Version A\n - The value in Version B\n - A brief summary of the change (e.g., \"Title changed from 'Old' to 'New'\")\n- If nested fields or objects exist, perform a deep comparison.\n- Return the comparison in clean HTML format.\n\nOutput format:\n\n<div class=\"comparison-report\">\n <table class=\"comparison-table\">\n <thead>\n <tr>\n <th>Field</th>\n <th>Version A</th>\n <th>Version B</th>\n <th>Change Summary</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <td><strong>title</strong></td>\n <td>Launch Plan</td>\n <td>Updated Launch Plan</td>\n <td>Title changed from 'Launch Plan' to 'Updated Launch Plan'</td>\n </tr>\n </tbody>\n </table>\n</div>\n\nIf no differences are found, return: <div class=\"no-changes\"><h3>No differences detected between Version A and Version B.</h3></div>\n\nUse semantic HTML with appropriate CSS classes for styling. Do not include <style> tags or CSS — only return the HTML structure.\nFor rich text or complex nested values, show a concise summary rather than raw JSON.`;\n\nclass CmsCompareEntryRevisionsCapabilityImpl implements AiCapability.Interface {\n readonly id = CMS_COMPARE_ENTRY_REVISIONS_CAPABILITY;\n readonly label = \"CMS revision comparison\";\n readonly description =\n \"Summarises what changed between two revisions of an entry. Short, structural work that a smaller model handles well.\";\n readonly defaultRole = \"fast\" as const;\n readonly guidance = guidance;\n}\n\nexport const CmsCompareEntryRevisionsCapability = AiCapability.createImplementation({\n implementation: CmsCompareEntryRevisionsCapabilityImpl,\n dependencies: []\n});\n"],"names":["CMS_COMPARE_ENTRY_REVISIONS_CAPABILITY","guidance","CmsCompareEntryRevisionsCapabilityImpl","CmsCompareEntryRevisionsCapability","AiCapability"],"mappings":";AAEO,MAAMA,yCAAyC;AAOtD,MAAMC,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oFA6CkE,CAAC;AAErF,MAAMC;;aACO,EAAE,GAAGF;aACL,KAAK,GAAG;aACR,WAAW,GAChB;aACK,WAAW,GAAG;aACd,QAAQ,GAAGC;;AACxB;AAEO,MAAME,qCAAqCC,aAAa,oBAAoB,CAAC;IAChF,gBAAgBF;IAChB,cAAc,EAAE;AACpB"}
@@ -1,12 +1,12 @@
1
1
  import { AiCapability } from "../../../api/features/Capabilities/index.js";
2
- export declare const CMS_GENERATE_ENTRY_CAPABILITY = "cms.generateEntry";
2
+ export declare const CMS_GENERATE_ENTRY_CAPABILITY = "cmsGenerateEntry";
3
3
  /**
4
4
  * No `guidance`: this prompt is rebuilt on every request from the content model's JSON Schema and
5
5
  * the File Manager's current image tags, so there is no fixed block a project could replace without
6
6
  * dropping the schema the output has to conform to. Additional instructions still apply.
7
7
  */
8
8
  declare class CmsGenerateEntryCapabilityImpl implements AiCapability.Interface {
9
- readonly id = "cms.generateEntry";
9
+ readonly id = "cmsGenerateEntry";
10
10
  readonly label = "CMS entry generation";
11
11
  readonly description = "Writes a content entry from a prompt, following the content model's schema and picking images from the File Manager.";
12
12
  readonly defaultRole: "standard";
@@ -1,5 +1,5 @@
1
1
  import { AiCapability } from "../Capabilities/index.js";
2
- const CMS_GENERATE_ENTRY_CAPABILITY = "cms.generateEntry";
2
+ const CMS_GENERATE_ENTRY_CAPABILITY = "cmsGenerateEntry";
3
3
  class CmsGenerateEntryCapabilityImpl {
4
4
  constructor(){
5
5
  this.id = CMS_GENERATE_ENTRY_CAPABILITY;
@@ -1 +1 @@
1
- {"version":3,"file":"api/features/CmsGenerateEntryContent/capability.js","sources":["../../../../src/api/features/CmsGenerateEntryContent/capability.ts"],"sourcesContent":["import { AiCapability } from \"~/api/features/Capabilities/index.js\";\n\nexport const CMS_GENERATE_ENTRY_CAPABILITY = \"cms.generateEntry\";\n\n/**\n * No `guidance`: this prompt is rebuilt on every request from the content model's JSON Schema and\n * the File Manager's current image tags, so there is no fixed block a project could replace without\n * dropping the schema the output has to conform to. Additional instructions still apply.\n */\nclass CmsGenerateEntryCapabilityImpl implements AiCapability.Interface {\n readonly id = CMS_GENERATE_ENTRY_CAPABILITY;\n readonly label = \"CMS entry generation\";\n readonly description =\n \"Writes a content entry from a prompt, following the content model's schema and picking images from the File Manager.\";\n readonly defaultRole = \"standard\" as const;\n}\n\nexport const CmsGenerateEntryCapability = AiCapability.createImplementation({\n implementation: CmsGenerateEntryCapabilityImpl,\n dependencies: []\n});\n"],"names":["CMS_GENERATE_ENTRY_CAPABILITY","CmsGenerateEntryCapabilityImpl","CmsGenerateEntryCapability","AiCapability"],"mappings":";AAEO,MAAMA,gCAAgC;AAO7C,MAAMC;;aACO,EAAE,GAAGD;aACL,KAAK,GAAG;aACR,WAAW,GAChB;aACK,WAAW,GAAG;;AAC3B;AAEO,MAAME,6BAA6BC,aAAa,oBAAoB,CAAC;IACxE,gBAAgBF;IAChB,cAAc,EAAE;AACpB"}
1
+ {"version":3,"file":"api/features/CmsGenerateEntryContent/capability.js","sources":["../../../../src/api/features/CmsGenerateEntryContent/capability.ts"],"sourcesContent":["import { AiCapability } from \"~/api/features/Capabilities/index.js\";\n\nexport const CMS_GENERATE_ENTRY_CAPABILITY = \"cmsGenerateEntry\";\n\n/**\n * No `guidance`: this prompt is rebuilt on every request from the content model's JSON Schema and\n * the File Manager's current image tags, so there is no fixed block a project could replace without\n * dropping the schema the output has to conform to. Additional instructions still apply.\n */\nclass CmsGenerateEntryCapabilityImpl implements AiCapability.Interface {\n readonly id = CMS_GENERATE_ENTRY_CAPABILITY;\n readonly label = \"CMS entry generation\";\n readonly description =\n \"Writes a content entry from a prompt, following the content model's schema and picking images from the File Manager.\";\n readonly defaultRole = \"standard\" as const;\n}\n\nexport const CmsGenerateEntryCapability = AiCapability.createImplementation({\n implementation: CmsGenerateEntryCapabilityImpl,\n dependencies: []\n});\n"],"names":["CMS_GENERATE_ENTRY_CAPABILITY","CmsGenerateEntryCapabilityImpl","CmsGenerateEntryCapability","AiCapability"],"mappings":";AAEO,MAAMA,gCAAgC;AAO7C,MAAMC;;aACO,EAAE,GAAGD;aACL,KAAK,GAAG;aACR,WAAW,GAChB;aACK,WAAW,GAAG;;AAC3B;AAEO,MAAME,6BAA6BC,aAAa,oBAAoB,CAAC;IACxE,gBAAgBF;IAChB,cAAc,EAAE;AACpB"}
@@ -1,11 +1,11 @@
1
1
  import { AiCapability } from "../../../api/features/Capabilities/index.js";
2
- export declare const WB_GENERATE_PAGE_CAPABILITY = "wb.generatePage";
2
+ export declare const WB_GENERATE_PAGE_CAPABILITY = "wbGeneratePage";
3
3
  /**
4
4
  * No `guidance`, for the same reason as CMS entry generation: the prompt carries the component
5
5
  * catalog and the tool definitions, both computed per request.
6
6
  */
7
7
  declare class WbGeneratePageCapabilityImpl implements AiCapability.Interface {
8
- readonly id = "wb.generatePage";
8
+ readonly id = "wbGeneratePage";
9
9
  readonly label = "Page generation";
10
10
  readonly description = "Writes page content from a prompt using the Website Builder components available in the project.";
11
11
  readonly defaultRole: "standard";
@@ -1,5 +1,5 @@
1
1
  import { AiCapability } from "../Capabilities/index.js";
2
- const WB_GENERATE_PAGE_CAPABILITY = "wb.generatePage";
2
+ const WB_GENERATE_PAGE_CAPABILITY = "wbGeneratePage";
3
3
  class WbGeneratePageCapabilityImpl {
4
4
  constructor(){
5
5
  this.id = WB_GENERATE_PAGE_CAPABILITY;
@@ -1 +1 @@
1
- {"version":3,"file":"api/features/WbGeneratePageContent/capability.js","sources":["../../../../src/api/features/WbGeneratePageContent/capability.ts"],"sourcesContent":["import { AiCapability } from \"~/api/features/Capabilities/index.js\";\n\nexport const WB_GENERATE_PAGE_CAPABILITY = \"wb.generatePage\";\n\n/**\n * No `guidance`, for the same reason as CMS entry generation: the prompt carries the component\n * catalog and the tool definitions, both computed per request.\n */\nclass WbGeneratePageCapabilityImpl implements AiCapability.Interface {\n readonly id = WB_GENERATE_PAGE_CAPABILITY;\n readonly label = \"Page generation\";\n readonly description =\n \"Writes page content from a prompt using the Website Builder components available in the project.\";\n readonly defaultRole = \"standard\" as const;\n}\n\nexport const WbGeneratePageCapability = AiCapability.createImplementation({\n implementation: WbGeneratePageCapabilityImpl,\n dependencies: []\n});\n"],"names":["WB_GENERATE_PAGE_CAPABILITY","WbGeneratePageCapabilityImpl","WbGeneratePageCapability","AiCapability"],"mappings":";AAEO,MAAMA,8BAA8B;AAM3C,MAAMC;;aACO,EAAE,GAAGD;aACL,KAAK,GAAG;aACR,WAAW,GAChB;aACK,WAAW,GAAG;;AAC3B;AAEO,MAAME,2BAA2BC,aAAa,oBAAoB,CAAC;IACtE,gBAAgBF;IAChB,cAAc,EAAE;AACpB"}
1
+ {"version":3,"file":"api/features/WbGeneratePageContent/capability.js","sources":["../../../../src/api/features/WbGeneratePageContent/capability.ts"],"sourcesContent":["import { AiCapability } from \"~/api/features/Capabilities/index.js\";\n\nexport const WB_GENERATE_PAGE_CAPABILITY = \"wbGeneratePage\";\n\n/**\n * No `guidance`, for the same reason as CMS entry generation: the prompt carries the component\n * catalog and the tool definitions, both computed per request.\n */\nclass WbGeneratePageCapabilityImpl implements AiCapability.Interface {\n readonly id = WB_GENERATE_PAGE_CAPABILITY;\n readonly label = \"Page generation\";\n readonly description =\n \"Writes page content from a prompt using the Website Builder components available in the project.\";\n readonly defaultRole = \"standard\" as const;\n}\n\nexport const WbGeneratePageCapability = AiCapability.createImplementation({\n implementation: WbGeneratePageCapabilityImpl,\n dependencies: []\n});\n"],"names":["WB_GENERATE_PAGE_CAPABILITY","WbGeneratePageCapabilityImpl","WbGeneratePageCapability","AiCapability"],"mappings":";AAEO,MAAMA,8BAA8B;AAM3C,MAAMC;;aACO,EAAE,GAAGD;aACL,KAAK,GAAG;aACR,WAAW,GAChB;aACK,WAAW,GAAG;;AAC3B;AAEO,MAAME,2BAA2BC,aAAa,oBAAoB,CAAC;IACtE,gBAAgBF;IAChB,cAAc,EAAE;AACpB"}
@@ -1,7 +1,7 @@
1
1
  import { AiCapability } from "../../../api/features/Capabilities/index.js";
2
- export declare const WB_TRANSLATE_PAGE_CAPABILITY = "wb.translatePage";
2
+ export declare const WB_TRANSLATE_PAGE_CAPABILITY = "wbTranslatePage";
3
3
  declare class WbTranslatePageCapabilityImpl implements AiCapability.Interface {
4
- readonly id = "wb.translatePage";
4
+ readonly id = "wbTranslatePage";
5
5
  readonly label = "Page translation";
6
6
  readonly description = "Translates the text on a page into another language, preserving placeholders.";
7
7
  readonly defaultRole: "standard";
@@ -1,5 +1,5 @@
1
1
  import { AiCapability } from "../Capabilities/index.js";
2
- const WB_TRANSLATE_PAGE_CAPABILITY = "wb.translatePage";
2
+ const WB_TRANSLATE_PAGE_CAPABILITY = "wbTranslatePage";
3
3
  const guidance = "You are a professional translator. Translate all user-provided text to the requested target language, preserving placeholders and formatting. Return a JSON object with the same keys, only changing the values.";
4
4
  class WbTranslatePageCapabilityImpl {
5
5
  constructor(){
@@ -1 +1 @@
1
- {"version":3,"file":"api/features/WbTranslatePage/capability.js","sources":["../../../../src/api/features/WbTranslatePage/capability.ts"],"sourcesContent":["import { AiCapability } from \"~/api/features/Capabilities/index.js\";\n\nexport const WB_TRANSLATE_PAGE_CAPABILITY = \"wb.translatePage\";\n\n/**\n * The target language used to be interpolated into this sentence. It moved to the user prompt so\n * the instructions could become fixed text a project can replace, which is worth doing here: house\n * translation rules (keep product names in English, use formal address, never translate these\n * twelve terms) are the most commonly requested prompt change in the whole feature set.\n */\nconst guidance =\n \"You are a professional translator. Translate all user-provided text to the requested target language, preserving placeholders and formatting. Return a JSON object with the same keys, only changing the values.\";\n\nclass WbTranslatePageCapabilityImpl implements AiCapability.Interface {\n readonly id = WB_TRANSLATE_PAGE_CAPABILITY;\n readonly label = \"Page translation\";\n readonly description =\n \"Translates the text on a page into another language, preserving placeholders.\";\n readonly defaultRole = \"standard\" as const;\n readonly guidance = guidance;\n}\n\nexport const WbTranslatePageCapability = AiCapability.createImplementation({\n implementation: WbTranslatePageCapabilityImpl,\n dependencies: []\n});\n"],"names":["WB_TRANSLATE_PAGE_CAPABILITY","guidance","WbTranslatePageCapabilityImpl","WbTranslatePageCapability","AiCapability"],"mappings":";AAEO,MAAMA,+BAA+B;AAQ5C,MAAMC,WACF;AAEJ,MAAMC;;aACO,EAAE,GAAGF;aACL,KAAK,GAAG;aACR,WAAW,GAChB;aACK,WAAW,GAAG;aACd,QAAQ,GAAGC;;AACxB;AAEO,MAAME,4BAA4BC,aAAa,oBAAoB,CAAC;IACvE,gBAAgBF;IAChB,cAAc,EAAE;AACpB"}
1
+ {"version":3,"file":"api/features/WbTranslatePage/capability.js","sources":["../../../../src/api/features/WbTranslatePage/capability.ts"],"sourcesContent":["import { AiCapability } from \"~/api/features/Capabilities/index.js\";\n\nexport const WB_TRANSLATE_PAGE_CAPABILITY = \"wbTranslatePage\";\n\n/**\n * The target language used to be interpolated into this sentence. It moved to the user prompt so\n * the instructions could become fixed text a project can replace, which is worth doing here: house\n * translation rules (keep product names in English, use formal address, never translate these\n * twelve terms) are the most commonly requested prompt change in the whole feature set.\n */\nconst guidance =\n \"You are a professional translator. Translate all user-provided text to the requested target language, preserving placeholders and formatting. Return a JSON object with the same keys, only changing the values.\";\n\nclass WbTranslatePageCapabilityImpl implements AiCapability.Interface {\n readonly id = WB_TRANSLATE_PAGE_CAPABILITY;\n readonly label = \"Page translation\";\n readonly description =\n \"Translates the text on a page into another language, preserving placeholders.\";\n readonly defaultRole = \"standard\" as const;\n readonly guidance = guidance;\n}\n\nexport const WbTranslatePageCapability = AiCapability.createImplementation({\n implementation: WbTranslatePageCapabilityImpl,\n dependencies: []\n});\n"],"names":["WB_TRANSLATE_PAGE_CAPABILITY","guidance","WbTranslatePageCapabilityImpl","WbTranslatePageCapability","AiCapability"],"mappings":";AAEO,MAAMA,+BAA+B;AAQ5C,MAAMC,WACF;AAEJ,MAAMC;;aACO,EAAE,GAAGF;aACL,KAAK,GAAG;aACR,WAAW,GAChB;aACK,WAAW,GAAG;aACd,QAAQ,GAAGC;;AACxB;AAEO,MAAME,4BAA4BC,aAAa,oBAAoB,CAAC;IACvE,gBAAgBF;IAChB,cAAc,EAAE;AACpB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/ai-powerups",
3
- "version": "6.5.0-beta.6",
3
+ "version": "6.5.0-beta.7",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "exports": {
@@ -18,26 +18,26 @@
18
18
  "author": "Webiny Ltd.",
19
19
  "license": "Webiny Enterprise",
20
20
  "dependencies": {
21
- "@webiny/admin-ui": "6.5.0-beta.6",
22
- "@webiny/api-core": "6.5.0-beta.6",
23
- "@webiny/api-file-manager": "6.5.0-beta.6",
24
- "@webiny/api-headless-cms": "6.5.0-beta.6",
25
- "@webiny/api-website-builder": "6.5.0-beta.6",
26
- "@webiny/api-websockets": "6.5.0-beta.6",
27
- "@webiny/app": "6.5.0-beta.6",
28
- "@webiny/app-admin": "6.5.0-beta.6",
29
- "@webiny/app-headless-cms": "6.5.0-beta.6",
30
- "@webiny/app-website-builder": "6.5.0-beta.6",
31
- "@webiny/app-websockets": "6.5.0-beta.6",
32
- "@webiny/background-tasks": "6.5.0-beta.6",
21
+ "@webiny/admin-ui": "6.5.0-beta.7",
22
+ "@webiny/api-core": "6.5.0-beta.7",
23
+ "@webiny/api-file-manager": "6.5.0-beta.7",
24
+ "@webiny/api-headless-cms": "6.5.0-beta.7",
25
+ "@webiny/api-website-builder": "6.5.0-beta.7",
26
+ "@webiny/api-websockets": "6.5.0-beta.7",
27
+ "@webiny/app": "6.5.0-beta.7",
28
+ "@webiny/app-admin": "6.5.0-beta.7",
29
+ "@webiny/app-headless-cms": "6.5.0-beta.7",
30
+ "@webiny/app-website-builder": "6.5.0-beta.7",
31
+ "@webiny/app-websockets": "6.5.0-beta.7",
32
+ "@webiny/background-tasks": "6.5.0-beta.7",
33
33
  "@webiny/di": "1.1.0",
34
- "@webiny/feature": "6.5.0-beta.6",
35
- "@webiny/icons": "6.5.0-beta.6",
36
- "@webiny/languages": "6.5.0-beta.6",
37
- "@webiny/lexical-converter": "6.5.0-beta.6",
38
- "@webiny/project": "6.5.0-beta.6",
39
- "@webiny/project-aws": "6.5.0-beta.6",
40
- "@webiny/utils": "6.5.0-beta.6",
34
+ "@webiny/feature": "6.5.0-beta.7",
35
+ "@webiny/icons": "6.5.0-beta.7",
36
+ "@webiny/languages": "6.5.0-beta.7",
37
+ "@webiny/lexical-converter": "6.5.0-beta.7",
38
+ "@webiny/project": "6.5.0-beta.7",
39
+ "@webiny/project-aws": "6.5.0-beta.7",
40
+ "@webiny/utils": "6.5.0-beta.7",
41
41
  "ai": "7.0.118",
42
42
  "front-matter": "4.0.2",
43
43
  "happy-dom": "20.14.5",
@@ -49,11 +49,11 @@
49
49
  "zod": "4.6.5"
50
50
  },
51
51
  "devDependencies": {
52
- "@webiny/build-tools": "6.5.0-beta.6",
53
- "@webiny/handler-aws": "6.5.0-beta.6",
54
- "@webiny/handler-graphql": "6.5.0-beta.6",
55
- "@webiny/project-utils": "6.5.0-beta.6",
56
- "@webiny/wcp": "6.5.0-beta.6",
52
+ "@webiny/build-tools": "6.5.0-beta.7",
53
+ "@webiny/handler-aws": "6.5.0-beta.7",
54
+ "@webiny/handler-graphql": "6.5.0-beta.7",
55
+ "@webiny/project-utils": "6.5.0-beta.7",
56
+ "@webiny/wcp": "6.5.0-beta.7",
57
57
  "rimraf": "6.1.3",
58
58
  "typescript": "7.0.2",
59
59
  "vitest": "5.0.2"