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
chore(providers): default to Claude Code TUI in base config
[._.]/ Adam Eivycf06a409588d
diff --git a/.changelog/NEXT.md b/.changelog/NEXT.mdindex 8ab5d77fda..0c4e424485 100644--- a/.changelog/NEXT.md+++ b/.changelog/NEXT.md@@ -932,6 +932,19 @@## Changed+- **Claude Code TUI is now the default enabled provider in the base PortOS+ config.** Fresh installs get `activeProvider: "claude-code-tui"` with+ `claude-code-tui.enabled: true` out of the seed JSON. The headless+ `claude-code` CLI provider stays available (and enabled) as a fallback+ for non-interactive flows, but CoS agents launch into the TUI by default+ — the TUI owns its own commit/push/PR sequence via slashdo, handles+ live BTW paste-through, and avoids the headless CLI's stale-prompt edge+ cases. A new migration `008-default-to-claude-code-tui.js` flips+ existing installs IFF they're still on the pre-flip default+ (`activeProvider === "claude-code"` and `claude-code-tui.enabled !==+ true`); users who deliberately picked a different active provider or+ already enabled the TUI on their own are left untouched.+- **BTW ("by the way") messages are now Claude-Code-TUI-only and paste liveinto the running session.** The old flow wrote a `BTW.md` file in theworkspace and relied on a prompt instruction telling the agent to polldiff --git a/data.sample/providers.json b/data.sample/providers.jsonindex 49c2de8bc2..0be19c6fbe 100644--- a/data.sample/providers.json+++ b/data.sample/providers.json@@ -1,5 +1,5 @@{- "activeProvider": "claude-code",+ "activeProvider": "claude-code-tui","providers": {"claude-code": {"id": "claude-code",@@ -95,7 +95,7 @@"mediumModel": "claude-sonnet-4-5-20250929","heavyModel": "claude-opus-4-6","timeout": 600000,- "enabled": false,+ "enabled": true,"envVars": {},"tuiPromptDelayMs": 2500,"tuiIdleTimeoutMs": 180000diff --git a/data/migrations/008-default-to-claude-code-tui.js b/data/migrations/008-default-to-claude-code-tui.jsnew file mode 100644index 0000000000..adfc7e58d3--- /dev/null+++ b/data/migrations/008-default-to-claude-code-tui.js@@ -0,0 +1,74 @@+/**+ * Make Claude Code TUI the default enabled provider.+ *+ * Pre-existing installs were created when `claude-code` (the headless CLI)+ * was the seeded default. PortOS now runs CoS agents inside the Claude+ * Code TUI by default — it owns its own commit/push/PR sequence via+ * slashdo, supports live BTW paste-through, and avoids the headless+ * CLI's stale-prompt edge cases. This migration switches the user's+ * active provider and enables `claude-code-tui` IFF they still have the+ * pre-flip default in place. A user who deliberately picked a different+ * active provider — or already enabled the TUI on their own — is left+ * untouched.+ *+ * Idempotent: a second run is a no-op once `activeProvider` is something+ * other than `claude-code`, or once `claude-code-tui.enabled` is true.+ */++import { readFile, writeFile } from 'fs/promises';+import { join } from 'path';++const PROVIDERS_REL_PATH = 'data/providers.json';++export default {+ async up({ rootDir }) {+ const providersPath = join(rootDir, PROVIDERS_REL_PATH);+ const raw = await readFile(providersPath, 'utf-8').catch((err) => {+ if (err.code === 'ENOENT') return null;+ throw err;+ });+ if (raw == null) {+ console.log(`📄 ${PROVIDERS_REL_PATH} not present — skipping (fresh install will copy from data.sample with the new default already applied)`);+ return;+ }++ let config;+ try {+ config = JSON.parse(raw);+ } catch (err) {+ console.log(`⚠️ ${PROVIDERS_REL_PATH}: invalid JSON, skipping migration (${err.message})`);+ return;+ }++ const providers = config?.providers;+ if (!providers || typeof providers !== 'object') {+ console.log(`⚠️ ${PROVIDERS_REL_PATH}: no providers map — skipping`);+ return;+ }++ const tui = providers['claude-code-tui'];+ if (!tui) {+ // setup-data's JSON_MERGE_TARGETS would have added this if the+ // sample carried it, but skip cleanly when somehow absent.+ console.log(`⚠️ claude-code-tui provider missing — skipping (run setup-data first)`);+ return;+ }++ let changed = false;+ if (tui.enabled !== true) {+ tui.enabled = true;+ changed = true;+ }+ if (config.activeProvider === 'claude-code') {+ config.activeProvider = 'claude-code-tui';+ changed = true;+ }++ if (changed) {+ await writeFile(providersPath, `${JSON.stringify(config, null, 2)}\n`);+ console.log(`📝 ${PROVIDERS_REL_PATH}: switched default provider to claude-code-tui`);+ } else {+ console.log(`✅ ${PROVIDERS_REL_PATH}: already on claude-code-tui (or a user-selected provider), no changes`);+ }+ },+};diff --git a/server/lib/aiToolkit/defaults/providers.sample.json b/server/lib/aiToolkit/defaults/providers.sample.jsonindex df13595f76..86ad168396 100644--- a/server/lib/aiToolkit/defaults/providers.sample.json+++ b/server/lib/aiToolkit/defaults/providers.sample.json@@ -1,5 +1,5 @@{- "activeProvider": "claude-code",+ "activeProvider": "claude-code-tui","providers": {"claude-code": {"id": "claude-code",@@ -84,7 +84,7 @@"mediumModel": "claude-sonnet-4-6","heavyModel": "claude-opus-4-7","timeout": 600000,- "enabled": false,+ "enabled": true,"envVars": {},"secretEnvVars": [],"tuiPromptDelayMs": 2500,