Skip to content
Merged
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
50 changes: 35 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -423,33 +423,53 @@ Portal deep links require the matching portal and Kgoose workspace-selection cha

An app you own can use your read-only tools (for example Jira or Slack reads) when
nobody is signed in to it, such as from a schedule. This is available only where
the environment enables it (bb-block), and only for process runtime apps.
the environment enables it (bb-block), and only for process or fetch-js apps.

```sh
bl apps background on APP_ID
bl apps background status APP_ID
bl apps background off APP_ID
```

Approval is browser-only by design. Only the app's owner can turn background tool
calls on, and only from the approval page: `bl apps background status` prints
`Approve in your browser: <link>` when approval is needed, and the CLI never
approves. Turning them on makes the app owner-only, so only you can deploy it
and calls pause while any other publisher exists. `status` shows whether you are the
sole publisher, whether the app is ready or restarting, and which tools are
approved or waiting for approval. `off` turns them off and confirms the new state;
it only reduces access, so it asks for no confirmation. `--json` prints `ok`,
`app_id`, `state`, `sole_publisher`, `ready`, `restarting`, `capabilities`,
`pending_capabilities`, `confirmed_at`, `message` and `approval_url`.

On a BuilderLab Blox workstation, both commands use the workstation's user identity
Use `on` to turn them on. It opens the approval link in your browser, waits while
you approve and Compose restarts the app's sandbox so only your code runs (up to
about 10 minutes), and exits 0 when they are on and ready. Approval is
browser-only by design: only the app's owner can approve, and the CLI never
approves. Progress goes to stderr. With `--json`, stdout gets one final JSON object
(the status below). Options:

- `--no-browser` prints the link instead of opening it. The link is also only
printed on a Blox workstation and when using the workstation proxy.
- `--timeout SECONDS` (default 600) bounds the wait. On timeout it exits non-zero
and says to check `bl apps background status APP_ID`.

If the owner hasn't approved the app's own tool access yet, `on` says
`Can't turn on yet: ...`, opens the app for you to approve, and carries on once
that is done. It exits non-zero when the app declares no read-only tools
(`no_read_capabilities`), when other publishers pause access
(`other_publishers`), when access is turned off again, or when the wait times out.
Temporary network or server errors are retried until the timeout.

Turning them on makes the app owner-only, so only you can deploy it and calls
pause while any other publisher exists. `status` changes nothing: it shows whether
you are the sole publisher, whether the app is ready or restarting, which tools
are approved or waiting for approval, what blocks approval (`blocked_reason`),
and prints `Approve in your browser: <link>` when approval is needed. `off` turns
them off and confirms the new state; it only reduces access, so it asks for no
confirmation. `--json` prints `ok`, `app_id`, `state`, `sole_publisher`, `ready`,
`restarting`, `capabilities`, `pending_capabilities`, `confirmed_at`, `message`,
`blocked_reason` (`code`, `message`, `next_step`, `url`; null when nothing is
known to block approval or Kgoose doesn't report it) and `approval_url`.

On a BuilderLab Blox workstation, these commands use the workstation's user identity
through the configured `BL_TOOLS_BASE_URL` proxy, without a local login or organization
configuration. The proxy defaults to Kgoose's internal `/cash-app/goose` prefix;
`--kgoose-service-path` or `KGOOSE_SERVICE_PATH` can override it. Elsewhere the commands
use your `bl auth login` session. Neither needs `--base-url`. Exit codes follow the other `bl`
commands: 3 when you need to log in, 4 when you are not the app's owner, 5 for a
network or server failure, and 1 for refusals such as `background_disabled` (not
available in this environment), `other_publishers` or an unsupported runtime. Each
refusal carries a `next_action`.
available in this environment), `owner_consent_required`, `other_publishers` or an
unsupported runtime. Each refusal carries a `next_action`.

### App lifetime inspection and renewal

Expand Down
Loading