-
Notifications
You must be signed in to change notification settings - Fork 1
Generate Zod protocol documentation at file level with consolidated schemas #325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
232e5ec
4df7dcd
1143194
504c409
b10af91
14dbb89
7cfd544
d70e011
7a5ffc2
c249b31
9daa8e3
0a1ad4b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,77 @@ | ||
| --- | ||
| title: Agent | ||
| description: Agent protocol schemas | ||
| --- | ||
|
|
||
| # Agent | ||
|
|
||
| <Callout type="info"> | ||
| **Source:** `packages/spec/src/ai/agent.zod.ts` | ||
| </Callout> | ||
|
|
||
| ## TypeScript Usage | ||
|
||
|
|
||
| ```typescript | ||
| import { AIKnowledgeSchema, AIModelConfigSchema, AIToolSchema, AgentSchema } from '@objectstack/spec/ai'; | ||
| import type { AIKnowledge, AIModelConfig, AITool, Agent } from '@objectstack/spec/ai'; | ||
|
|
||
| // Validate data | ||
| const result = AIKnowledgeSchema.parse(data); | ||
| ``` | ||
|
|
||
| --- | ||
|
|
||
| ## AIKnowledge | ||
|
|
||
| ### Properties | ||
|
|
||
| | Property | Type | Required | Description | | ||
| | :--- | :--- | :--- | :--- | | ||
| | **topics** | `string[]` | ✅ | Topics/Tags to recruit knowledge from | | ||
| | **indexes** | `string[]` | ✅ | Vector Store Indexes | | ||
|
|
||
| --- | ||
|
|
||
| ## AIModelConfig | ||
|
|
||
| ### Properties | ||
|
|
||
| | Property | Type | Required | Description | | ||
| | :--- | :--- | :--- | :--- | | ||
| | **provider** | `Enum<'openai' \| 'azure_openai' \| 'anthropic' \| 'local'>` | optional | | | ||
| | **model** | `string` | ✅ | Model name (e.g. gpt-4, claude-3-opus) | | ||
| | **temperature** | `number` | optional | | | ||
| | **maxTokens** | `number` | optional | | | ||
| | **topP** | `number` | optional | | | ||
|
|
||
| --- | ||
|
|
||
| ## AITool | ||
|
|
||
| ### Properties | ||
|
|
||
| | Property | Type | Required | Description | | ||
| | :--- | :--- | :--- | :--- | | ||
| | **type** | `Enum<'action' \| 'flow' \| 'query' \| 'vector_search'>` | ✅ | | | ||
| | **name** | `string` | ✅ | Reference name (Action Name, Flow Name) | | ||
| | **description** | `string` | optional | Override description for the LLM | | ||
|
|
||
| --- | ||
|
|
||
| ## Agent | ||
|
|
||
| ### Properties | ||
|
|
||
| | Property | Type | Required | Description | | ||
| | :--- | :--- | :--- | :--- | | ||
| | **name** | `string` | ✅ | Agent unique identifier | | ||
| | **label** | `string` | ✅ | Agent display name | | ||
| | **avatar** | `string` | optional | | | ||
| | **role** | `string` | ✅ | The persona/role (e.g. "Senior Support Engineer") | | ||
| | **instructions** | `string` | ✅ | System Prompt / Prime Directives | | ||
| | **model** | `object` | optional | | | ||
| | **tools** | `object[]` | optional | Available tools | | ||
| | **knowledge** | `object` | optional | RAG access | | ||
| | **active** | `boolean` | optional | | | ||
| | **access** | `string[]` | optional | Who can chat with this agent | | ||
|
|
||
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The aliases now point to
./node_modules/...underapps/docs, but in a typical monorepo the actual dependencies live in the workspace rootnode_modules, so these paths are likely incorrect and will cause module resolution failures at build time. To keep the aliases working, change thesepath.resolvecalls back to a root-levelnode_moduleslocation (as previously done with../../node_modules/...), or userequire.resolve('fumadocs-ui/dist/components/callout.js')/require.resolve('lucide-react')so resolution is accurate regardless of workspace layout.