refactor(workflow): migrate downstream packages to workflow-runtime (Phase 2+3)

- Verify createWorkflow in runtime has zero I/O imports
- Migrate agent-cursor, agent-hermes to pure workflow-runtime dependency
- Migrate agent-llm, util-agent, templates to dual dependency
  (runtime for types, engine for CAS/merkle/buildDescriptor)
- All 377 tests passing

Refs #121, relates #123 #124
This commit is contained in:
2026-05-08 06:33:52 +00:00
parent 495c000356
commit e9e4960714
34 changed files with 44 additions and 48 deletions
@@ -5,7 +5,7 @@ import {
type RoleStep,
START,
validateWorkflowDescriptor,
} from "@uncaged/workflow";
} from "@uncaged/workflow-runtime";
import { buildDevelopDescriptor } from "../src/descriptor.js";
import { developModerator } from "../src/index.js";
import type { CommitterMeta, PlannerMeta } from "../src/roles/index.js";
@@ -9,6 +9,7 @@
},
"dependencies": {
"@uncaged/workflow": "workspace:*",
"@uncaged/workflow-runtime": "workspace:*",
"zod": "^4.0.0"
}
}
@@ -1,9 +1,5 @@
import {
type AgentBinding,
createWorkflow,
type WorkflowDefinition,
type WorkflowFn,
} from "@uncaged/workflow";
import { createWorkflow } from "@uncaged/workflow";
import type { AgentBinding, WorkflowDefinition, WorkflowFn } from "@uncaged/workflow-runtime";
import { developModerator } from "./moderator.js";
import { DEVELOP_WORKFLOW_DESCRIPTION, type DevelopMeta, developRoles } from "./roles.js";
@@ -1,5 +1,5 @@
import type { Moderator, ModeratorContext } from "@uncaged/workflow";
import { END } from "@uncaged/workflow";
import type { Moderator, ModeratorContext } from "@uncaged/workflow-runtime";
import { END } from "@uncaged/workflow-runtime";
import type { DevelopMeta } from "./roles.js";
@@ -1,4 +1,4 @@
import type { RoleDefinition } from "@uncaged/workflow";
import type { RoleDefinition } from "@uncaged/workflow-runtime";
import { type CoderMeta, coderRole } from "./roles/coder.js";
import { type CommitterMeta, committerRole } from "./roles/committer.js";
import { type PlannerMeta, plannerRole } from "./roles/planner.js";
@@ -1,4 +1,4 @@
import type { RoleDefinition } from "@uncaged/workflow";
import type { RoleDefinition } from "@uncaged/workflow-runtime";
import * as z from "zod/v4";
export const coderMetaSchema = z.object({
@@ -1,4 +1,4 @@
import type { RoleDefinition } from "@uncaged/workflow";
import type { RoleDefinition } from "@uncaged/workflow-runtime";
import * as z from "zod/v4";
export const committerMetaSchema = z.discriminatedUnion("status", [
@@ -1,4 +1,4 @@
import type { RoleDefinition } from "@uncaged/workflow";
import type { RoleDefinition } from "@uncaged/workflow-runtime";
import * as z from "zod/v4";
export const phaseSchema = z.object({
@@ -1,4 +1,4 @@
import type { RoleDefinition } from "@uncaged/workflow";
import type { RoleDefinition } from "@uncaged/workflow-runtime";
import * as z from "zod/v4";
export const reviewerMetaSchema = z.discriminatedUnion("status", [
@@ -1,4 +1,4 @@
import type { RoleDefinition } from "@uncaged/workflow";
import type { RoleDefinition } from "@uncaged/workflow-runtime";
import * as z from "zod/v4";
export const testerMetaSchema = z.discriminatedUnion("status", [