Skip to content

Allow secret requests to write outside workspaces - #731

Merged
SawyerHood merged 1 commit into
mainfrom
bb/request-posthog-api-key-thr_3rksnka4ze
Jul 16, 2026
Merged

SawyerHood merged 1 commit into
mainfrom
bb/request-posthog-api-key-thr_3rksnka4ze

Conversation

@SawyerHood

Copy link
Copy Markdown
Collaborator

Summary

  • allow bb secret request destinations anywhere on the thread host
  • resolve relative destinations from the invoking CLI working directory and preserve absolute host paths
  • show the resolved absolute destination in the secure form and command result
  • retain dotenv reconciliation, conflict handling, and 0600 permissions for newly created files
  • update agent-facing guidance and plugin descriptions

Tests

  • pnpm exec turbo run test typecheck --filter=bb-plugin-secrets --force
  • pnpm exec prettier --check on changed plugin files
  • git diff --check

Risk

This intentionally removes workspace root confinement. The secure form displays the resolved absolute destination before the user submits secret values.

@SawyerHood
SawyerHood merged commit 2f7d6a9 into main Jul 16, 2026
10 checks passed
@SawyerHood
SawyerHood deleted the bb/request-posthog-api-key-thr_3rksnka4ze branch July 16, 2026 02:00
ymichael added a commit that referenced this pull request Sep 17, 2026
## Human comments

## What was wrong

PR #731 changed secret request destinations to resolved absolute host
paths and reused that unbounded path in the pending interaction title.
Deep working directories could therefore exceed the Plugin SDK's
160-character title limit before the secure form was created.

## What changed

Secret requests now use the concise `Add secrets` interaction title. The
complete resolved destination remains in the typed interaction payload
and is still shown in the secure form and command result. A server
harness regression covers a relative dotenv destination resolved from an
overlong working directory.

Pending-interaction headers now add invisible line-break opportunities
after `/` and `\\` path separators. This preserves the exact visible and
accessible title while preventing path-like labels from wrapping into
short, ragged lines.

No server/daemon wire contract changed, so
`HOST_DAEMON_PROTOCOL_VERSION` is unchanged.

## How you verified

- Reproduced on `origin/main` from a 227-character working directory:
`bb secret request TEST_SECRET --write-env .env.local` exited 1 with
`ui.requestInput title must be 1-160 characters`.
- `pnpm exec turbo run test typecheck --filter=bb-plugin-secrets
--force`
- `pnpm exec turbo run test --filter=@bb/app --force --
src/components/plugin/PluginPendingInteractionComposer.test.tsx`
- `pnpm exec turbo run typecheck --filter=@bb/app --force`
- `pnpm exec prettier --check plugins/secrets/src/server.ts
plugins/secrets/src/server-harness.test.ts`
- `git diff --check`

> AGENT GENERATED
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.

1 participant