total-recall-brain 3.11.0 → 3.12.1
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/package.json +2 -1
- package/src/cli/init.mjs +24 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "total-recall-brain",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.12.1",
|
|
4
4
|
"description": "Sovereign AI system — database-free, SSSS-powered personal intelligence engine deployable to any POSIX host.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
"zod": "^4.4.3"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
|
+
"openwiki": "^0.0.1",
|
|
73
74
|
"skills": "^1.5.7",
|
|
74
75
|
"supertest": "^7.2.2",
|
|
75
76
|
"vitest": "^4.1.6"
|
package/src/cli/init.mjs
CHANGED
|
@@ -126,6 +126,11 @@ function printHelp() {
|
|
|
126
126
|
--dry-run Print what would be done without making changes
|
|
127
127
|
--help, -h Show this help
|
|
128
128
|
|
|
129
|
+
Interactive Scaffolding Prompts (when run without --yes):
|
|
130
|
+
- UI Deploy Mode (Local, Cloudflare Tunnel, Custom Domain)
|
|
131
|
+
- OpenWiki Initialization (auto-document codebase)
|
|
132
|
+
- OKF Knowledge Bundle Import
|
|
133
|
+
|
|
129
134
|
Examples:
|
|
130
135
|
npx total-recall init # Global brain (run once)
|
|
131
136
|
npx total-recall init --project # Project brain (run per project)
|
|
@@ -386,6 +391,21 @@ export default async function init(args) {
|
|
|
386
391
|
domain = (await ask(' Enter Custom Domain (e.g. brain.mydomain.com): ')).trim();
|
|
387
392
|
}
|
|
388
393
|
}
|
|
394
|
+
|
|
395
|
+
const runOpenwiki = (await ask('\n [3.8] Would you like to initialize OpenWiki for auto-documentation? (y/N): ')).trim().toLowerCase();
|
|
396
|
+
if (runOpenwiki === 'y' || runOpenwiki === 'yes') {
|
|
397
|
+
console.error('\n Starting OpenWiki interactive setup...');
|
|
398
|
+
spawnSync('npx', ['openwiki', '--init'], { stdio: 'inherit', cwd: process.cwd() });
|
|
399
|
+
}
|
|
400
|
+
|
|
401
|
+
const runOkf = (await ask('\n [3.9] Would you like to import an existing OKF knowledge bundle? (y/N): ')).trim().toLowerCase();
|
|
402
|
+
if (runOkf === 'y' || runOkf === 'yes') {
|
|
403
|
+
const bundlePath = (await ask(' Enter path to OKF bundle: ')).trim();
|
|
404
|
+
if (bundlePath) {
|
|
405
|
+
spawnSync('npx', ['total-recall', 'ingest', 'okf', bundlePath], { stdio: 'inherit', cwd: process.cwd() });
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
|
|
389
409
|
rl.close();
|
|
390
410
|
} else if (!deployMode) {
|
|
391
411
|
deployMode = 'local';
|
|
@@ -457,18 +477,18 @@ export default async function init(args) {
|
|
|
457
477
|
if (domain) {
|
|
458
478
|
current['cfg-domain'] = domain;
|
|
459
479
|
current['cfg-api-url'] = `https://${domain}`;
|
|
460
|
-
current['cfg-dash-url'] = `https://${domain}
|
|
480
|
+
current['cfg-dash-url'] = `https://${domain}/`;
|
|
461
481
|
current['cfg-health-url'] = `https://${domain}/health`;
|
|
462
482
|
}
|
|
463
483
|
} else if (deployMode === 'custom-domain') {
|
|
464
484
|
current['cfg-domain'] = domain;
|
|
465
485
|
current['cfg-api-url'] = `https://${domain}`;
|
|
466
|
-
current['cfg-dash-url'] = `https://${domain}
|
|
486
|
+
current['cfg-dash-url'] = `https://${domain}/`;
|
|
467
487
|
current['cfg-health-url'] = `https://${domain}/health`;
|
|
468
488
|
} else if (deployMode === 'local') {
|
|
469
489
|
current['cfg-domain'] = 'localhost';
|
|
470
490
|
current['cfg-api-url'] = 'http://localhost:3000';
|
|
471
|
-
current['cfg-dash-url'] = 'http://localhost:3000/
|
|
491
|
+
current['cfg-dash-url'] = 'http://localhost:3000/';
|
|
472
492
|
current['cfg-health-url'] = 'http://localhost:3000/health';
|
|
473
493
|
}
|
|
474
494
|
|
|
@@ -684,7 +704,7 @@ export default async function init(args) {
|
|
|
684
704
|
}
|
|
685
705
|
current['cfg-domain'] = tunnelUrl.replace('https://', '');
|
|
686
706
|
current['cfg-api-url'] = tunnelUrl;
|
|
687
|
-
current['cfg-dash-url'] = `${tunnelUrl}
|
|
707
|
+
current['cfg-dash-url'] = `${tunnelUrl}/`;
|
|
688
708
|
current['cfg-health-url'] = `${tunnelUrl}/health`;
|
|
689
709
|
|
|
690
710
|
fs.writeFileSync(configFile, JSON.stringify(current, null, 2), { encoding: 'utf8', mode: 0o600 });
|