gnosys 4.3.1 → 4.4.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/README.md CHANGED
@@ -59,28 +59,20 @@ Gnosys takes a different approach: the central brain is a single SQLite database
59
59
  # 1. Install globally
60
60
  npm install -g gnosys
61
61
 
62
- # 2. Connect the MCP server to your IDE (one-time)
63
- claude mcp add --scope user gnosys gnosys serve # Claude Code
64
- # For Cursor, Codex, Claude Desktop — see MCP Server Setup below
62
+ # 2. Run the setup wizard (configures provider, API key, and IDE)
63
+ gnosys setup
65
64
 
66
- # 3. Generate global agent rules (teaches your agent when to use Gnosys tools)
67
- gnosys sync --global
68
-
69
- # 4. Initialize a project
65
+ # 3. Initialize a project
70
66
  cd your-project
71
67
  gnosys init
72
68
 
73
- # 5. Generate project-specific agent rules for your IDE
74
- gnosys sync --target claude # writes CLAUDE.md
75
- gnosys sync --target cursor # → writes .cursor/rules/gnosys.mdc
76
- gnosys sync --target codex # → writes .codex/gnosys.md
77
- gnosys sync --target all # → writes all detected IDEs
78
-
79
- # 6. Start adding memories
80
- gnosys add "We chose PostgreSQL over MySQL for its JSON support and mature ecosystem"
69
+ # 4. Start adding memories
70
+ gnosys add "We chose PostgreSQL over MySQL for its JSON support"
81
71
  gnosys recall "database selection"
82
72
  ```
83
73
 
74
+ > **Postinstall hook:** After `npm install -g gnosys`, a postinstall script automatically runs `gnosys setup` if no configuration is detected, so first-time users are guided through provider and IDE setup immediately.
75
+
84
76
  > **Multi-machine?** Set `GNOSYS_GLOBAL` to a cloud-synced folder (iCloud Drive, Dropbox, OneDrive) and both machines share the same brain. After updating, run `gnosys upgrade` — it re-syncs all projects, regenerates agent rules, and warns other machines to upgrade too. See the [User Guide — Installation & Setup](https://gnosys.ai/guide.html#guide-installation) for the full walkthrough, memory scopes, and multi-machine setup.
85
77
 
86
78
  ### Agent / Helper Library
@@ -353,13 +345,13 @@ Eight providers behind a single interface — switch between cloud and local wit
353
345
 
354
346
  | Provider | Type | Default Model | API Key Env Var |
355
347
  |----------|------|---------------|-----------------|
356
- | **Anthropic** | Cloud | claude-sonnet-4-20250514 | `ANTHROPIC_API_KEY` |
348
+ | **Anthropic** | Cloud | claude-sonnet-4-6 | `ANTHROPIC_API_KEY` |
357
349
  | **Ollama** | Local | llama3.2 | — (runs locally) |
358
350
  | **Groq** | Cloud | llama-3.3-70b-versatile | `GROQ_API_KEY` |
359
- | **OpenAI** | Cloud | gpt-4o-mini | `OPENAI_API_KEY` |
351
+ | **OpenAI** | Cloud | gpt-5.4-mini | `OPENAI_API_KEY` |
360
352
  | **LM Studio** | Local | default | — (runs locally) |
361
- | **xAI** | Cloud | grok-2 | `XAI_API_KEY` |
362
- | **Mistral** | Cloud | mistral-large-latest | `MISTRAL_API_KEY` |
353
+ | **xAI** | Cloud | grok-4.20 | `XAI_API_KEY` |
354
+ | **Mistral** | Cloud | mistral-small-4 | `MISTRAL_API_KEY` |
363
355
  | **Custom** | Any | (user-defined) | `GNOSYS_LLM_API_KEY` |
364
356
 
365
357
  Route tasks to different providers — a cheap model for structuring, a powerful model for synthesis:
@@ -368,12 +360,12 @@ Route tasks to different providers — a cheap model for structuring, a powerful
368
360
  {
369
361
  "llm": {
370
362
  "defaultProvider": "anthropic",
371
- "anthropic": { "model": "claude-sonnet-4-20250514" },
363
+ "anthropic": { "model": "claude-sonnet-4-6" },
372
364
  "ollama": { "model": "llama3.2", "baseUrl": "http://localhost:11434" }
373
365
  },
374
366
  "taskModels": {
375
367
  "structuring": { "provider": "ollama", "model": "llama3.2" },
376
- "synthesis": { "provider": "anthropic", "model": "claude-sonnet-4-20250514" }
368
+ "synthesis": { "provider": "anthropic", "model": "claude-sonnet-4-6" }
377
369
  }
378
370
  }
379
371
  ```
@@ -447,6 +439,8 @@ gnosys import events.jsonl --format jsonl \
447
439
 
