gnosys 5.2.8 → 5.2.11
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/dist/cli.js +26 -0
- package/dist/cli.js.map +1 -1
- package/dist/index.js +81 -32
- package/dist/index.js.map +1 -1
- package/dist/lib/db.d.ts +1 -0
- package/dist/lib/db.d.ts.map +1 -1
- package/dist/lib/db.js +3 -0
- package/dist/lib/db.js.map +1 -1
- package/dist/postinstall.d.ts +3 -3
- package/dist/postinstall.js +49 -55
- package/dist/postinstall.js.map +1 -1
- package/package.json +1 -1
package/dist/postinstall.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* Postinstall hook — detects fresh install vs upgrade and
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* Postinstall hook — detects fresh install vs upgrade and always prints
|
|
4
|
+
* the next steps. If the terminal is interactive, offers to run
|
|
5
|
+
* gnosys upgrade (or setup) automatically.
|
|
6
6
|
*/
|
|
7
7
|
export {};
|
|
8
8
|
//# sourceMappingURL=postinstall.d.ts.map
|
package/dist/postinstall.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* Postinstall hook — detects fresh install vs upgrade and
|
|
4
|
-
*
|
|
5
|
-
*
|
|
3
|
+
* Postinstall hook — detects fresh install vs upgrade and always prints
|
|
4
|
+
* the next steps. If the terminal is interactive, offers to run
|
|
5
|
+
* gnosys upgrade (or setup) automatically.
|
|
6
6
|
*/
|
|
7
7
|
import { existsSync } from "fs";
|
|
8
8
|
import { join } from "path";
|
|
@@ -10,10 +10,6 @@ import { createInterface } from "readline/promises";
|
|
|
10
10
|
import { stdin, stdout } from "process";
|
|
11
11
|
import { execSync } from "child_process";
|
|
12
12
|
async function main() {
|
|
13
|
-
// Skip in non-interactive environments (CI, Docker, piped installs)
|
|
14
|
-
if (!stdout.isTTY || !stdin.isTTY) {
|
|
15
|
-
process.exit(0);
|
|
16
|
-
}
|
|
17
13
|
// Skip if GNOSYS_SKIP_POSTINSTALL is set (for testing or automation)
|
|
18
14
|
if (process.env.GNOSYS_SKIP_POSTINSTALL) {
|
|
19
15
|
process.exit(0);
|
|
@@ -32,60 +28,58 @@ async function main() {
|
|
|
32
28
|
catch {
|
|
33
29
|
// non-critical
|
|
34
30
|
}
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
console.log(` 3. gnosys status --web — open the portfolio dashboard\n`);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
else {
|
|
60
|
-
// ── Fresh install flow ──
|
|
61
|
-
console.log(`\n Gnosys v${version} installed (fresh install)`);
|
|
62
|
-
console.log("");
|
|
63
|
-
const answer = await rl.question(" Run setup wizard? [Y/n] ");
|
|
64
|
-
rl.close();
|
|
65
|
-
const shouldSetup = !answer || answer.trim().toLowerCase() !== "n";
|
|
66
|
-
if (shouldSetup) {
|
|
67
|
-
console.log("");
|
|
68
|
-
execSync("gnosys setup", { stdio: "inherit" });
|
|
31
|
+
const isInteractive = stdout.isTTY && stdin.isTTY;
|
|
32
|
+
if (isUpgrade) {
|
|
33
|
+
// ── Upgrade flow ──
|
|
34
|
+
console.log("");
|
|
35
|
+
const title = `Gnosys v${version} installed`;
|
|
36
|
+
console.log(`\n ${title}\n`);
|
|
37
|
+
console.log(" Next steps:");
|
|
38
|
+
console.log(" 1. gnosys upgrade sync all projects + regenerate dashboard");
|
|
39
|
+
console.log(" 2. Restart IDE MCP server Cursor: Cmd+Shift+P > MCP: Restart All Servers");
|
|
40
|
+
console.log(" 3. gnosys status --web open the portfolio dashboard");
|
|
41
|
+
console.log("");
|
|
42
|
+
// If interactive, offer to run upgrade automatically
|
|
43
|
+
if (isInteractive) {
|
|
44
|
+
const rl = createInterface({ input: stdin, output: stdout });
|
|
45
|
+
try {
|
|
46
|
+
const answer = await rl.question(" Run gnosys upgrade now? [Y/n] ");
|
|
47
|
+
rl.close();
|
|
48
|
+
if (!answer || answer.trim().toLowerCase() !== "n") {
|
|
49
|
+
console.log("");
|
|
50
|
+
execSync("gnosys upgrade", { stdio: "inherit" });
|
|
51
|
+
}
|
|
69
52
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
console.log(` 1. gnosys setup — configure LLM providers and preferences`);
|
|
73
|
-
console.log(` 2. gnosys init — initialize gnosys in a project directory`);
|
|
74
|
-
console.log(` 3. gnosys status — check project status\n`);
|
|
53
|
+
catch {
|
|
54
|
+
rl.close();
|
|
75
55
|
}
|
|
76
56
|
}
|
|
77
57
|
}
|
|
78
|
-
|
|
79
|
-
//
|
|
80
|
-
rl.close();
|
|
58
|
+
else {
|
|
59
|
+
// ── Fresh install flow ──
|
|
81
60
|
console.log("");
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
61
|
+
const title = `Gnosys v${version} installed`;
|
|
62
|
+
console.log(`\n ${title}\n`);
|
|
63
|
+
console.log(" Get started:");
|
|
64
|
+
console.log(" 1. gnosys setup configure LLM providers and preferences");
|
|
65
|
+
console.log(" 2. gnosys init initialize gnosys in a project directory");
|
|
66
|
+
console.log(" 3. gnosys status check project status");
|
|
67
|
+
console.log("");
|
|
68
|
+
// If interactive, offer to run setup automatically
|
|
69
|
+
if (isInteractive) {
|
|
70
|
+
const rl = createInterface({ input: stdin, output: stdout });
|
|
71
|
+
try {
|
|
72
|
+
const answer = await rl.question(" Run setup wizard? [Y/n] ");
|
|
73
|
+
rl.close();
|
|
74
|
+
if (!answer || answer.trim().toLowerCase() !== "n") {
|
|
75
|
+
console.log("");
|
|
76
|
+
execSync("gnosys setup", { stdio: "inherit" });
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
rl.close();
|
|
81
|
+
}
|
|
87
82
|
}
|
|
88
|
-
process.exit(0);
|
|
89
83
|
}
|
|
90
84
|
}
|
|
91
85
|
main();
|
package/dist/postinstall.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"postinstall.js","sourceRoot":"","sources":["../src/postinstall.ts"],"names":[],"mappings":";AACA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,KAAK,UAAU,IAAI;IACjB,
|
|
1
|
+
{"version":3,"file":"postinstall.js","sourceRoot":"","sources":["../src/postinstall.ts"],"names":[],"mappings":";AACA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,KAAK,UAAU,IAAI;IACjB,qEAAqE;IACrE,IAAI,OAAO,CAAC,GAAG,CAAC,uBAAuB,EAAE,CAAC;QACxC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;IAED,oEAAoE;IACpE,MAAM,IAAI,GAAG,OAAO,CAAC,GAAG,CAAC,IAAI,IA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E,CAAC,WAAW,EAAE,KAAK,GAAG,EAAE,CAAC;oBACnD,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;oBAChB,QAAQ,CAAC,cAAc,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;gBACjD,CAAC;YACH,CAAC;YAAC,MAAM,CAAC;gBACP,EAAE,CAAC,KAAK,EAAE,CAAC;YACb,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC;AAED,IAAI,EAAE,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gnosys",
|
|
3
|
-
"version": "5.2.
|
|
3
|
+
"version": "5.2.11",
|
|
4
4
|
"description": "Gnosys — Persistent Memory for AI Agents. Sandbox-first runtime, central SQLite brain, federated search, Dream Mode, Web Knowledge Base, Obsidian export.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|