Skip to content

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

Closed

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

  1. serge-ivo commented on Aug 6, 2026

    @serge-ivo
    ContributorAuthor

    Closing as implemented through the browser-task work on main. Evidence: BrowserTaskWorkflow uses the generic runApplyLoop with browser-task-specific prompt/decision in workers/api/src/lib/browser-task-loop.ts, keeping the apply loop reusable without job-specific entry points.

  2. serge-ivo commented on Aug 6, 2026

    @serge-ivo
    ContributorAuthor

    Implementation links: no associated PR was found; this landed direct on main as part of 9303abb.

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