IDE Profiles and Auth
The IDE control plane exists so the VSCode extension can ask bgng for a resolved profile instead of duplicating CLI config and auth logic.
Profiles
Profiles are named records stored in ~/.bgng/ide/profiles.json.
beginningdb.directprofiles includebaseUrl,tenantId,filesystemId, and a computed path prefix.iminds.gatewayprofiles includegatewayUrl,filesystemId, and path prefix/.
Create or replace them with:
bgng ide connect --mode beginningdb.direct --id local-dev --label "Local dev" --base-url http://127.0.0.1:8080 --tenant-id 1 --filesystem-id main
bgng ide connect --mode iminds.gateway --id staging --label "Staging" --gateway-url https://gateway.example.com --filesystem-id main
Auth strategies
bgng ide login --profile <id> stores auth material based on the flags supplied:
| Profile | Flags | Stored strategy |
|---|---|---|
| Direct | --token | Direct bearer in secrets.json |
| Gateway | --token | Manual gateway token in sessions.json |
| Gateway | --gateway-access-token and --gateway-refresh-token | Managed gateway session |
| Gateway | Hub and dispatch flags | Dispatch session |
Gateway strategies can be refreshed with bgng ide auth refresh --profile <id>. Manual gateway tokens and direct bearer tokens have no refresh path.
Resolution contract
The VSCode extension consumes:
bgng ide profiles resolve staging --json
The result contains the profile plus an auth union. At resolution time, both dispatch and managed gateway sessions collapse to auth.sessionKind: "managed-session". Inspect the stored session record if you need to know which upstream strategy produced it.
Security note
secrets.json is plain JSON written under the user's ~/.bgng/ide/ directory. Do not treat the workspace as shareable project data.