Skip to content

docs(runtime): document declared subpaths and Runtime Host composition - #5165

Closed
ZxlDragonDoctor wants to merge 1 commit into
apache:mainfrom
ZxlDragonDoctor:docs/runtime-readme-subpaths
Closed

docs(runtime): document declared subpaths and Runtime Host composition#5165
ZxlDragonDoctor wants to merge 1 commit into
apache:mainfrom
ZxlDragonDoctor:docs/runtime-readme-subpaths

Conversation

@ZxlDragonDoctor

Copy link
Copy Markdown

Problem

packages/runtime/README.md claimed "The package root barrel and the subpaths declared in package.json are supported public APIs", but packages/runtime/package.json exports has no "." entryimport('@maka/runtime') fails with ERR_PACKAGE_PATH_NOT_EXPORTED. The README also pointed composition at apps/desktop/src/main/main.ts, while the shared composition that constructs BackendRegistry and SessionManager lives in packages/runtime-host/src/server/execution-composition.ts.

Solution

  • Document that only declared subpaths are public; remove the root-barrel claim.
  • Add explicit import examples for SessionManager/BackendRegistry (@maka/runtime/session-manager) and AiSdkBackend (@maka/runtime/ai-sdk-backend).
  • Point readers at Runtime Host composition; note Desktop is one host among clients.
  • Align Extension rules wording with the same constraint.

Issue alignment

Testing

  • Docs-only; verified against packages/runtime/package.json exports and the Runtime Host import sites.

Addresses #5141

The README advertised a package-root barrel that package.json does not
export, and pointed composition at the Desktop main process instead of
the shared Runtime Host composition.

Addresses apache#5141
@github-actions github-actions Bot added the effort/S Under 100 readable lines label Sep 10, 2026

@me2seeks me2seeks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

PR 5165 Review

结论

APPROVE
Docs-only:packages/runtime/README.md 的 root-barrel 误述已修正,补全部关键 subpath 的导入示例,并把 composition 指针换到真正的共享 composition 文件。所有 subpath 与导出逐一核对通过。

发现

[P3] 与 #5142#5200 修同一缺陷、同一文件(issue #5141),三者不能同时合并

  • 文件: packages/runtime/README.md
  • 问题:本 PR、#5142#5200 都只改 packages/runtime/README.md 的 "Public seam" 段,修的是同一个 root-barrel 误述(同一 issue #5141)。三个 PR 不能同时合并,后合者会因同段改动产生 diff 冲突。
  • 建议:维护者三选一合并,其余关闭即可。本 PR 覆盖面最全(额外列出 sandbox/builtin-tools/shell-tools/runtime-kernel/test-only 的 subpath 并明确 BackendRegistry 导入来源),若求文档完整度可优先它。纯流程提示,不影响技术正确性。

验证

  • package.json#exports'.' 键 → root 确实不导出,原文档说法确为缺陷。
  • PR 引用的 7 个 subpath(./session-manager./ai-sdk-backend./sandbox./builtin-tools./shell-tools./runtime-kernel./test-only/fake-backend)在 exports 中全部存在,无虚指。
  • import { SessionManager, BackendRegistry } from '@maka/runtime/session-manager' 正确:两者都定义并导出自 src/session-manager.tsSessionManager @898BackendRegistry @768)。
  • 新增相对链接指向的 packages/runtime-host/src/server/execution-composition.ts 存在并确实构造 SessionManager/BackendRegistry

@me2seeks

Copy link
Copy Markdown
Contributor

Thank you for the contribution and the additional entry-point documentation. After comparing the three fixes for #5141, we merged #5200, which covers the same documentation correction. Closing this PR as superseded; the choice reflects overlapping scope, not a correctness issue in this contribution.

@me2seeks me2seeks closed this Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

effort/S Under 100 readable lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants