refactor: rebrand npm packages @uncaged/* → @united-workforce/*
CI / check (pull_request) Failing after 9m51s

Package mapping:
- @uncaged/cli-workflow → @united-workforce/cli
- @uncaged/workflow-protocol → @united-workforce/protocol
- @uncaged/workflow-util → @united-workforce/util
- @uncaged/workflow-util-agent → @united-workforce/util-agent
- @uncaged/workflow-agent-hermes → @united-workforce/agent-hermes
- @uncaged/workflow-agent-claude-code → @united-workforce/agent-claude-code
- @uncaged/workflow-agent-builtin → @united-workforce/agent-builtin
- @uncaged/workflow-dashboard → @united-workforce/dashboard

Changes:
- 8 package.json name + dependency refs
- 82 files: import statements updated
- .changeset/config.json updated
- CLAUDE.md updated
- bunfig.toml restored for preload

CLI command (uwf) and directory names unchanged.

Closes shazhou/united-workforce#8
This commit is contained in:
2026-06-02 20:56:06 +08:00
parent 7b1db96d7e
commit e067a2f25a
82 changed files with 169 additions and 166 deletions
+2 -2
View File
@@ -2,10 +2,10 @@
"$schema": "https://unpkg.com/@changesets/config@3.1.4/schema.json", "$schema": "https://unpkg.com/@changesets/config@3.1.4/schema.json",
"changelog": "@changesets/cli/changelog", "changelog": "@changesets/cli/changelog",
"commit": false, "commit": false,
"fixed": [["@uncaged/*"]], "fixed": [["@united-workforce/*"]],
"linked": [], "linked": [],
"access": "public", "access": "public",
"baseBranch": "main", "baseBranch": "main",
"updateInternalDependencies": "patch", "updateInternalDependencies": "patch",
"ignore": ["@uncaged/workflow-dashboard"] "ignore": ["@united-workforce/dashboard"]
} }
+13 -10
View File
@@ -21,11 +21,14 @@ This monorepo implements a stateless workflow engine driven by a single-step CLI
``` ```
workflow/ workflow/
packages/ packages/
workflow-protocol/ # @uncaged/workflow-protocol — shared types (WorkflowPayload, StepNodePayload, WorkflowConfig, etc.) workflow-protocol/ # @united-workforce/protocol — shared types (WorkflowPayload, StepNodePayload, WorkflowConfig, etc.)
workflow-util/ # @uncaged/workflow-util — Crockford Base32, ULID, logger, frontmatter parsing/validation workflow-util/ # @united-workforce/util — Crockford Base32, ULID, logger, frontmatter parsing/validation
workflow-util-agent/ # @uncaged/workflow-util-agent — createAgent factory, context builder, extract pipeline workflow-util-agent/ # @united-workforce/util-agent — createAgent factory, context builder, extract pipeline
workflow-agent-hermes/ # @uncaged/workflow-agent-hermes — uwf-hermes CLI binary (spawns hermes chat) workflow-agent-hermes/ # @united-workforce/agent-hermes — uwf-hermes CLI binary (spawns hermes chat)
cli-workflow/ # @uncaged/cli-workflow — uwf CLI binary (includes status-based moderator in src/moderator/) workflow-agent-claude-code/ # @united-workforce/agent-claude-code — uwf-claude-code CLI binary
workflow-agent-builtin/ # @united-workforce/agent-builtin — uwf-builtin CLI binary
cli-workflow/ # @united-workforce/cli — uwf CLI binary (includes status-based moderator in src/moderator/)
workflow-dashboard/ # @united-workforce/dashboard — web dashboard (private, not published)
legacy-packages/ # Archived packages (preserved for reference, not active) legacy-packages/ # Archived packages (preserved for reference, not active)
examples/ # Workflow YAML examples (solve-issue.yaml) examples/ # Workflow YAML examples (solve-issue.yaml)
docs/ # Architecture docs docs/ # Architecture docs
@@ -33,7 +36,7 @@ workflow/
tsconfig.json # root TypeScript config tsconfig.json # root TypeScript config
``` ```
- Dependency layers: `workflow-protocol``workflow-util``workflow-util-agent``workflow-agent-hermes` / `cli-workflow` - Dependency layers: `workflow-protocol``workflow-util``workflow-util-agent``workflow-agent-hermes` / `workflow-agent-claude-code` / `workflow-agent-builtin` / `cli-workflow`
- Packages use `workspace:^` protocol (resolves to `^x.y.z` on publish) - Packages use `workspace:^` protocol (resolves to `^x.y.z` on publish)
- External CAS: `@ocas/core` (store API, hashing, schema validation) + `@ocas/fs` (filesystem backend) - External CAS: `@ocas/core` (store API, hashing, schema validation) + `@ocas/fs` (filesystem backend)
@@ -173,10 +176,10 @@ type Result<T, E = Error> = { ok: true; value: T } | { ok: false; error: E };
Never use `console.log/warn/error` directly — Biome's `noConsole` rule enforces this. Never use `console.log/warn/error` directly — Biome's `noConsole` rule enforces this.
All logging goes through the structured logger from `@uncaged/workflow-util`: All logging goes through the structured logger from `@united-workforce/util`:
```typescript ```typescript
import { createLogger } from "@uncaged/workflow-util"; import { createLogger } from "@united-workforce/util";
const log = createLogger(); const log = createLogger();
@@ -202,7 +205,7 @@ log("7BQST3VW", `Role ${role} started`);
### CLI entry point exception ### CLI entry point exception
The CLI package (`@uncaged/cli-workflow`) may use `console.log` for user-facing output only. Suppress with: The CLI package (`@united-workforce/cli`) may use `console.log` for user-facing output only. Suppress with:
```typescript ```typescript
// biome-ignore lint/nursery/noConsole: CLI user-facing output // biome-ignore lint/nursery/noConsole: CLI user-facing output
@@ -243,7 +246,7 @@ bun test # must pass — all package tests
### Publishing ### Publishing
All public `@uncaged/*` packages are published to **npmjs.org** with **fixed mode** (all packages share the same version number). All public `@united-workforce/*` packages are published to **npmjs.org** with **fixed mode** (all packages share the same version number).
```bash ```bash
# 1. Add a changeset describing the change # 1. Add a changeset describing the change
+2 -2
View File
@@ -1,5 +1,5 @@
{ {
"name": "@uncaged/workflow-monorepo", "name": "@united-workforce/monorepo",
"private": true, "private": true,
"packageManager": "bun@1.3.14", "packageManager": "bun@1.3.14",
"workspaces": [ "workspaces": [
@@ -25,7 +25,7 @@
"@changesets/cli": "^2.31.0", "@changesets/cli": "^2.31.0",
"@types/node": "^25.7.0", "@types/node": "^25.7.0",
"@types/xxhashjs": "^0.2.4", "@types/xxhashjs": "^0.2.4",
"@uncaged/workflow-agent-hermes": "workspace:*", "@united-workforce/agent-hermes": "workspace:*",
"bun-types": "^1.3.13", "bun-types": "^1.3.13",
"typescript": "^5.8.3", "typescript": "^5.8.3",
"yaml": "^2.9.0" "yaml": "^2.9.0"
+4 -4
View File
@@ -1,4 +1,4 @@
# @uncaged/cli-workflow # @united-workforce/cli
`uwf` CLI — thread lifecycle, workflow registry, CAS inspection, and setup. `uwf` CLI — thread lifecycle, workflow registry, CAS inspection, and setup.
@@ -20,14 +20,14 @@ workflow → thread → step → turn
This package has no library `src/index.ts` — it is consumed as a CLI binary only. This package has no library `src/index.ts` — it is consumed as a CLI binary only.
**Dependencies:** `@ocas/core`, `@ocas/fs`, `@uncaged/workflow-util-agent`, `@uncaged/workflow-protocol`, `@uncaged/workflow-util`, `commander`, `dotenv`, `mustache`, `yaml` **Dependencies:** `@ocas/core`, `@ocas/fs`, `@united-workforce/util-agent`, `@united-workforce/protocol`, `@united-workforce/util`, `commander`, `dotenv`, `mustache`, `yaml`
## Installation ## Installation
Included as the `uwf` binary when you install `@uncaged/cli-workflow`: Included as the `uwf` binary when you install `@united-workforce/cli`:
```bash ```bash
bun add -g @uncaged/cli-workflow bun add -g @united-workforce/cli
# or from the monorepo: # or from the monorepo:
bun link packages/cli-workflow bun link packages/cli-workflow
``` ```
+4 -4
View File
@@ -1,5 +1,5 @@
{ {
"name": "@uncaged/cli-workflow", "name": "@united-workforce/cli",
"version": "0.5.0", "version": "0.5.0",
"files": [ "files": [
"src", "src",
@@ -13,9 +13,9 @@
"dependencies": { "dependencies": {
"@ocas/core": "^0.1.1", "@ocas/core": "^0.1.1",
"@ocas/fs": "^0.1.1", "@ocas/fs": "^0.1.1",
"@uncaged/workflow-protocol": "workspace:^", "@united-workforce/protocol": "workspace:^",
"@uncaged/workflow-util": "workspace:^", "@united-workforce/util": "workspace:^",
"@uncaged/workflow-util-agent": "workspace:^", "@united-workforce/util-agent": "workspace:^",
"commander": "^14.0.3", "commander": "^14.0.3",
"dotenv": "^16.6.1", "dotenv": "^16.6.1",
"mustache": "^4.2.0", "mustache": "^4.2.0",
@@ -5,7 +5,7 @@ import { tmpdir } from "node:os";
import { join } from "node:path"; import { join } from "node:path";
import { putSchema } from "@ocas/core"; import { putSchema } from "@ocas/core";
import { createFsStore } from "@ocas/fs"; import { createFsStore } from "@ocas/fs";
import type { CasRef, StepNodePayload, ThreadId } from "@uncaged/workflow-protocol"; import type { CasRef, StepNodePayload, ThreadId } from "@united-workforce/protocol";
import { registerUwfSchemas } from "../schemas.js"; import { registerUwfSchemas } from "../schemas.js";
import { saveThreadsIndex } from "../store.js"; import { saveThreadsIndex } from "../store.js";
@@ -3,7 +3,7 @@ import { mkdir, rm, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os"; import { tmpdir } from "node:os";
import { join } from "node:path"; import { join } from "node:path";
import { putSchema } from "@ocas/core"; import { putSchema } from "@ocas/core";
import type { CasRef, ThreadId } from "@uncaged/workflow-protocol"; import type { CasRef, ThreadId } from "@united-workforce/protocol";
import { createMarker, deleteMarker } from "../background/index.js"; import { createMarker, deleteMarker } from "../background/index.js";
import { cmdThreadList, cmdThreadShow, cmdThreadStart } from "../commands/thread.js"; import { cmdThreadList, cmdThreadShow, cmdThreadStart } from "../commands/thread.js";
import { import {
@@ -1,5 +1,5 @@
import { describe, expect, test } from "bun:test"; import { describe, expect, test } from "bun:test";
import type { Target, WorkflowPayload } from "@uncaged/workflow-protocol"; import type { Target, WorkflowPayload } from "@united-workforce/protocol";
import { evaluate } from "../moderator/evaluate.js"; import { evaluate } from "../moderator/evaluate.js";
@@ -2,7 +2,7 @@ import { afterEach, beforeEach, describe, expect, test } from "bun:test";
import { mkdtemp, rm } from "node:fs/promises"; import { mkdtemp, rm } from "node:fs/promises";
import { tmpdir } from "node:os"; import { tmpdir } from "node:os";
import { join } from "node:path"; import { join } from "node:path";
import type { CasRef, ThreadId } from "@uncaged/workflow-protocol"; import type { CasRef, ThreadId } from "@united-workforce/protocol";
import { resolveHeadHash } from "../commands/shared.js"; import { resolveHeadHash } from "../commands/shared.js";
import { appendThreadHistory, saveThreadsIndex } from "../store.js"; import { appendThreadHistory, saveThreadsIndex } from "../store.js";
@@ -1,7 +1,7 @@
import { describe, expect, test } from "bun:test"; import { describe, expect, test } from "bun:test";
import { readFile } from "node:fs/promises"; import { readFile } from "node:fs/promises";
import { join } from "node:path"; import { join } from "node:path";
import type { WorkflowPayload } from "@uncaged/workflow-protocol"; import type { WorkflowPayload } from "@united-workforce/protocol";
import { parse } from "yaml"; import { parse } from "yaml";
/** /**
@@ -4,7 +4,7 @@ import { tmpdir } from "node:os";
import { join } from "node:path"; import { join } from "node:path";
import { bootstrap, putSchema } from "@ocas/core"; import { bootstrap, putSchema } from "@ocas/core";
import { createFsStore } from "@ocas/fs"; import { createFsStore } from "@ocas/fs";
import type { CasRef } from "@uncaged/workflow-protocol"; import type { CasRef } from "@united-workforce/protocol";
import { cmdStepRead } from "../commands/step.js"; import { cmdStepRead } from "../commands/step.js";
import { registerUwfSchemas } from "../schemas.js"; import { registerUwfSchemas } from "../schemas.js";
@@ -4,7 +4,7 @@ import { tmpdir } from "node:os";
import { join } from "node:path"; import { join } from "node:path";
import { bootstrap, type Hash, type JSONSchema, putSchema } from "@ocas/core"; import { bootstrap, type Hash, type JSONSchema, putSchema } from "@ocas/core";
import { createFsStore } from "@ocas/fs"; import { createFsStore } from "@ocas/fs";
import type { CasRef, StepNodePayload } from "@uncaged/workflow-protocol"; import type { CasRef, StepNodePayload } from "@united-workforce/protocol";
import { cmdStepShow } from "../commands/step.js"; import { cmdStepShow } from "../commands/step.js";
import { formatOutput } from "../format.js"; import { formatOutput } from "../format.js";
import { registerUwfSchemas } from "../schemas.js"; import { registerUwfSchemas } from "../schemas.js";
@@ -4,8 +4,8 @@ import { tmpdir } from "node:os";
import { join } from "node:path"; import { join } from "node:path";
import { bootstrap, putSchema } from "@ocas/core"; import { bootstrap, putSchema } from "@ocas/core";
import { createFsStore } from "@ocas/fs"; import { createFsStore } from "@ocas/fs";
import type { CasRef, ThreadId } from "@uncaged/workflow-protocol"; import type { CasRef, ThreadId } from "@united-workforce/protocol";
import { STEP_NODE_SCHEMA } from "@uncaged/workflow-protocol"; import { STEP_NODE_SCHEMA } from "@united-workforce/protocol";
import { cmdStepList } from "../commands/step.js"; import { cmdStepList } from "../commands/step.js";
import { cmdThreadRead } from "../commands/thread.js"; import { cmdThreadRead } from "../commands/thread.js";
import { registerUwfSchemas } from "../schemas.js"; import { registerUwfSchemas } from "../schemas.js";
@@ -86,7 +86,7 @@ afterEach(async () => {
describe("protocol types", () => { describe("protocol types", () => {
test("StepRecord has startedAtMs and completedAtMs as required fields", () => { test("StepRecord has startedAtMs and completedAtMs as required fields", () => {
// Type-level test: this block compiles only if fields exist and are number // Type-level test: this block compiles only if fields exist and are number
const record: import("@uncaged/workflow-protocol").StepRecord = { const record: import("@united-workforce/protocol").StepRecord = {
role: "test", role: "test",
output: "hash1" as CasRef, output: "hash1" as CasRef,
detail: "hash2" as CasRef, detail: "hash2" as CasRef,
@@ -102,7 +102,7 @@ describe("protocol types", () => {
}); });
test("StepEntry has durationMs as required field", () => { test("StepEntry has durationMs as required field", () => {
const entry: import("@uncaged/workflow-protocol").StepEntry = { const entry: import("@united-workforce/protocol").StepEntry = {
hash: "hash" as CasRef, hash: "hash" as CasRef,
role: "test", role: "test",
output: {}, output: {},
@@ -222,7 +222,7 @@ describe("step list timing", () => {
const stepEntries = result.steps.slice(1); // skip start entry const stepEntries = result.steps.slice(1); // skip start entry
expect(stepEntries).toHaveLength(1); expect(stepEntries).toHaveLength(1);
const step = stepEntries[0] as import("@uncaged/workflow-protocol").StepEntry; const step = stepEntries[0] as import("@united-workforce/protocol").StepEntry;
expect(step.durationMs).toBe(3500); expect(step.durationMs).toBe(3500);
}); });
}); });
@@ -2,7 +2,7 @@ import { describe, expect, test } from "bun:test";
import { mkdtemp } from "node:fs/promises"; import { mkdtemp } from "node:fs/promises";
import { tmpdir } from "node:os"; import { tmpdir } from "node:os";
import { join } from "node:path"; import { join } from "node:path";
import type { CasRef, ThreadId } from "@uncaged/workflow-protocol"; import type { CasRef, ThreadId } from "@united-workforce/protocol";
import { appendThreadHistory, loadThreadHistory } from "../store.js"; import { appendThreadHistory, loadThreadHistory } from "../store.js";
describe("thread cancel status", () => { describe("thread cancel status", () => {
@@ -2,9 +2,9 @@ import { afterEach, beforeEach, describe, expect, test } from "bun:test";
import { mkdir, mkdtemp, rm } from "node:fs/promises"; import { mkdir, mkdtemp, rm } from "node:fs/promises";
import { tmpdir } from "node:os"; import { tmpdir } from "node:os";
import { join } from "node:path"; import { join } from "node:path";
import type { CasRef, ThreadId } from "@uncaged/workflow-protocol"; import type { CasRef, ThreadId } from "@united-workforce/protocol";
import { createThreadIndexEntry } from "@uncaged/workflow-protocol"; import { createThreadIndexEntry } from "@united-workforce/protocol";
import { extractUlidTimestamp, generateUlid } from "@uncaged/workflow-util"; import { extractUlidTimestamp, generateUlid } from "@united-workforce/util";
import { createMarker, deleteMarker } from "../background/index.js"; import { createMarker, deleteMarker } from "../background/index.js";
import { cmdThreadList } from "../commands/thread.js"; import { cmdThreadList } from "../commands/thread.js";
import { parseTimeInput } from "../commands/thread-time-parser.js"; import { parseTimeInput } from "../commands/thread-time-parser.js";
@@ -2,7 +2,7 @@ import { describe, expect, test } from "bun:test";
import { mkdir, rm, writeFile } from "node:fs/promises"; import { mkdir, rm, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os"; import { tmpdir } from "node:os";
import { join } from "node:path"; import { join } from "node:path";
import type { CasRef, StartNodePayload, ThreadId } from "@uncaged/workflow-protocol"; import type { CasRef, StartNodePayload, ThreadId } from "@united-workforce/protocol";
import { cmdThreadStart } from "../commands/thread.js"; import { cmdThreadStart } from "../commands/thread.js";
import { createUwfStore } from "../store.js"; import { createUwfStore } from "../store.js";
@@ -4,7 +4,7 @@ import { tmpdir } from "node:os";
import { join } from "node:path"; import { join } from "node:path";
import { bootstrap, putSchema } from "@ocas/core"; import { bootstrap, putSchema } from "@ocas/core";
import { createFsStore } from "@ocas/fs"; import { createFsStore } from "@ocas/fs";
import type { CasRef, ThreadId } from "@uncaged/workflow-protocol"; import type { CasRef, ThreadId } from "@united-workforce/protocol";
import { cmdThreadRead } from "../commands/thread.js"; import { cmdThreadRead } from "../commands/thread.js";
import { registerUwfSchemas } from "../schemas.js"; import { registerUwfSchemas } from "../schemas.js";
import { saveThreadsIndex } from "../store.js"; import { saveThreadsIndex } from "../store.js";
@@ -4,7 +4,7 @@ import { tmpdir } from "node:os";
import { join } from "node:path"; import { join } from "node:path";
import { bootstrap, putSchema } from "@ocas/core"; import { bootstrap, putSchema } from "@ocas/core";
import { createFsStore } from "@ocas/fs"; import { createFsStore } from "@ocas/fs";
import type { CasRef, ThreadId } from "@uncaged/workflow-protocol"; import type { CasRef, ThreadId } from "@united-workforce/protocol";
import { cmdThreadRead, THREAD_READ_DEFAULT_QUOTA } from "../commands/thread.js"; import { cmdThreadRead, THREAD_READ_DEFAULT_QUOTA } from "../commands/thread.js";
import { registerUwfSchemas } from "../schemas.js"; import { registerUwfSchemas } from "../schemas.js";
import type { UwfStore } from "../store.js"; import type { UwfStore } from "../store.js";
@@ -5,7 +5,7 @@ import { tmpdir } from "node:os";
import { join } from "node:path"; import { join } from "node:path";
import { putSchema } from "@ocas/core"; import { putSchema } from "@ocas/core";
import { createFsStore } from "@ocas/fs"; import { createFsStore } from "@ocas/fs";
import type { CasRef, StepNodePayload, ThreadId } from "@uncaged/workflow-protocol"; import type { CasRef, StepNodePayload, ThreadId } from "@united-workforce/protocol";
import { parse } from "yaml"; import { parse } from "yaml";
import { cmdThreadShow } from "../commands/thread.js"; import { cmdThreadShow } from "../commands/thread.js";
import { registerUwfSchemas } from "../schemas.js"; import { registerUwfSchemas } from "../schemas.js";
@@ -3,7 +3,7 @@ import { mkdir, rm, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os"; import { tmpdir } from "node:os";
import { join } from "node:path"; import { join } from "node:path";
import { putSchema } from "@ocas/core"; import { putSchema } from "@ocas/core";
import type { CasRef, ThreadId } from "@uncaged/workflow-protocol"; import type { CasRef, ThreadId } from "@united-workforce/protocol";
import { createMarker, deleteMarker } from "../background/index.js"; import { createMarker, deleteMarker } from "../background/index.js";
import { cmdThreadShow, cmdThreadStart } from "../commands/thread.js"; import { cmdThreadShow, cmdThreadStart } from "../commands/thread.js";
import { import {
@@ -3,7 +3,7 @@ import { execFileSync } from "node:child_process";
import { mkdir, rm, writeFile } from "node:fs/promises"; import { mkdir, rm, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os"; import { tmpdir } from "node:os";
import { join } from "node:path"; import { join } from "node:path";
import type { CasRef, StartNodePayload, ThreadId } from "@uncaged/workflow-protocol"; import type { CasRef, StartNodePayload, ThreadId } from "@united-workforce/protocol";
import { cmdThreadStart } from "../commands/thread.js"; import { cmdThreadStart } from "../commands/thread.js";
import { createUwfStore, loadThreadsIndex } from "../store.js"; import { createUwfStore, loadThreadsIndex } from "../store.js";
@@ -5,7 +5,7 @@ import { tmpdir } from "node:os";
import { join } from "node:path"; import { join } from "node:path";
import { putSchema } from "@ocas/core"; import { putSchema } from "@ocas/core";
import { createFsStore } from "@ocas/fs"; import { createFsStore } from "@ocas/fs";
import type { CasRef, StepNodePayload, ThreadId } from "@uncaged/workflow-protocol"; import type { CasRef, StepNodePayload, ThreadId } from "@united-workforce/protocol";
import { parse } from "yaml"; import { parse } from "yaml";
import { cmdThreadShow } from "../commands/thread.js"; import { cmdThreadShow } from "../commands/thread.js";
import { registerUwfSchemas } from "../schemas.js"; import { registerUwfSchemas } from "../schemas.js";
@@ -3,8 +3,8 @@ import { mkdir, mkdtemp, rm } from "node:fs/promises";
import { tmpdir } from "node:os"; import { tmpdir } from "node:os";
import { join } from "node:path"; import { join } from "node:path";
import { putSchema } from "@ocas/core"; import { putSchema } from "@ocas/core";
import type { ThreadId } from "@uncaged/workflow-protocol"; import type { ThreadId } from "@united-workforce/protocol";
import { createThreadIndexEntry, markThreadSuspended } from "@uncaged/workflow-protocol"; import { createThreadIndexEntry, markThreadSuspended } from "@united-workforce/protocol";
import { cmdThreadList, cmdThreadShow } from "../commands/thread.js"; import { cmdThreadList, cmdThreadShow } from "../commands/thread.js";
import { createUwfStore, saveThreadsIndex } from "../store.js"; import { createUwfStore, saveThreadsIndex } from "../store.js";
@@ -4,7 +4,7 @@ import { tmpdir } from "node:os";
import { join } from "node:path"; import { join } from "node:path";
import { bootstrap, putSchema } from "@ocas/core"; import { bootstrap, putSchema } from "@ocas/core";
import { createFsStore } from "@ocas/fs"; import { createFsStore } from "@ocas/fs";
import type { CasRef, ThreadId } from "@uncaged/workflow-protocol"; import type { CasRef, ThreadId } from "@united-workforce/protocol";
import { cmdStepList, cmdStepShow } from "../commands/step.js"; import { cmdStepList, cmdStepShow } from "../commands/step.js";
import { import {
cmdThreadRead, cmdThreadRead,
@@ -1,5 +1,5 @@
import { describe, expect, test } from "bun:test"; import { describe, expect, test } from "bun:test";
import type { WorkflowPayload } from "@uncaged/workflow-protocol"; import type { WorkflowPayload } from "@united-workforce/protocol";
import { validateWorkflow } from "../validate-semantic.js"; import { validateWorkflow } from "../validate-semantic.js";
/** Build a valid two-role workflow that passes all checks. */ /** Build a valid two-role workflow that passes all checks. */
@@ -3,7 +3,7 @@ import { mkdir, mkdtemp, rm, writeFile } from "node:fs/promises";
import { tmpdir } from "node:os"; import { tmpdir } from "node:os";
import { join } from "node:path"; import { join } from "node:path";
import { createFsStore } from "@ocas/fs"; import { createFsStore } from "@ocas/fs";
import type { CasRef, WorkflowPayload } from "@uncaged/workflow-protocol"; import type { CasRef, WorkflowPayload } from "@united-workforce/protocol";
import { stringify } from "yaml"; import { stringify } from "yaml";
import { cmdThreadStart } from "../commands/thread.js"; import { cmdThreadStart } from "../commands/thread.js";
import { registerUwfSchemas } from "../schemas.js"; import { registerUwfSchemas } from "../schemas.js";
@@ -1,6 +1,6 @@
import { mkdir, readdir, readFile, rename, rm, writeFile } from "node:fs/promises"; import { mkdir, readdir, readFile, rename, rm, writeFile } from "node:fs/promises";
import { join } from "node:path"; import { join } from "node:path";
import type { RunningThreadItem, ThreadId } from "@uncaged/workflow-protocol"; import type { RunningThreadItem, ThreadId } from "@united-workforce/protocol";
import type { RunningMarker } from "./types.js"; import type { RunningMarker } from "./types.js";
@@ -1,4 +1,4 @@
import type { CasRef, ThreadId } from "@uncaged/workflow-protocol"; import type { CasRef, ThreadId } from "@united-workforce/protocol";
/** Marker file stored at ~/.uncaged/workflow/running/<thread-id>.json */ /** Marker file stored at ~/.uncaged/workflow/running/<thread-id>.json */
export type RunningMarker = { export type RunningMarker = {
+1 -1
View File
@@ -1,6 +1,6 @@
#!/usr/bin/env node #!/usr/bin/env node
import type { CasRef, ThreadId, ThreadStatus } from "@uncaged/workflow-protocol"; import type { CasRef, ThreadId, ThreadStatus } from "@united-workforce/protocol";
import { Command } from "commander"; import { Command } from "commander";
import { import {
cmdCasGet, cmdCasGet,
+2 -2
View File
@@ -4,7 +4,7 @@ import {
generateBootstrapReference, generateBootstrapReference,
generateDeveloperReference, generateDeveloperReference,
generateUserReference, generateUserReference,
} from "@uncaged/workflow-util"; } from "@united-workforce/util";
export { export {
generateAdapterReference as cmdPromptAdapter, generateAdapterReference as cmdPromptAdapter,
@@ -42,7 +42,7 @@ so that you know how to use the \`uwf\` CLI for workflow orchestration.
\`\`\`bash \`\`\`bash
uwf --help uwf --help
\`\`\` \`\`\`
If not installed: \`bun add -g @uncaged/cli-workflow\` If not installed: \`bun add -g @united-workforce/cli\`
2. **Clean up old versions of the skill** (if any exist): 2. **Clean up old versions of the skill** (if any exist):
- Look for any existing uwf/workflow skill files in your skill directories - Look for any existing uwf/workflow skill files in your skill directories
+3 -3
View File
@@ -2,7 +2,7 @@ import { existsSync, mkdirSync, readdirSync, readFileSync, statSync, writeFileSy
import { join } from "node:path"; import { join } from "node:path";
import { stdin as input, stdout as output } from "node:process"; import { stdin as input, stdout as output } from "node:process";
import { createInterface } from "node:readline/promises"; import { createInterface } from "node:readline/promises";
import type { Result } from "@uncaged/workflow-util"; import type { Result } from "@united-workforce/util";
import { parse, stringify } from "yaml"; import { parse, stringify } from "yaml";
/** /**
@@ -304,8 +304,8 @@ export async function _promptAgentSelection(
if (agents.length === 0) { if (agents.length === 0) {
console.log(" No uwf-* agent binaries found in PATH.\n"); console.log(" No uwf-* agent binaries found in PATH.\n");
console.log(" Install one first, for example:"); console.log(" Install one first, for example:");
console.log(" npm i -g @uncaged/workflow-agent-hermes"); console.log(" npm i -g @united-workforce/agent-hermes");
console.log(" npm i -g @uncaged/workflow-agent-claude-code\n"); console.log(" npm i -g @united-workforce/agent-claude-code\n");
const manual = ( const manual = (
await rl.question("Agent binary name (e.g. uwf-hermes), or press Enter to skip: ") await rl.question("Agent binary name (e.g. uwf-hermes), or press Enter to skip: ")
).trim(); ).trim();
+1 -1
View File
@@ -5,7 +5,7 @@ import type {
StartNodePayload, StartNodePayload,
StepNodePayload, StepNodePayload,
ThreadId, ThreadId,
} from "@uncaged/workflow-protocol"; } from "@united-workforce/protocol";
import { findThreadInHistory, loadThreadsIndex, type UwfStore } from "../store.js"; import { findThreadInHistory, loadThreadsIndex, type UwfStore } from "../store.js";
type ChainState = { type ChainState = {
+2 -2
View File
@@ -7,8 +7,8 @@ import type {
ThreadForkOutput, ThreadForkOutput,
ThreadId, ThreadId,
ThreadStepsOutput, ThreadStepsOutput,
} from "@uncaged/workflow-protocol"; } from "@united-workforce/protocol";
import { generateUlid } from "@uncaged/workflow-util"; import { generateUlid } from "@united-workforce/util";
import { createUwfStore, loadThreadsIndex, saveThreadsIndex } from "../store.js"; import { createUwfStore, loadThreadsIndex, saveThreadsIndex } from "../store.js";
import { import {
collectOrderedSteps, collectOrderedSteps,
+5 -5
View File
@@ -17,20 +17,20 @@ import type {
ThreadsIndex, ThreadsIndex,
WorkflowConfig, WorkflowConfig,
WorkflowPayload, WorkflowPayload,
} from "@uncaged/workflow-protocol"; } from "@united-workforce/protocol";
import { import {
createThreadIndexEntry, createThreadIndexEntry,
markThreadSuspended, markThreadSuspended,
updateThreadHead, updateThreadHead,
} from "@uncaged/workflow-protocol"; } from "@united-workforce/protocol";
import { import {
createProcessLogger, createProcessLogger,
extractUlidTimestamp, extractUlidTimestamp,
generateUlid, generateUlid,
type ProcessLogger, type ProcessLogger,
} from "@uncaged/workflow-util"; } from "@united-workforce/util";
import type { AdapterOutput } from "@uncaged/workflow-util-agent"; import type { AdapterOutput } from "@united-workforce/util-agent";
import { getEnvPath, loadWorkflowConfig } from "@uncaged/workflow-util-agent"; import { getEnvPath, loadWorkflowConfig } from "@united-workforce/util-agent";
import { config as loadDotenv } from "dotenv"; import { config as loadDotenv } from "dotenv";
import { parse } from "yaml"; import { parse } from "yaml";
import { createMarker, deleteMarker, isThreadRunning } from "../background/index.js"; import { createMarker, deleteMarker, isThreadRunning } from "../background/index.js";
@@ -3,7 +3,7 @@ import { dirname, resolve as resolvePath } from "node:path";
import type { JSONSchema } from "@ocas/core"; import type { JSONSchema } from "@ocas/core";
import { putSchema, validate } from "@ocas/core"; import { putSchema, validate } from "@ocas/core";
import type { CasRef, RoleDefinition, Target, WorkflowPayload } from "@uncaged/workflow-protocol"; import type { CasRef, RoleDefinition, Target, WorkflowPayload } from "@united-workforce/protocol";
import { parse } from "yaml"; import { parse } from "yaml";
import { createIncludeTag } from "../include.js"; import { createIncludeTag } from "../include.js";
@@ -1,4 +1,4 @@
import type { Target } from "@uncaged/workflow-protocol"; import type { Target } from "@united-workforce/protocol";
import mustache from "mustache"; import mustache from "mustache";
import type { EvaluateResult, Result } from "./types.js"; import type { EvaluateResult, Result } from "./types.js";
+1 -1
View File
@@ -1,6 +1,6 @@
import type { Hash, Store } from "@ocas/core"; import type { Hash, Store } from "@ocas/core";
import { putSchema } from "@ocas/core"; import { putSchema } from "@ocas/core";
import { START_NODE_SCHEMA, STEP_NODE_SCHEMA, WORKFLOW_SCHEMA } from "@uncaged/workflow-protocol"; import { START_NODE_SCHEMA, STEP_NODE_SCHEMA, WORKFLOW_SCHEMA } from "@united-workforce/protocol";
export const TEXT_SCHEMA = { type: "string" as const }; export const TEXT_SCHEMA = { type: "string" as const };
+2 -2
View File
@@ -11,12 +11,12 @@ import type {
ThreadIndexEntry, ThreadIndexEntry,
ThreadListItem, ThreadListItem,
ThreadsIndex, ThreadsIndex,
} from "@uncaged/workflow-protocol"; } from "@united-workforce/protocol";
import { import {
createThreadIndexEntry, createThreadIndexEntry,
parseThreadsIndex, parseThreadsIndex,
serializeThreadsIndex, serializeThreadsIndex,
} from "@uncaged/workflow-protocol"; } from "@united-workforce/protocol";
import { parse, stringify } from "yaml"; import { parse, stringify } from "yaml";
import { registerUwfSchemas, type UwfSchemaHashes } from "./schemas.js"; import { registerUwfSchemas, type UwfSchemaHashes } from "./schemas.js";
@@ -1,4 +1,4 @@
import type { WorkflowPayload } from "@uncaged/workflow-protocol"; import type { WorkflowPayload } from "@united-workforce/protocol";
type SchemaObj = Record<string, unknown>; type SchemaObj = Record<string, unknown>;
+1 -1
View File
@@ -1,5 +1,5 @@
import { basename, dirname } from "node:path"; import { basename, dirname } from "node:path";
import type { CasRef, WorkflowPayload } from "@uncaged/workflow-protocol"; import type { CasRef, WorkflowPayload } from "@united-workforce/protocol";
const CAS_REF_PATTERN = /^[0-9A-HJKMNP-TV-Z]{13}$/; const CAS_REF_PATTERN = /^[0-9A-HJKMNP-TV-Z]{13}$/;
+4 -4
View File
@@ -1,4 +1,4 @@
# @uncaged/workflow-agent-builtin # @united-workforce/agent-builtin
`uwf-builtin` agent — built-in LLM agent with file read/write and shell tools. `uwf-builtin` agent — built-in LLM agent with file read/write and shell tools.
@@ -8,14 +8,14 @@ Layer 3 agent implementation. Runs an OpenAI-compatible chat completion loop wit
Useful when you want a self-contained agent without an external CLI like Hermes or Claude Code. Useful when you want a self-contained agent without an external CLI like Hermes or Claude Code.
**Dependencies:** `@ocas/core`, `@uncaged/workflow-util-agent`, `@uncaged/workflow-util` **Dependencies:** `@ocas/core`, `@united-workforce/util-agent`, `@united-workforce/util`
## Installation ## Installation
Included as the `uwf-builtin` binary when you install `@uncaged/workflow-agent-builtin`: Included as the `uwf-builtin` binary when you install `@united-workforce/agent-builtin`:
```bash ```bash
bun add -g @uncaged/workflow-agent-builtin bun add -g @united-workforce/agent-builtin
``` ```
## CLI Usage ## CLI Usage
@@ -1,6 +1,6 @@
import { describe, expect, test } from "bun:test"; import { describe, expect, test } from "bun:test";
import type { AgentContext } from "@uncaged/workflow-util-agent"; import type { AgentContext } from "@united-workforce/util-agent";
import { buildBuiltinMessages } from "../src/prompt.js"; import { buildBuiltinMessages } from "../src/prompt.js";
+3 -3
View File
@@ -1,5 +1,5 @@
{ {
"name": "@uncaged/workflow-agent-builtin", "name": "@united-workforce/agent-builtin",
"version": "0.5.0", "version": "0.5.0",
"files": [ "files": [
"src", "src",
@@ -24,8 +24,8 @@
}, },
"dependencies": { "dependencies": {
"@ocas/core": "^0.1.1", "@ocas/core": "^0.1.1",
"@uncaged/workflow-util-agent": "workspace:^", "@united-workforce/util-agent": "workspace:^",
"@uncaged/workflow-util": "workspace:^" "@united-workforce/util": "workspace:^"
}, },
"devDependencies": { "devDependencies": {
"typescript": "^5.8.3" "typescript": "^5.8.3"
+2 -2
View File
@@ -1,5 +1,5 @@
import type { Store } from "@ocas/core"; import type { Store } from "@ocas/core";
import { createLogger, generateUlid } from "@uncaged/workflow-util"; import { createLogger, generateUlid } from "@united-workforce/util";
import { import {
type AgentContext, type AgentContext,
type AgentRunResult, type AgentRunResult,
@@ -7,7 +7,7 @@ import {
loadWorkflowConfig, loadWorkflowConfig,
resolveModel, resolveModel,
resolveStorageRoot, resolveStorageRoot,
} from "@uncaged/workflow-util-agent"; } from "@united-workforce/util-agent";
import { storeBuiltinDetail } from "./detail.js"; import { storeBuiltinDetail } from "./detail.js";
import type { ChatMessage } from "./llm/index.js"; import type { ChatMessage } from "./llm/index.js";
@@ -1,4 +1,4 @@
import type { ResolvedLlmProvider } from "@uncaged/workflow-util-agent"; import type { ResolvedLlmProvider } from "@united-workforce/util-agent";
import type { import type {
ChatMessage, ChatMessage,
+2 -2
View File
@@ -1,5 +1,5 @@
import { createLogger } from "@uncaged/workflow-util"; import { createLogger } from "@united-workforce/util";
import type { ResolvedLlmProvider } from "@uncaged/workflow-util-agent"; import type { ResolvedLlmProvider } from "@united-workforce/util-agent";
import { import {
type ChatMessage, type ChatMessage,
@@ -1,4 +1,4 @@
import { type AgentContext, buildRolePrompt } from "@uncaged/workflow-util-agent"; import { type AgentContext, buildRolePrompt } from "@united-workforce/util-agent";
import type { ChatMessage } from "./llm/index.js"; import type { ChatMessage } from "./llm/index.js";
@@ -1,7 +1,7 @@
import { appendFile, mkdir, readFile, rm } from "node:fs/promises"; import { appendFile, mkdir, readFile, rm } from "node:fs/promises";
import { join } from "node:path"; import { join } from "node:path";
import { createLogger } from "@uncaged/workflow-util"; import { createLogger } from "@united-workforce/util";
import type { BuiltinTurnPayload } from "./types.js"; import type { BuiltinTurnPayload } from "./types.js";
@@ -1,4 +1,4 @@
# @uncaged/workflow-agent-claude-code # @united-workforce/agent-claude-code
`uwf-claude-code` agent — spawns the Claude Code CLI and captures session detail. `uwf-claude-code` agent — spawns the Claude Code CLI and captures session detail.
@@ -6,14 +6,14 @@
Layer 3 agent implementation. Spawns the `claude` CLI with a composed system prompt (role definition, task, prior steps, edge prompt). Parses stream or JSON stdout, caches session IDs for multi-turn continuation, and stores raw output plus structured detail in CAS. Layer 3 agent implementation. Spawns the `claude` CLI with a composed system prompt (role definition, task, prior steps, edge prompt). Parses stream or JSON stdout, caches session IDs for multi-turn continuation, and stores raw output plus structured detail in CAS.
**Dependencies:** `@ocas/core`, `@uncaged/workflow-util-agent` **Dependencies:** `@ocas/core`, `@united-workforce/util-agent`
## Installation ## Installation
Included as the `uwf-claude-code` binary when you install `@uncaged/workflow-agent-claude-code`: Included as the `uwf-claude-code` binary when you install `@united-workforce/agent-claude-code`:
```bash ```bash
bun add -g @uncaged/workflow-agent-claude-code bun add -g @united-workforce/agent-claude-code
``` ```
Requires the `claude` CLI on `PATH`. Requires the `claude` CLI on `PATH`.
@@ -66,7 +66,7 @@ function storeClaudeCodeRawOutput(store: Store, rawOutput: string): Promise<stri
## Usage (library) ## Usage (library)
```typescript ```typescript
import { createClaudeCodeAgent, buildClaudeCodePrompt } from "@uncaged/workflow-agent-claude-code"; import { createClaudeCodeAgent, buildClaudeCodePrompt } from "@united-workforce/agent-claude-code";
const main = createClaudeCodeAgent(); const main = createClaudeCodeAgent();
void main(); void main();
@@ -86,6 +86,6 @@ src/
## Configuration ## Configuration
Uses session caching from `@uncaged/workflow-util-agent` (`getCachedSessionId` / `setCachedSessionId`). No separate config file — relies on the Claude Code CLI's own authentication. Uses session caching from `@united-workforce/util-agent` (`getCachedSessionId` / `setCachedSessionId`). No separate config file — relies on the Claude Code CLI's own authentication.
Maximum turns per invocation: 90 (constant in `claude-code.ts`). Maximum turns per invocation: 90 (constant in `claude-code.ts`).
@@ -1,6 +1,6 @@
import { describe, expect, test } from "bun:test"; import { describe, expect, test } from "bun:test";
import type { ThreadId } from "@uncaged/workflow-protocol"; import type { ThreadId } from "@united-workforce/protocol";
import type { AgentContext } from "@uncaged/workflow-util-agent"; import type { AgentContext } from "@united-workforce/util-agent";
import { buildClaudeCodePrompt } from "../src/claude-code.js"; import { buildClaudeCodePrompt } from "../src/claude-code.js";
function makeCtx(overrides: Partial<AgentContext> = {}): AgentContext { function makeCtx(overrides: Partial<AgentContext> = {}): AgentContext {
@@ -1,5 +1,5 @@
{ {
"name": "@uncaged/workflow-agent-claude-code", "name": "@united-workforce/agent-claude-code",
"version": "0.1.0", "version": "0.1.0",
"files": [ "files": [
"src", "src",
@@ -24,8 +24,8 @@
}, },
"dependencies": { "dependencies": {
"@ocas/core": "^0.1.1", "@ocas/core": "^0.1.1",
"@uncaged/workflow-util-agent": "workspace:^", "@united-workforce/util-agent": "workspace:^",
"@uncaged/workflow-util": "workspace:^" "@united-workforce/util": "workspace:^"
}, },
"devDependencies": { "devDependencies": {
"typescript": "^5.8.3" "typescript": "^5.8.3"
@@ -1,6 +1,6 @@
import { spawn } from "node:child_process"; import { spawn } from "node:child_process";
import type { Store } from "@ocas/core"; import type { Store } from "@ocas/core";
import { createLogger } from "@uncaged/workflow-util"; import { createLogger } from "@united-workforce/util";
import { import {
type AgentContext, type AgentContext,
type AgentRunResult, type AgentRunResult,
@@ -9,7 +9,7 @@ import {
createAgent, createAgent,
getCachedSessionId, getCachedSessionId,
setCachedSessionId, setCachedSessionId,
} from "@uncaged/workflow-util-agent"; } from "@united-workforce/util-agent";
import { parseClaudeCodeStreamOutput, storeClaudeCodeDetail } from "./session-detail.js"; import { parseClaudeCodeStreamOutput, storeClaudeCodeDetail } from "./session-detail.js";
+5 -5
View File
@@ -1,4 +1,4 @@
# @uncaged/workflow-agent-hermes # @united-workforce/agent-hermes
`uwf-hermes` — an **agent adapter** that bridges the `uwf` workflow engine and the Hermes CLI. `uwf-hermes` — an **agent adapter** that bridges the `uwf` workflow engine and the Hermes CLI.
@@ -8,14 +8,14 @@
On first visit to a role it sends a composed prompt (role definition, task, history, edge prompt); on continuation it resumes the cached session. Session transcripts and raw output are stored as CAS detail nodes. On first visit to a role it sends a composed prompt (role definition, task, history, edge prompt); on continuation it resumes the cached session. Session transcripts and raw output are stored as CAS detail nodes.
**Dependencies:** `@ocas/core`, `@uncaged/workflow-util-agent`, `@uncaged/workflow-protocol`, `@uncaged/workflow-util` **Dependencies:** `@ocas/core`, `@united-workforce/util-agent`, `@united-workforce/protocol`, `@united-workforce/util`
## Installation ## Installation
Included as the `uwf-hermes` binary when you install `@uncaged/workflow-agent-hermes`: Included as the `uwf-hermes` binary when you install `@united-workforce/agent-hermes`:
```bash ```bash
bun add -g @uncaged/workflow-agent-hermes bun add -g @united-workforce/agent-hermes
``` ```
Requires the `hermes` CLI on `PATH`. Requires the `hermes` CLI on `PATH`.
@@ -73,7 +73,7 @@ class HermesAcpClient {
## Usage (library) ## Usage (library)
```typescript ```typescript
import { createHermesAgent, buildHermesPrompt } from "@uncaged/workflow-agent-hermes"; import { createHermesAgent, buildHermesPrompt } from "@united-workforce/agent-hermes";
// CLI entry (src/cli.ts): // CLI entry (src/cli.ts):
const main = createHermesAgent(); const main = createHermesAgent();
@@ -1,6 +1,6 @@
import { describe, expect, test } from "bun:test"; import { describe, expect, test } from "bun:test";
import type { ThreadId } from "@uncaged/workflow-protocol"; import type { ThreadId } from "@united-workforce/protocol";
import type { AgentContext } from "@uncaged/workflow-util-agent"; import type { AgentContext } from "@united-workforce/util-agent";
import { buildHermesPrompt } from "../src/hermes.js"; import { buildHermesPrompt } from "../src/hermes.js";
function makeCtx(overrides: Partial<AgentContext> = {}): AgentContext { function makeCtx(overrides: Partial<AgentContext> = {}): AgentContext {
+4 -4
View File
@@ -1,5 +1,5 @@
{ {
"name": "@uncaged/workflow-agent-hermes", "name": "@united-workforce/agent-hermes",
"version": "0.5.0", "version": "0.5.0",
"files": [ "files": [
"src", "src",
@@ -24,9 +24,9 @@
}, },
"dependencies": { "dependencies": {
"@ocas/core": "^0.1.1", "@ocas/core": "^0.1.1",
"@uncaged/workflow-util-agent": "workspace:^", "@united-workforce/util-agent": "workspace:^",
"@uncaged/workflow-protocol": "workspace:^", "@united-workforce/protocol": "workspace:^",
"@uncaged/workflow-util": "workspace:^" "@united-workforce/util": "workspace:^"
}, },
"devDependencies": { "devDependencies": {
"typescript": "^5.8.3" "typescript": "^5.8.3"
+2 -2
View File
@@ -1,12 +1,12 @@
import type { Store } from "@ocas/core"; import type { Store } from "@ocas/core";
import { createLogger } from "@uncaged/workflow-util"; import { createLogger } from "@united-workforce/util";
import { import {
type AgentContext, type AgentContext,
type AgentRunResult, type AgentRunResult,
buildContinuationPrompt, buildContinuationPrompt,
buildRolePrompt, buildRolePrompt,
createAgent, createAgent,
} from "@uncaged/workflow-util-agent"; } from "@united-workforce/util-agent";
import { HermesAcpClient } from "./acp-client.js"; import { HermesAcpClient } from "./acp-client.js";
import { getCachedSessionId, isResumeDisabled, setCachedSessionId } from "./session-cache.js"; import { getCachedSessionId, isResumeDisabled, setCachedSessionId } from "./session-cache.js";
@@ -1,10 +1,10 @@
// Re-export session cache from the shared agent-kit package with agent name injected. // Re-export session cache from the shared agent-kit package with agent name injected.
import type { ThreadId } from "@uncaged/workflow-protocol"; import type { ThreadId } from "@united-workforce/protocol";
import { import {
getCachedSessionId as getCachedSessionIdBase, getCachedSessionId as getCachedSessionIdBase,
setCachedSessionId as setCachedSessionIdBase, setCachedSessionId as setCachedSessionIdBase,
} from "@uncaged/workflow-util-agent"; } from "@united-workforce/util-agent";
export async function getCachedSessionId(threadId: ThreadId, role: string): Promise<string | null> { export async function getCachedSessionId(threadId: ThreadId, role: string): Promise<string | null> {
return getCachedSessionIdBase("hermes", threadId, role); return getCachedSessionIdBase("hermes", threadId, role);
+3 -3
View File
@@ -1,14 +1,14 @@
# @uncaged/workflow-dashboard # @united-workforce/dashboard
Web graph editor for visualizing and editing workflow YAML definitions. Web graph editor for visualizing and editing workflow YAML definitions.
## Overview ## Overview
A private alpha web app (not part of the runtime engine stack). Provides a React + `@xyflow/react` canvas for editing workflow roles, conditions, and graph transitions. Uses `@uncaged/workflow-protocol` types for validation and YAML round-tripping. A private alpha web app (not part of the runtime engine stack). Provides a React + `@xyflow/react` canvas for editing workflow roles, conditions, and graph transitions. Uses `@united-workforce/protocol` types for validation and YAML round-tripping.
Planned integration: local `uwf connect` over WebSocket to sync YAML between CLI and the browser editor. The REST API and Elysia backend are currently stubs for development. Planned integration: local `uwf connect` over WebSocket to sync YAML between CLI and the browser editor. The REST API and Elysia backend are currently stubs for development.
**Dependencies:** `@uncaged/workflow-protocol`, `@xyflow/react`, React 19, react-router v7, Vite 8, Tailwind CSS v4, Elysia **Dependencies:** `@united-workforce/protocol`, `@xyflow/react`, React 19, react-router v7, Vite 8, Tailwind CSS v4, Elysia
## Installation ## Installation
+2 -2
View File
@@ -1,5 +1,5 @@
{ {
"name": "@uncaged/workflow-dashboard", "name": "@united-workforce/dashboard",
"version": "0.5.0-alpha.4", "version": "0.5.0-alpha.4",
"private": true, "private": true,
"type": "module", "type": "module",
@@ -12,7 +12,7 @@
"dependencies": { "dependencies": {
"@base-ui/react": "^1.5.0", "@base-ui/react": "^1.5.0",
"@fontsource-variable/geist": "^5.2.9", "@fontsource-variable/geist": "^5.2.9",
"@uncaged/workflow-protocol": "workspace:*", "@united-workforce/protocol": "workspace:*",
"@xyflow/react": "^12.10.2", "@xyflow/react": "^12.10.2",
"class-variance-authority": "^0.7.1", "class-variance-authority": "^0.7.1",
"clsx": "^2.1.1", "clsx": "^2.1.1",
@@ -1,6 +1,6 @@
import { mkdir, readdir, readFile, unlink, writeFile } from "node:fs/promises"; import { mkdir, readdir, readFile, unlink, writeFile } from "node:fs/promises";
import { join } from "node:path"; import { join } from "node:path";
import type { RoleDefinition, Target, WorkflowPayload } from "@uncaged/workflow-protocol"; import type { RoleDefinition, Target, WorkflowPayload } from "@united-workforce/protocol";
import YAML from "yaml"; import YAML from "yaml";
import type { WorkFlowSteps, WorkFlowTransition, WorkflowSummary } from "../shared/types.ts"; import type { WorkFlowSteps, WorkFlowTransition, WorkflowSummary } from "../shared/types.ts";
+3 -3
View File
@@ -1,4 +1,4 @@
# @uncaged/workflow-protocol # @united-workforce/protocol
Shared TypeScript types and JSON Schema constants for the workflow engine. Shared TypeScript types and JSON Schema constants for the workflow engine.
@@ -11,7 +11,7 @@ This is the contract layer (Layer 0). It defines `WorkflowPayload`, thread node
## Installation ## Installation
```bash ```bash
bun add @uncaged/workflow-protocol bun add @united-workforce/protocol
``` ```
## API ## API
@@ -183,4 +183,4 @@ src/
## Configuration ## Configuration
This package defines `WorkflowConfig` types only. Runtime config loading lives in `@uncaged/workflow-util-agent` (`loadWorkflowConfig`). This package defines `WorkflowConfig` types only. Runtime config loading lives in `@united-workforce/util-agent` (`loadWorkflowConfig`).
+1 -1
View File
@@ -1,5 +1,5 @@
{ {
"name": "@uncaged/workflow-protocol", "name": "@united-workforce/protocol",
"version": "0.5.0", "version": "0.5.0",
"files": [ "files": [
"src", "src",
+6 -6
View File
@@ -1,4 +1,4 @@
# @uncaged/workflow-util-agent # @united-workforce/util-agent
Agent framework — `createAgent` factory, context builder, frontmatter fast-path, and LLM extract pipeline. Agent framework — `createAgent` factory, context builder, frontmatter fast-path, and LLM extract pipeline.
@@ -8,12 +8,12 @@ Layer 2 agent framework. Provides the standard entrypoint for all agent CLIs: pa
Also exports prompt builders, config/storage helpers, and session ID caching for multi-turn agents. Also exports prompt builders, config/storage helpers, and session ID caching for multi-turn agents.
**Dependencies:** `@ocas/core`, `@ocas/fs`, `@uncaged/workflow-protocol`, `@uncaged/workflow-util`, `dotenv`, `yaml` **Dependencies:** `@ocas/core`, `@ocas/fs`, `@united-workforce/protocol`, `@united-workforce/util`, `dotenv`, `yaml`
## Installation ## Installation
```bash ```bash
bun add @uncaged/workflow-util-agent bun add @united-workforce/util-agent
``` ```
## API ## API
@@ -140,8 +140,8 @@ function loadWorkflowConfig(storageRoot: string): Promise<WorkflowConfig>
## Usage ## Usage
```typescript ```typescript
import { createAgent, buildRolePrompt } from "@uncaged/workflow-util-agent"; import { createAgent, buildRolePrompt } from "@united-workforce/util-agent";
import type { AgentContext, AgentRunResult } from "@uncaged/workflow-util-agent"; import type { AgentContext, AgentRunResult } from "@united-workforce/util-agent";
async function run(ctx: AgentContext): Promise<AgentRunResult> { async function run(ctx: AgentContext): Promise<AgentRunResult> {
const prompt = buildRolePrompt(ctx.workflow.roles[ctx.role]!); const prompt = buildRolePrompt(ctx.workflow.roles[ctx.role]!);
@@ -180,4 +180,4 @@ src/
## Configuration ## Configuration
Reads `config.yaml` and `.env` from the workflow storage root (`~/.uncaged/workflow` by default). See `@uncaged/workflow-protocol` for `WorkflowConfig` shape. Set via `uwf setup`. Reads `config.yaml` and `.env` from the workflow storage root (`~/.uncaged/workflow` by default). See `@united-workforce/protocol` for `WorkflowConfig` shape. Set via `uwf setup`.
@@ -1,5 +1,5 @@
import { describe, expect, test } from "bun:test"; import { describe, expect, test } from "bun:test";
import type { StepContext } from "@uncaged/workflow-protocol"; import type { StepContext } from "@united-workforce/protocol";
import { buildContinuationPrompt } from "../src/build-continuation-prompt.js"; import { buildContinuationPrompt } from "../src/build-continuation-prompt.js";
const reviewerStep: StepContext = { const reviewerStep: StepContext = {
@@ -1,5 +1,5 @@
import { describe, expect, test } from "bun:test"; import { describe, expect, test } from "bun:test";
import type { RoleDefinition } from "@uncaged/workflow-protocol"; import type { RoleDefinition } from "@united-workforce/protocol";
import { buildRolePrompt } from "../src/build-role-prompt.js"; import { buildRolePrompt } from "../src/build-role-prompt.js";
describe("buildRolePrompt", () => { describe("buildRolePrompt", () => {
@@ -1,5 +1,5 @@
import { describe, expect, test } from "bun:test"; import { describe, expect, test } from "bun:test";
import type { WorkflowConfig } from "@uncaged/workflow-protocol"; import type { WorkflowConfig } from "@united-workforce/protocol";
import { resolveExtractModelAlias } from "../src/extract.js"; import { resolveExtractModelAlias } from "../src/extract.js";
function baseConfig(overrides: Partial<WorkflowConfig> = {}): WorkflowConfig { function baseConfig(overrides: Partial<WorkflowConfig> = {}): WorkflowConfig {
@@ -1,7 +1,7 @@
import { afterEach, beforeEach, describe, expect, test } from "bun:test"; import { afterEach, beforeEach, describe, expect, test } from "bun:test";
import { mkdir, readdir, readFile, rm, stat, writeFile } from "node:fs/promises"; import { mkdir, readdir, readFile, rm, stat, writeFile } from "node:fs/promises";
import { dirname, join } from "node:path"; import { dirname, join } from "node:path";
import type { ThreadId } from "@uncaged/workflow-protocol"; import type { ThreadId } from "@united-workforce/protocol";
import { getCachedSessionId, getCachePath, setCachedSessionId } from "../src/session-cache.js"; import { getCachedSessionId, getCachePath, setCachedSessionId } from "../src/session-cache.js";
import { resolveStorageRoot } from "../src/storage.js"; import { resolveStorageRoot } from "../src/storage.js";
+3 -3
View File
@@ -1,5 +1,5 @@
{ {
"name": "@uncaged/workflow-util-agent", "name": "@united-workforce/util-agent",
"version": "0.5.0", "version": "0.5.0",
"files": [ "files": [
"src", "src",
@@ -22,8 +22,8 @@
"dependencies": { "dependencies": {
"@ocas/core": "^0.1.1", "@ocas/core": "^0.1.1",
"@ocas/fs": "^0.1.1", "@ocas/fs": "^0.1.1",
"@uncaged/workflow-protocol": "workspace:^", "@united-workforce/protocol": "workspace:^",
"@uncaged/workflow-util": "workspace:^", "@united-workforce/util": "workspace:^",
"dotenv": "^16.6.1", "dotenv": "^16.6.1",
"yaml": "^2.8.4" "yaml": "^2.8.4"
}, },
@@ -1,4 +1,4 @@
import type { StepContext } from "@uncaged/workflow-protocol"; import type { StepContext } from "@united-workforce/protocol";
function formatStep(step: StepContext, stepNumber: number, includeContent: boolean): string { function formatStep(step: StepContext, stepNumber: number, includeContent: boolean): string {
const lines = [ const lines = [
@@ -1,5 +1,5 @@
import type { RoleDefinition } from "@uncaged/workflow-protocol"; import type { RoleDefinition } from "@united-workforce/protocol";
import { generateCliReference } from "@uncaged/workflow-util"; import { generateCliReference } from "@united-workforce/util";
/** /**
* Build the role prompt from a RoleDefinition. * Build the role prompt from a RoleDefinition.
+1 -1
View File
@@ -5,7 +5,7 @@ import type {
StepContext, StepContext,
StepNodePayload, StepNodePayload,
ThreadId, ThreadId,
} from "@uncaged/workflow-protocol"; } from "@united-workforce/protocol";
import type { AgentStore } from "./storage.js"; import type { AgentStore } from "./storage.js";
import { createAgentStore, loadThreadsIndex, resolveStorageRoot } from "./storage.js"; import { createAgentStore, loadThreadsIndex, resolveStorageRoot } from "./storage.js";
import type { AgentContext } from "./types.js"; import type { AgentContext } from "./types.js";
+1 -1
View File
@@ -1,6 +1,6 @@
import { getSchema, validate } from "@ocas/core"; import { getSchema, validate } from "@ocas/core";
import type { CasRef, ModelAlias, WorkflowConfig } from "@uncaged/workflow-protocol"; import type { CasRef, ModelAlias, WorkflowConfig } from "@united-workforce/protocol";
import { createAgentStore, resolveStorageRoot } from "./storage.js"; import { createAgentStore, resolveStorageRoot } from "./storage.js";
export type ResolvedLlmProvider = { export type ResolvedLlmProvider = {
@@ -1,12 +1,12 @@
import type { Store } from "@ocas/core"; import type { Store } from "@ocas/core";
import { getSchema, validate } from "@ocas/core"; import { getSchema, validate } from "@ocas/core";
import type { CasRef } from "@uncaged/workflow-protocol"; import type { CasRef } from "@united-workforce/protocol";
import { import {
type AgentFrontmatter, type AgentFrontmatter,
createLogger, createLogger,
parseFrontmatterMarkdown, parseFrontmatterMarkdown,
validateFrontmatter, validateFrontmatter,
} from "@uncaged/workflow-util"; } from "@united-workforce/util";
import { parse as parseYaml } from "yaml"; import { parse as parseYaml } from "yaml";
import { extractSchemaFields } from "./build-output-format-instruction.js"; import { extractSchemaFields } from "./build-output-format-instruction.js";
+1 -1
View File
@@ -1,5 +1,5 @@
import { getSchema, validate } from "@ocas/core"; import { getSchema, validate } from "@ocas/core";
import type { CasRef, StepNodePayload, ThreadId } from "@uncaged/workflow-protocol"; import type { CasRef, StepNodePayload, ThreadId } from "@united-workforce/protocol";
import { config as loadDotenv } from "dotenv"; import { config as loadDotenv } from "dotenv";
import { buildOutputFormatInstruction } from "./build-output-format-instruction.js"; import { buildOutputFormatInstruction } from "./build-output-format-instruction.js";
import { buildContextWithMeta } from "./context.js"; import { buildContextWithMeta } from "./context.js";
+1 -1
View File
@@ -1,6 +1,6 @@
import type { Hash, Store } from "@ocas/core"; import type { Hash, Store } from "@ocas/core";
import { putSchema } from "@ocas/core"; import { putSchema } from "@ocas/core";
import { START_NODE_SCHEMA, STEP_NODE_SCHEMA, WORKFLOW_SCHEMA } from "@uncaged/workflow-protocol"; import { START_NODE_SCHEMA, STEP_NODE_SCHEMA, WORKFLOW_SCHEMA } from "@united-workforce/protocol";
export type UwfAgentSchemaHashes = { export type UwfAgentSchemaHashes = {
workflow: Hash; workflow: Hash;
@@ -2,7 +2,7 @@ import { randomBytes } from "node:crypto";
import { mkdir, readFile, rename, writeFile } from "node:fs/promises"; import { mkdir, readFile, rename, writeFile } from "node:fs/promises";
import { dirname, join } from "node:path"; import { dirname, join } from "node:path";
import type { ThreadId } from "@uncaged/workflow-protocol"; import type { ThreadId } from "@united-workforce/protocol";
import { resolveStorageRoot } from "./storage.js"; import { resolveStorageRoot } from "./storage.js";
+2 -2
View File
@@ -15,8 +15,8 @@ import type {
ThreadsIndex, ThreadsIndex,
WorkflowConfig, WorkflowConfig,
WorkflowName, WorkflowName,
} from "@uncaged/workflow-protocol"; } from "@united-workforce/protocol";
import { parseThreadsIndex } from "@uncaged/workflow-protocol"; import { parseThreadsIndex } from "@united-workforce/protocol";
import { parse } from "yaml"; import { parse } from "yaml";
import { registerAgentSchemas } from "./schemas.js"; import { registerAgentSchemas } from "./schemas.js";
+1 -1
View File
@@ -1,5 +1,5 @@
import type { Store } from "@ocas/core"; import type { Store } from "@ocas/core";
import type { ModeratorContext, ThreadId, WorkflowPayload } from "@uncaged/workflow-protocol"; import type { ModeratorContext, ThreadId, WorkflowPayload } from "@united-workforce/protocol";
export type AgentContext = ModeratorContext & { export type AgentContext = ModeratorContext & {
threadId: ThreadId; threadId: ThreadId;
+3 -3
View File
@@ -1,4 +1,4 @@
# @uncaged/workflow-util # @united-workforce/util
Shared utilities: encoding, IDs, logging, frontmatter parsing, storage paths, and CLI reference generation. Shared utilities: encoding, IDs, logging, frontmatter parsing, storage paths, and CLI reference generation.
@@ -11,7 +11,7 @@ Layer 1 shared infrastructure used across CLI, agent-kit, and agent packages. Pr
## Installation ## Installation
```bash ```bash
bun add @uncaged/workflow-util bun add @united-workforce/util
``` ```
## API ## API
@@ -114,7 +114,7 @@ import {
generateUlid, generateUlid,
getDefaultWorkflowStorageRoot, getDefaultWorkflowStorageRoot,
parseFrontmatterMarkdown, parseFrontmatterMarkdown,
} from "@uncaged/workflow-util"; } from "@united-workforce/util";
const log = createLogger(); const log = createLogger();
log("4KNMR2PX", "Loading workflow..."); log("4KNMR2PX", "Loading workflow...");
+1 -1
View File
@@ -1,5 +1,5 @@
{ {
"name": "@uncaged/workflow-util", "name": "@united-workforce/util",
"version": "0.5.0", "version": "0.5.0",
"files": [ "files": [
"src", "src",
@@ -16,8 +16,8 @@ The adapter must produce frontmatter markdown output. The engine handles argumen
## Quick Start ## Quick Start
\`\`\`typescript \`\`\`typescript
import { createAgent } from "@uncaged/workflow-util-agent"; import { createAgent } from "@united-workforce/util-agent";
import type { AgentContext, AgentRunResult, AgentContinueFn, AgentRunFn } from "@uncaged/workflow-util-agent"; import type { AgentContext, AgentRunResult, AgentContinueFn, AgentRunFn } from "@united-workforce/util-agent";
const run: AgentRunFn = async (ctx: AgentContext): Promise<AgentRunResult> => { const run: AgentRunFn = async (ctx: AgentContext): Promise<AgentRunResult> => {
// 1. Build your prompt from ctx // 1. Build your prompt from ctx
@@ -91,7 +91,7 @@ type AgentRunResult = {
## Building the Prompt ## Building the Prompt
Use helpers from \`@uncaged/workflow-util-agent\`: Use helpers from \`@united-workforce/util-agent\`:
| Helper | Purpose | | Helper | Purpose |
|--------|---------| |--------|---------|
@@ -145,9 +145,9 @@ defaultAgent: my-agent
| Adapter | Package | Backend | | Adapter | Package | Backend |
|---------|---------|---------| |---------|---------|---------|
| \`uwf-hermes\` | \`@uncaged/workflow-agent-hermes\` | Hermes ACP (chat sessions) | | \`uwf-hermes\` | \`@united-workforce/agent-hermes\` | Hermes ACP (chat sessions) |
| \`uwf-builtin\` | \`@uncaged/workflow-agent-builtin\` | Direct OpenAI API (tools + loop) | | \`uwf-builtin\` | \`@united-workforce/agent-builtin\` | Direct OpenAI API (tools + loop) |
| \`uwf-claude-code\` | \`@uncaged/workflow-agent-claude-code\` | Claude Code CLI | | \`uwf-claude-code\` | \`@united-workforce/agent-claude-code\` | Claude Code CLI |
Study these for patterns on prompt building, session management, and detail storage. Study these for patterns on prompt building, session management, and detail storage.
@@ -39,7 +39,7 @@ Classes allowed only when required by third-party libraries or for Error subclas
### Error Handling ### Error Handling
- \`Result<T, E>\` type for expected failures (\`ok\`/\`err\` constructors from \`@uncaged/workflow-util\`) - \`Result<T, E>\` type for expected failures (\`ok\`/\`err\` constructors from \`@united-workforce/util\`)
- \`throw\` only for unrecoverable bugs - \`throw\` only for unrecoverable bugs
- No try-catch for flow control - No try-catch for flow control
@@ -52,14 +52,14 @@ Always \`async/await\`, never \`.then()\` chains.
\`console.*\` is banned (Biome \`noConsole\` rule). Use the structured logger: \`console.*\` is banned (Biome \`noConsole\` rule). Use the structured logger:
\`\`\`typescript \`\`\`typescript
import { createLogger } from "@uncaged/workflow-util"; import { createLogger } from "@united-workforce/util";
const log = createLogger(); const log = createLogger();
log("4KNMR2PX", "Loading workflow..."); // 8-char Crockford Base32 tag log("4KNMR2PX", "Loading workflow..."); // 8-char Crockford Base32 tag
\`\`\` \`\`\`
Each call site gets a unique hand-written tag. \`grep "4KNMR2PX"\` in logs → instant code location. Each call site gets a unique hand-written tag. \`grep "4KNMR2PX"\` in logs → instant code location.
CLI package (\`@uncaged/cli-workflow\`) may use \`console.log\` for user-facing output with a biome-ignore comment. CLI package (\`@united-workforce/cli\`) may use \`console.log\` for user-facing output with a biome-ignore comment.
### No Dynamic Import ### No Dynamic Import
@@ -90,7 +90,7 @@ Before committing: \`bun run check\` + \`bun test\` must both pass.
### Publishing ### Publishing
Fixed-mode versioning all \`@uncaged/*\` packages share the same version number. Fixed-mode versioning all \`@united-workforce/*\` packages share the same version number.
\`\`\`bash \`\`\`bash
bun changeset # describe the change bun changeset # describe the change