@openbuilder/cli 0.50.43 → 0.50.46

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 (86) hide show
  1. package/dist/chunks/{Banner-C-FTiOIR.js → Banner-BKC6yG6z.js} +2 -2
  2. package/dist/chunks/Banner-BKC6yG6z.js.map +1 -0
  3. package/dist/chunks/auto-update-Dq2PFvjt.js +1 -0
  4. package/dist/chunks/auto-update-Dq2PFvjt.js.map +1 -0
  5. package/dist/chunks/build-D0qYqIq0.js +1 -0
  6. package/dist/chunks/build-D0qYqIq0.js.map +1 -0
  7. package/dist/chunks/cleanup-qVTsA3tk.js +1 -0
  8. package/dist/chunks/cleanup-qVTsA3tk.js.map +1 -0
  9. package/dist/chunks/{cli-auth-ChCnxlFl.js → cli-auth-BgiGSBOt.js} +4 -3
  10. package/dist/chunks/cli-auth-BgiGSBOt.js.map +1 -0
  11. package/dist/chunks/cli-error-BjQwvWtK.js +1 -0
  12. package/dist/chunks/cli-error-BjQwvWtK.js.map +1 -0
  13. package/dist/chunks/config-BGP1jZJ4.js +1 -0
  14. package/dist/chunks/config-BGP1jZJ4.js.map +1 -0
  15. package/dist/chunks/config-manager-BkbjtN-H.js +1 -0
  16. package/dist/chunks/config-manager-BkbjtN-H.js.map +1 -0
  17. package/dist/chunks/database-BvAbD4sP.js +1 -0
  18. package/dist/chunks/database-BvAbD4sP.js.map +1 -0
  19. package/dist/chunks/database-setup-BYjIRAmT.js +1 -0
  20. package/dist/chunks/database-setup-BYjIRAmT.js.map +1 -0
  21. package/dist/chunks/devtools-7A3EXJhY.js +75 -0
  22. package/dist/chunks/devtools-7A3EXJhY.js.map +1 -0
  23. package/dist/chunks/index-ZNRLfdj5.js +119 -0
  24. package/dist/chunks/index-ZNRLfdj5.js.map +1 -0
  25. package/dist/chunks/{init-DNyPS_SR.js → init-IQRjA1g3.js} +8 -9
  26. package/dist/chunks/init-IQRjA1g3.js.map +1 -0
  27. package/dist/chunks/{init-tui-EFMXj-MG.js → init-tui-B4jfmo3U.js} +7 -8
  28. package/dist/chunks/init-tui-B4jfmo3U.js.map +1 -0
  29. package/dist/chunks/logger-ZpJi7chw.js +1 -0
  30. package/dist/chunks/logger-ZpJi7chw.js.map +1 -0
  31. package/dist/chunks/{login-BhtodVsj.js → login-CrIcDJpS.js} +2 -1
  32. package/dist/chunks/login-CrIcDJpS.js.map +1 -0
  33. package/dist/chunks/{logout-CDDASeuQ.js → logout-BxgiczmY.js} +2 -1
  34. package/dist/chunks/logout-BxgiczmY.js.map +1 -0
  35. package/dist/chunks/{main-tui-D-SG-Ba5.js → main-tui-NPDVPKol.js} +9 -10
  36. package/dist/chunks/main-tui-NPDVPKol.js.map +1 -0
  37. package/dist/chunks/manager-CvGX9qqe.js +1 -0
  38. package/dist/chunks/manager-CvGX9qqe.js.map +1 -0
  39. package/dist/chunks/{port-allocator-B0q7xkLs.js → port-allocator-DuAZe2_S.js} +3 -36
  40. package/dist/chunks/port-allocator-DuAZe2_S.js.map +1 -0
  41. package/dist/chunks/process-killer-CaUL7Kpl.js +1 -0
  42. package/dist/chunks/process-killer-CaUL7Kpl.js.map +1 -0
  43. package/dist/chunks/prompts-1QbE_bRr.js +1 -0
  44. package/dist/chunks/prompts-1QbE_bRr.js.map +1 -0
  45. package/dist/chunks/repo-cloner-CpOQjFSo.js +1 -0
  46. package/dist/chunks/repo-cloner-CpOQjFSo.js.map +1 -0
  47. package/dist/chunks/repo-detector-B_oj696o.js +1 -0
  48. package/dist/chunks/repo-detector-B_oj696o.js.map +1 -0
  49. package/dist/chunks/{run-Cor14S0I.js → run-Yh3YjeLl.js} +17 -36
  50. package/dist/chunks/run-Yh3YjeLl.js.map +1 -0
  51. package/dist/chunks/runner-logger-instance-nDWv2h2T.js +1 -0
  52. package/dist/chunks/runner-logger-instance-nDWv2h2T.js.map +1 -0
  53. package/dist/chunks/spinner-BJL9zWAJ.js +1 -0
  54. package/dist/chunks/spinner-BJL9zWAJ.js.map +1 -0
  55. package/dist/chunks/{start-k9iGDVWo.js → start-B-brfyVy.js} +7 -7
  56. package/dist/chunks/start-B-brfyVy.js.map +1 -0
  57. package/dist/chunks/start-traditional-uoLZXdxm.js +1 -0
  58. package/dist/chunks/start-traditional-uoLZXdxm.js.map +1 -0
  59. package/dist/chunks/status-cS8YwtUx.js +1 -0
  60. package/dist/chunks/status-cS8YwtUx.js.map +1 -0
  61. package/dist/chunks/{vendor-react-CXgiD1Dl.js → theme-DOjeB8BU.js} +50 -225
  62. package/dist/chunks/theme-DOjeB8BU.js.map +1 -0
  63. package/dist/chunks/upgrade-CKjl4HlB.js +1 -0
  64. package/dist/chunks/upgrade-CKjl4HlB.js.map +1 -0
  65. package/dist/chunks/use-app-DozfqdJj.js +10 -0
  66. package/dist/chunks/use-app-DozfqdJj.js.map +1 -0
  67. package/dist/chunks/{useBuildState-DscLOZLl.js → useBuildState-DV6wurQ2.js} +2 -2
  68. package/dist/chunks/useBuildState-DV6wurQ2.js.map +1 -0
  69. package/dist/cli/index.js +8 -7
  70. package/dist/cli/index.js.map +1 -0
  71. package/dist/index.js +109 -700
  72. package/dist/index.js.map +1 -0
  73. package/dist/instrument.js +8 -81
  74. package/dist/instrument.js.map +1 -0
  75. package/package.json +2 -11
  76. package/dist/chunks/theme-DhorI2Hb.js +0 -43
  77. package/dist/chunks/vendor-ai-sdk-CSJ0bw9X.js +0 -1970
  78. package/dist/chunks/vendor-sentry-CqA9P3UG.js +0 -71910
  79. package/scripts/install-vendor-deps.js +0 -34
  80. package/scripts/install-vendor.js +0 -167
  81. package/scripts/prepare-release.js +0 -83
  82. package/vendor/ai-sdk-provider-claude-code-LOCAL.tgz +0 -0
  83. package/vendor/sentry-core-LOCAL.tgz +0 -0
  84. package/vendor/sentry-nextjs-LOCAL.tgz +0 -0
  85. package/vendor/sentry-node-LOCAL.tgz +0 -0
  86. package/vendor/sentry-node-core-LOCAL.tgz +0 -0
