uncaged

AI Agent 项目开发

@uncaged/workflow-execute (0.3.21)

Published 2026-05-13 09:10:13 +00:00 by xingyue

Installation

@uncaged:registry=https://git.shazhou.work/api/packages/uncaged/npm/
npm install @uncaged/workflow-execute@0.3.21
"@uncaged/workflow-execute": "0.3.21"

About this package

@uncaged/workflow-execute

Thread engine: execution, fork/GC, extract pipeline, supervisor/worker wiring, and workflow-as-agent.

What This Package Does

It runs WorkflowFn generators against disk-backed threads, integrates CAS and registry-backed extract (createExtract), coordinates LLM tool usage via @uncaged/workflow-reactor, handles fork plans and garbage collection, and exposes workflowAsAgent for nesting workflows.

Key Exports

From src/index.ts:

  • Engine: createWorkflow (engine-local re-export), executeThread, getWorkerHostScriptPath
  • Fork / parse: buildForkPlan, parseThreadDataJsonl, selectForkHistoricalSteps, tryParseRoleStepRecord, tryParseWorkflowResultRecord
  • GC / pause: garbageCollectCas, createThreadPauseGate
  • Engine types: ExecuteThreadIo, ExecuteThreadOptions, ForkHistoricalStep, ForkPlan, GcResult, ParsedThreadStartRecord, PrefilledDiskStep, SupervisorDecision, ThreadPauseGate
  • Extract: buildExtractUserContent, createExtract, extractFunctionToolFromZodSchema, llmErrorToCause, llmExtract, types ExtractFn, ExtractThreadContext, LlmError, LlmExtractArgs
  • Agent composition: workflowAsAgent, WorkflowAsAgentOptions

Dependencies

  • Workspace: @uncaged/workflow-protocol, @uncaged/workflow-runtime, @uncaged/workflow-util, @uncaged/workflow-cas, @uncaged/workflow-reactor, @uncaged/workflow-register
  • npm: yaml
  • Peer: zod ^4

@uncaged/workflow-reactor is used for LLM-backed extract and supervisor flows (extract-fn.ts, supervisor.ts).

Usage

import { executeThread } from "@uncaged/workflow-execute";
// Typical callers are CLI/tests that supply ExecuteThreadIo (paths, CAS, abort, logger, …).

Dependencies

Dependencies

ID Version
@uncaged/workflow-cas 0.3.21
@uncaged/workflow-protocol 0.3.21
@uncaged/workflow-reactor 0.3.21
@uncaged/workflow-register 0.3.21
@uncaged/workflow-runtime 0.3.21
@uncaged/workflow-util 0.3.21
yaml ^2.7.1

Development Dependencies

ID Version
zod ^4.0.0

Peer Dependencies

ID Version
zod ^4.0.0
Details
npm
2026-05-13 09:10:13 +00:00
2
39 KiB
Assets (1)
Versions (19) View all
0.4.2 2026-05-13
0.4.1 2026-05-13
0.3.24 2026-05-13
0.3.22 2026-05-13
0.3.21 2026-05-13