Skip to content

feat: Daemon modularization + capability-gated command routing + CI/test pipeline#20

Open
thymikee wants to merge 4 commits intomainfrom
feat/refactor-daemon-ci
Open

feat: Daemon modularization + capability-gated command routing + CI/test pipeline#20
thymikee wants to merge 4 commits intomainfrom
feat/refactor-daemon-ci

Conversation

@thymikee
Copy link
Contributor

@thymikee thymikee commented Feb 6, 2026

Summary
This PR breaks up the daemon monolith into focused handler/shared modules, centralizes command support checks in a capability matrix, and adds a fuller CI workflow with clearer unit vs integration test boundaries.

What changed

  • Daemon refactor into command-family handlers and shared domain modules:
    • Added session, snapshot, find, and record/trace handlers.
    • Added shared modules for context building, device readiness, app-state resolution, session store, session routing/selector validation, snapshot processing, and daemon types.
    • Simplified src/daemon.ts to route requests through these modules.
  • Session behavior improvements:
    • Added implicit reuse of a lone active session when default session is requested.
    • Added selector mismatch validation (--platform/--udid/--serial) against bound session device.
    • Kept/strengthened session recording/logging behavior via SessionStore.
  • Capability source of truth:
    • Added src/core/capabilities.ts and wired checks from daemon/handlers.
    • Added capability unit tests.
    • Pinch is now capability-gated as iOS simulator-only in core capability policy.
  • Dispatch cleanup:
    • Removed scattered iOS-kind support checks from several command branches and rely on capability gating.
    • Kept pinch dispatch via iOS runner path.
  • Testing structure updates:
    • Added colocated daemon/core unit tests for capabilities, session routing/selector/store, snapshot processing, and handler arg parsing.
    • Moved smoke tests into integration test tree and updated scripts.
  • CI/workflow updates:
    • Added reusable composite action .github/actions/setup-node-pnpm.
    • Added .github/workflows/ci.yml with unit, typecheck, smoke, Android integration, and iOS integration jobs.
    • Updated docs deploy checkout pin and build-docs action to use shared setup action.
  • Documentation/instructions:
    • Rewrote AGENTS.md with stricter ownership, first-read protocol, and verification matrix.
    • Updated command docs for pinch examples.

Validation run locally

  • pnpm typecheck
  • pnpm test:unit
  • pnpm test:smoke

@github-actions
Copy link

github-actions bot commented Feb 6, 2026

PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://callstackincubator.github.io/agent-device/pr-preview/pr-20/

Built to branch gh-pages at 2026-02-06 21:09 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

@grabbou
Copy link

grabbou commented Feb 6, 2026

Why no AI bots (or my, at the latest 😂) are summoned to review this beauty

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants