feat(host): startAgentDevice() for embedder-owned daemons
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 5/5
- Tempo estimado
- Mais de uma semana
- Facilidade para iniciantes
- 15/100
- Tipo de issue
- Funcionalidade
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- nodejs, typescript
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- TypeScript
- Estrelas
- 5k
- Forks
- 334
- Merge médio
- 12h 2min
- PRs com merge (30d)
- 678
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de callstack/agent-device
-
`devices` reports a phantom Android emulator named after the emulator's crashdata INFO bannerTalvez já em andamento @airowe assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
callstack/agent-device#3716 ·
Mantenedores costumam responder em até 1 dia
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
callstack/agent-device#1869 ·
Mantenedores costumam responder em até 1 dia
-
backlog refactor
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 8/100
callstack/agent-device#3759 ·
Mantenedores costumam responder em até 1 dia
-
backlog enhancement needs-triage
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 8/100
callstack/agent-device#3758 ·
Mantenedores costumam responder em até 1 dia
-
feat(provider-testmu): publish @agent-device/testmu on plugin contract v2Talvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Abertaenhancement ready-for-agent
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 35/100
callstack/agent-device#3756 ·
Mantenedores costumam responder em até 1 dia
Todas as issues de callstack/agent-device
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 73/100
anomalyco/opencode#56380 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
-
BUG | `MCP 服务器` | 全局层行的停用/启用与删除报 404 server row not found,编辑保存会在 profile 层复制出重复行Talvez já em andamento @w6242652 assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 75/100
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Chocobozzz/PeerTube#7832 ·
Mantenedores costumam responder em até 3 dias
-
Pay to use?Aberta
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 66/100
darkreader/darkreader#16108 · 1 comentário ·
Mantenedores costumam responder em até 2 dias