@mcp-web/types 0.1.0 → 0.1.2
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 +31 -0
- package/dist/config.js +2 -2
- package/dist/config.js.map +1 -1
- package/package.json +6 -1
package/README.md
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# MCP Web Types
|
|
2
|
+
|
|
3
|
+
Shared TypeScript type definitions and Zod schemas used across all `@mcp-web/*` packages.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @mcp-web/types
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type { ToolDefinition, MCPWebConfig, QueryMessage } from '@mcp-web/types';
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Modules
|
|
18
|
+
|
|
19
|
+
| Module | Description |
|
|
20
|
+
|--------|-------------|
|
|
21
|
+
| `tools` | Tool definition types and schemas |
|
|
22
|
+
| `apps` | MCP App definition types and schemas |
|
|
23
|
+
| `config` | Bridge and client configuration types |
|
|
24
|
+
| `query` | Query/response message types |
|
|
25
|
+
| `resources` | MCP resource types |
|
|
26
|
+
| `mcp` | Core MCP protocol types |
|
|
27
|
+
| `errors` | Error types and codes |
|
|
28
|
+
|
|
29
|
+
## Learn More
|
|
30
|
+
|
|
31
|
+
For full documentation, visit [mcp-web.dev](https://mcp-web.dev).
|
package/dist/config.js
CHANGED
|
@@ -18,8 +18,8 @@ export const McpWebConfigSchema = z.object({
|
|
|
18
18
|
.default('localhost:3001')
|
|
19
19
|
.transform((url) => url.replace(/^(wss?|https?):\/\//, ''))
|
|
20
20
|
.describe('The bridge server address as host:port (e.g., \'localhost:3001\' or \'bridge.example.com\'). Protocol is determined automatically.'),
|
|
21
|
-
/** Either a URL or a data URI
|
|
22
|
-
icon: z.string().optional().describe('Either a URL or a data URI
|
|
21
|
+
/** Either a URL or a data URI (e.g., "data:image/svg+xml;base64,..." or "data:image/png;base64,..."). This is shown in the AI App. */
|
|
22
|
+
icon: z.string().optional().describe('Either a URL or a data URI (e.g., "data:image/svg+xml;base64,..." or "data:image/png;base64,..."). This is shown in the AI App.'),
|
|
23
23
|
/** The agent server address with optional path (e.g., 'localhost:3000' or 'localhost:3000/api/v1/query'). Protocol is determined automatically. Required for query support. */
|
|
24
24
|
agentUrl: z
|
|
25
25
|
.string()
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,yHAAyH;IACzH,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,oHAAoH,CAAC;IACtJ,sGAAsG;IACtG,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,iGAAiG,CAAC;IAC1I,2JAA2J;IAC3J,SAAS,EAAE,CAAC;SACT,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,OAAO,CAAC,gBAAgB,CAAC;SACzB,SAAS,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC,qBAAqB,EAAE,EAAE,CAAC,CAAC;SAC1D,QAAQ,CAAC,oIAAoI,CAAC;IACjJ,
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;I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AmB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,0CAA0C,CAAC;IAChH,2HAA2H;IAC3H,sBAAsB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,cAAc,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC,0CAA0C,CAAC;IAC5I,0GAA0G;IAC1G,0BAA0B,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iDAAiD,CAAC;IAC9H,mGAAmG;IACnG,oBAAoB,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,2CAA2C,CAAC;IAClH,mJAAmJ;IACnJ,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,8IAA8I,CAAC;IAClM,2DAA2D;IAC3D,KAAK,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,sDAAsD,CAAC;CAC9G,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mcp-web/types",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Shared types and schemas for MCP Web packages",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -31,6 +31,11 @@
|
|
|
31
31
|
"@types/react": "^18.3.24",
|
|
32
32
|
"typescript": "~5.9.3"
|
|
33
33
|
},
|
|
34
|
+
"repository": {
|
|
35
|
+
"type": "git",
|
|
36
|
+
"url": "https://github.com/flekschas/mcp-web",
|
|
37
|
+
"directory": "packages/types"
|
|
38
|
+
},
|
|
34
39
|
"scripts": {
|
|
35
40
|
"build": "tsc",
|
|
36
41
|
"dev": "tsc --watch"
|