Skip to content

BOT-2440: bl apps get says who can open an app - #40

Merged
nathan-thillairajah merged 9 commits into
mainfrom
bot-2440-handoff-fallback
Oct 29, 2026
Merged

nathan-thillairajah merged 9 commits into
mainfrom
bot-2440-handoff-fallback

Conversation

@nathan-thillairajah

@nathan-thillairajah nathan-thillairajah commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

Background

On bb-public, an app owner should be able to answer "who can open this?" from bl apps as easily as from Share & manage. Today get prints raw JSON with no audience. visibility and community echo raw responses. handoff fails when no portal origin is set, and errors show only a status and a code.

What changes

  • bl apps get prints a short summary. It shows the app link, one "Who can open it" line, the Share & manage link and the status. handoff is a hidden alias for get and works without a portal. In that case management_url and workspace_id can be null.
  • visibility and community grant|revoke print who can open the app afterwards. These commands now print text by default. --json output is unchanged, and get --json also includes the handoff fields.
  • bl apps community list lists your Buzz communities through Kgoose.
  • Known error codes get a sentence written by the CLI and a next step. The CLI still never prints the server's message, because the server can echo request values back (Show actionable Apps manifest validation errors #19).
  • A bad --management-base-url is still an error. A bad BL_APPS_MANAGEMENT_BASE_URL only drops the link and says why.
  • The help uses "workspace" and "private". Individual viewers are hidden.

Testing

just test and just lint pass. Each behavior change has a test that fails without it. I also ran it against bb-public staging.

Rollout and risk

This only changes the CLI. Scripts that parse this output without --json will now get text.

🤖 Generated with Claude Code

nathan-thillairajah added a commit that referenced this pull request Oct 29, 2026
Review fixes for #40:
- Treat a blank BL_APPS_MANAGEMENT_BASE_URL as unset, prefer the flag, and
  name the env var when its value is invalid.
- Build the handoff next_action from whether the audience is verified and
  whether a Share & manage link exists, so it never offers a link it lacks.
- Without a portal origin, point owners to Hosted Apps in the BuilderLab
  portal.
- Compose answers the community grant read with 409 community_grant_conflict
  when the app has no lifecycle. Add a deploy-first next_action to that 409
  and use the same wording for the 200-with-no-lifecycle guard.
- Update the README handoff section.

Co-authored-by: Helly R <755566517b9f4a67070220593bc7ef951f4b6f39175135818360f233c6a5e152@remote-agent-pilot.communities.buzz.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nathan-thillairajah nathan-thillairajah changed the title BOT-2440: let handoff show the audience without a portal URL, and give dead-end errors a next step BOT-2440: next steps for handoff and community errors without a portal Oct 29, 2026
@nathan-thillairajah
nathan-thillairajah marked this pull request as ready for review October 29, 2026 21:00
@nathan-thillairajah
nathan-thillairajah requested a review from a team as a code owner October 29, 2026 21:00
@nathan-thillairajah
nathan-thillairajah marked this pull request as draft October 29, 2026 21:03
nathan-thillairajah and others added 7 commits October 29, 2026 17:04
…e dead-end errors a next step

`bl apps handoff` now reads the app and its access policy even when no portal
origin is configured, omits the Share & manage link (management_url is null),
and says how to pass --management-base-url. An invalid origin still errors, and
the portal is still never inferred from a workstation or app hostname.

The proxy refusal for `bl apps community` and the "app has no active sharing
lifecycle" failure now carry a next_action pointing the owner to Share &
manage, with the portal link when BL_APPS_MANAGEMENT_BASE_URL is set.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The portal opens an app's dialog only when the URL has both app and workspace,
so an app-only link lands on the plain list. Without a workspace, point at
/hosted-apps and name the app to choose. The missing-lifecycle error uses the
workspace_id from the sharing response when it carries one; the proxy refusal
makes no request, so it never has one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The community grant read does not return a workspace_id, so the missing-lifecycle
error could never build a deep link. Both community errors now use the
workspace-less form and name the app to choose.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review fixes for #40:
- Treat a blank BL_APPS_MANAGEMENT_BASE_URL as unset, prefer the flag, and
  name the env var when its value is invalid.
