- 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)
30 lines
789 B
SQL
30 lines
789 B
SQL
-- 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");
|
|
|