Skip to content

Commit 466df4b

Browse files
Copilothotlong
andcommitted
fix: ensure category directories exist before writing index.mdx and run gen:schema before gen:docs
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
1 parent 9f87caf commit 466df4b

19 files changed

Lines changed: 1167 additions & 1 deletion

apps/docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"license": "Apache-2.0",
77
"scripts": {
88
"dev": "next dev",
9-
"build": "pnpm --filter @objectstack/spec gen:docs && next build",
9+
"build": "pnpm --filter @objectstack/spec gen:schema && pnpm --filter @objectstack/spec gen:docs && next build",
1010
"site:start": "next start",
1111
"site:lint": "next lint"
1212
},

content/docs/references/ai/mcp.mdx

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
---
2+
title: Mcp
3+
description: Mcp protocol schemas
4+
---
5+
6+
Model Context Protocol (MCP)
7+
8+
Defines the protocol for connecting AI assistants to external tools, data sources,
9+
10+
and resources. MCP enables AI models to access contextual information, invoke
11+
12+
functions, and interact with external systems in a standardized way.
13+
14+
Architecture Alignment:
15+
16+
- Anthropic Model Context Protocol (MCP)
17+
18+
- OpenAI Function Calling / Tools
19+
20+
- LangChain Tool Interface
21+
22+
- Microsoft Semantic Kernel Plugins
23+
24+
Use Cases:
25+
26+
- Connect AI agents to ObjectStack data (Objects, Views, Reports)
27+
28+
- Expose business logic as callable tools (Workflows, Flows, Actions)
29+
30+
- Provide dynamic context to AI models (User profile, Recent activity)
31+
32+
- Enable AI to read and modify data through standardized interfaces
33+
34+
<Callout type="info">
35+
**Source:** `packages/spec/src/ai/mcp.zod.ts`
36+
</Callout>
37+
38+
## TypeScript Usage
39+
40+
```typescript
41+
import { MCPCapability, MCPClientConfig, MCPPrompt, MCPPromptArgument, MCPPromptMessage, MCPPromptRequest, MCPPromptResponse, MCPResource, MCPResourceRequest, MCPResourceResponse, MCPResourceTemplate, MCPResourceType, MCPServerConfig, MCPServerInfo, MCPTool, MCPToolCallRequest, MCPToolCallResponse, MCPToolParameter, MCPTransportConfig, MCPTransportType } from '@objectstack/spec/ai';
42+
import type { MCPCapability, MCPClientConfig, MCPPrompt, MCPPromptArgument, MCPPromptMessage, MCPPromptRequest, MCPPromptResponse, MCPResource, MCPResourceRequest, MCPResourceResponse, MCPResourceTemplate, MCPResourceType, MCPServerConfig, MCPServerInfo, MCPTool, MCPToolCallRequest, MCPToolCallResponse, MCPToolParameter, MCPTransportConfig, MCPTransportType } from '@objectstack/spec/ai';
43+
44+
// Validate data
45+
const result = MCPCapability.parse(data);
46+
```
47+
48+
---
49+
50+
## MCPCapability
51+
52+
53+
---
54+
55+
## MCPClientConfig
56+
57+
58+
---
59+
60+
## MCPPrompt
61+
62+
63+
---
64+
65+
## MCPPromptArgument
66+
67+
68+
---
69+
70+
## MCPPromptMessage
71+
72+
73+
---
74+
75+
## MCPPromptRequest
76+
77+
78+
---
79+
80+
## MCPPromptResponse
81+
82+
83+
---
84+
85+
## MCPResource
86+
87+
88+
---
89+
90+
## MCPResourceRequest
91+
92+
93+
---
94+
95+
## MCPResourceResponse
96+
97+
98+
---
99+
100+
## MCPResourceTemplate
101+
102+
103+
---
104+
105+
## MCPResourceType
106+
107+
108+
---
109+
110+
## MCPServerConfig
111+
112+
113+
---
114+
115+
## MCPServerInfo
116+
117+
118+
---
119+
120+
## MCPTool
121+
122+
123+
---
124+
125+
## MCPToolCallRequest
126+
127+
128+
---
129+
130+
## MCPToolCallResponse
131+
132+
133+
---
134+
135+
## MCPToolParameter
136+
137+
138+
---
139+
140+
## MCPTransportConfig
141+
142+
143+
---
144+
145+
## MCPTransportType
146+
147+
148+
---
149+
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
title: Dispatcher
3+
description: Dispatcher protocol schemas
4+
---
5+
6+
# HttpDispatcher Protocol
7+
8+
Defines how the ObjectStack HttpDispatcher routes incoming API requests
9+
10+
to the correct kernel service based on URL prefix matching.
11+
12+
The dispatcher is the central routing component that:
13+
14+
1. Matches incoming request URLs against registered route prefixes
15+
16+
2. Delegates to the corresponding CoreService implementation
17+
18+
3. Returns 503 Service Unavailable when a service is not registered
19+
20+
4. Supports dynamic route registration from plugins via contributes.routes
21+
22+
Architecture alignment:
23+
24+
- Kubernetes: API server aggregation layer
25+
26+
- Eclipse: Extension registry routing
27+
28+
- VS Code: Command palette routing
29+
30+
<Callout type="info">
31+
**Source:** `packages/spec/src/api/dispatcher.zod.ts`
32+
</Callout>
33+
34+
## TypeScript Usage
35+
36+
```typescript
37+
import { DispatcherConfig, DispatcherRoute } from '@objectstack/spec/api';
38+
import type { DispatcherConfig, DispatcherRoute } from '@objectstack/spec/api';
39+
40+
// Validate data
41+
const result = DispatcherConfig.parse(data);
42+
```
43+
44+
---
45+
46+
## DispatcherConfig
47+
48+
49+
---
50+
51+
## DispatcherRoute
52+
53+
54+
---
55+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
title: Object
3+
description: Object protocol schemas
4+
---
5+
6+
<Callout type="info">
7+
**Source:** `packages/spec/src/api/object.zod.ts`
8+
</Callout>
9+
10+
## TypeScript Usage
11+
12+
```typescript
13+
import { VersioningConfig } from '@objectstack/spec/api';
14+
import type { VersioningConfig } from '@objectstack/spec/api';
15+
16+
// Validate data
17+
const result = VersioningConfig.parse(data);
18+
```
19+
20+
---
21+
22+
## VersioningConfig
23+
24+
25+
---
26+

0 commit comments

Comments
 (0)