v2 platform foundation (docs 01/02/03): Action Runtime + Registry + unified API

- v2 foundation: ActionResult/DevError/ActorContext/ResourceRef/Execution types
- ActionRegistry + ResourceRegistry (namespaced types, FAIL FAST on duplicates)
- ActionRuntime pipeline: validate -> authorize -> middleware -> handler ->
  output validation -> audit -> event -> execution persisted (devos_action_executions)
- Legacy bridge: v1 services registered as devops.*/core.* resources & actions (47 actions, 9 resources)
- Unified Action API: POST /api/v2/actions/:actionId, GET discovery (actions/resources)
- 10 v2 unit tests (registry fail-fast, validation, authz, failure audit, events)
This commit is contained in:
phptits
2026-09-10 21:09:44 +00:00
parent 0d6cd37579
commit b1f17cf637
30 changed files with 60110 additions and 3 deletions
@@ -0,0 +1,29 @@
-- CreateTable
CREATE TABLE "ActionExecution" (
"id" TEXT NOT NULL,
"actionId" TEXT NOT NULL,
"actorType" TEXT NOT NULL,
"actorId" TEXT,
"resourceType" TEXT,
"resourceId" TEXT,
"status" TEXT NOT NULL,
"input" JSONB,
"output" JSONB,
"error" JSONB,
"requestId" TEXT,
"rootExecutionId" TEXT,
"parentExecutionId" TEXT,
"durationMs" INTEGER,
"startedAt" TIMESTAMP(3),
"completedAt" TIMESTAMP(3),
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
CONSTRAINT "ActionExecution_pkey" PRIMARY KEY ("id")
);
-- CreateIndex
CREATE INDEX "ActionExecution_actionId_createdAt_idx" ON "ActionExecution"("actionId", "createdAt");
-- CreateIndex
CREATE INDEX "ActionExecution_status_idx" ON "ActionExecution"("status");