448
440
  All commands support `--json` for programmatic output. See the [User Guide](https://gnosys.ai/guide.html) for full details.
449
441
 
442
+ **Getting started:** `setup`, `init`, `upgrade`
443
+
450
444
  **Memory operations:** `add`, `add-structured`, `commit-context`, `read`, `update`, `reinforce`, `bootstrap`, `import`
451
445
 
452
446
  **Search:** `discover`, `search`, `hybrid-search`, `semantic-search`, `ask`, `recall`, `fsearch`
@@ -455,9 +449,9 @@ All commands support `--json` for programmatic output. See the [User Guide](http
455
449
 
456
450
  **History:** `history`, `rollback`
457
451
 
458
- **Maintenance:** `maintain`, `dearchive`, `dream`, `reindex`, `reindex-graph`, `upgrade`
452
+ **Maintenance:** `maintain`, `dearchive`, `dream`, `reindex`, `reindex-graph`
459
453
 
460
- **Export & config:** `export`, `config show`, `config set`, `dashboard`, `doctor`, `stores`
454
+ **Export & config:** `export`, `setup`, `config show`, `config set`, `dashboard`, `doctor`, `stores`
461
455
 
462
456
  **Centralized brain:** `projects`, `backup`, `restore`, `migrate`, `pref set/get/delete`, `sync`, `ambiguity`, `briefing`, `working-set`
463
457
 
@@ -505,7 +499,7 @@ src/
505
499
  embeddings.ts # Lazy semantic embeddings (all-MiniLM-L6-v2)
506
500
  hybridSearch.ts # Hybrid search with RRF fusion
507
501
  ask.ts # Freeform Q&A with LLM synthesis + citations
508
- llm.ts # LLM abstraction (8 providers)
502
+ llm.ts # LLM abstraction (8 providers + setup wizard)
509
503
  maintenance.ts # Auto-maintenance: decay, dedup, archiving
510
504
  archive.ts # Two-tier memory: active <-> archive
511
505
  recall.ts # Ultra-fast recall for agent orchestrators
package/dist/cli.js CHANGED
@@ -354,7 +354,7 @@ program
354
354
  await tagRegistry.load();
355
355
  const ingestion = new GnosysIngestion(writeTarget.store, tagRegistry);
356
356
  if (!ingestion.isLLMAvailable) {
357
- console.error("Error: No LLM provider available. Set ANTHROPIC_API_KEY or switch to Ollama: gnosys config set provider ollama");
357
+ console.error("Error: No LLM provider available. Add an API key to ~/.config/gnosys/.env or use a local model: gnosys config set provider ollama");
358
358
  process.exit(1);
359
359
  }
360
360
  console.log("Structuring memory via LLM...");
@@ -389,6 +389,18 @@ program
389
389
  }
390
390
  }
391
391
  });
392
+ // ─── gnosys setup ───────────────────────────────────────────────────────
393
+ program
394
+ .command("setup")
395
+ .description("Interactive setup wizard — configure LLM provider, API key, model, and IDE integration in one step")
396
+ .option("--non-interactive", "Skip prompts, use defaults (for CI/scripting)")
397
+ .action(async (opts) => {
398
+ const { runSetup } = await import("./lib/setup.js");
399
+ await runSetup({
400
+ directory: process.cwd(),
401
+ nonInteractive: opts.nonInteractive,
402
+ });
403
+ });
392
404
  // ─── gnosys init ─────────────────────────────────────────────────────────
393
405
  program
394
406
  .command("init")
@@ -821,7 +833,7 @@ program
821
833
  await tagRegistry.load();
822
834
  const ingestion = new GnosysIngestion(writeTarget.store, tagRegistry);
823
835
  if (!ingestion.isLLMAvailable) {
824
- console.error("Error: No LLM provider available. Set ANTHROPIC_API_KEY or switch to Ollama: gnosys config set provider ollama");
836
+ console.error("Error: No LLM provider available. Add an API key to ~/.config/gnosys/.env or use a local model: gnosys config set provider ollama");
825
837
  process.exit(1);
826
838
  }
827
839
  // Build search index
@@ -1618,6 +1630,11 @@ configCmd
1618
1630
  console.log(` Groq: model=${cfg.llm.groq.model}, apiKey=${cfg.llm.groq.apiKey ? "config" : (process.env.GROQ_API_KEY ? "env" : "—")}`);
1619
1631
  console.log(` OpenAI: model=${cfg.llm.openai.model}, apiKey=${cfg.llm.openai.apiKey ? "config" : (process.env.OPENAI_API_KEY ? "env" : "—")}, url=${cfg.llm.openai.baseUrl}`);
1620
1632
  console.log(` LM Studio: model=${cfg.llm.lmstudio.model}, url=${cfg.llm.lmstudio.baseUrl}`);
1633
+ console.log(` xAI: model=${cfg.llm.xai.model}, apiKey=${cfg.llm.xai.apiKey ? "config" : (process.env.XAI_API_KEY ? "env" : "—")}`);
1634
+ console.log(` Mistral: model=${cfg.llm.mistral.model}, apiKey=${cfg.llm.mistral.apiKey ? "config" : (process.env.MISTRAL_API_KEY ? "env" : "—")}`);
1635
+ if (cfg.llm.custom) {
1636
+ console.log(` Custom: model=${cfg.llm.custom.model}, url=${cfg.llm.custom.baseUrl}, apiKey=${cfg.llm.custom.apiKey ? "config" : (process.env.GNOSYS_LLM_API_KEY ? "env" : "—")}`);
1637
+ }
1621
1638
  console.log("");
1622
1639
  const structuring = resolveTaskModel(cfg, "structuring");
1623
1640
  const synthesis = resolveTaskModel(cfg, "synthesis");