@easysociable/cli 0.1.15 → 0.1.17

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.
@@ -14621,9 +14621,9 @@ function convertBaseSchema(schema, ctx) {
14621
14621
  zodSchema = z.record(keySchema, valueSchema);
14622
14622
  break;
14623
14623
  }
14624
- const objectSchema3 = z.object(shape).passthrough();
14624
+ const objectSchema2 = z.object(shape).passthrough();
14625
14625
  const recordSchema = z.looseRecord(keySchema, valueSchema);
14626
- zodSchema = z.intersection(objectSchema3, recordSchema);
14626
+ zodSchema = z.intersection(objectSchema2, recordSchema);
14627
14627
  break;
14628
14628
  }
14629
14629
  if (schema.patternProperties) {
@@ -14653,13 +14653,13 @@ function convertBaseSchema(schema, ctx) {
14653
14653
  }
14654
14654
  break;
14655
14655
  }
14656
- const objectSchema2 = z.object(shape);
14656
+ const objectSchema = z.object(shape);
14657
14657
  if (schema.additionalProperties === false) {
14658
- zodSchema = objectSchema2.strict();
14658
+ zodSchema = objectSchema.strict();
14659
14659
  } else if (typeof schema.additionalProperties === "object") {
14660
- zodSchema = objectSchema2.catchall(convertSchema(schema.additionalProperties, ctx));
14660
+ zodSchema = objectSchema.catchall(convertSchema(schema.additionalProperties, ctx));
14661
14661
  } else {
14662
- zodSchema = objectSchema2.passthrough();
14662
+ zodSchema = objectSchema.passthrough();
14663
14663
  }
14664
14664
  break;
14665
14665
  }
@@ -31439,6 +31439,19 @@ var init_validate_tool_input = __esm({
31439
31439
  });
31440
31440
 
31441
31441
  // ../../packages/mcp-common/src/server.ts
31442
+ function mapAnnotations(tool) {
31443
+ const isReadOnly = tool.effect === "read-only" || tool.effect === "explicit-owned-account-read";
31444
+ const isDestructive = tool.effect === "explicit-approval" || tool.name.startsWith("delete_") || tool.name.startsWith("trash_");
31445
+ const isIdempotent = isReadOnly || tool.name.startsWith("archive_") || tool.name.startsWith("restore_") || tool.name.startsWith("attest_");
31446
+ return {
31447
+ title: tool.title,
31448
+ readOnlyHint: isReadOnly,
31449
+ destructiveHint: isDestructive,
31450
+ idempotentHint: isIdempotent,
31451
+ openWorldHint: false,
31452
+ effect: tool.effect
31453
+ };
31454
+ }
31442
31455
  function createMcpServer(options) {
31443
31456
  const server = new Server(
31444
31457
  { name: options.name, version: options.version },
@@ -31450,7 +31463,8 @@ function createMcpServer(options) {
31450
31463
  title: tool.title,
31451
31464
  description: tool.description,
31452
31465
  inputSchema: tool.inputSchema,
31453
- annotations: { effect: tool.effect }
31466
+ outputSchema: tool.outputSchema,
31467
+ annotations: mapAnnotations(tool)
31454
31468
  }))
31455
31469
  }));
