codebolt 1.10.3 → 1.10.5

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.
@@ -1337,7 +1337,7 @@
1337
1337
  "code-generation"
1338
1338
  ],
1339
1339
  "title": "Act",
1340
- "zipFilePath": "https://pub-cd2980acaa6d4462a4356b5afe3a82d6.r2.dev/agent/6f54b0a3-abaf-4ebf-b997-445ff4bfd1b8.zip",
1340
+ "zipFilePath": "https://pub-cd2980acaa6d4462a4356b5afe3a82d6.r2.dev/agent/73cad597-237f-46d3-b558-b0d3dabd7ca0.zip",
1341
1341
  "unique_id": "act",
1342
1342
  "metadata": {
1343
1343
  "agent_routing": {
@@ -1420,11 +1420,11 @@
1420
1420
  }
1421
1421
  ],
1422
1422
  "slug": "c4d3fdb9cf9e4f828a1d0160bbfc9ae9",
1423
- "version": "1.1.52",
1423
+ "version": "1.1.58",
1424
1424
  "author": "ravi",
1425
1425
  "status": 1,
1426
- "updatedAt": "2026-03-03T03:41:02.339Z",
1427
- "sourceCodeUrl": "https://pub-cd2980acaa6d4462a4356b5afe3a82d6.r2.dev/agentsource/5ed06b01-d76e-4ac7-9ba5-6d505db7a383.zip",
1426
+ "updatedAt": "2026-03-03T17:48:56.102Z",
1427
+ "sourceCodeUrl": "https://pub-cd2980acaa6d4462a4356b5afe3a82d6.r2.dev/agentsource/81787018-7f43-4aac-b65a-4bd95337195c.zip",
1428
1428
  "lastUpdatedUI": 0,
1429
1429
  "githubUrl": null,
1430
1430
  "isInvalid": 0,
@@ -1882,4 +1882,4 @@
1882
1882
  "isDisabled": 0,
1883
1883
  "isPrivate": 0
1884
1884
  }
