docs: update architecture docs and package READMEs for post-split structure
- Rewrite docs/architecture.md with 15-package map, dependency graph, updated engine paths - Update CLAUDE.md monorepo structure section - Add READMEs for: workflow-protocol, workflow-runtime, workflow-util, workflow-cas, workflow-register, workflow-execute, workflow-reactor - Fix agent READMEs: update deps from @uncaged/workflow to actual packages - Mark workflow-as-agent plan as outdated Fixes #153 小橘 <xiaoju@shazhou.work>
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
# @uncaged/workflow-util
|
||||
|
||||
Shared utilities: encoding, IDs, logging, storage paths, and ref-field normalization.
|
||||
|
||||
## What This Package Does
|
||||
|
||||
It provides filesystem-safe Base32 and ULID generation, the structured logger used across packages, helpers for the default workflow data directory and global CAS path, and utilities to merge/normalize `refs` on steps. It re-exports `ok`/`err` from protocol for convenience.
|
||||
|
||||
## Key Exports
|
||||
|
||||
From `src/index.ts`:
|
||||
|
||||
- **Base32:** `CROCKFORD_BASE32_ALPHABET`, `decodeCrockfordBase32Bits`, `decodeCrockfordToUint64`, `encodeCrockfordBase32Bits`, `encodeUint64AsCrockford`
|
||||
- **Logger:** `createLogger`
|
||||
- **Refs:** `mergeRefsWithContentHash`, `normalizeRefsField`
|
||||
- **Result:** `ok`, `err` (from `@uncaged/workflow-protocol`)
|
||||
- **Paths:** `getDefaultWorkflowStorageRoot`, `getGlobalCasDir`
|
||||
- **ULID:** `generateUlid`
|
||||
- **Types:** `CreateLoggerOptions`, `LogFn`, `LoggerSink`, `Result`
|
||||
|
||||
## Dependencies
|
||||
|
||||
- **Workspace:** `@uncaged/workflow-protocol` — `Result` and shared types used by helpers
|
||||
|
||||
## Usage
|
||||
|
||||
```typescript
|
||||
import { createLogger, getDefaultWorkflowStorageRoot, generateUlid } from "@uncaged/workflow-util";
|
||||
|
||||
const log = createLogger();
|
||||
log("4KNMR2PX", "example");
|
||||
```
|
||||
Reference in New Issue
Block a user