@webmcp-auto-ui/sdk 0.4.0 → 0.5.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/README.md +36 -1
- package/package.json +1 -1
- package/src/index.ts +1 -1
package/README.md
CHANGED
|
@@ -61,13 +61,48 @@ const param = canvas.buildHyperskillParam(); // base64 for ?hs=
|
|
|
61
61
|
|
|
62
62
|
The canvas store manages blocks, mode (`auto` | `drag` | `chat`), MCP connection state, chat messages, and generating flag.
|
|
63
63
|
|
|
64
|
+
## MCP Demo Servers
|
|
65
|
+
|
|
66
|
+
A built-in registry of 7 demo MCP server endpoints for testing and showcasing:
|
|
67
|
+
|
|
68
|
+
```ts
|
|
69
|
+
import { MCP_DEMO_SERVERS } from '@webmcp-auto-ui/sdk';
|
|
70
|
+
|
|
71
|
+
// MCP_DEMO_SERVERS: Array<{ url: string; name: string; description: string }>
|
|
72
|
+
// Includes: code4code, weather, finance, etc.
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Used by the `RemoteMCPserversDemo` component in `@webmcp-auto-ui/ui` to let users discover and connect to available servers.
|
|
76
|
+
|
|
77
|
+
## HyperSkillMeta extensions
|
|
78
|
+
|
|
79
|
+
Two new fields in `HyperSkillMeta`:
|
|
80
|
+
|
|
81
|
+
- **`chatSummary`** — anonymized summary of the chat that produced the skill (generated via `summarizeChat()` from `@webmcp-auto-ui/agent`)
|
|
82
|
+
- **`provenance`** — records the LLM model, MCP server, and timestamp that created the skill
|
|
83
|
+
|
|
84
|
+
These fields enable traceability without exposing raw chat history.
|
|
85
|
+
|
|
86
|
+
## Vanilla canvas store
|
|
87
|
+
|
|
88
|
+
A framework-agnostic canvas store for non-Svelte environments:
|
|
89
|
+
|
|
90
|
+
```ts
|
|
91
|
+
import { canvas } from '@webmcp-auto-ui/sdk/canvas-vanilla';
|
|
92
|
+
|
|
93
|
+
canvas.addBlock('stat', { label: 'Revenue', value: '$142K' });
|
|
94
|
+
canvas.subscribe(() => console.log('state changed'));
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Same API as the Svelte 5 store but uses plain callbacks instead of runes. Useful for vanilla JS, React, or Vue integrations.
|
|
98
|
+
|
|
64
99
|
## Install
|
|
65
100
|
|
|
66
101
|
```bash
|
|
67
102
|
npm install @webmcp-auto-ui/sdk
|
|
68
103
|
```
|
|
69
104
|
|
|
70
|
-
|
|
105
|
+
The Svelte 5 canvas store requires Svelte 5. The vanilla canvas store, HyperSkill utilities, skills registry, and MCP demo servers are plain TypeScript with no framework dependency.
|
|
71
106
|
|
|
72
107
|
## License
|
|
73
108
|
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -39,7 +39,7 @@ export interface HyperSkillVersion {
|
|
|
39
39
|
export { encode, decode, hash, diff, getHsParam } from 'hyperskills';
|
|
40
40
|
|
|
41
41
|
// Typed convenience wrappers — prefer these in apps:
|
|
42
|
-
import { encode, decode, hash } from 'hyperskills';
|
|
42
|
+
import { encode, decode, hash, diff } from 'hyperskills';
|
|
43
43
|
|
|
44
44
|
export async function encodeHyperSkill(skill: HyperSkill, sourceUrl?: string): Promise<string> {
|
|
45
45
|
const base = sourceUrl ?? (typeof window !== 'undefined' ? window.location.href.split('?')[0] : 'https://example.com');
|