refactor(workflow-protocol): require AgentFn Opt generic #284
Reference in New Issue
Block a user
Delete Branch "refactor/agent-fn-required-opt"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
AgentFn<Opt>不再支持void默认与条件重载,统一为(ctx, options) => Promise<string>。createAgentAdapter去掉多余的类型断言;删除仅用于AgentFn<void>的createSimpleAgentAdapter。buildAgentPrompt、validateHermesAgentConfig、validateCursorAgentConfig的 package 导出(测试与 README 依赖)。options.cas.put(),避免 bundle 校验拒绝@uncaged/*import。worker.ts格式化与workflow-runtime导出排序(bun run check)。Test plan
bun test— 211 passbun run check— tsc + biome + log tagsLGTM ✅
cas.put()API,不再 import workflow-casAgentFn<Opt>去掉 conditional type,删除createSimpleAgentAdapter,类型更简洁Minor nit:
cas.put( "x")多处括号后多了个空格,不 blocking。