Skip to content

refactor(task): split task spec from prompt execution#21918

Closed
kitlangton wants to merge 1 commit intodevfrom
task-spec-executor-split
Closed

refactor(task): split task spec from prompt execution#21918
kitlangton wants to merge 1 commit intodevfrom
task-spec-executor-split

Conversation

@kitlangton
Copy link
Copy Markdown
Contributor

Summary

  • keep task as a real registry-owned tool while splitting its registry-facing spec from its prompt-bound executor
  • remove the direct SessionPrompt runtime dependency from tool/task.ts and bind the recursive task executor inside SessionPrompt
  • preserve task visibility in ToolRegistry, debug tooling, and experimental endpoints without using dynamic registration or dynamic imports

Notes

  • ToolRegistry still owns task metadata/spec (id, schema, description, and named/builtin visibility)
  • SessionPrompt now owns the recursive task execution wiring by binding a runtime executor with cancel, resolvePromptParts, and prompt
  • task execution tests now exercise the bound executor path explicitly

Testing

  • bun typecheck
  • bun turbo typecheck
  • bun run test -- test/tool/task.test.ts test/session/prompt-effect.test.ts test/session/prompt.test.ts test/tool/registry.test.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant