DF8002: Both devframes and context Passed to initHub/buildHub
initHub/buildHub received both devframes and context; the two assembly modes are mutually exclusive.
Message
initHub/buildHubreceived bothdevframesandcontext; the two assembly modes are mutually exclusive.
Cause
initHub (and buildHub) assembles a hub two ways: declaratively (devframes: [...], where it creates the hub context and mounts each devframe under <base><id>/), or from a pre-built context (context: ctx, where your host framework already mounted the devframes). A devframes list cannot be mounted into a context it doesn't own, so passing both contradicts.
Example
// ✗ Bad
initHub({ base: '/__devframes/', devframes: [git], context: myCtx })
// ✓ Good, declarative:
initHub({ base: '/__devframes/', devframes: [git] })
// ✓ Good, bring your own context:
const ctx = await createHubContext({ host: myHost, cwd })
await ctx.install(git)
initHub({ base: '/__devframes/', context: ctx })Fix
Pick one mode. Use configure(ctx) on the declarative mode when you need post-mount registrations (docks, commands, terminals) on the instance-created context.
Source
packages/hub/src/node/initiate.ts:initHubthrows this during initialization when both options are present.packages/hub/src/node/build.ts:buildHubthrows this when both options are present.