Compare commits

..
4 changed files with 82 additions and 46 deletions
+33
View File
@@ -0,0 +1,33 @@
"""AIOS V2 control-plane and runtime adapter contracts."""
from .control_plane import (
AgentRecord,
AuditEvent,
ControlPlaneError,
ControlPlaneService,
InMemoryControlPlaneStore,
InvalidTransition,
NotFound,
RequestContext,
TaskRecord,
TaskState,
TenantIsolationError,
TenantRecord,
Unauthorized,
)
__all__ = [
"AgentRecord",
"AuditEvent",
"ControlPlaneError",
"ControlPlaneService",
"InMemoryControlPlaneStore",
"InvalidTransition",
"NotFound",
"RequestContext",
"TaskRecord",
"TaskState",
"TenantIsolationError",
"TenantRecord",
"Unauthorized",
]
@@ -0,0 +1,47 @@
# TASK-AIOS-CONTROL-PLANE-GATEWAY-V1
## Owner
Codex
## Goal
建立 AIOS V2 唯一控制面 Gateway v1。
## Architecture Boundary
AIOS Control Plane:
- Tenant Registry
- Agent Registry
- Task Lifecycle
- Policy Gate
- Approval
- Audit Event
不允许:
- OpenClaw 直接管理任务生命周期
- Hermes 直接暴露控制 API
- Web UI 绕过 AIOS API
## Deliverables
1. Control Plane API skeleton
2. Tenant context middleware
3. Task state machine
4. Agent registration contract
5. Audit event interface
## Acceptance
- 所有 API 携带 tenant_id
- 未授权跨租户访问拒绝
- Task create/update/cancel 可审计
- GitOps commit 可追踪
- pytest + integration test 通过
## Migration
复用:
- Agent Router
- OpenClaw adapter
- Hermes runtime
不重写执行层。
@@ -1,44 +0,0 @@
# TASK-OPENCLAW-RUNTIME-SELF-HEALING-ADAPTER-V1
## Owner
OpenClaw
## Goal
将 OpenClaw 从控制逻辑中解耦,作为 AIOS 执行适配器。
## Boundary
AIOS:
- policy
- approval
- task lifecycle
- tenant isolation
OpenClaw Adapter:
- execute
- status
- cancel
- callback
## Deliverables
1. Runtime health contract
2. Adapter API
3. timeout handling
4. idempotency key
5. tenant context propagation
## Acceptance
- AIOS 可启动/停止 OpenClaw
- OpenClaw 无权修改租户策略
- 所有执行事件进入 audit
- failure 可恢复
## Self Healing
检查:
- process health
- runtime heartbeat
- workspace isolation
- credential reference
@@ -1,9 +1,9 @@
{
"type": "branch",
"branch": "task/openclaw/AIOS-RUNTIME-SELF-HEALING-ADAPTER-V1-20260720",
"branch": "task/codex/AIOS-V2-CONTROL-PLANE-GATEWAY-V1-20260720",
"base": "main",
"created_by": "chatgpt-gitops-bot",
"created_at": "2026-07-19T17:06:06Z",
"created_at": "2026-07-19T17:06:04Z",
"direct_main_push": false,
"owner_approval_required": true
}