docs(runtime): document declared subpaths and Runtime Host composition - #5165
Closed
ZxlDragonDoctor wants to merge 1 commit into
Closed
docs(runtime): document declared subpaths and Runtime Host composition#5165ZxlDragonDoctor wants to merge 1 commit into
ZxlDragonDoctor wants to merge 1 commit into
Conversation
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
6 tasks
me2seeks
reviewed
Sep 11, 2026
Contributor
There was a problem hiding this comment.
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.ts(SessionManager@898、BackendRegistry@768)。- 新增相对链接指向的
packages/runtime-host/src/server/execution-composition.ts存在并确实构造SessionManager/BackendRegistry。
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
packages/runtime/README.mdclaimed "The package root barrel and the subpaths declared inpackage.jsonare supported public APIs", butpackages/runtime/package.jsonexportshas no"."entry —import('@maka/runtime')fails withERR_PACKAGE_PATH_NOT_EXPORTED. The README also pointed composition atapps/desktop/src/main/main.ts, while the shared composition that constructsBackendRegistryandSessionManagerlives inpackages/runtime-host/src/server/execution-composition.ts.Solution
SessionManager/BackendRegistry(@maka/runtime/session-manager) andAiSdkBackend(@maka/runtime/ai-sdk-backend).Issue alignment
Testing
packages/runtime/package.jsonexportsand the Runtime Host import sites.Addresses #5141