- Build the handoff next_action from whether the audience is verified and
  whether a Share & manage link exists, so it never offers a link it lacks.
- Without a portal origin, point owners to Hosted Apps in the BuilderLab
  portal.
- Compose answers the community grant read with 409 community_grant_conflict
  when the app has no lifecycle. Add a deploy-first next_action to that 409
  and use the same wording for the 200-with-no-lifecycle guard.
- Update the README handoff section.

Co-authored-by: Helly R <755566517b9f4a67070220593bc7ef951f4b6f39175135818360f233c6a5e152@remote-agent-pilot.communities.buzz.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Prototype only; no tests yet. Verified against bb-public staging.

Co-authored-by: Helly R <755566517b9f4a67070220593bc7ef951f4b6f39175135818360f233c6a5e152@remote-agent-pilot.communities.buzz.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… errors

`bl apps get` now reads the access policy too and prints one readable
line about who can open the app, beside its link and the Share & manage
link. `handoff` becomes a hidden alias for the same output, and
`get --json` keeps its inspection fields with the handoff fields added.

`visibility` and `community grant|revoke` print who can open the app
afterwards unless `--json` is passed. Community names come from Kgoose
when a local login is available, otherwise IDs are shown.

Known Compose error codes get a CLI-written sentence and, when the
server sends none, a next step. The server's error.message is still
never printed, as in #19.

Help text now says workspace and private, hides `access set` and its
individual viewers, and fills in every sharing argument.

Co-authored-by: Irving B <6c4c50b3b6dee89feaca78ea87eb5c8fde651d2d7b39d6da8c9354ce7a34e313@remote-agent-pilot.communities.buzz.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Irving B <6c4c50b3b6dee89feaca78ea87eb5c8fde651d2d7b39d6da8c9354ce7a34e313@remote-agent-pilot.communities.buzz.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nathan-thillairajah nathan-thillairajah changed the title BOT-2440: next steps for handoff and community errors without a portal BOT-2440: bl apps get says who can open an app Oct 29, 2026
- community list errors use CLI-written text per status and code, never
  the Kgoose message or body, and a 200 that isn't a JSON object with a
  communities list is an error instead of an empty account
- community_grant_conflict and community_grant_denied explain themselves
- a bad BL_APPS_MANAGEMENT_BASE_URL drops only the link; a bad
  --management-base-url still fails before any request
- the who-can-open count needs an owner to leave out, and the access-read
  and tier-resolution texts say what actually happened
- tests for community list end to end, the session header, redaction and
  the no-community lookup short-circuit

Co-authored-by: Irving B <6c4c50b3b6dee89feaca78ea87eb5c8fde651d2d7b39d6da8c9354ce7a34e313@remote-agent-pilot.communities.buzz.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nathan-thillairajah
nathan-thillairajah marked this pull request as ready for review October 29, 2026 21:48

@kalvinnchau kalvinnchau left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤖 Code-only review: one actionable remediation issue below. No runtime validation was performed.

Comment thread src/bl/apps.rs
kalvinnchau
kalvinnchau previously approved these changes Oct 29, 2026
… is missing

When the portal is configured but the app comes back without workspace_id,
the handoff now says the workspace is missing and points the owner to Share
& manage by app name, instead of asking for --management-base-url or
BL_APPS_MANAGEMENT_BASE_URL again.

Co-authored-by: Irving B <6c4c50b3b6dee89feaca78ea87eb5c8fde651d2d7b39d6da8c9354ce7a34e313@remote-agent-pilot.communities.buzz.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nathan-thillairajah
nathan-thillairajah merged commit d5c9ff9 into main Oct 29, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants