Extract the Maestro engine as a plugin (0.22)
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
- 8/100
- Tipo de issue
- Refatoração
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- typescript
Direção de pesquisa
Start with the seam PR the issue says must land first: read packages/replay-port (the five session-replay-maestro-runtime* and -observer/-failure files plus session-test-source-discovery.ts) and src/core/platform-plugin-registry.ts. Check the grep proof that no production code imports @agent-device/maestro outside the registration site, and that cli-startup-import-closure.test.ts still passes. Done means the seam is merged and the layering and conformance checks are green.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Purpose
Extract the Maestro compatibility engine (packages/maestro, ~11.5k production LOC) into a plugin so the core daemon, CLI, and replay-port stop naming it directly, while the --maestro replay surface, the ADR 0015 performance contract, and the three-layer conformance oracle stay intact. This issue tracks the full 0.22 extraction; the paired seam PR is the non-breaking first step.
Current coupling (what must invert)
Today the daemon↔engine relationship is almost inverted — packages/replay-port is the adapter and the engine talks back only through invoke + a package-owned operation request (per #2544). Remaining direct couplings:
packages/replay-port→ engine imports (5 files):session-replay-maestro-runtime.ts(executeMaestroFlow,inspectMaestroFlow,createDaemonMaestroRuntimePort),-request.ts,-response.ts,-observer.ts,-failure.ts, plussession-test-source-discovery.ts(inspectMaestroFlow).src/import sites (4):src/cli/commands/replay.ts(static, lazy-loaded; export conversion),src/commands/schema/cli-help.ts(compat-reference strings),src/commands/replay/script-source-bundle.ts(dynamic; source closure),src/daemon/replay-device-selection.ts(dynamic; advisory device binding).- Backend-id vocabulary spread across layers:
ReplayFormat = 'ad' | 'maestro'inpackages/ad-script, the--maestroflag inpackages/command-registry,CommandFlags.maestroruntime flags, and Maestro-shapedReplayDispatchOptionskeys (closeAppOnly,observationOnly,gestureViewport,gestureExecutionProfile,settingsAppBundleId). - No engine-plugin seam exists.
src/plugins/*is scoped to provider runtimes only (plugins.md: plugins cannot register arbitrary commands). The registration culture to follow issrc/core/platform-plugin-registry.ts+register-builtins.ts: static registration, lazy implementation.
Explicitly out of scope: the maestro-direct-selector / maestro-non-hittable-fallback iOS fast paths and the flags.maestro.* daemon runtime flags. Per the comment in interaction-guarantees.ts, those are not the flow engine; they stay in shared runtimes. Decide during extraction whether that flag namespace gets renamed or documented as replay-compat vocabulary.
Required behavior
- Seam first (in flight): an owning replay-engine port that the daemon/replay-port depend on, with maestro as the single registered implementation behind a backend id. No npm-style dynamic loading in the seam PR — one static registration site in the daemon composition, structured so the extraction PR swaps it for a dynamic lookup.
- Behavior unchanged through the seam: same CLI surface (
replay --maestro,test --suites,replay export,help maestro), same daemon dispatch keys and response shapes, same error projection and divergence suggestions. - Laziness preserved: the CLI startup import closure must never evaluate the engine (
cli-startup-import-closure.test.tspins this; the replay closure may evaluate it only inside flow source collection). Any registry module's eager closure stays engine-free; eager-closure budgets must not grow. - Performance preserved (ADR 0015): the seam must not add a round trip, a second hierarchy capture, or per-operation indirection cost between
MaestroRuntimeOperationsandinvoke. Android stays faster than upstream Maestro. - Conformance preserved:
pnpm maestro:conformanceand the layer-3 differential keep running against the extracted engine with declared divergences only. - Extraction (0.22 target): move
@agent-device/maestroout of the root workspace dependency, narrow its package exports to exactly what the plugin host needs, and decide whether./daemon-runtime-port(host-side adapter glue) stays an engine export or moves to the plugin package.
Completion conditions
- Seam PR merged: replay-port and
src/import an owning port/registry, not@agent-device/maestro;check:layering,check:di-seams,maestro:conformance, andcheck:affected --rungreen. - Backend-id vocabulary owned in one place; the
Pick<ReplayDispatchOptions, keyof MaestroDaemonDispatchOptions>key-lock invariant survives the split. - Engine reachable only through the registration seam (grep proof: no production imports of
@agent-device/maestrooutside the registration/adapter site). - Plugin package extracted with its own manifest and a host contract versioned like
apiVersioninsrc/plugins/manifest.ts. - Layering bookkeeping resolved at each owning type:
architecture-ownership.ts,model.tsrank,daemon-modularity.tsengine prefixes,package-boundaries.test.tsexport/dependency pins,.fallowrc.json, check-affected routing, conformance CI lanes.
Dependencies
- Blocked by: the seam PR (linked below) landing first.
- Related policy: ADR 0015 (direct engine, five responsibilities, performance contract), ADR 0013 (gesture normalization boundary must survive),
docs/dependency-graph-findings.md(#2544 adapter inversion).
- Linguagem predominante
- TypeScript
- Estrelas
- 5.2k
- Forks
- 359
- Merge médio
- 12h 54min
- PRs com merge (30d)
- 637
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
-
bug ready-for-agent
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 77/100
callstack/agent-device#4018 ·
Mantenedores costumam responder em até 1 dia
-
Limrun iOS fill reports success but drops non-ASCII textTalvez já em andamento @mvanhorn assumiu há 8 dias. Abertabug ready-for-agent
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 87/100
callstack/agent-device#3819 · 2 comentários ·
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
-
iOS simulator: snapshot drops controls nested deeper than 64 accessibility levelsTalvez já em andamento @KrzysztofMoch assumiu hoje. Aberta
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 48/100
callstack/agent-device#4088 ·
Mantenedores costumam responder em até 1 dia
-
needs-info
Dificuldade 5/5 Mais de uma semana Facilidade para iniciantes 25/100
callstack/agent-device#4086 · 5 comentários ·
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 65/100
lichess-org/lila#22324 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
[Feature Request] [Web] Expose kvCacheQuantizationBits in the onnxruntime-web WebGPU EP optionsAbertaep:WebGPU platform:web quantization
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 66/100
microsoft/onnxruntime#33752 ·
Mantenedores costumam responder em até 2 dias
-
[Skill Bug]: entra-agent-id: inaccurate blueprint permission inheritance and parent token sub claimAbertabug entra-agent-id
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
microsoft/GitHub-Copilot-for-Azure#3467 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
fix(worker): keep normal prepare waiting states failure-freeTalvez já em andamento @LichKing-2234 assumiu hoje. Abertaagent:codex priority:P1
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
AgoraIO-Extensions/agent-infra#3745 ·
Mantenedores costumam responder em até 1 dia
-
The five-line work window can drop its oldest line: the per-line byte share ignores the JSON framingTalvez já em andamento @Eapp1e assumiu hoje. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
makecindy/cindy#7973 · 1 comentário ·
Mantenedores costumam responder em até 1 dia