Skip to content

[browser] Extract the generic browser-task engine from the apply loop #70

Description

@serge-ivo

[browser] Extract the generic browser-task engine from the apply loop

Factor the job-specific parts out of lib/apply-loop.ts so the pure loop can drive ANY objective, with zero behavior change to job-apply.

Do

  • Keep runApplyLoop / ApplyDeps<J extends BrowserJobBase> as the generic core (it already is).
  • Move job-specific pieces behind the decide dep + a pluggable prompt: applySystemPrompt, decideAction, and the job-only finish outcomes (submitted/ready/expired/blocked). Introduce a generic outcome set (done/blocked/needs_input/failed/...) the apply variant maps onto.
  • No new entry points here — apply keeps calling the same code paths.

Acceptance

  • Job-apply behavior + tests unchanged (full apply suite green).
  • The generic engine is importable without pulling in job-specific prompt/outcomes.

Part of the browser-generalization epic. Blocks the rest.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    browser-agentsBrowser automation generalization

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions