Skip to content

Commit 8326b2b

Browse files
committed
feat: 更新架构文档,重组协议命名空间并增强描述
1 parent 053f24e commit 8326b2b

File tree

3 files changed

+32
-28
lines changed

3 files changed

+32
-28
lines changed

.github/copilot-instructions.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,11 @@ export const FieldSchema = z.object({
7575

7676
### **Directory Structure**
7777

78-
* `packages/spec/src/data/`: ObjectQL (Object, Field, Validation).
78+
* `packages/spec/src/data/`: ObjectQL (Object, Query, Driver).
79+
* `packages/spec/src/ai/`: ObjectQL (Agent, RAG, Orchestration).
7980
* `packages/spec/src/ui/`: ObjectUI (App, View, Action).
80-
* `packages/spec/src/system/`: ObjectOS (Manifest, Config).
81+
* `packages/spec/src/system/`: ObjectOS (Manifest, Identity, Events).
82+
* `packages/spec/src/api/`: ObjectOS (Contract, Endpoint, Realtime).
8183

8284
---
8385

ARCHITECTURE.md

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,31 +23,23 @@
2323
│ ObjectOS (Control Layer) │
2424
│ Runtime Kernel - Define "How System Operates" │
2525
├─────────────────────────────────────────────────────────────────┤
26-
│ • Manifest & Packaging • Identity & Roles │
27-
│ • Plugin Lifecycle • API Gateway │
28-
│ • Datasource Management • Webhook & Events │
29-
│ • Multi-tenancy • License & Quota │
30-
│ • Real-time Sync • Audit & Compliance │
26+
│ • Manifest & Packaging • Identity & Roles (IAM) │
27+
│ • Plugin Lifecycle • Event Bus & Jobs │
28+
│ • API Gateway (Rest/GQL)• Real-time (Socket/SSE) │
29+
│ • Multi-tenancy • Audit & Compliance │
3130
└─────────────────────────────────────────────────────────────────┘
3231
3332
│ Execute
3433
3534
┌─────────────────────────────────────────────────────────────────┐
3635
│ ObjectQL (Data Layer) │
37-
Abstract Query Language - Define "What Data Exists" │
36+
Business Kernel - Define "What Data Exists"
3837
├─────────────────────────────────────────────────────────────────┤
39-
│ • Object & Field Schema • Query AST (Filter/Sort/Join) │
38+
│ • Object & Field Schema • AI Agents & Orchestration │
39+
│ • Query AST (Filter/Sort) • RAG & Vector Search │
4040
│ • Validation Rules • Permission & Sharing │
41-
│ • Workflow & Flow • Trigger Context │
42-
│ • Formula & Rollup • Dataset & Mapping │
41+
│ • Workflow & Flow • Driver & Datasource (IO) │
4342
└─────────────────────────────────────────────────────────────────┘
44-
45-
│ Translate
46-
47-
┌─────────────────────────────────────────────────────────────────┐
48-
│ Driver Interface │
49-
│ Database Abstraction - Pluggable Data Backends │
50-
├─────────────────────────────────────────────────────────────────┤
5143
│ driver-postgres │ driver-mongodb │ driver-salesforce │
5244
│ driver-mysql │ driver-redis │ driver-excel │
5345
│ driver-sqlite │ driver-s3 │ driver-airtable │

packages/spec/README.md

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,25 +22,35 @@ pnpm install @objectstack/spec
2222

2323
## 📦 Architecture
2424

25-
The specification is divided into three protocols:
25+
The specification is organized into five namespaces mapping to the three-layer architecture:
2626

27-
### 1. Data Protocol (`src/data`)
28-
*Core Business Logic & Data Modeling*
27+
### 1. Data Protocol (`src/data`) - *ObjectQL*
28+
*Business Kernel & Data Logic*
2929
* `Object`, `Field`, `Validation`
30-
* `Query` (AST), `Mapping` (ETL)
30+
* `Query` (AST), `Driver` (Interface), `Datasource`
3131
* `Permission`, `Sharing`, `Flow`
3232

33-
### 2. UI Protocol (`src/ui`)
33+
### 2. AI Protocol (`src/ai`) - *ObjectQL*
34+
*Intelligence & Orchestration*
35+
* `Agent` (Orchestration), `RAG` (Retrieval)
36+
* `Model` (Registry), `Prompt`
37+
38+
### 3. UI Protocol (`src/ui`) - *ObjectUI*
3439
*Presentation & Interaction*
3540
* `App`, `Page`, `View` (Grid/Kanban)
3641
* `Dashboard` (Widgets), `Report`
3742
* `Action` (Triggers)
3843

39-
### 3. System Protocol (`src/system`)
40-
*Runtime Configuration & Security*
41-
* `Manifest` (Config), `Datasource`
42-
* `Role` (Hierarchy), `Identity` (Auth)
43-
* `Webhook` (Integration), `Policy` (Compliance)
44+
### 4. System Protocol (`src/system`) - *ObjectOS*
45+
*Runtime Infrastructure & Security*
46+
* `Manifest` (Config), `Identity` (Auth)
47+
* `Role` (RBAC), `Tenant` (Isolation)
48+
* `Events` (Bus), `Plugin` (Lifecycle)
49+
50+
### 5. API Protocol (`src/api`) - *ObjectOS*
51+
*Connectivity & Contracts*
52+
* `Contract` (DTOs), `Endpoint` (Gateway)
53+
* `Discovery` (Metadata), `Realtime` (Socket)
4454

4555
## 📚 Usage
4656

0 commit comments

Comments
 (0)