Skip to content

Commit 27d40a4

Browse files
authored
Merge pull request #1026 from objectstack-ai/copilot/fix-ci-build-test-errors-again
2 parents 643cc78 + a6bed27 commit 27d40a4

9 files changed

Lines changed: 149 additions & 8 deletions

File tree

content/docs/references/ai/agent.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,12 @@ const result = AIKnowledge.parse(data);
7676
| **instructions** | `string` || System Prompt / Prime Directives |
7777
| **model** | `Object` | optional | |
7878
| **lifecycle** | `Object` | optional | State machine defining the agent conversation follow and constraints |
79-
| **tools** | `Object[]` | optional | Available tools |
79+
| **skills** | `string[]` | optional | Skill names to attach (Agent→Skill→Tool architecture) |
80+
| **tools** | `Object[]` | optional | Direct tool references (legacy fallback) |
8081
| **knowledge** | `Object` | optional | RAG access |
8182
| **active** | `boolean` || |
8283
| **access** | `string[]` | optional | Who can chat with this agent |
84+
| **permissions** | `string[]` | optional | Required permissions or roles |
8385
| **tenantId** | `string` | optional | Tenant/Organization ID |
8486
| **visibility** | `Enum<'global' \| 'organization' \| 'private'>` || |
8587
| **planning** | `Object` | optional | Autonomous reasoning and planning configuration |

content/docs/references/ai/devops-agent.mdx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,12 @@ Code generation target
193193
| **instructions** | `string` || System Prompt / Prime Directives |
194194
| **model** | `Object` | optional | |
195195
| **lifecycle** | `Object` | optional | State machine defining the agent conversation follow and constraints |
196-
| **tools** | `Object[]` | optional | Available tools |
196+
| **skills** | `string[]` | optional | Skill names to attach (Agent→Skill→Tool architecture) |
197+
| **tools** | `Object[]` | optional | Direct tool references (legacy fallback) |
197198
| **knowledge** | `Object` | optional | RAG access |
198199
| **active** | `boolean` || |
199200
| **access** | `string[]` | optional | Who can chat with this agent |
201+
| **permissions** | `string[]` | optional | Required permissions or roles |
200202
| **tenantId** | `string` | optional | Tenant/Organization ID |
201203
| **visibility** | `Enum<'global' \| 'organization' \| 'private'>` || |
202204
| **planning** | `Object` | optional | Autonomous reasoning and planning configuration |

content/docs/references/ai/index.mdx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,6 @@ This section contains all protocol schemas for the ai layer of ObjectStack.
2020
<Card href="/docs/references/ai/predictive" title="Predictive" description="Source: packages/spec/src/ai/predictive.zod.ts" />
2121
<Card href="/docs/references/ai/rag-pipeline" title="Rag Pipeline" description="Source: packages/spec/src/ai/rag-pipeline.zod.ts" />
2222
<Card href="/docs/references/ai/runtime-ops" title="Runtime Ops" description="Source: packages/spec/src/ai/runtime-ops.zod.ts" />
23+
<Card href="/docs/references/ai/skill" title="Skill" description="Source: packages/spec/src/ai/skill.zod.ts" />
24+
<Card href="/docs/references/ai/tool" title="Tool" description="Source: packages/spec/src/ai/tool.zod.ts" />
2325
</Cards>

