Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS
JavaScript ai-agentsdashboarddeveloper-toolsdigital-twinquantified-selfsecond-brainself-hostedtailscale
refactor(cos): drop gh* prefix from createPR result fields (now forge-agnostic)
Adam Eivy30ec48303363
diff --git a/server/services/agentLifecycle.js b/server/services/agentLifecycle.jsindex d908735d25..50f8aa07f6 100644--- a/server/services/agentLifecycle.js+++ b/server/services/agentLifecycle.js@@ -1183,18 +1183,18 @@ export async function cleanupAgentWorktree(agentId, success, { openPR = false, d}const cliName = prResult?.cli || 'gh';- const authHint = prResult?.ghAccount- ? ` (${cliName} authed as ${prResult.ghAccount} for ${prResult.ghOwner})`- : prResult?.ghOwner- ? ` (${cliName} on ${prResult.ghHost || prResult.ghOwner} — no account auto-pinned)`+ const authHint = prResult?.account+ ? ` (${cliName} authed as ${prResult.account} for ${prResult.owner})`+ : prResult?.owner+ ? ` (${cliName} on ${prResult.host || prResult.owner} — no account auto-pinned)`: '';- emitLog('error', `🌳 PR creation failed for ${worktreeBranch}${authHint}: ${reason}`, { agentId, branchName: worktreeBranch, cli: prResult?.cli, ghAccount: prResult?.ghAccount, ghOwner: prResult?.ghOwner, ghHost: prResult?.ghHost });+ emitLog('error', `🌳 PR creation failed for ${worktreeBranch}${authHint}: ${reason}`, { agentId, branchName: worktreeBranch, cli: prResult?.cli, account: prResult?.account, owner: prResult?.owner, host: prResult?.host });warnings.push(`PR creation failed for branch ${worktreeBranch}: ${reason}. Worktree preserved for manual PR creation.`);return warnings;}const cliName = prResult.cli || 'gh';- emitLog('success', `🌳 Created PR: ${prResult.url} (${cliName}${prResult.ghAccount ? ` authed as ${prResult.ghAccount}` : ''})`, { agentId, branchName: worktreeBranch, cli: prResult.cli, ghAccount: prResult.ghAccount, ghOwner: prResult.ghOwner, ghHost: prResult.ghHost });+ emitLog('success', `🌳 Created PR: ${prResult.url} (${cliName}${prResult.account ? ` authed as ${prResult.account}` : ''})`, { agentId, branchName: worktreeBranch, cli: prResult.cli, account: prResult.account, owner: prResult.owner, host: prResult.host });const result = await removeWorktree(agentId, sourceWorkspace, worktreeBranch, { merge: false }).catch(err => {emitLog('warn', `🌳 Worktree cleanup failed for ${agentId}: ${err.message}`, { agentId });diff --git a/server/services/git.js b/server/services/git.jsindex d560678880..369a28df0a 100644--- a/server/services/git.js+++ b/server/services/git.js@@ -443,7 +443,7 @@ export async function resolveForgeForRepo(dir) {* @param {string} options.body - PR/MR description* @param {string} options.base - Base branch (target)* @param {string} options.head - Head branch (source, must be pushed to remote)- * @returns {Promise<{success: boolean, url?: string, error?: string, cli?: string, ghAccount?: string|null, ghOwner?: string|null, ghHost?: string|null}>}+ * @returns {Promise<{success: boolean, url?: string, error?: string, cli?: string, account?: string|null, owner?: string|null, host?: string|null}>}*/export async function createPR(dir, { title, body, base, head }) {const { cli, env, host, owner, account } = await resolveForgeForRepo(dir);@@ -452,7 +452,7 @@ export async function createPR(dir, { title, body, base, head }) {? ['mr', 'create', '--title', title, '--description', body || '', '--target-branch', base, '--source-branch', head]: ['pr', 'create', '--title', title, '--body', body || '', '--base', base, '--head', head];- const meta = { cli, ghAccount: account, ghOwner: owner, ghHost: host };+ const meta = { cli, account, owner, host };return new Promise((resolve) => {const child = spawn(cli, args, { cwd: dir, env, shell: false, windowsHide: true });