Skip to content

[feat] Add a Paseo driver adapter #1087

Open

Description

@hsuchifeng

Parent: #818

Goal

Validate the experimental pull-based contract with a second runtime without leaking Paseo concepts into TeamAI’s workflow model.

Scope

  • Implement a Paseo adapter that starts or attaches to a run and loops over public next/report.
  • Map leases to Paseo tasks, sessions, and workspaces.
  • Run teamai init and teamai pull in the adapter environment before requesting work.
  • Declare actual capabilities, channels, machine identity, and workspace identity.
  • Map completion, failure, timeout, cancellation, and usage exhaustion to TeamAI outcomes.
  • Return released and stop polling when usage limits prevent progress.
  • Return pushed branch and optional PR metadata.
  • Support eligible gate-response channels.
  • Reuse the shared conformance scenarios added in [feat] Run prompt and agent steps with the local driver #1077 through direct engine and CLI JSON paths.
  • Keep Paseo installation and version guidance separate from portable workflow syntax.

Out of scope

Paseo-specific workflow fields, pushed stdio execution, remote secret transport design, concurrent multi-machine leases, triggers, event waits, and OpenTelemetry.

Dependencies

Acceptance criteria

  • A local-driver workflow runs unchanged through Paseo.
  • The adapter receives leases, gates, acknowledgements, and outcomes—not the graph.
  • TeamAI schemas contain no Paseo fields.
  • Released or retried attempts cannot later report successfully.
  • Paseo may return its own valid PR URL.
  • Conformance failures identify CLI/direct-operation drift.

Verification

Focused adapter and reused conformance tests with a fake Paseo boundary; build/typecheck/lint; one real Paseo run when available, otherwise one real-CLI conformance E2E with the limitation recorded. Update runtime integration documentation.

Activity

  1. SaulMoro commented on Oct 13, 2026

    @SaulMoro
    Collaborator

    next/report <run> find the run through the TeamAI scope of the current directory. A driver whose workspace is outside the product repo, like a Paseo or remote workspace, resolves another scope and gets run_not_found for a run that exists. Maybe the lookup shouldn't depend on the cwd, or the acceptance criteria could include "next and report find the run from the driver's workspace"?

  2. hsuchifeng commented on Oct 14, 2026

    @hsuchifeng
    CollaboratorAuthor

    next and report find the run by id. They do not resolve it through the TeamAI scope of the current directory. A driver whose workspace is outside the product repo, including Paseo, can address an existing run.

    This issue reuses the conformance suite added in #1077.

  3. SaulMoro commented on Oct 14, 2026

    @SaulMoro
    Collaborator

    Notes from #1078 (#1129) on the driver contract:

    • Leases gain env on command steps, a map of already-rendered strings. A driver must set these variables for the command and never put them into the command string. Inputs reach a command only this way.
    • step is a path, such as ship.check.classify. Treat it as an opaque id.
    • Steps that are skipped, end-only, or wait on a condition are never leased. The driver needs nothing about the graph.
    • The conformance suite gains scenarios for skipped steps, rendered env, sub-workflow paths and recovery after a failure. An adapter that passes it handles graph runs.

    The engine rules that span files are in docs/dev/workflow-engine.md, added by #1129.

  4. SaulMoro commented on Oct 16, 2026

    @SaulMoro
    Collaborator

    A lease for a prompt step will carry two model fields (#1177): model, the step's own, and defaultModel, the workflow's defaults.model in effect for the step. Each is an alias or a model name, resolved per tool with the member's aliases.

    The driver picks the model, first match wins: the step's model, the model set by the definition deployed for its tool, defaultModel, the tool's default. A default fills a gap and never replaces a model a definition sets for its role. Only the driver can read the deployed definition, so this order cannot be applied before the lease.

    When the first match is the step's model or defaultModel and that model cannot run, the driver fails the step with model_unavailable. That covers an alias with no model for the tool, and a driver that cannot switch models, such as a session that runs every step on its own model. It does not run the tool's default, which would record a result for a model the step did not ask for. It does not release the lease either, since next hands a released step straight back to the same driver. No capability says which models a driver can run, so this lease does not stay available to another driver the way a declined requirement does. How a driver applies a model that only the definition sets does not change.

  5. SaulMoro commented on Oct 20, 2026

    @SaulMoro
    Collaborator

    Run lookup by id moved to #1086, per the decision there. F2, F3, F4 and F5 in #1246 change the contract this adapter meets, and the fetch rule proposed on #1084 belongs to the same driver contract. If #1085 adopts can.judge, the same applies here: never take a scorer lease without a judge profile #1085 verifies.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions