@openbuilder/cli 0.50.43 → 0.50.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (82) hide show
  1. package/dist/chunks/{Banner-C-FTiOIR.js → Banner-BlktOjfl.js} +2 -2
  2. package/dist/chunks/Banner-BlktOjfl.js.map +1 -0
  3. package/dist/chunks/_commonjsHelpers-h-Bqc03Z.js +34 -0
  4. package/dist/chunks/_commonjsHelpers-h-Bqc03Z.js.map +1 -0
  5. package/dist/chunks/auto-update-Dq2PFvjt.js +1 -0
  6. package/dist/chunks/auto-update-Dq2PFvjt.js.map +1 -0
  7. package/dist/chunks/build-D0qYqIq0.js +1 -0
  8. package/dist/chunks/build-D0qYqIq0.js.map +1 -0
  9. package/dist/chunks/cleanup-qVTsA3tk.js +1 -0
  10. package/dist/chunks/cleanup-qVTsA3tk.js.map +1 -0
  11. package/dist/chunks/cli-auth-ChCnxlFl.js +1 -0
  12. package/dist/chunks/cli-auth-ChCnxlFl.js.map +1 -0
  13. package/dist/chunks/cli-error-BjQwvWtK.js +1 -0
  14. package/dist/chunks/cli-error-BjQwvWtK.js.map +1 -0
  15. package/dist/chunks/config-BGP1jZJ4.js +1 -0
  16. package/dist/chunks/config-BGP1jZJ4.js.map +1 -0
  17. package/dist/chunks/config-manager-BkbjtN-H.js +1 -0
  18. package/dist/chunks/config-manager-BkbjtN-H.js.map +1 -0
  19. package/dist/chunks/database-BvAbD4sP.js +1 -0
  20. package/dist/chunks/database-BvAbD4sP.js.map +1 -0
  21. package/dist/chunks/database-setup-BYjIRAmT.js +1 -0
  22. package/dist/chunks/database-setup-BYjIRAmT.js.map +1 -0
  23. package/dist/chunks/devtools-7A3EXJhY.js +75 -0
  24. package/dist/chunks/devtools-7A3EXJhY.js.map +1 -0
  25. package/dist/chunks/exports-ij9sv4UM.js +7793 -0
  26. package/dist/chunks/exports-ij9sv4UM.js.map +1 -0
  27. package/dist/chunks/index-oFqGtEeF.js +119 -0
  28. package/dist/chunks/index-oFqGtEeF.js.map +1 -0
  29. package/dist/chunks/{init-DNyPS_SR.js → init-BsQ3dhwf.js} +9 -9
  30. package/dist/chunks/init-BsQ3dhwf.js.map +1 -0
  31. package/dist/chunks/{init-tui-EFMXj-MG.js → init-tui-Dvk6Ndvl.js} +8 -8
  32. package/dist/chunks/init-tui-Dvk6Ndvl.js.map +1 -0
  33. package/dist/chunks/logger-ZpJi7chw.js +1 -0
  34. package/dist/chunks/logger-ZpJi7chw.js.map +1 -0
  35. package/dist/chunks/login-BhtodVsj.js +1 -0
  36. package/dist/chunks/login-BhtodVsj.js.map +1 -0
  37. package/dist/chunks/logout-CDDASeuQ.js +1 -0
  38. package/dist/chunks/logout-CDDASeuQ.js.map +1 -0
  39. package/dist/chunks/{main-tui-D-SG-Ba5.js → main-tui-Cklcr3FX.js} +10 -10
  40. package/dist/chunks/main-tui-Cklcr3FX.js.map +1 -0
  41. package/dist/chunks/manager-CvGX9qqe.js +1 -0
  42. package/dist/chunks/manager-CvGX9qqe.js.map +1 -0
  43. package/dist/chunks/{port-allocator-B0q7xkLs.js → port-allocator-Ct3ioni4.js} +2 -34
  44. package/dist/chunks/port-allocator-Ct3ioni4.js.map +1 -0
  45. package/dist/chunks/process-killer-CaUL7Kpl.js +1 -0
  46. package/dist/chunks/process-killer-CaUL7Kpl.js.map +1 -0
  47. package/dist/chunks/prompts-1QbE_bRr.js +1 -0
  48. package/dist/chunks/prompts-1QbE_bRr.js.map +1 -0
  49. package/dist/chunks/repo-cloner-CpOQjFSo.js +1 -0
  50. package/dist/chunks/repo-cloner-CpOQjFSo.js.map +1 -0
  51. package/dist/chunks/repo-detector-B_oj696o.js +1 -0
  52. package/dist/chunks/repo-detector-B_oj696o.js.map +1 -0
  53. package/dist/chunks/{run-Cor14S0I.js → run-wycadErJ.js} +15 -28
  54. package/dist/chunks/run-wycadErJ.js.map +1 -0
  55. package/dist/chunks/runner-logger-instance-nDWv2h2T.js +1 -0
  56. package/dist/chunks/runner-logger-instance-nDWv2h2T.js.map +1 -0
  57. package/dist/chunks/spinner-BJL9zWAJ.js +1 -0
  58. package/dist/chunks/spinner-BJL9zWAJ.js.map +1 -0
  59. package/dist/chunks/{start-k9iGDVWo.js → start-CQKEEma-.js} +8 -7
  60. package/dist/chunks/start-CQKEEma-.js.map +1 -0
  61. package/dist/chunks/start-traditional-uoLZXdxm.js +1 -0
  62. package/dist/chunks/start-traditional-uoLZXdxm.js.map +1 -0
  63. package/dist/chunks/status-cS8YwtUx.js +1 -0
  64. package/dist/chunks/status-cS8YwtUx.js.map +1 -0
  65. package/dist/chunks/{vendor-react-CXgiD1Dl.js → theme-CktnrDZj.js} +47 -227
  66. package/dist/chunks/theme-CktnrDZj.js.map +1 -0
  67. package/dist/chunks/upgrade-CKjl4HlB.js +1 -0
  68. package/dist/chunks/upgrade-CKjl4HlB.js.map +1 -0
  69. package/dist/chunks/use-app-Cj2bzWaw.js +10 -0
  70. package/dist/chunks/use-app-Cj2bzWaw.js.map +1 -0
  71. package/dist/chunks/{useBuildState-DscLOZLl.js → useBuildState-pcDGDakI.js} +2 -2
  72. package/dist/chunks/useBuildState-pcDGDakI.js.map +1 -0
  73. package/dist/cli/index.js +6 -5
  74. package/dist/cli/index.js.map +1 -0
  75. package/dist/index.js +2044 -106
  76. package/dist/index.js.map +1 -0
  77. package/dist/instrument.js +64119 -37
  78. package/dist/instrument.js.map +1 -0
  79. package/package.json +1 -1
  80. package/dist/chunks/theme-DhorI2Hb.js +0 -43
  81. package/dist/chunks/vendor-ai-sdk-CSJ0bw9X.js +0 -1970
  82. package/dist/chunks/vendor-sentry-CqA9P3UG.js +0 -71910
