Skip to content

Commit 1ee213f

Browse files
committed
feat: Enhance ObjectStack schema with additional data layers and optional fields for reports, actions, themes, flows, and AI agents
1 parent d8708de commit 1ee213f

File tree

1 file changed

+25
-4
lines changed

1 file changed

+25
-4
lines changed

packages/spec/src/system/stack.zod.ts

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,32 @@
11
import { z } from 'zod';
22

33
import { ManifestSchema } from './manifest.zod';
4+
import { DatasourceSchema } from './datasource.zod';
5+
import { TranslationBundleSchema } from './translation.zod';
46

57
// Data Protocol
68
import { ObjectSchema } from '../data/object.zod';
7-
import { FieldSchema } from '../data/field.zod';
89

910
// UI Protocol
1011
import { AppSchema } from '../ui/app.zod';
1112
import { ViewSchema } from '../ui/view.zod';
1213
import { PageSchema } from '../ui/page.zod';
1314
import { DashboardSchema } from '../ui/dashboard.zod';
15+
import { ReportSchema } from '../ui/report.zod';
16+
import { ActionSchema } from '../ui/action.zod';
17+
import { ThemeSchema } from '../ui/theme.zod';
1418

1519
// Automation Protocol
1620
import { ApprovalProcessSchema } from '../automation/approval.zod';
1721
import { WorkflowSchema } from '../automation/workflow.zod';
22+
import { FlowSchema } from '../automation/flow.zod';
1823

19-
// Security Protocol (Future expansion)
20-
// import { RoleSchema } from '../auth/role.zod';
24+
// Security Protocol
25+
import { RoleSchema } from '../auth/role.zod';
26+
import { PermissionSetSchema } from '../permission/permission.zod';
27+
28+
// AI Protocol
29+
import { AgentSchema } from '../ai/agent.zod';
2130

2231
/**
2332
* ObjectStack Ecosystem Definition
@@ -31,6 +40,8 @@ import { WorkflowSchema } from '../automation/workflow.zod';
3140
export const ObjectStackSchema = z.object({
3241
/** System Configuration */
3342
manifest: ManifestSchema.describe('Project Package Configuration'),
43+
datasources: z.array(DatasourceSchema).optional().describe('External Data Connections'),
44+
translations: z.array(TranslationBundleSchema).optional().describe('I18n Translation Bundles'),
3445

3546
/**
3647
* ObjectQL: Data Layer
@@ -46,18 +57,28 @@ export const ObjectStackSchema = z.object({
4657
views: z.array(ViewSchema).optional().describe('List Views'),
4758
pages: z.array(PageSchema).optional().describe('Custom Pages'),
4859
dashboards: z.array(DashboardSchema).optional().describe('Dashboards'),
60+
reports: z.array(ReportSchema).optional().describe('Analytics Reports'),
61+
actions: z.array(ActionSchema).optional().describe('Global and Object Actions'),
62+
themes: z.array(ThemeSchema).optional().describe('UI Themes'),
4963

5064
/**
5165
* ObjectFlow: Automation Layer
5266
* Business logic, approvals, and workflows.
5367
*/
5468
workflows: z.array(WorkflowSchema).optional().describe('Event-driven workflows'),
5569
approvals: z.array(ApprovalProcessSchema).optional().describe('Approval processes'),
70+
flows: z.array(FlowSchema).optional().describe('Screen Flows'),
5671

5772
/**
5873
* ObjectGuard: Security Layer
5974
*/
60-
// roles: z.array(RoleSchema).optional(),
75+
roles: z.array(RoleSchema).optional().describe('User Roles hierarchy'),
76+
permissions: z.array(PermissionSetSchema).optional().describe('Permission Sets and Profiles'),
77+
78+
/**
79+
* ObjectAI: Artificial Intelligence Layer
80+
*/
81+
agents: z.array(AgentSchema).optional().describe('AI Agents and Assistants'),
6182
});
6283

6384
export type ObjectStack = z.infer<typeof ObjectStackSchema>;

0 commit comments

Comments
 (0)