Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 3 additions & 0 deletions apps/docs/app/[lang]/docs/[[...slug]]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { notFound } from 'next/navigation';
import defaultMdxComponents from 'fumadocs-ui/mdx';
import { Step, Steps } from 'fumadocs-ui/components/steps';
import { File, Folder, Files } from 'fumadocs-ui/components/files';
import { Tab, Tabs } from 'fumadocs-ui/components/tabs';

const components = {
...defaultMdxComponents,
Expand All @@ -14,6 +15,8 @@ const components = {
Folder,
Files,
FileTree: Files,
Tab,
Tabs,
};

export default async function Page(props: {
Expand Down
12 changes: 4 additions & 8 deletions apps/docs/next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,16 @@ const config = {
},
],
},
experimental: {
turbo: {
resolveAlias: {
'fumadocs-ui/components/callout': 'fumadocs-ui/dist/components/callout.js',
},
},
},
webpack: (config, { isServer }) => {
// Resolve the fumadocs virtual collection import to the local .source directory
config.resolve = config.resolve || {};
config.resolve.alias = {
...(config.resolve.alias || {}),
'fumadocs-mdx:collections': path.resolve(__dirname, '.source'),
'fumadocs-ui/components/callout$': path.resolve(__dirname, '../../node_modules/fumadocs-ui/dist/components/callout.js'),
'fumadocs-ui/components/callout$': path.resolve(__dirname, './node_modules/fumadocs-ui/dist/components/callout.js'),
'fumadocs-ui/components/card$': path.resolve(__dirname, './node_modules/fumadocs-ui/dist/components/card.js'),
'fumadocs-ui/components/tabs$': path.resolve(__dirname, './node_modules/fumadocs-ui/dist/components/tabs.js'),
'lucide-react$': path.resolve(__dirname, './node_modules/lucide-react/dist/cjs/lucide-react.js'),
};
return config;
},
Comment on lines 21 to 33
Copy link

Copilot AI Jan 27, 2026

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/... under apps/docs, but in a typical monorepo the actual dependencies live in the workspace root node_modules, so these paths are likely incorrect and will cause module resolution failures at build time. To keep the aliases working, change these path.resolve calls back to a root-level node_modules location (as previously done with ../../node_modules/...), or use require.resolve('fumadocs-ui/dist/components/callout.js') / require.resolve('lucide-react') so resolution is accurate regardless of workspace layout.

Copilot uses AI. Check for mistakes.
Expand Down
2 changes: 1 addition & 1 deletion apps/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"description": "ObjectStack Protocol Documentation Site",
"scripts": {
"dev": "next dev",
"build": "NEXT_PRIVATE_BUILD_WORKER=1 next build",
"build": "next build",
"site:start": "next start",
"site:lint": "next lint"
},
Expand Down
77 changes: 77 additions & 0 deletions content/docs/references/ai/agent.mdx
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
Copy link

Copilot AI Jan 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This page is titled “Agent” and documents several schemas, but the example under “Validate data” parses AIKnowledgeSchema instead of the primary AgentSchema, which can be confusing for readers. Consider either switching the example to const result = AgentSchema.parse(data); or adding separate short examples that show how to validate each of the documented schemas explicitly.

Copilot uses AI. Check for mistakes.

```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 |

11 changes: 0 additions & 11 deletions content/docs/references/ai/agent/AIKnowledge.mdx

This file was deleted.

14 changes: 0 additions & 14 deletions content/docs/references/ai/agent/AIModelConfig.mdx

This file was deleted.

12 changes: 0 additions & 12 deletions content/docs/references/ai/agent/AITool.mdx

This file was deleted.

19 changes: 0 additions & 19 deletions content/docs/references/ai/agent/Agent.mdx

This file was deleted.

3 changes: 0 additions & 3 deletions content/docs/references/ai/agent/meta.json

This file was deleted.

Loading
Loading