Skip to content

host adapter: deriveChildState runtime is not reachable from the published package API #367

Description

@qiangu2020

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.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions