diff --git a/README.md b/README.md index b00a82a..0ccd10e 100644 --- a/README.md +++ b/README.md @@ -62,16 +62,16 @@ See [docs/architecture.md](docs/architecture.md) for the full design — three-p uwf setup # 2. Register a workflow from YAML -uwf workflow put examples/solve-issue.yaml +uwf workflow add examples/solve-issue.yaml # 3. Start a thread (creates head pointer; does not execute) uwf thread start solve-issue -p "Fix the login redirect bug" # 4. Execute steps (one at a time, until done) -uwf thread step +uwf thread exec ``` -Use `-c, --count ` on `thread step` to run multiple steps in one invocation. Override the agent with `--agent `. +Use `-c, --count ` on `thread exec` to run multiple steps in one invocation. Override the agent with `--agent `. ## CLI Reference @@ -79,8 +79,9 @@ Global options: `-V, --version`, `--format `, `-h, --help`. | Group | Commands | |-------|----------| -| **thread** | `start`, `step`, `show`, `list`, `kill`, `steps`, `read`, `fork`, `step-details` | -| **workflow** | `put`, `show`, `list` | +| **thread** | `start`, `exec`, `show`, `list`, `stop`, `cancel`, `read` | +| **step** | `list`, `show`, `fork` | +| **workflow** | `add`, `show`, `list` | | **cas** | `get`, `put`, `put-text`, `has`, `refs`, `walk`, `reindex`, `schema list`, `schema get` | | **setup** | Interactive or `--provider`, `--base-url`, `--api-key`, `--model`, `--agent` | | **skill** | `cli` — print markdown reference of all uwf commands | diff --git a/packages/cli-workflow/README.md b/packages/cli-workflow/README.md index 2ca507c..a76f44e 100644 --- a/packages/cli-workflow/README.md +++ b/packages/cli-workflow/README.md @@ -49,8 +49,10 @@ bun link packages/cli-workflow | `uwf thread start -p ` | Create a thread without executing | | `uwf thread exec [--agent ] [-c ] [--background]` | Execute one or more moderator→agent→extract cycles | | `uwf thread show ` | Show thread head pointer | -| `uwf thread list [--status ]` | List threads, optionally filtered by status | +| `uwf thread list [--status ] [--after ] [--before ] [--skip ] [--take ]` | List threads filtered by status (idle, running, completed, active, or comma-separated), time range (ISO or relative like '7d'), with pagination | | `uwf thread read [--quota N] [--before ] [--start]` | Render thread as readable markdown | + +`thread read`, `step list`, and `step show` work on both active and completed threads. | `uwf thread stop ` | Stop background execution (keep thread active) | | `uwf thread cancel ` | Cancel thread (stop + archive to history) | @@ -62,6 +64,9 @@ uwf thread exec 01ARZ3NDEKTSV4RRFFQ69G5FAV uwf thread exec 01ARZ3NDEKTSV4RRFFQ69G5FAV -c 3 --agent uwf-builtin uwf thread exec 01ARZ3NDEKTSV4RRFFQ69G5FAV --background uwf thread list --status running +uwf thread list --status active +uwf thread list --status idle,completed +uwf thread list --after 7d --take 10 uwf thread read 01ARZ3NDEKTSV4RRFFQ69G5FAV --quota 8000 uwf thread stop 01ARZ3NDEKTSV4RRFFQ69G5FAV ``` diff --git a/packages/workflow-agent-kit/README.md b/packages/workflow-agent-kit/README.md index fb7ab95..669a76a 100644 --- a/packages/workflow-agent-kit/README.md +++ b/packages/workflow-agent-kit/README.md @@ -83,9 +83,10 @@ Requires `UWF_EDGE_PROMPT` in the environment (set by `uwf thread step`). function buildRolePrompt(role: RoleDefinition): string function buildOutputFormatInstruction(schema: JSONSchema): string function buildContinuationPrompt( - ctx: AgentContext, - priorOutput: string, - instruction: string, + steps: StepContext[], + role: string, + edgePrompt: string, + options?: { includeContent?: boolean; quota?: number }, ): string ``` diff --git a/packages/workflow-protocol/README.md b/packages/workflow-protocol/README.md index f76b0d1..ab236cb 100644 --- a/packages/workflow-protocol/README.md +++ b/packages/workflow-protocol/README.md @@ -92,7 +92,7 @@ type StepNodePayload = StepRecord & { ### Moderator context ```typescript -type StepContext = Omit & { output: unknown }; +type StepContext = Omit & { output: unknown; content: string | null }; type ModeratorContext = { start: StartNodePayload; diff --git a/packages/workflow-util/README.md b/packages/workflow-util/README.md index 1a9e8b8..b03f39b 100644 --- a/packages/workflow-util/README.md +++ b/packages/workflow-util/README.md @@ -23,6 +23,7 @@ All exports come from `src/index.ts`. ```typescript function encodeUint64AsCrockford(value: bigint): string function generateUlid(nowMs: number): string +function extractUlidTimestamp(ulid: string): number | null ``` ### Logging