Skip to content

BOT-2523: make apps private at creation and switch their audience - #39

Merged
nathan-thillairajah merged 2 commits into
mainfrom
markS/bot-2523-private-cli
Oct 29, 2026
Merged

nathan-thillairajah merged 2 commits into
mainfrom
markS/bot-2523-private-cli

Conversation

@nathan-thillairajah

Copy link
Copy Markdown
Contributor

Part of BOT-2523. Stacked on #38, and uses the visibility-only API from squareup/blockplat-compose#500.

What changes

  • bl apps create --private makes the app private right after it's reserved and before it's initialized, so a private app is never visible. Any deploy is a separate command that runs later.
  • If making it private fails, or the server reports a different app or visibility, create stops before initializing and the error says not to deploy. Running the same command again reconciles the reservation and retries, since setting visibility is idempotent.
  • bl apps visibility APP_ID workspace|private switches an existing app between "everyone in your workspace" and "only people I add". It sends only {"visibility": ...} to PUT /v1/agent/apps/{app_id}/visibility, so viewers, publishers and community grants are kept, and it prints the resulting audience. The internal values organization/restricted aren't accepted here.

Tests

  • create --private calls plan, reserve, visibility, initialize, in that order.
  • A 403, a response with the wrong visibility, or a response for a different app each stop create before initialize.
  • Create without --private makes no visibility call.
  • visibility sends only the visibility for both audiences, and rejects a mismatched response.
  • visibility rejects internal or unknown audiences before auth or network. visibility and --private show up in help and --describe-commands.

just test and just lint pass.

Ordering

This needs compose#500 deployed before it's useful. #500 is stacked on #496. Merge this after #38.

🤖 Generated with Claude Code

@nathan-thillairajah
nathan-thillairajah requested a review from a team as a code owner October 29, 2026 16:49
@nathan-thillairajah
nathan-thillairajah force-pushed the markS/bot-2475-community-cli branch from 32b391b to 39980ed Compare October 29, 2026 17:40
@nathan-thillairajah
nathan-thillairajah force-pushed the markS/bot-2523-private-cli branch from 9fcff47 to 2379241 Compare October 29, 2026 17:41
@nathan-thillairajah
nathan-thillairajah force-pushed the markS/bot-2475-community-cli branch from 39980ed to d4b3950 Compare October 29, 2026 17:48
@nathan-thillairajah
nathan-thillairajah force-pushed the markS/bot-2523-private-cli branch from 2379241 to 6bb77e1 Compare October 29, 2026 17:49
nathan-thillairajah and others added 2 commits October 29, 2026 14:06
`bl apps create --private` makes the reserved app private before
initialization, so a private app is never visible. If that step fails,
create stops before initializing and tells the caller not to deploy.

`bl apps visibility APP_ID workspace|private` changes only the base
audience through PUT /visibility, keeping viewers, publishers and
community grants.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Retrying doesn't help with every failure, so the error now also points
at `bl apps visibility APP_ID private`. Adds a test that a retried
create reconciles the reservation and then makes it private.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@nathan-thillairajah
nathan-thillairajah force-pushed the markS/bot-2523-private-cli branch from 6bb77e1 to bafcbc7 Compare October 29, 2026 18:06
@nathan-thillairajah
nathan-thillairajah changed the base branch from markS/bot-2475-community-cli to main October 29, 2026 18:06
@nathan-thillairajah
nathan-thillairajah merged commit 7a0ff63 into main Oct 29, 2026
5 of 6 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