From 7b9cb6a9c8915ba37129e21fff27ca88bcc6e598 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E6=A9=98?= Date: Tue, 19 May 2026 07:52:16 +0000 Subject: [PATCH] =?UTF-8?q?chore:=20rename=20uwf-*=20=E2=86=92=20workflow-?= =?UTF-8?q?*,=20cli-uwf=20=E2=86=92=20cli-workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reclaim the workflow-* package names now that legacy packages are archived. Package renames: - @uncaged/uwf-protocol → @uncaged/workflow-protocol - @uncaged/uwf-moderator → @uncaged/workflow-moderator - @uncaged/uwf-agent-kit → @uncaged/workflow-agent-kit - @uncaged/uwf-agent-hermes → @uncaged/workflow-agent-hermes - @uncaged/cli-uwf → @uncaged/cli-workflow All internal imports, tsconfig references, and docs updated. CLI binary name 'uwf' unchanged. 小橘 🍊(NEKO Team) --- docs/architecture.md | 38 +++++++++---------- docs/wf-stateless-design.md | 12 +++--- .../{cli-uwf => cli-workflow}/package.json | 8 ++-- .../src/__tests__/thread.test.ts | 2 +- packages/{cli-uwf => cli-workflow}/src/cli.ts | 2 +- .../src/commands/cas.ts | 0 .../src/commands/setup.ts | 0 .../src/commands/thread.ts | 6 +-- .../src/commands/workflow.ts | 2 +- .../{cli-uwf => cli-workflow}/src/format.ts | 0 .../{cli-uwf => cli-workflow}/src/schemas.ts | 2 +- .../{cli-uwf => cli-workflow}/src/store.ts | 2 +- .../{cli-uwf => cli-workflow}/src/validate.ts | 2 +- .../{cli-uwf => cli-workflow}/tsconfig.json | 6 +-- .../vitest.config.ts | 0 .../__tests__/session-detail.test.ts | 0 .../package.json | 4 +- .../src/cli.ts | 0 .../src/hermes.ts | 2 +- .../src/index.ts | 0 .../src/schemas.ts | 0 .../src/session-detail.ts | 0 .../src/types.ts | 0 .../tsconfig.json | 2 +- .../build-output-format-instruction.test.ts | 0 .../__tests__/frontmatter-fast-path.test.ts | 0 .../__tests__/resolve-extract-model.test.ts | 2 +- .../package.json | 4 +- .../src/build-output-format-instruction.ts | 0 .../src/context.ts | 2 +- .../src/extract.ts | 2 +- .../src/frontmatter.ts | 2 +- .../src/index.ts | 0 .../src/run.ts | 2 +- .../src/schemas.ts | 2 +- .../src/storage.ts | 2 +- .../src/types.ts | 2 +- .../tsconfig.json | 2 +- .../__tests__/evaluate.test.ts | 2 +- .../package.json | 4 +- .../src/evaluate.ts | 2 +- .../src/index.ts | 0 .../src/types.ts | 0 .../tsconfig.json | 2 +- .../package.json | 2 +- .../pnpm-lock.yaml | 0 .../src/index.ts | 0 .../src/schemas.ts | 0 .../src/types.ts | 0 .../tsconfig.json | 0 tsconfig.json | 10 ++--- 51 files changed, 67 insertions(+), 67 deletions(-) rename packages/{cli-uwf => cli-workflow}/package.json (73%) rename packages/{cli-uwf => cli-workflow}/src/__tests__/thread.test.ts (99%) rename packages/{cli-uwf => cli-workflow}/src/cli.ts (99%) rename packages/{cli-uwf => cli-workflow}/src/commands/cas.ts (100%) rename packages/{cli-uwf => cli-workflow}/src/commands/setup.ts (100%) rename packages/{cli-uwf => cli-workflow}/src/commands/thread.ts (99%) rename packages/{cli-uwf => cli-workflow}/src/commands/workflow.ts (99%) rename packages/{cli-uwf => cli-workflow}/src/format.ts (100%) rename packages/{cli-uwf => cli-workflow}/src/schemas.ts (95%) rename packages/{cli-uwf => cli-workflow}/src/store.ts (99%) rename packages/{cli-uwf => cli-workflow}/src/validate.ts (96%) rename packages/{cli-uwf => cli-workflow}/tsconfig.json (56%) rename packages/{cli-uwf => cli-workflow}/vitest.config.ts (100%) rename packages/{uwf-agent-hermes => workflow-agent-hermes}/__tests__/session-detail.test.ts (100%) rename packages/{uwf-agent-hermes => workflow-agent-hermes}/package.json (84%) rename packages/{uwf-agent-hermes => workflow-agent-hermes}/src/cli.ts (100%) rename packages/{uwf-agent-hermes => workflow-agent-hermes}/src/hermes.ts (99%) rename packages/{uwf-agent-hermes => workflow-agent-hermes}/src/index.ts (100%) rename packages/{uwf-agent-hermes => workflow-agent-hermes}/src/schemas.ts (100%) rename packages/{uwf-agent-hermes => workflow-agent-hermes}/src/session-detail.ts (100%) rename packages/{uwf-agent-hermes => workflow-agent-hermes}/src/types.ts (100%) rename packages/{uwf-moderator => workflow-agent-hermes}/tsconfig.json (71%) rename packages/{uwf-agent-kit => workflow-agent-kit}/__tests__/build-output-format-instruction.test.ts (100%) rename packages/{uwf-agent-kit => workflow-agent-kit}/__tests__/frontmatter-fast-path.test.ts (100%) rename packages/{uwf-agent-kit => workflow-agent-kit}/__tests__/resolve-extract-model.test.ts (95%) rename packages/{uwf-agent-kit => workflow-agent-kit}/package.json (86%) rename packages/{uwf-agent-kit => workflow-agent-kit}/src/build-output-format-instruction.ts (100%) rename packages/{uwf-agent-kit => workflow-agent-kit}/src/context.ts (99%) rename packages/{uwf-agent-kit => workflow-agent-kit}/src/extract.ts (99%) rename packages/{uwf-agent-kit => workflow-agent-kit}/src/frontmatter.ts (96%) rename packages/{uwf-agent-kit => workflow-agent-kit}/src/index.ts (100%) rename packages/{uwf-agent-kit => workflow-agent-kit}/src/run.ts (99%) rename packages/{uwf-agent-kit => workflow-agent-kit}/src/schemas.ts (95%) rename packages/{uwf-agent-kit => workflow-agent-kit}/src/storage.ts (99%) rename packages/{uwf-agent-kit => workflow-agent-kit}/src/types.ts (95%) rename packages/{uwf-agent-hermes => workflow-agent-kit}/tsconfig.json (71%) rename packages/{uwf-moderator => workflow-moderator}/__tests__/evaluate.test.ts (99%) rename packages/{uwf-moderator => workflow-moderator}/package.json (82%) rename packages/{uwf-moderator => workflow-moderator}/src/evaluate.ts (99%) rename packages/{uwf-moderator => workflow-moderator}/src/index.ts (100%) rename packages/{uwf-moderator => workflow-moderator}/src/types.ts (100%) rename packages/{uwf-agent-kit => workflow-moderator}/tsconfig.json (71%) rename packages/{uwf-protocol => workflow-protocol}/package.json (91%) rename packages/{uwf-protocol => workflow-protocol}/pnpm-lock.yaml (100%) rename packages/{uwf-protocol => workflow-protocol}/src/index.ts (100%) rename packages/{uwf-protocol => workflow-protocol}/src/schemas.ts (100%) rename packages/{uwf-protocol => workflow-protocol}/src/types.ts (100%) rename packages/{uwf-protocol => workflow-protocol}/tsconfig.json (100%) diff --git a/docs/architecture.md b/docs/architecture.md index c4aad9e..1900f4d 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -1,4 +1,4 @@ -# uwf — Architecture +# Workflow Engine — Architecture **Last updated:** 2026-05-19 @@ -14,12 +14,12 @@ The implementation lives in **6** active packages under `packages/`, plus two ex | Layer | Package | One-line role | |-------|---------|---------------| -| Contract | `@uncaged/uwf-protocol` → `uwf-protocol` | Shared TypeScript types (`WorkflowPayload`, `StepNodePayload`, `ModeratorContext`, `WorkflowConfig`, etc.). No runtime deps beyond `@uncaged/json-cas-fs`. | +| Contract | `@uncaged/workflow-protocol` → `workflow-protocol` | Shared TypeScript types (`WorkflowPayload`, `StepNodePayload`, `ModeratorContext`, `WorkflowConfig`, etc.). No runtime deps beyond `@uncaged/json-cas-fs`. | | Shared infra | `@uncaged/workflow-util` → `workflow-util` | Crockford Base32, ULID generation, `createLogger`, frontmatter parsing/validation. | -| Moderator | `@uncaged/uwf-moderator` → `uwf-moderator` | JSONata-based graph evaluator: given a `WorkflowPayload` and `ModeratorContext`, returns the next role or `$END`. | -| Agent framework | `@uncaged/uwf-agent-kit` → `uwf-agent-kit` | `createAgent` entrypoint factory, context builder, frontmatter fast-path extractor, LLM extract fallback, output format instruction builder. | -| Agent: Hermes | `@uncaged/uwf-agent-hermes` → `uwf-agent-hermes` | `uwf-hermes` CLI binary — spawns `hermes chat`, pipes prompt, captures session detail. | -| CLI | `@uncaged/cli-uwf` → `cli-uwf` | `uwf` binary — thread lifecycle, workflow registry, CAS inspection, setup. | +| Moderator | `@uncaged/workflow-moderator` → `workflow-moderator` | JSONata-based graph evaluator: given a `WorkflowPayload` and `ModeratorContext`, returns the next role or `$END`. | +| Agent framework | `@uncaged/workflow-agent-kit` → `workflow-agent-kit` | `createAgent` entrypoint factory, context builder, frontmatter fast-path extractor, LLM extract fallback, output format instruction builder. | +| Agent: Hermes | `@uncaged/workflow-agent-hermes` → `workflow-agent-hermes` | `uwf-hermes` CLI binary — spawns `hermes chat`, pipes prompt, captures session detail. | +| CLI | `@uncaged/cli-workflow` → `cli-workflow` | `uwf` binary — thread lifecycle, workflow registry, CAS inspection, setup. | ### External dependencies @@ -27,8 +27,8 @@ The implementation lives in **6** active packages under `packages/`, plus two ex |---------|------| | `@uncaged/json-cas` | Content-addressed store API, XXH64 hashing, JSON Schema registration and validation. | | `@uncaged/json-cas-fs` | Filesystem backend for `json-cas`. | -| `jsonata` | JSONata expression evaluator (used by `uwf-moderator`). | -| `commander` | CLI argument parsing (used by `cli-uwf`). | +| `jsonata` | JSONata expression evaluator (used by `workflow-moderator`). | +| `commander` | CLI argument parsing (used by `cli-workflow`). | | `dotenv` | Loads `.env` files for API keys. | | `yaml` | YAML parse/stringify. | @@ -41,20 +41,20 @@ flowchart BT jcasfs["@uncaged/json-cas-fs"] end subgraph L0["Layer 0 — contract"] - protocol["@uncaged/uwf-protocol"] + protocol["@uncaged/workflow-protocol"] end subgraph L1["Layer 1 — shared"] util["@uncaged/workflow-util"] - moderator["@uncaged/uwf-moderator"] + moderator["@uncaged/workflow-moderator"] end subgraph L2["Layer 2 — agent framework"] - kit["@uncaged/uwf-agent-kit"] + kit["@uncaged/workflow-agent-kit"] end subgraph L3["Layer 3 — agent implementations"] - hermes["@uncaged/uwf-agent-hermes"] + hermes["@uncaged/workflow-agent-hermes"] end subgraph L4["Layer 4 — CLI"] - cli["@uncaged/cli-uwf"] + cli["@uncaged/cli-workflow"] end protocol --> jcasfs util --> protocol @@ -141,7 +141,7 @@ Key properties: ## Three-phase engine loop -Each `uwf thread step` runs exactly one cycle: moderator → agent → extract. The CLI orchestrates this in `packages/cli-uwf/src/commands/thread.ts` (`cmdThreadStep`). +Each `uwf thread step` runs exactly one cycle: moderator → agent → extract. The CLI orchestrates this in `packages/cli-workflow/src/commands/thread.ts` (`cmdThreadStep`). ``` ┌─→ Phase 1: MODERATOR @@ -167,7 +167,7 @@ Each `uwf thread step` runs exactly one cycle: moderator → agent → extract. ### Context types -Defined in `packages/uwf-protocol/src/types.ts`: +Defined in `packages/workflow-protocol/src/types.ts`: ```typescript type StepContext = { @@ -209,7 +209,7 @@ Each agent is an external command invoked by `uwf thread step`: Contract: 1. `uwf thread step` determines the next role via the moderator 2. Agent CLI is spawned with `(thread-id, role)` as positional args -3. `uwf-agent-kit` (`createAgent`) handles the boilerplate: +3. `workflow-agent-kit` (`createAgent`) handles the boilerplate: - Parses argv - Loads `.env` from storage root - Builds `AgentContext` by walking the CAS chain from `threads.yaml` head @@ -242,11 +242,11 @@ scope: role Fixed the login redirect by updating the auth middleware... ``` -The `outputFormatInstruction` (built by `buildOutputFormatInstruction` in `uwf-agent-kit`) is prepended to the role's system prompt, so the deliverable format is the first thing the agent sees. It lists the expected frontmatter fields derived from the role's JSON Schema. +The `outputFormatInstruction` (built by `buildOutputFormatInstruction` in `workflow-agent-kit`) is prepended to the role's system prompt, so the deliverable format is the first thing the agent sees. It lists the expected frontmatter fields derived from the role's JSON Schema. ## Two-layer extract -Structured output extraction uses a two-layer strategy (`uwf-agent-kit`): +Structured output extraction uses a two-layer strategy (`workflow-agent-kit`): ### Layer 1: frontmatter fast path (`frontmatter.ts`) @@ -270,7 +270,7 @@ If the fast path returns `null` (no frontmatter, invalid, or doesn't satisfy sch ## Prompt injection -`uwf-agent-kit` prepends two pieces of context to the agent's system prompt: +`workflow-agent-kit` prepends two pieces of context to the agent's system prompt: 1. **Deliverable format instruction** — generated from the role's `outputSchema`, tells the agent exactly what frontmatter fields to produce and the expected format 2. **Scope constraint** — "Focus exclusively on YOUR role's deliverable. Do not perform actions outside your role's scope." diff --git a/docs/wf-stateless-design.md b/docs/wf-stateless-design.md index 32aa9a5..1bddb8f 100644 --- a/docs/wf-stateless-design.md +++ b/docs/wf-stateless-design.md @@ -340,12 +340,12 @@ OPENROUTER_API_KEY=sk-or-... ``` packages/ -├── cli-uwf/ # @uncaged/cli-uwf — uwf CLI(thread/workflow 命令) -├── uwf-moderator/ # @uncaged/uwf-moderator — JSONata moderator 引擎 -├── uwf-agent-kit/ # @uncaged/uwf-agent-kit — Agent CLI 框架(含 extractor) -├── uwf-agent-hermes/ # @uncaged/uwf-agent-hermes — uwf-hermes CLI -├── uwf-agent-cursor/ # @uncaged/uwf-agent-cursor — uwf-cursor CLI -└── uwf-protocol/ # @uncaged/uwf-protocol — 共享类型定义 +├── cli-workflow/ # @uncaged/cli-workflow — uwf CLI(thread/workflow 命令) +├── workflow-moderator/ # @uncaged/workflow-moderator — JSONata moderator 引擎 +├── workflow-agent-kit/ # @uncaged/workflow-agent-kit — Agent CLI 框架(含 extractor) +├── workflow-agent-hermes/ # @uncaged/workflow-agent-hermes — uwf-hermes CLI +├── workflow-agent-cursor/ # @uncaged/workflow-agent-cursor — uwf-cursor CLI +└── workflow-protocol/ # @uncaged/workflow-protocol — 共享类型定义 ``` **外部依赖:** diff --git a/packages/cli-uwf/package.json b/packages/cli-workflow/package.json similarity index 73% rename from packages/cli-uwf/package.json rename to packages/cli-workflow/package.json index 02fb7dc..b74b329 100644 --- a/packages/cli-uwf/package.json +++ b/packages/cli-workflow/package.json @@ -1,5 +1,5 @@ { - "name": "@uncaged/cli-uwf", + "name": "@uncaged/cli-workflow", "version": "0.1.0", "files": [ "src", @@ -13,9 +13,9 @@ "dependencies": { "@uncaged/json-cas": "^0.3.0", "@uncaged/json-cas-fs": "^0.3.0", - "@uncaged/uwf-agent-kit": "workspace:^", - "@uncaged/uwf-moderator": "workspace:^", - "@uncaged/uwf-protocol": "workspace:^", + "@uncaged/workflow-agent-kit": "workspace:^", + "@uncaged/workflow-moderator": "workspace:^", + "@uncaged/workflow-protocol": "workspace:^", "@uncaged/workflow-util": "workspace:^", "commander": "^14.0.3", "dotenv": "^16.6.1", diff --git a/packages/cli-uwf/src/__tests__/thread.test.ts b/packages/cli-workflow/src/__tests__/thread.test.ts similarity index 99% rename from packages/cli-uwf/src/__tests__/thread.test.ts rename to packages/cli-workflow/src/__tests__/thread.test.ts index 5964cc5..7cf54dc 100644 --- a/packages/cli-uwf/src/__tests__/thread.test.ts +++ b/packages/cli-workflow/src/__tests__/thread.test.ts @@ -3,7 +3,7 @@ import { tmpdir } from "node:os"; import { join } from "node:path"; import { bootstrap, putSchema } from "@uncaged/json-cas"; import { createFsStore } from "@uncaged/json-cas-fs"; -import type { CasRef, ThreadId } from "@uncaged/uwf-protocol"; +import type { CasRef, ThreadId } from "@uncaged/workflow-protocol"; import { afterEach, beforeEach, describe, expect, test } from "vitest"; import { cmdThreadRead, diff --git a/packages/cli-uwf/src/cli.ts b/packages/cli-workflow/src/cli.ts similarity index 99% rename from packages/cli-uwf/src/cli.ts rename to packages/cli-workflow/src/cli.ts index ad18c9b..4201404 100755 --- a/packages/cli-uwf/src/cli.ts +++ b/packages/cli-workflow/src/cli.ts @@ -1,6 +1,6 @@ #!/usr/bin/env bun -import type { ThreadId } from "@uncaged/uwf-protocol"; +import type { ThreadId } from "@uncaged/workflow-protocol"; import { Command } from "commander"; import { stringify as yamlStringify } from "yaml"; import { diff --git a/packages/cli-uwf/src/commands/cas.ts b/packages/cli-workflow/src/commands/cas.ts similarity index 100% rename from packages/cli-uwf/src/commands/cas.ts rename to packages/cli-workflow/src/commands/cas.ts diff --git a/packages/cli-uwf/src/commands/setup.ts b/packages/cli-workflow/src/commands/setup.ts similarity index 100% rename from packages/cli-uwf/src/commands/setup.ts rename to packages/cli-workflow/src/commands/setup.ts diff --git a/packages/cli-uwf/src/commands/thread.ts b/packages/cli-workflow/src/commands/thread.ts similarity index 99% rename from packages/cli-uwf/src/commands/thread.ts rename to packages/cli-workflow/src/commands/thread.ts index 927eab0..1cf6d22 100644 --- a/packages/cli-uwf/src/commands/thread.ts +++ b/packages/cli-workflow/src/commands/thread.ts @@ -1,8 +1,8 @@ import { execFileSync } from "node:child_process"; import type { Store as CasStore, JSONSchema } from "@uncaged/json-cas"; import { getSchema, validate } from "@uncaged/json-cas"; -import { getEnvPath, loadWorkflowConfig } from "@uncaged/uwf-agent-kit"; -import { evaluate } from "@uncaged/uwf-moderator"; +import { getEnvPath, loadWorkflowConfig } from "@uncaged/workflow-agent-kit"; +import { evaluate } from "@uncaged/workflow-moderator"; import type { AgentAlias, AgentConfig, @@ -21,7 +21,7 @@ import type { ThreadStepsOutput, WorkflowConfig, WorkflowPayload, -} from "@uncaged/uwf-protocol"; +} from "@uncaged/workflow-protocol"; import { generateUlid } from "@uncaged/workflow-util"; import { config as loadDotenv } from "dotenv"; import { stringify } from "yaml"; diff --git a/packages/cli-uwf/src/commands/workflow.ts b/packages/cli-workflow/src/commands/workflow.ts similarity index 99% rename from packages/cli-uwf/src/commands/workflow.ts rename to packages/cli-workflow/src/commands/workflow.ts index 8b5f89c..d624159 100644 --- a/packages/cli-uwf/src/commands/workflow.ts +++ b/packages/cli-workflow/src/commands/workflow.ts @@ -2,7 +2,7 @@ import { readFile } from "node:fs/promises"; import type { JSONSchema } from "@uncaged/json-cas"; import { putSchema, validate } from "@uncaged/json-cas"; -import type { CasRef, RoleDefinition, WorkflowPayload } from "@uncaged/uwf-protocol"; +import type { CasRef, RoleDefinition, WorkflowPayload } from "@uncaged/workflow-protocol"; import { parse } from "yaml"; import { diff --git a/packages/cli-uwf/src/format.ts b/packages/cli-workflow/src/format.ts similarity index 100% rename from packages/cli-uwf/src/format.ts rename to packages/cli-workflow/src/format.ts diff --git a/packages/cli-uwf/src/schemas.ts b/packages/cli-workflow/src/schemas.ts similarity index 95% rename from packages/cli-uwf/src/schemas.ts rename to packages/cli-workflow/src/schemas.ts index cc8bf14..7a36a97 100644 --- a/packages/cli-uwf/src/schemas.ts +++ b/packages/cli-workflow/src/schemas.ts @@ -4,7 +4,7 @@ import { START_NODE_SCHEMA, STEP_NODE_SCHEMA, WORKFLOW_SCHEMA, -} from "@uncaged/uwf-protocol"; +} from "@uncaged/workflow-protocol"; export type UwfSchemaHashes = { workflow: Hash; diff --git a/packages/cli-uwf/src/store.ts b/packages/cli-workflow/src/store.ts similarity index 99% rename from packages/cli-uwf/src/store.ts rename to packages/cli-workflow/src/store.ts index 68cbfe5..49e5737 100644 --- a/packages/cli-uwf/src/store.ts +++ b/packages/cli-workflow/src/store.ts @@ -4,7 +4,7 @@ import { join } from "node:path"; import type { Hash, Store } from "@uncaged/json-cas"; import { createFsStore } from "@uncaged/json-cas-fs"; -import type { CasRef, ThreadId, ThreadListItem, ThreadsIndex } from "@uncaged/uwf-protocol"; +import type { CasRef, ThreadId, ThreadListItem, ThreadsIndex } from "@uncaged/workflow-protocol"; import { parse, stringify } from "yaml"; import { registerUwfSchemas, type UwfSchemaHashes } from "./schemas.js"; diff --git a/packages/cli-uwf/src/validate.ts b/packages/cli-workflow/src/validate.ts similarity index 96% rename from packages/cli-uwf/src/validate.ts rename to packages/cli-workflow/src/validate.ts index 711cfef..d106dcf 100644 --- a/packages/cli-uwf/src/validate.ts +++ b/packages/cli-workflow/src/validate.ts @@ -1,4 +1,4 @@ -import type { CasRef, WorkflowPayload } from "@uncaged/uwf-protocol"; +import type { CasRef, WorkflowPayload } from "@uncaged/workflow-protocol"; const CAS_REF_PATTERN = /^[0-9A-HJKMNP-TV-Z]{13}$/; diff --git a/packages/cli-uwf/tsconfig.json b/packages/cli-workflow/tsconfig.json similarity index 56% rename from packages/cli-uwf/tsconfig.json rename to packages/cli-workflow/tsconfig.json index ceee718..449a6f7 100644 --- a/packages/cli-uwf/tsconfig.json +++ b/packages/cli-workflow/tsconfig.json @@ -6,8 +6,8 @@ }, "include": ["src"], "references": [ - { "path": "../uwf-protocol" }, - { "path": "../uwf-moderator" }, - { "path": "../uwf-agent-kit" } + { "path": "../workflow-protocol" }, + { "path": "../workflow-moderator" }, + { "path": "../workflow-agent-kit" } ] } diff --git a/packages/cli-uwf/vitest.config.ts b/packages/cli-workflow/vitest.config.ts similarity index 100% rename from packages/cli-uwf/vitest.config.ts rename to packages/cli-workflow/vitest.config.ts diff --git a/packages/uwf-agent-hermes/__tests__/session-detail.test.ts b/packages/workflow-agent-hermes/__tests__/session-detail.test.ts similarity index 100% rename from packages/uwf-agent-hermes/__tests__/session-detail.test.ts rename to packages/workflow-agent-hermes/__tests__/session-detail.test.ts diff --git a/packages/uwf-agent-hermes/package.json b/packages/workflow-agent-hermes/package.json similarity index 84% rename from packages/uwf-agent-hermes/package.json rename to packages/workflow-agent-hermes/package.json index 189c7c5..ea833c0 100644 --- a/packages/uwf-agent-hermes/package.json +++ b/packages/workflow-agent-hermes/package.json @@ -1,5 +1,5 @@ { - "name": "@uncaged/uwf-agent-hermes", + "name": "@uncaged/workflow-agent-hermes", "version": "0.1.0", "files": [ "src", @@ -22,7 +22,7 @@ }, "dependencies": { "@uncaged/json-cas": "^0.3.0", - "@uncaged/uwf-agent-kit": "workspace:^" + "@uncaged/workflow-agent-kit": "workspace:^" }, "devDependencies": { "typescript": "^5.8.3" diff --git a/packages/uwf-agent-hermes/src/cli.ts b/packages/workflow-agent-hermes/src/cli.ts similarity index 100% rename from packages/uwf-agent-hermes/src/cli.ts rename to packages/workflow-agent-hermes/src/cli.ts diff --git a/packages/uwf-agent-hermes/src/hermes.ts b/packages/workflow-agent-hermes/src/hermes.ts similarity index 99% rename from packages/uwf-agent-hermes/src/hermes.ts rename to packages/workflow-agent-hermes/src/hermes.ts index 48cedc3..549e4b5 100644 --- a/packages/uwf-agent-hermes/src/hermes.ts +++ b/packages/workflow-agent-hermes/src/hermes.ts @@ -1,6 +1,6 @@ import { spawn } from "node:child_process"; -import { type AgentContext, type AgentRunResult, createAgent } from "@uncaged/uwf-agent-kit"; +import { type AgentContext, type AgentRunResult, createAgent } from "@uncaged/workflow-agent-kit"; import { loadHermesSession, diff --git a/packages/uwf-agent-hermes/src/index.ts b/packages/workflow-agent-hermes/src/index.ts similarity index 100% rename from packages/uwf-agent-hermes/src/index.ts rename to packages/workflow-agent-hermes/src/index.ts diff --git a/packages/uwf-agent-hermes/src/schemas.ts b/packages/workflow-agent-hermes/src/schemas.ts similarity index 100% rename from packages/uwf-agent-hermes/src/schemas.ts rename to packages/workflow-agent-hermes/src/schemas.ts diff --git a/packages/uwf-agent-hermes/src/session-detail.ts b/packages/workflow-agent-hermes/src/session-detail.ts similarity index 100% rename from packages/uwf-agent-hermes/src/session-detail.ts rename to packages/workflow-agent-hermes/src/session-detail.ts diff --git a/packages/uwf-agent-hermes/src/types.ts b/packages/workflow-agent-hermes/src/types.ts similarity index 100% rename from packages/uwf-agent-hermes/src/types.ts rename to packages/workflow-agent-hermes/src/types.ts diff --git a/packages/uwf-moderator/tsconfig.json b/packages/workflow-agent-hermes/tsconfig.json similarity index 71% rename from packages/uwf-moderator/tsconfig.json rename to packages/workflow-agent-hermes/tsconfig.json index a9954af..a9538da 100644 --- a/packages/uwf-moderator/tsconfig.json +++ b/packages/workflow-agent-hermes/tsconfig.json @@ -5,5 +5,5 @@ "outDir": "dist" }, "include": ["src"], - "references": [{ "path": "../uwf-protocol" }] + "references": [{ "path": "../workflow-agent-kit" }] } diff --git a/packages/uwf-agent-kit/__tests__/build-output-format-instruction.test.ts b/packages/workflow-agent-kit/__tests__/build-output-format-instruction.test.ts similarity index 100% rename from packages/uwf-agent-kit/__tests__/build-output-format-instruction.test.ts rename to packages/workflow-agent-kit/__tests__/build-output-format-instruction.test.ts diff --git a/packages/uwf-agent-kit/__tests__/frontmatter-fast-path.test.ts b/packages/workflow-agent-kit/__tests__/frontmatter-fast-path.test.ts similarity index 100% rename from packages/uwf-agent-kit/__tests__/frontmatter-fast-path.test.ts rename to packages/workflow-agent-kit/__tests__/frontmatter-fast-path.test.ts diff --git a/packages/uwf-agent-kit/__tests__/resolve-extract-model.test.ts b/packages/workflow-agent-kit/__tests__/resolve-extract-model.test.ts similarity index 95% rename from packages/uwf-agent-kit/__tests__/resolve-extract-model.test.ts rename to packages/workflow-agent-kit/__tests__/resolve-extract-model.test.ts index ec1d4b0..34a6a5b 100644 --- a/packages/uwf-agent-kit/__tests__/resolve-extract-model.test.ts +++ b/packages/workflow-agent-kit/__tests__/resolve-extract-model.test.ts @@ -1,5 +1,5 @@ import { describe, expect, test } from "bun:test"; -import type { WorkflowConfig } from "@uncaged/uwf-protocol"; +import type { WorkflowConfig } from "@uncaged/workflow-protocol"; import { resolveExtractModelAlias } from "../src/extract.js"; function baseConfig(overrides: Partial = {}): WorkflowConfig { diff --git a/packages/uwf-agent-kit/package.json b/packages/workflow-agent-kit/package.json similarity index 86% rename from packages/uwf-agent-kit/package.json rename to packages/workflow-agent-kit/package.json index f588ce0..88970ae 100644 --- a/packages/uwf-agent-kit/package.json +++ b/packages/workflow-agent-kit/package.json @@ -1,5 +1,5 @@ { - "name": "@uncaged/uwf-agent-kit", + "name": "@uncaged/workflow-agent-kit", "version": "0.1.0", "files": [ "src", @@ -20,7 +20,7 @@ "dependencies": { "@uncaged/json-cas": "^0.3.0", "@uncaged/json-cas-fs": "^0.3.0", - "@uncaged/uwf-protocol": "workspace:^", + "@uncaged/workflow-protocol": "workspace:^", "@uncaged/workflow-util": "workspace:^", "dotenv": "^16.6.1", "yaml": "^2.8.4" diff --git a/packages/uwf-agent-kit/src/build-output-format-instruction.ts b/packages/workflow-agent-kit/src/build-output-format-instruction.ts similarity index 100% rename from packages/uwf-agent-kit/src/build-output-format-instruction.ts rename to packages/workflow-agent-kit/src/build-output-format-instruction.ts diff --git a/packages/uwf-agent-kit/src/context.ts b/packages/workflow-agent-kit/src/context.ts similarity index 99% rename from packages/uwf-agent-kit/src/context.ts rename to packages/workflow-agent-kit/src/context.ts index 8e83e2c..05f67c7 100644 --- a/packages/uwf-agent-kit/src/context.ts +++ b/packages/workflow-agent-kit/src/context.ts @@ -5,7 +5,7 @@ import type { StepContext, StepNodePayload, ThreadId, -} from "@uncaged/uwf-protocol"; +} from "@uncaged/workflow-protocol"; import { createAgentStore, loadThreadsIndex, resolveStorageRoot } from "./storage.js"; import type { AgentStore } from "./storage.js"; import type { AgentContext } from "./types.js"; diff --git a/packages/uwf-agent-kit/src/extract.ts b/packages/workflow-agent-kit/src/extract.ts similarity index 99% rename from packages/uwf-agent-kit/src/extract.ts rename to packages/workflow-agent-kit/src/extract.ts index cc22ef3..712046f 100644 --- a/packages/uwf-agent-kit/src/extract.ts +++ b/packages/workflow-agent-kit/src/extract.ts @@ -1,6 +1,6 @@ import { getSchema, validate } from "@uncaged/json-cas"; -import type { CasRef, ModelAlias, WorkflowConfig } from "@uncaged/uwf-protocol"; +import type { CasRef, ModelAlias, WorkflowConfig } from "@uncaged/workflow-protocol"; import { config as loadDotenv } from "dotenv"; import { createAgentStore, getEnvPath, resolveStorageRoot } from "./storage.js"; diff --git a/packages/uwf-agent-kit/src/frontmatter.ts b/packages/workflow-agent-kit/src/frontmatter.ts similarity index 96% rename from packages/uwf-agent-kit/src/frontmatter.ts rename to packages/workflow-agent-kit/src/frontmatter.ts index 8fd2ccf..5470a82 100644 --- a/packages/uwf-agent-kit/src/frontmatter.ts +++ b/packages/workflow-agent-kit/src/frontmatter.ts @@ -1,6 +1,6 @@ import { validate } from "@uncaged/json-cas"; import type { Store } from "@uncaged/json-cas"; -import type { CasRef } from "@uncaged/uwf-protocol"; +import type { CasRef } from "@uncaged/workflow-protocol"; import { parseFrontmatterMarkdown, validateFrontmatter } from "@uncaged/workflow-util"; export type FrontmatterFastPathResult = { diff --git a/packages/uwf-agent-kit/src/index.ts b/packages/workflow-agent-kit/src/index.ts similarity index 100% rename from packages/uwf-agent-kit/src/index.ts rename to packages/workflow-agent-kit/src/index.ts diff --git a/packages/uwf-agent-kit/src/run.ts b/packages/workflow-agent-kit/src/run.ts similarity index 99% rename from packages/uwf-agent-kit/src/run.ts rename to packages/workflow-agent-kit/src/run.ts index bd229fb..75e87b8 100644 --- a/packages/uwf-agent-kit/src/run.ts +++ b/packages/workflow-agent-kit/src/run.ts @@ -1,5 +1,5 @@ import { getSchema, validate } from "@uncaged/json-cas"; -import type { CasRef, StepNodePayload, ThreadId } from "@uncaged/uwf-protocol"; +import type { CasRef, StepNodePayload, ThreadId } from "@uncaged/workflow-protocol"; import { config as loadDotenv } from "dotenv"; import { buildContextWithMeta } from "./context.js"; diff --git a/packages/uwf-agent-kit/src/schemas.ts b/packages/workflow-agent-kit/src/schemas.ts similarity index 95% rename from packages/uwf-agent-kit/src/schemas.ts rename to packages/workflow-agent-kit/src/schemas.ts index f8273ad..a78f1e1 100644 --- a/packages/uwf-agent-kit/src/schemas.ts +++ b/packages/workflow-agent-kit/src/schemas.ts @@ -1,6 +1,6 @@ import type { Hash, Store } from "@uncaged/json-cas"; import { putSchema } from "@uncaged/json-cas"; -import { START_NODE_SCHEMA, STEP_NODE_SCHEMA, WORKFLOW_SCHEMA } from "@uncaged/uwf-protocol"; +import { START_NODE_SCHEMA, STEP_NODE_SCHEMA, WORKFLOW_SCHEMA } from "@uncaged/workflow-protocol"; export type UwfAgentSchemaHashes = { workflow: Hash; diff --git a/packages/uwf-agent-kit/src/storage.ts b/packages/workflow-agent-kit/src/storage.ts similarity index 99% rename from packages/uwf-agent-kit/src/storage.ts rename to packages/workflow-agent-kit/src/storage.ts index b02af71..8f1c934 100644 --- a/packages/uwf-agent-kit/src/storage.ts +++ b/packages/workflow-agent-kit/src/storage.ts @@ -16,7 +16,7 @@ import type { ThreadsIndex, WorkflowConfig, WorkflowName, -} from "@uncaged/uwf-protocol"; +} from "@uncaged/workflow-protocol"; import { parse } from "yaml"; import { registerAgentSchemas } from "./schemas.js"; diff --git a/packages/uwf-agent-kit/src/types.ts b/packages/workflow-agent-kit/src/types.ts similarity index 95% rename from packages/uwf-agent-kit/src/types.ts rename to packages/workflow-agent-kit/src/types.ts index e9a3cd3..18cce91 100644 --- a/packages/uwf-agent-kit/src/types.ts +++ b/packages/workflow-agent-kit/src/types.ts @@ -1,5 +1,5 @@ import type { Store } from "@uncaged/json-cas"; -import type { ModeratorContext, ThreadId, WorkflowPayload } from "@uncaged/uwf-protocol"; +import type { ModeratorContext, ThreadId, WorkflowPayload } from "@uncaged/workflow-protocol"; export type AgentContext = ModeratorContext & { threadId: ThreadId; diff --git a/packages/uwf-agent-hermes/tsconfig.json b/packages/workflow-agent-kit/tsconfig.json similarity index 71% rename from packages/uwf-agent-hermes/tsconfig.json rename to packages/workflow-agent-kit/tsconfig.json index c00cc38..0424b27 100644 --- a/packages/uwf-agent-hermes/tsconfig.json +++ b/packages/workflow-agent-kit/tsconfig.json @@ -5,5 +5,5 @@ "outDir": "dist" }, "include": ["src"], - "references": [{ "path": "../uwf-agent-kit" }] + "references": [{ "path": "../workflow-protocol" }] } diff --git a/packages/uwf-moderator/__tests__/evaluate.test.ts b/packages/workflow-moderator/__tests__/evaluate.test.ts similarity index 99% rename from packages/uwf-moderator/__tests__/evaluate.test.ts rename to packages/workflow-moderator/__tests__/evaluate.test.ts index a8e4331..61c65e8 100644 --- a/packages/uwf-moderator/__tests__/evaluate.test.ts +++ b/packages/workflow-moderator/__tests__/evaluate.test.ts @@ -1,5 +1,5 @@ import { describe, expect, test } from "bun:test"; -import type { ModeratorContext, WorkflowPayload } from "@uncaged/uwf-protocol"; +import type { ModeratorContext, WorkflowPayload } from "@uncaged/workflow-protocol"; import { evaluate } from "../src/evaluate.js"; diff --git a/packages/uwf-moderator/package.json b/packages/workflow-moderator/package.json similarity index 82% rename from packages/uwf-moderator/package.json rename to packages/workflow-moderator/package.json index fc8278e..59aa336 100644 --- a/packages/uwf-moderator/package.json +++ b/packages/workflow-moderator/package.json @@ -1,5 +1,5 @@ { - "name": "@uncaged/uwf-moderator", + "name": "@uncaged/workflow-moderator", "version": "0.1.0", "files": [ "src", @@ -18,7 +18,7 @@ "test": "bun test" }, "dependencies": { - "@uncaged/uwf-protocol": "workspace:^", + "@uncaged/workflow-protocol": "workspace:^", "jsonata": "^1.8.7" }, "devDependencies": { diff --git a/packages/uwf-moderator/src/evaluate.ts b/packages/workflow-moderator/src/evaluate.ts similarity index 99% rename from packages/uwf-moderator/src/evaluate.ts rename to packages/workflow-moderator/src/evaluate.ts index 05da020..e7aa4d2 100644 --- a/packages/uwf-moderator/src/evaluate.ts +++ b/packages/workflow-moderator/src/evaluate.ts @@ -1,4 +1,4 @@ -import type { ModeratorContext, WorkflowPayload } from "@uncaged/uwf-protocol"; +import type { ModeratorContext, WorkflowPayload } from "@uncaged/workflow-protocol"; import jsonata from "jsonata"; import type { Result } from "./types.js"; diff --git a/packages/uwf-moderator/src/index.ts b/packages/workflow-moderator/src/index.ts similarity index 100% rename from packages/uwf-moderator/src/index.ts rename to packages/workflow-moderator/src/index.ts diff --git a/packages/uwf-moderator/src/types.ts b/packages/workflow-moderator/src/types.ts similarity index 100% rename from packages/uwf-moderator/src/types.ts rename to packages/workflow-moderator/src/types.ts diff --git a/packages/uwf-agent-kit/tsconfig.json b/packages/workflow-moderator/tsconfig.json similarity index 71% rename from packages/uwf-agent-kit/tsconfig.json rename to packages/workflow-moderator/tsconfig.json index a9954af..0424b27 100644 --- a/packages/uwf-agent-kit/tsconfig.json +++ b/packages/workflow-moderator/tsconfig.json @@ -5,5 +5,5 @@ "outDir": "dist" }, "include": ["src"], - "references": [{ "path": "../uwf-protocol" }] + "references": [{ "path": "../workflow-protocol" }] } diff --git a/packages/uwf-protocol/package.json b/packages/workflow-protocol/package.json similarity index 91% rename from packages/uwf-protocol/package.json rename to packages/workflow-protocol/package.json index 6539789..fb9b3ba 100644 --- a/packages/uwf-protocol/package.json +++ b/packages/workflow-protocol/package.json @@ -1,5 +1,5 @@ { - "name": "@uncaged/uwf-protocol", + "name": "@uncaged/workflow-protocol", "version": "0.1.0", "files": [ "src", diff --git a/packages/uwf-protocol/pnpm-lock.yaml b/packages/workflow-protocol/pnpm-lock.yaml similarity index 100% rename from packages/uwf-protocol/pnpm-lock.yaml rename to packages/workflow-protocol/pnpm-lock.yaml diff --git a/packages/uwf-protocol/src/index.ts b/packages/workflow-protocol/src/index.ts similarity index 100% rename from packages/uwf-protocol/src/index.ts rename to packages/workflow-protocol/src/index.ts diff --git a/packages/uwf-protocol/src/schemas.ts b/packages/workflow-protocol/src/schemas.ts similarity index 100% rename from packages/uwf-protocol/src/schemas.ts rename to packages/workflow-protocol/src/schemas.ts diff --git a/packages/uwf-protocol/src/types.ts b/packages/workflow-protocol/src/types.ts similarity index 100% rename from packages/uwf-protocol/src/types.ts rename to packages/workflow-protocol/src/types.ts diff --git a/packages/uwf-protocol/tsconfig.json b/packages/workflow-protocol/tsconfig.json similarity index 100% rename from packages/uwf-protocol/tsconfig.json rename to packages/workflow-protocol/tsconfig.json diff --git a/tsconfig.json b/tsconfig.json index e65d2b2..faeeb95 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -19,10 +19,10 @@ }, "references": [ { "path": "packages/workflow-util" }, - { "path": "packages/uwf-protocol" }, - { "path": "packages/uwf-moderator" }, - { "path": "packages/uwf-agent-kit" }, - { "path": "packages/uwf-agent-hermes" }, - { "path": "packages/cli-uwf" } + { "path": "packages/workflow-protocol" }, + { "path": "packages/workflow-moderator" }, + { "path": "packages/workflow-agent-kit" }, + { "path": "packages/workflow-agent-hermes" }, + { "path": "packages/cli-workflow" } ] }