@@ -0,0 +1 @@
1
+ {"version":3,"file":"start-traditional-uoLZXdxm.js","sources":["../../src/cli/commands/start-traditional.ts"],"sourcesContent":["/**\n * Enhanced start command with graceful shutdown and better error handling\n * Starts the full stack: Web App + Runner (no broker - runner connects directly)\n */\n\nimport { spawn, ChildProcess } from 'node:child_process';\nimport { existsSync, writeFileSync } from 'node:fs';\nimport { join } from 'node:path';\nimport * as p from '@clack/prompts';\nimport pc from 'picocolors';\nimport { configManager } from '../utils/config-manager.js';\nimport { findMonorepoRoot, isInsideMonorepo } from '../utils/repo-detector.js';\nimport { killProcessOnPort } from '../utils/process-killer.js';\nimport { CLIError, errors } from '../utils/cli-error.js';\nimport { shutdownHandler } from '../index.js';\n\ninterface StartOptions {\n port?: string;\n dev?: boolean; // Use development mode (hot reload)\n rebuild?: boolean; // Rebuild services before starting\n local?: boolean; // Enable local mode (default: true, use --no-local to disable)\n verbose?: boolean; // Enable verbose logging\n}\n\ninterface ManagedProcess {\n name: string;\n process: ChildProcess;\n port?: number;\n}\n\nexport async function startCommand(options: StartOptions) {\n const s = p.spinner();\n\n // Step 1: Find monorepo\n s.start('Locating OpenBuilder repository');\n\n let monorepoRoot: string | undefined;\n const config = configManager.get();\n\n // Try config first\n if (config.monorepoPath && existsSync(config.monorepoPath)) {\n monorepoRoot = config.monorepoPath;\n }\n\n // Try detection\n if (!monorepoRoot) {\n const repoCheck = await isInsideMonorepo();\n if (repoCheck.inside && repoCheck.root) {\n monorepoRoot = repoCheck.root;\n configManager.set('monorepoPath', monorepoRoot);\n }\n }\n\n if (!monorepoRoot) {\n s.stop(pc.red('✗') + ' Repository not found');\n throw errors.monorepoNotFound([\n config.monorepoPath || 'none',\n process.cwd(),\n ]);\n }\n\n s.stop(pc.green('✓') + ' Repository found');\n\n // Step 2: Check dependencies\n const nodeModulesPath = join(monorepoRoot, 'node_modules');\n\n if (!existsSync(nodeModulesPath)) {\n s.start('Installing dependencies');\n try {\n const { installDependencies } = await import('../utils/repo-cloner.js');\n await installDependencies(monorepoRoot);\n s.stop(pc.green('✓') + ' Dependencies installed');\n } catch (error) {\n s.stop(pc.red('✗') + ' Failed to install dependencies');\n throw new CLIError({\n code: 'DEPENDENCIES_INSTALL_FAILED',\n message: 'Failed to install dependencies',\n cause: error instanceof Error ? error : new Error(String(error)),\n suggestions: [\n `Run manually: cd ${monorepoRoot} && pnpm install`,\n 'Check your internet connection',\n ],\n });\n }\n }\n\n // Step 2.5: Check for production build (unless --dev mode)\n const nextBuildIdPath = join(monorepoRoot, 'apps', 'openbuilder', '.next', 'BUILD_ID');\n const needsProductionBuild = !options.dev && !existsSync(nextBuildIdPath);\n\n // Rebuild services if requested OR if production build is missing\n if (options.rebuild || needsProductionBuild) {\n const buildReason = options.rebuild \n ? 'Rebuilding services' \n : 'Building for production (first run)';\n s.start(buildReason);\n\n try {\n // Use turbo to build all services with caching\n await new Promise<void>((resolve, reject) => {\n const buildProcess = spawn('pnpm', ['build:all'], {\n cwd: monorepoRoot,\n stdio: 'inherit', // Show build output in traditional mode\n shell: true,\n });\n\n buildProcess.on('close', (code) => {\n if (code === 0) {\n resolve();\n } else {\n reject(new Error(`Build failed with code ${code}`));\n }\n });\n\n buildProcess.on('error', reject);\n });\n\n s.stop(pc.green('✓') + ' Build complete (using Turborepo cache)');\n } catch (error) {\n s.stop(pc.red('✗') + ' Build failed');\n throw new CLIError({\n code: 'BUILD_FAILED',\n message: 'Failed to build services',\n suggestions: [\n 'Check that all dependencies are installed',\n 'Try running: pnpm build:all',\n 'Run with --dev flag to skip build and use dev mode',\n ],\n });\n }\n }\n\n // Step 3: Check database\n if (!config.databaseUrl) {\n throw new CLIError({\n code: 'MISSING_REQUIRED_CONFIG',\n message: 'Database URL not configured',\n suggestions: [\n 'Run initialization: openbuilder init',\n 'Or set manually: openbuilder config set databaseUrl <url>',\n 'Or setup database: openbuilder db',\n ],\n docs: 'https://github.com/codyde/openbuilder#database-setup',\n });\n }\n\n // Step 4: Clean up zombie processes\n const webPort = Number(options.port || '3000');\n\n s.start('Checking for port conflicts');\n await killProcessOnPort(webPort);\n s.stop(pc.green('✓') + ' Ports available');\n\n console.log();\n console.log(pc.bold('Starting services...'));\n console.log();\n\n const processes: ManagedProcess[] = [];\n const sharedSecret = configManager.getSecret() || 'dev-secret';\n\n // Register cleanup with shutdown handler\n shutdownHandler.onShutdown(async () => {\n console.log();\n console.log(pc.yellow('⚠'), 'Stopping all services...');\n\n // Kill all child processes\n for (const { name, process: proc } of processes) {\n if (!proc.killed && proc.pid) {\n console.log(pc.dim(` Stopping ${name}...`));\n proc.kill('SIGTERM');\n }\n }\n\n // Give them time to exit gracefully\n await new Promise(resolve => setTimeout(resolve, 2000));\n\n // Force kill stragglers\n for (const { name, port } of processes) {\n if (port) {\n try {\n await killProcessOnPort(port);\n } catch {\n // Best effort\n }\n }\n }\n\n console.log(pc.green('✓'), 'All services stopped');\n });\n\n try {\n // Local mode is enabled by default, can be disabled with --no-local\n const isLocalMode = options.local !== false;\n \n // Write .env.local file to ensure env vars are available to Next.js\n const envLocalPath = join(monorepoRoot, 'apps', 'openbuilder', '.env.local');\n const envContent = [\n '# Auto-generated by openbuilder CLI - DO NOT EDIT',\n `# Generated at: ${new Date().toISOString()}`,\n '',\n `OPENBUILDER_LOCAL_MODE=${isLocalMode ? 'true' : 'false'}`,\n `RUNNER_SHARED_SECRET=${sharedSecret}`,\n `WORKSPACE_ROOT=${config.workspace}`,\n `RUNNER_ID=${config.runner?.id || 'local'}`,\n `RUNNER_DEFAULT_ID=${config.runner?.id || 'local'}`,\n `DATABASE_URL=${config.databaseUrl || ''}`,\n '',\n ].join('\\n');\n \n writeFileSync(envLocalPath, envContent);\n \n // Start Web App (now handles runner WebSocket connections directly)\n console.log(pc.cyan('1/2'), 'Starting web app...');\n // Default to production mode unless --dev flag is present\n const webCommand = options.dev ? 'dev' : 'start';\n const webApp = spawn('pnpm', ['--filter', 'openbuilder', webCommand], {\n cwd: monorepoRoot,\n stdio: ['ignore', 'pipe', 'pipe'],\n shell: true,\n env: {\n ...process.env,\n PORT: String(webPort),\n DATABASE_URL: config.databaseUrl,\n RUNNER_SHARED_SECRET: sharedSecret,\n WORKSPACE_ROOT: config.workspace,\n RUNNER_ID: config.runner?.id || 'local',\n RUNNER_DEFAULT_ID: config.runner?.id || 'local',\n // Enable local mode - bypasses authentication requirements (default: true)\n OPENBUILDER_LOCAL_MODE: isLocalMode ? 'true' : 'false',\n },\n });\n\n processes.push({ name: 'Web App', process: webApp, port: webPort });\n shutdownHandler.registerProcess(webApp);\n\n // Handle web app output\n webApp.stdout?.on('data', (data) => {\n const text = data.toString().trim();\n if (text && !text.includes('warn') && !text.includes('deprecated')) {\n console.log(pc.blue('[web]'), text);\n }\n });\n\n webApp.stderr?.on('data', (data) => {\n const text = data.toString().trim();\n if (text && !text.includes('warn') && !text.includes('deprecated')) {\n console.log(pc.yellow('[web]'), text);\n }\n });\n\n webApp.on('exit', (code) => {\n // Exit codes 0, 130 (SIGINT), and 143 (SIGTERM) are normal shutdown\n if (code !== 0 && code !== null && code !== 130 && code !== 143) {\n console.error(pc.red('✗'), `Web app crashed with code ${code}`);\n process.exit(1);\n }\n });\n\n // Wait for web app and WebSocket server to initialize\n await new Promise(resolve => setTimeout(resolve, 3000));\n\n // Start Runner\n console.log(pc.cyan('2/2'), 'Starting runner...');\n console.log();\n\n // Success message\n console.log(pc.green('✓'), pc.bold('All services started!'));\n console.log();\n console.log(pc.bold('Services running:'));\n console.log(` ${pc.blue('Web App:')} http://localhost:${webPort}`);\n console.log(` ${pc.magenta('Runner:')} Connected to web app`);\n console.log();\n console.log(pc.dim(`Press ${pc.cyan('Ctrl+C')} to stop all services`));\n console.log();\n\n // Start runner (blocks until shutdown) - connects directly to Next.js WebSocket\n const { startRunner } = await import('../../index.js');\n await startRunner({\n wsUrl: `ws://localhost:${webPort}/ws/runner`,\n sharedSecret: sharedSecret,\n runnerId: config.runner?.id || 'local',\n workspace: config.workspace,\n verbose: options.verbose,\n tuiMode: false, // Traditional mode = no TUI\n });\n\n } catch (error) {\n // Global error handler will format this nicely\n throw error;\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;AAGG;AA2BI,eAAe,YAAY,CAAC,OAAqB,EAAA;AACtD,IAAA,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE;;AAGrB,IAA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AA,CAAuB,CAAC,CAAC;QACtE,OAAO,CAAC,GAAG,EAAE;;QAGb,MAAM,EAAE,WAAW,EAAE,GAAG,MAAM,OAAO,aAAgB,CAAC;AACtD,QAAA,MAAM,WAAW,CAAC;YAChB,KAAK,EAAE,CAAA,eAAA,EAAkB,OAAO,CAAA,UAAA,CAAY;AAC5C,YAAA,YAAY,EAAE,YAAY;AAC1B,YAAA,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,EAAE,IAAI,OAAO;YACtC,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,OAAO,EAAE,KAAK;AACf,SAAA,CAAC;IAEJ;IAAE,OAAO,KAAK,EAAE;;AAEd,QAAA,MAAM,KAAK;IACb;AACF;;;;"}
@@ -94,3 +94,4 @@ async function statusCommand() {
94
94
  }
95
95
 
96
96
  export { statusCommand };
97
+ //# sourceMappingURL=status-cS8YwtUx.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"status-cS8YwtUx.js","sources":["../../src/cli/commands/status.ts"],"sourcesContent":["import { existsSync } from 'node:fs';\nimport { readdir, stat } from 'node:fs/promises';\nimport chalk from 'chalk';\nimport { logger } from '../utils/logger.js';\nimport { configManager } from '../utils/config-manager.js';\n\nexport async function statusCommand() {\n logger.section('OpenBuilder Runner Status');\n\n // Check if initialized\n const isInitialized = configManager.isInitialized();\n logger.log('');\n logger.info(`${chalk.bold('Status:')} ${isInitialized ? chalk.green('Initialized') : chalk.yellow('Not initialized')}`);\n\n if (!isInitialized) {\n logger.log('');\n logger.warn('Run \"openbuilder init\" to initialize');\n return;\n }\n\n // Get configuration\n const config = configManager.get();\n logger.log('');\n\n // Config file\n logger.info(`${chalk.bold('Config File:')}`);\n logger.log(` ${configManager.path}`);\n logger.log('');\n\n // Workspace\n logger.info(`${chalk.bold('Workspace:')}`);\n logger.log(` Path: ${config.workspace}`);\n\n const workspaceExists = existsSync(config.workspace);\n logger.log(` Exists: ${workspaceExists ? chalk.green('Yes') : chalk.red('No')}`);\n\n if (workspaceExists) {\n try {\n const entries = await readdir(config.workspace);\n const projects = [];\n\n for (const entry of entries) {\n const entryPath = `${config.workspace}/${entry}`;\n const stats = await stat(entryPath);\n if (stats.isDirectory()) {\n projects.push(entry);\n }\n }\n\n logger.log(` Projects: ${projects.length}`);\n if (projects.length > 0 && projects.length <= 10) {\n projects.forEach(p => logger.log(` - ${p}`));\n } else if (projects.length > 10) {\n projects.slice(0, 10).forEach(p => logger.log(` - ${p}`));\n logger.log(` ... and ${projects.length - 10} more`);\n }\n } catch (error) {\n logger.log(` Projects: ${chalk.yellow('Unable to read')}`);\n }\n }\n logger.log('');\n\n // Server\n logger.info(`${chalk.bold('Server:')}`);\n logger.log(` WebSocket URL: ${config.server?.wsUrl || 'not set'}`);\n logger.log(` API URL: ${config.apiUrl || 'not set'}`);\n logger.log(` Secret: ${config.server?.secret ? chalk.green('Set') : chalk.red('Not set')}`);\n logger.log('');\n\n // Runner\n logger.info(`${chalk.bold('Runner:')}`);\n logger.log(` ID: ${config.runner?.id || 'not set'}`);\n logger.log(` Reconnect Attempts: ${config.runner?.reconnectAttempts || 5}`);\n logger.log(` Heartbeat Interval: ${config.runner?.heartbeatInterval || 15000}ms`);\n logger.log('');\n\n // Validate configuration\n const validation = configManager.validate();\n logger.info(`${chalk.bold('Validation:')}`);\n if (validation.valid) {\n logger.log(` ${chalk.green('✓')} Configuration is valid`);\n } else {\n logger.log(` ${chalk.red('✗')} Configuration has errors:`);\n validation.errors.forEach((err) => logger.log(` - ${chalk.red(err)}`));\n }\n logger.log('');\n\n // Next steps\n if (validation.valid) {\n logger.info('Ready to run! Use:');\n logger.log(` ${chalk.cyan('openbuilder run')} - Start local full stack`);\n logger.log(` ${chalk.cyan('openbuilder runner')} - Connect to remote server`);\n } else {\n logger.info('Fix configuration errors with:');\n logger.log(` ${chalk.cyan('openbuilder config set <key> <value>')}`);\n logger.log(` or ${chalk.cyan('openbuilder init')} to reconfigure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CAAC,CAAA,eAAA,CAAiB,CAAC;IACrE;AACA,IAAA,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC;AAChB;;;;"}
@@ -1,48 +1,16 @@
1
1
  // OpenBuilder CLI - Built with Rollup
2
- import moduleModule__default from 'module';
3
- import require$$5 from 'events';
4
- import require$$0$1 from 'assert';
5
- import WebSocket from 'ws';
6
- import devtools$1 from 'react-devtools-core';
7
2
  import { PassThrough, Stream } from 'node:stream';
8
3
  import process$1, { env, cwd } from 'node:process';
4
+ import { a as getDefaultExportFromCjs, c as commonjsGlobal } from './_commonjsHelpers-h-Bqc03Z.js';
5
+ import require$$0$1 from 'assert';
6
+ import require$$5 from 'events';
9
7
  import chalk from 'chalk';
10
8
  import os__default from 'node:os';
11
9
  import { EventEmitter } from 'node:events';
12
10
  import * as fs from 'node:fs';
11
+ import moduleModule__default from 'module';
13
12
  import { Buffer as Buffer$1 } from 'node:buffer';
14
13
 
15
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
16
-
17
- function getDefaultExportFromCjs (x) {
18
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
19
- }
20
-
21
- function getAugmentedNamespace(n) {
22
- if (n.__esModule) return n;
23
- var f = n.default;
24
- if (typeof f == "function") {
25
- var a = function a () {
26
- if (this instanceof a) {
27
- return Reflect.construct(f, arguments, this.constructor);
28
- }
29
- return f.apply(this, arguments);
30
- };
31
- a.prototype = f.prototype;
32
- } else a = {};
33
- Object.defineProperty(a, '__esModule', {value: true});
34
- Object.keys(n).forEach(function (k) {
35
- var d = Object.getOwnPropertyDescriptor(n, k);
36
- Object.defineProperty(a, k, d.get ? d : {
37
- enumerable: true,
38
- get: function () {
39
- return n[k];
40
- }
41
- });
42
- });
43
- return a;
44
- }
45
-
46
14
  var react = {exports: {}};
47
15
 
48
16
  var react_production = {};
@@ -36826,87 +36794,12 @@ const styles = (node, style = {}) => {
36826
36794
  applyGapStyles(node, style);
36827
36795
  };
36828
36796
 
36829
- // Ignoring missing types error to avoid adding another dependency for this hack to work
36830
- // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
36831
- const customGlobal = global;
36832
- // These things must exist before importing `react-devtools-core`
36833
- // eslint-disable-next-line n/no-unsupported-features/node-builtins
36834
- customGlobal.WebSocket ||= WebSocket;
36835
- customGlobal.window ||= global;
36836
- customGlobal.self ||= global;
36837
- // Filter out Ink's internal components from devtools for a cleaner view.
36838
- // Also, ince `react-devtools-shared` package isn't published on npm, we can't
36839
- // use its types, that's why there are hard-coded values in `type` fields below.
36840
- // See https://github.com/facebook/react/blob/edf6eac8a181860fd8a2d076a43806f1237495a1/packages/react-devtools-shared/src/types.js#L24
36841
- customGlobal.window.__REACT_DEVTOOLS_COMPONENT_FILTERS__ = [
36842
- {
36843
- // ComponentFilterElementType
36844
- type: 1,
36845
- // ElementTypeHostComponent
36846
- value: 7,
36847
- isEnabled: true,
36848
- },
36849
- {
36850
- // ComponentFilterDisplayName
36851
- type: 2,
36852
- value: 'InternalApp',
36853
- isEnabled: true,
36854
- isValid: true,
36855
- },
36856
- {
36857
- // ComponentFilterDisplayName
36858
- type: 2,
36859
- value: 'InternalAppContext',
36860
- isEnabled: true,
36861
- isValid: true,
36862
- },
36863
- {
36864
- // ComponentFilterDisplayName
36865
- type: 2,
36866
- value: 'InternalStdoutContext',
36867
- isEnabled: true,
36868
- isValid: true,
36869
- },
36870
- {
36871
- // ComponentFilterDisplayName
36872
- type: 2,
36873
- value: 'InternalStderrContext',
36874
- isEnabled: true,
36875
- isValid: true,
36876
- },
36877
- {
36878
- // ComponentFilterDisplayName
36879
- type: 2,
36880
- value: 'InternalStdinContext',
36881
- isEnabled: true,
36882
- isValid: true,
36883
- },
36884
- {
36885
- // ComponentFilterDisplayName
36886
- type: 2,
36887
- value: 'InternalFocusContext',
36888
- isEnabled: true,
36889
- isValid: true,
36890
- },
36891
- ];
36892
-
36893
- /* eslint-disable import/order */
36894
- // eslint-disable-next-line import/no-unassigned-import
36895
- // eslint-disable-next-line @typescript-eslint/no-unsafe-call
36896
- devtools$1.initialize();
36897
- // eslint-disable-next-line @typescript-eslint/no-unsafe-call
36898
- devtools$1.connectToDevTools();
36899
-
36900
- var devtools = /*#__PURE__*/Object.freeze({
36901
- __proto__: null
36902
- });
36903
-
36904
36797
  // We need to conditionally perform devtools connection to avoid
36905
36798
  // accidentally breaking other third-party code.
36906
36799
  // See https://github.com/vadimdemedes/ink/issues/384
36907
36800
  if (process$1.env['DEV'] === 'true') {
36908
36801
  try {
36909
- await Promise.resolve().then(function () { return devtools; });
36802
+ await import('./devtools-7A3EXJhY.js');
36910
36803
  }
36911
36804
  catch (error) {
36912
36805
  if (error.code === 'ERR_MODULE_NOT_FOUND') {
@@ -39847,11 +39740,6 @@ const useInput = (inputHandler, options = {}) => {
39847
39740
  }, [options.isActive, stdin, internal_exitOnCtrlC, inputHandler]);
39848
39741
  };
39849
39742
 
39850
- /**
39851
- `useApp` is a React hook that exposes a method to manually exit the app (unmount).
39852
- */
39853
- const useApp = () => reactExports.useContext(AppContext);
39854
-
39855
39743
  /**
39856
39744
  `useStdout` is a React hook that exposes the stdout stream where Ink renders your app.
39857
39745
  */
@@ -40284,114 +40172,46 @@ function requireJsxRuntime () {
40284
40172
 
40285
40173
  var jsxRuntimeExports = requireJsxRuntime();
40286
40174
 
40287
- function TextInput({ value: originalValue, placeholder = '', focus = true, mask, highlightPastedText = false, showCursor = true, onChange, onSubmit, }) {
40288
- const [state, setState] = reactExports.useState({
40289
- cursorOffset: (originalValue || '').length,
40290
- cursorWidth: 0,
40291
- });
40292
- const { cursorOffset, cursorWidth } = state;
40293
- reactExports.useEffect(() => {
40294
- setState(previousState => {
40295
- if (!focus || !showCursor) {
40296
- return previousState;
40297
- }
40298
- const newValue = originalValue || '';
40299
- if (previousState.cursorOffset > newValue.length - 1) {
40300
- return {
40301
- cursorOffset: newValue.length,
40302
- cursorWidth: 0,
40303
- };
40304
- }
40305
- return previousState;
40306
- });
40307
- }, [originalValue, focus, showCursor]);
40308
- const cursorActualWidth = highlightPastedText ? cursorWidth : 0;
40309
- const value = mask ? mask.repeat(originalValue.length) : originalValue;
40310
- let renderedValue = value;
40311
- let renderedPlaceholder = placeholder ? chalk.grey(placeholder) : undefined;
40312
- // Fake mouse cursor, because it's too inconvenient to deal with actual cursor and ansi escapes
40313
- if (showCursor && focus) {
40314
- renderedPlaceholder =
40315
- placeholder.length > 0
40316
- ? chalk.inverse(placeholder[0]) + chalk.grey(placeholder.slice(1))
40317
- : chalk.inverse(' ');
40318
- renderedValue = value.length > 0 ? '' : chalk.inverse(' ');
40319
- let i = 0;
40320
- for (const char of value) {
40321
- renderedValue +=
40322
- i >= cursorOffset - cursorActualWidth && i <= cursorOffset
40323
- ? chalk.inverse(char)
40324
- : char;
40325
- i++;
40326
- }
40327
- if (value.length > 0 && cursorOffset === value.length) {
40328
- renderedValue += chalk.inverse(' ');
40329
- }
40330
- }
40331
- useInput((input, key) => {
40332
- if (key.upArrow ||
40333
- key.downArrow ||
40334
- (key.ctrl && input === 'c') ||
40335
- key.tab ||
40336
- (key.shift && key.tab)) {
40337
- return;
40338
- }
40339
- if (key.return) {
40340
- if (onSubmit) {
40341
- onSubmit(originalValue);
40342
- }
40343
- return;
40344
- }
40345
- let nextCursorOffset = cursorOffset;
40346
- let nextValue = originalValue;
40347
- let nextCursorWidth = 0;
40348
- if (key.leftArrow) {
40349
- if (showCursor) {
40350
- nextCursorOffset--;
40351
- }
40352
- }
40353
- else if (key.rightArrow) {
40354
- if (showCursor) {
40355
- nextCursorOffset++;
40356
- }
40357
- }
40358
- else if (key.backspace || key.delete) {
40359
- if (cursorOffset > 0) {
40360
- nextValue =
40361
- originalValue.slice(0, cursorOffset - 1) +
40362
- originalValue.slice(cursorOffset, originalValue.length);
40363
- nextCursorOffset--;
40364
- }
40365
- }
40366
- else {
40367
- nextValue =
40368
- originalValue.slice(0, cursorOffset) +
40369
- input +
40370
- originalValue.slice(cursorOffset, originalValue.length);
40371
- nextCursorOffset += input.length;
40372
- if (input.length > 1) {
40373
- nextCursorWidth = input.length;
40374
- }
40375
- }
40376
- if (cursorOffset < 0) {
40377
- nextCursorOffset = 0;
40378
- }
40379
- if (cursorOffset > originalValue.length) {
40380
- nextCursorOffset = originalValue.length;
40381
- }
40382
- setState({
40383
- cursorOffset: nextCursorOffset,
40384
- cursorWidth: nextCursorWidth,
40385
- });
40386
- if (nextValue !== originalValue) {
40387
- onChange(nextValue);
40388
- }
40389
- }, { isActive: focus });
40390
- return (React.createElement(Text, null, placeholder
40391
- ? value.length > 0
40392
- ? renderedValue
40393
- : renderedPlaceholder
40394
- : renderedValue));
40395
- }
40175
+ /**
40176
+ * Theme and color definitions for the TUI
40177
+ */
40178
+ const colors = {
40179
+ // Primary brand colors
40180
+ cyan: '#06b6d4',
40181
+ purple: '#a855f7',
40182
+ brightPurple: '#c084fc',
40183
+ // Status colors
40184
+ success: '#22c55e',
40185
+ error: '#ef4444',
40186
+ warning: '#f59e0b',
40187
+ // Neutral colors
40188
+ white: '#ffffff',
40189
+ gray: '#6b7280',
40190
+ dimGray: '#4b5563',
40191
+ darkGray: '#374151',
40192
+ };
40193
+ const symbols = {
40194
+ // Progress indicators
40195
+ filledDot: '●',
40196
+ hollowDot: '○',
40197
+ errorDot: '✗',
40198
+ // Task states
40199
+ check: '✓',
40200
+ cross: '✗',
40201
+ // Connectors
40202
+ horizontalLine: '─',
40203
+ // Spinners (will cycle through these)
40204
+ spinnerFrames: ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'],
40205
+ };
40206
+ const layout = {
40207
+ // Animation timing (slower as requested)
40208
+ spinnerInterval: 120, // ms between spinner frames
40209
+ taskCompletionDelay: 400, // ms to pause after task completion
40210
+ stepTransitionDelay: 300, // ms between step transitions
40211
+ // Shared width for progress stepper and task list (keeps them aligned)
40212
+ // ProgressStepper: 4 cells * 10 chars + 3 connectors * 7 chars = 61 chars
40213
+ progressWidth: 61,
40214
+ };
40396
40215
 
40397
- export { Box as B, React as R, Text as T, getDefaultExportFromCjs as a, useStdout as b, TextInput as c, useApp as d, render as e, getAugmentedNamespace as g, jsxRuntimeExports as j, reactExports as r, useInput as u };
40216
+ export { AppContext as A, Box as B, React as R, Text as T, useStdout as a, render as b, colors as c, jsxRuntimeExports as j, layout as l, reactExports as r, symbols as s, useInput as u };
40217
+ //# sourceMappingURL=theme-CktnrDZj.js.map