gnosys 5.12.0 → 5.12.2
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 +48 -7
- package/dist/index.js +179 -10
- package/dist/lib/addCommand.js +0 -1
- package/dist/lib/archive.js +0 -2
- package/dist/lib/askCommand.js +1 -1
- package/dist/lib/attachCommand.d.ts +17 -0
- package/dist/lib/attachCommand.js +66 -0
- package/dist/lib/attachments.d.ts +43 -2
- package/dist/lib/attachments.js +81 -2
- package/dist/lib/chat/choose.js +2 -2
- package/dist/lib/clientReadOverlay.js +3 -0
- package/dist/lib/config.d.ts +1 -48
- package/dist/lib/configCommand.js +2 -2
- package/dist/lib/db.d.ts +16 -1
- package/dist/lib/db.js +216 -119
- package/dist/lib/dbWrite.d.ts +1 -1
- package/dist/lib/dearchiveCommand.js +1 -1
- package/dist/lib/docxExtract.js +1 -1
- package/dist/lib/dream.d.ts +8 -0
- package/dist/lib/dream.js +35 -1
- package/dist/lib/dreamLogCommand.js +1 -1
- package/dist/lib/dreamRunLog.d.ts +1 -1
- package/dist/lib/dreamRunLog.js +26 -4
- package/dist/lib/embeddings.js +0 -3
- package/dist/lib/exportProject.d.ts +3 -2
- package/dist/lib/exportProject.js +2 -1
- package/dist/lib/federated.js +1 -1
- package/dist/lib/hybridSearchCommand.js +1 -1
- package/dist/lib/importProject.js +2 -1
- package/dist/lib/llm.js +1 -1
- package/dist/lib/lock.d.ts +1 -1
- package/dist/lib/lock.js +5 -3
- package/dist/lib/migrate.js +0 -1
- package/dist/lib/multimodalIngest.js +1 -1
- package/dist/lib/platform.d.ts +0 -6
- package/dist/lib/platform.js +0 -28
- package/dist/lib/readCommand.js +11 -10
- package/dist/lib/remoteWizard.d.ts +1 -1
- package/dist/lib/remoteWizard.js +4 -4
- package/dist/lib/rulesGen.d.ts +8 -0
- package/dist/lib/rulesGen.js +16 -0
- package/dist/lib/search.d.ts +0 -2
- package/dist/lib/search.js +0 -7
- package/dist/lib/semanticSearchCommand.js +1 -1
- package/dist/lib/setup/sections/providers.js +56 -4
- package/dist/lib/setup/sections/routing.js +42 -5
- package/dist/lib/setup/sections/taskRoutingEditor.d.ts +1 -5
- package/dist/lib/setup/sections/taskRoutingEditor.js +0 -10
- package/dist/lib/setup/ui/header.js +0 -1
- package/dist/lib/setup/ui/status.d.ts +0 -1
- package/dist/lib/setup/ui/status.js +0 -2
- package/dist/lib/setup.d.ts +0 -15
- package/dist/lib/setup.js +13 -158
- package/dist/lib/staleCommand.js +2 -2
- package/dist/lib/syncClient.d.ts +0 -6
- package/dist/lib/syncClient.js +36 -14
- package/dist/lib/syncDoctorCommand.js +2 -2
- package/dist/lib/syncIngest.d.ts +11 -0
- package/dist/lib/syncIngest.js +24 -1
- package/dist/lib/syncIngestStartup.js +2 -2
- package/dist/lib/syncSnapshot.d.ts +2 -0
- package/dist/lib/syncSnapshot.js +4 -0
- package/dist/lib/syncStaging.d.ts +0 -2
- package/dist/lib/syncStaging.js +0 -2
- package/dist/lib/updateCommand.js +1 -1
- package/dist/lib/webBuildCommand.js +1 -1
- package/dist/lib/webIndex.js +0 -1
- package/dist/lib/webIngestCommand.js +1 -1
- package/dist/sandbox/client.js +1 -1
- package/dist/sandbox/manager.js +1 -14
- package/dist/sandbox/server.js +3 -5
- package/package.json +5 -2
package/dist/lib/syncStaging.js
CHANGED
|
@@ -21,8 +21,6 @@ export function stagingRoot(masterPath) {
|
|
|
21
21
|
export function machineStagingDir(masterPath, machineId) {
|
|
22
22
|
return path.join(stagingRoot(masterPath), machineId);
|
|
23
23
|
}
|
|
24
|
-
/** Alias used by remoteWizard and tests. */
|
|
25
|
-
export const stagingDirForMachine = machineStagingDir;
|
|
26
24
|
export function clientPresencePath(masterPath, machineId) {
|
|
27
25
|
return path.join(machineStagingDir(masterPath, machineId), PRESENCE_FILE);
|
|
28
26
|
}
|
|
@@ -18,7 +18,7 @@ export async function runUpdateCommand(getResolver, memoryPath, opts) {
|
|
|
18
18
|
else {
|
|
19
19
|
const resolver = await getResolver();
|
|
20
20
|
const memory = await resolver.readMemory(memoryPath);
|
|
21
|
-
if (!memory
|
|
21
|
+
if (!memory?.frontmatter.id) {
|
|
22
22
|
console.error(`Memory not found: ${memoryPath}`);
|
|
23
23
|
centralDb?.close();
|
|
24
24
|
process.exit(1);
|
|
@@ -20,7 +20,7 @@ export async function runWebBuildCommand(getWebStorePath, opts) {
|
|
|
20
20
|
categories: webConfig.categories,
|
|
21
21
|
llmEnrich: opts.llm ? webConfig.llmEnrich : false,
|
|
22
22
|
prune: opts.prune || webConfig.prune,
|
|
23
|
-
concurrency: parseInt(opts.concurrency) || webConfig.concurrency,
|
|
23
|
+
concurrency: parseInt(opts.concurrency, 10) || webConfig.concurrency,
|
|
24
24
|
crawlDelayMs: webConfig.crawlDelayMs,
|
|
25
25
|
dryRun: opts.dryRun,
|
|
26
26
|
}, gnosysConfig);
|
package/dist/lib/webIndex.js
CHANGED
|
@@ -115,7 +115,6 @@ export function buildIndexSync(knowledgeDir, options = {}) {
|
|
|
115
115
|
const id = typeof fm.id === "string" ? fm.id : path.basename(filePath, ".md");
|
|
116
116
|
const category = typeof fm.category === "string" ? fm.category : "general";
|
|
117
117
|
const created = typeof fm.created === "string" ? fm.created : null;
|
|
118
|
-
const docIndex = documents.length;
|
|
119
118
|
documents.push({
|
|
120
119
|
id,
|
|
121
120
|
path: relativePath,
|
|
@@ -17,7 +17,7 @@ export async function runWebIngestCommand(getWebStorePath, opts) {
|
|
|
17
17
|
categories: webConfig.categories,
|
|
18
18
|
llmEnrich: opts.llm ? webConfig.llmEnrich : false,
|
|
19
19
|
prune: opts.prune || webConfig.prune,
|
|
20
|
-
concurrency: parseInt(opts.concurrency) || webConfig.concurrency,
|
|
20
|
+
concurrency: parseInt(opts.concurrency, 10) || webConfig.concurrency,
|
|
21
21
|
crawlDelayMs: webConfig.crawlDelayMs,
|
|
22
22
|
dryRun: opts.dryRun,
|
|
23
23
|
verbose: opts.verbose,
|
package/dist/sandbox/client.js
CHANGED
package/dist/sandbox/manager.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Manages the lifecycle of the background sandbox server process.
|
|
5
5
|
* Handles start, stop, status, and auto-start on helper import.
|
|
6
6
|
*/
|
|
7
|
-
import { spawn } from "child_process";
|
|
7
|
+
import { spawn, } from "child_process";
|
|
8
8
|
import fs from "fs";
|
|
9
9
|
import path from "path";
|
|
10
10
|
import { fileURLToPath } from "url";
|
|
@@ -204,16 +204,3 @@ export async function sandboxStatus() {
|
|
|
204
204
|
};
|
|
205
205
|
}
|
|
206
206
|
}
|
|
207
|
-
/**
|
|
208
|
-
* Ensure the sandbox is running (auto-start if needed).
|
|
209
|
-
* Used by the helper library to transparently start the sandbox.
|
|
210
|
-
*/
|
|
211
|
-
async function ensureSandbox(opts) {
|
|
212
|
-
const client = new SandboxClient();
|
|
213
|
-
if (await client.isRunning()) {
|
|
214
|
-
return client;
|
|
215
|
-
}
|
|
216
|
-
// Auto-start
|
|
217
|
-
await startSandbox({ dbPath: opts?.dbPath, wait: true });
|
|
218
|
-
return client;
|
|
219
|
-
}
|
package/dist/sandbox/server.js
CHANGED
|
@@ -13,10 +13,10 @@ import fs from "fs";
|
|
|
13
13
|
import path from "path";
|
|
14
14
|
import { GnosysDB } from "../lib/db.js";
|
|
15
15
|
import { federatedSearch } from "../lib/federated.js";
|
|
16
|
-
import { setPreference, getPreference, getAllPreferences, deletePreference, searchPreferences } from "../lib/preferences.js";
|
|
16
|
+
import { setPreference, getPreference, getAllPreferences, deletePreference, searchPreferences, } from "../lib/preferences.js";
|
|
17
17
|
import { GnosysDreamEngine, DreamScheduler, DEFAULT_DREAM_CONFIG } from "../lib/dream.js";
|
|
18
18
|
import { DEFAULT_CONFIG } from "../lib/config.js";
|
|
19
|
-
import { generateRulesBlock } from "../lib/rulesGen.js";
|
|
19
|
+
import { generateRulesBlock, } from "../lib/rulesGen.js";
|
|
20
20
|
import { getSandboxDir as getSandboxDirImpl } from "../lib/paths.js";
|
|
21
21
|
import { logError, logWarn } from "../lib/log.js";
|
|
22
22
|
// ─── Socket + PID paths ─────────────────────────────────────────────────
|
|
@@ -62,8 +62,6 @@ export function initDreamMode(db, config, dreamConfig) {
|
|
|
62
62
|
const originalStart = scheduler.start.bind(scheduler);
|
|
63
63
|
scheduler.start = () => {
|
|
64
64
|
originalStart();
|
|
65
|
-
// Override the internal check interval to track state
|
|
66
|
-
const CHECK_INTERVAL = 60_000;
|
|
67
65
|
const origCheckIdle = scheduler.checkIdle;
|
|
68
66
|
if (origCheckIdle) {
|
|
69
67
|
scheduler.checkIdle = async () => {
|
|
@@ -552,7 +550,7 @@ export function startServer(dbPath) {
|
|
|
552
550
|
}
|
|
553
551
|
// Open database (with retry for network shares — Dropbox, iCloud, NAS)
|
|
554
552
|
const dbDir = dbPath || GnosysDB.getCentralDbDir();
|
|
555
|
-
const isNetworkPath = dbPath
|
|
553
|
+
const isNetworkPath = !!dbPath;
|
|
556
554
|
const db = new GnosysDB(dbDir, isNetworkPath ? { retries: 5, retryDelayMs: 1000 } : undefined);
|
|
557
555
|
if (!db.isAvailable()) {
|
|
558
556
|
logError(new Error("Failed to open GnosysDB"), { module: "sandbox", op: "openDb", hint: "Install it with: npm install better-sqlite3" });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "gnosys",
|
|
3
|
-
"version": "5.12.
|
|
3
|
+
"version": "5.12.2",
|
|
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",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
},
|
|
21
21
|
"scripts": {
|
|
22
22
|
"prebuild": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
23
|
-
"build": "tsc",
|
|
23
|
+
"build": "tsc -p tsconfig.build.json",
|
|
24
24
|
"postbuild": "node -e \"const fs=require('fs');for (const f of ['dist/cli.js','dist/index.js']) { try { fs.chmodSync(f,0o755); } catch {} }\"",
|
|
25
25
|
"prebuild:publish": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"",
|
|
26
26
|
"build:publish": "tsc -p tsconfig.publish.json",
|
|
@@ -32,6 +32,8 @@
|
|
|
32
32
|
"test:coverage": "vitest run --coverage",
|
|
33
33
|
"lint": "biome check src/",
|
|
34
34
|
"lint:fix": "biome check --write src/",
|
|
35
|
+
"typecheck": "tsc --noEmit",
|
|
36
|
+
"knip": "knip",
|
|
35
37
|
"docs:mcp-tools": "node scripts/gen-mcp-tools.mjs --write",
|
|
36
38
|
"docs:cli": "node scripts/gen-cli-docs.mjs --write",
|
|
37
39
|
"postinstall": "node dist/postinstall.js || true",
|
|
@@ -66,6 +68,7 @@
|
|
|
66
68
|
"@types/react": "^19.2.14",
|
|
67
69
|
"@types/turndown": "^5.0.6",
|
|
68
70
|
"@vitest/coverage-v8": "^4.1.0",
|
|
71
|
+
"knip": "^6.16.1",
|
|
69
72
|
"tsx": "^4.19.0",
|
|
70
73
|
"typescript": "^5.7.0",
|
|
71
74
|
"vitest": "^4.0.18"
|