@easysociable/cli 0.1.14 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/easysociable.js +474 -246
- package/dist/easysociable.js.map +1 -1
- package/package.json +1 -1
package/dist/easysociable.js
CHANGED
|
@@ -31802,7 +31802,7 @@ var init_src4 = __esm({
|
|
|
31802
31802
|
{
|
|
31803
31803
|
name: "list_gradients",
|
|
31804
31804
|
title: "List gradients",
|
|
31805
|
-
description: "List platform gradient recipe summaries (
|
|
31805
|
+
description: "List or search platform gradient recipe summaries by keyword query or tag (Gateway catalog only). Prefer small limit for Agent token budget.",
|
|
31806
31806
|
effect: "read-only",
|
|
31807
31807
|
inputSchema: {
|
|
31808
31808
|
type: "object",
|
|
@@ -31815,31 +31815,16 @@ var init_src4 = __esm({
|
|
|
31815
31815
|
},
|
|
31816
31816
|
outputSchema: { type: "object", properties: { gradients: { type: "array" } } }
|
|
31817
31817
|
},
|
|
31818
|
-
{
|
|
31819
|
-
name: "search_gradients",
|
|
31820
|
-
title: "Search gradients",
|
|
31821
|
-
description: "Search platform gradient recipes by query/tag (Gateway catalog only; not Unsplash/Pexels/Pinterest).",
|
|
31822
|
-
effect: "read-only",
|
|
31823
|
-
inputSchema: {
|
|
31824
|
-
type: "object",
|
|
31825
|
-
properties: {
|
|
31826
|
-
q: { type: "string" },
|
|
31827
|
-
tag: { type: "string" },
|
|
31828
|
-
limit: { type: "number" }
|
|
31829
|
-
},
|
|
31830
|
-
required: ["q"],
|
|
31831
|
-
additionalProperties: false
|
|
31832
|
-
},
|
|
31833
|
-
outputSchema: { type: "object", properties: { gradients: { type: "array" } } }
|
|
31834
|
-
},
|
|
31835
31818
|
{
|
|
31836
31819
|
name: "get_gradient",
|
|
31837
31820
|
title: "Get gradient",
|
|
31838
|
-
description: "
|
|
31821
|
+
description: "Retrieve the full gradient CSS recipe (color stops, linear angle, and semantic tokens) for a specific gradient by gradientId. Use this after selecting a gradient from list_gradients to apply background styling or surface decoration to cards.",
|
|
31839
31822
|
effect: "read-only",
|
|
31840
31823
|
inputSchema: {
|
|
31841
31824
|
type: "object",
|
|
31842
|
-
properties: {
|
|
31825
|
+
properties: {
|
|
31826
|
+
gradientId: { type: "string", description: "The unique identifier of the gradient preset (e.g. grad_warm_sunset)." }
|
|
31827
|
+
},
|
|
31843
31828
|
required: ["gradientId"],
|
|
31844
31829
|
additionalProperties: false
|
|
31845
31830
|
},
|
|
@@ -31853,10 +31838,10 @@ var init_src4 = __esm({
|
|
|
31853
31838
|
inputSchema: {
|
|
31854
31839
|
type: "object",
|
|
31855
31840
|
properties: {
|
|
31856
|
-
query: { type: "string" },
|
|
31857
|
-
collection: { type: "string" },
|
|
31858
|
-
style: { type: "string", description: "outline | solid | any" },
|
|
31859
|
-
limit: { type: "number" }
|
|
31841
|
+
query: { type: "string", description: "Search term for icon meaning or keyword (e.g. arrow, checkmark, star)." },
|
|
31842
|
+
collection: { type: "string", description: "Optional icon collection filter (e.g. lucide, tabler)." },
|
|
31843
|
+
style: { type: "string", description: "Icon rendering style: outline | solid | any" },
|
|
31844
|
+
limit: { type: "number", description: "Max number of candidates to return (default 8; prefer small limits for token budget)." }
|
|
31860
31845
|
},
|
|
31861
31846
|
required: ["query"],
|
|
31862
31847
|
additionalProperties: false
|
|
@@ -31871,8 +31856,8 @@ var init_src4 = __esm({
|
|
|
31871
31856
|
inputSchema: {
|
|
31872
31857
|
type: "object",
|
|
31873
31858
|
properties: {
|
|
31874
|
-
iconId: { type: "string", description: "e.g. lucide:arrow-right" },
|
|
31875
|
-
idempotencyKey: { type: "string" }
|
|
31859
|
+
iconId: { type: "string", description: "Canonical icon identifier confirmed from search_icons (e.g. lucide:arrow-right)." },
|
|
31860
|
+
idempotencyKey: { type: "string", description: "Unique idempotency key to prevent duplicate icon asset creation." }
|
|
31876
31861
|
},
|
|
31877
31862
|
required: ["iconId", "idempotencyKey"],
|
|
31878
31863
|
additionalProperties: false
|
|
@@ -31886,19 +31871,31 @@ var init_src4 = __esm({
|
|
|
31886
31871
|
}
|
|
31887
31872
|
}
|
|
31888
31873
|
},
|
|
31874
|
+
{
|
|
31875
|
+
name: "list_drafts",
|
|
31876
|
+
title: "List authoring drafts",
|
|
31877
|
+
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 find draft IDs before updating or publishing.",
|
|
31878
|
+
effect: "read-only",
|
|
31879
|
+
inputSchema: {
|
|
31880
|
+
type: "object",
|
|
31881
|
+
properties: {},
|
|
31882
|
+
additionalProperties: false
|
|
31883
|
+
},
|
|
31884
|
+
outputSchema: { type: "object", properties: { drafts: { type: "array" } } }
|
|
31885
|
+
},
|
|
31889
31886
|
{
|
|
31890
31887
|
name: "create_draft",
|
|
31891
31888
|
title: "Create authoring draft",
|
|
31892
|
-
description: "
|
|
31889
|
+
description: "Initialize a new Page Template draft for authoring. Returns draftId and an interactive authoringStudioUrl for real-time visual canvas editing before publishing. Call this to create custom template layouts.",
|
|
31893
31890
|
effect: "local-write-job",
|
|
31894
31891
|
inputSchema: {
|
|
31895
31892
|
type: "object",
|
|
31896
31893
|
properties: {
|
|
31897
|
-
name: { type: "string" },
|
|
31898
|
-
source: { type: "object", additionalProperties: true },
|
|
31899
|
-
authoringSource: { type: "object", additionalProperties: true },
|
|
31900
|
-
selectionMetadata: { type: "object", additionalProperties: true },
|
|
31901
|
-
theme: { type: "object", additionalProperties: true }
|
|
31894
|
+
name: { type: "string", description: "Human-readable title for the template draft." },
|
|
31895
|
+
source: { type: "object", additionalProperties: true, description: "Optional initial canvas source tree." },
|
|
31896
|
+
authoringSource: { type: "object", additionalProperties: true, description: "Template AST structure including layer hierarchy and visual slots." },
|
|
31897
|
+
selectionMetadata: { type: "object", additionalProperties: true, description: "Aspect ratio and categorization metadata (platforms, layout family, intent)." },
|
|
31898
|
+
theme: { type: "object", additionalProperties: true, description: "Default theme overrides (palette, typography tokens)." }
|
|
31902
31899
|
},
|
|
31903
31900
|
required: ["name"],
|
|
31904
31901
|
additionalProperties: false
|
|
@@ -31908,11 +31905,13 @@ var init_src4 = __esm({
|
|
|
31908
31905
|
{
|
|
31909
31906
|
name: "get_draft",
|
|
31910
31907
|
title: "Get authoring draft",
|
|
31911
|
-
description: "Fetch
|
|
31908
|
+
description: "Fetch full authoring draft detail by draftId including layer canvas tree, slot contracts, theme bindings, and validation errors. Call this to inspect or validate a draft prior to updating or publishing.",
|
|
31912
31909
|
effect: "read-only",
|
|
31913
31910
|
inputSchema: {
|
|
31914
31911
|
type: "object",
|
|
31915
|
-
properties: {
|
|
31912
|
+
properties: {
|
|
31913
|
+
draftId: { type: "string", description: "The unique draft identifier to retrieve." }
|
|
31914
|
+
},
|
|
31916
31915
|
required: ["draftId"],
|
|
31917
31916
|
additionalProperties: false
|
|
31918
31917
|
},
|
|
@@ -31921,30 +31920,47 @@ var init_src4 = __esm({
|
|
|
31921
31920
|
{
|
|
31922
31921
|
name: "update_draft",
|
|
31923
31922
|
title: "Update authoring draft",
|
|
31924
|
-
description: "Update authoring draft
|
|
31923
|
+
description: "Update properties of an existing authoring draft. Modifies layer nodes, slot definitions, selection metadata, or theme tokens. Re-validates layout rules upon save. Call this to iteratively refine draft designs.",
|
|
31925
31924
|
effect: "local-write-job",
|
|
31926
31925
|
inputSchema: {
|
|
31927
31926
|
type: "object",
|
|
31928
31927
|
properties: {
|
|
31929
|
-
draftId: { type: "string" },
|
|
31930
|
-
name: { type: "string" },
|
|
31931
|
-
authoringSource: { type: "object", additionalProperties: true },
|
|
31932
|
-
selectionMetadata: { type: "object", additionalProperties: true },
|
|
31933
|
-
theme: { type: "object", additionalProperties: true }
|
|
31928
|
+
draftId: { type: "string", description: "The unique draft identifier to update." },
|
|
31929
|
+
name: { type: "string", description: "Updated template title." },
|
|
31930
|
+
authoringSource: { type: "object", additionalProperties: true, description: "Updated template AST layout structure." },
|
|
31931
|
+
selectionMetadata: { type: "object", additionalProperties: true, description: "Updated platform and family metadata." },
|
|
31932
|
+
theme: { type: "object", additionalProperties: true, description: "Updated theme tokens." }
|
|
31934
31933
|
},
|
|
31935
31934
|
required: ["draftId"],
|
|
31936
31935
|
additionalProperties: false
|
|
31937
31936
|
},
|
|
31938
31937
|
outputSchema: { type: "object", properties: { id: { type: "string" } } }
|
|
31939
31938
|
},
|
|
31939
|
+
{
|
|
31940
|
+
name: "delete_draft",
|
|
31941
|
+
title: "Delete authoring draft",
|
|
31942
|
+
description: "Permanently discard and delete a template authoring draft. Destructive operation requiring confirmation: draft canvas data and unpublished changes cannot be recovered.",
|
|
31943
|
+
effect: "explicit-approval",
|
|
31944
|
+
inputSchema: {
|
|
31945
|
+
type: "object",
|
|
31946
|
+
properties: {
|
|
31947
|
+
draftId: { type: "string", description: "The unique draft identifier to permanently delete." }
|
|
31948
|
+
},
|
|
31949
|
+
required: ["draftId"],
|
|
31950
|
+
additionalProperties: false
|
|
31951
|
+
},
|
|
31952
|
+
outputSchema: { type: "object", properties: {} }
|
|
31953
|
+
},
|
|
31940
31954
|
{
|
|
31941
31955
|
name: "publish_draft",
|
|
31942
31956
|
title: "Publish authoring draft",
|
|
31943
|
-
description: "
|
|
31957
|
+
description: "Validate and publish an authoring draft into the immutable public or workspace template catalog. Once published, the template becomes immutable and can be instantiated into multi-page slideshow runs.",
|
|
31944
31958
|
effect: "local-write-job",
|
|
31945
31959
|
inputSchema: {
|
|
31946
31960
|
type: "object",
|
|
31947
|
-
properties: {
|
|
31961
|
+
properties: {
|
|
31962
|
+
draftId: { type: "string", description: "The unique draft identifier to validate and publish." }
|
|
31963
|
+
},
|
|
31948
31964
|
required: ["draftId"],
|
|
31949
31965
|
additionalProperties: false
|
|
31950
31966
|
},
|
|
@@ -31953,11 +31969,13 @@ var init_src4 = __esm({
|
|
|
31953
31969
|
{
|
|
31954
31970
|
name: "create_preview_job",
|
|
31955
31971
|
title: "Create preview job",
|
|
31956
|
-
description: "
|
|
31972
|
+
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.",
|
|
31957
31973
|
effect: "local-write-job",
|
|
31958
31974
|
inputSchema: {
|
|
31959
31975
|
type: "object",
|
|
31960
|
-
properties: {
|
|
31976
|
+
properties: {
|
|
31977
|
+
draftId: { type: "string", description: "The unique draft identifier to generate a render preview for." }
|
|
31978
|
+
},
|
|
31961
31979
|
required: ["draftId"],
|
|
31962
31980
|
additionalProperties: false
|
|
31963
31981
|
},
|
|
@@ -31966,7 +31984,7 @@ var init_src4 = __esm({
|
|
|
31966
31984
|
{
|
|
31967
31985
|
name: "import_template_image",
|
|
31968
31986
|
title: "Import template image",
|
|
31969
|
-
description: "
|
|
31987
|
+
description: "Upload an image asset specifically attached to a template draft canvas (for general brand/media library assets, use import_image).",
|
|
31970
31988
|
effect: "local-write-job",
|
|
31971
31989
|
inputSchema: {
|
|
31972
31990
|
type: "object",
|
|
@@ -31989,99 +32007,6 @@ var init_src4 = __esm({
|
|
|
31989
32007
|
additionalProperties: false
|
|
31990
32008
|
},
|
|
31991
32009
|
outputSchema: { type: "object", properties: { imageId: { type: "string" }, url: { type: "string" } } }
|
|
31992
|
-
},
|
|
31993
|
-
{
|
|
31994
|
-
name: "create_render_asset",
|
|
31995
|
-
title: "Create render asset",
|
|
31996
|
-
description: "Fill-slots path (ADR-0024): upload one-shot image bytes to R2 under renders/. Does NOT write Directus Image. Returns renderAssetId for create_render_job image slots. Use for user upload / AI / third-party bytes after host download.",
|
|
31997
|
-
effect: "local-write-job",
|
|
31998
|
-
inputSchema: {
|
|
31999
|
-
type: "object",
|
|
32000
|
-
properties: {
|
|
32001
|
-
fileName: { type: "string" },
|
|
32002
|
-
mimeType: { type: "string", description: "image/jpeg | image/png | image/webp" },
|
|
32003
|
-
dataBase64: { type: "string" },
|
|
32004
|
-
idempotencyKey: { type: "string" },
|
|
32005
|
-
provider: { type: "string", description: "optional provenance provider" },
|
|
32006
|
-
sourceUrl: { type: "string" },
|
|
32007
|
-
attribution: { type: "string" }
|
|
32008
|
-
},
|
|
32009
|
-
required: ["fileName", "mimeType", "dataBase64", "idempotencyKey"],
|
|
32010
|
-
additionalProperties: false
|
|
32011
|
-
},
|
|
32012
|
-
outputSchema: {
|
|
32013
|
-
type: "object",
|
|
32014
|
-
properties: {
|
|
32015
|
-
renderAssetId: { type: "string" },
|
|
32016
|
-
url: { type: "string" },
|
|
32017
|
-
expiresAt: { type: "string" }
|
|
32018
|
-
}
|
|
32019
|
-
}
|
|
32020
|
-
},
|
|
32021
|
-
{
|
|
32022
|
-
name: "create_render_job",
|
|
32023
|
-
title: "Create render job",
|
|
32024
|
-
description: "Retired as a paid delivery path. PNG packs come from Studio Download. Gateway returns HEADLESS_RENDER_DISABLED. Kept for compatibility; do not use for customer PNG delivery. Historic fill-slots shape: templateId + slots + outputFormats (ADR-0021).",
|
|
32025
|
-
effect: "local-write-job",
|
|
32026
|
-
inputSchema: {
|
|
32027
|
-
type: "object",
|
|
32028
|
-
properties: {
|
|
32029
|
-
templateId: { type: "string" },
|
|
32030
|
-
slots: { type: "object", additionalProperties: true, description: "Public slot key \u2192 string|number|null" },
|
|
32031
|
-
outputFormats: { type: "array" },
|
|
32032
|
-
idempotencyKey: { type: "string" }
|
|
32033
|
-
},
|
|
32034
|
-
required: ["templateId", "slots", "outputFormats", "idempotencyKey"],
|
|
32035
|
-
additionalProperties: false
|
|
32036
|
-
},
|
|
32037
|
-
outputSchema: {
|
|
32038
|
-
type: "object",
|
|
32039
|
-
properties: {
|
|
32040
|
-
jobId: { type: "string" },
|
|
32041
|
-
status: { type: "string" },
|
|
32042
|
-
previewUrl: { type: "string" },
|
|
32043
|
-
capture: { type: "object" }
|
|
32044
|
-
}
|
|
32045
|
-
}
|
|
32046
|
-
},
|
|
32047
|
-
{
|
|
32048
|
-
name: "get_render_job",
|
|
32049
|
-
title: "Get render job",
|
|
32050
|
-
description: "Poll a hosted render job status/manifest",
|
|
32051
|
-
effect: "read-only",
|
|
32052
|
-
inputSchema: {
|
|
32053
|
-
type: "object",
|
|
32054
|
-
properties: { jobId: { type: "string" } },
|
|
32055
|
-
required: ["jobId"],
|
|
32056
|
-
additionalProperties: false
|
|
32057
|
-
},
|
|
32058
|
-
outputSchema: { type: "object", properties: { jobId: { type: "string" }, status: { type: "string" } } }
|
|
32059
|
-
},
|
|
32060
|
-
{
|
|
32061
|
-
name: "cancel_template_render",
|
|
32062
|
-
title: "Cancel render job",
|
|
32063
|
-
description: "Cancel a hosted render job",
|
|
32064
|
-
effect: "local-write-job",
|
|
32065
|
-
inputSchema: {
|
|
32066
|
-
type: "object",
|
|
32067
|
-
properties: { jobId: { type: "string" } },
|
|
32068
|
-
required: ["jobId"],
|
|
32069
|
-
additionalProperties: false
|
|
32070
|
-
},
|
|
32071
|
-
outputSchema: { type: "object", properties: {} }
|
|
32072
|
-
},
|
|
32073
|
-
{
|
|
32074
|
-
name: "get_render_manifest",
|
|
32075
|
-
title: "Get render manifest",
|
|
32076
|
-
description: "Fetch a public render manifest",
|
|
32077
|
-
effect: "read-only",
|
|
32078
|
-
inputSchema: {
|
|
32079
|
-
type: "object",
|
|
32080
|
-
properties: { manifestId: { type: "string" } },
|
|
32081
|
-
required: ["manifestId"],
|
|
32082
|
-
additionalProperties: false
|
|
32083
|
-
},
|
|
32084
|
-
outputSchema: { type: "object", properties: {} }
|
|
32085
32010
|
}
|
|
32086
32011
|
];
|
|
32087
32012
|
TemplateGatewayMcpBackend = class {
|
|
@@ -32129,13 +32054,9 @@ var init_src4 = __esm({
|
|
|
32129
32054
|
});
|
|
32130
32055
|
return { ok: true, data: { gradients }, meta: meta4 };
|
|
32131
32056
|
}
|
|
32132
|
-
if (toolName === "
|
|
32133
|
-
const
|
|
32134
|
-
|
|
32135
|
-
tag: typeof args.tag === "string" ? args.tag : void 0,
|
|
32136
|
-
limit: typeof args.limit === "number" ? args.limit : void 0
|
|
32137
|
-
});
|
|
32138
|
-
return { ok: true, data: { gradients }, meta: meta4 };
|
|
32057
|
+
if (toolName === "list_drafts") {
|
|
32058
|
+
const drafts = await this.client.listDrafts();
|
|
32059
|
+
return { ok: true, data: { drafts }, meta: meta4 };
|
|
32139
32060
|
}
|
|
32140
32061
|
if (toolName === "get_gradient") {
|
|
32141
32062
|
const gradient = await this.client.getGradient(String(args.gradientId));
|
|
@@ -32180,6 +32101,10 @@ var init_src4 = __esm({
|
|
|
32180
32101
|
});
|
|
32181
32102
|
return { ok: true, data: draft, meta: meta4 };
|
|
32182
32103
|
}
|
|
32104
|
+
if (toolName === "delete_draft") {
|
|
32105
|
+
await this.client.deleteDraft(String(args.draftId));
|
|
32106
|
+
return { ok: true, data: { deleted: true }, meta: meta4 };
|
|
32107
|
+
}
|
|
32183
32108
|
if (toolName === "publish_draft") {
|
|
32184
32109
|
const draft = await this.client.publishDraft(String(args.draftId));
|
|
32185
32110
|
return { ok: true, data: draft, meta: meta4 };
|
|
@@ -32209,72 +32134,6 @@ var init_src4 = __esm({
|
|
|
32209
32134
|
});
|
|
32210
32135
|
return { ok: true, data: image, meta: meta4 };
|
|
32211
32136
|
}
|
|
32212
|
-
if (toolName === "create_render_asset") {
|
|
32213
|
-
const asset = await this.client.createRenderAsset({
|
|
32214
|
-
file: {
|
|
32215
|
-
fileName: String(args.fileName),
|
|
32216
|
-
mimeType: args.mimeType,
|
|
32217
|
-
dataBase64: String(args.dataBase64)
|
|
32218
|
-
},
|
|
32219
|
-
idempotencyKey: String(args.idempotencyKey),
|
|
32220
|
-
purpose: "fill_slots",
|
|
32221
|
-
...typeof args.provider === "string" || typeof args.sourceUrl === "string" || typeof args.attribution === "string" ? {
|
|
32222
|
-
provenance: {
|
|
32223
|
-
...typeof args.provider === "string" ? {
|
|
32224
|
-
provider: args.provider
|
|
32225
|
-
} : {},
|
|
32226
|
-
...typeof args.sourceUrl === "string" ? { sourceUrl: args.sourceUrl } : {},
|
|
32227
|
-
...typeof args.attribution === "string" ? { attribution: args.attribution } : {}
|
|
32228
|
-
}
|
|
32229
|
-
} : {}
|
|
32230
|
-
});
|
|
32231
|
-
return { ok: true, data: asset, meta: meta4 };
|
|
32232
|
-
}
|
|
32233
|
-
if (toolName === "create_render_job") {
|
|
32234
|
-
if (typeof args.idempotencyKey !== "string" || !args.idempotencyKey.trim()) {
|
|
32235
|
-
return {
|
|
32236
|
-
ok: false,
|
|
32237
|
-
error: {
|
|
32238
|
-
code: "VALIDATION_ERROR",
|
|
32239
|
-
message: "idempotencyKey is required for final rendering",
|
|
32240
|
-
retryable: false,
|
|
32241
|
-
suggestedAction: "Provide a stable idempotencyKey and retry the same request"
|
|
32242
|
-
},
|
|
32243
|
-
meta: meta4
|
|
32244
|
-
};
|
|
32245
|
-
}
|
|
32246
|
-
if ("contentDocumentHash" in args || "contentDocument" in args || "plan" in args || "ast" in args) {
|
|
32247
|
-
return {
|
|
32248
|
-
ok: false,
|
|
32249
|
-
error: {
|
|
32250
|
-
code: "VALIDATION_ERROR",
|
|
32251
|
-
message: "create_render_job accepts only templateId + slots + outputFormats (ADR-0021). contentDocumentHash / ContentDocument / RenderPlan are rejected.",
|
|
32252
|
-
retryable: false,
|
|
32253
|
-
suggestedAction: "Call get_template for slots[], fill values, then create_render_job({ templateId, slots, outputFormats, idempotencyKey })"
|
|
32254
|
-
},
|
|
32255
|
-
meta: meta4
|
|
32256
|
-
};
|
|
32257
|
-
}
|
|
32258
|
-
const job = await this.client.createRenderJob({
|
|
32259
|
-
templateId: String(args.templateId),
|
|
32260
|
-
slots: args.slots && typeof args.slots === "object" ? args.slots : {},
|
|
32261
|
-
outputFormats: ["png"],
|
|
32262
|
-
idempotencyKey: args.idempotencyKey
|
|
32263
|
-
});
|
|
32264
|
-
return { ok: true, data: job, meta: { ...meta4, jobId: job.jobId } };
|
|
32265
|
-
}
|
|
32266
|
-
if (toolName === "get_render_job") {
|
|
32267
|
-
const job = await this.client.getRenderJob(String(args.jobId));
|
|
32268
|
-
return { ok: true, data: job, meta: { ...meta4, jobId: job.jobId } };
|
|
32269
|
-
}
|
|
32270
|
-
if (toolName === "cancel_template_render") {
|
|
32271
|
-
const job = await this.client.cancelRenderJob(String(args.jobId));
|
|
32272
|
-
return { ok: true, data: job, meta: { ...meta4, jobId: job.jobId } };
|
|
32273
|
-
}
|
|
32274
|
-
if (toolName === "get_render_manifest") {
|
|
32275
|
-
const manifest = await this.client.getRenderManifest(String(args.manifestId));
|
|
32276
|
-
return { ok: true, data: manifest, meta: meta4 };
|
|
32277
|
-
}
|
|
32278
32137
|
return {
|
|
32279
32138
|
ok: false,
|
|
32280
32139
|
error: { code: "UNKNOWN_TOOL", message: `Unknown tool: ${toolName}`, retryable: false },
|
|
@@ -32322,15 +32181,161 @@ var init_src5 = __esm({
|
|
|
32322
32181
|
init_src2();
|
|
32323
32182
|
objectSchema = { type: "object", properties: {}, additionalProperties: true };
|
|
32324
32183
|
slideshowToolRegistry = [
|
|
32325
|
-
{
|
|
32326
|
-
|
|
32327
|
-
|
|
32328
|
-
|
|
32329
|
-
|
|
32330
|
-
|
|
32331
|
-
|
|
32332
|
-
|
|
32333
|
-
|
|
32184
|
+
{
|
|
32185
|
+
name: "list_runs",
|
|
32186
|
+
title: "List slideshow runs",
|
|
32187
|
+
description: "List owner-scoped Slideshow Runs with optional platform, status, or search query filters. Returns run metadata, platform, page counts, and timestamps. Follow pagination to inspect existing carousel projects and draft runs.",
|
|
32188
|
+
effect: "read-only",
|
|
32189
|
+
inputSchema: {
|
|
32190
|
+
type: "object",
|
|
32191
|
+
properties: {
|
|
32192
|
+
q: { type: "string", description: "Search term matching run title, topic, or content text." },
|
|
32193
|
+
platform: { type: "string", description: "Target platform filter: tiktok | linkedin | instagram | threads | xiaohongshu" },
|
|
32194
|
+
profileId: { type: "string", description: "Optional profile filter." },
|
|
32195
|
+
brandProfileId: { type: "string", description: "Optional legacy brand profile filter." },
|
|
32196
|
+
brandId: { type: "string", description: "Filter runs styled with a specific Brand ID." },
|
|
32197
|
+
contentSlug: { type: "string", description: "Filter runs generated from a specific content topic slug." },
|
|
32198
|
+
status: { type: "string", description: "Lifecycle status filter: draft | active | archived | trash" }
|
|
32199
|
+
},
|
|
32200
|
+
additionalProperties: true
|
|
32201
|
+
},
|
|
32202
|
+
outputSchema: objectSchema
|
|
32203
|
+
},
|
|
32204
|
+
{
|
|
32205
|
+
name: "recommend_templates",
|
|
32206
|
+
title: "Recommend slideshow page templates",
|
|
32207
|
+
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.",
|
|
32208
|
+
effect: "read-only",
|
|
32209
|
+
inputSchema: {
|
|
32210
|
+
type: "object",
|
|
32211
|
+
properties: {
|
|
32212
|
+
platform: { type: "string", description: "Target platform: tiktok | linkedin | instagram | threads | xiaohongshu" },
|
|
32213
|
+
canvasPreset: { type: "string", description: "Target aspect ratio preset (e.g. 9:16, 4:5, 1:1, 3:4)." },
|
|
32214
|
+
pages: {
|
|
32215
|
+
type: "array",
|
|
32216
|
+
description: "Ordered list of page contracts describing narrative role and slot requirements.",
|
|
32217
|
+
items: {
|
|
32218
|
+
type: "object",
|
|
32219
|
+
properties: {
|
|
32220
|
+
role: { type: "string", description: "Narrative role: hook | value | rehook | cta" },
|
|
32221
|
+
density: { type: "string", description: "Content density: sparse | normal | dense" },
|
|
32222
|
+
slotSummary: { type: "object", description: "Slot keys expected on this page." },
|
|
32223
|
+
requiresImage: { type: "boolean", description: "Whether this page must have an image slot." }
|
|
32224
|
+
},
|
|
32225
|
+
required: ["role"]
|
|
32226
|
+
}
|
|
32227
|
+
},
|
|
32228
|
+
k: { type: "integer", minimum: 2, maximum: 5, description: "Number of template recommendations to return per page (2 to 5)." },
|
|
32229
|
+
seed: { type: "string", description: "Optional deterministic randomization seed for layout family rotation." }
|
|
32230
|
+
},
|
|
32231
|
+
required: ["platform", "pages"],
|
|
32232
|
+
additionalProperties: true
|
|
32233
|
+
},
|
|
32234
|
+
outputSchema: objectSchema
|
|
32235
|
+
},
|
|
32236
|
+
{
|
|
32237
|
+
name: "create_run",
|
|
32238
|
+
title: "Create slideshow run",
|
|
32239
|
+
description: "Create a durable multi-page Slideshow Run from a structured content-pack.v1 (pages with role, templateId, and filled slot copy). Returns runId and interactive Studio review URL for browser preview and PNG pack download.",
|
|
32240
|
+
effect: "local-write-job",
|
|
32241
|
+
inputSchema: {
|
|
32242
|
+
type: "object",
|
|
32243
|
+
properties: {
|
|
32244
|
+
pack: { type: "object", description: "content-pack.v1 payload containing schemaVersion, platform, and pages array with bound templateId and slots content." },
|
|
32245
|
+
brandId: { type: "string", description: "Optional Brand ID to apply brand kit typography, colors, and logo to all slides." },
|
|
32246
|
+
brandProfileId: { type: "string", description: "Optional legacy brand profile ID." },
|
|
32247
|
+
contentSlug: { type: "string", description: "Optional content topic identifier for tracking in Content Engine." }
|
|
32248
|
+
},
|
|
32249
|
+
required: ["pack"],
|
|
32250
|
+
additionalProperties: true
|
|
32251
|
+
},
|
|
32252
|
+
outputSchema: objectSchema
|
|
32253
|
+
},
|
|
32254
|
+
{
|
|
32255
|
+
name: "get_run",
|
|
32256
|
+
title: "Get slideshow run",
|
|
32257
|
+
description: "Retrieve full details of a Slideshow Run by runId, including page list, bound template IDs, filled slot content, theme snapshot, and studio edit URL.",
|
|
32258
|
+
effect: "read-only",
|
|
32259
|
+
inputSchema: {
|
|
32260
|
+
type: "object",
|
|
32261
|
+
properties: {
|
|
32262
|
+
runId: { type: "string", description: "The unique Slideshow Run identifier to retrieve." }
|
|
32263
|
+
},
|
|
32264
|
+
required: ["runId"],
|
|
32265
|
+
additionalProperties: true
|
|
32266
|
+
},
|
|
32267
|
+
outputSchema: objectSchema
|
|
32268
|
+
},
|
|
32269
|
+
{
|
|
32270
|
+
name: "update_run",
|
|
32271
|
+
title: "Update slideshow run",
|
|
32272
|
+
description: "Update slide copy, slot bindings, theme overrides, or presentation preferences of an existing Slideshow Run. Uses optimistic concurrency revision lock to prevent overwrite conflicts.",
|
|
32273
|
+
effect: "local-write-job",
|
|
32274
|
+
inputSchema: {
|
|
32275
|
+
type: "object",
|
|
32276
|
+
properties: {
|
|
32277
|
+
runId: { type: "string", description: "The unique Slideshow Run identifier to update." },
|
|
32278
|
+
baseRevision: { type: "integer", minimum: 1, description: "Current revision number for optimistic concurrency locking to prevent overwrite races." },
|
|
32279
|
+
pack: { type: "object", description: "Updated complete content-pack.v1 structure." },
|
|
32280
|
+
brandId: { type: "string", description: "Updated Brand ID styling reference." },
|
|
32281
|
+
brandProfileId: { type: "string", description: "Optional legacy brand profile ID." },
|
|
32282
|
+
contentSlug: { type: "string", description: "Updated content topic slug." },
|
|
32283
|
+
pageIndex: { type: "integer", minimum: 0, description: "Index of a single slide page to patch (0-indexed)." },
|
|
32284
|
+
slots: { type: "object", description: "Key-value map of slot overrides for the specified pageIndex." },
|
|
32285
|
+
layout: { type: "object", description: "Layout adjustments for the specified pageIndex." },
|
|
32286
|
+
style: { type: "object", description: "Style token adjustments for the specified pageIndex." },
|
|
32287
|
+
decorations: { type: "array", description: "Visual decorations list for the specified pageIndex." }
|
|
32288
|
+
},
|
|
32289
|
+
required: ["runId"],
|
|
32290
|
+
additionalProperties: true
|
|
32291
|
+
},
|
|
32292
|
+
outputSchema: objectSchema
|
|
32293
|
+
},
|
|
32294
|
+
{
|
|
32295
|
+
name: "archive_run",
|
|
32296
|
+
title: "Archive slideshow run",
|
|
32297
|
+
description: "Archive a Slideshow Run to declutter the workspace and hide it from default project lists while keeping all generated slides and review URLs intact. Reversible via restore_slideshow_run.",
|
|
32298
|
+
effect: "local-write-job",
|
|
32299
|
+
inputSchema: {
|
|
32300
|
+
type: "object",
|
|
32301
|
+
properties: {
|
|
32302
|
+
runId: { type: "string", description: "The unique Slideshow Run identifier to archive." }
|
|
32303
|
+
},
|
|
32304
|
+
required: ["runId"],
|
|
32305
|
+
additionalProperties: true
|
|
32306
|
+
},
|
|
32307
|
+
outputSchema: objectSchema
|
|
32308
|
+
},
|
|
32309
|
+
{
|
|
32310
|
+
name: "restore_run",
|
|
32311
|
+
title: "Restore slideshow run",
|
|
32312
|
+
description: "Restore a previously archived or trashed Slideshow Run back to active workspace status, restoring it to the default projects view.",
|
|
32313
|
+
effect: "local-write-job",
|
|
32314
|
+
inputSchema: {
|
|
32315
|
+
type: "object",
|
|
32316
|
+
properties: {
|
|
32317
|
+
runId: { type: "string", description: "The unique Slideshow Run identifier to restore." }
|
|
32318
|
+
},
|
|
32319
|
+
required: ["runId"],
|
|
32320
|
+
additionalProperties: true
|
|
32321
|
+
},
|
|
32322
|
+
outputSchema: objectSchema
|
|
32323
|
+
},
|
|
32324
|
+
{
|
|
32325
|
+
name: "delete_run",
|
|
32326
|
+
title: "Delete slideshow run",
|
|
32327
|
+
description: "Permanently delete a Slideshow Run and its associated slide page records. Destructive operation requiring explicit user confirmation; studio review link will become invalid.",
|
|
32328
|
+
effect: "explicit-approval",
|
|
32329
|
+
inputSchema: {
|
|
32330
|
+
type: "object",
|
|
32331
|
+
properties: {
|
|
32332
|
+
runId: { type: "string", description: "The unique Slideshow Run identifier to permanently delete." }
|
|
32333
|
+
},
|
|
32334
|
+
required: ["runId"],
|
|
32335
|
+
additionalProperties: true
|
|
32336
|
+
},
|
|
32337
|
+
outputSchema: objectSchema
|
|
32338
|
+
}
|
|
32334
32339
|
];
|
|
32335
32340
|
slideshowResourceTemplates = [
|
|
32336
32341
|
{ uriTemplate: "slideshow://runs/{runId}", name: "Slideshow Run", description: "Owner-scoped Run JSON snapshot", mimeType: "application/json" }
|
|
@@ -32364,10 +32369,9 @@ var init_src5 = __esm({
|
|
|
32364
32369
|
return { ok: true, data: await this.client.archiveSlideshowRun(String(args.runId)), meta: m };
|
|
32365
32370
|
case "restore_run":
|
|
32366
32371
|
return { ok: true, data: await this.client.restoreSlideshowRun(String(args.runId)), meta: m };
|
|
32372
|
+
case "delete_run":
|
|
32367
32373
|
case "trash_run":
|
|
32368
32374
|
return { ok: true, data: await this.client.trashSlideshowRun(String(args.runId)), meta: m };
|
|
32369
|
-
case "render_run":
|
|
32370
|
-
return { ok: false, error: { code: "HEADLESS_RENDER_DISABLED", message: "PNG packs come from Studio Download, not CLI/MCP hosted jobs", retryable: false, suggestedAction: "Open the Slideshow in Studio and click Download" }, meta: m };
|
|
32371
32375
|
default:
|
|
32372
32376
|
return { ok: false, error: { code: "UNKNOWN_TOOL", message: `Unknown tool: ${toolName}`, retryable: false }, meta: m };
|
|
32373
32377
|
}
|
|
@@ -32415,13 +32419,13 @@ var init_src6 = __esm({
|
|
|
32415
32419
|
HEADLESS_TOOLS = /* @__PURE__ */ new Set(["create_template_render_job", "render_slideshow_run"]);
|
|
32416
32420
|
removedTools = /* @__PURE__ */ new Set(["publish_run", "unpublish_run"]);
|
|
32417
32421
|
templateNames = {
|
|
32422
|
+
list_drafts: "list_template_drafts",
|
|
32418
32423
|
create_draft: "create_template_draft",
|
|
32419
32424
|
get_draft: "get_template_draft",
|
|
32420
32425
|
update_draft: "update_template_draft",
|
|
32426
|
+
delete_draft: "delete_template_draft",
|
|
32421
32427
|
publish_draft: "publish_template_draft",
|
|
32422
|
-
create_preview_job: "create_template_preview_job"
|
|
32423
|
-
create_render_job: "create_template_render_job",
|
|
32424
|
-
get_render_job: "get_template_render_job"
|
|
32428
|
+
create_preview_job: "create_template_preview_job"
|
|
32425
32429
|
};
|
|
32426
32430
|
slideshowNames = {
|
|
32427
32431
|
list_runs: "list_slideshow_runs",
|
|
@@ -32431,29 +32435,249 @@ var init_src6 = __esm({
|
|
|
32431
32435
|
update_run: "update_slideshow_run",
|
|
32432
32436
|
archive_run: "archive_slideshow_run",
|
|
32433
32437
|
restore_run: "restore_slideshow_run",
|
|
32434
|
-
|
|
32435
|
-
render_run: "render_slideshow_run"
|
|
32438
|
+
delete_run: "delete_slideshow_run"
|
|
32436
32439
|
};
|
|
32437
32440
|
brandTools = [
|
|
32438
|
-
{
|
|
32439
|
-
|
|
32440
|
-
|
|
32441
|
-
|
|
32442
|
-
|
|
32443
|
-
|
|
32444
|
-
|
|
32441
|
+
{
|
|
32442
|
+
name: "list_brands",
|
|
32443
|
+
title: "List brands",
|
|
32444
|
+
description: "List owner-scoped Brands with typography tokens, color palettes, and logos. Use to discover available brand identities before creating or styling slideshow runs.",
|
|
32445
|
+
effect: "read-only",
|
|
32446
|
+
inputSchema: { type: "object", properties: {}, additionalProperties: false },
|
|
32447
|
+
outputSchema: { type: "object", properties: {} }
|
|
32448
|
+
},
|
|
32449
|
+
{
|
|
32450
|
+
name: "get_brand",
|
|
32451
|
+
title: "Get brand",
|
|
32452
|
+
description: "Fetch a complete Brand profile by brandId, including typography tokens, 4-color palette (primary, secondary, accent, surface), logoAssetId, and baseRevision. Call this before generating branded slides to inject brand styles.",
|
|
32453
|
+
effect: "read-only",
|
|
32454
|
+
inputSchema: {
|
|
32455
|
+
type: "object",
|
|
32456
|
+
properties: {
|
|
32457
|
+
brandId: { type: "string", description: "The unique identifier of the brand to retrieve." }
|
|
32458
|
+
},
|
|
32459
|
+
required: ["brandId"],
|
|
32460
|
+
additionalProperties: false
|
|
32461
|
+
},
|
|
32462
|
+
outputSchema: { type: "object", properties: {} }
|
|
32463
|
+
},
|
|
32464
|
+
{
|
|
32465
|
+
name: "create_brand",
|
|
32466
|
+
title: "Create brand",
|
|
32467
|
+
description: "Create a new owner-scoped Brand kit defining typography, color palette, handle, and optional logo asset. Returns the created Brand entity with revision 1. Best invoked before creating slideshow runs to establish consistent visual identity.",
|
|
32468
|
+
effect: "local-write-job",
|
|
32469
|
+
inputSchema: {
|
|
32470
|
+
type: "object",
|
|
32471
|
+
properties: {
|
|
32472
|
+
name: { type: "string", description: "Canonical brand name (e.g. Acme Corp)." },
|
|
32473
|
+
displayName: { type: "string", description: "User-facing display name." },
|
|
32474
|
+
handle: { type: "string", description: "Social media handle (e.g. @acme)." },
|
|
32475
|
+
typography: { type: "object", description: "Typography settings (headingFont, bodyFont)." },
|
|
32476
|
+
colors: { type: "object", description: "Color palette tokens (primary, secondary, accent, surface, text)." },
|
|
32477
|
+
logoAssetId: { type: "string", description: "Optional image asset ID for brand logo." }
|
|
32478
|
+
},
|
|
32479
|
+
required: ["name"],
|
|
32480
|
+
additionalProperties: false
|
|
32481
|
+
},
|
|
32482
|
+
outputSchema: { type: "object", properties: {} }
|
|
32483
|
+
},
|
|
32484
|
+
{
|
|
32485
|
+
name: "update_brand",
|
|
32486
|
+
title: "Update brand",
|
|
32487
|
+
description: "Patch visual styles or metadata of an existing Brand. Requires baseRevision for optimistic concurrency locking to prevent overwrite races. Returns updated Brand with incremented revision.",
|
|
32488
|
+
effect: "local-write-job",
|
|
32489
|
+
inputSchema: {
|
|
32490
|
+
type: "object",
|
|
32491
|
+
properties: {
|
|
32492
|
+
brandId: { type: "string", description: "The unique identifier of the brand to update." },
|
|
32493
|
+
baseRevision: { type: "integer", minimum: 1, description: "Current revision number for optimistic concurrency lock." },
|
|
32494
|
+
name: { type: "string", description: "Updated brand name." },
|
|
32495
|
+
displayName: { type: "string", description: "Updated display name." },
|
|
32496
|
+
handle: { type: "string", description: "Updated social handle." },
|
|
32497
|
+
typography: { type: "object", description: "Updated typography configuration." },
|
|
32498
|
+
colors: { type: "object", description: "Updated color palette tokens." },
|
|
32499
|
+
logoAssetId: { type: "string", description: "Updated logo asset ID." }
|
|
32500
|
+
},
|
|
32501
|
+
required: ["brandId", "baseRevision"],
|
|
32502
|
+
additionalProperties: false
|
|
32503
|
+
},
|
|
32504
|
+
outputSchema: { type: "object", properties: {} }
|
|
32505
|
+
},
|
|
32506
|
+
{
|
|
32507
|
+
name: "archive_brand",
|
|
32508
|
+
title: "Archive brand",
|
|
32509
|
+
description: "Archive an active Brand to soft-hide it from default pickers and list queries without losing styling tokens. Reversible via restore_brand. Existing slideshow runs referencing this brand continue to display correctly.",
|
|
32510
|
+
effect: "local-write-job",
|
|
32511
|
+
inputSchema: {
|
|
32512
|
+
type: "object",
|
|
32513
|
+
properties: {
|
|
32514
|
+
brandId: { type: "string", description: "The unique identifier of the brand to archive." }
|
|
32515
|
+
},
|
|
32516
|
+
required: ["brandId"],
|
|
32517
|
+
additionalProperties: false
|
|
32518
|
+
},
|
|
32519
|
+
outputSchema: { type: "object", properties: {} }
|
|
32520
|
+
},
|
|
32521
|
+
{
|
|
32522
|
+
name: "restore_brand",
|
|
32523
|
+
title: "Restore brand",
|
|
32524
|
+
description: "Restore a previously archived or trashed Brand back to active status, making it immediately selectable in brand selectors and default list queries.",
|
|
32525
|
+
effect: "local-write-job",
|
|
32526
|
+
inputSchema: {
|
|
32527
|
+
type: "object",
|
|
32528
|
+
properties: {
|
|
32529
|
+
brandId: { type: "string", description: "The unique identifier of the brand to restore." }
|
|
32530
|
+
},
|
|
32531
|
+
required: ["brandId"],
|
|
32532
|
+
additionalProperties: false
|
|
32533
|
+
},
|
|
32534
|
+
outputSchema: { type: "object", properties: {} }
|
|
32535
|
+
},
|
|
32536
|
+
{
|
|
32537
|
+
name: "delete_brand",
|
|
32538
|
+
title: "Delete brand",
|
|
32539
|
+
description: "Move a Brand to trash/pending deletion. Requires confirmation because dependent design workflows may lose default brand styling. Can be recovered with restore_brand.",
|
|
32540
|
+
effect: "explicit-approval",
|
|
32541
|
+
inputSchema: {
|
|
32542
|
+
type: "object",
|
|
32543
|
+
properties: {
|
|
32544
|
+
brandId: { type: "string", description: "The unique identifier of the brand to move to trash." }
|
|
32545
|
+
},
|
|
32546
|
+
required: ["brandId"],
|
|
32547
|
+
additionalProperties: false
|
|
32548
|
+
},
|
|
32549
|
+
outputSchema: { type: "object", properties: {} }
|
|
32550
|
+
}
|
|
32445
32551
|
];
|
|
32446
32552
|
rename = (tool, names) => ({ ...tool, name: names[tool.name] ?? tool.name });
|
|
32447
32553
|
templateTools = templateToolRegistry.map((tool) => rename(tool, templateNames));
|
|
32448
32554
|
slideshowTools = slideshowToolRegistry.filter((tool) => !removedTools.has(tool.name)).map((tool) => rename(tool, slideshowNames));
|
|
32449
32555
|
imageTools = [
|
|
32450
|
-
{
|
|
32451
|
-
|
|
32452
|
-
|
|
32453
|
-
|
|
32454
|
-
|
|
32455
|
-
|
|
32456
|
-
|
|
32556
|
+
{
|
|
32557
|
+
name: "list_images",
|
|
32558
|
+
title: "List images",
|
|
32559
|
+
description: "List owner-scoped image assets in the media library with optional search query q. Returns image IDs, CDN URLs, mime types, and rights status for slot assignment.",
|
|
32560
|
+
effect: "read-only",
|
|
32561
|
+
inputSchema: {
|
|
32562
|
+
type: "object",
|
|
32563
|
+
properties: {
|
|
32564
|
+
q: { type: "string", description: "Search term matching image name or provenance source." }
|
|
32565
|
+
},
|
|
32566
|
+
additionalProperties: false
|
|
32567
|
+
},
|
|
32568
|
+
outputSchema: { type: "object", properties: {} }
|
|
32569
|
+
},
|
|
32570
|
+
{
|
|
32571
|
+
name: "get_image",
|
|
32572
|
+
title: "Get image",
|
|
32573
|
+
description: "Fetch metadata and public R2/CDN delivery URL for a specific image asset by imageId. Use to inspect dimensions and rightsStatus before binding to slide slots.",
|
|
32574
|
+
effect: "read-only",
|
|
32575
|
+
inputSchema: {
|
|
32576
|
+
type: "object",
|
|
32577
|
+
properties: {
|
|
32578
|
+
imageId: { type: "string", description: "The unique image asset identifier to retrieve." }
|
|
32579
|
+
},
|
|
32580
|
+
required: ["imageId"],
|
|
32581
|
+
additionalProperties: false
|
|
32582
|
+
},
|
|
32583
|
+
outputSchema: { type: "object", properties: {} }
|
|
32584
|
+
},
|
|
32585
|
+
{
|
|
32586
|
+
name: "import_image",
|
|
32587
|
+
title: "Import image",
|
|
32588
|
+
description: "Upload and register an image into the permanent account media library (persisted to R2 + Directus metadata). For transient draft canvas images only, use import_template_image instead.",
|
|
32589
|
+
effect: "local-write-job",
|
|
32590
|
+
inputSchema: {
|
|
32591
|
+
type: "object",
|
|
32592
|
+
properties: {
|
|
32593
|
+
file: { type: "string", description: "Base64-encoded image data or local file path." },
|
|
32594
|
+
sourceUrl: { type: "string", description: "Original source URL if importing from web/unsplash/pinterest." },
|
|
32595
|
+
filename: { type: "string", description: "Original filename with extension (e.g. header.png)." },
|
|
32596
|
+
name: { type: "string", description: "Human-readable asset title in media library." },
|
|
32597
|
+
rightsStatus: { type: "string", description: "Rights ownership status: licensed_for_publish | user_owned | generated | rights_unknown" }
|
|
32598
|
+
},
|
|
32599
|
+
additionalProperties: false
|
|
32600
|
+
},
|
|
32601
|
+
outputSchema: { type: "object", properties: {} }
|
|
32602
|
+
},
|
|
32603
|
+
{
|
|
32604
|
+
name: "update_image",
|
|
32605
|
+
title: "Update image",
|
|
32606
|
+
description: "Update metadata for an existing media library asset by imageId (e.g. rename asset or update rightsStatus). Does not re-upload binary content.",
|
|
32607
|
+
effect: "local-write-job",
|
|
32608
|
+
inputSchema: {
|
|
32609
|
+
type: "object",
|
|
32610
|
+
properties: {
|
|
32611
|
+
imageId: { type: "string", description: "The unique image asset identifier to update." },
|
|
32612
|
+
name: { type: "string", description: "Updated human-readable asset title." },
|
|
32613
|
+
rightsStatus: { type: "string", description: "Updated rights status: licensed_for_publish | user_owned | generated" }
|
|
32614
|
+
},
|
|
32615
|
+
required: ["imageId"],
|
|
32616
|
+
additionalProperties: false
|
|
32617
|
+
},
|
|
32618
|
+
outputSchema: { type: "object", properties: {} }
|
|
32619
|
+
},
|
|
32620
|
+
{
|
|
32621
|
+
name: "attest_image",
|
|
32622
|
+
title: "Attest image rights",
|
|
32623
|
+
description: "Record legal ownership or commercial rights attestation for an image asset (statementVersion). Recommended before multi-platform export to ensure commercial compliance.",
|
|
32624
|
+
effect: "local-write-job",
|
|
32625
|
+
inputSchema: {
|
|
32626
|
+
type: "object",
|
|
32627
|
+
properties: {
|
|
32628
|
+
imageId: { type: "string", description: "The unique image asset identifier to attest." },
|
|
32629
|
+
statementVersion: { type: "string", description: "Legal attestation terms version accepted (e.g. v1)." }
|
|
32630
|
+
},
|
|
32631
|
+
required: ["imageId"],
|
|
32632
|
+
additionalProperties: false
|
|
32633
|
+
},
|
|
32634
|
+
outputSchema: { type: "object", properties: {} }
|
|
32635
|
+
},
|
|
32636
|
+
{
|
|
32637
|
+
name: "archive_image",
|
|
32638
|
+
title: "Archive image",
|
|
32639
|
+
description: "Archive an image asset to soft-hide it from active media pickers without deleting binary storage. Reversible via restore_image. Slides referencing this image remain intact.",
|
|
32640
|
+
effect: "local-write-job",
|
|
32641
|
+
inputSchema: {
|
|
32642
|
+
type: "object",
|
|
32643
|
+
properties: {
|
|
32644
|
+
imageId: { type: "string", description: "The unique image asset identifier to archive." }
|
|
32645
|
+
},
|
|
32646
|
+
required: ["imageId"],
|
|
32647
|
+
additionalProperties: false
|
|
32648
|
+
},
|
|
32649
|
+
outputSchema: { type: "object", properties: {} }
|
|
32650
|
+
},
|
|
32651
|
+
{
|
|
32652
|
+
name: "restore_image",
|
|
32653
|
+
title: "Restore image",
|
|
32654
|
+
description: "Restore an archived image asset back to active status in the media library, making it selectable in slot editors and list queries.",
|
|
32655
|
+
effect: "local-write-job",
|
|
32656
|
+
inputSchema: {
|
|
32657
|
+
type: "object",
|
|
32658
|
+
properties: {
|
|
32659
|
+
imageId: { type: "string", description: "The unique image asset identifier to restore." }
|
|
32660
|
+
},
|
|
32661
|
+
required: ["imageId"],
|
|
32662
|
+
additionalProperties: false
|
|
32663
|
+
},
|
|
32664
|
+
outputSchema: { type: "object", properties: {} }
|
|
32665
|
+
},
|
|
32666
|
+
{
|
|
32667
|
+
name: "delete_image",
|
|
32668
|
+
title: "Delete image",
|
|
32669
|
+
description: "Move an image asset to trash for deletion. Requires confirmation because slides referencing this image asset may fail to render properly.",
|
|
32670
|
+
effect: "explicit-approval",
|
|
32671
|
+
inputSchema: {
|
|
32672
|
+
type: "object",
|
|
32673
|
+
properties: {
|
|
32674
|
+
imageId: { type: "string", description: "The unique image asset identifier to move to trash." }
|
|
32675
|
+
},
|
|
32676
|
+
required: ["imageId"],
|
|
32677
|
+
additionalProperties: false
|
|
32678
|
+
},
|
|
32679
|
+
outputSchema: { type: "object", properties: {} }
|
|
32680
|
+
}
|
|
32457
32681
|
];
|
|
32458
32682
|
unifiedToolRegistry = [...templateTools, ...slideshowTools, ...brandTools, ...imageTools];
|
|
32459
32683
|
unifiedResourceTemplates = slideshowResourceTemplates;
|
|
@@ -32477,8 +32701,11 @@ var init_src6 = __esm({
|
|
|
32477
32701
|
const templateTool = templateTools.find((tool) => tool.name === toolName);
|
|
32478
32702
|
if (templateTool) return this.template.invoke(Object.entries(templateNames).find(([, name]) => name === toolName)?.[0] ?? toolName, args);
|
|
32479
32703
|
const slideshowTool = slideshowTools.find((tool) => tool.name === toolName);
|
|
32480
|
-
if (slideshowTool
|
|
32481
|
-
|
|
32704
|
+
if (slideshowTool || toolName === "trash_slideshow_run") {
|
|
32705
|
+
const canonical = toolName === "trash_slideshow_run" ? "delete_run" : Object.entries(slideshowNames).find(([, name]) => name === toolName)?.[0] ?? toolName;
|
|
32706
|
+
return this.slideshow.invoke(canonical, args);
|
|
32707
|
+
}
|
|
32708
|
+
const brandTool = brandTools.find((tool) => tool.name === toolName) || toolName === "trash_brand";
|
|
32482
32709
|
if (brandTool) {
|
|
32483
32710
|
const meta4 = { requestId: `mcp_${Date.now().toString(36)}`, runtimeVersion: "0.0.0", schemaVersion: 1, toolContractVersion: "2026-08-28" };
|
|
32484
32711
|
const brandId = typeof args.brandId === "string" ? args.brandId : "";
|
|
@@ -32511,6 +32738,7 @@ var init_src6 = __esm({
|
|
|
32511
32738
|
return this.client.archiveBrand(brandId);
|
|
32512
32739
|
case "restore_brand":
|
|
32513
32740
|
return this.client.restoreBrand(brandId);
|
|
32741
|
+
case "delete_brand":
|
|
32514
32742
|
case "trash_brand":
|
|
32515
32743
|
return this.client.trashBrand(brandId);
|
|
32516
32744
|
default:
|
|
@@ -32522,9 +32750,9 @@ var init_src6 = __esm({
|
|
|
32522
32750
|
const imageTool = imageTools.find((tool) => tool.name === toolName);
|
|
32523
32751
|
if (imageTool) {
|
|
32524
32752
|
const imageId = typeof args.imageId === "string" ? encodeURIComponent(args.imageId) : "";
|
|
32525
|
-
const route = toolName === "list_images" ? `/v1/images${typeof args.q === "string" && args.q ? `?q=${encodeURIComponent(args.q)}` : ""}` : toolName === "get_image" ? `/v1/images/${imageId}` : toolName === "import_image" ? "/v1/images/imports" : toolName === "attest_image" ? `/v1/images/${imageId}/attest` : `/v1/images/${imageId}/${toolName.replace("_image", "")}`;
|
|
32526
|
-
const method = toolName === "list_images" || toolName === "get_image" ? "GET" : toolName === "delete_image" ? "DELETE" : "POST";
|
|
32527
|
-
const body = toolName === "import_image" ? { file: args.file, sourceUrl: args.sourceUrl, filename: args.filename, name: args.name, rightsStatus: args.rightsStatus } : toolName === "attest_image" ? { accepted: true, statementVersion: args.statementVersion } : void 0;
|
|
32753
|
+
const route = toolName === "list_images" ? `/v1/images${typeof args.q === "string" && args.q ? `?q=${encodeURIComponent(args.q)}` : ""}` : toolName === "get_image" || toolName === "update_image" ? `/v1/images/${imageId}` : toolName === "import_image" ? "/v1/images/imports" : toolName === "attest_image" ? `/v1/images/${imageId}/attest` : `/v1/images/${imageId}/${toolName.replace("_image", "")}`;
|
|
32754
|
+
const method = toolName === "list_images" || toolName === "get_image" ? "GET" : toolName === "delete_image" ? "DELETE" : toolName === "update_image" ? "PATCH" : "POST";
|
|
32755
|
+
const body = toolName === "import_image" ? { file: args.file, sourceUrl: args.sourceUrl, filename: args.filename, name: args.name, rightsStatus: args.rightsStatus } : toolName === "attest_image" ? { accepted: true, statementVersion: args.statementVersion } : toolName === "update_image" ? { ...typeof args.name === "string" ? { name: args.name } : {}, ...typeof args.rightsStatus === "string" ? { rightsStatus: args.rightsStatus } : {} } : void 0;
|
|
32528
32756
|
return this.client.requestJson(method, route, body).then((data) => ({ ok: true, data, meta: { requestId: `mcp_${Date.now().toString(36)}`, runtimeVersion: "0.0.0", schemaVersion: 1, toolContractVersion: "2026-08-15" } })).catch((e) => ({ ok: false, error: { code: e?.code ?? "GATEWAY_ERROR", message: e?.message ?? "Gateway request failed", retryable: Boolean(e?.retryable) }, meta: { requestId: `mcp_${Date.now().toString(36)}`, runtimeVersion: "0.0.0", schemaVersion: 1, toolContractVersion: "2026-08-15" } }));
|
|
32529
32757
|
}
|
|
32530
32758
|
return Promise.resolve({
|