Files
united-workforce/packages/workflow-util
xiaoju 5bbac3e4f7 chore: internalize unused exports across all packages
Audit public API surfaces using reachability analysis from application
entry points (Worker, CLI, Dashboard). Symbols not reachable from any
application's customization tree are removed from package index.ts files.

Source files and internal usage are untouched — only the public export
surface is narrowed.

Changes by package:
- workflow-util: -7 exports (base32 internals, logger config types)
- workflow-cas: -12 exports (merkle internals, serialization details)
- workflow-execute: -24 exports (engine internals, LLM extract details)
- workflow-reactor: -4 exports (reactor config/invocation internals)
- workflow-register: -8 exports (redundant protocol re-exports, internal YAML fns)
- workflow-runtime: curated re-export subset (stop full protocol re-export)
- workflow-util-agent: -5 exports (internal agent helpers)
- workflow-agent-cursor: -1 export (validateCursorAgentConfig)
- workflow-agent-hermes: -1 export (validateHermesAgentConfig)

Note: workflow-protocol index.ts unchanged — downstream packages still
import removed symbols via internal paths. Protocol cleanup requires
updating workflow-runtime/src/types.ts first (separate PR).

Refs #273, #274, #275, #276, #277, #278, #279, #280, #281, #282
2026-05-16 09:58:56 +00:00
..

@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-protocolResult and shared types used by helpers

Usage

import { createLogger, getDefaultWorkflowStorageRoot, generateUlid } from "@uncaged/workflow-util";

const log = createLogger();
log("4KNMR2PX", "example");