Reproduction
At PR #366 head (5f435a730ef806e8baaab4916f02c76c9d677b78), docs/host-adapter.md tells an inline host to call:
await runtime.deriveChildState(childRef, parentRef);
However, the published package API only exports createAcpExtension from src/index.ts / dist/index.d.ts. createAcpExtension() creates const runtime = createRuntime(adapter) inside its extension-factory closure and does not return or expose it. createRuntime is exported from src/runtime.ts, but package.json exports only . -> dist/index.js; there is no dist/runtime.js subpath.
Therefore a Prime-style adapter importing billion-context-pi cannot obtain the "extension runtime" required by the documented host contract. This remains true even after #366 is built and published unless the entrypoint export/API changes.
Impact
Inline children cannot perform the required one-time explicit derivation before their first context event. With a parentSession header they instead take the legacy implicit inheritance path, which copies parent pacing/rhythm state verbatim rather than the inherit-blocks/reset-rhythm behavior #366 intends.
Suggested minimal fix
Expose a supported host-facing way to invoke derivation. For example, re-export createRuntime plus AcpRuntime/SessionRef from the package entrypoint, or add a callback/handle on createAcpExtension that exposes its runtime. Then add a package-entrypoint test which imports only from billion-context-pi and performs the documented call.
Related: #317, #364, #366.
Reproduction
At PR #366 head (
5f435a730ef806e8baaab4916f02c76c9d677b78),docs/host-adapter.mdtells an inline host to call:However, the published package API only exports
createAcpExtensionfromsrc/index.ts/dist/index.d.ts.createAcpExtension()createsconst runtime = createRuntime(adapter)inside its extension-factory closure and does not return or expose it.createRuntimeis exported fromsrc/runtime.ts, butpackage.jsonexports only.->dist/index.js; there is nodist/runtime.jssubpath.Therefore a Prime-style adapter importing
billion-context-picannot obtain the "extension runtime" required by the documented host contract. This remains true even after #366 is built and published unless the entrypoint export/API changes.Impact
Inline children cannot perform the required one-time explicit derivation before their first context event. With a
parentSessionheader they instead take the legacy implicit inheritance path, which copies parent pacing/rhythm state verbatim rather than the inherit-blocks/reset-rhythm behavior #366 intends.Suggested minimal fix
Expose a supported host-facing way to invoke derivation. For example, re-export
createRuntimeplusAcpRuntime/SessionReffrom the package entrypoint, or add a callback/handle oncreateAcpExtensionthat exposes its runtime. Then add a package-entrypoint test which imports only frombillion-context-piand performs the documented call.Related: #317, #364, #366.