content/docs/references/ai/meta.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
"plugin-development",
1616
"predictive",
1717
"rag-pipeline",
18-
"runtime-ops"
18+
"runtime-ops",
19+
"skill",
20+
"tool"
1921
]
2022
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
---
2+
title: Skill
3+
description: Skill protocol schemas
4+
---
5+
6+
{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs go in content/docs/guides/. */}
7+
8+
Skill Trigger Condition Schema
9+
10+
Defines programmatic conditions under which a skill becomes active.
11+
12+
Allows context-aware activation based on object type, user role, etc.
13+
14+
<Callout type="info">
15+
**Source:** `packages/spec/src/ai/skill.zod.ts`
16+
</Callout>
17+
18+
## TypeScript Usage
19+
20+
```typescript
21+
import { Skill, SkillTriggerCondition } from '@objectstack/spec/ai';
22+
import type { Skill, SkillTriggerCondition } from '@objectstack/spec/ai';
23+
24+
// Validate data
25+
const result = Skill.parse(data);
26+
```
27+
28+
---
29+
30+
## Skill
31+
32+
### Properties
33+
34+
| Property | Type | Required | Description |
35+
| :--- | :--- | :--- | :--- |
36+
| **name** | `string` || Skill unique identifier (snake_case) |
37+
| **label** | `string` || Skill display name |
38+
| **description** | `string` | optional | Skill description |
39+
| **instructions** | `string` | optional | LLM instructions when skill is active |
40+
| **tools** | `string[]` || Tool names belonging to this skill |
41+
| **triggerPhrases** | `string[]` | optional | Phrases that activate this skill |
42+
| **triggerConditions** | `Object[]` | optional | Programmatic activation conditions |
43+
| **permissions** | `string[]` | optional | Required permissions or roles |
44+
| **active** | `boolean` || Whether the skill is enabled |
45+
46+
47+
---
48+
49+
## SkillTriggerCondition
50+
51+
### Properties
52+
53+
| Property | Type | Required | Description |
54+
| :--- | :--- | :--- | :--- |
55+
| **field** | `string` || Context field to evaluate |
56+
| **operator** | `Enum<'eq' \| 'neq' \| 'in' \| 'not_in' \| 'contains'>` || Comparison operator |
57+
| **value** | `string \| string[]` || Expected value or values |
58+
59+
60+
---
61+
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
title: Tool
3+
description: Tool protocol schemas
4+
---
5+
6+
{/* ⚠️ AUTO-GENERATED — DO NOT EDIT. Run build-docs.ts to regenerate. Hand-written docs go in content/docs/guides/. */}
7+
8+
Tool Category
9+
10+
Classifies the tool by its operational domain.
11+
12+
<Callout type="info">
13+
**Source:** `packages/spec/src/ai/tool.zod.ts`
14+
</Callout>
15+
16+
## TypeScript Usage
17+
18+
```typescript
19+
import { Tool, ToolCategory } from '@objectstack/spec/ai';
20+
import type { Tool, ToolCategory } from '@objectstack/spec/ai';
21+
22+
// Validate data
23+
const result = Tool.parse(data);
24+
```
25+
26+
---
27+
28+
## Tool
29+
30+
### Properties
31+
32+
| Property | Type | Required | Description |
33+
| :--- | :--- | :--- | :--- |
34+
| **name** | `string` || Tool unique identifier (snake_case) |
35+
| **label** | `string` || Tool display name |
36+
| **description** | `string` || Tool description for LLM function calling |
37+
| **category** | `Enum<'data' \| 'action' \| 'flow' \| 'integration' \| 'vector_search' \| 'analytics' \| 'utility'>` | optional | Tool category for grouping and filtering |
38+
| **parameters** | `Record<string, any>` || JSON Schema for tool parameters |
39+
| **outputSchema** | `Record<string, any>` | optional | JSON Schema for tool output |
40+
| **objectName** | `string` | optional | Target object name (snake_case) |
41+
| **requiresConfirmation** | `boolean` || Require user confirmation before execution |
42+
| **permissions** | `string[]` | optional | Required permissions or roles |
43+
| **active** | `boolean` || Whether the tool is enabled |
44+
| **builtIn** | `boolean` || Platform built-in tool flag |
45+
46+
47+
---
48+
49+
## ToolCategory
50+
51+
Tool operational category
52+
53+
### Allowed Values
54+
55+
* `data`
56+
* `action`
57+
* `flow`
58+
* `integration`
59+
* `vector_search`
60+
* `analytics`
61+
* `utility`
62+
63+
64+
---
65+

