feat(workflow-protocol): add declarative moderator table types and tableToModerator

Add ModeratorCondition, FALLBACK, ModeratorTransition, ModeratorTable types
and tableToModerator converter function. Export from workflow-protocol and
re-export from workflow-runtime for backward compat.

Refs #172
This commit is contained in:
2026-05-11 01:58:12 +00:00
parent 93d9821f64
commit 6fc97fc8c8
5 changed files with 219 additions and 1 deletions
+8
View File
@@ -17,9 +17,13 @@ export type {
ExtractContext,
ExtractFn,
ExtractResult,
FALLBACK,
LlmProvider,
Moderator,
ModeratorCondition,
ModeratorContext,
ModeratorTable,
ModeratorTransition,
ProviderConfig,
ResolvedModel,
Result,
@@ -47,3 +51,7 @@ export { END, START } from "./types.js";
// ── Constructor functions ──────────────────────────────────────────
export { err, ok } from "./result.js";
// ── Moderator Table ────────────────────────────────────────────────
export { tableToModerator } from "./moderator-table.js";