@shuffleio/shuffle-mcps 0.0.36 → 0.0.37
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/{appsCache-ME4KZMTY.mjs → appsCache-H7SZLNQW.mjs} +1 -1
- package/dist/{chunk-IABSYB2J.mjs → chunk-5ZQ2BL47.mjs} +28 -3
- package/dist/index.d.mts +21 -1
- package/dist/index.d.ts +21 -1
- package/dist/index.js +3772 -2833
- package/dist/index.mjs +3979 -3064
- package/package.json +1 -1
|
@@ -50,6 +50,30 @@ var keyFor = (input, init) => {
|
|
|
50
50
|
return null;
|
|
51
51
|
}
|
|
52
52
|
};
|
|
53
|
+
var withStoredApiKey = (input, init) => {
|
|
54
|
+
if (typeof window === "undefined") return init;
|
|
55
|
+
let urlStr;
|
|
56
|
+
if (typeof input === "string") urlStr = input;
|
|
57
|
+
else if (input instanceof URL) urlStr = input.toString();
|
|
58
|
+
else if (input && typeof input.url === "string") urlStr = input.url;
|
|
59
|
+
else return init;
|
|
60
|
+
try {
|
|
61
|
+
const url = new URL(urlStr, window.location.href);
|
|
62
|
+
const isKnownShuffleOrigin = allowedOrigins.has(url.origin) || url.origin === window.location.origin || url.hostname === "shuffler.io" || url.hostname.endsWith(".shuffler.io") || url.hostname === "tunnel.schemaless.org";
|
|
63
|
+
if (!url.pathname.startsWith("/api/") || !isKnownShuffleOrigin) return init;
|
|
64
|
+
const apiKey = window.localStorage.getItem("shuffle_api_key");
|
|
65
|
+
if (!apiKey) return init;
|
|
66
|
+
const requestHeaders = typeof Request !== "undefined" && input instanceof Request ? input.headers : void 0;
|
|
67
|
+
const headers = new Headers(requestHeaders);
|
|
68
|
+
if (init?.headers) {
|
|
69
|
+
new Headers(init.headers).forEach((value, name) => headers.set(name, value));
|
|
70
|
+
}
|
|
71
|
+
if (!headers.has("Authorization")) headers.set("Authorization", `Bearer ${apiKey}`);
|
|
72
|
+
return { ...init, headers };
|
|
73
|
+
} catch {
|
|
74
|
+
return init;
|
|
75
|
+
}
|
|
76
|
+
};
|
|
53
77
|
var synthetic503 = (key, retryInMs) => new Response(
|
|
54
78
|
JSON.stringify({
|
|
55
79
|
error: "circuit_breaker_open",
|
|
@@ -75,8 +99,9 @@ var installFetchBreaker = () => {
|
|
|
75
99
|
installed = true;
|
|
76
100
|
const original = window.fetch.bind(window);
|
|
77
101
|
window.fetch = (async (input, init) => {
|
|
78
|
-
const
|
|
79
|
-
|
|
102
|
+
const authenticatedInit = withStoredApiKey(input, init);
|
|
103
|
+
const key = keyFor(input, authenticatedInit);
|
|
104
|
+
if (!key) return original(input, authenticatedInit);
|
|
80
105
|
const entry = getEntry(key);
|
|
81
106
|
const now = Date.now();
|
|
82
107
|
let isProbe = false;
|
|
@@ -110,7 +135,7 @@ var installFetchBreaker = () => {
|
|
|
110
135
|
};
|
|
111
136
|
let response;
|
|
112
137
|
try {
|
|
113
|
-
response = await original(input,
|
|
138
|
+
response = await original(input, authenticatedInit);
|
|
114
139
|
} catch (err) {
|
|
115
140
|
const ts = Date.now();
|
|
116
141
|
entry.failures.push(ts);
|
package/dist/index.d.mts
CHANGED
|
@@ -374,8 +374,10 @@ interface AgentPresetsProps {
|
|
|
374
374
|
presets?: AgentPreset[];
|
|
375
375
|
/** Ref forwarded to the trigger button so the host can measure its width. */
|
|
376
376
|
chipRef?: React.Ref<HTMLButtonElement>;
|
|
377
|
+
/** Authoritative support flag from the host's getinfo payload. */
|
|
378
|
+
isSupport?: boolean;
|
|
377
379
|
}
|
|
378
|
-
declare const AgentPresets: ({ variant, onSelectPreset, selectedPreset, onRemoveSelected, presets, chipRef }: AgentPresetsProps) => React$1.JSX.Element;
|
|
380
|
+
declare const AgentPresets: ({ variant, onSelectPreset, selectedPreset, onRemoveSelected, presets, chipRef, isSupport }: AgentPresetsProps) => React$1.JSX.Element;
|
|
379
381
|
|
|
380
382
|
/**
|
|
381
383
|
* AgentUI — Standalone "start + debug agents" surface.
|
|
@@ -416,6 +418,20 @@ interface AgentUIProps {
|
|
|
416
418
|
* token to be set on `API_CONFIG`).
|
|
417
419
|
*/
|
|
418
420
|
autoLoadApps?: boolean;
|
|
421
|
+
/** Authoritative support flag from `/api/v1/getinfo`. */
|
|
422
|
+
isSupport?: boolean;
|
|
423
|
+
/**
|
|
424
|
+
* Optional per-skill readiness CTAs. Keyed by skill (preset) id. When the
|
|
425
|
+
* matching skill is selected and the host reports it has no real content
|
|
426
|
+
* yet, AgentUI renders a small call-to-action under the prompt.
|
|
427
|
+
*/
|
|
428
|
+
presetCtas?: Record<string, {
|
|
429
|
+
/** When false, nothing is rendered (content exists / still loading). */
|
|
430
|
+
show?: boolean;
|
|
431
|
+
message: string;
|
|
432
|
+
actionLabel: string;
|
|
433
|
+
onAction?: () => void;
|
|
434
|
+
}>;
|
|
419
435
|
/** Hero title above the prompt. */
|
|
420
436
|
title?: string;
|
|
421
437
|
/** Optional subtitle/description shown under the title. */
|
|
@@ -940,6 +956,8 @@ interface AgentsViewProps extends ShuffleHostProps {
|
|
|
940
956
|
appsStorageKey?: string;
|
|
941
957
|
/** Usecase-backed agent types shown in the activity list filter dropdown. */
|
|
942
958
|
usecaseFilters?: AgentUsecaseFilter[];
|
|
959
|
+
/** Per-skill readiness CTAs forwarded to the embedded AgentUI. */
|
|
960
|
+
presetCtas?: AgentUIProps['presetCtas'];
|
|
943
961
|
}
|
|
944
962
|
|
|
945
963
|
interface AgentLocalModel {
|
|
@@ -1495,6 +1513,8 @@ declare const DATASTORE_CATEGORIES: {
|
|
|
1495
1513
|
readonly INCIDENTS: "shuffle-security_incidents";
|
|
1496
1514
|
readonly VULNERABILITIES: "shuffle-security_vulnerabilities";
|
|
1497
1515
|
readonly ASSETS: "shuffle-security_assets";
|
|
1516
|
+
readonly PACKAGES: "shuffle-security_packages";
|
|
1517
|
+
readonly SOFTWARE: "shuffle-security_software";
|
|
1498
1518
|
readonly TEMPLATES: "shuffle-security_templates";
|
|
1499
1519
|
readonly CONFIGURATION: "shuffle-security_configuration";
|
|
1500
1520
|
readonly IOCS: "shuffle-security_ioc-config";
|
package/dist/index.d.ts
CHANGED
|
@@ -374,8 +374,10 @@ interface AgentPresetsProps {
|
|
|
374
374
|
presets?: AgentPreset[];
|
|
375
375
|
/** Ref forwarded to the trigger button so the host can measure its width. */
|
|
376
376
|
chipRef?: React.Ref<HTMLButtonElement>;
|
|
377
|
+
/** Authoritative support flag from the host's getinfo payload. */
|
|
378
|
+
isSupport?: boolean;
|
|
377
379
|
}
|
|
378
|
-
declare const AgentPresets: ({ variant, onSelectPreset, selectedPreset, onRemoveSelected, presets, chipRef }: AgentPresetsProps) => React$1.JSX.Element;
|
|
380
|
+
declare const AgentPresets: ({ variant, onSelectPreset, selectedPreset, onRemoveSelected, presets, chipRef, isSupport }: AgentPresetsProps) => React$1.JSX.Element;
|
|
379
381
|
|
|
380
382
|
/**
|
|
381
383
|
* AgentUI — Standalone "start + debug agents" surface.
|
|
@@ -416,6 +418,20 @@ interface AgentUIProps {
|
|
|
416
418
|
* token to be set on `API_CONFIG`).
|
|
417
419
|
*/
|
|
418
420
|
autoLoadApps?: boolean;
|
|
421
|
+
/** Authoritative support flag from `/api/v1/getinfo`. */
|
|
422
|
+
isSupport?: boolean;
|
|
423
|
+
/**
|
|
424
|
+
* Optional per-skill readiness CTAs. Keyed by skill (preset) id. When the
|
|
425
|
+
* matching skill is selected and the host reports it has no real content
|
|
426
|
+
* yet, AgentUI renders a small call-to-action under the prompt.
|
|
427
|
+
*/
|
|
428
|
+
presetCtas?: Record<string, {
|
|
429
|
+
/** When false, nothing is rendered (content exists / still loading). */
|
|
430
|
+
show?: boolean;
|
|
431
|
+
message: string;
|
|
432
|
+
actionLabel: string;
|
|
433
|
+
onAction?: () => void;
|
|
434
|
+
}>;
|
|
419
435
|
/** Hero title above the prompt. */
|
|
420
436
|
title?: string;
|
|
421
437
|
/** Optional subtitle/description shown under the title. */
|
|
@@ -940,6 +956,8 @@ interface AgentsViewProps extends ShuffleHostProps {
|
|
|
940
956
|
appsStorageKey?: string;
|
|
941
957
|
/** Usecase-backed agent types shown in the activity list filter dropdown. */
|
|
942
958
|
usecaseFilters?: AgentUsecaseFilter[];
|
|
959
|
+
/** Per-skill readiness CTAs forwarded to the embedded AgentUI. */
|
|
960
|
+
presetCtas?: AgentUIProps['presetCtas'];
|
|
943
961
|
}
|
|
944
962
|
|
|
945
963
|
interface AgentLocalModel {
|
|
@@ -1495,6 +1513,8 @@ declare const DATASTORE_CATEGORIES: {
|
|
|
1495
1513
|
readonly INCIDENTS: "shuffle-security_incidents";
|
|
1496
1514
|
readonly VULNERABILITIES: "shuffle-security_vulnerabilities";
|
|
1497
1515
|
readonly ASSETS: "shuffle-security_assets";
|
|
1516
|
+
readonly PACKAGES: "shuffle-security_packages";
|
|
1517
|
+
readonly SOFTWARE: "shuffle-security_software";
|
|
1498
1518
|
readonly TEMPLATES: "shuffle-security_templates";
|
|
1499
1519
|
readonly CONFIGURATION: "shuffle-security_configuration";
|
|
1500
1520
|
readonly IOCS: "shuffle-security_ioc-config";
|