@shuffleio/shuffle-mcps 0.0.5 → 0.0.6
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 +48 -2
- package/dist/index.cjs +2319 -307
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +134 -9
- package/dist/index.d.ts +134 -9
- package/dist/index.js +2315 -292
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -83,15 +83,16 @@ export default function App() {
|
|
|
83
83
|
}
|
|
84
84
|
```
|
|
85
85
|
|
|
86
|
-
## The
|
|
86
|
+
## The components
|
|
87
87
|
|
|
88
|
-
The library exports
|
|
88
|
+
The library exports four React components — use one or all of them. They share state, so you can mix-and-match.
|
|
89
89
|
|
|
90
90
|
| Component | What it does | Live demo |
|
|
91
91
|
|---|---|---|
|
|
92
92
|
| [`<ShuffleMCP />`](#1-shufflemcp--inline-search) | Inline search box that merges Algolia's 3,000+ public app catalog with the current user's private apps | [/shuffle-mcp-demo §1](https://security.shuffler.io/shuffle-mcp-demo) |
|
|
93
93
|
| [`<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) |
|
|
94
94
|
| [`<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) |
|
|
95
|
+
| [`<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) |
|
|
95
96
|
|
|
96
97
|
### 1. `<ShuffleMCP />` — inline search
|
|
97
98
|
|
|
@@ -194,6 +195,51 @@ Useful props:
|
|
|
194
195
|
|
|
195
196
|
Reference implementation in production: [`src/Shuffle-MCPs/AppSearchDrawer.tsx`](./AppSearchDrawer.tsx) and [`AppDetailDrawer.tsx`](./AppDetailDrawer.tsx).
|
|
196
197
|
|
|
198
|
+
### 4. `<AgentUI />` — start + debug agents
|
|
199
|
+
|
|
200
|
+
A standalone "What do you want to do?" surface for the Shuffle agent. Two modes in one component:
|
|
201
|
+
|
|
202
|
+
1. **Starter** — large hero prompt with attached MCP/app chips. Submits to `/api/v1/agent`.
|
|
203
|
+
2. **Debugger** — compact header + live decision timeline driven by `/api/v1/streams/results`, with question/continuation forms, per-decision raw-JSON inspection, approvals, retries, and reruns.
|
|
204
|
+
|
|
205
|
+
It switches modes automatically when an execution starts, or when `?execution_id=...&authorization=...` is present in the URL.
|
|
206
|
+
|
|
207
|
+
```tsx
|
|
208
|
+
import { AgentUI } from 'shuffle-mcps';
|
|
209
|
+
|
|
210
|
+
<AgentUI
|
|
211
|
+
apiKey={user.apiKey} // optional — falls back to session
|
|
212
|
+
apiBaseUrl="https://shuffler.io" // optional — falls back to default
|
|
213
|
+
orgId={user.orgId} // optional — sent as Org-Id header
|
|
214
|
+
defaultApps={[{ name: 'http' }, { name: 'shuffle_tools' }]}
|
|
215
|
+
onRun={({ input, success, executionId }) => {
|
|
216
|
+
console.log('agent run', { input, success, executionId });
|
|
217
|
+
}}
|
|
218
|
+
/>
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
Like `<ShuffleMCP />`, all three of `apiKey`, `apiBaseUrl`, and `orgId` are **optional**. When omitted, the component uses the shared browser session (cookie + `localStorage.shuffle_api_key`) — the same behavior as the rest of this library.
|
|
222
|
+
|
|
223
|
+
Useful props:
|
|
224
|
+
|
|
225
|
+
| Prop | Type | Description |
|
|
226
|
+
|---|---|---|
|
|
227
|
+
| `apiKey` | `string` | Bearer token used for every `/api/v1/*` call this instance makes |
|
|
228
|
+
| `apiBaseUrl` | `string` | Shuffle backend base URL (e.g. `https://shuffler.io`) |
|
|
229
|
+
| `orgId` | `string` | Sent as the `Org-Id` header on every call |
|
|
230
|
+
| `apps` | `AgentUIApp[]` | Controlled chip set. Disables auto-load |
|
|
231
|
+
| `defaultApps` | `AgentUIApp[]` | Initial chip set when `apps` is not provided |
|
|
232
|
+
| `autoLoadApps` | `boolean` | Auto-fetch the user's authenticated apps via `/api/v1/apps/authentication`. Default `true` |
|
|
233
|
+
| `executionId` / `authorization` | `string` | Attach to a known execution on mount and skip the starter |
|
|
234
|
+
| `readUrlParams` | `boolean` | Read `?execution_id` + `?authorization` from the URL. Default `true` |
|
|
235
|
+
| `title` / `subtitle` / `placeholder` | `string` | Hero copy |
|
|
236
|
+
| `defaultInput` / `autoSubmit` | `string` / `boolean` | Pre-fill and optionally submit on mount |
|
|
237
|
+
| `compact` / `hideHeroIcon` / `hideAppPicker` / `hideAttach` | `boolean` | Layout switches for embedding |
|
|
238
|
+
| `maxWidth` | `number` | Max width of the centered card. Default `900` |
|
|
239
|
+
| `onRun` | `(info) => void` | Fires whenever a run finishes (success or failure) |
|
|
240
|
+
|
|
241
|
+
Reference page in production: [`src/pages/dashboard/AgentsPage.tsx`](../pages/dashboard/AgentsPage.tsx) (mounted at [`/agents`](https://security.shuffler.io/agents)).
|
|
242
|
+
|
|
197
243
|
### Predefined search
|
|
198
244
|
|
|
199
245
|
```tsx
|