refactor(host): explicit host for configuration reads and one entered runtime store
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 25/100
- Issue 类型
- 重构
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- node.js, typescript
调研方向
Start with the root platform-runtime-* files, platform packages, and defineRuntimeSlots modules; trace the remaining commandHostEnvironment() calls and runtime slot handles. Read the follow-ups #3763 and #3772 and the holistic review on #3747 for decisions already made. Done means configuration reads use the runtime's explicit host, one runtime-owned store is entered and disposed, and the daemon host test plus two-runtime isolation tests pass.
由索引模型根据 Issue 内容生成。
描述
Part of #3747. Follow-up to #3763 and #3772, which leave two pieces deferred in their PR bodies.
1. Narrow commandHostEnvironment() to command execution
About 60 call sites remain in the root platform-runtime-* files and the platform packages. They read configuration (toolchain and SDK paths, caches, path resolution) through the ambient, AsyncLocalStorage-bound commandHostEnvironment(). The holistic review on the stack decided:
- Configuration reads take the host explicitly. Pass it as a parameter, through the runtime deps, or through a port bound at construction.
- The ambient lookup is only for host-kit command execution and diagnostics.
Done when:
- Every non-test call of
commandHostEnvironment()outside host-kit's command execution and diagnostics is replaced by an explicit host. - A test on the daemon route proves configuration is read from the runtime's host and not from the process, when the two differ.
2. One entered runtime store
#3772 moved per-runtime state onto defineRuntimeSlots. Each module still exposes its own handle, collected into runtimeStates.
Required:
- Collapse them into one store, entered once per runtime.
- Modules declare slots; the runtime owns entry and disposal.
Done when:
- No module-level handle or
runtimeStatesaggregation remains. - The two-runtime isolation tests (Apple runner, Android helper, PNG worker, daemon modules) still pass.
Ordering
- #3757 (
agent-device/host) does not depend on this issue. - #3753 (lint gate) should land after part 1, so the gate can also forbid
commandHostEnvironment()outside the command-execution boundary.
- 主要语言
- TypeScript
- 星标
- 5.1k
- 派生
- 339
- 平均合并
- 12 小时 23 分钟
- 30 天内合并 PR
- 730
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
callstack/agent-device 的其他 Issue
-
bug ready-for-agent
难度 2/5 1-3 小时 新手友好度 87/100
callstack/agent-device#3819 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
callstack/agent-device#1869 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 76/100
callstack/agent-device#3851 ·
维护者通常 1 天内回复
-
feat(hardware-button): press phone volume and power buttons on Android and iOS可能已有人在做 @thymikee 今天认领。 未关闭needs-triage
难度 5/5 一周以上 新手友好度 25/100
callstack/agent-device#3848 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 35/100
callstack/agent-device#3844 ·
维护者通常 1 天内回复
查看 callstack/agent-device 的全部 Issue
相似的 Issue
-
Area/Cloud Needs Triage Type/Bug
难度 1/5 1-3 小时 新手友好度 86/100
wso2/product-integrator#2847 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 67/100
bluesky-social/social-app#12118 ·
维护者通常 1 天内回复
-
enhancement
难度 1/5 1 小时以内 新手友好度 85/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 77/100
heygen-com/hyperframes#6021 ·
维护者通常 1 天内回复
-
check:passed streams:edit
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复