pr_01m47d24b0e6n91zwymwxg0vpx/packages/contracts/src/runner.ts
Pick any line to see why it is the way it is: the commit, the pull request and issue it came from, and what the agent was thinking.
| Hosted agents: sandboxes on Cloudflare Containers started from an intent | 1 | import type { User, Viewer } from "./identity"; |
| 2 | import type { Result } from "./result"; | |
| Issues and pull requests replace intents and attempts | 3 | import type { RepoPath } from "./repos"; |
| 4 | import type { Pull } from "./work"; | |
| Hosted agents: sandboxes on Cloudflare Containers started from an intent | 5 | |
| g1t agents: model menu and optional AI Gateway routing | 6 | /** A model a g1t agent can run on, as offered to the person starting it. */ |
| 7 | export type AgentModel = { | |
| 8 | /** Stable name used in requests, e.g. `balanced`. */ | |
| 9 | id: string; | |
| 10 | label: string; | |
| 11 | description: string; | |
| Show the model behind each choice; toolchains in the sandbox | 12 | /** The model behind it, by its public name, e.g. `Claude Sonnet 5.5`. */ |
| 13 | modelName: string; | |
| g1t agents: model menu and optional AI Gateway routing | 14 | }; |
| 15 | ||
| Hosted agents: sandboxes on Cloudflare Containers started from an intent | 16 | export type RunHostedInput = { |
| Issues and pull requests replace intents and attempts | 17 | /** How many agents to put on the issue, each in its own sandbox. */ |
| Hosted agents: sandboxes on Cloudflare Containers started from an intent | 18 | count: number; |
| Issues and pull requests replace intents and attempts | 19 | /** Extra guidance given to the agents along with the issue. */ |
| Hosted agents: sandboxes on Cloudflare Containers started from an intent | 20 | instructions?: string; |
| g1t agents: model menu and optional AI Gateway routing | 21 | /** One of the offered model ids; the first offered when absent. */ |
| 22 | model?: string; | |
| Hosted agents: sandboxes on Cloudflare Containers started from an intent | 23 | }; |
| 24 | ||
| Issues and pull requests replace intents and attempts | 25 | /** Hosted agents: sandboxes on g1t that work on an issue. */ |
| Hosted agents: sandboxes on Cloudflare Containers started from an intent | 26 | export interface RunnerApi { |
| g1t agents: model menu and optional AI Gateway routing | 27 | /** The models this viewer may run g1t agents on; empty if they may not. */ |
| 28 | models(viewer: Viewer): Promise<AgentModel[]>; | |
| Hosted agents: sandboxes on Cloudflare Containers started from an intent | 29 | /** |
| Issues and pull requests replace intents and attempts | 30 | * Opens `count` draft pull requests for the issue, each made by an agent |
| 31 | * in its own sandbox. Returns as soon as the sandboxes are starting; | |
| 32 | * progress shows up in each pull request's session. | |
| Hosted agents: sandboxes on Cloudflare Containers started from an intent | 33 | */ |
| Issues and pull requests replace intents and attempts | 34 | run(actor: User, repo: RepoPath, issue: number, input: RunHostedInput): Promise<Result<Pull[]>>; |
| Hosted agents: sandboxes on Cloudflare Containers started from an intent | 35 | } |