chore: rename uwf-* → workflow-*, cli-uwf → cli-workflow
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)
This commit is contained in:
+19
-19
@@ -1,4 +1,4 @@
|
|||||||
# uwf — Architecture
|
# Workflow Engine — Architecture
|
||||||
|
|
||||||
**Last updated:** 2026-05-19
|
**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 |
|
| 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. |
|
| 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`. |
|
| Moderator | `@uncaged/workflow-moderator` → `workflow-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 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/uwf-agent-hermes` → `uwf-agent-hermes` | `uwf-hermes` CLI binary — spawns `hermes chat`, pipes prompt, captures session detail. |
|
| Agent: Hermes | `@uncaged/workflow-agent-hermes` → `workflow-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. |
|
| CLI | `@uncaged/cli-workflow` → `cli-workflow` | `uwf` binary — thread lifecycle, workflow registry, CAS inspection, setup. |
|
||||||
|
|
||||||
### External dependencies
|
### 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` | Content-addressed store API, XXH64 hashing, JSON Schema registration and validation. |
|
||||||
| `@uncaged/json-cas-fs` | Filesystem backend for `json-cas`. |
|
| `@uncaged/json-cas-fs` | Filesystem backend for `json-cas`. |
|
||||||
| `jsonata` | JSONata expression evaluator (used by `uwf-moderator`). |
|
| `jsonata` | JSONata expression evaluator (used by `workflow-moderator`). |
|
||||||
| `commander` | CLI argument parsing (used by `cli-uwf`). |
|
| `commander` | CLI argument parsing (used by `cli-workflow`). |
|
||||||
| `dotenv` | Loads `.env` files for API keys. |
|
| `dotenv` | Loads `.env` files for API keys. |
|
||||||
| `yaml` | YAML parse/stringify. |
|
| `yaml` | YAML parse/stringify. |
|
||||||
|
|
||||||
@@ -41,20 +41,20 @@ flowchart BT
|
|||||||
jcasfs["@uncaged/json-cas-fs"]
|
jcasfs["@uncaged/json-cas-fs"]
|
||||||
end
|
end
|
||||||
subgraph L0["Layer 0 — contract"]
|
subgraph L0["Layer 0 — contract"]
|
||||||
protocol["@uncaged/uwf-protocol"]
|
protocol["@uncaged/workflow-protocol"]
|
||||||
end
|
end
|
||||||
subgraph L1["Layer 1 — shared"]
|
subgraph L1["Layer 1 — shared"]
|
||||||
util["@uncaged/workflow-util"]
|
util["@uncaged/workflow-util"]
|
||||||
moderator["@uncaged/uwf-moderator"]
|
moderator["@uncaged/workflow-moderator"]
|
||||||
end
|
end
|
||||||
subgraph L2["Layer 2 — agent framework"]
|
subgraph L2["Layer 2 — agent framework"]
|
||||||
kit["@uncaged/uwf-agent-kit"]
|
kit["@uncaged/workflow-agent-kit"]
|
||||||
end
|
end
|
||||||
subgraph L3["Layer 3 — agent implementations"]
|
subgraph L3["Layer 3 — agent implementations"]
|
||||||
hermes["@uncaged/uwf-agent-hermes"]
|
hermes["@uncaged/workflow-agent-hermes"]
|
||||||
end
|
end
|
||||||
subgraph L4["Layer 4 — CLI"]
|
subgraph L4["Layer 4 — CLI"]
|
||||||
cli["@uncaged/cli-uwf"]
|
cli["@uncaged/cli-workflow"]
|
||||||
end
|
end
|
||||||
protocol --> jcasfs
|
protocol --> jcasfs
|
||||||
util --> protocol
|
util --> protocol
|
||||||
@@ -141,7 +141,7 @@ Key properties:
|
|||||||
|
|
||||||
## Three-phase engine loop
|
## 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
|
┌─→ Phase 1: MODERATOR
|
||||||
@@ -167,7 +167,7 @@ Each `uwf thread step` runs exactly one cycle: moderator → agent → extract.
|
|||||||
|
|
||||||
### Context types
|
### Context types
|
||||||
|
|
||||||
Defined in `packages/uwf-protocol/src/types.ts`:
|
Defined in `packages/workflow-protocol/src/types.ts`:
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
type StepContext = {
|
type StepContext = {
|
||||||
@@ -209,7 +209,7 @@ Each agent is an external command invoked by `uwf thread step`:
|
|||||||
Contract:
|
Contract:
|
||||||
1. `uwf thread step` determines the next role via the moderator
|
1. `uwf thread step` determines the next role via the moderator
|
||||||
2. Agent CLI is spawned with `(thread-id, role)` as positional args
|
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
|
- Parses argv
|
||||||
- Loads `.env` from storage root
|
- Loads `.env` from storage root
|
||||||
- Builds `AgentContext` by walking the CAS chain from `threads.yaml` head
|
- 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...
|
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
|
## 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`)
|
### 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
|
## 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
|
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."
|
2. **Scope constraint** — "Focus exclusively on YOUR role's deliverable. Do not perform actions outside your role's scope."
|
||||||
|
|||||||
@@ -340,12 +340,12 @@ OPENROUTER_API_KEY=sk-or-...
|
|||||||
|
|
||||||
```
|
```
|
||||||
packages/
|
packages/
|
||||||
├── cli-uwf/ # @uncaged/cli-uwf — uwf CLI(thread/workflow 命令)
|
├── cli-workflow/ # @uncaged/cli-workflow — uwf CLI(thread/workflow 命令)
|
||||||
├── uwf-moderator/ # @uncaged/uwf-moderator — JSONata moderator 引擎
|
├── workflow-moderator/ # @uncaged/workflow-moderator — JSONata moderator 引擎
|
||||||
├── uwf-agent-kit/ # @uncaged/uwf-agent-kit — Agent CLI 框架(含 extractor)
|
├── workflow-agent-kit/ # @uncaged/workflow-agent-kit — Agent CLI 框架(含 extractor)
|
||||||
├── uwf-agent-hermes/ # @uncaged/uwf-agent-hermes — uwf-hermes CLI
|
├── workflow-agent-hermes/ # @uncaged/workflow-agent-hermes — uwf-hermes CLI
|
||||||
├── uwf-agent-cursor/ # @uncaged/uwf-agent-cursor — uwf-cursor CLI
|
├── workflow-agent-cursor/ # @uncaged/workflow-agent-cursor — uwf-cursor CLI
|
||||||
└── uwf-protocol/ # @uncaged/uwf-protocol — 共享类型定义
|
└── workflow-protocol/ # @uncaged/workflow-protocol — 共享类型定义
|
||||||
```
|
```
|
||||||
|
|
||||||
**外部依赖:**
|
**外部依赖:**
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "@uncaged/cli-uwf",
|
"name": "@uncaged/cli-workflow",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"files": [
|
"files": [
|
||||||
"src",
|
"src",
|
||||||
@@ -13,9 +13,9 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@uncaged/json-cas": "^0.3.0",
|
"@uncaged/json-cas": "^0.3.0",
|
||||||
"@uncaged/json-cas-fs": "^0.3.0",
|
"@uncaged/json-cas-fs": "^0.3.0",
|
||||||
"@uncaged/uwf-agent-kit": "workspace:^",
|
"@uncaged/workflow-agent-kit": "workspace:^",
|
||||||
"@uncaged/uwf-moderator": "workspace:^",
|
"@uncaged/workflow-moderator": "workspace:^",
|
||||||
"@uncaged/uwf-protocol": "workspace:^",
|
"@uncaged/workflow-protocol": "workspace:^",
|
||||||
"@uncaged/workflow-util": "workspace:^",
|
"@uncaged/workflow-util": "workspace:^",
|
||||||
"commander": "^14.0.3",
|
"commander": "^14.0.3",
|
||||||
"dotenv": "^16.6.1",
|
"dotenv": "^16.6.1",
|
||||||
+1
-1
@@ -3,7 +3,7 @@ import { tmpdir } from "node:os";
|
|||||||
import { join } from "node:path";
|
import { join } from "node:path";
|
||||||
import { bootstrap, putSchema } from "@uncaged/json-cas";
|
import { bootstrap, putSchema } from "@uncaged/json-cas";
|
||||||
import { createFsStore } from "@uncaged/json-cas-fs";
|
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 { afterEach, beforeEach, describe, expect, test } from "vitest";
|
||||||
import {
|
import {
|
||||||
cmdThreadRead,
|
cmdThreadRead,
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bun
|
#!/usr/bin/env bun
|
||||||
|
|
||||||
import type { ThreadId } from "@uncaged/uwf-protocol";
|
import type { ThreadId } from "@uncaged/workflow-protocol";
|
||||||
import { Command } from "commander";
|
import { Command } from "commander";
|
||||||
import { stringify as yamlStringify } from "yaml";
|
import { stringify as yamlStringify } from "yaml";
|
||||||
import {
|
import {
|
||||||
+3
-3
@@ -1,8 +1,8 @@
|
|||||||
import { execFileSync } from "node:child_process";
|
import { execFileSync } from "node:child_process";
|
||||||
import type { Store as CasStore, JSONSchema } from "@uncaged/json-cas";
|
import type { Store as CasStore, JSONSchema } from "@uncaged/json-cas";
|
||||||
import { getSchema, validate } from "@uncaged/json-cas";
|
import { getSchema, validate } from "@uncaged/json-cas";
|
||||||
import { getEnvPath, loadWorkflowConfig } from "@uncaged/uwf-agent-kit";
|
import { getEnvPath, loadWorkflowConfig } from "@uncaged/workflow-agent-kit";
|
||||||
import { evaluate } from "@uncaged/uwf-moderator";
|
import { evaluate } from "@uncaged/workflow-moderator";
|
||||||
import type {
|
import type {
|
||||||
AgentAlias,
|
AgentAlias,
|
||||||
AgentConfig,
|
AgentConfig,
|
||||||
@@ -21,7 +21,7 @@ import type {
|
|||||||
ThreadStepsOutput,
|
ThreadStepsOutput,
|
||||||
WorkflowConfig,
|
WorkflowConfig,
|
||||||
WorkflowPayload,
|
WorkflowPayload,
|
||||||
} from "@uncaged/uwf-protocol";
|
} from "@uncaged/workflow-protocol";
|
||||||
import { generateUlid } from "@uncaged/workflow-util";
|
import { generateUlid } from "@uncaged/workflow-util";
|
||||||
import { config as loadDotenv } from "dotenv";
|
import { config as loadDotenv } from "dotenv";
|
||||||
import { stringify } from "yaml";
|
import { stringify } from "yaml";
|
||||||
+1
-1
@@ -2,7 +2,7 @@ import { readFile } from "node:fs/promises";
|
|||||||
|
|
||||||
import type { JSONSchema } from "@uncaged/json-cas";
|
import type { JSONSchema } from "@uncaged/json-cas";
|
||||||
import { putSchema, validate } 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 { parse } from "yaml";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -4,7 +4,7 @@ import {
|
|||||||
START_NODE_SCHEMA,
|
START_NODE_SCHEMA,
|
||||||
STEP_NODE_SCHEMA,
|
STEP_NODE_SCHEMA,
|
||||||
WORKFLOW_SCHEMA,
|
WORKFLOW_SCHEMA,
|
||||||
} from "@uncaged/uwf-protocol";
|
} from "@uncaged/workflow-protocol";
|
||||||
|
|
||||||
export type UwfSchemaHashes = {
|
export type UwfSchemaHashes = {
|
||||||
workflow: Hash;
|
workflow: Hash;
|
||||||
@@ -4,7 +4,7 @@ import { join } from "node:path";
|
|||||||
|
|
||||||
import type { Hash, Store } from "@uncaged/json-cas";
|
import type { Hash, Store } from "@uncaged/json-cas";
|
||||||
import { createFsStore } from "@uncaged/json-cas-fs";
|
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 { parse, stringify } from "yaml";
|
||||||
|
|
||||||
import { registerUwfSchemas, type UwfSchemaHashes } from "./schemas.js";
|
import { registerUwfSchemas, type UwfSchemaHashes } from "./schemas.js";
|
||||||
@@ -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}$/;
|
const CAS_REF_PATTERN = /^[0-9A-HJKMNP-TV-Z]{13}$/;
|
||||||
|
|
||||||
@@ -6,8 +6,8 @@
|
|||||||
},
|
},
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"references": [
|
"references": [
|
||||||
{ "path": "../uwf-protocol" },
|
{ "path": "../workflow-protocol" },
|
||||||
{ "path": "../uwf-moderator" },
|
{ "path": "../workflow-moderator" },
|
||||||
{ "path": "../uwf-agent-kit" }
|
{ "path": "../workflow-agent-kit" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
+2
-2
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "@uncaged/uwf-agent-hermes",
|
"name": "@uncaged/workflow-agent-hermes",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"files": [
|
"files": [
|
||||||
"src",
|
"src",
|
||||||
@@ -22,7 +22,7 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@uncaged/json-cas": "^0.3.0",
|
"@uncaged/json-cas": "^0.3.0",
|
||||||
"@uncaged/uwf-agent-kit": "workspace:^"
|
"@uncaged/workflow-agent-kit": "workspace:^"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"typescript": "^5.8.3"
|
"typescript": "^5.8.3"
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
import { spawn } from "node:child_process";
|
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 {
|
import {
|
||||||
loadHermesSession,
|
loadHermesSession,
|
||||||
@@ -5,5 +5,5 @@
|
|||||||
"outDir": "dist"
|
"outDir": "dist"
|
||||||
},
|
},
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"references": [{ "path": "../uwf-protocol" }]
|
"references": [{ "path": "../workflow-agent-kit" }]
|
||||||
}
|
}
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
import { describe, expect, test } from "bun:test";
|
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";
|
import { resolveExtractModelAlias } from "../src/extract.js";
|
||||||
|
|
||||||
function baseConfig(overrides: Partial<WorkflowConfig> = {}): WorkflowConfig {
|
function baseConfig(overrides: Partial<WorkflowConfig> = {}): WorkflowConfig {
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "@uncaged/uwf-agent-kit",
|
"name": "@uncaged/workflow-agent-kit",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"files": [
|
"files": [
|
||||||
"src",
|
"src",
|
||||||
@@ -20,7 +20,7 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@uncaged/json-cas": "^0.3.0",
|
"@uncaged/json-cas": "^0.3.0",
|
||||||
"@uncaged/json-cas-fs": "^0.3.0",
|
"@uncaged/json-cas-fs": "^0.3.0",
|
||||||
"@uncaged/uwf-protocol": "workspace:^",
|
"@uncaged/workflow-protocol": "workspace:^",
|
||||||
"@uncaged/workflow-util": "workspace:^",
|
"@uncaged/workflow-util": "workspace:^",
|
||||||
"dotenv": "^16.6.1",
|
"dotenv": "^16.6.1",
|
||||||
"yaml": "^2.8.4"
|
"yaml": "^2.8.4"
|
||||||
@@ -5,7 +5,7 @@ import type {
|
|||||||
StepContext,
|
StepContext,
|
||||||
StepNodePayload,
|
StepNodePayload,
|
||||||
ThreadId,
|
ThreadId,
|
||||||
} from "@uncaged/uwf-protocol";
|
} from "@uncaged/workflow-protocol";
|
||||||
import { createAgentStore, loadThreadsIndex, resolveStorageRoot } from "./storage.js";
|
import { createAgentStore, loadThreadsIndex, resolveStorageRoot } from "./storage.js";
|
||||||
import type { AgentStore } from "./storage.js";
|
import type { AgentStore } from "./storage.js";
|
||||||
import type { AgentContext } from "./types.js";
|
import type { AgentContext } from "./types.js";
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import { getSchema, validate } from "@uncaged/json-cas";
|
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 { config as loadDotenv } from "dotenv";
|
||||||
import { createAgentStore, getEnvPath, resolveStorageRoot } from "./storage.js";
|
import { createAgentStore, getEnvPath, resolveStorageRoot } from "./storage.js";
|
||||||
|
|
||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
import { validate } from "@uncaged/json-cas";
|
import { validate } from "@uncaged/json-cas";
|
||||||
import type { Store } 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";
|
import { parseFrontmatterMarkdown, validateFrontmatter } from "@uncaged/workflow-util";
|
||||||
|
|
||||||
export type FrontmatterFastPathResult = {
|
export type FrontmatterFastPathResult = {
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import { getSchema, validate } from "@uncaged/json-cas";
|
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 { config as loadDotenv } from "dotenv";
|
||||||
|
|
||||||
import { buildContextWithMeta } from "./context.js";
|
import { buildContextWithMeta } from "./context.js";
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import type { Hash, Store } from "@uncaged/json-cas";
|
import type { Hash, Store } from "@uncaged/json-cas";
|
||||||
import { putSchema } 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 = {
|
export type UwfAgentSchemaHashes = {
|
||||||
workflow: Hash;
|
workflow: Hash;
|
||||||
@@ -16,7 +16,7 @@ import type {
|
|||||||
ThreadsIndex,
|
ThreadsIndex,
|
||||||
WorkflowConfig,
|
WorkflowConfig,
|
||||||
WorkflowName,
|
WorkflowName,
|
||||||
} from "@uncaged/uwf-protocol";
|
} from "@uncaged/workflow-protocol";
|
||||||
import { parse } from "yaml";
|
import { parse } from "yaml";
|
||||||
|
|
||||||
import { registerAgentSchemas } from "./schemas.js";
|
import { registerAgentSchemas } from "./schemas.js";
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import type { Store } from "@uncaged/json-cas";
|
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 & {
|
export type AgentContext = ModeratorContext & {
|
||||||
threadId: ThreadId;
|
threadId: ThreadId;
|
||||||
@@ -5,5 +5,5 @@
|
|||||||
"outDir": "dist"
|
"outDir": "dist"
|
||||||
},
|
},
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"references": [{ "path": "../uwf-agent-kit" }]
|
"references": [{ "path": "../workflow-protocol" }]
|
||||||
}
|
}
|
||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
import { describe, expect, test } from "bun:test";
|
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";
|
import { evaluate } from "../src/evaluate.js";
|
||||||
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "@uncaged/uwf-moderator",
|
"name": "@uncaged/workflow-moderator",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"files": [
|
"files": [
|
||||||
"src",
|
"src",
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
"test": "bun test"
|
"test": "bun test"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@uncaged/uwf-protocol": "workspace:^",
|
"@uncaged/workflow-protocol": "workspace:^",
|
||||||
"jsonata": "^1.8.7"
|
"jsonata": "^1.8.7"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
+1
-1
@@ -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 jsonata from "jsonata";
|
||||||
|
|
||||||
import type { Result } from "./types.js";
|
import type { Result } from "./types.js";
|
||||||
@@ -5,5 +5,5 @@
|
|||||||
"outDir": "dist"
|
"outDir": "dist"
|
||||||
},
|
},
|
||||||
"include": ["src"],
|
"include": ["src"],
|
||||||
"references": [{ "path": "../uwf-protocol" }]
|
"references": [{ "path": "../workflow-protocol" }]
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "@uncaged/uwf-protocol",
|
"name": "@uncaged/workflow-protocol",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"files": [
|
"files": [
|
||||||
"src",
|
"src",
|
||||||
+5
-5
@@ -19,10 +19,10 @@
|
|||||||
},
|
},
|
||||||
"references": [
|
"references": [
|
||||||
{ "path": "packages/workflow-util" },
|
{ "path": "packages/workflow-util" },
|
||||||
{ "path": "packages/uwf-protocol" },
|
{ "path": "packages/workflow-protocol" },
|
||||||
{ "path": "packages/uwf-moderator" },
|
{ "path": "packages/workflow-moderator" },
|
||||||
{ "path": "packages/uwf-agent-kit" },
|
{ "path": "packages/workflow-agent-kit" },
|
||||||
{ "path": "packages/uwf-agent-hermes" },
|
{ "path": "packages/workflow-agent-hermes" },
|
||||||
{ "path": "packages/cli-uwf" }
|
{ "path": "packages/cli-workflow" }
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user