@@ -1,34 +0,0 @@
1
- #!/usr/bin/env node
2
- import { execFileSync } from 'node:child_process';
3
- import { existsSync } from 'node:fs';
4
- import path from 'node:path';
5
- import { fileURLToPath } from 'node:url';
6
-
7
- const __filename = fileURLToPath(import.meta.url);
8
- const __dirname = path.dirname(__filename);
9
-
10
- const packageRoot = path.join(__dirname, '..');
11
- const nodeModules = path.join(packageRoot, 'node_modules');
12
-
13
- if (!existsSync(nodeModules)) {
14
- process.exit(0);
15
- }
16
-
17
- try {
18
- execFileSync(
19
- 'node',
20
- ['-e', "require('node:module').createRequire(require('node:url').pathToFileURL(process.cwd() + '/node_modules/@sentry/node/package.json')).resolve('@opentelemetry/sdk-trace-base')"],
21
- { cwd: packageRoot, stdio: 'pipe' },
22
- );
23
- } catch (error) {
24
- console.log('Installing @opentelemetry/sdk-trace-base via pnpm...');
25
- try {
26
- execFileSync('pnpm', ['install', '@opentelemetry/sdk-trace-base@^2.1.0'], {
27
- cwd: packageRoot,
28
- stdio: 'inherit',
29
- });
30
- } catch (installError) {
31
- console.warn('Warning: Failed to install @opentelemetry/sdk-trace-base automatically. Please install it manually.');
32
- console.warn(installError instanceof Error ? installError.message : String(installError));
33
- }
34
- }
@@ -1,167 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Install vendor-patched Sentry packages that ship with the CLI bundle.
4
- * We unpack the tarballs that live in ./vendor into node_modules/@sentry/*
5
- * so the CLI always runs with the patched builds even when installed offline.
6
- */
7
- import { execFileSync } from 'node:child_process';
8
- import { existsSync, mkdirSync, rmSync, lstatSync, readlinkSync, readdirSync } from 'node:fs';
9
- import path from 'node:path';
10
- import { fileURLToPath } from 'node:url';
11
-
12
- const __filename = fileURLToPath(import.meta.url);
13
- const __dirname = path.dirname(__filename);
14
- const packageRoot = path.join(__dirname, '..');
15
- const vendorDir = path.join(packageRoot, 'vendor');
16
-
17
- // Detect the correct node_modules location for both npm and pnpm
18
- // The vendor packages MUST be installed in the same node_modules tree as the CLI
19
- // to ensure proper Node.js module resolution. npm may create empty placeholder directories
20
- // in nested node_modules, so we need to install there to override them.
21
- function findNodeModules() {
22
- // Local node_modules inside the package (npm style for bundled deps)
23
- const localNodeModules = path.join(packageRoot, 'node_modules');
24
-
25
- // Parent node_modules (pnpm global style: @openbuilder/cli -> @openbuilder -> node_modules)
26
- const parentNodeModules = path.join(packageRoot, '..', '..');
27
-
28
- // Always prefer local node_modules if it exists - this ensures vendor packages
29
- // are in the same resolution tree as the CLI package
30
- if (existsSync(localNodeModules)) {
31
- return localNodeModules;
32
- }
33
-
34
- // Fall back to parent for pnpm global installs where there's no local node_modules
35
- if (existsSync(path.join(parentNodeModules, '@openbuilder')) ||
36
- existsSync(path.join(parentNodeModules, '@sentry'))) {
37
- return parentNodeModules;
38
- }
39
-
40
- // Default to local (will be created)
41
- return localNodeModules;
42
- }
43
-
44
- const nodeModules = findNodeModules();
45
-
46
- const packages = [
47
- { name: 'core', tarball: 'sentry-core-LOCAL.tgz', scope: '@sentry' },
48
- { name: 'node', tarball: 'sentry-node-LOCAL.tgz', scope: '@sentry' },
49
- { name: 'node-core', tarball: 'sentry-node-core-LOCAL.tgz', scope: '@sentry' },
50
- { name: 'nextjs', tarball: 'sentry-nextjs-LOCAL.tgz', scope: '@sentry' },
51
- { name: 'ai-sdk-provider-claude-code', tarball: 'ai-sdk-provider-claude-code-LOCAL.tgz', scope: '' }, // No scope for this package
52
- ];
53
-
54
- // Silent mode by default, only show output if VERBOSE env var is set
55
- const isVerbose = process.env.VERBOSE === '1' || process.env.VERBOSE === 'true';
56
- const log = isVerbose ? console.log : () => {};
57
-
58
- log('Installing vendor Sentry packages...');
59
- log(` Vendor directory: ${vendorDir}`);
60
- log(` Target node_modules: ${nodeModules}`);
61
-
62
- if (!existsSync(vendorDir)) {
63
- log('No vendor directory found, skipping...');
64
- process.exit(0);
65
- }
66
-
67
- const missing = packages.filter(
68
- ({ tarball }) => !existsSync(path.join(vendorDir, tarball)),
69
- );
70
-
71
- if (missing.length) {
72
- log(
73
- `Vendor tarballs not found for: ${missing
74
- .map(({ tarball }) => tarball)
75
- .join(', ')}, skipping...`,
76
- );
77
- process.exit(0);
78
- }
79
-
80
- try {
81
- mkdirSync(nodeModules, { recursive: true });
82
- mkdirSync(path.join(nodeModules, '@sentry'), { recursive: true });
83
-
84
- for (const { name, tarball, scope } of packages) {
85
- const source = path.join(vendorDir, tarball);
86
- const destination = scope
87
- ? path.join(nodeModules, scope, name)
88
- : path.join(nodeModules, name);
89
- const extractTarget = resolveExtractionTarget(destination);
90
-
91
- execFileSync(
92
- 'tar',
93
- ['-xzf', source, '--strip-components', '1', '-C', extractTarget],
94
- { stdio: 'pipe' },
95
- );
96
-
97
- log(` ✓ ${scope ? `${scope}/${name}` : name}`);
98
- }
99
-
100
- // Ensure jsonc-parser is available for ai-sdk-provider-claude-code
101
- // This is needed because the vendored package imports it but in global installs
102
- // with pnpm, the dependency hoisting doesn't always work correctly
103
- const aiSdkProviderDir = path.join(nodeModules, 'ai-sdk-provider-claude-code');
104
-
105
- if (existsSync(aiSdkProviderDir)) {
106
- try {
107
- // Try to find jsonc-parser in various locations
108
- let jsoncParserSource = path.join(nodeModules, 'jsonc-parser');
109
-
110
- // If not found directly, try to find it in the pnpm store (for global installs)
111
- if (!existsSync(jsoncParserSource)) {
112
- // In pnpm global installs, node_modules is at .pnpm/<package>@<version>/node_modules
113
- // The store is at .pnpm/ level, so we need to go up: node_modules -> <package> -> .pnpm
114
- const pnpmStoreDir = path.join(nodeModules, '..', '..');
115
-
116
- if (existsSync(pnpmStoreDir)) {
117
- const entries = readdirSync(pnpmStoreDir);
118
- const jsoncParserEntry = entries.find((entry) => entry.startsWith('jsonc-parser@'));
119
-
120
- if (jsoncParserEntry) {
121
- jsoncParserSource = path.join(pnpmStoreDir, jsoncParserEntry, 'node_modules', 'jsonc-parser');
122
- }
123
- }
124
- }
125
-
126
- if (existsSync(jsoncParserSource)) {
127
- const jsoncParserDest = path.join(aiSdkProviderDir, 'node_modules', 'jsonc-parser');
128
-
129
- mkdirSync(path.join(aiSdkProviderDir, 'node_modules'), { recursive: true });
130
-
131
- // Remove existing symlink/directory if it exists
132
- rmSync(jsoncParserDest, { recursive: true, force: true });
133
-
134
- // Create symlink to jsonc-parser
135
- execFileSync('ln', ['-s', jsoncParserSource, jsoncParserDest], { stdio: 'pipe' });
136
-
137
- log(` ✓ Linked jsonc-parser for ai-sdk-provider-claude-code`);
138
- } else {
139
- log(` ⚠ jsonc-parser not found, skipping symlink`);
140
- }
141
- } catch (error) {
142
- // Non-fatal error, log and continue
143
- log(` ⚠ Could not link jsonc-parser: ${error instanceof Error ? error.message : String(error)}`);
144
- }
145
- }
146
-
147
- log('✓ Vendor packages installed successfully');
148
- } catch (error) {
149
- console.warn('Warning: Could not install vendor packages, using published versions');
150
- console.warn(error instanceof Error ? error.message : String(error));
151
- }
152
-
153
- function resolveExtractionTarget(destination) {
154
- try {
155
- const stat = lstatSync(destination);
156
- if (stat.isSymbolicLink()) {
157
- const linkTarget = readlinkSync(destination);
158
- return path.resolve(path.dirname(destination), linkTarget);
159
- }
160
- } catch (error) {
161
- // Path does not exist yet.
162
- }
163
-
164
- rmSync(destination, { recursive: true, force: true });
165
- mkdirSync(destination, { recursive: true });
166
- return destination;
167
- }
@@ -1,83 +0,0 @@
1
- #!/usr/bin/env node
2
- /**
3
- * Prepare package.json for publishing
4
- *
5
- * This script:
6
- * 1. Replaces file: dependencies with npm versions (for Sentry/vendor packages)
7
- * 2. REMOVES @openbuilder/agent-core from dependencies (it's bundled by tsup)
8
- *
9
- * The vendor files are still included, and postinstall will replace npm versions with vendor versions
10
- */
11
- import { readFileSync, writeFileSync } from 'fs';
12
- import { join, dirname } from 'path';
13
- import { fileURLToPath } from 'url';
14
-
15
- const __filename = fileURLToPath(import.meta.url);
16
- const __dirname = dirname(__filename);
17
- const packageJsonPath = join(__dirname, '../package.json');
18
-
19
- console.log('Preparing package.json for release...');
20
- console.log('');
21
-
22
- const packageJson = JSON.parse(readFileSync(packageJsonPath, 'utf-8'));
23
-
24
- // Replace file: dependencies with npm versions
25
- const replacements = {
26
- '@sentry/core': '^10.17.0',
27
- '@sentry/node': '^10.17.0',
28
- '@sentry/node-core': '^10.17.0',
29
- '@sentry/nextjs': '^10.17.0',
30
- 'ai-sdk-provider-claude-code': '^2.1.0', // Use npm version, postinstall will replace with vendor
31
- };
32
-
33
- let modified = false;
34
-
35
- for (const [pkg, version] of Object.entries(replacements)) {
36
- if (packageJson.dependencies[pkg] && packageJson.dependencies[pkg].startsWith('file:')) {
37
- console.log(` Replacing ${pkg}: ${packageJson.dependencies[pkg]} → ${version}`);
38
- packageJson.dependencies[pkg] = version;
39
- modified = true;
40
- }
41
- }
42
-
43
- // REMOVE workspace dependencies - they're bundled into dist/ by rollup
44
- // This eliminates npm 404 errors since these packages don't exist on npm
45
- const workspaceDeps = ['@openbuilder/agent-core', '@openbuilder/opencode-client'];
46
- for (const dep of workspaceDeps) {
47
- if (packageJson.dependencies[dep]) {
48
- console.log(` Removing ${dep} (bundled by rollup)`);
49
- delete packageJson.dependencies[dep];
50
- modified = true;
51
- }
52
- }
53
-
54
- // REMOVE react and ink ecosystem - they're bundled by rollup to prevent multiple React instances
55
- // When these are both bundled AND listed as dependencies, multiple React instances get loaded
56
- // causing "Cannot read properties of null (reading 'useState')" errors
57
- const bundledReactEcosystem = ['react', 'ink', 'ink-select-input', 'ink-spinner', 'ink-text-input'];
58
- for (const dep of bundledReactEcosystem) {
59
- if (packageJson.dependencies[dep]) {
60
- console.log(` Removing ${dep} (bundled by rollup to prevent multiple React instances)`);
61
- delete packageJson.dependencies[dep];
62
- modified = true;
63
- }
64
- }
65
-
66
- // Remove bundledDependencies if it exists (no longer needed)
67
- if (packageJson.bundledDependencies) {
68
- console.log(` Removing bundledDependencies (agent-core is inlined, not bundled)`);
69
- delete packageJson.bundledDependencies;
70
- modified = true;
71
- }
72
-
73
- if (modified) {
74
- writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, 2) + '\n', 'utf-8');
75
- console.log('');
76
- console.log('✓ package.json updated for release');
77
- console.log('');
78
- console.log('Note: This modifies package.json. After publishing, run:');
79
- console.log(' git checkout apps/runner/package.json');
80
- console.log(' to restore workspace:* dependency for local development');
81
- } else {
82
- console.log('✓ package.json already prepared for release');
83
- }
Binary file
Binary file
Binary file
Binary file