bortexcode 1.2.3 → 1.2.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.
Files changed (2) hide show
  1. package/bin/bortex.js +13 -9
  2. package/package.json +1 -1
package/bin/bortex.js CHANGED
@@ -170,7 +170,7 @@ function usage() {
170
170
  console.log(' -h, --help Show help');
171
171
  console.log('');
172
172
  console.log('REPL commands: /agent on|off, /status, /exit, /help, /llm-config');
173
- console.log('Local tools: /pwd, /cd, /ls, /tree, /read, /write, /append, /mkdir, /git, /ssh-status, /sh');
173
+ console.log('Local tools: /pwd, /cd, /ls, /tree, /read, /write, /append, /mkdir, /git, /ssh-status, /sys-status, /process-status, /port-status, /tool, /sh');
174
174
  console.log('');
175
175
  console.log('Environment:');
176
176
  console.log(' BORTEX_URL Server URL');
@@ -1156,11 +1156,11 @@ function classifyLocalPromptIntent(text) {
1156
1156
  if (wantsStatus && (/(whoami|username|user name|hostname|host name|machine|computer|system|sistema|platform|os|runtime|shell|environment|env|path)/.test(t) || /(\bnode\b|\bnpm\b)/.test(t))) {
1157
1157
  return { command: '/sys-status' };
1158
1158
  }
1159
- if (wantsStatus && /(\bprocess\b|\bprocessi\b|\bpid\b|\bcpu\b|\bram\b|\bmemory\b|\bmem\b)/.test(t)) {
1159
+ if (wantsStatus && /(\bprocess\b|\bprocesso\b|\bprocessi\b|\bpid\b|\bcpu\b|\bram\b|\bmemory\b|\bmem\b)/.test(t)) {
1160
1160
  const processMatch = t.match(/(?:process(?:o|i)?|pid)\s+(?:di\s+|of\s+)?([a-z0-9._-]{2,})/i) || t.match(/([a-z0-9._-]{2,})\s+(?:process(?:o|i)?|pid)/i);
1161
1161
  return { command: processMatch ? `/process-status ${processMatch[1]}` : '/process-status' };
1162
1162
  }
1163
- if (wantsStatus && /(\bport\b|\bporte\b|\bsocket\b|\blisten\b|\blistening\b)/.test(t)) {
1163
+ if (wantsStatus && /(\bport\b|\bporta\b|\bporte\b|\bsocket\b|\blisten\b|\blistening\b)/.test(t)) {
1164
1164
  const portMatch = t.match(/\b(\d{2,5})\b/);
1165
1165
  return { command: portMatch ? `/port-status ${portMatch[1]}` : '/port-status' };
1166
1166
  }
@@ -1389,11 +1389,11 @@ function suggestCommandsForStep(stepText, opts) {
1389
1389
  if ((/(whoami|username|user name|hostname|host name|machine|computer|system|sistema|platform|os|runtime|shell|environment|env|path)/.test(t) || /(\bnode\b|\bnpm\b)/.test(t)) && /(verifica|controlla|check|show|mostra|stato|status|attivo|active|running|enabled|on)/.test(t)) {
1390
1390
  return ['/sys-status', '/status'];
1391
1391
  }
1392
- if (/(\bprocess\b|\bprocessi\b|\bpid\b|\bcpu\b|\bram\b|\bmemory\b|\bmem\b)/.test(t) && /(verifica|controlla|check|show|mostra|stato|status|attivo|active|running|enabled|on)/.test(t)) {
1392
+ if (/(\bprocess\b|\bprocesso\b|\bprocessi\b|\bpid\b|\bcpu\b|\bram\b|\bmemory\b|\bmem\b)/.test(t) && /(verifica|controlla|check|show|mostra|stato|status|attivo|active|running|enabled|on)/.test(t)) {
1393
1393
  const processMatch = t.match(/(?:process(?:o|i)?|pid)\s+(?:di\s+|of\s+)?([a-z0-9._-]{2,})/i) || t.match(/([a-z0-9._-]{2,})\s+(?:process(?:o|i)?|pid)/i);
1394
1394
  return [processMatch ? `/process-status ${processMatch[1]}` : '/process-status', '/status'];
1395
1395
  }
1396
- if (/(\bport\b|\bporte\b|\bsocket\b|\blisten\b|\blistening\b)/.test(t) && /(verifica|controlla|check|show|mostra|stato|status|attivo|active|running|enabled|on)/.test(t)) {
1396
+ if (/(\bport\b|\bporta\b|\bporte\b|\bsocket\b|\blisten\b|\blistening\b)/.test(t) && /(verifica|controlla|check|show|mostra|stato|status|attivo|active|running|enabled|on)/.test(t)) {
1397
1397
  const portMatch = t.match(/\b(\d{2,5})\b/);
1398
1398
  return [portMatch ? `/port-status ${portMatch[1]}` : '/port-status', '/status'];
1399
1399
  }
@@ -3229,12 +3229,12 @@ function buildStructuredToolPlanFromGoal(opts, goal) {
3229
3229
  if (wantsStatus && (/(whoami|username|user name|hostname|host name|machine|computer|system|sistema|platform|os|runtime|shell|environment|env|path)/.test(lower) || /(\bnode\b|\bnpm\b)/.test(lower))) {
3230
3230
  return [{ tool: 'project' }, { tool: 'systemStatus' }];
3231
3231
  }
3232
- if (wantsStatus && /(\bprocess\b|\bprocessi\b|\bpid\b|\bcpu\b|\bram\b|\bmemory\b|\bmem\b)/.test(lower)) {
3232
+ if (wantsStatus && /(\bprocess\b|\bprocesso\b|\bprocessi\b|\bpid\b|\bcpu\b|\bram\b|\bmemory\b|\bmem\b)/.test(lower)) {
3233
3233
  const processMatch = g.match(/(?:process(?:o|i)?|pid)\s+(?:di\s+|of\s+)?([a-z0-9._-]{2,})/i) || g.match(/([a-z0-9._-]{2,})\s+(?:process(?:o|i)?|pid)/i);
3234
3234
  const filter = processMatch ? processMatch[1] : '';
3235
3235
  return [{ tool: 'project' }, { tool: 'processStatus', ...(filter ? { name: filter } : {}) }];
3236
3236
  }
3237
- if (wantsStatus && /(\bport\b|\bporte\b|\bsocket\b|\blisten\b|\blistening\b)/.test(lower)) {
3237
+ if (wantsStatus && /(\bport\b|\bporta\b|\bporte\b|\bsocket\b|\blisten\b|\blistening\b)/.test(lower)) {
3238
3238
  const portMatch = g.match(/\b(\d{2,5})\b/);
3239
3239
  const port = portMatch ? portMatch[1] : '';
3240
3240
  return [{ tool: 'project' }, { tool: 'portStatus', ...(port ? { port } : {}) }];
@@ -3763,7 +3763,7 @@ function makeSimplePlan(goal) {
3763
3763
  "Riporta l'esito del controllo"
3764
3764
  ];
3765
3765
  }
3766
- if (/(\bprocess\b|\bprocessi\b|\bpid\b|\bcpu\b|\bram\b|\bmemory\b|\bmem\b)/i.test(g) && /(verifica|controlla|check|mostra|stato|status|attivo|active|running|enabled|on)/i.test(g)) {
3766
+ if (/(\bprocess\b|\bprocesso\b|\bprocessi\b|\bpid\b|\bcpu\b|\bram\b|\bmemory\b|\bmem\b)/i.test(g) && /(verifica|controlla|check|mostra|stato|status|attivo|active|running|enabled|on)/i.test(g)) {
3767
3767
  const processMatch = g.match(/(?:process(?:o|i)?|pid)\s+(?:di\s+|of\s+)?([a-z0-9._-]{2,})/i) || g.match(/([a-z0-9._-]{2,})\s+(?:process(?:o|i)?|pid)/i);
3768
3768
  const target = processMatch ? processMatch[1] : '';
3769
3769
  return [
@@ -3771,7 +3771,7 @@ function makeSimplePlan(goal) {
3771
3771
  "Riporta l'esito del controllo"
3772
3772
  ];
3773
3773
  }
3774
- if (/(\bport\b|\bporte\b|\bsocket\b|\blisten\b|\blistening\b)/i.test(g) && /(verifica|controlla|check|mostra|stato|status|attivo|active|running|enabled|on)/i.test(g)) {
3774
+ if (/(\bport\b|\bporta\b|\bporte\b|\bsocket\b|\blisten\b|\blistening\b)/i.test(g) && /(verifica|controlla|check|mostra|stato|status|attivo|active|running|enabled|on)/i.test(g)) {
3775
3775
  const portMatch = g.match(/\b(\d{2,5})\b/);
3776
3776
  const target = portMatch ? portMatch[1] : '';
3777
3777
  return [
@@ -6393,6 +6393,10 @@ function printWelcomeCard(opts) {
6393
6393
  }
6394
6394
 
6395
6395
  async function runSinglePrompt(opts) {
6396
+ if (String(opts.prompt || '').trim().startsWith('/')) {
6397
+ const localResult = await handleLocalCommand(opts, opts.prompt);
6398
+ if (localResult.handled) return;
6399
+ }
6396
6400
  const localIntent = classifyLocalPromptIntent(opts.prompt);
6397
6401
  if (localIntent?.command) {
6398
6402
  const localResult = await handleLocalCommand(opts, localIntent.command);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bortexcode",
3
- "version": "1.2.3",
3
+ "version": "1.2.5",
4
4
  "description": "Bortex Code CLI - AI coding assistant powered by bortex.site",
5
5
  "homepage": "https://bortex.site",
6
6
  "license": "UNLICENSED",