Skip to content

Commit 9013ba1

Browse files
committed
feat: add comprehensive view and widget schemas for ObjectStack UI
- Introduced `view.zod.ts` containing detailed schemas for view configurations, including data sources, filters, columns, pagination, and user actions. - Added `widget.zod.ts` defining schemas for custom widget lifecycle hooks, events, properties, and manifest, enhancing widget integration and configuration capabilities.
1 parent c327428 commit 9013ba1

File tree

100 files changed

+90
-1051
lines changed

Some content is hidden

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

100 files changed

+90
-1051
lines changed

.github/copilot-instructions.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@ objectstack-ai/spec/
8888
│ └── plugin-bi/ # Plugin example: BI dashboard
8989
9090
├── skills/ # 🤖 AI skill definitions (for Copilot/Cursor)
91-
│ ├── schema-design/
92-
│ ├── api-design/
93-
│ ├── ui-design/
94-
│ ├── automation-design/
95-
│ └── ai-agent-design/
91+
│ ├── objectstack-data/
92+
│ ├── objectstack-api/
93+
│ ├── objectstack-ui/
94+
│ ├── objectstack-automation/
95+
│ └── objectstack-ai/
9696
9797
└── content/docs/ # 📝 Documentation content
9898
├── getting-started/
@@ -225,11 +225,11 @@ The `skills/` directory contains domain-specific AI skill definitions. When work
225225

226226
| Skill | Path | Use When |
227227
|:---|:---|:---|
228-
| Schema Design | `skills/schema-design/SKILL.md` | Designing Objects, Fields, Relations |
229-
| API Design | `skills/api-design/SKILL.md` | Designing REST/GraphQL endpoints |
230-
| UI Design | `skills/ui-design/SKILL.md` | Designing Views, Dashboards, Apps |
231-
| Automation Design | `skills/automation-design/SKILL.md` | Designing Flows, Workflows, Triggers |
232-
| AI Agent Design | `skills/ai-agent-design/SKILL.md` | Designing Agents, Tools, RAG pipelines |
228+
| Data Design | `skills/objectstack-data/SKILL.md` | Designing Objects, Fields, Relations |
229+
| API Design | `skills/objectstack-api/SKILL.md` | Designing REST/GraphQL endpoints |
230+
| UI Design | `skills/objectstack-ui/SKILL.md` | Designing Views, Dashboards, Apps |
231+
| Automation Design | `skills/objectstack-automation/SKILL.md` | Designing Flows, Workflows, Triggers |
232+
| AI Agent Design | `skills/objectstack-ai/SKILL.md` | Designing Agents, Tools, RAG pipelines |
233233

234234
---
235235

packages/spec/scripts/build-skill-references.ts

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const SKILLS_DIR = path.resolve(REPO_ROOT, 'skills');
3030
// Paths are relative to packages/spec/src/ (category/file.zod.ts)
3131

