subto 8.0.4 → 8.0.6
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.
- package/index.js +2 -4
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -11,7 +11,7 @@ const chalk = (_chalk && _chalk.default) ? _chalk.default : _chalk;
|
|
|
11
11
|
const CONFIG_DIR = path.join(os.homedir(), '.subto');
|
|
12
12
|
const CONFIG_PATH = path.join(CONFIG_DIR, 'config.json');
|
|
13
13
|
const DEFAULT_API_BASE = 'https://subto.one/api/v1';
|
|
14
|
-
const CLIENT_META = { name: 'subto-cli', version: '8.0.
|
|
14
|
+
const CLIENT_META = { name: 'subto-cli', version: '8.0.6' };
|
|
15
15
|
const cp = require('child_process');
|
|
16
16
|
|
|
17
17
|
// Normalize SUBTO API base so callers can set either
|
|
@@ -276,7 +276,6 @@ function extractScanIdFromHtml(html) {
|
|
|
276
276
|
const m1 = html.match(/\/scan\/(?:id\/)?([a-zA-Z0-9_-]{8,})/i);
|
|
277
277
|
if (m1 && m1[1]) return m1[1];
|
|
278
278
|
const m2 = html.match(/scanId["'\s:=]+([a-zA-Z0-9_-]{8,})/i);
|
|
279
|
-
program.command('scan <url>')
|
|
280
279
|
const m3 = html.match(/data-scan-id["'\s=:\>]+([a-zA-Z0-9_-]{8,})/i);
|
|
281
280
|
if (m3 && m3[1]) return m3[1];
|
|
282
281
|
return null;
|
|
@@ -448,7 +447,6 @@ async function callOpenAI(prompt){
|
|
|
448
447
|
const j = await res.json();
|
|
449
448
|
const msg = j && j.choices && j.choices[0] && (j.choices[0].message && j.choices[0].message.content || j.choices[0].text);
|
|
450
449
|
return String(msg || '').trim();
|
|
451
|
-
}
|
|
452
450
|
|
|
453
451
|
if (openrouterKey) {
|
|
454
452
|
// Use OpenRouter chat completions endpoint
|
|
@@ -571,7 +569,7 @@ async function startChatREPL(scanData){
|
|
|
571
569
|
|
|
572
570
|
async function run(argv) {
|
|
573
571
|
const program = new Command();
|
|
574
|
-
program.name('subto').description('Subto CLI — wrapper around Subto.One API').version(CLIENT_META.version || '8.0.
|
|
572
|
+
program.name('subto').description('Subto CLI — wrapper around Subto.One API').version(CLIENT_META.version || '8.0.6');
|
|
575
573
|
program.option('-v, --verbose', 'Show verbose HTTP logs');
|
|
576
574
|
program.option('--debug', 'Show debug HTTP headers and responses');
|
|
577
575
|
program.option('--chat', 'Start local AI assistant (no command required)');
|