Skip to content

Commit 9bc8cd1

Browse files
authored
Merge pull request #325 from objectstack-ai/copilot/improve-zod-protocol-display
2 parents 7ad7112 + 0a1ad4b commit 9bc8cd1

File tree

583 files changed

+8984
-6920
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

583 files changed

+8984
-6920
lines changed

apps/docs/app/[lang]/docs/[[...slug]]/page.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { notFound } from 'next/navigation';
55
import defaultMdxComponents from 'fumadocs-ui/mdx';
66
import { Step, Steps } from 'fumadocs-ui/components/steps';
77
import { File, Folder, Files } from 'fumadocs-ui/components/files';
8+
import { Tab, Tabs } from 'fumadocs-ui/components/tabs';
89

910
const components = {
1011
...defaultMdxComponents,
@@ -14,6 +15,8 @@ const components = {
1415
Folder,
1516
Files,
1617
FileTree: Files,
18+
Tab,
19+
Tabs,
1720
};
1821

1922
export default async function Page(props: {

apps/docs/next.config.mjs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,16 @@ const config = {
1818
},
1919
],
2020
},
21-
experimental: {
22-
turbo: {
23-
resolveAlias: {
24-
'fumadocs-ui/components/callout': 'fumadocs-ui/dist/components/callout.js',
25-
},
26-
},
27-
},
2821
webpack: (config, { isServer }) => {
2922
// Resolve the fumadocs virtual collection import to the local .source directory
3023
config.resolve = config.resolve || {};
3124
config.resolve.alias = {
3225
...(config.resolve.alias || {}),
3326
'fumadocs-mdx:collections': path.resolve(__dirname, '.source'),
34-
'fumadocs-ui/components/callout$': path.resolve(__dirname, '../../node_modules/fumadocs-ui/dist/components/callout.js'),
27+
'fumadocs-ui/components/callout$': path.resolve(__dirname, './node_modules/fumadocs-ui/dist/components/callout.js'),
28+
'fumadocs-ui/components/card$': path.resolve(__dirname, './node_modules/fumadocs-ui/dist/components/card.js'),
29+
'fumadocs-ui/components/tabs$': path.resolve(__dirname, './node_modules/fumadocs-ui/dist/components/tabs.js'),
30+
'lucide-react$': path.resolve(__dirname, './node_modules/lucide-react/dist/cjs/lucide-react.js'),
3531
};
3632
return config;
3733
},

apps/docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"description": "ObjectStack Protocol Documentation Site",
66
"scripts": {
77
"dev": "next dev",
8-
"build": "NEXT_PRIVATE_BUILD_WORKER=1 next build",
8+
"build": "next build",
99
"site:start": "next start",
1010
"site:lint": "next lint"
1111
},
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
title: Agent
3+
description: Agent protocol schemas
4+
---
5+
6+
# Agent
7+
8+
<Callout type="info">
9+
**Source:** `packages/spec/src/ai/agent.zod.ts`
10+
</Callout>
11+
12+
## TypeScript Usage
13+
14+
```typescript
15+
import { AIKnowledgeSchema, AIModelConfigSchema, AIToolSchema, AgentSchema } from '@objectstack/spec/ai';
16+
import type { AIKnowledge, AIModelConfig, AITool, Agent } from '@objectstack/spec/ai';
17+
18+
// Validate data
19+
const result = AIKnowledgeSchema.parse(data);
20+
```
21+
22+
---
23+
24+
## AIKnowledge
25+
26+
### Properties
27+
28+
| Property | Type | Required | Description |
29+
| :--- | :--- | :--- | :--- |
30+
| **topics** | `string[]` || Topics/Tags to recruit knowledge from |
31+
| **indexes** | `string[]` || Vector Store Indexes |
32+
33+
---
34+
35+
## AIModelConfig
36+
37+
### Properties
38+
39+
| Property | Type | Required | Description |
40+
| :--- | :--- | :--- | :--- |
41+
| **provider** | `Enum<'openai' \| 'azure_openai' \| 'anthropic' \| 'local'>` | optional | |
42+
| **model** | `string` || Model name (e.g. gpt-4, claude-3-opus) |
43+
| **temperature** | `number` | optional | |
44+
| **maxTokens** | `number` | optional | |
45+
| **topP** | `number` | optional | |
46+
47+
---
48+
49+
## AITool
50+
51+
### Properties
52+
53+
| Property | Type | Required | Description |
54+
| :--- | :--- | :--- | :--- |
55+
| **type** | `Enum<'action' \| 'flow' \| 'query' \| 'vector_search'>` || |
56+
| **name** | `string` || Reference name (Action Name, Flow Name) |
57+
| **description** | `string` | optional | Override description for the LLM |
58+
59+
---
60+
61+
## Agent
62+
63+
### Properties
64+
65+
| Property | Type | Required | Description |
66+
| :--- | :--- | :--- | :--- |
67+
| **name** | `string` || Agent unique identifier |
68+
| **label** | `string` || Agent display name |
69+
| **avatar** | `string` | optional | |
70+
| **role** | `string` || The persona/role (e.g. "Senior Support Engineer") |
71+
| **instructions** | `string` || System Prompt / Prime Directives |
72+
| **model** | `object` | optional | |
73+
| **tools** | `object[]` | optional | Available tools |
74+
| **knowledge** | `object` | optional | RAG access |
75+
| **active** | `boolean` | optional | |
76+
| **access** | `string[]` | optional | Who can chat with this agent |
77+

content/docs/references/ai/agent/AIKnowledge.mdx

Lines changed: 0 additions & 11 deletions
This file was deleted.

content/docs/references/ai/agent/AIModelConfig.mdx

Lines changed: 0 additions & 14 deletions
This file was deleted.

content/docs/references/ai/agent/AITool.mdx

Lines changed: 0 additions & 12 deletions
This file was deleted.

content/docs/references/ai/agent/Agent.mdx

Lines changed: 0 additions & 19 deletions
This file was deleted.

content/docs/references/ai/agent/meta.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)