-
Notifications
You must be signed in to change notification settings - Fork 2
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
Merged
Merged
Changes from 9 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
232e5ec
Initial plan
Copilot 4df7dcd
Enhanced protocol documentation with TypeScript examples and overview…
Copilot 1143194
Add protocol reference overview, quick reference guide, and architect…
Copilot 504c409
Fix lucide-react import issues in generated documentation
Copilot b10af91
Fix code review issues: improve comma logic, null safety, and file paths
Copilot 14dbb89
Initial plan
Copilot 7cfd544
Add Tab and Tabs to available MDX components
Copilot d70e011
Remove fumadocs-ui component imports from MDX files
Copilot 7a5ffc2
Merge pull request #327 from objectstack-ai/copilot/fix-module-not-fo…
hotlong c249b31
Restructure docs to zod file level - one MDX file per .zod.ts file
Copilot 9daa8e3
Remove fumadocs-ui component imports from generated MDX files
Copilot 0a1ad4b
Merge branch 'main' into copilot/improve-zod-protocol-display
hotlong File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,35 @@ | ||
| --- | ||
| title: AIKnowledge | ||
| description: AIKnowledge Schema Reference | ||
| category: ai | ||
| zodFile: agent | ||
| --- | ||
|
|
||
|
|
||
| <Callout type="info"> | ||
| **Source:** `packages/spec/src/ai/agent.zod.ts` | ||
| </Callout> | ||
|
|
||
| ## Properties | ||
|
|
||
| | Property | Type | Required | Description | | ||
| | :--- | :--- | :--- | :--- | | ||
| | **topics** | `string[]` | ✅ | Topics/Tags to recruit knowledge from | | ||
| | **indexes** | `string[]` | ✅ | Vector Store Indexes | | ||
|
|
||
| ## TypeScript Usage | ||
|
|
||
| ```typescript | ||
| import { AIKnowledgeSchema } from '@objectstack/spec/ai'; | ||
| import type { AIKnowledge } from '@objectstack/spec/ai'; | ||
|
|
||
| // Validate data | ||
| const result = AIKnowledgeSchema.parse(data); | ||
|
|
||
| // Type-safe usage | ||
| const myAIKnowledge: AIKnowledge = { | ||
| topics: [], | ||
| indexes: [] | ||
| }; | ||
| ``` | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,36 @@ | ||
| --- | ||
| title: AITool | ||
| description: AITool Schema Reference | ||
| category: ai | ||
| zodFile: agent | ||
| --- | ||
|
|
||
|
|
||
| <Callout type="info"> | ||
| **Source:** `packages/spec/src/ai/agent.zod.ts` | ||
| </Callout> | ||
|
|
||
| ## 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 | | ||
|
|
||
| ## TypeScript Usage | ||
|
|
||
| ```typescript | ||
| import { AIToolSchema } from '@objectstack/spec/ai'; | ||
| import type { AITool } from '@objectstack/spec/ai'; | ||
|
|
||
| // Validate data | ||
| const result = AIToolSchema.parse(data); | ||
|
|
||
| // Type-safe usage | ||
| const myAITool: AITool = { | ||
| type: 'action', | ||
| name: 'name' | ||
| }; | ||
| ``` | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.