@shuffleio/shuffle-mcps 0.0.7 → 0.0.8
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 +110 -1
- package/dist/index.cjs +1915 -773
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +220 -11
- package/dist/index.d.ts +220 -11
- package/dist/index.js +1941 -774
- package/dist/index.js.map +1 -1
- package/dist/{shuffle-mcp-JQWKQNUP.css → shuffle-mcp-24XBNRGE.css} +45 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -95,7 +95,7 @@ export default function App() {
|
|
|
95
95
|
|
|
96
96
|
## The components
|
|
97
97
|
|
|
98
|
-
The library exports
|
|
98
|
+
The library exports six React components — use one or all of them. They share state, so you can mix-and-match.
|
|
99
99
|
|
|
100
100
|
| Component | What it does | Live demo |
|
|
101
101
|
|---|---|---|
|
|
@@ -103,6 +103,9 @@ The library exports four React components — use one or all of them. They share
|
|
|
103
103
|
| [`<AppSearchDrawer />`](#2-appsearchdrawer--full-search-drawer) | Right-side drawer wrapping `<ShuffleMCP />` plus a "Your apps" status row. This is the exact "Add Ingestion Source" drawer used in production | [/shuffle-mcp-demo §2](https://security.shuffler.io/shuffle-mcp-demo) |
|
|
104
104
|
| [`<AppDetailDrawer />`](#3-appdetaildrawer--single-app-config) | Right-side drawer for a single app: list/edit/test authentications and try the MCP `tools/call` endpoint inline | [/shuffle-mcp-demo §3](https://security.shuffler.io/shuffle-mcp-demo) |
|
|
105
105
|
| [`<AgentUI />`](#4-agentui--start--debug-agents) | Standalone "What do you want to do?" hero prompt + live decision-by-decision debugger for `/api/v1/agent` runs. Drop-in replacement for the legacy Shuffle Core agent page | [/agents](https://security.shuffler.io/agents) |
|
|
106
|
+
| [`<AgentRunDrawer />`](#5-agentrundrawer--run-agent-side-panel) | Right-side drawer that hosts `<AgentUI />` in compact mode plus optional caller-provided **Permissions** and **Local LLM** tabs (slot-driven, no host context required) | [/shuffle-mcp-demo §1b](https://security.shuffler.io/shuffle-mcp-demo) |
|
|
107
|
+
| [`<AgentActivityList />`](#6-agentactivitylist--past-executions) | Searchable, status-filterable list of past `/api/v1/agent` runs. Pair with `<AgentExecutionDrawer />` to inspect any row in the canonical Simple/Detailed view | [/shuffle-mcp-demo §8](https://security.shuffler.io/shuffle-mcp-demo) |
|
|
108
|
+
| [`<AgentExecutionDrawer />`](#7-agentexecutiondrawer--inspect-one-run) | Right-side drawer that pre-loads a single `AgentRun` into `<AgentUI />` (no `authorization` token required) for read-only inspection | [/agents](https://security.shuffler.io/agents) |
|
|
106
109
|
|
|
107
110
|
### 1. `<ShuffleMCP />` — inline search
|
|
108
111
|
|
|
@@ -247,9 +250,103 @@ Useful props:
|
|
|
247
250
|
| `compact` / `hideHeroIcon` / `hideAppPicker` / `hideAttach` | `boolean` | Layout switches for embedding |
|
|
248
251
|
| `maxWidth` | `number` | Max width of the centered card. Default `900` |
|
|
249
252
|
| `onRun` | `(info) => void` | Fires whenever a run finishes (success or failure) |
|
|
253
|
+
| `className` / `sx` / `contentSx` | `string` / `SxProps` | Style overrides for the root container and inner content column |
|
|
250
254
|
|
|
251
255
|
Reference page in production: [`src/pages/dashboard/AgentsPage.tsx`](../pages/dashboard/AgentsPage.tsx) (mounted at [`/agents`](https://security.shuffler.io/agents)).
|
|
252
256
|
|
|
257
|
+
### 5. `<AgentRunDrawer />` — Run Agent side panel
|
|
258
|
+
|
|
259
|
+
Right-side drawer that embeds `<AgentUI />` in compact mode, with optional **Permissions** and **Local LLM** tabs you fill via slots. Zero host-app context required — pass `apiKey` / `apiBaseUrl` / `orgId` through `agentUIProps` to authenticate.
|
|
260
|
+
|
|
261
|
+
```tsx
|
|
262
|
+
import { useState } from 'react';
|
|
263
|
+
import { AgentRunDrawer } from 'shuffle-mcps';
|
|
264
|
+
|
|
265
|
+
const [open, setOpen] = useState(false);
|
|
266
|
+
|
|
267
|
+
<AgentRunDrawer
|
|
268
|
+
open={open}
|
|
269
|
+
onClose={() => setOpen(false)}
|
|
270
|
+
agentUIProps={{ apiKey: user.apiKey, orgId: user.orgId }}
|
|
271
|
+
permissionsSlot={<MyPermissionsPanel />} // optional — tab is hidden when omitted
|
|
272
|
+
localLLMSlot={<MyLocalLLMConfig />} // optional — tab is hidden when omitted
|
|
273
|
+
/>
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
Useful props:
|
|
277
|
+
|
|
278
|
+
| Prop | Type | Description |
|
|
279
|
+
|---|---|---|
|
|
280
|
+
| `open` / `onClose` | `boolean` / `() => void` | Controlled open state |
|
|
281
|
+
| `initialTab` | `'run' \| 'permissions' \| 'localLLM'` | Tab focused on open. Default `'run'` |
|
|
282
|
+
| `permissionsSlot` / `localLLMSlot` | `ReactNode` | Render content for the optional tabs. Tab is hidden when omitted |
|
|
283
|
+
| `agentUIProps` | `Partial<AgentUIProps>` | Forwarded to the embedded `<AgentUI />` |
|
|
284
|
+
| `width` | `number` | Drawer width in px. Default `520` |
|
|
285
|
+
| `title` / `subtitle` | `string` | Header copy |
|
|
286
|
+
| `className` / `paperSx` / `headerSx` / `tabsSx` / `bodySx` | `string` / `SxProps` | Style overrides for the Drawer Paper, header bar, tab strip, and body container |
|
|
287
|
+
|
|
288
|
+
### 6. `<AgentActivityList />` — past executions
|
|
289
|
+
|
|
290
|
+
Searchable, status-filterable list of past `/api/v1/agent` runs. The component owns its own fetch + pagination loop. `onRunClick` lets the caller decide what happens on row click — typically opening `<AgentExecutionDrawer />`.
|
|
291
|
+
|
|
292
|
+
```tsx
|
|
293
|
+
import { useState } from 'react';
|
|
294
|
+
import { AgentActivityList, AgentExecutionDrawer, type AgentRun } from 'shuffle-mcps';
|
|
295
|
+
|
|
296
|
+
const [selectedRun, setSelectedRun] = useState<AgentRun | null>(null);
|
|
297
|
+
|
|
298
|
+
<>
|
|
299
|
+
<AgentActivityList
|
|
300
|
+
apiKey={user.apiKey}
|
|
301
|
+
orgId={user.orgId}
|
|
302
|
+
onRunClick={setSelectedRun}
|
|
303
|
+
/>
|
|
304
|
+
|
|
305
|
+
<AgentExecutionDrawer
|
|
306
|
+
open={!!selectedRun}
|
|
307
|
+
onClose={() => setSelectedRun(null)}
|
|
308
|
+
run={selectedRun}
|
|
309
|
+
apiKey={user.apiKey}
|
|
310
|
+
orgId={user.orgId}
|
|
311
|
+
/>
|
|
312
|
+
</>
|
|
313
|
+
```
|
|
314
|
+
|
|
315
|
+
Useful props:
|
|
316
|
+
|
|
317
|
+
| Prop | Type | Description |
|
|
318
|
+
|---|---|---|
|
|
319
|
+
| `apiKey` / `apiBaseUrl` / `orgId` | `string` | Auth — same fallback semantics as `<AgentUI />` |
|
|
320
|
+
| `onRunClick` | `(run: AgentRun) => void` | Row click handler |
|
|
321
|
+
| `showSearchBar` / `showStatusChips` | `boolean` | Toggle the toolbar pieces. Default `true` |
|
|
322
|
+
| `limit` | `number` | Page size. Default `50` |
|
|
323
|
+
| `emptyTitle` / `emptySubtitle` | `string` | Empty-state copy |
|
|
324
|
+
| `className` / `sx` / `toolbarSx` / `rowSx` | `string` / `SxProps` | Style overrides for the root container, toolbar, and each run row |
|
|
325
|
+
|
|
326
|
+
### 7. `<AgentExecutionDrawer />` — inspect one run
|
|
327
|
+
|
|
328
|
+
Right-side drawer that pre-loads a single `AgentRun` into `<AgentUI />` so you can inspect the Simple/Detailed view of any past execution without an `authorization` token.
|
|
329
|
+
|
|
330
|
+
```tsx
|
|
331
|
+
<AgentExecutionDrawer
|
|
332
|
+
open={!!selectedRun}
|
|
333
|
+
onClose={() => setSelectedRun(null)}
|
|
334
|
+
run={selectedRun}
|
|
335
|
+
apiKey={user.apiKey}
|
|
336
|
+
orgId={user.orgId}
|
|
337
|
+
/>
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
Useful props:
|
|
341
|
+
|
|
342
|
+
| Prop | Type | Description |
|
|
343
|
+
|---|---|---|
|
|
344
|
+
| `open` / `onClose` | `boolean` / `() => void` | Controlled open state |
|
|
345
|
+
| `run` | `AgentRun \| null` | The run to display. When `null` and `open=true`, the drawer renders empty |
|
|
346
|
+
| `width` | `number` | Drawer width in px. Default `720` |
|
|
347
|
+
| `apiKey` / `apiBaseUrl` / `orgId` | `string` | Forwarded to the embedded `<AgentUI />` |
|
|
348
|
+
| `className` / `paperSx` / `headerSx` / `bodySx` | `string` / `SxProps` | Style overrides for the Drawer Paper, header bar, and body container |
|
|
349
|
+
|
|
253
350
|
### Predefined search
|
|
254
351
|
|
|
255
352
|
```tsx
|
|
@@ -365,6 +462,18 @@ For finer-grained overrides on `<ShuffleMCP />`, pass `customStyles` — every s
|
|
|
365
462
|
/>
|
|
366
463
|
```
|
|
367
464
|
|
|
465
|
+
For the agent components (`<AgentUI />`, `<AgentRunDrawer />`, `<AgentExecutionDrawer />`, `<AgentActivityList />`), every entity in the layout is overridable via MUI `sx` props plus a `className` on the root. The slots are listed per-component in the tables above — typically `sx` (root), `paperSx` (drawer surface), `headerSx`, `tabsSx` / `toolbarSx`, `bodySx`, and `rowSx`. Each one accepts the standard `SxProps<Theme>` shape and is **merged on top of** the defaults, so you only specify what you want to change:
|
|
466
|
+
|
|
467
|
+
```tsx
|
|
468
|
+
<AgentRunDrawer
|
|
469
|
+
open={open}
|
|
470
|
+
onClose={() => setOpen(false)}
|
|
471
|
+
paperSx={{ background: 'hsl(var(--background))', boxShadow: 'none' }}
|
|
472
|
+
headerSx={{ py: 1.5 }}
|
|
473
|
+
tabsSx={{ '& .MuiTabs-indicator': { display: 'none' } }}
|
|
474
|
+
/>
|
|
475
|
+
```
|
|
476
|
+
|
|
368
477
|
Full prop reference, framework setup (Next.js, Vue), styling slots, custom rendering, and publishing: [**LIBRARY.md**](./LIBRARY.md).
|
|
369
478
|
|
|
370
479
|
## Imperative handle
|