@easysociable/cli 0.1.13 → 0.1.15
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/README.md +28 -0
- package/dist/easysociable.js +52 -201
- package/dist/easysociable.js.map +1 -1
- package/package.json +19 -5
- package/skills/easysociable-content/SKILL.md +38 -85
- package/skills/easysociable-content/workflows/INTERVIEW.md +4 -4
- package/skills/easysociable-content/workflows/NEEDS.md +0 -99
package/README.md
CHANGED
|
@@ -68,6 +68,34 @@ indexes. Topics can cite either one without forcing a product connection.
|
|
|
68
68
|
|
|
69
69
|
Default `--root` / `--engine` parent is `/workspace` when that directory exists, otherwise the current working directory.
|
|
70
70
|
|
|
71
|
+
## MCP Server Configuration
|
|
72
|
+
|
|
73
|
+
EasySociable exposes native Model Context Protocol (MCP) tools for Claude Desktop, Claude Code, Cursor, and any MCP-compatible agent host.
|
|
74
|
+
|
|
75
|
+
### Claude Desktop (`claude_desktop_config.json`)
|
|
76
|
+
```json
|
|
77
|
+
{
|
|
78
|
+
"mcpServers": {
|
|
79
|
+
"easysociable": {
|
|
80
|
+
"command": "npx",
|
|
81
|
+
"args": ["-y", "@easysociable/cli", "mcp", "serve", "--transport", "stdio"]
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Cursor (`~/.cursor/mcp.json`)
|
|
88
|
+
```json
|
|
89
|
+
{
|
|
90
|
+
"mcpServers": {
|
|
91
|
+
"easysociable": {
|
|
92
|
+
"command": "easysociable",
|
|
93
|
+
"args": ["mcp", "serve", "--transport", "stdio"]
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
```
|
|
98
|
+
|
|
71
99
|
## Authentication
|
|
72
100
|
|
|
73
101
|
```bash
|
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,23 +31815,6 @@ 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",
|
|
@@ -31886,6 +31869,18 @@ var init_src4 = __esm({
|
|
|
31886
31869
|
}
|
|
31887
31870
|
}
|
|
31888
31871
|
},
|
|
31872
|
+
{
|
|
31873
|
+
name: "list_drafts",
|
|
31874
|
+
title: "List authoring drafts",
|
|
31875
|
+
description: "List template authoring drafts for the current owner.",
|
|
31876
|
+
effect: "read-only",
|
|
31877
|
+
inputSchema: {
|
|
31878
|
+
type: "object",
|
|
31879
|
+
properties: {},
|
|
31880
|
+
additionalProperties: false
|
|
31881
|
+
},
|
|
31882
|
+
outputSchema: { type: "object", properties: { drafts: { type: "array" } } }
|
|
31883
|
+
},
|
|
31889
31884
|
{
|
|
31890
31885
|
name: "create_draft",
|
|
31891
31886
|
title: "Create authoring draft",
|
|
@@ -31937,6 +31932,19 @@ var init_src4 = __esm({
|
|
|
31937
31932
|
},
|
|
31938
31933
|
outputSchema: { type: "object", properties: { id: { type: "string" } } }
|
|
31939
31934
|
},
|
|
31935
|
+
{
|
|
31936
|
+
name: "delete_draft",
|
|
31937
|
+
title: "Delete authoring draft",
|
|
31938
|
+
description: "Permanently delete an authoring draft by draftId.",
|
|
31939
|
+
effect: "explicit-approval",
|
|
31940
|
+
inputSchema: {
|
|
31941
|
+
type: "object",
|
|
31942
|
+
properties: { draftId: { type: "string" } },
|
|
31943
|
+
required: ["draftId"],
|
|
31944
|
+
additionalProperties: false
|
|
31945
|
+
},
|
|
31946
|
+
outputSchema: { type: "object", properties: {} }
|
|
31947
|
+
},
|
|
31940
31948
|
{
|
|
31941
31949
|
name: "publish_draft",
|
|
31942
31950
|
title: "Publish authoring draft",
|
|
@@ -31966,7 +31974,7 @@ var init_src4 = __esm({
|
|
|
31966
31974
|
{
|
|
31967
31975
|
name: "import_template_image",
|
|
31968
31976
|
title: "Import template image",
|
|
31969
|
-
description: "
|
|
31977
|
+
description: "Upload an image asset specifically attached to a template draft canvas (for general brand/media library assets, use import_image).",
|
|
31970
31978
|
effect: "local-write-job",
|
|
31971
31979
|
inputSchema: {
|
|
31972
31980
|
type: "object",
|
|
@@ -31989,99 +31997,6 @@ var init_src4 = __esm({
|
|
|
31989
31997
|
additionalProperties: false
|
|
31990
31998
|
},
|
|
31991
31999
|
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
32000
|
}
|
|
32086
32001
|
];
|
|
32087
32002
|
TemplateGatewayMcpBackend = class {
|
|
@@ -32129,13 +32044,9 @@ var init_src4 = __esm({
|
|
|
32129
32044
|
});
|
|
32130
32045
|
return { ok: true, data: { gradients }, meta: meta4 };
|
|
32131
32046
|
}
|
|
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 };
|
|
32047
|
+
if (toolName === "list_drafts") {
|
|
32048
|
+
const drafts = await this.client.listDrafts();
|
|
32049
|
+
return { ok: true, data: { drafts }, meta: meta4 };
|
|
32139
32050
|
}
|
|
32140
32051
|
if (toolName === "get_gradient") {
|
|
32141
32052
|
const gradient = await this.client.getGradient(String(args.gradientId));
|
|
@@ -32180,6 +32091,10 @@ var init_src4 = __esm({
|
|
|
32180
32091
|
});
|
|
32181
32092
|
return { ok: true, data: draft, meta: meta4 };
|
|
32182
32093
|
}
|
|
32094
|
+
if (toolName === "delete_draft") {
|
|
32095
|
+
await this.client.deleteDraft(String(args.draftId));
|
|
32096
|
+
return { ok: true, data: { deleted: true }, meta: meta4 };
|
|
32097
|
+
}
|
|
32183
32098
|
if (toolName === "publish_draft") {
|
|
32184
32099
|
const draft = await this.client.publishDraft(String(args.draftId));
|
|
32185
32100
|
return { ok: true, data: draft, meta: meta4 };
|
|
@@ -32209,72 +32124,6 @@ var init_src4 = __esm({
|
|
|
32209
32124
|
});
|
|
32210
32125
|
return { ok: true, data: image, meta: meta4 };
|
|
32211
32126
|
}
|
|
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
32127
|
return {
|
|
32279
32128
|
ok: false,
|
|
32280
32129
|
error: { code: "UNKNOWN_TOOL", message: `Unknown tool: ${toolName}`, retryable: false },
|
|
@@ -32329,8 +32178,7 @@ var init_src5 = __esm({
|
|
|
32329
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 },
|
|
32330
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 },
|
|
32331
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 },
|
|
32332
|
-
{ name: "
|
|
32333
|
-
{ name: "render_run", title: "Render slideshow run", description: "Retired. PNG packs come from Studio Download in the browser, not hosted render jobs.", effect: "local-write-job", inputSchema: { ...objectSchema, properties: { runId: { type: "string" }, idempotencyKey: { type: "string", minLength: 1, maxLength: 128 } }, required: ["runId", "idempotencyKey"] }, 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 }
|
|
32334
32182
|
];
|
|
32335
32183
|
slideshowResourceTemplates = [
|
|
32336
32184
|
{ uriTemplate: "slideshow://runs/{runId}", name: "Slideshow Run", description: "Owner-scoped Run JSON snapshot", mimeType: "application/json" }
|
|
@@ -32364,10 +32212,9 @@ var init_src5 = __esm({
|
|
|
32364
32212
|
return { ok: true, data: await this.client.archiveSlideshowRun(String(args.runId)), meta: m };
|
|
32365
32213
|
case "restore_run":
|
|
32366
32214
|
return { ok: true, data: await this.client.restoreSlideshowRun(String(args.runId)), meta: m };
|
|
32215
|
+
case "delete_run":
|
|
32367
32216
|
case "trash_run":
|
|
32368
32217
|
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
32218
|
default:
|
|
32372
32219
|
return { ok: false, error: { code: "UNKNOWN_TOOL", message: `Unknown tool: ${toolName}`, retryable: false }, meta: m };
|
|
32373
32220
|
}
|
|
@@ -32415,13 +32262,13 @@ var init_src6 = __esm({
|
|
|
32415
32262
|
HEADLESS_TOOLS = /* @__PURE__ */ new Set(["create_template_render_job", "render_slideshow_run"]);
|
|
32416
32263
|
removedTools = /* @__PURE__ */ new Set(["publish_run", "unpublish_run"]);
|
|
32417
32264
|
templateNames = {
|
|
32265
|
+
list_drafts: "list_template_drafts",
|
|
32418
32266
|
create_draft: "create_template_draft",
|
|
32419
32267
|
get_draft: "get_template_draft",
|
|
32420
32268
|
update_draft: "update_template_draft",
|
|
32269
|
+
delete_draft: "delete_template_draft",
|
|
32421
32270
|
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"
|
|
32271
|
+
create_preview_job: "create_template_preview_job"
|
|
32425
32272
|
};
|
|
32426
32273
|
slideshowNames = {
|
|
32427
32274
|
list_runs: "list_slideshow_runs",
|
|
@@ -32431,8 +32278,7 @@ var init_src6 = __esm({
|
|
|
32431
32278
|
update_run: "update_slideshow_run",
|
|
32432
32279
|
archive_run: "archive_slideshow_run",
|
|
32433
32280
|
restore_run: "restore_slideshow_run",
|
|
32434
|
-
|
|
32435
|
-
render_run: "render_slideshow_run"
|
|
32281
|
+
delete_run: "delete_slideshow_run"
|
|
32436
32282
|
};
|
|
32437
32283
|
brandTools = [
|
|
32438
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: {} } },
|
|
@@ -32441,7 +32287,7 @@ var init_src6 = __esm({
|
|
|
32441
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: {} } },
|
|
32442
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: {} } },
|
|
32443
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: {} } },
|
|
32444
|
-
{ name: "
|
|
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: {} } }
|
|
32445
32291
|
];
|
|
32446
32292
|
rename = (tool, names) => ({ ...tool, name: names[tool.name] ?? tool.name });
|
|
32447
32293
|
templateTools = templateToolRegistry.map((tool) => rename(tool, templateNames));
|
|
@@ -32450,10 +32296,11 @@ var init_src6 = __esm({
|
|
|
32450
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: {} } },
|
|
32451
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: {} } },
|
|
32452
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: {} } },
|
|
32453
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: {} } },
|
|
32454
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: {} } },
|
|
32455
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: {} } },
|
|
32456
|
-
{ name: "delete_image", title: "
|
|
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: {} } }
|
|
32457
32304
|
];
|
|
32458
32305
|
unifiedToolRegistry = [...templateTools, ...slideshowTools, ...brandTools, ...imageTools];
|
|
32459
32306
|
unifiedResourceTemplates = slideshowResourceTemplates;
|
|
@@ -32477,8 +32324,11 @@ var init_src6 = __esm({
|
|
|
32477
32324
|
const templateTool = templateTools.find((tool) => tool.name === toolName);
|
|
32478
32325
|
if (templateTool) return this.template.invoke(Object.entries(templateNames).find(([, name]) => name === toolName)?.[0] ?? toolName, args);
|
|
32479
32326
|
const slideshowTool = slideshowTools.find((tool) => tool.name === toolName);
|
|
32480
|
-
if (slideshowTool
|
|
32481
|
-
|
|
32327
|
+
if (slideshowTool || toolName === "trash_slideshow_run") {
|
|
32328
|
+
const canonical = toolName === "trash_slideshow_run" ? "delete_run" : Object.entries(slideshowNames).find(([, name]) => name === toolName)?.[0] ?? toolName;
|
|
32329
|
+
return this.slideshow.invoke(canonical, args);
|
|
32330
|
+
}
|
|
32331
|
+
const brandTool = brandTools.find((tool) => tool.name === toolName) || toolName === "trash_brand";
|
|
32482
32332
|
if (brandTool) {
|
|
32483
32333
|
const meta4 = { requestId: `mcp_${Date.now().toString(36)}`, runtimeVersion: "0.0.0", schemaVersion: 1, toolContractVersion: "2026-08-28" };
|
|
32484
32334
|
const brandId = typeof args.brandId === "string" ? args.brandId : "";
|
|
@@ -32511,6 +32361,7 @@ var init_src6 = __esm({
|
|
|
32511
32361
|
return this.client.archiveBrand(brandId);
|
|
32512
32362
|
case "restore_brand":
|
|
32513
32363
|
return this.client.restoreBrand(brandId);
|
|
32364
|
+
case "delete_brand":
|
|
32514
32365
|
case "trash_brand":
|
|
32515
32366
|
return this.client.trashBrand(brandId);
|
|
32516
32367
|
default:
|
|
@@ -32522,9 +32373,9 @@ var init_src6 = __esm({
|
|
|
32522
32373
|
const imageTool = imageTools.find((tool) => tool.name === toolName);
|
|
32523
32374
|
if (imageTool) {
|
|
32524
32375
|
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;
|
|
32376
|
+
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", "")}`;
|
|
32377
|
+
const method = toolName === "list_images" || toolName === "get_image" ? "GET" : toolName === "delete_image" ? "DELETE" : toolName === "update_image" ? "PATCH" : "POST";
|
|
32378
|
+
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
32379
|
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
32380
|
}
|
|
32530
32381
|
return Promise.resolve({
|