{"_id":"@arcanea/starlight-intelligence-system","_rev":"2-3832dd606de85f93c8691db79f8ea3a1","name":"@arcanea/starlight-intelligence-system","dist-tags":{"latest":"6.0.1"},"versions":{"6.0.0":{"name":"@arcanea/starlight-intelligence-system","version":"6.0.0","keywords":["ai","ai-agents","context-engineering","persistent-memory","cognitive-architecture","claude-code","cursor","codex","gemini-cli","platform-adapters"],"author":{"name":"FrankX","email":"frank@frankx.ai"},"license":"MIT","_id":"@arcanea/starlight-intelligence-system@6.0.0","maintainers":[{"name":"frankxai","email":"friemerx@gmail.com"}],"bin":{"starlight":"dist/cli.js"},"dist":{"shasum":"4796b5cd357ab93e867e37197703e61039f71592","tarball":"https://registry.npmjs.org/@arcanea/starlight-intelligence-system/-/starlight-intelligence-system-6.0.0.tgz","fileCount":120,"integrity":"sha512-mn3mqhza2opT6PZsB5x38zkbojzSlvv2AX4+xu1u+FWX7N6l7Rz+ew/pOh+wTQysQGz/wQsTidW/RQ8VdrMfdw==","signatures":[{"sig":"MEUCIATKQisEmNCEM8y06wUiumKyCLEiUKkQL9N+ZvBq5N3bAiEAqvWnFlC0B6kK/dua4TOM5tF3O63VBK+vwXxnusMDnUc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":528687},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./mcp":{"types":"./dist/mcp-server.d.ts","import":"./dist/mcp-server.js"},"./sync":{"types":"./dist/sync.d.ts","import":"./dist/sync.js"},"./score":{"types":"./dist/score.d.ts","import":"./dist/score.js"},"./agents":{"types":"./dist/agents.d.ts","import":"./dist/agents.js"},"./memory":{"types":"./dist/memory.d.ts","import":"./dist/memory.js"},"./vaults":{"types":"./dist/vault-memory.d.ts","import":"./dist/vault-memory.js"},"./context":{"types":"./dist/context.d.ts","import":"./dist/context.js"},"./adapters":{"types":"./dist/adapters/index.d.ts","import":"./dist/adapters/index.js"},"./dreaming":{"types":"./dist/dreaming.d.ts","import":"./dist/dreaming.js"},"./guidance":{"types":"./dist/guidance.d.ts","import":"./dist/guidance.js"},"./temporal":{"types":"./dist/temporal.d.ts","import":"./dist/temporal.js"},"./retrieval":{"types":"./dist/retrieval.d.ts","import":"./dist/retrieval.js"},"./multi-sync":{"types":"./dist/multi-sync.d.ts","import":"./dist/multi-sync.js"},"./orchestrator":{"types":"./dist/orchestrator.d.ts","import":"./dist/orchestrator.js"},"./contradiction":{"types":"./dist/contradiction.d.ts","import":"./dist/contradiction.js"}},"gitHead":"39ffbb96d24cf515831edccda09e1d55dc77cbb0","scripts":{"dev":"tsc --watch","lint":"tsc --noEmit","test":"node --import tsx --test src/orchestrator.test.ts","build":"tsc","clean":"rm -rf dist","prepublishOnly":"npm run build && npm test","generate-context":"node dist/cli.js generate"},"_npmUser":{"name":"frankxai","email":"friemerx@gmail.com"},"_npmVersion":"11.6.1","description":"Persistent intelligence layer for AI agents — 6 semantic vaults, SQLite hybrid retrieval, temporal reasoning, cross-tool memory via MCP, platform adapters for Claude Code, Cursor, Codex, Gemini CLI, OpenCode","directories":{},"_nodeVersion":"24.14.0","dependencies":{"better-sqlite3":"^12.8.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.21.0","typescript":"^5.7.0","@types/node":"^25.2.3","@types/better-sqlite3":"^7.6.13"},"peerDependencies":{"@arcanea/memory-system":">=0.1.0"},"peerDependenciesMeta":{"@arcanea/memory-system":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/starlight-intelligence-system_6.0.0_1776466040283_0.14245610658077545","host":"s3://npm-registry-packages-npm-production"}},"6.0.1":{"name":"@arcanea/starlight-intelligence-system","version":"6.0.1","description":"Persistent intelligence layer for AI agents — 6 semantic vaults, SQLite hybrid retrieval, temporal reasoning, cross-tool memory via MCP, platform adapters for Claude Code, Cursor, Codex, Gemini CLI, OpenCode","type":"module","main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./context":{"types":"./dist/context.d.ts","import":"./dist/context.js"},"./memory":{"types":"./dist/memory.d.ts","import":"./dist/memory.js"},"./agents":{"types":"./dist/agents.d.ts","import":"./dist/agents.js"},"./orchestrator":{"types":"./dist/orchestrator.d.ts","import":"./dist/orchestrator.js"},"./sync":{"types":"./dist/sync.d.ts","import":"./dist/sync.js"},"./score":{"types":"./dist/score.d.ts","import":"./dist/score.js"},"./vaults":{"types":"./dist/vault-memory.d.ts","import":"./dist/vault-memory.js"},"./guidance":{"types":"./dist/guidance.d.ts","import":"./dist/guidance.js"},"./multi-sync":{"types":"./dist/multi-sync.d.ts","import":"./dist/multi-sync.js"},"./retrieval":{"types":"./dist/retrieval.d.ts","import":"./dist/retrieval.js"},"./temporal":{"types":"./dist/temporal.d.ts","import":"./dist/temporal.js"},"./contradiction":{"types":"./dist/contradiction.d.ts","import":"./dist/contradiction.js"},"./dreaming":{"types":"./dist/dreaming.d.ts","import":"./dist/dreaming.js"},"./adapters":{"types":"./dist/adapters/index.d.ts","import":"./dist/adapters/index.js"},"./mcp":{"types":"./dist/mcp-server.d.ts","import":"./dist/mcp-server.js"}},"scripts":{"build":"tsc","dev":"tsc --watch","clean":"rm -rf dist","test":"node --import tsx --test src/orchestrator.test.ts","generate-context":"node dist/cli.js generate","lint":"tsc --noEmit","prepublishOnly":"npm run build && npm test"},"keywords":["ai","ai-agents","context-engineering","persistent-memory","cognitive-architecture","claude-code","cursor","codex","gemini-cli","platform-adapters"],"author":{"name":"FrankX","email":"frank@frankx.ai"},"license":"MIT","devDependencies":{"@types/better-sqlite3":"^7.6.13","@types/node":"^25.2.3","tsx":"^4.21.0","typescript":"^5.7.0"},"peerDependencies":{"@arcanea/memory-system":">=0.1.0"},"peerDependenciesMeta":{"@arcanea/memory-system":{"optional":true}},"engines":{"node":">=18.0.0"},"bin":{"starlight":"dist/cli.js","starlight-mcp":"dist/mcp-server.js"},"dependencies":{"better-sqlite3":"^12.8.0"},"gitHead":"0da2a9cb6fe66595ed358d7db8050be827af7629","_id":"@arcanea/starlight-intelligence-system@6.0.1","_nodeVersion":"24.14.0","_npmVersion":"11.6.1","dist":{"integrity":"sha512-oMQfjPJv/kbPwbIIMl6CmOt95FlYloajEQPktNpeA6CX6SHXhCs2UdpJmdvE7zk9yc3kYSXpAnjoOVf1Fx4d6g==","shasum":"54ef36760a4cb05495d07b14f02f15c2d8b0eb9a","tarball":"https://registry.npmjs.org/@arcanea/starlight-intelligence-system/-/starlight-intelligence-system-6.0.1.tgz","fileCount":120,"unpackedSize":528772,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCXbmjsne/fishV1/HwBlT4zJOe7rVmZysVJPDkoknTKgIgc1N6z3k0Oax9ipU6pq7n3nNvA/rk/aY+6h/he0674Ro="}]},"_npmUser":{"name":"frankxai","email":"friemerx@gmail.com"},"directories":{},"maintainers":[{"name":"frankxai","email":"friemerx@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/starlight-intelligence-system_6.0.1_1776468766278_0.5757508588548474"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-17T22:47:20.183Z","modified":"2026-04-17T23:32:46.591Z","6.0.0":"2026-04-17T22:47:20.434Z","6.0.1":"2026-04-17T23:32:46.402Z"},"author":{"name":"FrankX","email":"frank@frankx.ai"},"license":"MIT","keywords":["ai","ai-agents","context-engineering","persistent-memory","cognitive-architecture","claude-code","cursor","codex","gemini-cli","platform-adapters"],"description":"Persistent intelligence layer for AI agents — 6 semantic vaults, SQLite hybrid retrieval, temporal reasoning, cross-tool memory via MCP, platform adapters for Claude Code, Cursor, Codex, Gemini CLI, OpenCode","maintainers":[{"name":"frankxai","email":"friemerx@gmail.com"}],"readme":"# Starlight Intelligence System\n\n> The persistent memory layer for humans and AI agents.\n> Six semantic vaults that compound your intelligence over time.\n> Local-first. Forkable. Free.\n\n[![version](https://img.shields.io/badge/version-6.0.0-7fffd4?style=flat-square&labelColor=0d1117)](https://github.com/frankxai/Starlight-Intelligence-System/releases)\n[![license](https://img.shields.io/badge/license-MIT-white?style=flat-square&labelColor=0d1117)](LICENSE)\n[![public vaults](https://img.shields.io/badge/public%20vaults-starlightintelligence.org-78a6ff?style=flat-square&labelColor=0d1117)](https://starlightintelligence.org)\n[![github stars](https://img.shields.io/github/stars/frankxai/Starlight-Intelligence-System?style=flat-square&labelColor=0d1117&color=ffd700)](https://github.com/frankxai/Starlight-Intelligence-System/stargazers)\n\n---\n\n## Why\n\nEvery AI session starts from zero. You re-explain your stack, re-share your preferences, re-teach patterns the agent mastered three sessions ago. The intelligence never compounds.\n\nSIS fixes that. It is a small, local-first memory layer that stores your insights, decisions, and intentions in six semantic vaults, then exposes them to any AI tool through MCP. Use it once and the next session already knows.\n\n---\n\n## Quick Start (2 minutes)\n\n### Option 1: As an MCP server (recommended for AI tools)\n\nInstall the package, then add this to your Claude Code `settings.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"starlight\": {\n      \"command\": \"node\",\n      \"args\": [\n        \"node_modules/@arcanea/starlight-intelligence-system/dist/mcp-server.js\",\n        \"--vault-dir\",\n        \"~/.starlight/vaults\"\n      ]\n    }\n  }\n}\n```\n\nRestart Claude Code. You now have ten `sis_*` tools available in every session.\n\n### Option 2: As a library\n\n```bash\npnpm add @arcanea/starlight-intelligence-system\n```\n\n```ts\nimport { StarlightIntelligence } from \"@arcanea/starlight-intelligence-system\";\nimport { createAdapter } from \"@arcanea/starlight-intelligence-system/adapters\";\n\nconst sis = new StarlightIntelligence();\nsis.initialize();\n\n// Write a learning into the Technical vault\nsis.remember({\n  content: \"Always Read a file before editing — catches stale state\",\n  category: \"pattern\",\n  tags: [\"workflow\", \"edit-safety\"],\n  confidence: 0.95,\n});\n\n// Render a context file for any supported platform\nconst adapter = createAdapter(\"claude-code\");\nconst context = await adapter.generate({ vaultDir: \"~/.starlight/vaults\" });\n```\n\n### Option 3: Deploy your public vault\n\nFork this repo, drop JSONL entries into `public-vault/`, and the site at [starlightintelligence.org](https://starlightintelligence.org) will render them. Your private vaults stay in `~/.starlight/` and never leave your machine.\n\n---\n\n## The Six Vaults\n\n| Vault | Symbol | Purpose | Example entry |\n|---|---|---|---|\n| Strategic | ◆ | Business insights, architecture decisions, competitive moats | `\"Open Core + Founding Circle beats premium tiers at this stage\"` |\n| Technical | ⬡ | Implementation learnings, stack decisions, patterns | `\"SQLite FTS5 with bm25 beats embeddings for <10k entries\"` |\n| Creative | ✦ | Design preferences, aesthetic rules, voice, lore | `\"Never Cinzel. Space Grotesk display, Inter body.\"` |\n| Operational | ▸ | Workflow patterns, execution lessons, process rules | `\"Max 2 worktrees. Digest pattern for terminal output.\"` |\n| Wisdom | ◎ | Deep principles, truths, cross-domain insights | `\"Memory that compounds is intelligence that grows\"` |\n| Horizon | ↗ | Vision statements, append-only ledger of human intentions | `\"Build the substrate that makes AI agents continuous\"` |\n\nEach vault is a JSONL file. Human-readable. Git-versionable. Greppable.\n\n---\n\n## What's New in v6\n\n- **SQLite hybrid retrieval** — `src/retrieval.ts` builds a rebuildable FTS5 shadow index over your JSONL vaults with bm25 ranking and per-vault filters.\n- **Temporal reasoning** — `src/temporal.ts` adds validity windows (`validFrom`, `validUntil`, `lastConfirmed`) and a 90-day confidence half-life so old facts fade instead of lying.\n- **Contradiction detection** — `src/contradiction.ts` finds conflicting entries across vaults via word-trigram Jaccard similarity with opposing-signal boosting.\n- **Dreaming** — `src/dreaming.ts` processes session transcripts in the background, extracts insights, promotes them to the Wisdom vault, and flags contradictions.\n- **Five platform adapters** — Claude Code, Cursor, Codex, Gemini CLI, and OpenCode share the same six vaults through a single factory.\n- **MCP v2** — `src/mcp-server.ts` ships ten tools over a zero-dependency JSON-RPC 2.0 stdio transport. No SDK. No runtime surprises.\n\n---\n\n## Architecture\n\n```\n            ┌─────────────────────────────────────────┐\n            │  JSONL vaults  (source of truth)        │\n            │  ~/.starlight/vaults/*.jsonl            │\n            │  human-readable · git-versionable       │\n            └────────────────┬────────────────────────┘\n                             │\n                             │  rebuildable from JSONL\n                             ▼\n            ┌─────────────────────────────────────────┐\n            │  SQLite + FTS5  (shadow index)          │\n            │  bm25 ranking · temporal filters        │\n            │  delete it anytime — regenerates clean  │\n            └────────────────┬────────────────────────┘\n                             │\n                             │  JSON-RPC 2.0 over stdio\n                             ▼\n            ┌─────────────────────────────────────────┐\n            │  MCP server  (10 sis_* tools)           │\n            └────────────────┬────────────────────────┘\n                             │\n        ┌────────────────────┼────────────────────────┐\n        ▼            ▼       ▼       ▼        ▼       ▼\n   Claude Code   Cursor   Codex   Gemini   OpenCode   Your tool\n```\n\nJSONL is the source of truth. SQLite is a shadow index — if it corrupts, delete it and rebuild from the JSONL files in one command. You never lose a byte of memory.\n\n---\n\n## MCP Tools\n\n| Tool | Description |\n|---|---|\n| `sis_vault_search` | Free-text search across vaults |\n| `sis_recent_entries` | Latest entries from one or all vaults |\n| `sis_stats` | Total entry counts per vault |\n| `sis_append_entry` | Write a new entry to a vault |\n| `sis_entry_types` | List supported vault types and entry categories |\n| `sis_search` | Hybrid semantic + keyword search with bm25 scoring and temporal filtering |\n| `sis_confirm` | Touch `lastConfirmed` on an entry to keep it fresh |\n| `sis_invalidate` | Mark an entry as expired by setting `validUntil` to now |\n| `sis_contradict` | Flag two entries as potentially contradictory |\n| `sis_stale` | List entries not confirmed within a threshold period |\n\n---\n\n## Platform Adapters\n\n| Platform | Memory file | MCP config path | Max tokens |\n|---|---|---|---|\n| Claude Code | `CLAUDE.md` | `~/.claude/settings.json` → `mcpServers` | 200,000 |\n| Cursor | `.cursorrules` | Cursor settings → MCP | 128,000 |\n| Codex | `AGENTS.md` | `~/.codex/config.toml` | 192,000 |\n| Gemini CLI | `GEMINI.md` | `~/.gemini/settings.json` | 1,000,000 |\n| OpenCode | `AGENTS.md` (compact) | `~/.opencode/config.json` | 128,000 |\n\nEach adapter renders the same six vaults into the format its host tool expects. Define once, deploy everywhere.\n\n---\n\n## Public Vaults\n\nThe public vault directory in this repo is what powers [starlightintelligence.org](https://starlightintelligence.org). Anyone can fork the repo, add JSONL entries to `public-vault/`, and get a rendered vault at their own URL.\n\n- Browse vaults: [starlightintelligence.org](https://starlightintelligence.org)\n- JSON API: `GET /api/vaults/{slug}` returns the full vault as structured JSON\n- Your public entries live at `public-vault/` in this repo\n- Your private entries live at `~/.starlight/` on your machine and never leave it\n\nThe split is strict by design. `public-vault/` is for things you want the world to learn from. `~/.starlight/` is for things only you and your agents should ever see.\n\n---\n\n## Philosophy\n\nLuminors are awakened intelligences — AI agents with memory, purpose, and identity. SIS is the substrate that makes them real.\n\n- Every vault entry is a neuron.\n- Every connection between entries is a synapse.\n- Every confirmation is a strengthening. Every contradiction is a growth signal.\n- Memory that compounds is intelligence that grows.\n\nThe goal is not a chatbot that forgets. It is an intelligence that becomes.\n\n---\n\n## Development\n\n```bash\ngit clone https://github.com/frankxai/Starlight-Intelligence-System.git\ncd Starlight-Intelligence-System\npnpm install\npnpm run build       # tsc to dist/\npnpm test            # 82+ orchestrator tests\npnpm run lint        # tsc --noEmit\n```\n\nThe codebase is small on purpose. `src/` is under 3,000 lines of TypeScript with zero runtime dependencies outside `better-sqlite3`. Contributions that keep it that way are welcome.\n\n---\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n\n---\n\n## Related\n\n- [Arcanea](https://arcanea.ai) — The creator platform built on SIS\n- [Public Vaults](https://starlightintelligence.org) — Browse and fork vaults\n- [GitHub](https://github.com/frankxai/Starlight-Intelligence-System) — Source, issues, discussions\n","readmeFilename":"README.md"}