1885
- ]
1885
+ ]
package/dist/index.js CHANGED
@@ -1049,10 +1049,13 @@ function parseArgs() {
1049
1049
  let projectPath;
1050
1050
  let help = false;
1051
1051
  let version = false;
1052
- let tui = false;
1052
+ let tui = true;
1053
+ let server = false;
1053
1054
  let web = false;
1054
1055
  let connect;
1055
1056
  let authToken;
1057
+ let prompt;
1058
+ let agent;
1056
1059
  for (let i = 0; i < args.length; i++) {
1057
1060
  if (args[i] === '--help' || args[i] === '-h') {
1058
1061
  help = true;
@@ -1060,12 +1063,28 @@ function parseArgs() {
1060
1063
  else if (args[i] === '--version' || args[i] === '-v') {
1061
1064
  version = true;
1062
1065
  }
1063
- else if (args[i] === '--tui' || args[i] === '-t') {
1064
- tui = true;
1066
+ else if (args[i] === '--server' || args[i] === '-s') {
1067
+ server = true;
1068
+ tui = false;
1065
1069
  }
1066
1070
  else if (args[i] === '--web' || args[i] === '-w') {
1067
1071
  web = true;
1068
1072
  }
1073
+ else if (args[i] === '--prompt') {
1074
+ prompt = args[++i];
1075
+ if (!prompt) {
1076
+ console.error('Missing value for --prompt flag');
1077
+ process.exit(1);
1078
+ }
1079
+ tui = false;
1080
+ }
1081
+ else if (args[i] === '--agent') {
1082
+ agent = args[++i];
1083
+ if (!agent) {
1084
+ console.error('Missing value for --agent flag');
1085
+ process.exit(1);
1086
+ }
1087
+ }
1069
1088
  else if (args[i] === '--connect' || args[i] === '-c') {
1070
1089
  const val = parseInt(args[++i], 10);
1071
1090
  if (isNaN(val) || val < 1 || val > 65535) {
@@ -1097,7 +1116,7 @@ function parseArgs() {
1097
1116
  }
1098
1117
  }
1099
1118
  }
1100
- return { port, projectPath, help, version, tui, web, connect, authToken };
1119
+ return { port, projectPath, help, version, tui, server, web, connect, authToken, prompt, agent };
1101
1120
  }
1102
1121
  function printHelp() {
1103
1122
  console.log(`
@@ -1106,20 +1125,22 @@ Usage: codebolt [options]
1106
1125
  Options:
1107
1126
  -p, --port <number> Port to listen on (default: ${DEFAULT_PORT}, or next free port)
1108
1127
  -d, --project <path> Project directory (default: current working directory)
1109
- -t, --tui Launch the Go TUI client after server starts
1110
- -w, --web Serve the web frontend (access at http://localhost:<port>)
1128
+ -s, --server Server-only mode (no TUI)
1129
+ -w, --web Require the web frontend (error if not found; served by default when available)
1111
1130
  -c, --connect <port> Connect to an existing server (don't start a new one)
1131
+ --prompt <text> Run an agent with the given prompt and print the response
1132
+ --agent <name> Agent to use with --prompt (default: $CODEBOLT_AGENT or codebolt-agent)
1112
1133
  --auth-token <token> Authentication token for headless login
1113
1134
  -h, --help Show this help message
1114
1135
  -v, --version Show version
1115
1136
 
1116
1137
  Examples:
1117
- codebolt # Start server only
1118
- codebolt --web # Start server + serve web UI
1119
- codebolt --tui # Start server + launch TUI
1120
- codebolt --web --tui # Start server + serve web UI + launch TUI
1121
- codebolt --connect 12345 --tui # Connect TUI to existing server on port 12345
1122
- codebolt --connect 12345 # Print URL of existing server
1138
+ codebolt # Start server + web UI + TUI (default)
1139
+ codebolt --project /path/to/project # Start with a specific project directory
1140
+ codebolt --server # Start server + web UI only (no TUI)
1141
+ codebolt --connect 12345 # Connect TUI to existing server on port 12345
1142
+ codebolt --prompt "fix the login bug" # Run default agent with a prompt
1143
+ codebolt --prompt "refactor utils" --agent my-agent # Run a specific agent
1123
1144
  `);
1124
1145
  }
1125
1146
  function resolveWebDistPath() {
@@ -1158,7 +1179,7 @@ function resolveSimpleUIDistPath() {
1158
1179
  return null;
1159
1180
  }
1160
1181
  async function main() {
1161
- const { port: requestedPort, projectPath, help, version, tui, web, connect, authToken } = parseArgs();
1182
+ const { port: requestedPort, projectPath, help, version, tui, web, connect, authToken, prompt, agent } = parseArgs();
1162
1183
  if (help) {
1163
1184
  printHelp();
1164
1185
  process.exit(0);
@@ -1222,24 +1243,24 @@ async function main() {
1222
1243
  // ── Mode B: Normal server start ──
1223
1244
  const port = requestedPort || await (0, findPort_1.findFreePort)(DEFAULT_PORT, 12346, 13000);
1224
1245
  const resolvedProjectPath = projectPath || process.cwd();
1225
- // Resolve web dist path if --web flag is set
1246
+ // Always resolve web dist path so the web UI is accessible by default
1226
1247
  let webDistPath;
1227
1248
  let simpleUIDistPath;
1228
- if (web) {
1229
- const resolved = resolveWebDistPath();
1230
- if (!resolved) {
1231
- console.error('Error: Web frontend not found.');
1232
- console.error('Expected index.html in one of:');
1233
- console.error(` - ${(__webpack_require__(62003).join)(__dirname, '..', '..', 'web', 'dist')}`);
1234
- console.error(` - ${(__webpack_require__(62003).join)(__dirname, '..', 'web-dist')}`);
1235
- console.error('');
1236
- console.error('Build the web frontend first:');
1237
- console.error(' cd packages/web && npm run build');
1238
- process.exit(1);
1239
- }
1240
- webDistPath = resolved;
1241
- // Also resolve SimpleUI (Mission Control) if available
1242
- simpleUIDistPath = resolveSimpleUIDistPath();
1249
+ const resolvedWeb = resolveWebDistPath();
1250
+ if (resolvedWeb) {
1251
+ webDistPath = resolvedWeb;
1252
+ simpleUIDistPath = resolveSimpleUIDistPath() ?? undefined;
1253
+ }
1254
+ else if (web) {
1255
+ // Only error out if the user explicitly requested --web but it's missing
1256
+ console.error('Error: Web frontend not found.');
1257
+ console.error('Expected index.html in one of:');
1258
+ console.error(` - ${(__webpack_require__(62003).join)(__dirname, '..', '..', 'web', 'dist')}`);
1259
+ console.error(` - ${(__webpack_require__(62003).join)(__dirname, '..', 'web-dist')}`);
1260
+ console.error('');
1261
+ console.error('Build the web frontend first:');
1262
+ console.error(' cd packages/web && npm run build');
1263
+ process.exit(1);
1243
1264
  }
1244
1265
  // Set auth token as env var so the server bootstrap can use it
1245
1266
  if (authToken) {
@@ -1247,7 +1268,7 @@ async function main() {
1247
1268
  }
1248
1269
  console.log(`Starting CodeBolt server on port ${port}...`);
1249
1270
  console.log(`Project path: ${resolvedProjectPath}`);
1250
- if (web) {
1271
+ if (webDistPath) {
1251
1272
  console.log(`Web frontend: ${webDistPath}`);
1252
1273
  if (simpleUIDistPath) {
1253
1274
  console.log(`Mission Control UI: ${simpleUIDistPath}`);
@@ -1263,12 +1284,117 @@ async function main() {
1263
1284
  simpleUIDistPath,
1264
1285
  });
1265
1286
  console.log(`CodeBolt server running at ${url}`);
1266
- if (web) {
1287
+ if (webDistPath) {
1267
1288
  console.log(`Web UI available at ${url}`);
1268
1289
  if (simpleUIDistPath) {
1269
1290
  console.log(`Mission Control available at ${url}/ui`);
1270
1291
  }
1271
1292
  }
1293
+ // ── Mode: --prompt (headless agent execution via WebSocket) ──
1294
+ if (prompt) {
1295
+ const agentName = agent || process.env.CODEBOLT_AGENT || 'codebolt-agent';
1296
+ console.log(`Running agent "${agentName}" with prompt: ${prompt}`);
1297
+ const WebSocket = (await Promise.resolve().then(() => __importStar(__webpack_require__(15086)))).default;
1298
+ const wsUrl = url.replace('http', 'ws');
1299
+ await new Promise((resolve, reject) => {
1300
+ const ws = new WebSocket(`${wsUrl}/chat`);
1301
+ let lastAgentMessage = '';
1302
+ let receivedAny = false;
1303
+ ws.on('open', () => {
1304
+ // Send user message in the same format the web UI uses
1305
+ const message = {
1306
+ type: 'messageResponse',
1307
+ message: {
1308
+ userMessage: prompt,
1309
+ type: 'messageResponse',
1310
+ templateType: 'userChat',
1311
+ selectedAgent: agentName !== 'codebolt-agent' ? { id: agentName, name: agentName } : { id: '', name: '' },
1312
+ mentionedAgents: agentName !== 'codebolt-agent' ? [{ name: agentName }] : [],
1313
+ mentionedFiles: [],
1314
+ mentionedFolders: [],
1315
+ mentionedMultiFile: [],
1316
+ mentionedMCPs: [],
1317
+ uploadedImages: [],
1318
+ actions: [],
1319
+ links: [],
1320
+ controlFiles: [],
1321
+ currentFile: '',
1322
+ selection: null,
1323
+ },
1324
+ };
1325
+ ws.send(JSON.stringify(message));
1326
+ console.log('Prompt sent, waiting for agent...\n');
1327
+ });
1328
+ ws.on('message', (data) => {
1329
+ try {
1330
+ const msg = JSON.parse(data.toString());
1331
+ const tpl = msg.templateType || '';
1332
+ const type = msg.type || '';
1333
+ const actionType = msg.actionType || '';
1334
+ // Detect agent content messages
1335
+ const isAgent = tpl === 'agentChat' || tpl === 'agentChatWithButton'
1336
+ || tpl === 'agentResponse' || msg.sender?.senderType === 'agent'
1337
+ || (type === 'message' && actionType === 'SendMessage');
1338
+ // Stream agent messages to terminal
1339
+ if (isAgent && msg.content) {
1340
+ receivedAny = true;
1341
+ const content = typeof msg.content === 'string' ? msg.content : JSON.stringify(msg.content);
1342
+ lastAgentMessage = content;
1343
+ process.stdout.write(content + '\n');
1344
+ }
1345
+ // Agent finished
1346
+ if (type === 'processStoped' || actionType === 'ProcessStoped') {
1347
+ console.log('\n--- Agent Finished ---');
1348
+ // The processStoped message itself carries the final response in content
1349
+ if (msg.content) {
1350
+ const content = typeof msg.content === 'string' ? msg.content : JSON.stringify(msg.content);
1351
+ if (!receivedAny) {
1352
+ // If we haven't streamed anything yet, print the final response
1353
+ console.log(content);
1354
+ }
1355
+ lastAgentMessage = content;
1356
+ }
1357
+ else if (!receivedAny) {
1358
+ console.log('No response from agent (agent may have crashed).');
1359
+ }
1360
+ ws.close();
1361
+ resolve();
1362
+ return;
1363
+ }
1364
+ // Also catch error/info messages that may explain failures
1365
+ if (type === 'message' && msg.content && !isAgent) {
1366
+ const content = typeof msg.content === 'string' ? msg.content : JSON.stringify(msg.content);
1367
+ // Show info/error messages (confirmations, status updates, etc.)
1368
+ if (tpl === 'infoWithLink' || tpl === 'error' || tpl === 'warning') {
1369
+ console.log(`[${tpl}] ${content}`);
1370
+ }
1371
+ }
1372
+ }
1373
+ catch {
1374
+ // ignore parse errors
1375
+ }
1376
+ });
1377
+ ws.on('error', (err) => {
1378
+ console.error(`WebSocket error: ${err.message}`);
1379
+ reject(err);
1380
+ });
1381
+ ws.on('close', () => {
1382
+ if (!receivedAny && !lastAgentMessage) {
1383
+ console.log('Connection closed without agent response.');
1384
+ }
1385
+ resolve();
1386
+ });
1387
+ // Safety timeout
1388
+ // setTimeout(() => {
1389
+ // console.error('\nTimeout: Agent did not finish within 10 minutes.');
1390
+ // ws.close();
1391
+ // resolve();
1392
+ // }, 10 * 60 * 1000);
1393
+ });
1394
+ shutdown('PROMPT_DONE');
1395
+ return;
1396
+ }
1397
+ // ── Mode: TUI (default) ──
1272
1398
  if (tui) {
1273
1399
  const { spawn } = await Promise.resolve().then(() => __importStar(__webpack_require__(13200)));
1274
1400
  const path = await Promise.resolve().then(() => __importStar(__webpack_require__(62003)));
@@ -1289,8 +1415,8 @@ async function main() {
1289
1415
  break;
1290
1416
  }
1291
1417
  }
1292
- if (web) {
1293
- // When both --web and --tui, print URL but don't auto-open (TUI takes over terminal)
1418
+ if (webDistPath) {
1419
+ // When both web and TUI, print URL but don't auto-open (TUI takes over terminal)
1294
1420
  console.log(`Open ${url} in your browser for the web UI.`);
1295
1421
  }
1296
1422
  console.log(`Launching TUI: ${tuiPath}`);
@@ -1313,10 +1439,8 @@ async function main() {
1313
1439
  shutdown('TUI_EXIT');
1314
1440
  });
1315
1441
  }
1316
- else if (web) {
1317
- console.log('Press Ctrl+C to stop.');
1318
- }
1319
1442
  else {
1443
+ // ── Mode: --server (server-only) ──
1320
1444
  console.log('Press Ctrl+C to stop.');
1321
1445
  }
1322
1446
  }
@@ -82110,8 +82234,13 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
82110
82234
  exports.installAndRun = installAndRun;
82111
82235
  exports.startTask = startTask;
82112
82236
  async function loadFixPath() {
82113
- const fixPath = await Promise.resolve().then(() => __importStar(__webpack_require__(63517)));
82114
- fixPath.default(); // since fix-path exports a default function
82237
+ try {
82238
+ const fixPath = await Promise.resolve().then(() => __importStar(__webpack_require__(63517)));
82239
+ fixPath.default();
82240
+ }
82241
+ catch {
82242
+ // fix-path is optional — only needed in Electron GUI environment
82243
+ }
82115
82244
  }
82116
82245
  //=> '/usr/bin'
82117
82246
  if (true) {
@@ -89067,6 +89196,10 @@ router.post('/threads/:threadId/steps', async (req, res) => {
89067
89196
  return res.status(500).json({ success: false, error: error.message || 'Failed to create thread step' });
89068
89197
  }
89069
89198
  });
89199
+ // Start thread execution (process first pending step with agent)
89200
+ router.post('/start-task', chatController_1.startTask);
89201
+ // Start a specific step in a thread
89202
+ router.post('/start-step', chatController_1.startStep);
89070
89203
  exports["default"] = router;
89071
89204
  //# sourceMappingURL=chatRoutes.js.map
89072
89205
 
@@ -97191,8 +97324,13 @@ function ensureAgentCodeboltPath() {
97191
97324
  return codeboltPath;
97192
97325
  }
97193
97326
  async function loadFixPath() {
97194
- const fixPath = await Promise.resolve().then(() => __importStar(__webpack_require__(63517)));
97195
- fixPath.default(); // since fix-path exports a default function
97327
+ try {
97328
+ const fixPath = await Promise.resolve().then(() => __importStar(__webpack_require__(63517)));
97329
+ fixPath.default();
97330
+ }
97331
+ catch {
97332
+ // fix-path is optional — only needed in Electron GUI environment
97333
+ }
97196
97334
  }
97197
97335
  //=> '/usr/bin'
97198
97336
  if (true) {
@@ -144584,8 +144722,13 @@ const portScannerService_1 = __webpack_require__(71381);
144584
144722
  const stateService_cli_1 = __webpack_require__(45544);
144585
144723
  const socketManager_1 = __webpack_require__(94351);
144586
144724
  async function loadFixPath() {
144587
- const fixPath = await Promise.resolve().then(() => __importStar(__webpack_require__(63517)));
144588
- fixPath.default(); // since fix-path exports a default function
144725
+ try {
144726
+ const fixPath = await Promise.resolve().then(() => __importStar(__webpack_require__(63517)));
144727
+ fixPath.default();
144728
+ }
144729
+ catch {
144730
+ // fix-path is optional — only needed in Electron GUI environment
144731
+ }
144589
144732
  }
144590
144733
  //=> '/usr/bin'
144591
144734
  if (true) {
@@ -150261,8 +150404,13 @@ const pidToWebSockets = new Map();
150261
150404
  let shellPrompt = os_1.default.platform() === 'win32' ? '> ' : '$ ';
150262
150405
  let powershellCommand = "";
150263
150406
  async function loadFixPath() {
150264
- const fixPath = await Promise.resolve().then(() => __importStar(__webpack_require__(63517)));
150265
- fixPath.default(); // since fix-path exports a default function
150407
+ try {
150408
+ const fixPath = await Promise.resolve().then(() => __importStar(__webpack_require__(63517)));
150409
+ fixPath.default();
150410
+ }
150411
+ catch {
150412
+ // fix-path is optional — only needed in Electron GUI environment
150413
+ }
150266
150414
  }
150267
150415
  if (true) {
150268
150416
  loadFixPath();
@@ -156035,8 +156183,13 @@ const reader_1 = __webpack_require__(56368);
156035
156183
  const writer_1 = __webpack_require__(95452);
156036
156184
  // Removed logger import to prevent main process blocking
156037
156185
  async function loadFixPath() {
156038
- const fixPath = await Promise.resolve().then(() => __importStar(__webpack_require__(63517)));
156039
- fixPath.default(); // since fix-path exports a default function
156186
+ try {
156187
+ const fixPath = await Promise.resolve().then(() => __importStar(__webpack_require__(63517)));
156188
+ fixPath.default();
156189
+ }
156190
+ catch {
156191
+ // fix-path is optional — only needed in Electron GUI environment
156192
+ }
156040
156193
  }
156041
156194
  //=> '/usr/bin'
156042
156195
  if (true) {
@@ -158946,8 +159099,13 @@ const componentType_1 = __webpack_require__(24339);
158946
159099
  const wsPtyMap = new Map();
158947
159100
  let intervalActive = false;
158948
159101
  async function loadFixPath() {
158949
- const fixPath = await Promise.resolve().then(() => __importStar(__webpack_require__(63517)));
158950
- fixPath.default(); // since fix-path exports a default function
159102
+ try {
159103
+ const fixPath = await Promise.resolve().then(() => __importStar(__webpack_require__(63517)));
159104
+ fixPath.default();
159105
+ }
159106
+ catch {
159107
+ // fix-path is optional — only needed in Electron GUI environment
159108
+ }
158951
159109
  }
158952
159110
  if (true) {
158953
159111
  loadFixPath();
@@ -171342,8 +171500,13 @@ const fs_1 = __webpack_require__(94383);
171342
171500
  const handlebars_1 = __webpack_require__(57156);
171343
171501
  const appLogger_1 = __importDefault(__webpack_require__(8479));
171344
171502
  async function loadFixPath() {
171345
- const fixPath = await Promise.resolve().then(() => __importStar(__webpack_require__(63517)));
171346
- fixPath.default(); // since fix-path exports a default function
171503
+ try {
171504
+ const fixPath = await Promise.resolve().then(() => __importStar(__webpack_require__(63517)));
171505
+ fixPath.default();
171506
+ }
171507
+ catch {
171508
+ // fix-path is optional — only needed in Electron GUI environment
171509
+ }
171347
171510
  }
171348
171511
  //=> '/usr/bin'
171349
171512
  if (true) {
@@ -177471,8 +177634,13 @@ exports.killProcessByPort = killProcessByPort;
177471
177634
  const find_process_1 = __importDefault(__webpack_require__(14039));
177472
177635
  const child_process_1 = __webpack_require__(13200);
177473
177636
  async function loadFixPath() {
177474
- const fixPath = await Promise.resolve().then(() => __importStar(__webpack_require__(63517)));
177475
- fixPath.default(); // since fix-path exports a default function
177637
+ try {
177638
+ const fixPath = await Promise.resolve().then(() => __importStar(__webpack_require__(63517)));
177639
+ fixPath.default();
177640
+ }
177641
+ catch {
177642
+ // fix-path is optional — only needed in Electron GUI environment
177643
+ }
177476
177644
  }
177477
177645
  //=> '/usr/bin'
177478
177646
  if (true) {
@@ -177540,8 +177708,13 @@ const path_1 = __importDefault(__webpack_require__(62003));
177540
177708
  const fs_extra_1 = __importDefault(__webpack_require__(44652));
177541
177709
  const appLogger_1 = __importDefault(__webpack_require__(8479));
177542
177710
  async function loadFixPath() {
177543
- const fixPath = await Promise.resolve().then(() => __importStar(__webpack_require__(63517)));
177544
- fixPath.default(); // since fix-path exports a default function
177711
+ try {
177712
+ const fixPath = await Promise.resolve().then(() => __importStar(__webpack_require__(63517)));
177713
+ fixPath.default();
177714
+ }
177715
+ catch {
177716
+ // fix-path is optional — only needed in Electron GUI environment
177717
+ }
177545
177718
  }
177546
177719
  //=> '/usr/bin'
177547
177720
  if (true) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "codebolt",
3
- "version": "1.10.3",
3
+ "version": "1.10.5",
4
4
  "description": "CodeBolt headless server CLI",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -30,6 +30,7 @@
30
30
  "@google-cloud/vertexai": "^1.9.3",
31
31
  "@google/generative-ai": "^0.18.0",
32
32
  "@huggingface/inference": "^3.4.1",
33
+ "@huggingface/tokenizers": "^0.1.2",
33
34
  "@json-schema-tools/traverse": "^1.10.4",
34
35
  "@mistralai/mistralai": "^1.5.0",
35
36
  "@octokit/rest": "^21.1.1",