3232
const SKILL_MAP: Record<string, string[]> = {
33-
'objectstack-schema': [
33+
'objectstack-data': [
3434
'data/field.zod.ts',
3535
'data/object.zod.ts',
3636
'data/validation.zod.ts',
@@ -236,25 +236,37 @@ function main() {
236236
const allFiles = resolveAll(coreFiles);
237237
console.log(` ${coreFiles.length} core + ${allFiles.length - coreFiles.length} deps = ${allFiles.length} files`);
238238

239-
// Target directory
240-
const zodDir = path.resolve(skillDir, 'references/zod');
239+
// Target directory — directly under references/ (no zod/ subdirectory)
240+
const refsDir = path.resolve(skillDir, 'references');
241241

242-
// Clean previous output
243-
if (fs.existsSync(zodDir)) {
244-
fs.rmSync(zodDir, { recursive: true });
242+
// Clean previous generated files (preserve directory, remove .zod.ts and _index.md)
243+
if (fs.existsSync(refsDir)) {
244+
// Remove old zod/ subdirectory if it exists (migration from previous structure)
245+
const oldZodDir = path.resolve(refsDir, 'zod');
246+
if (fs.existsSync(oldZodDir)) {
247+
fs.rmSync(oldZodDir, { recursive: true });
248+
}
249+
// Remove generated category directories and _index.md
250+
for (const entry of fs.readdirSync(refsDir)) {
251+
const entryPath = path.resolve(refsDir, entry);
252+
const stat = fs.statSync(entryPath);
253+
if (stat.isDirectory() || entry === '_index.md') {
254+
fs.rmSync(entryPath, { recursive: true });
255+
}
256+
}
245257
}
246258

247259
// Copy files preserving directory structure
248260
for (const rel of allFiles) {
249261
const src = path.resolve(SPEC_SRC, rel);
250-
const dest = path.resolve(zodDir, rel);
262+
const dest = path.resolve(refsDir, rel);
251263
fs.mkdirSync(path.dirname(dest), { recursive: true });
252264
fs.copyFileSync(src, dest);
253265
}
254266

255267
// Generate _index.md
256268
const indexContent = generateIndex(skillName, coreFiles, allFiles);
257-
fs.writeFileSync(path.resolve(zodDir, '_index.md'), indexContent);
269+
fs.writeFileSync(path.resolve(refsDir, '_index.md'), indexContent);
258270

259271
totalFiles += allFiles.length;
260272
}

skills/objectstack-ai/SKILL.md

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -343,20 +343,13 @@ structuredOutput: {
343343

344344
## References
345345

346-
### Zod Source Schemas (auto-copied)
347-
348-
- [agent.zod.ts](./references/zod/ai/agent.zod.ts) — AgentSchema, model config, guardrails
349-
- [tool.zod.ts](./references/zod/ai/tool.zod.ts) — ToolSchema, categories, parameters
350-
- [skill.zod.ts](./references/zod/ai/skill.zod.ts) — SkillSchema, trigger conditions
351-
- [rag-pipeline.zod.ts](./references/zod/ai/rag-pipeline.zod.ts) — RAG, chunking, retrieval, embeddings
352-
- [model-registry.zod.ts](./references/zod/ai/model-registry.zod.ts) — LLM providers, model versioning
353-
- [conversation.zod.ts](./references/zod/ai/conversation.zod.ts) — Chat context, message history, turns
354-
- [mcp.zod.ts](./references/zod/ai/mcp.zod.ts) — MCP protocol, tool/resource/prompt schemas
355-
- [orchestration.zod.ts](./references/zod/ai/orchestration.zod.ts) — Multi-agent orchestration patterns
356-
- [nlq.zod.ts](./references/zod/ai/nlq.zod.ts) — Natural language query schemas
357-
- [Schema index](./references/zod/_index.md) — All bundled schemas with dependency tree
358-
359-
### Quick Reference
360-
361-
- [Agent & Skill Reference](./references/agent-skill-reference.md) — Compact property tables
362-
- [RAG Pipeline Reference](./references/rag-pipeline-reference.md) — Vector stores, strategies
346+
- [agent.zod.ts](./references/ai/agent.zod.ts) — AgentSchema, model config, guardrails
347+
- [tool.zod.ts](./references/ai/tool.zod.ts) — ToolSchema, categories, parameters
348+
- [skill.zod.ts](./references/ai/skill.zod.ts) — SkillSchema, trigger conditions
349+
- [rag-pipeline.zod.ts](./references/ai/rag-pipeline.zod.ts) — RAG, chunking, retrieval, embeddings
350+
- [model-registry.zod.ts](./references/ai/model-registry.zod.ts) — LLM providers, model versioning
351+
- [conversation.zod.ts](./references/ai/conversation.zod.ts) — Chat context, message history, turns
352+
- [mcp.zod.ts](./references/ai/mcp.zod.ts) — MCP protocol, tool/resource/prompt schemas
353+
- [orchestration.zod.ts](./references/ai/orchestration.zod.ts) — Multi-agent orchestration patterns
354+
- [nlq.zod.ts](./references/ai/nlq.zod.ts) — Natural language query schemas
355+
- [Schema index](./references/_index.md) — All bundled schemas with dependency tree
File renamed without changes.

skills/objectstack-ai/references/agent-skill-reference.md

Lines changed: 0 additions & 111 deletions
This file was deleted.
File renamed without changes.

skills/objectstack-ai/references/zod/ai/conversation.zod.ts renamed to skills/objectstack-ai/references/ai/conversation.zod.ts

File renamed without changes.
File renamed without changes.
File renamed without changes.

skills/objectstack-ai/references/zod/ai/model-registry.zod.ts renamed to skills/objectstack-ai/references/ai/model-registry.zod.ts

File renamed without changes.

0 commit comments

Comments
 (0)