2026-06-22 19:32:56 +02:00
|
|
|
|
---
|
|
|
|
|
|
id: HUB-WP-0002
|
|
|
|
|
|
type: workplan
|
|
|
|
|
|
title: "Import-refactor adapter seams for State Hub closeout"
|
|
|
|
|
|
domain: inter_hub
|
|
|
|
|
|
repo: hub-core
|
2026-06-22 19:52:22 +02:00
|
|
|
|
status: finished
|
2026-06-22 19:32:56 +02:00
|
|
|
|
owner: codex
|
2026-08-21 10:58:03 +02:00
|
|
|
|
topic_slug: custodian
|
2026-06-22 19:32:56 +02:00
|
|
|
|
created: "2026-06-22"
|
|
|
|
|
|
updated: "2026-06-22"
|
|
|
|
|
|
state_hub_workstream_id: "439b559b-fcb7-4d21-b831-cfc9c6bbc1a0"
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
|
|
|
|
# Import-refactor adapter seams for State Hub closeout
|
|
|
|
|
|
|
|
|
|
|
|
## Goal
|
|
|
|
|
|
|
|
|
|
|
|
Finish the hub-core side of **CUST-WP-0048** so State Hub can close the
|
|
|
|
|
|
capability-request write workflow and generic MCP split without forking shared
|
|
|
|
|
|
primitives.
|
|
|
|
|
|
|
|
|
|
|
|
Child workplan: `~/the-custodian/workplans/CUST-WP-0048-hub-core-state-hub-import-refactor.md`
|
|
|
|
|
|
Boundary reference: `~/the-custodian/docs/hub-core-extraction-boundary.md`
|
|
|
|
|
|
|
|
|
|
|
|
## Capability Request Write Router Factory
|
|
|
|
|
|
|
|
|
|
|
|
```task
|
|
|
|
|
|
id: HUB-WP-0002-T01
|
2026-06-22 19:52:22 +02:00
|
|
|
|
status: done
|
2026-06-22 19:32:56 +02:00
|
|
|
|
priority: high
|
|
|
|
|
|
state_hub_task_id: "f2e0a8a1-1943-4d40-963b-3d736d2340bf"
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
Add a `create_capability_request_write_router` factory with host-injected models,
|
|
|
|
|
|
schemas, and workflow callbacks for:
|
|
|
|
|
|
|
|
|
|
|
|
- request creation
|
|
|
|
|
|
- acceptance
|
|
|
|
|
|
- status transitions
|
|
|
|
|
|
- patch / dispute / reroute paths that today live in State Hub
|
|
|
|
|
|
|
|
|
|
|
|
Callbacks must cover dev-hub side effects (flow transitions, notifications,
|
|
|
|
|
|
task-unblock) without pulling workstream/task foreign keys into hub-core models.
|
|
|
|
|
|
|
2026-06-22 19:52:22 +02:00
|
|
|
|
Completed 2026-06-22: factory added with routing, build, lifecycle, transition,
|
|
|
|
|
|
patch, dispute, and reroute callbacks. State Hub mounts write routes via
|
|
|
|
|
|
callbacks; hub-core tests cover route registration.
|
2026-06-22 19:32:56 +02:00
|
|
|
|
|
|
|
|
|
|
## MCP Server Composition Hooks
|
|
|
|
|
|
|
|
|
|
|
|
```task
|
|
|
|
|
|
id: HUB-WP-0002-T02
|
2026-06-22 19:52:22 +02:00
|
|
|
|
status: done
|
2026-06-22 19:32:56 +02:00
|
|
|
|
priority: medium
|
2026-06-22 19:33:32 +02:00
|
|
|
|
state_hub_task_id: "f50cd78f-14d2-42f7-8355-46baafb81131"
|
2026-06-22 19:32:56 +02:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
Extend `HubCoreMCPServer` so State Hub can compose or subclass it while keeping
|
|
|
|
|
|
dev-hub-only tools local. Provide a clear registration seam for host tools and
|
|
|
|
|
|
document which ~17 generic tools stay in hub-core.
|
|
|
|
|
|
|
2026-06-22 19:52:22 +02:00
|
|
|
|
Completed 2026-06-22: added `CORE_TOOL_NAMES`, `attach_to()`, and `exclude`
|
|
|
|
|
|
filtering. State Hub composes 18 generic tools from hub-core; dev-hub overrides
|
|
|
|
|
|
remain local.
|
2026-06-22 19:32:56 +02:00
|
|
|
|
|
|
|
|
|
|
## Regression And Boundary Update
|
|
|
|
|
|
|
|
|
|
|
|
```task
|
|
|
|
|
|
id: HUB-WP-0002-T03
|
2026-06-22 19:52:22 +02:00
|
|
|
|
status: done
|
2026-06-22 19:32:56 +02:00
|
|
|
|
priority: high
|
2026-06-22 19:33:32 +02:00
|
|
|
|
state_hub_task_id: "450676fa-6074-4722-8811-25ac6e6de4ba"
|
2026-06-22 19:32:56 +02:00
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
After T01–T02 land (or are explicitly deferred with documented seams):
|
|
|
|
|
|
|
|
|
|
|
|
- run full `hub-core` pytest and `~/state-hub` regression
|
|
|
|
|
|
- update `hub-core-extraction-boundary.md` with resolved couplings and any
|
|
|
|
|
|
deferred adapter points
|
|
|
|
|
|
- hand results back so **CUST-WP-0048** T05–T07 can close
|
|
|
|
|
|
|
2026-06-22 19:52:22 +02:00
|
|
|
|
Completed 2026-06-22: hub-core 27 tests pass; state-hub capability tests pass
|
|
|
|
|
|
(20/20) and full suite 352/353 (one pre-existing health-route flake).
|
2026-08-21 10:58:03 +02:00
|
|
|
|
Extraction boundary updated.
|