Skip to content

watch --count and --timeout #7

Description

@0xLeif

Part of GOAL.md workstream B.

aps watch runs forever today; agents need bounded execution. Add --count N (stop after N emitted values) and --timeout SECONDS (stop after wall-clock budget). Both optional, composable, and orthogonal to the existing shouldContinue seam in StateStore.watchBlocking.

Acceptance criteria

  • --count 1 prints the current value once and exits 0 (useful as a JSONL-friendly get)
  • --timeout expires cleanly with exit 0 and no partial line
  • Bounds are covered by unit tests (no multi-second sleeps; small poll intervals)
  • specs/state-store/state-store.spec.md updated in the same change

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions