Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/runner-workspace-id.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@qawolf/cli": minor
---

Every `qawolf runner` command takes `--workspace-id <id>`, which works in that workspace for the one command without saving it. Until now the only way to choose a runner's workspace was `qawolf auth switch`, which saves the choice for every session on the machine, so one session switching moved every other session's next runner command to the new workspace. Without the flag, runner commands still use the saved workspace. The flag also gives an organization or user API key, which saves no workspace, one to work in.
27 changes: 27 additions & 0 deletions .oxlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,33 @@
"test/worker/"
],
"overrides": [
{
"files": ["src/commands/runner/*.register.ts"],
"rules": {
"eslint/no-restricted-imports": [
"error",
{
"paths": [
{
"name": "~/commands/context.js",
"importNames": ["withAuthContext"],
"message": "Runner commands use withRunnerContext from ./context.js, which honours the runner group's --workspace-id. withAuthContext would accept the flag and ignore it."
}
],
"patterns": [
{
"group": ["../*"],
"message": "Use \"~/\" path alias instead of relative parent imports."
},
{
"group": ["bun", "bun:*"],
"message": "Bun module imports are not available in the nodejs build \u2014 use a portable alternative."
}
]
}
]
}
},
{
"files": ["src/core/**/*.ts"],
"rules": {
Expand Down
6 changes: 6 additions & 0 deletions skills/qawolf-cli/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ rather than leaving it to time out.
commands that follow need no `--runner`. Override that default for one command
with `--runner <id>`, or for a whole session with `QAWOLF_RUNNER_ID`.

Runner commands work in the workspace `qawolf auth switch` saved, which is
shared by every session on the machine. When more than one session may be
working in different workspaces, pass `--workspace-id <id>` to every runner
command instead of switching; it applies to that command only and is never
saved.

## Output

When consuming output programmatically, always pass `--json` (or `--agent`).
Expand Down
7 changes: 7 additions & 0 deletions skills/qawolf-cli/references/runner.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ rather than silently ignored.

Either answer carries a `url`, which `qawolf runner launch` prints, as does a command that launched its own runner. It is a QA Wolf page showing what the runner is doing, where a person can also take over with their own mouse and keyboard. Hand it to a person who asks what your runner is up to. The page opens for anyone on the runner's team, however the runner was launched. There is nothing to see until the runner's first run starts its screen, so the page waits until then. You read the screen with `screenshot`, not with the page.

Every runner command works in the workspace `qawolf auth switch` saved, unless
it is given `--workspace-id <id>`. The flag holds for that one command and is
never saved, so sessions on one machine working on different workspaces do not
move each other. Since runner ids are scoped to a team, pass the same
`--workspace-id` to every command that drives a runner you launched with it;
leave it off one and that command looks for the runner in the saved workspace.

Commands that target a runner find one in this order: `--runner`, then
`QAWOLF_RUNNER_ID`, then the runner stored for the current directory (which
`qawolf runner launch` sets). Setting the environment variable once is the most
Expand Down
Loading
Loading