refactor: move createRole to workflow-util-role

workflow-role-llm now only contains createLlmAdapter (OpenAI chat
completions → AgentFn). All role infrastructure lives in util-role.
This commit is contained in:
2026-05-06 09:42:49 +00:00
parent c04e7c31af
commit fd8f1f2491
4 changed files with 5 additions and 2 deletions
+2 -1
View File
@@ -1,5 +1,7 @@
export { export {
buildDescriptorFromRoles, buildDescriptorFromRoles,
type CreateRoleArgs,
createRole,
decorateRole, decorateRole,
extractMetaOrThrow, extractMetaOrThrow,
type LlmError, type LlmError,
@@ -18,4 +20,3 @@ export {
withDryRun, withDryRun,
} from "@uncaged/workflow-util-role"; } from "@uncaged/workflow-util-role";
export { chatCompletionText, createLlmAdapter, type LlmChatError } from "./create-llm-adapter.js"; export { chatCompletionText, createLlmAdapter, type LlmChatError } from "./create-llm-adapter.js";
export { type CreateRoleArgs, createRole } from "./create-role.js";
@@ -1,6 +1,7 @@
import type { AgentFn, Role, ThreadContext } from "@uncaged/workflow"; import type { AgentFn, Role, ThreadContext } from "@uncaged/workflow";
import { extractMetaOrThrow, type LlmProvider } from "@uncaged/workflow-util-role";
import type * as z from "zod/v4"; import type * as z from "zod/v4";
import { extractMetaOrThrow } from "./extract-meta.js";
import type { LlmProvider } from "./types.js";
export type CreateRoleArgs<M extends Record<string, unknown>> = { export type CreateRoleArgs<M extends Record<string, unknown>> = {
name: string; name: string;
+1
View File
@@ -1,4 +1,5 @@
export { buildDescriptorFromRoles, type RoleDescriptorInput } from "./build-descriptor.js"; export { buildDescriptorFromRoles, type RoleDescriptorInput } from "./build-descriptor.js";
export { type CreateRoleArgs, createRole } from "./create-role.js";
export { export {
decorateRole, decorateRole,
type OnFailOptions, type OnFailOptions,