Skip to content

refactor(tools-handoff): move the coordinator hand-off tools into a package - #42

Closed
TheGreatAxios wants to merge 2 commits into
cl-11881-move-the-document-readwrite-tools-into-a-tools-artifactsfrom
cl-11880-move-the-coordinators-hand-off-tools-into-a-tools-handoff
Closed

TheGreatAxios wants to merge 2 commits into
cl-11881-move-the-document-readwrite-tools-into-a-tools-artifactsfrom
cl-11880-move-the-coordinators-hand-off-tools-into-a-tools-handoff

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Contributor

Moves the coordinator's hand-off tools (ask questions, request approval, deploy writer, review, deploy coder, instruct coder, design app) out of the 700-line apps/hub/src/projects/deploy-tools.ts into @corbits-builder/tools-handoff.

  • . exports one plain function per tool, (args, deps), plus HandoffConfig, Refusal and refusalText, so a workflow action can call the logic without defineTool.
  • ./sidecar-bundle exports createDeployTools(config, scope?) and DEPLOY_TOOLS (still @corbits-builder/deploy/tools, so grants are unchanged).
  • The package declares a typed HandoffConfig; the hub fills it from apps/hub/src/config in apps/hub/src/projects/handoff-config.ts. Wording stays in config and is baked in at bundle time, and the bundle hash versions it as before. Macros stay hub-side.
  • awaitingApproval(filed, agentApproves) takes the preference result as a boolean; its two hub callers pass agentDecidesApprovals(preferences).
  • The coordinator test only swaps its import and passes handoffConfig.

Stacked on #41. Closes CL-11880

Verification

  • lint, format:check, typecheck, test (71 pass); packaged.test.ts, deploy-tools.test.ts and coordinator-run-grants.test.ts pass.
  • Old-vs-new comparison, 38 call cases (every tool, refusals, preference on and off, aborted signal): results, hub requests and assignment mail identical; definitions including the full design_app description byte-identical.
  • Independent review built the real workflow packages before and after: the coordinator's tool dump is byte-identical, and every other role's package hash is unchanged. Its findings (stale doc link, module split, argument shapes, exported Refusal) are fixed.

@linear-code

linear-code Bot commented Oct 31, 2026

Copy link
Copy Markdown

CL-11880

@corbits-triage

corbits-triage Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Triage: Unsure

Asking a maintainer about:

  • changes sensitive paths: auth: apps/hub/src/auth/coordinator-run-grants.test.ts, locks: bun.lock

Stacked on #41: only this pull request's own changes were checked.

Changed since the last verdict (Fail at 8f8ab35): 3 new commits.

@corbits-triage corbits-triage Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Triage requests changes:

  • Conventions: added code matches a code pattern

@TheGreatAxios
TheGreatAxios force-pushed the cl-11880-move-the-coordinators-hand-off-tools-into-a-tools-handoff branch from 4aa66f5 to 49750ba Compare October 31, 2026 22:03
@corbits-triage
corbits-triage Bot dismissed their stale review October 31, 2026 22:10

Nothing triage asked to change still fails, so this request no longer stands.

@TheGreatAxios

Copy link
Copy Markdown
Contributor Author

Closing: the decoupling plan on CL-11879 (adopt @corbits/artifacts with Builder rules in its write hook, run-scoped routes, tools that know nothing about projects or tenants) reshapes this package. It will be redone under that plan.

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