Open source CapCut alternative.
TypeScript
Update plans
David Le7e3e66432d84
diff --git a/plans/done/00-overview.md b/plans/00-overview.mdsimilarity index 100%rename from plans/done/00-overview.mdrename to plans/00-overview.mddiff --git a/plans/done/04-slow-planner.md b/plans/04-slow-planner.mdsimilarity index 100%rename from plans/done/04-slow-planner.mdrename to plans/04-slow-planner.mddiff --git a/plans/done/07-rollout.md b/plans/07-rollout.mdsimilarity index 100%rename from plans/done/07-rollout.mdrename to plans/07-rollout.mddiff --git a/plans/done/08-dom-parsing.md b/plans/08-dom-parsing.mdsimilarity index 100%rename from plans/done/08-dom-parsing.mdrename to plans/08-dom-parsing.mddiff --git a/plans/done/09-screenshot-model-inference.md b/plans/09-screenshot-model-inference.mdsimilarity index 100%rename from plans/done/09-screenshot-model-inference.mdrename to plans/09-screenshot-model-inference.mddiff --git a/plans/done/10-gaps-to-expand.md b/plans/10-gaps-to-expand.mdsimilarity index 100%rename from plans/done/10-gaps-to-expand.mdrename to plans/10-gaps-to-expand.mddiff --git a/plans/done/11-game-targets.md b/plans/11-game-targets.mdsimilarity index 100%rename from plans/done/11-game-targets.mdrename to plans/11-game-targets.mddiff --git a/plans/done/12-iphone-mirroring.md b/plans/12-iphone-mirroring.mdsimilarity index 100%rename from plans/done/12-iphone-mirroring.mdrename to plans/12-iphone-mirroring.mddiff --git a/plans/done/13-subway-surfers-target.md b/plans/13-subway-surfers-target.mdsimilarity index 100%rename from plans/done/13-subway-surfers-target.mdrename to plans/13-subway-surfers-target.mddiff --git a/plans/done/14-synthetic-controller.md b/plans/14-synthetic-controller.mdsimilarity index 100%rename from plans/done/14-synthetic-controller.mdrename to plans/14-synthetic-controller.mddiff --git a/plans/done/15-gamepad-controller.md b/plans/15-gamepad-controller.mdsimilarity index 100%rename from plans/done/15-gamepad-controller.mdrename to plans/15-gamepad-controller.mddiff --git a/plans/done/16-iphone-gameplay-roadmap.md b/plans/16-iphone-gameplay-roadmap.mdsimilarity index 100%rename from plans/done/16-iphone-gameplay-roadmap.mdrename to plans/16-iphone-gameplay-roadmap.mddiff --git a/plans/done/17-ios-control-prompt.md b/plans/17-ios-control-prompt.mdsimilarity index 100%rename from plans/done/17-ios-control-prompt.mdrename to plans/17-ios-control-prompt.mddiff --git a/plans/done/18-macos-accessibility.md b/plans/18-macos-accessibility.mdsimilarity index 100%rename from plans/done/18-macos-accessibility.mdrename to plans/18-macos-accessibility.mddiff --git a/plans/20-off-the-shelf-run-loop.md b/plans/20-off-the-shelf-run-loop.mdindex 97a8f3ec..b7ba4f97 100644--- a/plans/20-off-the-shelf-run-loop.md+++ b/plans/20-off-the-shelf-run-loop.md@@ -1,6 +1,6 @@# Off-The-Shelf Run Loop-> Active status: not complete. The current repo supports metadata-only local-navigation dry-run scaffolding, generic local-app task catalog parsing/adaptation, local-model command parsing, pointer-prompt typed command submission, macOS app launch/focus, guarded macOS keyboard input, local voice-transcription model selection, target-app availability checks, Accessibility visible-text observation when trusted, built-in task definitions across weather/media/document domains, and guarded live-action smoke. It still needs real-session verification and richer control discovery before any benchmark should be treated as done.+> Active status: not complete. The current repo supports metadata-only local-navigation dry-run scaffolding, generic local-app task catalog parsing/adaptation, local JSON/JSONL task-definition loading, local-model command parsing, local task-context intake, review-first document form-fill planning, pointer-prompt typed command submission, macOS app launch/focus, guarded macOS keyboard input, local voice-transcription model selection, target-app availability checks, Accessibility visible-text observation when trusted, built-in task definitions across weather/media/document domains, and guarded live-action smoke. It still needs real-session verification and richer control discovery before any benchmark should be treated as done.## Goal@@ -442,6 +442,8 @@ The first benchmark is still Weather lookup, represented as a local-app task def- target app: resolved from task definition- success: target app is frontmost and visibly showing the requested result+Weather is only the first benchmark definition. The same catalog, local-model intent parser, context intake, and guarded runtime should support other user tasks such as playing music in a media app or filling a document from structured data without introducing source-specific runtime classes.+Good follow-on tasks:- fast game/menu navigation to a known screen@@ -467,17 +469,20 @@ Runtime: native Swift coordinator and trace pipeline1. Define generic `TaskIntent`, target-app, entity, workflow-step, observation, and verification contracts.2. Add local-model command parsing from local app-task definitions, including aliases such as `SF -> San Francisco` in benchmark data, with deterministic parsing kept as fallback/validation.-3. Add installed-app and app-task knowledge lookup for target app identity, workflows, controls, and verification rules.-4. Define generic task-state fields and terminal states.-5. Extend the generic local-app task adapter from dry-run semantic actions to guarded-live orchestration.-6. Add app launch/focus action commands and guardrails.-7. Add guarded text-entry and submit/select commands.-8. Add Accessibility observation for resolved controls and visible result text.-9. Add local model UI-understanding fallback only where Accessibility and metadata are insufficient; keep OCR optional and measured.-10. Add result verification for normalized requested entities.-11. Add command-to-result latency report and manual baseline comparison.-12. Add optional slow planner recovery only after deterministic execution works.-13. Keep game/vision adapters as follow-on targets using the same contracts.+3. Load additional local app-task definitions from Application Support so new workflows can be added as data.+4. Add installed-app and app-task knowledge lookup for target app identity, workflows, controls, and verification rules.+5. Define generic task-state fields and terminal states.+6. Extend the generic local-app task adapter from dry-run semantic actions to guarded-live orchestration.+7. Add app launch/focus action commands and guardrails.+8. Add guarded text-entry and submit/select commands.+9. Add Accessibility observation for resolved controls and visible result text.+10. Add local task-context intake for focused app/window metadata, clipboard structured data, attached files, and observed form fields.+11. Add review-first document/data mapping before any guarded form-fill execution.+12. Add local model UI-understanding fallback only where Accessibility and metadata are insufficient; keep OCR optional and measured.+13. Add result verification for normalized requested entities.+14. Add command-to-result latency report and manual baseline comparison.+15. Add optional slow planner recovery only after deterministic execution works.+16. Keep game/vision adapters as follow-on targets using the same contracts.## Acceptance Criteria@@ -510,17 +515,18 @@ The runtime foundation now supports a product-shaped local-navigation slice of t- p50/p95/p99 latency reports across capture, preprocess, model, perception, state update, controller decision, action projection, and input stages- action-engine permission, focus, rate, hold-duration, release, and backend-execution guardrails- guarded live-action smoke through an injected backend only after dry-run latency evidence, explicit input policy allowance, and focus guard success-- generic local-app task catalog, intent contracts, built-in benchmark definitions across Weather lookup, Music playback, and PDF/document form-fill, local-model command parsing, deterministic fallback parsing, pointer-prompt typed command submission, dry-run workflow-step projection, guarded keyboard command templates, macOS launch/focus, guarded macOS keyboard input, Accessibility visible-text observation when trusted, and visible-text verification+- generic local-app task catalog, intent contracts, built-in benchmark definitions across Weather lookup, Music playback, and PDF/document form-fill, local JSON/JSONL task-definition loading, local-model command parsing, deterministic fallback parsing, local task-context intake, review-first document form-fill planning, pointer-prompt typed command submission, dry-run workflow-step projection, guarded keyboard command templates, macOS launch/focus, guarded macOS keyboard input, Accessibility visible-text observation when trusted, and visible-text verification- screenshot segmentation model-candidate metadata for Ultralytics YOLO26 nano segmentation (`yolo26n-seg.pt`)- optional slow-planner sidecar that publishes only validated hints without blocking reflex latency-This is still not the full off-the-shelf vision stack and must not be treated as completion. It can replay and trace compact local vision evidence, name a current YOLO segmentation candidate, and run a guarded keyboard-based local-app task path, but it does not ship live local detector/local-model/OCR/segmentation adapters over captured pixels, continuous streaming capture, Accessibility action execution, robust UI control discovery, high-volume persisted replay traces, or target-specific visual calibration.+This is still not the full off-the-shelf vision stack and must not be treated as completion. It can replay and trace compact local vision evidence, name a current YOLO segmentation candidate, load local task definitions, build reviewable document form-fill plans, and run a guarded keyboard-based local-app task path, but it does not ship live local detector/local-model/OCR/segmentation adapters over captured pixels, continuous streaming capture, Accessibility action execution, approved form-fill execution, robust UI control discovery, high-volume persisted replay traces, or target-specific visual calibration.## Required Before This Plan Is Done- Manually verify measured guarded-live execution for the first local-app task benchmark command "show me the weather for SF".- Prove fast local navigation from parsed intent, local app observation, deterministic controller state, and guarded live input, not remote planning.- Extend the narrow macOS app-control backend from keyboard-only workflows to Accessibility action/control discovery where available.+- Add the user-visible review and approval UI for document form-fill proposals before enabling guarded field entry.- Add result verification through Accessibility plus local model UI-understanding fallback, with OCR only if a narrow benchmark justifies it.- Add measured YOLO26 screenshot/crop segmentation inference for visual fallback, including export/runtime choice, crop size, mask quality, and p95 latency.- Add continuous streaming capture once queue-depth, stale-result, and trace sinks are ready for longer sessions.diff --git a/plans/done/21-swiftui-pointer-ui.md b/plans/21-swiftui-pointer-ui.mdsimilarity index 100%rename from plans/done/21-swiftui-pointer-ui.mdrename to plans/21-swiftui-pointer-ui.mddiff --git a/plans/master-plan.md b/plans/master-plan.mdindex 3cacaac7..735b28e3 100644--- a/plans/master-plan.md+++ b/plans/master-plan.md@@ -56,7 +56,7 @@ The normal Weather benchmark path should work without a remote model call. A tin## Supported Boundary- Runtime shell: minimal run coordination, ordered events, bounded context assembly, local run artifacts, manual target context capture, in-memory reflex trace retention, and stage-split latency reports are supported.-- Fast navigation hot path: typed frame/world-state/action contracts, deterministic dry-run loop, bounded target-window frame source, cheap metadata perception, recorded off-the-shelf detector/template/OCR/segmentation evidence projection, screenshot segmentation model-candidate catalog with Ultralytics YOLO26 nano segmentation (`yolo26n-seg.pt`), swappable world-state projection, deterministic controller, loop-integrated metadata-only local-navigation dry-run action selection, optional caller-supplied browser-tab metadata, dry-run action projection, generic local-app task intent contracts, data-driven task definitions, Ollama-compatible local-model command parsing to validated `TaskIntent`, deterministic parsing as fallback/validator, catalog command resolution, target-app availability checks, generic dry-run task adaptation, local-navigation request construction, step projection, guarded keyboard command templates, macOS app launch/focus, guarded macOS keyboard input, pointer-prompt typed command submission, Accessibility visible-text observation when trusted, visible-text verification, and built-in task definitions for Weather lookup, media playback, and document form-fill are supported. This is not yet a complete live fast-navigation agent: there is no Accessibility action execution, no robust live control discovery, no live local-model UI-understanding fallback, no live YOLO screenshot segmentation runner, no live voice-transcription adapter, and no manually verified live command-to-result Weather trace yet.+- Fast navigation hot path: typed frame/world-state/action contracts, deterministic dry-run loop, bounded target-window frame source, cheap metadata perception, recorded off-the-shelf detector/template/OCR/segmentation evidence projection, screenshot segmentation model-candidate catalog with Ultralytics YOLO26 nano segmentation (`yolo26n-seg.pt`), swappable world-state projection, deterministic controller, loop-integrated metadata-only local-navigation dry-run action selection, optional caller-supplied browser-tab metadata, dry-run action projection, generic local-app task intent contracts, data-driven task definitions, local JSON/JSONL task-definition loading, Ollama-compatible local-model command parsing to validated `TaskIntent`, deterministic parsing as fallback/validator, catalog command resolution, target-app availability checks, local task-context intake, document form-fill review planning, generic dry-run task adaptation, local-navigation request construction, step projection, guarded keyboard command templates, macOS app launch/focus, guarded macOS keyboard input, pointer-prompt typed command submission, Accessibility visible-text observation when trusted, visible-text verification, and built-in task definitions for Weather lookup, media playback, and document form-fill are supported. This is not yet a complete live fast-navigation agent: there is no Accessibility action execution, no robust live control discovery, no live local-model UI-understanding fallback, no live YOLO screenshot segmentation runner, no live voice-transcription adapter, and no manually verified live command-to-result Weather trace yet.- Safety boundary: action-engine command contracts, permission/focus/rate/hold/release guardrails, guarded live-action smoke with injected backends, the narrow macOS keyboard backend for local-app tasks, and replayable command traces are supported before any Accessibility-action backend exists.- Slow AI boundary: local-model task-intent parsing, local voice-transcription model routing, structured planner hints, validation/expiry/latest-valid selection, loop-adjacent slow-planner trigger/snapshot sidecar, model registry/router, OpenAI Responses and Ollama-compatible planner adapters, provider-backed local/online planner fallback, source-linked memory, and replay/eval scaffolding are supported as optional sidecar pieces. NVIDIA Parakeet TDT 0.6B v3 is the selected local voice-transcription default, with Whisper large-v3-turbo as a local rollback candidate. This is not yet the complete AI harness because semantic retrieval, redaction, aggregate model observability, live microphone transcription, live local visual UI understanding, and provider-decoded memory write proposals remain active.- Source of truth: detailed supported behavior lives in `docs/guides/minimal-run-coordinator.md`; active unfinished work lives in this plan and its primary/supporting plans.@@ -84,17 +84,18 @@ Recent commits completed these pieces:- current slice: generic local-app task catalog, local-model command parser, deterministic fallback parser, app availability check, and dry-run adapter boundary, with Weather lookup represented as built-in benchmark data.- `d6e48c9`: archived plans, which was premature for this milestone.-The code now includes the first generic local-app task catalog, Ollama-compatible local-model command parser, deterministic fallback parser, app availability check, dry-run adapter boundary, local-app live runner, macOS launch/focus and keyboard-input backend, pointer-prompt typed command wiring, sample app-task definitions across weather/media/document domains, YOLO26 screenshot segmentation model-candidate metadata, and local voice-transcription model routing. It does not yet include Accessibility action execution, robust live control discovery, live local-model UI understanding over bounded screenshots/crops, live YOLO screenshot segmentation inference, live microphone transcription, semantic memory retrieval, remote-input redaction hooks, aggregate model observability, or provider-decoded memory write proposals.+The code now includes the first generic local-app task catalog, local JSON/JSONL task-definition loader, local task context provider, document form-fill review planner, Ollama-compatible local-model command parser, deterministic fallback parser, app availability check, dry-run adapter boundary, local-app live runner, macOS launch/focus and keyboard-input backend, pointer-prompt typed command wiring, sample app-task definitions across weather/media/document domains, YOLO26 screenshot segmentation model-candidate metadata, and local voice-transcription model routing. It does not yet include Accessibility action execution, robust live control discovery, live local-model UI understanding over bounded screenshots/crops, live YOLO screenshot segmentation inference, live microphone transcription, semantic memory retrieval, remote-input redaction hooks, aggregate model observability, or provider-decoded memory write proposals.## What Should Be Done Next-1. Manually verify the pointer-prompt-to-Weather path on a real macOS session: typed command submission, local-model intent parse or deterministic fallback, Weather launch/focus, guarded key/text execution, Accessibility visible-text observation, and final verification trace.+1. Manually verify the pointer-prompt-to-Weather and pointer-prompt-to-Music paths on a real macOS session: typed command submission, local-model intent parse or deterministic fallback, app launch/focus, guarded key/text execution, Accessibility visible-text observation, and final verification trace.2. Add robust live control discovery and Accessibility actions for local-app workflows so tasks can find controls instead of relying only on keyboard shortcuts.-3. Add a local model UI-understanding fallback for bounded screenshot/crop context when Accessibility and metadata are insufficient. Prefer this before OCR-specific extraction; OCR can remain a measured optional adapter.-4. Add a measured local screenshot segmentation runner for the YOLO26 candidate only after choosing export/runtime format and crop size; keep it outside live control until p95 latency and mask quality are recorded.-5. Wire pointer-prompt voice input to a local transcription adapter: capture bounded microphone buffers, run the selected local runtime ASR model, emit transcript text, and pass that transcript through the same validated command-intent path as typed input.-6. Add benchmark/reporting evidence for command-to-result latency, local navigation/action latency, verification confidence, visual fallback latency, voice transcription latency/accuracy, and comparison against manual/chat-style workflows.-7. Keep the current dry-run/guarded-live safety boundary: local or online LLM output can only become validated intent, task definitions, app-knowledge updates, observation summaries, transcripts, or planner hints, never direct input.+3. Extend document form-fill from review planning to guarded execution: discover fields from Accessibility/local UI understanding, map structured data, present review, then execute only approved field fills.+4. Add a local model UI-understanding fallback for bounded screenshot/crop context when Accessibility and metadata are insufficient. Prefer this before OCR-specific extraction; OCR can remain a measured optional adapter.+5. Add a measured local screenshot segmentation runner for the YOLO26 candidate only after choosing export/runtime format and crop size; keep it outside live control until p95 latency and mask quality are recorded.+6. Wire pointer-prompt voice input to a local transcription adapter: capture bounded microphone buffers, run the selected local runtime ASR model, emit transcript text, and pass that transcript through the same validated command-intent path as typed input.+7. Add benchmark/reporting evidence for command-to-result latency, local navigation/action latency, verification confidence, visual fallback latency, voice transcription latency/accuracy, and comparison against manual/chat-style workflows.+8. Keep the current dry-run/guarded-live safety boundary: local or online LLM output can only become validated intent, task definitions, app-knowledge updates, observation summaries, transcripts, or planner hints, never direct input.## Completion Gates