content/docs/references/api/metadata.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ Metadata query with filtering, sorting, and pagination
328328

329329
| Property | Type | Required | Description |
330330
| :--- | :--- | :--- | :--- |
331-
| **types** | `Enum<'object' \| 'field' \| 'trigger' \| 'validation' \| 'hook' \| 'view' \| 'page' \| 'dashboard' \| 'app' \| 'action' \| 'report' \| 'flow' \| 'workflow' \| 'approval' \| 'datasource' \| 'translation' \| 'router' \| 'function' \| 'service' \| 'permission' \| 'profile' \| 'role' \| 'agent'>[]` | optional | Filter by metadata types |
331+
| **types** | `Enum<'object' \| 'field' \| 'trigger' \| 'validation' \| 'hook' \| 'view' \| 'page' \| 'dashboard' \| 'app' \| 'action' \| 'report' \| 'flow' \| 'workflow' \| 'approval' \| 'datasource' \| 'translation' \| 'router' \| 'function' \| 'service' \| 'permission' \| 'profile' \| 'role' \| 'agent' \| 'tool' \| 'skill'>[]` | optional | Filter by metadata types |
332332
| **namespaces** | `string[]` | optional | Filter by namespaces |
333333
| **packageId** | `string` | optional | Filter by owning package |
334334
| **search** | `string` | optional | Full-text search query |
@@ -363,7 +363,7 @@ Metadata query with filtering, sorting, and pagination
363363

364364
| Property | Type | Required | Description |
365365
| :--- | :--- | :--- | :--- |
366-
| **type** | `Enum<'object' \| 'field' \| 'trigger' \| 'validation' \| 'hook' \| 'view' \| 'page' \| 'dashboard' \| 'app' \| 'action' \| 'report' \| 'flow' \| 'workflow' \| 'approval' \| 'datasource' \| 'translation' \| 'router' \| 'function' \| 'service' \| 'permission' \| 'profile' \| 'role' \| 'agent'>` || Metadata type |
366+
| **type** | `Enum<'object' \| 'field' \| 'trigger' \| 'validation' \| 'hook' \| 'view' \| 'page' \| 'dashboard' \| 'app' \| 'action' \| 'report' \| 'flow' \| 'workflow' \| 'approval' \| 'datasource' \| 'translation' \| 'router' \| 'function' \| 'service' \| 'permission' \| 'profile' \| 'role' \| 'agent' \| 'tool' \| 'skill'>` || Metadata type |
367367
| **name** | `string` || Item name (snake_case) |
368368
| **data** | `Record<string, any>` || Metadata payload |
369369
| **namespace** | `string` | optional | Optional namespace |

content/docs/references/kernel/metadata-plugin.mdx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ const result = MetadataBulkRegisterRequest.parse(data);
130130
| Property | Type | Required | Description |
131131
| :--- | :--- | :--- | :--- |
132132
| **event** | `Enum<'metadata.registered' \| 'metadata.updated' \| 'metadata.unregistered' \| 'metadata.validated' \| 'metadata.deployed' \| 'metadata.overlay.applied' \| 'metadata.overlay.removed' \| 'metadata.imported' \| 'metadata.exported'>` || Event type |
133-
| **metadataType** | `Enum<'object' \| 'field' \| 'trigger' \| 'validation' \| 'hook' \| 'view' \| 'page' \| 'dashboard' \| 'app' \| 'action' \| 'report' \| 'flow' \| 'workflow' \| 'approval' \| 'datasource' \| 'translation' \| 'router' \| 'function' \| 'service' \| 'permission' \| 'profile' \| 'role' \| 'agent'>` || Metadata type |
133+
| **metadataType** | `Enum<'object' \| 'field' \| 'trigger' \| 'validation' \| 'hook' \| 'view' \| 'page' \| 'dashboard' \| 'app' \| 'action' \| 'report' \| 'flow' \| 'workflow' \| 'approval' \| 'datasource' \| 'translation' \| 'router' \| 'function' \| 'service' \| 'permission' \| 'profile' \| 'role' \| 'agent' \| 'tool' \| 'skill'>` || Metadata type |
134134
| **name** | `string` || Metadata item name |
135135
| **namespace** | `string` | optional | Namespace |
136136
| **packageId** | `string` | optional | Owning package ID |
@@ -182,7 +182,7 @@ const result = MetadataBulkRegisterRequest.parse(data);
182182

