DevOS v1 + Phase 2: unified resource model, infra ops, website deployment, AI chat ops
- Monorepo: NestJS API (Fastify) + React web (antd/ProComponents) + shared packages - PostgreSQL/Prisma (unified resources, relations graph, audit, events, jobs) - Auth/RBAC/workspace isolation, credential vault (AES-256-GCM) - Servers/SSH, Docker discovery & lifecycle, Job Center - Websites & deployments (git provider credential clone, env, health verification) - Domains/DNS (Cloudflare adapter), certificates (TLS probe), monitoring - Automation (cron/event/webhook HMAC + notifications), AI Gateway, MCP (29 tools) - AI chat window (LLM function-calling + rules fallback, SSE streaming, approvals) - Notes: Vditor WYSIWYG markdown editor, non-blocking autosave - Tests: 35 unit/security tests; UI audit clean (desktop+mobile, deep links)
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
# DevOS v1 Automation Engine
|
||||
|
||||
## 1. Model
|
||||
|
||||
```text
|
||||
Trigger
|
||||
↓
|
||||
Condition
|
||||
↓
|
||||
Action
|
||||
↓
|
||||
Action
|
||||
↓
|
||||
Action
|
||||
```
|
||||
|
||||
## 2. Triggers
|
||||
Initial trigger classes:
|
||||
- Manual
|
||||
- Cron
|
||||
- Webhook
|
||||
- Event
|
||||
- AI Trigger
|
||||
|
||||
## 3. Example
|
||||
|
||||
```text
|
||||
WHEN github.push
|
||||
IF branch = main
|
||||
THEN build
|
||||
THEN deploy
|
||||
THEN health check
|
||||
THEN notify
|
||||
```
|
||||
|
||||
## 4. Execution Model
|
||||
Automation execution should be represented as a job/run with:
|
||||
- automation ID
|
||||
- trigger event
|
||||
- execution ID
|
||||
- step index
|
||||
- input/output references
|
||||
- status
|
||||
- retry state
|
||||
- timestamps
|
||||
- correlation ID
|
||||
|
||||
## 5. Event Bus
|
||||
Canonical events include:
|
||||
- deployment.created
|
||||
- deployment.started
|
||||
- deployment.success
|
||||
- deployment.failed
|
||||
- server.online
|
||||
- server.offline
|
||||
- website.down
|
||||
- website.recovered
|
||||
- email.received
|
||||
- github.push
|
||||
- task.created
|
||||
- task.completed
|
||||
|
||||
## 6. Reliability
|
||||
- idempotency for externally triggered workflows
|
||||
- bounded retries
|
||||
- timeout per action
|
||||
- explicit failure states
|
||||
- dead-letter handling for unrecoverable jobs
|
||||
- full audit trail
|
||||
|
||||
## 7. AI Integration
|
||||
AI may create or execute automation, but generated workflows must still pass schema validation, permissions and risk policies.
|
||||
Reference in New Issue
Block a user