31456
31470
  server.setRequestHandler(ListResourceTemplatesRequestSchema, async () => ({
@@ -31758,104 +31772,106 @@ var init_src4 = __esm({
31758
31772
  {
31759
31773
  name: "list_templates",
31760
31774
  title: "List templates",
31761
- description: "List public template catalog summaries from Gateway (filterable; no AST). Paged: follow nextCursor, or pass all=true with platforms to get the whole platform catalog before choosing. For Slideshow page choice prefer recommend_slideshow_templates.",
31775
+ description: "List public template catalog summaries from Gateway (filterable by platform, role, density, canvasPreset). For Slideshow page template selection, prefer recommend_slideshow_templates. Alternatives: Use get_template to inspect specific slot requirements. Read-only catalog query.",
31762
31776
  effect: "read-only",
31763
31777
  inputSchema: {
31764
31778
  type: "object",
31765
31779
  properties: {
31766
- platforms: { type: "array", items: { type: "string" } },
31767
- roles: { type: "array", items: { type: "string" } },
31768
- contentFamily: { type: "string" },
31769
- contentArchetypes: { type: "array", items: { type: "string" } },
31770
- density: { type: "string" },
31771
- canvasPreset: { type: "string" },
31772
- requiresImage: { type: "boolean" },
31773
- locale: { type: "string" },
31774
- q: { type: "string" },
31775
- limit: { type: "number" },
31776
- cursor: { type: "string" },
31777
- all: { type: "boolean" }
31780
+ platforms: { type: "array", items: { type: "string" }, description: "Platform filter: tiktok | linkedin | instagram | threads | xiaohongshu" },
31781
+ roles: { type: "array", items: { type: "string" }, description: "Narrative role filter: hook | value | rehook | cta" },
31782
+ contentFamily: { type: "string", description: "Content family filter." },
31783
+ contentArchetypes: { type: "array", items: { type: "string" }, description: "Content archetypes list." },
31784
+ density: { type: "string", description: "Density filter: sparse | normal | dense" },
31785
+ canvasPreset: { type: "string", description: "Aspect ratio preset (e.g. 9:16, 4:5, 1:1, 3:4)." },
31786
+ requiresImage: { type: "boolean", description: "Filter templates that require an image slot." },
31787
+ locale: { type: "string", description: "Language/locale code (e.g. en, zh-CN)." },
31788
+ q: { type: "string", description: "Search term matching template name or description." },
31789
+ limit: { type: "number", description: "Max items per page." },
31790
+ cursor: { type: "string", description: "Pagination cursor from previous nextCursor." },
31791
+ all: { type: "boolean", description: "Fetch all matching templates across pages." }
31778
31792
  },
31779
31793
  additionalProperties: false
31780
31794
  },
31781
- outputSchema: { type: "object", properties: { templates: { type: "array" }, nextCursor: { type: ["string", "null"] } } }
31795
+ outputSchema: { type: "object", properties: { templates: { type: "array", description: "Template summaries." }, nextCursor: { type: ["string", "null"], description: "Cursor for next page." } } }
31782
31796
  },
31783
31797
  {
31784
31798
  name: "get_template",
31785
31799
  title: "Get template",
31786
- description: "Get one published template detail including the public slots[] table (key/type/required/constraints). Use slots to fill create_render_job. Never returns AST or bindingMap.",
31800
+ description: "Get one published template detail including the public slots[] table (key, type, required, constraints). Use slots to bind slide copy in create_slideshow_run or inspect template constraints. Alternatives: Use list_templates to browse catalog. Read-only catalog query.",
31787
31801
  effect: "read-only",
31788
31802
  inputSchema: {
31789
31803
  type: "object",
31790
- properties: { templateId: { type: "string" } },
31804
+ properties: { templateId: { type: "string", description: "The unique published template identifier to retrieve." } },
31791
31805
  required: ["templateId"],
31792
31806
  additionalProperties: false
31793
31807
  },
31794
31808
  outputSchema: {
31795
31809
  type: "object",
31796
31810
  properties: {
31797
- id: { type: "string" },
31798
- slots: { type: "array" }
31811
+ id: { type: "string", description: "Published template ID." },
31812
+ slots: { type: "array", description: "Public slots table." }
31799
31813
  }
31800
31814
  }
31801
31815
  },
31802
31816
  {
31803
31817
  name: "list_gradients",
31804
31818
  title: "List gradients",
31805
- description: "List or search platform gradient recipe summaries by keyword query or tag (Gateway catalog only). Prefer small limit for Agent token budget.",
31819
+ description: "List or search platform gradient recipe summaries by keyword query or tag. Call to discover gradient presets before styling cards. Alternatives: Use get_gradient to retrieve full CSS declaration for a specific gradientId. Read-only platform catalog query.",
31806
31820
  effect: "read-only",
31807
31821
  inputSchema: {
31808
31822
  type: "object",
31809
31823
  properties: {
31810
- tag: { type: "string" },
31811
- q: { type: "string" },
31812
- limit: { type: "number" }
31824
+ tag: { type: "string", description: "Style tag filter (e.g. vibrant, subtle, dark, pastel)." },
31825
+ q: { type: "string", description: "Search term matching gradient name or tone." },
31826
+ limit: { type: "number", description: "Max items to return (prefer small limit for token budget)." }
31813
31827
  },
31814
31828
  additionalProperties: false
31815
31829
  },
31816
- outputSchema: { type: "object", properties: { gradients: { type: "array" } } }
31830
+ outputSchema: { type: "object", properties: { gradients: { type: "array", description: "Array of gradient summaries." } } }
31817
31831
  },
31818
31832
  {
31819
31833
  name: "get_gradient",
31820
31834
  title: "Get gradient",
31821
- description: "Get full gradient CSS recipe for Authoring decoration materialization after user confirmation",
31835
+ description: "Retrieve the full gradient CSS recipe (linear angle, color stops, and semantic token values) for a specific gradient by gradientId. Call after list_gradients to materialize background styles or decorative surfaces on cards. Alternatives: Use list_gradients to search available recipes. Read-only platform catalog lookup. Returns full gradient recipe object.",
31822
31836
  effect: "read-only",
31823
31837
  inputSchema: {
31824
31838
  type: "object",
31825
- properties: { gradientId: { type: "string" } },
31839
+ properties: {
31840
+ gradientId: { type: "string", description: "The unique identifier of the gradient preset (e.g. grad_warm_sunset)." }
31841
+ },
31826
31842
  required: ["gradientId"],
31827
31843
  additionalProperties: false
31828
31844
  },
31829
- outputSchema: { type: "object", properties: {} }
31845
+ outputSchema: { type: "object", properties: { id: { type: "string", description: "Gradient preset identifier." }, css: { type: "string", description: "Full CSS linear-gradient declaration." } } }
31830
31846
  },
31831
31847
  {
31832
31848
  name: "search_icons",
31833
31849
  title: "Search icons",
31834
- description: "Search the internal Template Icon Catalog (Gateway-only; allowlisted Iconify collections). Read-only \u2014 does not materialize assets. Prefer \u22648 candidates and wait for user confirmation before get_icon.",
31850
+ description: "Search the internal safe Template Icon Catalog (curated Iconify collections) by keyword, collection, or visual style. Use when designing templates or adding icon decorations. Select \u22648 candidates and confirm choice before materializing. Alternatives: Call get_icon once an iconId is selected to generate the immutable asset. Read-only catalog search; does not consume quota.",
31835
31851
  effect: "read-only",
31836
31852
  inputSchema: {
31837
31853
  type: "object",
31838
31854
  properties: {
31839
- query: { type: "string" },
31840
- collection: { type: "string" },
31841
- style: { type: "string", description: "outline | solid | any" },
31842
- limit: { type: "number" }
31855
+ query: { type: "string", description: "Search term for icon meaning or keyword (e.g. arrow, checkmark, star)." },
31856
+ collection: { type: "string", description: "Optional icon collection filter (e.g. lucide, tabler)." },
31857
+ style: { type: "string", description: "Icon rendering style: outline | solid | any" },
31858
+ limit: { type: "number", description: "Max number of candidates to return (default 8; prefer small limits for token budget)." }
31843
31859
  },
31844
31860
  required: ["query"],
31845
31861
  additionalProperties: false
31846
31862
  },
31847
- outputSchema: { type: "object", properties: { icons: { type: "array" } } }
31863
+ outputSchema: { type: "object", properties: { icons: { type: "array", description: "Candidate icons array with id, name, and previewSvg." } } }
31848
31864
  },
31849
31865
  {
31850
31866
  name: "get_icon",
31851
31867
  title: "Get / materialize icon",
31852
- description: "After the user confirms one search_icons candidate, materialize an immutable TemplateIconAsset via Gateway. Requires idempotencyKey. Returns canonicalSvg + iconAssetId. Never call Iconify or Better Icons from the client.",
31868
+ description: "Materialize an immutable TemplateIconAsset via Gateway from a confirmed iconId. Call after confirming a candidate from search_icons. Requires idempotencyKey to prevent duplicate creation. Idempotent: repeated calls with identical keys return the existing asset without consuming extra quota. Returns canonical SVG string, iconAssetId, and contentHash.",
31853
31869
  effect: "local-write-job",
31854
31870
  inputSchema: {
31855
31871
  type: "object",
31856
31872
  properties: {
31857
- iconId: { type: "string", description: "e.g. lucide:arrow-right" },
31858
- idempotencyKey: { type: "string" }
31873
+ iconId: { type: "string", description: "Canonical icon identifier confirmed from search_icons (e.g. lucide:arrow-right)." },
31874
+ idempotencyKey: { type: "string", description: "Unique idempotency key to prevent duplicate icon asset creation." }
31859
31875
  },
31860
31876
  required: ["iconId", "idempotencyKey"],
31861
31877
  additionalProperties: false
@@ -31863,109 +31879,117 @@ var init_src4 = __esm({
31863
31879
  outputSchema: {
31864
31880
  type: "object",
31865
31881
  properties: {
31866
- iconAssetId: { type: "string" },
31867
- canonicalSvg: { type: "string" },
31868
- contentHash: { type: "string" }
31882
+ iconAssetId: { type: "string", description: "Permanent immutable icon asset ID." },
31883
+ canonicalSvg: { type: "string", description: "Optimized sanitized SVG code." },
31884
+ contentHash: { type: "string", description: "SHA-256 hash of the SVG content." }
31869
31885
  }
31870
31886
  }
31871
31887
  },
31872
31888
  {
31873
31889
  name: "list_drafts",
31874
31890
  title: "List authoring drafts",
31875
- description: "List template authoring drafts for the current owner.",
31891
+ description: "List all template authoring drafts for the current account owner. Returns draft summaries with validation status, name, and timestamps. Use to resume an authoring session or discover draft IDs before updating or publishing. Alternatives: Use get_template_draft when you have a draftId to inspect full layer AST. Read-only query scoped to account owner.",
31876
31892
  effect: "read-only",
31877
31893
  inputSchema: {
31878
31894
  type: "object",
31879
31895
  properties: {},
31880
31896
  additionalProperties: false
31881
31897
  },
31882
- outputSchema: { type: "object", properties: { drafts: { type: "array" } } }
31898
+ outputSchema: { type: "object", properties: { drafts: { type: "array", description: "Array of draft summary objects." } } }
31883
31899
  },
31884
31900
  {
31885
31901
  name: "create_draft",
31886
31902
  title: "Create authoring draft",
31887
- description: "Create a template authoring draft via Gateway; returns authoringStudioUrl for Studio preview/edit.",
31903
+ description: "Initialize a new Page Template draft for authoring with custom layout, layers, and slot contracts. Use when authoring a new slide template from scratch. Do NOT use to edit an existing draft (use update_template_draft) or browse public templates (use list_templates). Requires workspace owner authorization. Returns created TemplateDraft record with draftId and interactive authoringStudioUrl for real-time visual canvas editing.",
31888
31904
  effect: "local-write-job",
31889
31905
  inputSchema: {
31890
31906
  type: "object",
31891
31907
  properties: {
31892
- name: { type: "string" },
31893
- source: { type: "object", additionalProperties: true },
31894
- authoringSource: { type: "object", additionalProperties: true },
31895
- selectionMetadata: { type: "object", additionalProperties: true },
31896
- theme: { type: "object", additionalProperties: true }
31908
+ name: { type: "string", description: "Human-readable title for the template draft." },
31909
+ source: { type: "object", additionalProperties: true, description: "Optional initial canvas source tree." },
31910
+ authoringSource: { type: "object", additionalProperties: true, description: "Template AST structure including layer hierarchy and visual slots." },
31911
+ selectionMetadata: { type: "object", additionalProperties: true, description: "Aspect ratio and categorization metadata (platforms, layout family, intent)." },
31912
+ theme: { type: "object", additionalProperties: true, description: "Default theme overrides (palette, typography tokens)." }
31897
31913
  },
31898
31914
  required: ["name"],
31899
31915
  additionalProperties: false
31900
31916
  },
31901
- outputSchema: { type: "object", properties: { id: { type: "string" }, authoringStudioUrl: { type: "string" } } }
31917
+ outputSchema: { type: "object", properties: { id: { type: "string", description: "Unique draft ID." }, authoringStudioUrl: { type: "string", description: "Direct browser link to Studio visual canvas editor." } } }
31902
31918
  },
31903
31919
  {
31904
31920
  name: "get_draft",
31905
31921
  title: "Get authoring draft",
31906
- description: "Fetch an authoring draft by id (Gateway-only).",
31922
+ description: "Fetch complete authoring draft details by draftId, including full layer AST, slot contract definitions, theme bindings, and validation error logs. Call before update_template_draft or publish_template_draft to inspect draft structure and check validation status. Alternatives: Use list_template_drafts to discover draftIds. Read-only query scoped to draft owner. Returns full TemplateDraft AST entity.",
31907
31923
  effect: "read-only",
31908
31924
  inputSchema: {
31909
31925
  type: "object",
31910
- properties: { draftId: { type: "string" } },
31926
+ properties: {
31927
+ draftId: { type: "string", description: "The unique draft identifier to retrieve." }
31928
+ },
31911
31929
  required: ["draftId"],
31912
31930
  additionalProperties: false
31913
31931
  },
31914
- outputSchema: { type: "object", properties: { id: { type: "string" } } }
31932
+ outputSchema: { type: "object", properties: { id: { type: "string", description: "Draft ID." }, name: { type: "string", description: "Draft name." }, authoringSource: { type: "object", description: "Layer AST and slots." } } }
31915
31933
  },
31916
31934
  {
31917
31935
  name: "update_draft",
31918
31936
  title: "Update authoring draft",
31919
- description: "Update authoring draft fields (name, authoringSource, selectionMetadata, theme).",
31937
+ description: "Update layer AST, slot definitions, selection metadata, or theme tokens of an existing template authoring draft by draftId. Call iteratively to refine draft layout and slot contracts during authoring. Do NOT use to create new drafts (use create_template_draft), view draft AST (use get_template_draft), or release to public catalog (use publish_template_draft). Requires draft owner authorization. Performs safe partial patch: unmentioned properties remain untouched. Automatically triggers layout rule validation on save; returns validation warnings if constraints are breached. Returns updated TemplateDraft record with latest validation status and AST snapshot.",
31920
31938
  effect: "local-write-job",
31921
31939
  inputSchema: {
31922
31940
  type: "object",
31923
31941
  properties: {
31924
- draftId: { type: "string" },
31925
- name: { type: "string" },
31926
- authoringSource: { type: "object", additionalProperties: true },
31927
- selectionMetadata: { type: "object", additionalProperties: true },
31928
- theme: { type: "object", additionalProperties: true }
31942
+ draftId: { type: "string", description: "The unique draft identifier to update." },
31943
+ name: { type: "string", description: "Updated template title." },
31944
+ authoringSource: { type: "object", additionalProperties: true, description: "Updated template AST layout structure and slot bindings." },
31945
+ selectionMetadata: { type: "object", additionalProperties: true, description: "Updated platform and family metadata." },
31946
+ theme: { type: "object", additionalProperties: true, description: "Updated theme tokens." }
31929
31947
  },
31930
31948
  required: ["draftId"],
31931
31949
  additionalProperties: false
31932
31950
  },
31933
- outputSchema: { type: "object", properties: { id: { type: "string" } } }
31951
+ outputSchema: { type: "object", properties: { id: { type: "string", description: "Draft ID." }, validationStatus: { type: "string", description: "Validation status: valid | warnings | errors" } } }
31934
31952
  },
31935
31953
  {
31936
31954
  name: "delete_draft",
31937
31955
  title: "Delete authoring draft",
31938
- description: "Permanently delete an authoring draft by draftId.",
31956
+ description: "Permanently delete a template authoring draft by draftId. Call only when abandoning a draft that should be permanently destroyed. If the draft is complete and ready for production, call publish_template_draft instead. Destructive operation requiring explicit user confirmation: draft canvas data, layer AST, and unpublished revisions cannot be recovered. Returns deletion confirmation record.",
31939
31957
  effect: "explicit-approval",
31940
31958
  inputSchema: {
31941
31959
  type: "object",
31942
- properties: { draftId: { type: "string" } },
31960
+ properties: {
31961
+ draftId: { type: "string", description: "The unique draft identifier to permanently delete." }
31962
+ },
31943
31963
  required: ["draftId"],
31944
31964
  additionalProperties: false
31945
31965
  },
31946
- outputSchema: { type: "object", properties: {} }
31966
+ outputSchema: { type: "object", properties: { draftId: { type: "string", description: "Deleted draft ID." }, deleted: { type: "boolean", description: "True if deletion confirmed." } } }
31947
31967
  },
31948
31968
  {
31949
31969
  name: "publish_draft",
31950
31970
  title: "Publish authoring draft",
31951
- description: "Publish a validated authoring draft to the public catalog via Gateway.",
31971
+ description: "Validate and publish an authoring draft into the public or workspace template catalog. Call when draft design and slot contracts are finalized and ready for instantiation in slideshow runs. If still editing or fixing layout rules, use update_template_draft. To inspect validation before publishing, use get_template_draft. Promotes draft to an immutable published template. Validates AST against layout rules; fails if required slots or constraints are violated. Returns published Template entity with public templateId, slots table, and catalog status.",
31952
31972
  effect: "local-write-job",
31953
31973
  inputSchema: {
31954
31974
  type: "object",
31955
- properties: { draftId: { type: "string" } },
31975
+ properties: {
31976
+ draftId: { type: "string", description: "The unique draft identifier to validate and publish." }
31977
+ },
31956
31978
  required: ["draftId"],
31957
31979
  additionalProperties: false
31958
31980
  },
31959
- outputSchema: { type: "object", properties: { id: { type: "string" }, status: { type: "string" } } }
31981
+ outputSchema: { type: "object", properties: { id: { type: "string", description: "Published template ID." }, status: { type: "string", description: "Catalog status (published)." }, slots: { type: "array", description: "Public slots table." } } }
31960
31982
  },
31961
31983
  {
31962
31984
  name: "create_preview_job",
31963
31985
  title: "Create preview job",
31964
- description: "Optional headless hosted preview job. Primary authoring path is authoringStudioUrl from create_draft.",
31986
+ description: "Request an asynchronous server-side render preview image of a template draft for thumbnail generation. For interactive real-time visual authoring, prefer opening the authoringStudioUrl in browser.",
31965
31987
  effect: "local-write-job",
31966
31988
  inputSchema: {
31967
31989
  type: "object",
31968
- properties: { draftId: { type: "string" } },
31990
+ properties: {
31991
+ draftId: { type: "string", description: "The unique draft identifier to generate a render preview for." }
31992
+ },
31969
31993
  required: ["draftId"],
31970
31994
  additionalProperties: false
31971
31995
  },
@@ -31974,29 +31998,29 @@ var init_src4 = __esm({
31974
31998
  {
31975
31999
  name: "import_template_image",
31976
32000
  title: "Import template image",
31977
- description: "Upload an image asset specifically attached to a template draft canvas (for general brand/media library assets, use import_image).",
32001
+ description: "Upload and attach a transient image asset specifically to a template draft canvas. Call while authoring a template draft in canvas studio to place background or sample imagery. Do NOT use for general workspace media library assets, logos, and photos (use import_image instead). Requires draft owner authorization and idempotencyKey. Idempotent: duplicate uploads with identical idempotencyKey return the existing asset. Returns created template image asset with imageId, dimensions, and public CDN preview URL.",
31978
32002
  effect: "local-write-job",
31979
32003
  inputSchema: {
31980
32004
  type: "object",
31981
32005
  properties: {
31982
- draftId: { type: "string" },
31983
- fileName: { type: "string" },
31984
- mimeType: { type: "string", description: "image/jpeg | image/png | image/webp" },
31985
- dataBase64: { type: "string" },
31986
- provider: { type: "string", description: "pinterest | unsplash | pexels | user_upload | generated" },
31987
- rightsStatus: { type: "string", description: "rights_unknown | licensed_for_publish | user_owned | generated" },
31988
- idempotencyKey: { type: "string" },
31989
- sourceUrl: { type: "string" },
31990
- externalId: { type: "string" },
31991
- creator: { type: "string" },
31992
- license: { type: "string" },
31993
- attribution: { type: "string" },
31994
- searchQuery: { type: "string" }
32006
+ draftId: { type: "string", description: "The unique template draft ID this image is attached to." },
32007
+ fileName: { type: "string", description: "Original image filename (e.g. background.jpg)." },
32008
+ mimeType: { type: "string", description: "MIME type: image/jpeg | image/png | image/webp" },
32009
+ dataBase64: { type: "string", description: "Base64-encoded image binary string." },
32010
+ provider: { type: "string", description: "Asset origin provider: pinterest | unsplash | pexels | user_upload | generated" },
32011
+ rightsStatus: { type: "string", description: "Rights ownership status: rights_unknown | licensed_for_publish | user_owned | generated" },
32012
+ idempotencyKey: { type: "string", description: "Unique idempotency key to prevent duplicate image creation." },
32013
+ sourceUrl: { type: "string", description: "Optional source URL if fetched from web." },
32014
+ externalId: { type: "string", description: "Optional external asset ID from provider." },
32015
+ creator: { type: "string", description: "Optional author or photographer attribution name." },
32016
+ license: { type: "string", description: "Optional license type identifier." },
32017
+ attribution: { type: "string", description: "Optional human-readable attribution string." },
32018
+ searchQuery: { type: "string", description: "Optional search keyword that discovered this image." }
31995
32019
  },
31996
32020
  required: ["draftId", "fileName", "mimeType", "dataBase64", "provider", "rightsStatus", "idempotencyKey"],
31997
32021
  additionalProperties: false
31998
32022
  },
31999
- outputSchema: { type: "object", properties: { imageId: { type: "string" }, url: { type: "string" } } }
32023
+ outputSchema: { type: "object", properties: { imageId: { type: "string", description: "Created template image ID." }, url: { type: "string", description: "Public delivery URL." } } }
32000
32024
  }
32001
32025
  ];
32002
32026
  TemplateGatewayMcpBackend = class {
@@ -32163,22 +32187,168 @@ var init_src4 = __esm({
32163
32187
  function meta3() {
32164
32188
  return { requestId: `mcp_${Date.now().toString(36)}`, runtimeVersion: "0.0.0", schemaVersion: 1, toolContractVersion: "2026-08-12" };
32165
32189
  }
32166
- var objectSchema, slideshowToolRegistry, slideshowResourceTemplates, SlideshowMcpBackend;
32190
+ var slideshowToolRegistry, slideshowResourceTemplates, SlideshowMcpBackend;
32167
32191
  var init_src5 = __esm({
32168
32192
  "../../packages/slideshow-mcp-adapter/src/index.ts"() {
32169
32193
  "use strict";
32170
32194
  init_src3();
32171
32195
  init_src2();
32172
- objectSchema = { type: "object", properties: {}, additionalProperties: true };
32173
32196
  slideshowToolRegistry = [
32174
- { name: "list_runs", title: "List slideshow runs", description: "List owner-scoped Slideshow Runs with optional filters.", effect: "read-only", inputSchema: { ...objectSchema, properties: { q: { type: "string" }, platform: { type: "string" }, profileId: { type: "string" }, brandProfileId: { type: "string" }, contentSlug: { type: "string" }, status: { type: "string" } } }, outputSchema: objectSchema },
32175
- { name: "recommend_templates", title: "Recommend slideshow page templates", description: "Before create_run: send the Page Contracts (role, density, slotSummary per page) and get a shortlist per page with reasons. Recently used Layout Families are demoted and one unused family is always kept. Pick one templateId per page yourself; gaps list pages needing more templates.", effect: "read-only", inputSchema: { ...objectSchema, properties: { platform: { type: "string" }, canvasPreset: { type: "string" }, pages: { type: "array", items: { type: "object", properties: { role: { type: "string" }, density: { type: "string" }, slotSummary: { type: "object" }, requiresImage: { type: "boolean" } }, required: ["role"] } }, k: { type: "integer", minimum: 2, maximum: 5 }, seed: { type: "string" } }, required: ["platform", "pages"] }, outputSchema: objectSchema },
32176
- { name: "create_run", title: "Create slideshow run", description: "Create an ADR-0026 Slideshow Run from a ContentPack.", effect: "local-write-job", inputSchema: { ...objectSchema, properties: { pack: { type: "object" }, brandId: { type: "string" }, brandProfileId: { type: "string" }, contentSlug: { type: "string" } }, required: ["pack"] }, outputSchema: objectSchema },
32177
- { name: "get_run", title: "Get slideshow run", description: "Get an owner-scoped Slideshow Run.", effect: "read-only", inputSchema: { ...objectSchema, properties: { runId: { type: "string" } }, required: ["runId"] }, outputSchema: objectSchema },
32178
- { name: "update_run", title: "Update slideshow run", description: "Edit page-instance slots/layout/style/decorations or presentation preference with optimistic revision.", effect: "local-write-job", inputSchema: { ...objectSchema, properties: { runId: { type: "string" }, pack: { type: "object" }, brandId: { type: "string" }, brandProfileId: { type: "string" }, contentSlug: { type: "string" }, baseRevision: { type: "integer", minimum: 1 }, pageIndex: { type: "integer", minimum: 0 }, slots: { type: "object" }, layout: { type: "object" }, style: { type: "object" }, decorations: { type: "array" } }, required: ["runId"] }, outputSchema: objectSchema },
32179
- { name: "archive_run", title: "Archive slideshow run", description: "Hide a Run from default lists without deleting it.", effect: "local-write-job", inputSchema: { ...objectSchema, properties: { runId: { type: "string" } }, required: ["runId"] }, outputSchema: objectSchema },
32180
- { name: "restore_run", title: "Restore slideshow run", description: "Restore an archived or trashed Run.", effect: "local-write-job", inputSchema: { ...objectSchema, properties: { runId: { type: "string" } }, required: ["runId"] }, outputSchema: objectSchema },
32181
- { name: "delete_run", title: "Delete slideshow run", description: "Permanently delete a Slideshow Run.", effect: "explicit-approval", inputSchema: { ...objectSchema, properties: { runId: { type: "string" } }, required: ["runId"] }, outputSchema: objectSchema }
32197
+ {
32198
+ name: "list_runs",
32199
+ title: "List slideshow runs",
32200
+ description: "List owner-scoped Slideshow Runs with optional platform, lifecycle status, or search query filters. Returns run metadata, platform target, page counts, revision numbers, and timestamps. Call to browse existing carousels or find a runId before inspection, updating, or archiving. Alternatives: Use get_slideshow_run when you already have a specific runId to fetch full slide content. Behavior: Read-only query scoped to current authenticated workspace owner.",
32201
+ effect: "read-only",
32202
+ inputSchema: {
32203
+ type: "object",
32204
+ properties: {
32205
+ q: { type: "string", description: "Search term matching run title, topic, or content text." },
32206
+ platform: { type: "string", description: "Target platform filter: tiktok | linkedin | instagram | threads | xiaohongshu" },
32207
+ profileId: { type: "string", description: "Optional profile filter." },
32208
+ brandProfileId: { type: "string", description: "Optional legacy brand profile filter." },
32209
+ brandId: { type: "string", description: "Filter runs styled with a specific Brand ID." },
32210
+ contentSlug: { type: "string", description: "Filter runs generated from a specific content topic slug." },
32211
+ status: { type: "string", description: "Lifecycle status filter: draft | active | archived | trash" }
32212
+ },
32213
+ additionalProperties: true
32214
+ },
32215
+ outputSchema: { type: "object", properties: { runs: { type: "array", description: "Array of slideshow run summary items." }, total: { type: "number", description: "Total count of matching runs." } } }
32216
+ },
32217
+ {
32218
+ name: "recommend_templates",
32219
+ title: "Recommend slideshow page templates",
32220
+ description: "Recommend curated template options for each slide in a slideshow before run creation based on narrative page contracts (role, density, image requirement). Demotes recently used layout families to prevent visual monotony and guarantees diversity across slides. Call immediately before create_slideshow_run to select templateId per slide. Alternatives: Use list_templates to browse raw catalog. Behavior: Read-only stateless layout intelligence query.",
32221
+ effect: "read-only",
32222
+ inputSchema: {
32223
+ type: "object",
32224
+ properties: {
32225
+ platform: { type: "string", description: "Target platform: tiktok | linkedin | instagram | threads | xiaohongshu" },
32226
+ canvasPreset: { type: "string", description: "Target aspect ratio preset (e.g. 9:16, 4:5, 1:1, 3:4)." },
32227
+ pages: {
32228
+ type: "array",
32229
+ description: "Ordered list of page contracts describing narrative role and slot requirements.",
32230
+ items: {
32231
+ type: "object",
32232
+ properties: {
32233
+ role: { type: "string", description: "Narrative role: hook | value | rehook | cta" },
32234
+ density: { type: "string", description: "Content density: sparse | normal | dense" },
32235
+ slotSummary: { type: "object", description: "Slot keys expected on this page." },
32236
+ requiresImage: { type: "boolean", description: "Whether this page must have an image slot." }
32237
+ },
32238
+ required: ["role"]
32239
+ }
32240
+ },
32241
+ k: { type: "integer", minimum: 2, maximum: 5, description: "Number of template recommendations to return per page (2 to 5)." },
32242
+ seed: { type: "string", description: "Optional deterministic randomization seed for layout family rotation." }
32243
+ },
32244
+ required: ["platform", "pages"],
32245
+ additionalProperties: true
32246
+ },
32247
+ outputSchema: { type: "object", properties: { recommendations: { type: "array", description: "Ranked template recommendations per page." }, gaps: { type: "array", description: "Pages requiring more templates." } } }
32248
+ },
32249
+ {
32250
+ name: "create_run",
32251
+ title: "Create slideshow run",
32252
+ description: "Create a durable multi-page Slideshow Run from a structured ContentPack (specifying platform, pages array with bound templateId and slot text values). Call recommend_slideshow_templates first to select templates. Do NOT use to edit an existing run (use update_slideshow_run instead). Requires workspace owner write authorization. Returns created SlideshowRun record with generated runId, initial revision (1), and authoringStudioUrl for interactive browser review and PNG download.",
32253
+ effect: "local-write-job",
32254
+ inputSchema: {
32255
+ type: "object",
32256
+ properties: {
32257
+ pack: { type: "object", description: "content-pack.v1 payload containing schemaVersion, platform, and pages array with bound templateId and slots content." },
32258
+ brandId: { type: "string", description: "Optional Brand ID to apply brand kit typography, colors, and logo to all slides." },
32259
+ brandProfileId: { type: "string", description: "Optional legacy brand profile ID." },
32260
+ contentSlug: { type: "string", description: "Optional content topic identifier for tracking in Content Engine." }
32261
+ },
32262
+ required: ["pack"],
32263
+ additionalProperties: true
32264
+ },
32265
+ outputSchema: { type: "object", properties: { runId: { type: "string", description: "Unique identifier of the created run." }, revision: { type: "number", description: "Initial revision number (1)." }, studioUrl: { type: "string", description: "Studio preview and download URL." } } }
32266
+ },
32267
+ {
32268
+ name: "get_run",
32269
+ title: "Get slideshow run",
32270
+ description: "Retrieve full details of an existing Slideshow Run by runId, including complete slide pages, bound template IDs, slot contents, brand theme snapshot, current revision number, and studio review URL. Call before update_slideshow_run to inspect current slide contents and capture baseRevision for concurrency locking. Alternatives: Use list_slideshow_runs to discover runIds. Read-only query scoped to authenticated workspace owner.",
32271
+ effect: "read-only",
32272
+ inputSchema: {
32273
+ type: "object",
32274
+ properties: {
32275
+ runId: { type: "string", description: "The unique Slideshow Run identifier to retrieve." }
32276
+ },
32277
+ required: ["runId"],
32278
+ additionalProperties: true
32279
+ },
32280
+ outputSchema: { type: "object", properties: { runId: { type: "string", description: "Unique run identifier." }, revision: { type: "number", description: "Current revision number." }, pages: { type: "array", description: "Slide pages array." }, studioUrl: { type: "string", description: "Studio review URL." } } }
32281
+ },
32282
+ {
32283
+ name: "update_run",
32284
+ title: "Update slideshow run",
32285
+ description: "Partially update slide copy, slot bindings, layout, styling, or brand settings of an existing Slideshow Run by runId. Call get_slideshow_run first to obtain current revision and slide data. Do NOT use to create new runs (use create_slideshow_run) or delete runs (use delete_slideshow_run). Safe partial patch: unspecified fields are preserved. Requires baseRevision for optimistic concurrency locking; on revision mismatch returns 409 Conflict (no auto-merge), requiring a fresh get_slideshow_run. To patch a single slide, provide pageIndex (0-indexed) with slots, layout, or style. To update entire deck, provide pack. Returns updated SlideshowRun with incremented revision number.",
32286
+ effect: "local-write-job",
32287
+ inputSchema: {
32288
+ type: "object",
32289
+ properties: {
32290
+ runId: { type: "string", description: "The unique Slideshow Run identifier to update." },
32291
+ baseRevision: { type: "integer", minimum: 1, description: "Current revision number for optimistic concurrency locking to prevent overwrite races. Must match latest revision from get_slideshow_run." },
32292
+ pack: { type: "object", description: "Updated complete content-pack.v1 structure. Overrides entire slide deck when provided." },
32293
+ brandId: { type: "string", description: "Updated Brand ID styling reference applied across slides." },
32294
+ brandProfileId: { type: "string", description: "Optional legacy brand profile ID." },
32295
+ contentSlug: { type: "string", description: "Updated content topic slug." },
32296
+ pageIndex: { type: "integer", minimum: 0, description: "Index of a single slide page to patch (0-indexed). Must be paired with slots, layout, style, or decorations." },
32297
+ slots: { type: "object", description: "Key-value map of slot text/image overrides for the specified pageIndex." },
32298
+ layout: { type: "object", description: "Layout adjustments for the specified pageIndex." },
32299
+ style: { type: "object", description: "Style token adjustments for the specified pageIndex." },
32300
+ decorations: { type: "array", description: "Visual decorations list for the specified pageIndex." }
32301
+ },
32302
+ required: ["runId"],
32303
+ additionalProperties: true
32304
+ },
32305
+ outputSchema: { type: "object", properties: { runId: { type: "string", description: "Run identifier." }, revision: { type: "number", description: "Incremented revision number." }, studioUrl: { type: "string", description: "Studio review URL." } } }
32306
+ },
32307
+ {
32308
+ name: "archive_run",
32309
+ title: "Archive slideshow run",
32310
+ description: "Soft-hide an active Slideshow Run from default workspace lists and pickers without deleting slide data or review URLs. Use to declutter the workspace after campaign completion. Do NOT use for permanent destruction; use delete_slideshow_run instead. Idempotent state change, fully reversible via restore_slideshow_run. Preserves all slide records, rendered assets, and external links. Returns updated SlideshowRun with status set to archived.",
32311
+ effect: "local-write-job",
32312
+ inputSchema: {
32313
+ type: "object",
32314
+ properties: {
32315
+ runId: { type: "string", description: "The unique Slideshow Run identifier to archive." }
32316
+ },
32317
+ required: ["runId"],
32318
+ additionalProperties: true
32319
+ },
32320
+ outputSchema: { type: "object", properties: { runId: { type: "string", description: "Run identifier." }, status: { type: "string", description: "Updated status (archived)." } } }
32321
+ },
32322
+ {
32323
+ name: "restore_run",
32324
+ title: "Restore slideshow run",
32325
+ description: "Restore a previously archived or trashed Slideshow Run back to active workspace status, restoring it to the default projects view. Use to reactivate an archived or trashed carousel project. Alternatives: Use get_slideshow_run to inspect run contents before restoring. Idempotent state change. Returns restored SlideshowRun record visible in default workspace listings.",
32326
+ effect: "local-write-job",
32327
+ inputSchema: {
32328
+ type: "object",
32329
+ properties: {
32330
+ runId: { type: "string", description: "The unique Slideshow Run identifier to restore." }
32331
+ },
32332
+ required: ["runId"],
32333
+ additionalProperties: true
32334
+ },
32335
+ outputSchema: { type: "object", properties: { runId: { type: "string", description: "Run identifier." }, status: { type: "string", description: "Restored status (active)." } } }
32336
+ },
32337
+ {
32338
+ name: "delete_run",
32339
+ title: "Delete slideshow run",
32340
+ description: "Move a Slideshow Run to trash or permanently remove it from the workspace along with its slide page records. Use only when a run is obsolete and permanently discarded. Alternatives: If you only want to hide the run from active lists while preserving review links and data, use archive_slideshow_run instead. Destructive operation requiring explicit user confirmation. Invalidates studio review URLs. Returns deletion confirmation record.",
32341
+ effect: "explicit-approval",
32342
+ inputSchema: {
32343
+ type: "object",
32344
+ properties: {
32345
+ runId: { type: "string", description: "The unique Slideshow Run identifier to permanently delete." }
32346
+ },
32347
+ required: ["runId"],
32348
+ additionalProperties: true
32349
+ },
32350
+ outputSchema: { type: "object", properties: { runId: { type: "string", description: "Deleted run identifier." }, deleted: { type: "boolean", description: "True if deletion confirmed." } } }
32351
+ }
32182
32352
  ];
32183
32353
  slideshowResourceTemplates = [
32184
32354
  { uriTemplate: "slideshow://runs/{runId}", name: "Slideshow Run", description: "Owner-scoped Run JSON snapshot", mimeType: "application/json" }
@@ -32281,26 +32451,246 @@ var init_src6 = __esm({
32281
32451
  delete_run: "delete_slideshow_run"
32282
32452
  };
32283
32453
  brandTools = [
32284
- { name: "list_brands", title: "List brands", description: "List owner-scoped Brands (identity + fonts + colors + logo).", effect: "read-only", inputSchema: { type: "object", properties: {}, additionalProperties: false }, outputSchema: { type: "object", properties: {} } },
32285
- { name: "get_brand", title: "Get brand", description: "Get one Brand by id.", effect: "read-only", inputSchema: { type: "object", properties: { brandId: { type: "string" } }, required: ["brandId"], additionalProperties: false }, outputSchema: { type: "object", properties: {} } },
32286
- { name: "create_brand", title: "Create brand", description: "Create a Brand with optional fonts, colors and logoAssetId.", effect: "local-write-job", inputSchema: { type: "object", properties: { name: { type: "string" }, displayName: { type: "string" }, handle: { type: "string" }, typography: { type: "object" }, colors: { type: "object" }, logoAssetId: { type: "string" } }, required: ["name"], additionalProperties: false }, outputSchema: { type: "object", properties: {} } },
32287
- { name: "update_brand", title: "Update brand", description: "Patch Brand appearance with optimistic baseRevision.", effect: "local-write-job", inputSchema: { type: "object", properties: { brandId: { type: "string" }, baseRevision: { type: "integer", minimum: 1 }, name: { type: "string" }, displayName: { type: "string" }, handle: { type: "string" }, typography: { type: "object" }, colors: { type: "object" }, logoAssetId: { type: "string" } }, required: ["brandId", "baseRevision"], additionalProperties: false }, outputSchema: { type: "object", properties: {} } },
32288
- { name: "archive_brand", title: "Archive brand", description: "Archive a Brand.", effect: "local-write-job", inputSchema: { type: "object", properties: { brandId: { type: "string" } }, required: ["brandId"], additionalProperties: false }, outputSchema: { type: "object", properties: {} } },
32289
- { name: "restore_brand", title: "Restore brand", description: "Restore an archived Brand.", effect: "local-write-job", inputSchema: { type: "object", properties: { brandId: { type: "string" } }, required: ["brandId"], additionalProperties: false }, outputSchema: { type: "object", properties: {} } },
32290
- { name: "delete_brand", title: "Delete brand", description: "Move a Brand to trash.", effect: "explicit-approval", inputSchema: { type: "object", properties: { brandId: { type: "string" } }, required: ["brandId"], additionalProperties: false }, outputSchema: { type: "object", properties: {} } }
32454
+ {
32455
+ name: "list_brands",
32456
+ title: "List brands",
32457
+ description: "List owner-scoped Brands with typography tokens, color palettes, and logos. Call to discover available brand identities before creating or styling slideshow runs. Alternatives: Use get_brand when you have a specific brandId to inspect full tokens. Read-only query scoped to current workspace owner. Returns array of Brand summaries.",
32458
+ effect: "read-only",
32459
+ inputSchema: { type: "object", properties: {}, additionalProperties: false },
32460
+ outputSchema: { type: "object", properties: { brands: { type: "array", description: "Array of brand kit summaries." } } }
32461
+ },
32462
+ {
32463
+ name: "get_brand",
32464
+ title: "Get brand",
32465
+ description: "Fetch a complete Brand profile by brandId, including typography tokens, 4-color palette (primary, secondary, accent, surface), logoAssetId, and baseRevision. Call before generating or updating branded slides to inject brand styles and capture baseRevision. Alternatives: Use list_brands to discover brandIds. Read-only query scoped to workspace owner. Returns full Brand entity.",
32466
+ effect: "read-only",
32467
+ inputSchema: {
32468
+ type: "object",
32469
+ properties: {
32470
+ brandId: { type: "string", description: "The unique identifier of the brand to retrieve." }
32471
+ },
32472
+ required: ["brandId"],
32473
+ additionalProperties: false
32474
+ },
32475
+ outputSchema: { type: "object", properties: { brandId: { type: "string", description: "Brand ID." }, revision: { type: "number", description: "Current revision number." }, typography: { type: "object", description: "Typography settings." }, colors: { type: "object", description: "Color palette." } } }
32476
+ },
32477
+ {
32478
+ name: "create_brand",
32479
+ title: "Create brand",
32480
+ description: "Create a new owner-scoped Brand kit defining typography, color palette, handle, and optional logo asset. Call before creating slideshow runs to establish consistent visual identity. Do NOT use to edit an existing brand; use update_brand instead. Requires workspace owner authorization. Persists initial brand record with revision 1. Returns created Brand entity with brandId and initial revision.",
32481
+ effect: "local-write-job",
32482
+ inputSchema: {
32483
+ type: "object",
32484
+ properties: {
32485
+ name: { type: "string", description: "Canonical brand name (e.g. Acme Corp)." },
32486
+ displayName: { type: "string", description: "User-facing display name." },
32487
+ handle: { type: "string", description: "Social media handle (e.g. @acme)." },
32488
+ typography: { type: "object", description: "Typography settings (headingFont, bodyFont)." },
32489
+ colors: { type: "object", description: "Color palette tokens (primary, secondary, accent, surface, text)." },
32490
+ logoAssetId: { type: "string", description: "Optional image asset ID for brand logo." }
32491
+ },
32492
+ required: ["name"],
32493
+ additionalProperties: false
32494
+ },
32495
+ outputSchema: { type: "object", properties: { brandId: { type: "string", description: "Created brand ID." }, revision: { type: "number", description: "Initial revision (1)." } } }
32496
+ },
32497
+ {
32498
+ name: "update_brand",
32499
+ title: "Update brand",
32500
+ description: "Patch visual styles, typography, or metadata of an existing Brand by brandId. Call after get_brand to modify palette or fonts. Do NOT use to create new brands (use create_brand) or to delete (use delete_brand). Requires baseRevision for optimistic concurrency locking to prevent overwrite races; on revision mismatch returns 409 Conflict. Safe partial patch: unspecified styling tokens are preserved. Returns updated Brand with incremented revision.",
32501
+ effect: "local-write-job",
32502
+ inputSchema: {
32503
+ type: "object",
32504
+ properties: {
32505
+ brandId: { type: "string", description: "The unique identifier of the brand to update." },
32506
+ baseRevision: { type: "integer", minimum: 1, description: "Current revision number for optimistic concurrency lock. Must match latest revision from get_brand." },
32507
+ name: { type: "string", description: "Updated brand name." },
32508
+ displayName: { type: "string", description: "Updated display name." },
32509
+ handle: { type: "string", description: "Updated social handle." },
32510
+ typography: { type: "object", description: "Updated typography configuration." },
32511
+ colors: { type: "object", description: "Updated color palette tokens." },
32512
+ logoAssetId: { type: "string", description: "Updated logo asset ID." }
32513
+ },
32514
+ required: ["brandId", "baseRevision"],
32515
+ additionalProperties: false
32516
+ },
32517
+ outputSchema: { type: "object", properties: { brandId: { type: "string", description: "Brand ID." }, revision: { type: "number", description: "Incremented revision number." } } }
32518
+ },
32519
+ {
32520
+ name: "archive_brand",
32521
+ title: "Archive brand",
32522
+ description: "Archive an active Brand to soft-hide it from default pickers and list queries without losing styling tokens. Call to declutter workspace brands. Do NOT use for permanent deletion; use delete_brand instead. Idempotent state transition, fully reversible via restore_brand. Existing slideshow runs referencing this brand continue to display correctly. Returns updated Brand with status set to archived.",
32523
+ effect: "local-write-job",
32524
+ inputSchema: {
32525
+ type: "object",
32526
+ properties: {
32527
+ brandId: { type: "string", description: "The unique identifier of the brand to archive." }
32528
+ },
32529
+ required: ["brandId"],
32530
+ additionalProperties: false
32531
+ },
32532
+ outputSchema: { type: "object", properties: { brandId: { type: "string", description: "Brand ID." }, status: { type: "string", description: "Updated status (archived)." } } }
32533
+ },
32534
+ {
32535
+ name: "restore_brand",
32536
+ title: "Restore brand",
32537
+ description: "Restore a previously archived or trashed Brand back to active status. Call to unhide a brand and make it immediately selectable in brand selectors and default list queries. Alternatives: Use get_brand to inspect tokens before restoring. Idempotent state transition. Returns restored Brand with status set to active.",
32538
+ effect: "local-write-job",
32539
+ inputSchema: {
32540
+ type: "object",
32541
+ properties: {
32542
+ brandId: { type: "string", description: "The unique identifier of the brand to restore." }
32543
+ },
32544
+ required: ["brandId"],
32545
+ additionalProperties: false
32546
+ },
32547
+ outputSchema: { type: "object", properties: { brandId: { type: "string", description: "Brand ID." }, status: { type: "string", description: "Restored status (active)." } } }
32548
+ },
32549
+ {
32550
+ name: "delete_brand",
32551
+ title: "Delete brand",
32552
+ description: "Move a Brand to trash for deletion. Call only when a brand kit is obsolete and permanently discarded. Alternatives: If existing runs still use this brand theme, prefer archive_brand to preserve styling safely. Destructive operation requiring explicit confirmation. Dependent design workflows may lose default brand styling. Returns deletion confirmation record.",
32553
+ effect: "explicit-approval",
32554
+ inputSchema: {
32555
+ type: "object",
32556
+ properties: {
32557
+ brandId: { type: "string", description: "The unique identifier of the brand to move to trash." }
32558
+ },
32559
+ required: ["brandId"],
32560
+ additionalProperties: false
32561
+ },
32562
+ outputSchema: { type: "object", properties: { brandId: { type: "string", description: "Deleted brand ID." }, deleted: { type: "boolean", description: "True if deletion confirmed." } } }
32563
+ }
32291
32564
  ];
32292
32565
  rename = (tool, names) => ({ ...tool, name: names[tool.name] ?? tool.name });
32293
32566
  templateTools = templateToolRegistry.map((tool) => rename(tool, templateNames));
32294
32567
  slideshowTools = slideshowToolRegistry.filter((tool) => !removedTools.has(tool.name)).map((tool) => rename(tool, slideshowNames));
32295
32568
  imageTools = [
32296
- { name: "list_images", title: "List images", description: "List owner-scoped image assets.", effect: "read-only", inputSchema: { type: "object", properties: { q: { type: "string" } }, additionalProperties: false }, outputSchema: { type: "object", properties: {} } },
32297
- { name: "get_image", title: "Get image", description: "Get an owner-scoped image asset.", effect: "read-only", inputSchema: { type: "object", properties: { imageId: { type: "string" } }, required: ["imageId"], additionalProperties: false }, outputSchema: { type: "object", properties: {} } },
32298
- { name: "import_image", title: "Import image", description: "Upload an image through Gateway/R2 and persist Directus metadata.", effect: "local-write-job", inputSchema: { type: "object", properties: { file: { type: "string" }, sourceUrl: { type: "string" }, filename: { type: "string" }, name: { type: "string" }, rightsStatus: { type: "string" } }, additionalProperties: false }, outputSchema: { type: "object", properties: {} } },
32299
- { name: "update_image", title: "Update image", description: "Update metadata for an image asset.", effect: "local-write-job", inputSchema: { type: "object", properties: { imageId: { type: "string" }, name: { type: "string" }, rightsStatus: { type: "string" } }, required: ["imageId"], additionalProperties: false }, outputSchema: { type: "object", properties: {} } },
32300
- { name: "attest_image", title: "Attest image rights", description: "Record an owner rights attestation.", effect: "local-write-job", inputSchema: { type: "object", properties: { imageId: { type: "string" }, statementVersion: { type: "string" } }, required: ["imageId"], additionalProperties: false }, outputSchema: { type: "object", properties: {} } },
32301
- { name: "archive_image", title: "Archive image", description: "Archive an image asset.", effect: "local-write-job", inputSchema: { type: "object", properties: { imageId: { type: "string" } }, required: ["imageId"], additionalProperties: false }, outputSchema: { type: "object", properties: {} } },
32302
- { name: "restore_image", title: "Restore image", description: "Restore an image asset.", effect: "local-write-job", inputSchema: { type: "object", properties: { imageId: { type: "string" } }, required: ["imageId"], additionalProperties: false }, outputSchema: { type: "object", properties: {} } },
32303
- { name: "delete_image", title: "Delete image", description: "Move an image asset to trash.", effect: "explicit-approval", inputSchema: { type: "object", properties: { imageId: { type: "string" } }, required: ["imageId"], additionalProperties: false }, outputSchema: { type: "object", properties: {} } }
32569
+ {
32570
+ name: "list_images",
32571
+ title: "List images",
32572
+ description: "List owner-scoped image assets in the media library with optional search query q. Returns image IDs, CDN URLs, dimensions, and rights status for slot assignment. Call to browse media assets or discover imageId before slot binding. Alternatives: Use get_image to fetch full metadata for a specific imageId. Read-only query scoped to workspace owner.",
32573
+ effect: "read-only",
32574
+ inputSchema: {
32575
+ type: "object",
32576
+ properties: {
32577
+ q: { type: "string", description: "Search term matching image name or provenance source." }
32578
+ },
32579
+ additionalProperties: false
32580
+ },
32581
+ outputSchema: { type: "object", properties: { images: { type: "array", description: "Array of image asset records." } } }
32582
+ },
32583
+ {
32584
+ name: "get_image",
32585
+ title: "Get image",
32586
+ description: "Fetch metadata and public R2/CDN delivery URL for a specific image asset by imageId. Call to inspect dimensions, content hash, and rightsStatus before binding to slide slots. Alternatives: Use list_images to search assets across media library. Read-only query scoped to workspace owner. Returns full Image entity.",
32587
+ effect: "read-only",
32588
+ inputSchema: {
32589
+ type: "object",
32590
+ properties: {
32591
+ imageId: { type: "string", description: "The unique image asset identifier to retrieve." }
32592
+ },
32593
+ required: ["imageId"],
32594
+ additionalProperties: false
32595
+ },
32596
+ outputSchema: { type: "object", properties: { imageId: { type: "string", description: "Image asset ID." }, url: { type: "string", description: "Public delivery URL." }, rightsStatus: { type: "string", description: "Rights status." } } }
32597
+ },
32598
+ {
32599
+ name: "import_image",
32600
+ title: "Import image",
32601
+ description: "Upload a new image file into the permanent workspace media library, storing the binary asset on Cloudflare R2 and registering metadata in Directus. Call to add reusable media assets (logos, photos, graphics) for use across slideshow runs and brands. Do NOT use for transient template draft canvas images (use import_template_image instead). Requires workspace write permissions. Returns created Image record with generated imageId and public delivery URL.",
32602
+ effect: "local-write-job",
32603
+ inputSchema: {
32604
+ type: "object",
32605
+ properties: {
32606
+ file: { type: "string", description: "Base64-encoded image data or local file path." },
32607
+ sourceUrl: { type: "string", description: "Original source URL if importing from web/unsplash/pinterest." },
32608
+ filename: { type: "string", description: "Original filename with extension (e.g. header.png)." },
32609
+ name: { type: "string", description: "Human-readable asset title in media library." },
32610
+ rightsStatus: { type: "string", description: "Rights ownership status: licensed_for_publish | user_owned | generated | rights_unknown" }
32611
+ },
32612
+ additionalProperties: false
32613
+ },
32614
+ outputSchema: { type: "object", properties: { imageId: { type: "string", description: "Created image ID." }, url: { type: "string", description: "Public delivery URL." } } }
32615
+ },
32616
+ {
32617
+ name: "update_image",
32618
+ title: "Update image",
32619
+ description: "Update metadata fields (such as human-readable name or rightsStatus) for an existing image asset by imageId. Call to rename images or change categorization tags. Do NOT use to record legal commercial compliance attestations (use attest_image instead) or to replace image binary pixels (use import_image to upload a new asset). Requires workspace owner authorization. Safe partial update: only provided fields are modified. Returns updated Image asset record.",
32620
+ effect: "local-write-job",
32621
+ inputSchema: {
32622
+ type: "object",
32623
+ properties: {
32624
+ imageId: { type: "string", description: "The unique image asset identifier to update." },
32625
+ name: { type: "string", description: "Updated human-readable asset title." },
32626
+ rightsStatus: { type: "string", description: "Updated rights status: licensed_for_publish | user_owned | generated" }
32627
+ },
32628
+ required: ["imageId"],
32629
+ additionalProperties: false
32630
+ },
32631
+ outputSchema: { type: "object", properties: { imageId: { type: "string", description: "Image asset ID." }, name: { type: "string", description: "Updated title." }, rightsStatus: { type: "string", description: "Updated rights status." } } }
32632
+ },
32633
+ {
32634
+ name: "attest_image",
32635
+ title: "Attest image rights",
32636
+ description: "Record an immutable legal copyright or commercial rights ownership attestation for an image asset. Call before multi-platform export to satisfy commercial compliance requirements. Do NOT use to edit metadata like title or tags (use update_image instead) or upload images (use import_image). Not required for personal or draft-only runs. Requires workspace owner authorization. Writes a permanent audit log record bound to imageId. Re-attesting with a new statementVersion creates a new timestamped attestation record without revoking prior history. Returns attestation confirmation object.",
32637
+ effect: "local-write-job",
32638
+ inputSchema: {
32639
+ type: "object",
32640
+ properties: {
32641
+ imageId: { type: "string", description: "The unique image asset identifier to attest." },
32642
+ statementVersion: { type: "string", description: "Legal attestation terms version accepted (e.g. v1). Returns 400 if invalid or empty." }
32643
+ },
32644
+ required: ["imageId"],
32645
+ additionalProperties: false
32646
+ },
32647
+ outputSchema: { type: "object", properties: { imageId: { type: "string", description: "Image asset ID." }, statementVersion: { type: "string", description: "Recorded statement version." }, attestedAt: { type: "string", description: "ISO timestamp of attestation." } } }
32648
+ },
32649
+ {
32650
+ name: "archive_image",
32651
+ title: "Archive image",
32652
+ description: "Archive an image asset to soft-hide it from active media pickers without deleting binary files from storage. Call to declutter media library when an image is retired from active use. For permanent deletion, use delete_image instead. Idempotent state transition, fully reversible via restore_image. Slides and carousels currently referencing this image continue to display and render without disruption. Returns updated Image record with status set to archived.",
32653
+ effect: "local-write-job",
32654
+ inputSchema: {
32655
+ type: "object",
32656
+ properties: {
32657
+ imageId: { type: "string", description: "The unique image asset identifier to archive." }
32658
+ },
32659
+ required: ["imageId"],
32660
+ additionalProperties: false
32661
+ },
32662
+ outputSchema: { type: "object", properties: { imageId: { type: "string", description: "Image asset ID." }, status: { type: "string", description: "Updated status (archived)." } } }
32663
+ },
32664
+ {
32665
+ name: "restore_image",
32666
+ title: "Restore image",
32667
+ description: "Restore a previously archived or trashed image asset back to active status in the workspace media library. Call to unhide a retired asset and make it selectable again in slide slot editors. Alternatives: Use get_image to inspect asset details before restoring. Idempotent state transition. Returns restored Image record visible in default media queries.",
32668
+ effect: "local-write-job",
32669
+ inputSchema: {
32670
+ type: "object",
32671
+ properties: {
32672
+ imageId: { type: "string", description: "The unique image asset identifier to restore." }
32673
+ },
32674
+ required: ["imageId"],
32675
+ additionalProperties: false
32676
+ },
32677
+ outputSchema: { type: "object", properties: { imageId: { type: "string", description: "Image asset ID." }, status: { type: "string", description: "Restored status (active)." } } }
32678
+ },
32679
+ {
32680
+ name: "delete_image",
32681
+ title: "Delete image",
32682
+ description: "Move an image asset to trash for permanent removal. Call only when an image is obsolete, copyrighted without license, or marked for permanent deletion. If existing slides still use this image, prefer archive_image to hide it safely without breaking slide renders. Destructive operation requiring explicit user confirmation. May cause slide render failures if imageId is bound to active slides. Returns deletion confirmation record.",
32683
+ effect: "explicit-approval",
32684
+ inputSchema: {
32685
+ type: "object",
32686
+ properties: {
32687
+ imageId: { type: "string", description: "The unique image asset identifier to move to trash." }
32688
+ },
32689
+ required: ["imageId"],
32690
+ additionalProperties: false
32691
+ },
32692
+ outputSchema: { type: "object", properties: { imageId: { type: "string", description: "Deleted image asset ID." }, deleted: { type: "boolean", description: "True if deletion confirmed." } } }
32693
+ }
32304
32694
  ];
32305
32695
  unifiedToolRegistry = [...templateTools, ...slideshowTools, ...brandTools, ...imageTools];
32306
32696
  unifiedResourceTemplates = slideshowResourceTemplates;