183183
| Property | Type | Required | Description |
184184
| :--- | :--- | :--- | :--- |
185-
| **types** | `Enum<'object' \| 'field' \| 'trigger' \| 'validation' \| 'hook' \| 'view' \| 'page' \| 'dashboard' \| 'app' \| 'action' \| 'report' \| 'flow' \| 'workflow' \| 'approval' \| 'datasource' \| 'translation' \| 'router' \| 'function' \| 'service' \| 'permission' \| 'profile' \| 'role' \| 'agent'>[]` | optional | Filter by metadata types |
185+
| **types** | `Enum<'object' \| 'field' \| 'trigger' \| 'validation' \| 'hook' \| 'view' \| 'page' \| 'dashboard' \| 'app' \| 'action' \| 'report' \| 'flow' \| 'workflow' \| 'approval' \| 'datasource' \| 'translation' \| 'router' \| 'function' \| 'service' \| 'permission' \| 'profile' \| 'role' \| 'agent' \| 'tool' \| 'skill'>[]` | optional | Filter by metadata types |
186186
| **namespaces** | `string[]` | optional | Filter by namespaces |
187187
| **packageId** | `string` | optional | Filter by owning package |
188188
| **search** | `string` | optional | Full-text search query |
@@ -238,6 +238,8 @@ const result = MetadataBulkRegisterRequest.parse(data);
238238
* `profile`
239239
* `role`
240240
* `agent`
241+
* `tool`
242+
* `skill`
241243

242244

243245
---
@@ -248,7 +250,7 @@ const result = MetadataBulkRegisterRequest.parse(data);
248250

249251
| Property | Type | Required | Description |
250252
| :--- | :--- | :--- | :--- |
251-
| **type** | `Enum<'object' \| 'field' \| 'trigger' \| 'validation' \| 'hook' \| 'view' \| 'page' \| 'dashboard' \| 'app' \| 'action' \| 'report' \| 'flow' \| 'workflow' \| 'approval' \| 'datasource' \| 'translation' \| 'router' \| 'function' \| 'service' \| 'permission' \| 'profile' \| 'role' \| 'agent'>` || Metadata type identifier |
253+
| **type** | `Enum<'object' \| 'field' \| 'trigger' \| 'validation' \| 'hook' \| 'view' \| 'page' \| 'dashboard' \| 'app' \| 'action' \| 'report' \| 'flow' \| 'workflow' \| 'approval' \| 'datasource' \| 'translation' \| 'router' \| 'function' \| 'service' \| 'permission' \| 'profile' \| 'role' \| 'agent' \| 'tool' \| 'skill'>` || Metadata type identifier |
252254
| **label** | `string` || Display label for the metadata type |
253255
| **description** | `string` | optional | Description of the metadata type |
254256
| **filePatterns** | `string[]` || Glob patterns to discover files of this type |

packages/spec/src/data/field.zod.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,11 @@ export const Field = {
641641
...config
642642
} as const),
643643

644+
json: (config: FieldInput = {}) => ({
645+
type: 'json',
646+
...config
647+
} as const),
648+
644649
vector: (dimensions: number, config: FieldInput = {}) => ({
645650
type: 'vector',
646651
vectorConfig: {

0 commit comments

Comments
 (0)