feat(KB-335): rename environment variables from KB_* to FUSION_*

- Rename all KB_* environment variables to FUSION_* prefix across CLI and dashboard
- Update CLI runtime files (native-patch.ts) and build configuration
- Update dashboard server, badge-pubsub, GitHub webhooks, and terminal service
- Update test files to use new FUSION_API_KEY and related env vars
- Update documentation in README, AGENTS.md, STANDALONE.md, and dashboard README
- Update changeset files with new environment variable names
This commit is contained in:
gsxdsm
2026-03-31 17:03:23 -07:00
parent a114446844
commit ab3dff2100
16 changed files with 102 additions and 83 deletions

View File

@@ -34,10 +34,10 @@ When deploying the dashboard behind a load balancer with multiple instances, con
```bash
# Set Redis URL for cross-instance badge synchronization
export KB_BADGE_PUBSUB_REDIS_URL="redis://redis.example.com:6379"
export FUSION_BADGE_PUBSUB_REDIS_URL="redis://redis.example.com:6379"
# Optional: customize the pub/sub channel (default: kb:badge-updates)
export KB_BADGE_PUBSUB_CHANNEL="my-app-badge-updates"
# Optional: customize the pub/sub channel (default: fusion:badge-updates)
export FUSION_BADGE_PUBSUB_CHANNEL="my-app-badge-updates"
fn dashboard
```
@@ -50,10 +50,10 @@ For real-time PR/issue badge updates, configure a GitHub App to push updates to
**Required Environment Variables:**
```bash
export KB_GITHUB_APP_ID="123456"
export KB_GITHUB_APP_PRIVATE_KEY_PATH="/path/to/private-key.pem"
# Or: export KB_GITHUB_APP_PRIVATE_KEY="$(cat /path/to/private-key.pem)"
export KB_GITHUB_WEBHOOK_SECRET="your-webhook-secret"
export FUSION_GITHUB_APP_ID="123456"
export FUSION_GITHUB_APP_PRIVATE_KEY_PATH="/path/to/private-key.pem"
# Or: export FUSION_GITHUB_APP_PRIVATE_KEY="$(cat /path/to/private-key.pem)"
export FUSION_GITHUB_WEBHOOK_SECRET="your-webhook-secret"
```
**GitHub App Configuration:**

View File

@@ -230,7 +230,7 @@ function compileBinary(outFile: string, target: string, isCrossCompile: boolean)
...process.env,
NODE_PATH: join(workspaceRoot, "node_modules"),
// Tell the runtime where to find native assets
KB_RUNTIME_DIR: join(outDir, "runtime"),
FUSION_RUNTIME_DIR: join(outDir, "runtime"),
},
});

View File

@@ -39,9 +39,9 @@ function findStagedNativeDir(): string | null {
return nextToBinary;
}
// Check KB_RUNTIME_DIR env var
if (process.env.KB_RUNTIME_DIR) {
const envPath = join(process.env.KB_RUNTIME_DIR, prebuildName);
// Check FUSION_RUNTIME_DIR env var
if (process.env.FUSION_RUNTIME_DIR) {
const envPath = join(process.env.FUSION_RUNTIME_DIR, prebuildName);
if (existsSync(join(envPath, "pty.node"))) {
return envPath;
}
@@ -99,7 +99,7 @@ export function setupNativeResolution(): { success: boolean; nativeDir: string |
}
// Store reference for other code to use
process.env.KB_NATIVE_ASSETS_PATH = nativeDir;
process.env.FUSION_NATIVE_ASSETS_PATH = nativeDir;
// Create the fake bunfs structure
const tmpRoot = join(tmpdir(), `kb-bunfs-${process.pid}`);
@@ -123,7 +123,7 @@ export function setupNativeResolution(): { success: boolean; nativeDir: string |
}
// Store the path for potential use
process.env.KB_FAKE_BUNFS_ROOT = tmpRoot;
process.env.FUSION_FAKE_BUNFS_ROOT = tmpRoot;
// Try to create symlink from /$bunfs/root to our temp directory
// This allows node-pty's relative require() to find the native module
@@ -184,7 +184,7 @@ export function cleanupNativeResolution(): void {
*/
export function initNativePatch(): { success: boolean; nativeDir: string | null } {
if (initialized || !isBunBinary) {
return { success: true, nativeDir: process.env.KB_NATIVE_ASSETS_PATH || null };
return { success: true, nativeDir: process.env.FUSION_NATIVE_ASSETS_PATH || null };
}
const result = setupNativeResolution();