feat(host): startAgentDevice() for embedder-owned daemons
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 5/5
- 预计耗时
- 一周以上
- 新手友好度
- 15/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 活跃
- 技术栈
- nodejs, typescript
调研方向
This is design work blocked by #3753, #3754 and #3755, so start by reading those and ADR 0027 and 0030 rather than writing code. The relevant entry points are the agent-device/host subpath boundary in scripts/layering/daemon-client-entry.ts, registration tokens in packages/daemon-contracts/src/daemon-registration-owner.ts, and PID matching in packages/daemon-contracts/src/daemon-process.ts. Done means the integration tests and packaged-export smoke test listed in the issue pass.
由索引模型根据 Issue 内容生成。
描述
Part of #3747. Blocked by #3753, #3754, #3755.
Required behavior
import { startAgentDevice } from 'agent-device/host';
import testmu from '@agent-device/testmu';
await using host = await startAgentDevice({
stateDir,
host?: HostEnvironment, // defaults to a captured copy of the calling process
plugins: [testmu({ credentials })],
log?: (entry: LogEntry) => void, // silent by default
});
host.client // AgentDeviceClient
host.clientConfig // serializable; daemonLifecycle: 'attach'; pinned to this daemon's token and instance
await host.close() // ShutdownReport (#3752); also Symbol.asyncDispose
- Subpath. It's exported from a new
agent-device/hostsubpath, not the root, to respect the eager-closure budgets (ADR 0027) and R78 (scripts/layering/daemon-client-entry.ts:16). - Listener. The daemon runs in the calling process with a listener, so other processes can attach using
clientConfig. Several hosts may share one process. - Plugins.
pluginsis the complete embedder set: store plugins are not merged. Built-ins still load. - Registration. It uses the ADR 0030 acquisition tokens (
packages/daemon-contracts/src/daemon-registration-owner.ts:71). A state dir with a live registered daemon is refused (details.reason: 'state-dir-in-use'). - Embedded ownership is recorded, so managed recovery and
ensureDaemonnever signal the host's PID. Pinned clients refuse a replaced daemon. - Stopping.
agent-device daemon stop --state-dirstops an embedded daemon through an authenticated shutdown request. It awaits the removed registration and the report, not a process exit. This replaces PID command matching (packages/daemon-contracts/src/daemon-process.ts:11) for embedded daemons.
Done when
- An integration test covers:
- an embedder fixture plugin;
- attach clients from a second process;
- two hosts in one process;
- the
close()report; daemon stopagainst an embedded daemon.
- A packaged-export smoke test for
agent-device/hostpasses. - The client API and website docs are updated, and the skill's routing notes cover hosting if startup guidance changes.
- There's a changeset.
- 主要语言
- TypeScript
- 星标
- 5k
- 派生
- 334
- 平均合并
- 12 小时 2 分钟
- 30 天内合并 PR
- 678
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
callstack/agent-device 的其他 Issue
-
`devices` reports a phantom Android emulator named after the emulator's crashdata INFO banner可能已有人在做 @airowe 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 75/100
callstack/agent-device#3716 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
callstack/agent-device#1869 ·
维护者通常 1 天内回复
-
backlog refactor
难度 5/5 一周以上 新手友好度 8/100
callstack/agent-device#3759 ·
维护者通常 1 天内回复
-
backlog enhancement needs-triage
难度 5/5 一周以上 新手友好度 8/100
callstack/agent-device#3758 ·
维护者通常 1 天内回复
-
feat(provider-testmu): publish @agent-device/testmu on plugin contract v2可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭enhancement ready-for-agent
难度 4/5 3-5 天 新手友好度 35/100
callstack/agent-device#3756 ·
维护者通常 1 天内回复
查看 callstack/agent-device 的全部 Issue
相似的 Issue
-
bug engine
难度 2/5 1-3 小时 新手友好度 86/100
frostney/GocciaScript#1746 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 67/100
agilepathway/label-checker#739 · 4 条评论 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 68/100
CopilotKit/OpenBot#800 ·
维护者通常 1 天内回复
-
Endpoint links in the tag operations list are below the 24px target size可能已有人在做 @AdzerKI 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 79/100
ehmpathy/rhachet-roles-bhuild#471 ·
维护者通常 1 天内回复