Download this file
| 1 | //go:build e2elive |
| 2 | |
| 3 | package runner |
| 4 | |
| 5 | import ( |
| 6 | "amadan.net/oficina/equipo/internal/runner/provider" |
| 7 | "amadan.net/oficina/equipo/internal/runner/workspace" |
| 8 | "amadan.net/oficina/equipo/internal/runnerproto" |
| 9 | "context" |
| 10 | ) |
| 11 | |
| 12 | type OwnerHarness struct { |
| 13 | Journal *Journal |
| 14 | Credential runnerproto.RunnerCredential |
| 15 | Launcher provider.Launcher |
| 16 | Launch func(context.Context, RunClaim, workspace.Workspace, *ToolProxy) (provider.Launch, func() error, error) |
| 17 | Close func() error |
| 18 | } |
| 19 | |
| 20 | func OpenOwnerHarness(ctx context.Context, cfg Config) (OwnerHarness, error) { |
| 21 | r, err := openRuntime(ctx, cfg) |
| 22 | if err != nil { |
| 23 | return OwnerHarness{}, err |
| 24 | } |
| 25 | return OwnerHarness{r.journal, r.api.bearer, r.launchers["claude"], r.directLaunch, r.Close}, nil |
| 26 | } |
| 27 | |