@cloudinary/asset-management-mcp 0.9.1 → 0.9.2
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 +12 -15
- package/bin/mcp-server.js +209 -359
- package/bin/mcp-server.js.map +13 -13
- package/esm/landing-page.d.ts.map +1 -1
- package/esm/landing-page.js +9 -3
- package/esm/landing-page.js.map +1 -1
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/mcp-server/apps/app-shared.d.ts +5 -4
- package/esm/mcp-server/apps/app-shared.d.ts.map +1 -1
- package/esm/mcp-server/apps/app-shared.js +79 -12
- package/esm/mcp-server/apps/app-shared.js.map +1 -1
- package/esm/mcp-server/apps/asset-details-app.d.ts.map +1 -1
- package/esm/mcp-server/apps/asset-details-app.js +7 -14
- package/esm/mcp-server/apps/asset-details-app.js.map +1 -1
- package/esm/mcp-server/apps/asset-gallery-app.d.ts.map +1 -1
- package/esm/mcp-server/apps/asset-gallery-app.js +75 -298
- package/esm/mcp-server/apps/asset-gallery-app.js.map +1 -1
- package/esm/mcp-server/apps/asset-upload-app.d.ts.map +1 -1
- package/esm/mcp-server/apps/asset-upload-app.js +29 -24
- package/esm/mcp-server/apps/asset-upload-app.js.map +1 -1
- package/esm/mcp-server/apps/config.d.ts.map +1 -1
- package/esm/mcp-server/apps/config.js +1 -2
- package/esm/mcp-server/apps/config.js.map +1 -1
- package/esm/mcp-server/apps/extensions.d.ts.map +1 -1
- package/esm/mcp-server/apps/extensions.js +6 -1
- package/esm/mcp-server/apps/extensions.js.map +1 -1
- package/esm/mcp-server/cli/serve/impl.js +1 -1
- package/esm/mcp-server/cli/serve/impl.js.map +1 -1
- package/esm/mcp-server/mcp-server.js +1 -1
- package/esm/mcp-server/server.js +1 -1
- package/esm/types/bigint.d.ts.map +1 -1
- package/esm/types/bigint.js +4 -3
- package/esm/types/bigint.js.map +1 -1
- package/package.json +1 -1
- package/src/landing-page.ts +9 -3
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/apps/app-shared.ts +80 -12
- package/src/mcp-server/apps/asset-details-app.ts +7 -13
- package/src/mcp-server/apps/asset-gallery-app.ts +75 -297
- package/src/mcp-server/apps/asset-upload-app.ts +29 -23
- package/src/mcp-server/apps/config.ts +1 -2
- package/src/mcp-server/apps/extensions.ts +6 -1
- package/src/mcp-server/cli/serve/impl.ts +1 -1
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/types/bigint.ts +18 -17
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* with the gallery/details apps via app-shared.ts.
|
|
15
15
|
*/
|
|
16
16
|
import { toJSONSchema } from "zod";
|
|
17
|
-
import { SHARED_CSS_TOKENS, SHARED_CSS_COMPONENTS, SHARED_JS_MCP_CLIENT, SHARED_JS_HELPERS, SHARED_JS_TOOLTIPS, SHARED_JS_MODAL, SHARED_JS_DETAIL_RENDERERS, SHARED_JS_HOST_CONTEXT, } from "./app-shared.js";
|
|
17
|
+
import { SHARED_CSS_TOKENS, SHARED_CSS_COMPONENTS, SHARED_JS_ICONS, SHARED_JS_MCP_CLIENT, SHARED_JS_HELPERS, SHARED_JS_TOOLTIPS, SHARED_JS_MODAL, SHARED_JS_DETAIL_RENDERERS, SHARED_JS_HOST_CONTEXT, } from "./app-shared.js";
|
|
18
18
|
import { UploadRequest$zodSchema } from "../../models/uploadrequest.js";
|
|
19
19
|
import { UploadResourceType$zodSchema } from "../../models/uploadresourcetype.js";
|
|
20
20
|
import { injectToolName } from "./uri.js";
|
|
@@ -41,15 +41,8 @@ const UPLOAD_CSS = /* css */ `
|
|
|
41
41
|
.upload-header h1 {
|
|
42
42
|
font-size: var(--cld-font-sm); font-weight: 600; color: var(--cld-text);
|
|
43
43
|
}
|
|
44
|
-
.upload-header-icon {
|
|
45
|
-
.upload-header {
|
|
46
|
-
.back-link {
|
|
47
|
-
position: absolute; top: -2px; right: 0;
|
|
48
|
-
background: none; border: none; cursor: pointer;
|
|
49
|
-
color: var(--cld-accent); font-size: var(--cld-font-xs);
|
|
50
|
-
padding: 2px 6px; border-radius: 4px;
|
|
51
|
-
}
|
|
52
|
-
.back-link:hover { text-decoration: underline; background: var(--cld-accent-bg); }
|
|
44
|
+
.upload-header-icon { display: flex; align-items: center; justify-content: center; }
|
|
45
|
+
.upload-header-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
|
|
53
46
|
|
|
54
47
|
.upload-result .detail-section { padding: 14px 16px; }
|
|
55
48
|
.upload-result .detail-section:first-child { padding-top: 0; }
|
|
@@ -487,16 +480,18 @@ function renderPicker() {
|
|
|
487
480
|
var h = "";
|
|
488
481
|
|
|
489
482
|
h += '<div class="upload-header">';
|
|
483
|
+
h += '<span class="upload-header-icon icon-accent">' + IC.uploadCloud + '</span>';
|
|
484
|
+
h += "<h1>Upload to Cloudinary</h1>";
|
|
485
|
+
h += '<div id="header-actions" style="display:flex;align-items:center;gap:6px;margin-left:auto">';
|
|
490
486
|
if (lastResult) {
|
|
491
|
-
h += '<button class="
|
|
487
|
+
h += '<button class="icon-btn" id="back-to-result-btn">' + IC.chevronLeft + ' Back</button>';
|
|
492
488
|
}
|
|
493
|
-
h += '
|
|
494
|
-
h += "<h1>Upload to Cloudinary</h1>";
|
|
489
|
+
h += '</div>';
|
|
495
490
|
h += "</div>";
|
|
496
491
|
|
|
497
492
|
if (stagedFile) {
|
|
498
493
|
h += '<div class="upload-staged">';
|
|
499
|
-
h += '<div class="upload-staged-icon"
|
|
494
|
+
h += '<div class="upload-staged-icon">' + IC.file + '</div>';
|
|
500
495
|
h += '<div class="upload-staged-info">';
|
|
501
496
|
h += '<div class="upload-staged-name">' + esc(stagedFile.name) + "</div>";
|
|
502
497
|
if (stagedFile.size) {
|
|
@@ -507,11 +502,11 @@ function renderPicker() {
|
|
|
507
502
|
h += '<div class="upload-staged-meta">Remote URL</div>';
|
|
508
503
|
}
|
|
509
504
|
h += "</div>";
|
|
510
|
-
h += '<button class="upload-staged-clear" id="clear-staged-btn" title="Remove"
|
|
505
|
+
h += '<button class="upload-staged-clear icon-btn icon-only" id="clear-staged-btn" title="Remove">' + IC.x + '</button>';
|
|
511
506
|
h += "</div>";
|
|
512
507
|
} else {
|
|
513
508
|
h += '<div class="upload-zone" id="drop-zone">';
|
|
514
|
-
h += '<div class="upload-zone-icon"
|
|
509
|
+
h += '<div class="upload-zone-icon">' + IC.folderOpen + '</div>';
|
|
515
510
|
h += '<div class="upload-zone-text">Drag & drop a file here</div>';
|
|
516
511
|
h += '<div class="upload-zone-hint">Images, videos, PDFs, and other files up to 60 MB</div>';
|
|
517
512
|
h += '<button class="upload-zone-btn" id="browse-btn">Browse Files</button>';
|
|
@@ -535,6 +530,7 @@ function renderPicker() {
|
|
|
535
530
|
}
|
|
536
531
|
|
|
537
532
|
root.innerHTML = h;
|
|
533
|
+
renderThemeToggle();
|
|
538
534
|
|
|
539
535
|
var backBtn = document.getElementById("back-to-result-btn");
|
|
540
536
|
if (backBtn && lastResult) {
|
|
@@ -614,12 +610,13 @@ function renderUploading(name, meta) {
|
|
|
614
610
|
var h = "";
|
|
615
611
|
|
|
616
612
|
h += '<div class="upload-header">';
|
|
617
|
-
h += '<span class="upload-header-icon"
|
|
618
|
-
h +=
|
|
613
|
+
h += '<span class="upload-header-icon icon-accent">' + IC.uploadCloud + '</span>';
|
|
614
|
+
h += '<h1>Uploading…</h1>';
|
|
615
|
+
h += '<div id="header-actions" style="display:flex;align-items:center;gap:6px;margin-left:auto"></div>';
|
|
619
616
|
h += "</div>";
|
|
620
617
|
|
|
621
618
|
h += '<div class="upload-preview">';
|
|
622
|
-
h += '<div class="upload-preview-icon"
|
|
619
|
+
h += '<div class="upload-preview-icon">' + IC.file + '</div>';
|
|
623
620
|
h += '<div class="upload-preview-info">';
|
|
624
621
|
h += '<div class="upload-preview-name">' + esc(name) + "</div>";
|
|
625
622
|
h += '<div class="upload-preview-meta">' + esc(meta) + "</div>";
|
|
@@ -631,6 +628,7 @@ function renderUploading(name, meta) {
|
|
|
631
628
|
h += "</div>";
|
|
632
629
|
|
|
633
630
|
root.innerHTML = h;
|
|
631
|
+
renderThemeToggle();
|
|
634
632
|
animateProgress();
|
|
635
633
|
}
|
|
636
634
|
|
|
@@ -684,7 +682,7 @@ function renderUploadError(title, msg) {
|
|
|
684
682
|
var header = document.querySelector(".upload-header h1");
|
|
685
683
|
if (header) header.textContent = title;
|
|
686
684
|
var icon = document.querySelector(".upload-header-icon");
|
|
687
|
-
if (icon) icon.
|
|
685
|
+
if (icon) { icon.innerHTML = IC.alertTriangle; icon.className = "upload-header-icon icon-warning"; }
|
|
688
686
|
|
|
689
687
|
var safeMsg = esc(msg).replace(/\\n/g, "<br>");
|
|
690
688
|
var h = '<div class="upload-error-msg">' + safeMsg + "</div>";
|
|
@@ -696,14 +694,16 @@ function renderUploadError(title, msg) {
|
|
|
696
694
|
var root = document.getElementById("app");
|
|
697
695
|
var safeMsg = esc(msg).replace(/\\n/g, "<br>");
|
|
698
696
|
var h = '<div class="upload-header">';
|
|
699
|
-
h += '<span class="upload-header-icon"
|
|
697
|
+
h += '<span class="upload-header-icon icon-warning">' + IC.alertTriangle + '</span>';
|
|
700
698
|
h += "<h1>" + esc(title) + "</h1>";
|
|
699
|
+
h += '<div id="header-actions" style="display:flex;align-items:center;gap:6px;margin-left:auto"></div>';
|
|
701
700
|
h += "</div>";
|
|
702
701
|
h += '<div class="upload-error-msg">' + safeMsg + "</div>";
|
|
703
702
|
h += '<div class="upload-another" style="margin-top:14px;text-align:center">';
|
|
704
703
|
h += '<button class="prompt-btn prompt-btn-primary" id="retry-upload-btn">Try from App</button>';
|
|
705
704
|
h += "</div>";
|
|
706
705
|
root.innerHTML = h;
|
|
706
|
+
renderThemeToggle();
|
|
707
707
|
}
|
|
708
708
|
|
|
709
709
|
var btn = document.getElementById("retry-upload-btn");
|
|
@@ -748,8 +748,9 @@ function renderLocalFileNeeded(expectedName, errMsg) {
|
|
|
748
748
|
var classified = classifyFileError(errMsg);
|
|
749
749
|
var root = document.getElementById("app");
|
|
750
750
|
var h = '<div class="upload-header">';
|
|
751
|
-
h += '<span class="upload-header-icon"
|
|
751
|
+
h += '<span class="upload-header-icon icon-accent">' + IC.folderOpen + '</span>';
|
|
752
752
|
h += "<h1>" + esc(classified.title) + "</h1>";
|
|
753
|
+
h += '<div id="header-actions" style="display:flex;align-items:center;gap:6px;margin-left:auto"></div>';
|
|
753
754
|
h += "</div>";
|
|
754
755
|
h += '<div class="prompt" style="margin-bottom:16px">';
|
|
755
756
|
h += '<div class="prompt-desc">The file <strong>' + esc(expectedName)
|
|
@@ -764,13 +765,14 @@ function renderLocalFileNeeded(expectedName, errMsg) {
|
|
|
764
765
|
}
|
|
765
766
|
h += "</div>";
|
|
766
767
|
h += '<div class="upload-zone" id="drop-zone">';
|
|
767
|
-
h += '<div class="upload-zone-icon"
|
|
768
|
+
h += '<div class="upload-zone-icon">' + IC.folderOpen + '</div>';
|
|
768
769
|
h += '<div class="upload-zone-text">Drop <strong>' + esc(expectedName) + "</strong> here</div>";
|
|
769
770
|
h += '<div class="upload-zone-hint">Or click to browse your files</div>';
|
|
770
771
|
h += '<button class="upload-zone-btn" id="browse-btn">Browse Files</button>';
|
|
771
772
|
h += '<input type="file" id="file-input" style="display:none">';
|
|
772
773
|
h += "</div>";
|
|
773
774
|
root.innerHTML = h;
|
|
775
|
+
renderThemeToggle();
|
|
774
776
|
|
|
775
777
|
function onFileSelected(file) {
|
|
776
778
|
var reader = new FileReader();
|
|
@@ -883,8 +885,9 @@ function renderResult(r) {
|
|
|
883
885
|
var h = "";
|
|
884
886
|
|
|
885
887
|
h += '<div class="upload-header">';
|
|
886
|
-
h += '<span class="upload-header-icon
|
|
888
|
+
h += '<span class="upload-header-icon ' + (isPending ? "icon-accent" : "icon-success") + '">' + (isPending ? IC.clock : IC.checkCircle) + '</span>';
|
|
887
889
|
h += "<h1>" + (isPending ? "Upload Queued" : "Upload Complete") + "</h1>";
|
|
890
|
+
h += '<div id="header-actions" style="display:flex;align-items:center;gap:6px;margin-left:auto"></div>';
|
|
888
891
|
h += "</div>";
|
|
889
892
|
|
|
890
893
|
h += '<div class="upload-result">';
|
|
@@ -945,6 +948,7 @@ function renderResult(r) {
|
|
|
945
948
|
h += "</div></div>";
|
|
946
949
|
|
|
947
950
|
root.innerHTML = h;
|
|
951
|
+
renderThemeToggle();
|
|
948
952
|
|
|
949
953
|
root.addEventListener("click", function handler(e) {
|
|
950
954
|
var el = e.target;
|
|
@@ -1080,6 +1084,7 @@ ${UPLOAD_CSS}
|
|
|
1080
1084
|
<div id="app"><div class="status">Preparing upload…</div></div>
|
|
1081
1085
|
|
|
1082
1086
|
<script>
|
|
1087
|
+
${SHARED_JS_ICONS}
|
|
1083
1088
|
${SHARED_JS_MCP_CLIENT}
|
|
1084
1089
|
${SHARED_JS_HELPERS}
|
|
1085
1090
|
${SHARED_JS_TOOLTIPS}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"asset-upload-app.js","sourceRoot":"","sources":["../../../src/mcp-server/apps/asset-upload-app.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,KAAK,CAAC;AACnC,OAAO,EACL,iBAAiB,EACjB,qBAAqB,EACrB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,0BAA0B,EAC1B,sBAAsB,GACvB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,uBAAuB,EAAE,MAAM,+BAA+B,CAAC;AACxE,OAAO,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AAClF,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,MAAM,UAAU,kBAAkB,CAAC,QAAiB;IAClD,OAAO,cAAc,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAAC;AACrD,CAAC;AAED,uEAAuE;AACvE,MA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAg/BhC,CAAC;AAEF,uEAAuE;AACvE,MAAM,iBAAiB,GAAG,UAAU,CAAC;;;;;;;EAOnC,iBAAiB;EACjB,qBAAqB;EACrB,UAAU;;;;;;;EAOV,eAAe;EACf,oBAAoB;EACpB,iBAAiB;EACjB,kBAAkB;EAClB,eAAe;EACf,0BAA0B;EAC1B,sBAAsB;EACtB,SAAS;;;QAGH,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/mcp-server/apps/config.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,MAAM,GAAG,eAAe,GAAG,eAAe,GAAG,cAAc,CAAC;AAExE,eAAO,MAAM,QAAQ,EAAE,SAAS,MAAM,EAIrC,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/mcp-server/apps/config.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,MAAM,GAAG,eAAe,GAAG,eAAe,GAAG,cAAc,CAAC;AAExE,eAAO,MAAM,QAAQ,EAAE,SAAS,MAAM,EAIrC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,SAAS,MAAM,EAAkB,CAAC;AAEjE,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAmBxD;AAED,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,SAAS,GAAG,MAAM,EAAE,CAKnE;AAED,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAEvE"}
|
|
@@ -7,8 +7,7 @@ export const MCP_APPS = [
|
|
|
7
7
|
"asset-details",
|
|
8
8
|
"asset-upload",
|
|
9
9
|
];
|
|
10
|
-
|
|
11
|
-
export const DEFAULT_MCP_APPS = [];
|
|
10
|
+
export const DEFAULT_MCP_APPS = [...MCP_APPS];
|
|
12
11
|
export function parseMcpAppsList(value) {
|
|
13
12
|
const parts = value.split(",").map((s) => s.trim()).filter(Boolean);
|
|
14
13
|
// Bare `--mcp-apps` (empty value via inferEmpty) behaves like "all".
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/mcp-server/apps/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAIxC,MAAM,CAAC,MAAM,QAAQ,GAAsB;IACzC,eAAe;IACf,eAAe;IACf,cAAc;CACf,CAAC;AAEF,
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../src/mcp-server/apps/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAIxC,MAAM,CAAC,MAAM,QAAQ,GAAsB;IACzC,eAAe;IACf,eAAe;IACf,cAAc;CACf,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAAsB,CAAC,GAAG,QAAQ,CAAC,CAAC;AAEjE,MAAM,UAAU,gBAAgB,CAAC,KAAa;IAC5C,MAAM,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CA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"],"names":[],"mappings":"AAWA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAI5C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"extensions.d.ts","sourceRoot":"","sources":["../../../src/mcp-server/apps/extensions.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAI5C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAgE1C,wBAAgB,oBAAoB,CAClC,QAAQ,EAAE,QAAQ,EAClB,WAAW,EAAE,GAAG,CAAC,MAAM,CAAC,GACvB,IAAI,CAwBN"}
|
|
@@ -50,7 +50,12 @@ function appResourceContent(uri, html) {
|
|
|
50
50
|
uri: uri.toString(),
|
|
51
51
|
mimeType: MCP_APP_MIME_TYPE,
|
|
52
52
|
text: html,
|
|
53
|
-
_meta: {
|
|
53
|
+
_meta: {
|
|
54
|
+
ui: {
|
|
55
|
+
csp: { resourceDomains: CSP_RESOURCE_DOMAINS },
|
|
56
|
+
permissions: { clipboardWrite: {} },
|
|
57
|
+
},
|
|
58
|
+
},
|
|
54
59
|
// deno-lint-ignore no-explicit-any
|
|
55
60
|
}],
|
|
56
61
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensions.js","sourceRoot":"","sources":["../../../src/mcp-server/apps/extensions.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,yCAAyC,CAAC;AAE3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAErE,MAAM,oBAAoB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,OAAO,kBAAkB,CAAC,GAAG,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,IAAI,SAAS,CAAC,CAAC,CAAC;YACjE,CAAC;SACF,CAAC,CAAC;IACL,CAAC;AACH,CAAC"}
|
|
@@ -23,7 +23,7 @@ async function startStreamableHTTP(cliFlags) {
|
|
|
23
23
|
app.use((req, res, next) => {
|
|
24
24
|
res.header("Access-Control-Allow-Origin", "*");
|
|
25
25
|
res.header("Access-Control-Allow-Methods", "GET, POST, OPTIONS");
|
|
26
|
-
res.header("Access-Control-Allow-Headers", "
|
|
26
|
+
res.header("Access-Control-Allow-Headers", "*");
|
|
27
27
|
if (req.method === "OPTIONS") {
|
|
28
28
|
res.sendStatus(204);
|
|
29
29
|
return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"impl.js","sourceRoot":"","sources":["../../../../src/mcp-server/cli/serve/impl.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AAEnG,OAAO,OAAO,MAAM,SAAS,CAAC;AAE9B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAEL,mBAAmB,GACpB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAS9D,MAAM,CAAC,KAAK,UAAU,IAAI,CAAqB,KAAwB;IACrE,KAAK,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QAClC,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IAC3B,CAAC,CAAC,CAAC;IAEH,MAAM,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./tools/usageGetUsage.js";
|
|
|
32
32
|
export function createMCPServer(deps) {
|
|
33
33
|
const server = new McpServer({
|
|
34
34
|
name: "CloudinaryAssetMgmt",
|
|
35
|
-
version: "0.9.
|
|
35
|
+
version: "0.9.2",
|
|
36
36
|
});
|
|
37
37
|
const getClient = deps.getSDK || (() => new CloudinaryAssetMgmtCore({
|
|
38
38
|
security: deps.security,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bigint.d.ts","sourceRoot":"","sources":["../../src/types/bigint.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,wBAAgB,MAAM,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,CAiBnD;AAED,wBAAgB,cAAc,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,
|
|
1
|
+
{"version":3,"file":"bigint.d.ts","sourceRoot":"","sources":["../../src/types/bigint.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,wBAAgB,MAAM,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,CAiBnD;AAED,wBAAgB,cAAc,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC,CAmBvE;AAED,wBAAgB,cAAc,IAAI,CAAC,CAAC,OAAO,CAAC,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC,CAkBlE;AAED,wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAqBpE"}
|
package/esm/types/bigint.js
CHANGED
|
@@ -23,7 +23,8 @@ export function bigint() {
|
|
|
23
23
|
]);
|
|
24
24
|
}
|
|
25
25
|
export function bigintOptional() {
|
|
26
|
-
return z
|
|
26
|
+
return z
|
|
27
|
+
.union([
|
|
27
28
|
z.bigint().transform((v) => String(v)),
|
|
28
29
|
z.string().transform((v, ctx) => {
|
|
29
30
|
try {
|
|
@@ -38,9 +39,9 @@ export function bigintOptional() {
|
|
|
38
39
|
}
|
|
39
40
|
}),
|
|
40
41
|
z.number().transform((v) => BigInt(Math.trunc(v))),
|
|
41
|
-
z.undefined(),
|
|
42
42
|
z.null().transform(() => undefined),
|
|
43
|
-
])
|
|
43
|
+
])
|
|
44
|
+
.optional();
|
|
44
45
|
}
|
|
45
46
|
export function bigintNullable() {
|
|
46
47
|
return z.union([
|
package/esm/types/bigint.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bigint.js","sourceRoot":"","sources":["../../src/types/bigint.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B,MAAM,UAAU,MAAM;IACpB,OAAO,CAAC,CAAC,KAAK,CAAC;QACb,CAAC,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC;QACtC,CAAC,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE;YAC9B,IAAI,CAAC;gBACH,OAAO,MAAM,CAAC,CAAC,CAAC,CAAC;YACnB,CAAC;YAAC,MAAM,CAAC;gBACP,GAAG,CAAC,QAAQ,CAAC;oBACX,IAAI,EAAE,CAAC,CAAC,YAAY,CAAC,MAAM;oBAC3B,OAAO,EAAE,sBAAsB;iBAChC,CAAC,CAAC;gBACH,OAAO,CAAC,CAAC,KAAK,CAAC;YACjB,CAAC;QACH,CAAC,CAAC;QACF,CAAC,CAAC,MAAM,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAClD,CAAC,CAAC,KAA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 @@ export function landingPage(req: Request): Response {
|
|
|
19
19
|
|
|
20
20
|
// express wrapper
|
|
21
21
|
export function landingPageExpress(req: ExpressRequest, res: ExpressResponse) {
|
|
22
|
-
const
|
|
23
|
-
|
|
22
|
+
const proto = req.get("x-forwarded-proto")?.split(",")[0]?.trim()
|
|
23
|
+
|| req.protocol;
|
|
24
|
+
const host = req.get("host");
|
|
25
|
+
if (!host) {
|
|
26
|
+
res.status(400).send("Missing Host header");
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
res.type("html").send(landingPageHTML(`${proto}://${host}`));
|
|
24
30
|
}
|
|
25
31
|
|
|
26
32
|
export function landingPageHTML(origin: string): string {
|
|
@@ -933,7 +939,7 @@ http_headers = { "api-key" = "YOUR_API_KEY", "api-secret" = "YOUR_API_SECRET", "
|
|
|
933
939
|
<h1>Instructions</h1>
|
|
934
940
|
<p>One-click installation for Claude Desktop users</p>
|
|
935
941
|
<div class="instruction-item">
|
|
936
|
-
<a href="https://github.com/cloudinary/asset-management-mcp/releases/download/v0.9.
|
|
942
|
+
<a href="https://github.com/cloudinary/asset-management-mcp/releases/download/v0.9.2/mcp-server.mcpb" download="mcp-server.mcpb" class="action-button header-action" style="display: inline-flex; margin-bottom: 16px;">
|
|
937
943
|
📥 Download MCP Bundle
|
|
938
944
|
</a>
|
|
939
945
|
</div>
|
package/src/lib/config.ts
CHANGED
|
@@ -113,8 +113,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
113
113
|
export const SDK_METADATA = {
|
|
114
114
|
language: "typescript",
|
|
115
115
|
openapiDocVersion: "0.5.1",
|
|
116
|
-
sdkVersion: "0.9.
|
|
117
|
-
genVersion: "2.
|
|
116
|
+
sdkVersion: "0.9.2",
|
|
117
|
+
genVersion: "2.885.1",
|
|
118
118
|
userAgent:
|
|
119
|
-
"speakeasy-sdk/mcp-typescript 0.9.
|
|
119
|
+
"speakeasy-sdk/mcp-typescript 0.9.2 2.885.1 0.5.1 @cloudinary/asset-management-mcp",
|
|
120
120
|
} as const;
|
|
@@ -116,6 +116,7 @@ export const SHARED_CSS_TOKENS = /* css */ `
|
|
|
116
116
|
[data-theme="dark"] .status-warn, .dark .status-warn { background: #854d0e; color: #fef08a; }
|
|
117
117
|
[data-theme="dark"] .status-err, .dark .status-err { background: #991b1b; color: #fecaca; }
|
|
118
118
|
|
|
119
|
+
html { overflow: hidden; }
|
|
119
120
|
body {
|
|
120
121
|
font-family: var(--cld-font);
|
|
121
122
|
background: var(--cld-bg);
|
|
@@ -126,16 +127,35 @@ body {
|
|
|
126
127
|
position: relative;
|
|
127
128
|
}
|
|
128
129
|
.theme-btn {
|
|
129
|
-
position: absolute; top: 4px; right: 4px; z-index: 900;
|
|
130
130
|
width: 22px; height: 22px; border-radius: 50%;
|
|
131
131
|
border: 1px solid transparent; background: transparent;
|
|
132
132
|
color: var(--cld-text3); cursor: pointer;
|
|
133
133
|
display: flex; align-items: center; justify-content: center;
|
|
134
134
|
padding: 0; transition: background 0.15s, color 0.15s, border-color 0.15s;
|
|
135
|
-
opacity: 0.5;
|
|
135
|
+
opacity: 0.5; flex-shrink: 0;
|
|
136
136
|
}
|
|
137
137
|
.theme-btn:hover { background: var(--cld-bg3); color: var(--cld-text); border-color: var(--cld-border); opacity: 1; }
|
|
138
138
|
.theme-btn svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
|
|
139
|
+
/* Shared icon-button — square pill, same family as theme-btn */
|
|
140
|
+
.icon-btn {
|
|
141
|
+
display: inline-flex; align-items: center; justify-content: center; gap: 5px;
|
|
142
|
+
background: none; border: 1px solid var(--cld-border); border-radius: var(--cld-radius-sm);
|
|
143
|
+
color: var(--cld-text2); cursor: pointer; padding: 4px 8px;
|
|
144
|
+
font-size: 12px; font-weight: 500; font-family: inherit; line-height: 1;
|
|
145
|
+
transition: background 0.15s, color 0.15s, border-color 0.15s;
|
|
146
|
+
white-space: nowrap; flex-shrink: 0;
|
|
147
|
+
}
|
|
148
|
+
.icon-btn:hover { background: var(--cld-bg3); color: var(--cld-text); border-color: var(--cld-border2); }
|
|
149
|
+
.icon-btn svg { width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
|
|
150
|
+
/* icon-only variant (no text label) */
|
|
151
|
+
.icon-btn.icon-only { padding: 4px; width: 28px; height: 28px; }
|
|
152
|
+
/* header state icon (decorative, not a button) */
|
|
153
|
+
.upload-header-icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
|
|
154
|
+
.upload-header-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
|
|
155
|
+
.upload-header-icon.icon-success { color: var(--cld-success); }
|
|
156
|
+
.upload-header-icon.icon-error { color: var(--cld-error); }
|
|
157
|
+
.upload-header-icon.icon-warning { color: var(--cld-warning); }
|
|
158
|
+
.upload-header-icon.icon-accent { color: var(--cld-accent); }
|
|
139
159
|
`;
|
|
140
160
|
|
|
141
161
|
// ── CSS: Shared component styles ────────────────────────────────────
|
|
@@ -389,7 +409,8 @@ details.detail-section > summary.detail-section-title::-webkit-details-marker {
|
|
|
389
409
|
}
|
|
390
410
|
.upload-zone:hover { border-color: var(--cld-accent); background: var(--cld-accent-bg); }
|
|
391
411
|
.upload-zone.dragover { border-color: var(--cld-accent); background: var(--cld-accent-bg); }
|
|
392
|
-
.upload-zone-icon {
|
|
412
|
+
.upload-zone-icon { margin-bottom: 8px; color: var(--cld-text3); display: flex; align-items: center; justify-content: center; }
|
|
413
|
+
.upload-zone-icon svg { width: 36px; height: 36px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
|
|
393
414
|
.upload-zone-text { font-size: 14px; color: var(--cld-text2); margin-bottom: 4px; }
|
|
394
415
|
.upload-zone-hint { font-size: 12px; color: var(--cld-text3); }
|
|
395
416
|
.upload-zone-btn {
|
|
@@ -435,8 +456,9 @@ details.detail-section > summary.detail-section-title::-webkit-details-marker {
|
|
|
435
456
|
.upload-preview-icon {
|
|
436
457
|
width: 56px; height: 56px; border-radius: var(--cld-radius-sm);
|
|
437
458
|
background: var(--cld-bg3); flex-shrink: 0; display: flex;
|
|
438
|
-
align-items: center; justify-content: center;
|
|
459
|
+
align-items: center; justify-content: center; color: var(--cld-text3);
|
|
439
460
|
}
|
|
461
|
+
.upload-preview-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
|
|
440
462
|
.upload-preview-info { flex: 1; min-width: 0; }
|
|
441
463
|
.upload-preview-name { font-size: 13px; font-weight: 600; color: var(--cld-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
442
464
|
.upload-preview-meta { font-size: 11px; color: var(--cld-text3); margin-top: 2px; }
|
|
@@ -585,19 +607,15 @@ details.upload-section > .upload-form { margin: 0; padding: 10px 12px; }
|
|
|
585
607
|
background: var(--cld-accent-bg); border: 1px solid var(--cld-accent);
|
|
586
608
|
border-radius: var(--cld-radius); margin-bottom: 4px; position: relative;
|
|
587
609
|
}
|
|
588
|
-
.upload-staged-icon {
|
|
610
|
+
.upload-staged-icon { flex-shrink: 0; display: flex; align-items: center; color: var(--cld-accent); }
|
|
611
|
+
.upload-staged-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
|
|
589
612
|
.upload-staged-info { flex: 1; min-width: 0; }
|
|
590
613
|
.upload-staged-name {
|
|
591
614
|
font-size: 13px; font-weight: 600; color: var(--cld-text);
|
|
592
615
|
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
593
616
|
}
|
|
594
617
|
.upload-staged-meta { font-size: 11px; color: var(--cld-text3); margin-top: 2px; }
|
|
595
|
-
.upload-staged-clear {
|
|
596
|
-
background: none; border: none; cursor: pointer; font-size: 16px;
|
|
597
|
-
color: var(--cld-text3); padding: 4px 6px; border-radius: var(--cld-radius-sm);
|
|
598
|
-
transition: color 0.15s, background 0.15s; flex-shrink: 0;
|
|
599
|
-
}
|
|
600
|
-
.upload-staged-clear:hover { color: var(--cld-error); background: rgba(206,25,13,0.08); }
|
|
618
|
+
.upload-staged-clear:hover { color: var(--cld-error); border-color: var(--cld-error); background: rgba(206,25,13,0.08); }
|
|
601
619
|
|
|
602
620
|
/* Upload submit button */
|
|
603
621
|
.upload-submit {
|
|
@@ -645,6 +663,24 @@ details.upload-section > .upload-form { margin: 0; padding: 10px 12px; }
|
|
|
645
663
|
}
|
|
646
664
|
`;
|
|
647
665
|
|
|
666
|
+
// ── JS: SVG icon strings (Lucide-style, 24px viewBox, stroke-based) ──
|
|
667
|
+
export const SHARED_JS_ICONS = /* js */ `
|
|
668
|
+
var IC = {
|
|
669
|
+
refresh: '<svg viewBox="0 0 24 24"><path d="M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"/><path d="M21 3v5h-5"/><path d="M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"/><path d="M3 21v-5h5"/></svg>',
|
|
670
|
+
chevronLeft:'<svg viewBox="0 0 24 24"><polyline points="15 18 9 12 15 6"/></svg>',
|
|
671
|
+
arrowDown: '<svg viewBox="0 0 24 24"><line x1="12" y1="5" x2="12" y2="19"/><polyline points="19 12 12 19 5 12"/></svg>',
|
|
672
|
+
x: '<svg viewBox="0 0 24 24"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>',
|
|
673
|
+
zap: '<svg viewBox="0 0 24 24"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"/></svg>',
|
|
674
|
+
uploadCloud:'<svg viewBox="0 0 24 24"><polyline points="16 16 12 12 8 16"/><line x1="12" y1="12" x2="12" y2="21"/><path d="M20.39 18.39A5 5 0 0 0 18 9h-1.26A8 8 0 1 0 3 16.3"/></svg>',
|
|
675
|
+
alertTriangle:'<svg viewBox="0 0 24 24"><path d="M10.29 3.86 1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg>',
|
|
676
|
+
folderOpen: '<svg viewBox="0 0 24 24"><path d="M22 19a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h5l2 3h9a2 2 0 0 1 2 2z"/><polyline points="22 13 17 13 15 16 9 16 7 13 2 13"/></svg>',
|
|
677
|
+
checkCircle:'<svg viewBox="0 0 24 24"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/><polyline points="22 4 12 14.01 9 11.01"/></svg>',
|
|
678
|
+
clock: '<svg viewBox="0 0 24 24"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>',
|
|
679
|
+
file: '<svg viewBox="0 0 24 24"><path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"/><polyline points="13 2 13 9 20 9"/></svg>',
|
|
680
|
+
image: '<svg viewBox="0 0 24 24"><rect x="3" y="3" width="18" height="18" rx="2"/><circle cx="8.5" cy="8.5" r="1.5"/><polyline points="21 15 16 10 5 21"/></svg>',
|
|
681
|
+
};
|
|
682
|
+
`;
|
|
683
|
+
|
|
648
684
|
// ── JS: MCPApp client class ─────────────────────────────────────────
|
|
649
685
|
export const SHARED_JS_MCP_CLIENT = /* js */ `
|
|
650
686
|
var RPC_TIMEOUT_MS = 15000;
|
|
@@ -734,6 +770,29 @@ class MCPApp {
|
|
|
734
770
|
|
|
735
771
|
// ── JS: Helper functions ────────────────────────────────────────────
|
|
736
772
|
export const SHARED_JS_HELPERS = /* js */ `
|
|
773
|
+
function copyText(text) {
|
|
774
|
+
if (navigator.clipboard && navigator.clipboard.writeText) {
|
|
775
|
+
return navigator.clipboard.writeText(text).catch(function() { return _copyFallback(text); });
|
|
776
|
+
}
|
|
777
|
+
return _copyFallback(text);
|
|
778
|
+
}
|
|
779
|
+
function _copyFallback(text) {
|
|
780
|
+
return new Promise(function(resolve, reject) {
|
|
781
|
+
try {
|
|
782
|
+
var ta = document.createElement("textarea");
|
|
783
|
+
ta.value = text;
|
|
784
|
+
ta.setAttribute("readonly", "");
|
|
785
|
+
ta.style.position = "fixed"; ta.style.top = "0"; ta.style.left = "0";
|
|
786
|
+
ta.style.opacity = "0"; ta.style.pointerEvents = "none";
|
|
787
|
+
document.body.appendChild(ta);
|
|
788
|
+
ta.select(); ta.setSelectionRange(0, text.length);
|
|
789
|
+
var ok = document.execCommand("copy");
|
|
790
|
+
document.body.removeChild(ta);
|
|
791
|
+
if (ok) resolve(); else reject(new Error("Clipboard unavailable"));
|
|
792
|
+
} catch (e) { reject(e); }
|
|
793
|
+
});
|
|
794
|
+
}
|
|
795
|
+
|
|
737
796
|
function fmtBytes(b) {
|
|
738
797
|
if (!b) return "";
|
|
739
798
|
var u = ["B","KB","MB","GB"], i = Math.min(Math.floor(Math.log(b)/Math.log(1024)), 3);
|
|
@@ -1966,7 +2025,16 @@ function renderThemeToggle() {
|
|
|
1966
2025
|
applyTheme();
|
|
1967
2026
|
renderThemeToggle();
|
|
1968
2027
|
});
|
|
1969
|
-
document.
|
|
2028
|
+
var slot = document.getElementById("header-actions");
|
|
2029
|
+
if (slot) {
|
|
2030
|
+
slot.appendChild(btn);
|
|
2031
|
+
} else {
|
|
2032
|
+
btn.style.position = "absolute";
|
|
2033
|
+
btn.style.top = "4px";
|
|
2034
|
+
btn.style.right = "4px";
|
|
2035
|
+
btn.style.zIndex = "900";
|
|
2036
|
+
document.body.appendChild(btn);
|
|
2037
|
+
}
|
|
1970
2038
|
}
|
|
1971
2039
|
|
|
1972
2040
|
function setupHostContext(app) {
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
import {
|
|
10
10
|
SHARED_CSS_TOKENS,
|
|
11
11
|
SHARED_CSS_COMPONENTS,
|
|
12
|
+
SHARED_JS_ICONS,
|
|
12
13
|
SHARED_JS_MCP_CLIENT,
|
|
13
14
|
SHARED_JS_HELPERS,
|
|
14
15
|
SHARED_JS_TOOLTIPS,
|
|
@@ -59,16 +60,6 @@ const ASSET_DETAILS_CSS = /* css */ `
|
|
|
59
60
|
padding: 2px 7px; border-radius: 4px; border: 1px solid var(--cld-border);
|
|
60
61
|
}
|
|
61
62
|
|
|
62
|
-
.open-link {
|
|
63
|
-
padding: 6px 14px; border-radius: var(--cld-radius-sm);
|
|
64
|
-
font-size: 12px; font-weight: 500; cursor: pointer;
|
|
65
|
-
border: 1px solid var(--cld-accent); background: transparent;
|
|
66
|
-
color: var(--cld-accent); font-family: inherit;
|
|
67
|
-
transition: background 0.15s;
|
|
68
|
-
white-space: nowrap; flex-shrink: 0;
|
|
69
|
-
}
|
|
70
|
-
.open-link:hover { background: var(--cld-accent-bg); }
|
|
71
|
-
|
|
72
63
|
.hero-container {
|
|
73
64
|
position: relative; margin-bottom: var(--cld-sp-md);
|
|
74
65
|
border-radius: var(--cld-radius); overflow: hidden;
|
|
@@ -131,9 +122,9 @@ function renderPage(r) {
|
|
|
131
122
|
if (dur) h += '<span class="pill">' + dur + "</span>";
|
|
132
123
|
if (size) h += '<span class="pill">' + size + "</span>";
|
|
133
124
|
h += "</div></div>";
|
|
134
|
-
h += '<div style="display:flex;gap:
|
|
135
|
-
h += '<button class="
|
|
136
|
-
|
|
125
|
+
h += '<div id="header-actions" style="display:flex;gap:8px;flex-shrink:0;align-items:center">';
|
|
126
|
+
if (url) h += '<button class="icon-btn" id="open-asset">Open</button>';
|
|
127
|
+
h += '<button class="icon-btn icon-only" id="refresh-asset" title="Refresh">' + IC.refresh + '</button>';
|
|
137
128
|
h += "</div>";
|
|
138
129
|
h += "</div>";
|
|
139
130
|
|
|
@@ -175,6 +166,7 @@ function renderPage(r) {
|
|
|
175
166
|
h += "</div>";
|
|
176
167
|
|
|
177
168
|
root.innerHTML = h;
|
|
169
|
+
renderThemeToggle();
|
|
178
170
|
|
|
179
171
|
// Event delegation
|
|
180
172
|
root.addEventListener("click", function handler(e) {
|
|
@@ -220,6 +212,7 @@ function showFetchPrompt() {
|
|
|
220
212
|
h += '<button class="prompt-btn prompt-btn-primary" id="fetch-direct-btn">Fetch Directly</button>';
|
|
221
213
|
h += "</div></div>";
|
|
222
214
|
root.innerHTML = h;
|
|
215
|
+
renderThemeToggle();
|
|
223
216
|
document.getElementById("fetch-direct-btn").addEventListener("click", function() { fetchDirect(); });
|
|
224
217
|
}
|
|
225
218
|
|
|
@@ -300,6 +293,7 @@ ${ASSET_DETAILS_CSS}
|
|
|
300
293
|
<div id="app"><div class="status">Loading asset details…</div></div>
|
|
301
294
|
|
|
302
295
|
<script>
|
|
296
|
+
${SHARED_JS_ICONS}
|
|
303
297
|
${SHARED_JS_MCP_CLIENT}
|
|
304
298
|
${SHARED_JS_HELPERS}
|
|
305
299
|
${SHARED_JS_TOOLTIPS}
|