@nexub/mcp 4.6.0 → 4.8.0
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/skill/references/components/approval-card.md +36 -0
- package/dist/skill/references/components/diff-view.md +37 -0
- package/dist/skill/references/components/plan-tracker.md +38 -0
- package/dist/skill/references/components/tool-call.md +37 -0
- package/dist/skill/references/components.md +6 -2
- package/dist/skill/references/tokens.md +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Approval Card
|
|
2
|
+
|
|
3
|
+
The agent asks before it acts: what will happen, then Approve or Deny.
|
|
4
|
+
|
|
5
|
+
- Package: `@nexub/react` · Category: AI · Status: beta
|
|
6
|
+
- Import: `import { ApprovalCard } from '@nexub/react';`
|
|
7
|
+
- Docs: https://nexub-ds-docs.pages.dev/components/approval-card
|
|
8
|
+
|
|
9
|
+
## Props
|
|
10
|
+
|
|
11
|
+
| Prop | Type | Default | Description |
|
|
12
|
+
| --- | --- | --- | --- |
|
|
13
|
+
| `title` (required) | `string` | | What the agent wants to do. |
|
|
14
|
+
| `onApprove / onDeny` | `() => void` | | Called once with the choice. |
|
|
15
|
+
|
|
16
|
+
## Example: Before sending
|
|
17
|
+
|
|
18
|
+
```tsx
|
|
19
|
+
'use client';
|
|
20
|
+
|
|
21
|
+
import { ApprovalCard } from '@nexub/react';
|
|
22
|
+
|
|
23
|
+
export default function Example() {
|
|
24
|
+
return (
|
|
25
|
+
<ApprovalCard title="Send 3 payment reminders to Acme" approveLabel="Send reminders">
|
|
26
|
+
Invoices INV-1042, INV-1051 and INV-1063, $4,120 in total, to ap@acme.example.
|
|
27
|
+
</ApprovalCard>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Accessibility
|
|
33
|
+
|
|
34
|
+
- The outcome is announced in a polite live region and replaces the buttons.
|
|
35
|
+
|
|
36
|
+
Related: [message-bubble](message-bubble.md), [thinking-indicator](thinking-indicator.md)
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Diff View
|
|
2
|
+
|
|
3
|
+
A unified diff with added and removed lines, for agent changes.
|
|
4
|
+
|
|
5
|
+
- Package: `@nexub/react` · Category: AI · Status: beta
|
|
6
|
+
- Import: `import { DiffView } from '@nexub/react';`
|
|
7
|
+
- Docs: https://nexub-ds-docs.pages.dev/components/diff-view
|
|
8
|
+
|
|
9
|
+
## Props
|
|
10
|
+
|
|
11
|
+
| Prop | Type | Default | Description |
|
|
12
|
+
| --- | --- | --- | --- |
|
|
13
|
+
| `diff` (required) | `string` | | Unified diff text. |
|
|
14
|
+
| `file` | `string` | | File name above the diff. |
|
|
15
|
+
|
|
16
|
+
## Example: Proposed change
|
|
17
|
+
|
|
18
|
+
```tsx
|
|
19
|
+
import { DiffView } from '@nexub/react';
|
|
20
|
+
|
|
21
|
+
const diff = `@@ -3,4 +3,4 @@
|
|
22
|
+
export const reminder = {
|
|
23
|
+
- subject: 'Invoice overdue',
|
|
24
|
+
+ subject: 'A friendly reminder about your invoice',
|
|
25
|
+
tone: 'polite',
|
|
26
|
+
};`;
|
|
27
|
+
|
|
28
|
+
export default function Example() {
|
|
29
|
+
return <DiffView className="w-full" file="templates/reminder.ts" diff={diff} />;
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Accessibility
|
|
34
|
+
|
|
35
|
+
- Added and removed lines are spelled out for screen readers; colour is not the only cue.
|
|
36
|
+
|
|
37
|
+
Related: [message-bubble](message-bubble.md), [thinking-indicator](thinking-indicator.md)
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Plan Tracker
|
|
2
|
+
|
|
3
|
+
An agent plan: ordered steps with done, active, pending or failed status.
|
|
4
|
+
|
|
5
|
+
- Package: `@nexub/react` · Category: AI · Status: beta
|
|
6
|
+
- Import: `import { PlanTracker } from '@nexub/react';`
|
|
7
|
+
- Docs: https://nexub-ds-docs.pages.dev/components/plan-tracker
|
|
8
|
+
|
|
9
|
+
## Props
|
|
10
|
+
|
|
11
|
+
| Prop | Type | Default | Description |
|
|
12
|
+
| --- | --- | --- | --- |
|
|
13
|
+
| `steps` (required) | `{ title; status; detail? }[]` | | Status is done, active, pending or failed. |
|
|
14
|
+
|
|
15
|
+
## Example: Agent plan
|
|
16
|
+
|
|
17
|
+
```tsx
|
|
18
|
+
import { PlanTracker } from '@nexub/react';
|
|
19
|
+
|
|
20
|
+
export default function Example() {
|
|
21
|
+
return (
|
|
22
|
+
<PlanTracker
|
|
23
|
+
steps={[
|
|
24
|
+
{ title: 'Read October invoices', status: 'done', detail: '42 invoices' },
|
|
25
|
+
{ title: 'Match payments to invoices', status: 'active', detail: '31 of 42 matched' },
|
|
26
|
+
{ title: 'Draft reminders for the unpaid ones', status: 'pending' },
|
|
27
|
+
{ title: 'Ask you before sending', status: 'pending' },
|
|
28
|
+
]}
|
|
29
|
+
/>
|
|
30
|
+
);
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Accessibility
|
|
35
|
+
|
|
36
|
+
- Each step reads its status in text; the active step has `aria-current="step"`.
|
|
37
|
+
|
|
38
|
+
Related: [message-bubble](message-bubble.md), [thinking-indicator](thinking-indicator.md)
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Tool Call
|
|
2
|
+
|
|
3
|
+
One tool call: its name and status, expandable to input and output.
|
|
4
|
+
|
|
5
|
+
- Package: `@nexub/react` · Category: AI · Status: beta
|
|
6
|
+
- Import: `import { ToolCall } from '@nexub/react';`
|
|
7
|
+
- Docs: https://nexub-ds-docs.pages.dev/components/tool-call
|
|
8
|
+
|
|
9
|
+
## Props
|
|
10
|
+
|
|
11
|
+
| Prop | Type | Default | Description |
|
|
12
|
+
| --- | --- | --- | --- |
|
|
13
|
+
| `name` (required) | `string` | | Tool name. |
|
|
14
|
+
| `status` (required) | `'running' \| 'done' \| 'failed'` | | Shown as a badge. |
|
|
15
|
+
| `input` | `unknown` | | Arguments, shown as JSON. |
|
|
16
|
+
| `output` | `unknown` | | Result, as text or JSON. |
|
|
17
|
+
|
|
18
|
+
## Example: Tool call
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { ToolCall } from '@nexub/react';
|
|
22
|
+
|
|
23
|
+
export default function Example() {
|
|
24
|
+
return (
|
|
25
|
+
<div className="flex w-full flex-col gap-2">
|
|
26
|
+
<ToolCall name="search_invoices" status="done" input={{ customer: 'Acme', status: 'unpaid' }} output={{ found: 3, total: '$4,120' }} open />
|
|
27
|
+
<ToolCall name="draft_email" status="running" input={{ to: 'ap@acme.example', template: 'reminder' }} />
|
|
28
|
+
</div>
|
|
29
|
+
);
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Accessibility
|
|
34
|
+
|
|
35
|
+
- A native `<details>` disclosure: opens with Enter or Space.
|
|
36
|
+
|
|
37
|
+
Related: [message-bubble](message-bubble.md), [thinking-indicator](thinking-indicator.md)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Component index
|
|
2
2
|
|
|
3
|
-
Nexub DS v4.
|
|
3
|
+
Nexub DS v4.8.0. Open `components/<slug>.md` for props, examples and accessibility notes.
|
|
4
4
|
Never use a component marked deprecated.
|
|
5
5
|
|
|
6
6
|
## Components — Actions
|
|
@@ -12,11 +12,15 @@ Never use a component marked deprecated.
|
|
|
12
12
|
|
|
13
13
|
## Components — AI
|
|
14
14
|
|
|
15
|
+
- [Approval Card](components/approval-card.md) `@nexub/react`: The agent asks before it acts: what will happen, then Approve or Deny.
|
|
15
16
|
- [Citation](components/citation.md) `@nexub/react`: Numbered source markers for running text, with a hover preview, plus SourceChip and SourceList for the sources under a reply.
|
|
17
|
+
- [Diff View](components/diff-view.md) `@nexub/react`: A unified diff with added and removed lines, for agent changes.
|
|
16
18
|
- [Message Bubble](components/message-bubble.md) `@nexub/react`: One message in a conversation. User messages sit in a bubble at the end; assistant replies run full width. MessageActions adds copy, feedback and regenerate.
|
|
19
|
+
- [Plan Tracker](components/plan-tracker.md) `@nexub/react`: An agent plan: ordered steps with done, active, pending or failed status.
|
|
17
20
|
- [Prompt Input](components/prompt-input.md) `@nexub/react`: The composer for a chat: an auto-growing text field with Send, which turns into Stop while a reply streams.
|
|
18
21
|
- [Streaming Text](components/streaming-text.md) `@nexub/react`: Assistant text as it arrives: new chunks fade in, text already shown stays still, and a caret marks the end.
|
|
19
22
|
- [Thinking Indicator](components/thinking-indicator.md) `@nexub/react`: Shows the assistant is working before the first token arrives: a morphing shape and a shimmering label.
|
|
23
|
+
- [Tool Call](components/tool-call.md) `@nexub/react`: One tool call: its name and status, expandable to input and output.
|
|
20
24
|
|
|
21
25
|
## Components — Avatar
|
|
22
26
|
|
|
@@ -220,5 +224,5 @@ Never use a component marked deprecated.
|
|
|
220
224
|
|
|
221
225
|
These exist; read their TypeScript props in `node_modules/<package>/dist/index.d.ts`.
|
|
222
226
|
|
|
223
|
-
- `@nexub/react`: AppShell, AspectRatio, Chart, CheckList, Code, CommandPalette, Container, ContextMenu, CountryBadge, DropdownMenu, FileUpload, Flag, FormError, KeyboardShortcut, Logo, Menubar, Motion, NavigationMenu, NexubProvider, PageHeader, Section, Sidebar, ThemeProvider, Toolbar, TopNav, VisuallyHidden
|
|
227
|
+
- `@nexub/react`: AgentKit, AppShell, AspectRatio, Chart, CheckList, Code, CommandPalette, Container, ContextMenu, CountryBadge, DropdownMenu, FileUpload, Flag, FormError, KeyboardShortcut, Logo, Menubar, Motion, NavigationMenu, NexubProvider, PageHeader, Section, Sidebar, ThemeProvider, Toolbar, TopNav, VisuallyHidden
|
|
224
228
|
- `@nexub/patterns`: ActivityPage, AppHeader, AppLauncher, ChatPage, CheckoutPage, DashboardPage, PageFrame, PaywallPage, SettingsLayout, SettingsPage, SignInPage, TransactionDetailPage
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Tokens
|
|
2
2
|
|
|
3
|
-
Nexub DS v4.
|
|
3
|
+
Nexub DS v4.8.0. Every token is a CSS custom property from `@nexub/tokens/css` (loaded by `@nexub/themes/base`).
|
|
4
4
|
The Tailwind preset (`@nexub/tokens/tailwind`) maps them to utilities. Never hardcode a hex, px spacing or shadow that a token covers.
|
|
5
5
|
|
|
6
6
|
## Color roles
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexub/mcp",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.8.0",
|
|
4
4
|
"description": "MCP server for Nexub Design System: gives Claude, Cursor and any MCP client the components, patterns, tokens and design rules of the installed release.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|