n2-soul 8.0.0 → 9.0.0

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.
Files changed (91) hide show
  1. package/CHANGELOG.md +103 -0
  2. package/README.ko.md +30 -17
  3. package/README.md +20 -52
  4. package/dist/index.d.ts +1 -0
  5. package/dist/index.js +33 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/lib/agent-registry.d.ts +17 -0
  8. package/dist/lib/agent-registry.js +67 -0
  9. package/dist/lib/agent-registry.js.map +1 -0
  10. package/dist/lib/config.d.ts +3 -0
  11. package/dist/lib/config.default.d.ts +3 -0
  12. package/dist/lib/config.default.js +66 -0
  13. package/dist/lib/config.default.js.map +1 -0
  14. package/dist/lib/config.js +36 -0
  15. package/dist/lib/config.js.map +1 -0
  16. package/dist/lib/context.d.ts +15 -0
  17. package/dist/lib/context.js +35 -0
  18. package/dist/lib/context.js.map +1 -0
  19. package/dist/lib/core-memory.d.ts +34 -0
  20. package/dist/lib/core-memory.js +102 -0
  21. package/dist/lib/core-memory.js.map +1 -0
  22. package/dist/lib/entity-memory.d.ts +58 -0
  23. package/dist/lib/entity-memory.js +160 -0
  24. package/dist/lib/entity-memory.js.map +1 -0
  25. package/dist/lib/intercom-log.d.ts +41 -0
  26. package/dist/lib/intercom-log.js +163 -0
  27. package/dist/lib/intercom-log.js.map +1 -0
  28. package/dist/lib/kv-cache/agent-adapter.d.ts +44 -0
  29. package/dist/lib/kv-cache/agent-adapter.js +132 -0
  30. package/dist/lib/kv-cache/agent-adapter.js.map +1 -0
  31. package/dist/lib/kv-cache/backup.d.ts +64 -0
  32. package/dist/lib/kv-cache/backup.js +329 -0
  33. package/dist/lib/kv-cache/backup.js.map +1 -0
  34. package/dist/lib/kv-cache/compressor.d.ts +20 -0
  35. package/dist/lib/kv-cache/compressor.js +92 -0
  36. package/dist/lib/kv-cache/compressor.js.map +1 -0
  37. package/dist/lib/kv-cache/embedding.d.ts +39 -0
  38. package/dist/lib/kv-cache/embedding.js +159 -0
  39. package/dist/lib/kv-cache/embedding.js.map +1 -0
  40. package/dist/lib/kv-cache/index.d.ts +82 -0
  41. package/dist/lib/kv-cache/index.js +302 -0
  42. package/dist/lib/kv-cache/index.js.map +1 -0
  43. package/dist/lib/kv-cache/schema.d.ts +60 -0
  44. package/dist/lib/kv-cache/schema.js +85 -0
  45. package/dist/lib/kv-cache/schema.js.map +1 -0
  46. package/dist/lib/kv-cache/snapshot.d.ts +42 -0
  47. package/dist/lib/kv-cache/snapshot.js +220 -0
  48. package/dist/lib/kv-cache/snapshot.js.map +1 -0
  49. package/dist/lib/kv-cache/sqlite-store.d.ts +66 -0
  50. package/dist/lib/kv-cache/sqlite-store.js +311 -0
  51. package/dist/lib/kv-cache/sqlite-store.js.map +1 -0
  52. package/dist/lib/kv-cache/tier-manager.d.ts +71 -0
  53. package/dist/lib/kv-cache/tier-manager.js +132 -0
  54. package/dist/lib/kv-cache/tier-manager.js.map +1 -0
  55. package/dist/lib/kv-cache/token-saver.d.ts +19 -0
  56. package/dist/lib/kv-cache/token-saver.js +99 -0
  57. package/dist/lib/kv-cache/token-saver.js.map +1 -0
  58. package/dist/lib/paths.d.ts +6 -0
  59. package/dist/lib/paths.js +33 -0
  60. package/dist/lib/paths.js.map +1 -0
  61. package/dist/lib/soul-engine.d.ts +41 -0
  62. package/dist/lib/soul-engine.js +220 -0
  63. package/dist/lib/soul-engine.js.map +1 -0
  64. package/dist/lib/utils.d.ts +16 -0
  65. package/dist/lib/utils.js +174 -0
  66. package/dist/lib/utils.js.map +1 -0
  67. package/dist/sequences/boot.d.ts +13 -0
  68. package/dist/sequences/boot.js +153 -0
  69. package/dist/sequences/boot.js.map +1 -0
  70. package/dist/sequences/end.d.ts +3 -0
  71. package/dist/sequences/end.js +190 -0
  72. package/dist/sequences/end.js.map +1 -0
  73. package/dist/sequences/work.d.ts +17 -0
  74. package/dist/sequences/work.js +240 -0
  75. package/dist/sequences/work.js.map +1 -0
  76. package/dist/tools/brain.d.ts +3 -0
  77. package/dist/tools/brain.js +93 -0
  78. package/dist/tools/brain.js.map +1 -0
  79. package/dist/tools/kv-cache.d.ts +3 -0
  80. package/dist/tools/kv-cache.js +163 -0
  81. package/dist/tools/kv-cache.js.map +1 -0
  82. package/dist/types.d.ts +186 -0
  83. package/dist/types.js +4 -0
  84. package/dist/types.js.map +1 -0
  85. package/package.json +21 -4
  86. package/.github/FUNDING.yml +0 -3
  87. package/CONTRIBUTING.md +0 -142
  88. package/docs/soul-notebooklm-source.md +0 -127
  89. package/docs/soul-v8-roadmap.md +0 -152
  90. package/tests/README.md +0 -5
  91. package/tests/test-simulation.js +0 -153
package/CHANGELOG.md ADDED
@@ -0,0 +1,103 @@
1
+ # Changelog
2
+
3
+ All notable changes to Soul are documented here.
4
+
5
+ ## [9.0.0] — 2026-03-26
6
+
7
+ ### 🔒 Strict TypeScript Migration
8
+
9
+ Soul is now fully written in **TypeScript strict mode** with zero `any` usage.
10
+
11
+ #### Added
12
+ - **ESLint strict rules** — automated detection of floating promises, unused vars, type safety violations
13
+ - **30 unit tests** — utils, soul-engine, kv-cache, and dispose pattern verification
14
+ - **`npm run verify`** — one-command pipeline: typecheck + lint + build + test
15
+ - **`SoulKVCache.dispose()`** — proper timer cleanup for backup scheduler
16
+ - **`disposeWorkSequence()`** — GC timer cleanup for test environments
17
+ - **HTTP response size limit** (10MB) for Ollama embedding requests
18
+ - **`sql-js.d.ts`** — custom type declarations for sql.js WASM module
19
+
20
+ #### Fixed
21
+ - **CRITICAL**: `stmt.free()` / `embStmt.free()` now wrapped in `try/finally` blocks (WASM memory leak prevention)
22
+ - **CRITICAL**: `.catch(() => {})` silent error swallowing replaced with `logError()`
23
+ - **HIGH**: Floating promise in auto-backup timer — added `void` + `.catch()` error handling
24
+ - **HIGH**: `Buffer` + `string` concatenation — explicit `.toString()` conversion
25
+
26
+ #### Changed
27
+ - Source code migrated from CommonJS to `import/export` (ESM-style), compiled output remains CJS for compatibility
28
+ - 13 `require()` calls → 9 static `import` + 4 documented lazy `require()` (circular deps, runtime optional)
29
+ - `export =` → `export default` for ESM/CJS interop
30
+ - `tsconfig.json` — `strict: true`, `noUncheckedIndexedAccess`, `noUnusedLocals`, `noUnusedParameters`
31
+
32
+ #### Dependencies Added (devDependencies)
33
+ - `eslint` ^9.x
34
+ - `@eslint/js` ^9.x
35
+ - `typescript-eslint` ^8.x
36
+
37
+ ---
38
+
39
+ ## [8.0.0] — 2026-03-26
40
+
41
+ ### 🧠 Forgetting Curve — Intelligent Memory
42
+
43
+ Soul now remembers what matters and forgets what doesn't, inspired by Ebbinghaus' forgetting curve.
44
+
45
+ #### Added
46
+ - **Forgetting Curve GC** — retention formula: `importance × (1 + log₂(1 + accessCount)) × e^(−λ × ageDays)`
47
+ - **3-tier memory lifecycle** — Hot (0–7d, in-memory + disk) → Warm (8–30d, disk) → Cold (30d+, archived)
48
+ - **Async I/O** — all hot-path operations non-blocking (42% faster KV load, 3x+ search throughput)
49
+ - **Schema v2** — `accessCount`, `lastAccessed`, `importance`, `tier` fields (auto-migrated from v1)
50
+ - **SQLite backend** — `sql.js` WASM-based, no native bindings needed
51
+ - **Incremental backups** — portable SQLite backup/restore with configurable retention
52
+ - **Semantic search** — Ollama `nomic-embed-text` embedding integration
53
+
54
+ #### Changed
55
+ - SDK Native Migration — removed legacy `registerTool` shim, direct `server.tool()` API
56
+ - `z.any()` eliminated from all tool schema definitions
57
+
58
+ ---
59
+
60
+ ## [7.0.0] — 2026-03
61
+
62
+ ### 🕸️ Arachne — Code Context Assembly
63
+
64
+ > **Note**: Arachne has been separated into its own package [`n2-arachne`](https://github.com/choihyunsus/n2-arachne) as of v8.0.
65
+
66
+ - BM25 search + dependency tracking + smart assembly
67
+ - 50,000 file project → 30 most relevant chunks → 30K tokens (instead of 500K+)
68
+ - Ollama semantic search support
69
+
70
+ ---
71
+
72
+ ## [6.0.0] — 2026-03
73
+
74
+ ### 🛡️ Ark — AI Safety System
75
+
76
+ > **Note**: Ark has been separated into its own package [`n2-ark`](https://github.com/choihyunsus/n2-ark) as of v8.0.
77
+
78
+ - Zero-token-cost safety enforcement via regex pattern matching
79
+ - Multi-layer response system (WARN → MODIFY → BLOCK → LOCKDOWN)
80
+ - `.n2` rule file format with 7 domain templates
81
+ - Full MCP compatibility
82
+
83
+ ---
84
+
85
+ ## [5.0.0] — 2026-02
86
+
87
+ ### 🏷️ Entity & Core Memory
88
+
89
+ - **Entity Memory** — auto-track people, hardware, projects, concepts
90
+ - **Core Memory** — per-agent always-loaded facts
91
+ - **Auto-extraction** — entities and insights saved automatically at `n2_work_end`
92
+ - **Context Search** — keyword search across Brain + Ledger
93
+
94
+ ---
95
+
96
+ ## [4.0.0] — 2026-01
97
+
98
+ ### 📋 Soul Board & Ledger
99
+
100
+ - **Soul Board** — project state + TODO tracking + cross-agent handoff
101
+ - **Immutable Ledger** — append-only work logs with date-based partitioning
102
+ - **File Ownership** — collision prevention for multi-agent environments
103
+ - **Shared Brain** — file-based shared memory with path traversal protection
package/README.ko.md CHANGED
@@ -3,18 +3,6 @@
3
3
  # 🧠 Soul
4
4
 
5
5
  **AI 에이전트는 세션이 끝나면 모든 걸 잊어버립니다. Soul이 그걸 해결합니다.**
6
- **AI 에이전트가 위험한 행동을 할 수도 있습니다. Ark가 그걸 막습니다.**
7
- **AI 에이전트가 관련 없는 코드를 읽느라 토큰을 낭비합니다. Arachne가 그걸 해결합니다.**
8
-
9
- > ### 🚀 v7.0 업데이트 — Arachne
10
- >
11
- > **Arachne** — 코드 컨텍스트 어셈블리 엔진. 코드베이스 전체를 인덱싱하고 AI에게 **정확히** 필요한 것만 전달합니다.
12
- > ```
13
- > 50,000 파일 프로젝트 → 가장 관련 있는 30개 청크 → 30K 토큰 (500K+ 대신)
14
- > ```
15
- > BM25 검색 + 의존성 추적 + 스마트 어셈블리. Ollama를 통한 시맨틱 검색도 지원. [자세히 →](#arachne--최고의-직조사)
16
- >
17
- > **Ark** (v6.0) 포함 — 토큰 비용 0으로 위험한 행동을 차단하는 AI 안전 시스템. [자세히 →](#ark--최후의-방패)
18
6
 
19
7
  Cursor, VS Code Copilot 등 MCP 호환 AI 에이전트와 새 채팅을 시작할 때마다, 에이전트는 이전에 뭘 했는지 전혀 모른 채 처음부터 시작합니다. Soul은 에이전트에게 이런 능력을 부여하는 MCP 서버입니다:
20
8
 
@@ -22,12 +10,37 @@ Cursor, VS Code Copilot 등 MCP 호환 AI 에이전트와 새 채팅을 시작
22
10
  - 🤝 **인수인계** — 한 에이전트가 다른 에이전트의 작업을 이어받을 수 있습니다
23
11
  - 📝 **작업 이력** — 모든 작업이 변경 불가능한 로그로 기록됩니다
24
12
  - 🗂️ **공유 두뇌** — 여러 에이전트가 같은 컨텍스트를 읽고 쓸 수 있습니다
25
- - 🏷️ **엔티티 메모리** — 인물, 하드웨어, 프로젝트를 자동 추적합니다 (v5.0)
26
- - 💡 **코어 메모리** — 에이전트별 핵심 사실이 항상 로드됩니다 (v5.0)
27
- - 🛡️ **Ark** — 토큰 비용 0으로 위험한 행동을 차단하는 AI 안전 시스템 (v6.0)
28
- - 🕸️ **Arachne** — AI에게 정확히 필요한 코드만 전달하는 코드 컨텍스트 엔진 (v7.0)
13
+ - 🏷️ **엔티티 메모리** — 인물, 하드웨어, 프로젝트를 자동 추적합니다
14
+ - 💡 **코어 메모리** — 에이전트별 핵심 사실이 항상 로드됩니다
29
15
 
30
- > **Soul은 N2 Browser의 작은 부속품 하나입니다** — 우리가 만들고 있는 AI 네이티브 브라우저의 일부예요. 멀티 에이전트 오케스트레이션, 실시간 도구 라우팅, 에이전트 간 통신 등 훨씬 더 많은 기능들이 현재 테스트 중입니다. 이건 시작에 불과합니다.
16
+ > 🔌 **N2 에코시스템과 연동:**
17
+ > [**Ark**](https://github.com/choihyunsus/n2-ark) (AI 안전) · [**Arachne**](https://github.com/choihyunsus/n2-arachne) (코드 컨텍스트) · [**QLN**](https://github.com/choihyunsus/n2-QLN) (도구 라우팅)
18
+
19
+ ## v9.0의 새로운 기능
20
+
21
+ > **Strict TypeScript — `any` 제로, 메모리 누수 제로, 자동화된 품질 검증.**
22
+
23
+ ### 🔒 TypeScript Strict 모드 전환
24
+
25
+ - 소스 코드 전체를 TypeScript `strict: true`로 마이그레이션
26
+ - **`any` 사용 제로** — 모든 타입이 명시적이고 검증 가능
27
+ - ESLint `strictTypeChecked` 규칙으로 floating promise, 타입 안전 위반 자동 탐지
28
+ - 30개 단위 테스트 + `npm run verify` 원커맨드 검증 파이프라인
29
+
30
+ ### 🛡️ 보안 & 메모리 감사
31
+
32
+ - WASM 메모리 누수 수정 — `stmt.free()` → `try/finally` 블록
33
+ - 무음 에러 삼킴 제거 — 모든 `.catch()` 핸들러가 에러 로깅
34
+ - 임베딩 요청 HTTP 응답 크기 제한 (10MB)
35
+ - `dispose()` 메서드로 타이머 누수 방지
36
+
37
+ ### 🧠 v8.0 기능 (포함)
38
+
39
+ - **망각 곡선 GC** — 접근 패턴 기반 지능형 기억 보존
40
+ - **비동기 I/O** — 논블로킹 연산, KV 로드 42% 빨라짐
41
+ - **3단계 메모리** — Hot → Warm → Cold 수명 주기
42
+
43
+ > 전체 버전 히스토리는 [CHANGELOG.md](CHANGELOG.md)를 참고하세요.
31
44
 
32
45
  ## 빠른 시작
33
46
 
package/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
  [![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)
7
7
  [![Node](https://img.shields.io/badge/node-%3E%3D18-brightgreen.svg)](https://nodejs.org)
8
8
  [![npm downloads](https://img.shields.io/npm/dm/n2-soul.svg)](https://www.npmjs.com/package/n2-soul)
9
- [![v8.0.0](https://img.shields.io/badge/v8.0.0-Forgetting%20Curve-blueviolet.svg)](#whats-new-in-v80)
9
+ [![v9.0.0](https://img.shields.io/badge/v9.0.0-Strict%20TypeScript-blueviolet.svg)](#whats-new-in-v90)
10
10
 
11
11
  **Your AI agent forgets everything when a session ends. Soul fixes that.**
12
12
 
@@ -26,73 +26,41 @@ Every time you start a new chat with Cursor, VS Code Copilot, or any MCP-compati
26
26
 
27
27
  ## Table of Contents
28
28
 
29
- - [What's New in v8.0](#whats-new-in-v80)
29
+ - [What's New in v9.0](#whats-new-in-v90)
30
30
  - [Quick Start](#quick-start)
31
31
  - [Why Soul?](#why-soul)
32
- - [Token Efficiency](#token-efficiency)
33
- - [How It Works](#how-it-works)
34
32
  - [Features](#features)
35
33
  - [Cloud Storage](#️-cloud-storage--store-your-ai-memory-anywhere)
36
34
  - [Available Tools](#available-tools)
37
- - [Real-World Example](#real-world-example)
38
- - [Rust Compiler (n2c)](#rust-compiler-n2c)
39
35
  - [Configuration](#configuration)
40
- - [N2 Ecosystem](#-n2-ecosystem)
41
36
  - [Contributing](#contributing)
42
- - [Sponsors](#-sponsors)
37
+ - [Changelog](CHANGELOG.md)
43
38
 
44
- ## What's New in v8.0
39
+ ## What's New in v9.0
45
40
 
46
- > **Forgetting CurveSoul now remembers what matters and forgets what doesn't.**
41
+ > **Strict TypeScriptZero `any`, zero memory leaks, automated quality enforcement.**
47
42
 
48
- ### 🧠 Intelligent Memory (Forgetting Curve GC)
43
+ ### 🔒 Full TypeScript Strict Mode
49
44
 
50
- Inspired by Ebbinghaus' forgetting curve, Soul v8.0 intelligently manages memory retention:
45
+ - Source code migrated to TypeScript with `strict: true`
46
+ - **Zero `any`** — every type is explicit and verifiable
47
+ - ESLint `strictTypeChecked` rules catch floating promises, type safety violations
48
+ - 30 unit tests with `npm run verify` one-command pipeline
51
49
 
52
- ```
53
- retention = importance × (1 + log₂(1 + accessCount)) × e^(−λ × ageDays)
54
- ```
55
-
56
- - **Frequently accessed** sessions are kept longer
57
- - **Important** snapshots resist decay
58
- - **Stale** memory is automatically pruned via 3-tier lifecycle:
59
-
60
- | Tier | Age | Storage |
61
- |------|-----|--------|
62
- | 🔴 Hot | 0–7 days | In-memory cache + disk |
63
- | 🟡 Warm | 8–30 days | Disk only |
64
- | 🔵 Cold | 30+ days | Archived (compressed) |
65
-
66
- ### ⚡ Performance Revolution — Async I/O
67
-
68
- All hot-path I/O operations are now fully asynchronous:
50
+ ### 🛡️ Security & Memory Audit
69
51
 
70
- | Operation | v7 (sync) | v8 (async) | Improvement |
71
- |-----------|-----------|------------|-------------|
72
- | KV Save | Blocks event loop | Non-blocking | ∞ (no block) |
73
- | KV Load | 1.2ms (blocking) | 0.7ms (async) | 42% faster |
74
- | KV Search | Blocks | Parallel | 3x+ throughput |
75
- | GC | Blocks during sweep | Background | Non-disruptive |
52
+ - WASM memory leak fix `stmt.free()` wrapped in `try/finally`
53
+ - Silent error swallowing eliminated — all `.catch()` handlers log errors
54
+ - HTTP response size limits for embedding requests
55
+ - `dispose()` methods for proper timer cleanup
76
56
 
77
- ### 🔧 SDK Native Migration
57
+ ### 🧠 v8.0 Features (Included)
78
58
 
79
- - Removed legacy `registerTool` shim direct `server.tool()` API
80
- - Strict schema validation: `z.any()` eliminated from all tool definitions
81
- - Full MCP SDK v1.6.1 compatibility
59
+ - **Forgetting Curve GC** intelligent memory retention based on access patterns
60
+ - **Async I/O** non-blocking operations, 42% faster KV load
61
+ - **3-tier memory** Hot → Warm → Cold lifecycle
82
62
 
83
- ### 📦 Schema v2 (Backward Compatible)
84
-
85
- Snapshots now include Forgetting Curve metadata. Existing v1 snapshots are **auto-migrated** on first load:
86
-
87
- ```diff
88
- + accessCount: 0 // How often this snapshot was accessed
89
- + lastAccessed: null // When it was last loaded
90
- + importance: 0.5 // 0.0–1.0 importance score
91
- + tier: 'warm' // hot / warm / cold
92
- ```
93
-
94
- > [!NOTE]
95
- > **Upgrading from v7.x**: Zero breaking changes. All existing data works as-is. Snapshots are transparently migrated to schema v2 on first access.
63
+ > See [CHANGELOG.md](CHANGELOG.md) for full version history.
96
64
 
97
65
  ---
98
66
 
@@ -0,0 +1 @@
1
+ export {};
package/dist/index.js ADDED
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ // Soul MCP v9.0 — Entry point. Multi-agent session orchestrator with KV-Cache.
7
+ const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
8
+ const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
9
+ const zod_1 = require("zod");
10
+ const config_1 = __importDefault(require("./lib/config"));
11
+ const boot_1 = require("./sequences/boot");
12
+ const work_1 = require("./sequences/work");
13
+ const end_1 = require("./sequences/end");
14
+ const brain_1 = require("./tools/brain");
15
+ const kv_cache_1 = require("./tools/kv-cache");
16
+ const package_json_1 = __importDefault(require("../package.json"));
17
+ const server = new mcp_js_1.McpServer({ name: 'n2-soul', version: package_json_1.default.version });
18
+ // Register core modules
19
+ (0, boot_1.registerBootSequence)(server, zod_1.z, config_1.default);
20
+ (0, work_1.registerWorkSequence)(server, zod_1.z, config_1.default);
21
+ (0, end_1.registerEndSequence)(server, zod_1.z, config_1.default);
22
+ (0, brain_1.registerBrainTools)(server, zod_1.z, config_1.default);
23
+ (0, kv_cache_1.registerKVCacheTools)(server, zod_1.z, config_1.default);
24
+ // Start MCP transport
25
+ async function boot() {
26
+ const transport = new stdio_js_1.StdioServerTransport();
27
+ await server.connect(transport);
28
+ }
29
+ boot().catch((err) => {
30
+ console.error(`[n2-soul] Fatal: ${err.message}`);
31
+ process.exit(1);
32
+ });
33
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;AAAA,+EAA+E;AAC/E,oEAAoE;AACpE,wEAAiF;AACjF,6BAAwB;AAExB,0DAAkC;AAClC,2CAAwD;AACxD,2CAAwD;AACxD,yCAAsD;AACtD,yCAAmD;AACnD,+CAAwD;AAExD,mEAAkC;AAElC,MAAM,MAAM,GAAG,IAAI,kBAAS,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,sBAAG,CAAC,OAAO,EAAE,CAAkF,CAAC;AAEzJ,wBAAwB;AACxB,IAAA,2BAAoB,EAAC,MAAM,EAAE,OAAC,EAAE,gBAAM,CAAC,CAAC;AACxC,IAAA,2BAAoB,EAAC,MAAM,EAAE,OAAC,EAAE,gBAAM,CAAC,CAAC;AACxC,IAAA,yBAAmB,EAAC,MAAM,EAAE,OAAC,EAAE,gBAAM,CAAC,CAAC;AACvC,IAAA,0BAAkB,EAAC,MAAM,EAAE,OAAC,EAAE,gBAAM,CAAC,CAAC;AACtC,IAAA,+BAAoB,EAAC,MAAM,EAAE,OAAC,EAAE,gBAAM,CAAC,CAAC;AAExC,sBAAsB;AACtB,KAAK,UAAU,IAAI;IACjB,MAAM,SAAS,GAAG,IAAI,+BAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;AAClC,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,GAAU,EAAE,EAAE;IAC1B,OAAO,CAAC,KAAK,CAAC,oBAAoB,GAAG,CAAC,OAAO,EAAE,CAAC,CAAC;IACjD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,17 @@
1
+ export interface AgentInfo {
2
+ id: string;
3
+ name: string;
4
+ provider: string;
5
+ model: string;
6
+ soul: string;
7
+ rank: string;
8
+ enabled: boolean;
9
+ }
10
+ /** Detect agents directory dynamically (project-local first, cross-platform) */
11
+ export declare function detectAgentsDir(): string | null;
12
+ /** List all registered agents from the agents directory */
13
+ export declare function listAgents(agentsDir: string | null): AgentInfo[];
14
+ /** Find agent by name (case-insensitive) */
15
+ export declare function findAgent(agentsDir: string | null, name: string): AgentInfo | null;
16
+ /** Read global config */
17
+ export declare function readGlobalConfig(agentsDir: string | null): Record<string, unknown> | null;
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.detectAgentsDir = detectAgentsDir;
7
+ exports.listAgents = listAgents;
8
+ exports.findAgent = findAgent;
9
+ exports.readGlobalConfig = readGlobalConfig;
10
+ // Soul v9.0 — Dynamic agent registry. Detects agents from N2 Browser config.
11
+ const fs_1 = __importDefault(require("fs"));
12
+ const path_1 = __importDefault(require("path"));
13
+ const utils_1 = require("./utils");
14
+ const paths_1 = require("./paths");
15
+ /** Detect agents directory dynamically (project-local first, cross-platform) */
16
+ function detectAgentsDir() {
17
+ const candidates = [
18
+ process.env.N2_AGENTS_DIR,
19
+ (0, paths_1.getAgentsDir)(),
20
+ path_1.default.join(process.cwd(), '_data', 'agents'),
21
+ ];
22
+ for (const dir of candidates) {
23
+ if (dir && fs_1.default.existsSync(dir))
24
+ return dir;
25
+ }
26
+ return null;
27
+ }
28
+ /** List all registered agents from the agents directory */
29
+ function listAgents(agentsDir) {
30
+ if (!agentsDir || !fs_1.default.existsSync(agentsDir))
31
+ return [];
32
+ try {
33
+ return fs_1.default.readdirSync(agentsDir)
34
+ .filter(f => f.endsWith('.json') && f !== 'global.json')
35
+ .map((f) => {
36
+ const data = (0, utils_1.readJson)(path_1.default.join(agentsDir, f));
37
+ if (!data)
38
+ return null;
39
+ return {
40
+ id: data.id || path_1.default.basename(f, '.json'),
41
+ name: data.name || 'unknown',
42
+ provider: data.provider || 'unknown',
43
+ model: data.model || 'unknown',
44
+ soul: data.soul || '',
45
+ rank: data.rank || '?',
46
+ enabled: data.enabled !== false,
47
+ };
48
+ })
49
+ .filter((a) => a !== null && a.enabled);
50
+ }
51
+ catch (e) {
52
+ (0, utils_1.logError)('listAgents', e);
53
+ return [];
54
+ }
55
+ }
56
+ /** Find agent by name (case-insensitive) */
57
+ function findAgent(agentsDir, name) {
58
+ const agents = listAgents(agentsDir);
59
+ return agents.find(a => a.name.toLowerCase() === name.toLowerCase()) || null;
60
+ }
61
+ /** Read global config */
62
+ function readGlobalConfig(agentsDir) {
63
+ if (!agentsDir)
64
+ return null;
65
+ return (0, utils_1.readJson)(path_1.default.join(agentsDir, 'global.json'));
66
+ }
67
+ //# sourceMappingURL=agent-registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-registry.js","sourceRoot":"","sources":["../../src/lib/agent-registry.ts"],"names":[],"mappings":";;;;;AA2BA,0CAWC;AAGD,gCAuBC;AAGD,8BAGC;AAGD,4CAGC;AA5ED,6EAA6E;AAC7E,4CAAoB;AACpB,gDAAwB;AACxB,mCAA6C;AAC7C,mCAAuC;AAsBvC,gFAAgF;AAChF,SAAgB,eAAe;IAC7B,MAAM,UAAU,GAA2B;QACzC,OAAO,CAAC,GAAG,CAAC,aAAa;QACzB,IAAA,oBAAY,GAAE;QACd,cAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,OAAO,EAAE,QAAQ,CAAC;KAC5C,CAAC;IAEF,KAAK,MAAM,GAAG,IAAI,UAAU,EAAE,CAAC;QAC7B,IAAI,GAAG,IAAI,YAAE,CAAC,UAAU,CAAC,GAAG,CAAC;YAAE,OAAO,GAAG,CAAC;IAC5C,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED,2DAA2D;AAC3D,SAAgB,UAAU,CAAC,SAAwB;IACjD,IAAI,CAAC,SAAS,IAAI,CAAC,YAAE,CAAC,UAAU,CAAC,SAAS,CAAC;QAAE,OAAO,EAAE,CAAC;IACvD,IAAI,CAAC;QACH,OAAO,YAAE,CAAC,WAAW,CAAC,SAAS,CAAC;aAC7B,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,aAAa,CAAC;aACvD,GAAG,CAAC,CAAC,CAAC,EAAoB,EAAE;YAC3B,MAAM,IAAI,GAAG,IAAA,gBAAQ,EAAgB,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC;YAC9D,IAAI,CAAC,IAAI;gBAAE,OAAO,IAAI,CAAC;YACvB,OAAO;gBACL,EAAE,EAAE,IAAI,CAAC,EAAE,IAAI,cAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,OAAO,CAAC;gBACxC,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,SAAS;gBAC5B,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,SAAS;gBACpC,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,SAAS;gBAC9B,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,EAAE;gBACrB,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,GAAG;gBACtB,OAAO,EAAE,IAAI,CAAC,OAAO,KAAK,KAAK;aAChC,CAAC;QACJ,CAAC,CAAC;aACD,MAAM,CAAC,CAAC,CAAC,EAAkB,EAAE,CAAC,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC;IAC5D,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,IAAA,gBAAQ,EAAC,YAAY,EAAE,CAAC,CAAC,CAAC;QAC1B,OAAO,EAAE,CAAC;IACZ,CAAC;AACH,CAAC;AAED,4CAA4C;AAC5C,SAAgB,SAAS,CAAC,SAAwB,EAAE,IAAY;IAC9D,MAAM,MAAM,GAAG,UAAU,CAAC,SAAS,CAAC,CAAC;IACrC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,EAAE,KAAK,IAAI,CAAC,WAAW,EAAE,CAAC,IAAI,IAAI,CAAC;AAC/E,CAAC;AAED,yBAAyB;AACzB,SAAgB,gBAAgB,CAAC,SAAwB;IACvD,IAAI,CAAC,SAAS;QAAE,OAAO,IAAI,CAAC;IAC5B,OAAO,IAAA,gBAAQ,EAA0B,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC;AAChF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { SoulConfig } from '../types';
2
+ declare const config: SoulConfig;
3
+ export default config;
@@ -0,0 +1,3 @@
1
+ import type { SoulConfig } from '../types';
2
+ declare const defaults: SoulConfig;
3
+ export default defaults;
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ // Soul v9.0 — Default config. Zero hardcoded paths, all dynamic.
7
+ const path_1 = __importDefault(require("path"));
8
+ const defaults = {
9
+ SOUL_ROOT: path_1.default.resolve(__dirname, '..', '..'),
10
+ DATA_DIR: path_1.default.resolve(__dirname, '..', '..', 'data'),
11
+ TIMEZONE: 'Asia/Seoul',
12
+ AGENTS_DIR: null,
13
+ LANG: process.env.N2_LANG || 'en',
14
+ SEARCH: {
15
+ maxDepth: 6,
16
+ minKeywordLength: 2,
17
+ previewLength: 200,
18
+ recencyBonus: 10,
19
+ defaultMaxResults: 10,
20
+ semanticEnabled: false,
21
+ semanticWeight: 0.3,
22
+ },
23
+ FILE_TREE: {
24
+ hidePaths: ['test', '_data', '_history', 'soul/data/kv-cache'],
25
+ compactPaths: ['soul/data/projects', 'soul/data/memory'],
26
+ childLimit: 20,
27
+ },
28
+ WORK: {
29
+ sessionTtlHours: 24,
30
+ maxDecisions: 20,
31
+ },
32
+ KV_CACHE: {
33
+ enabled: true,
34
+ autoSaveOnWorkEnd: true,
35
+ autoLoadOnBoot: true,
36
+ backend: 'json',
37
+ maxSnapshotsPerProject: 50,
38
+ maxSnapshotAgeDays: 30,
39
+ compressionTarget: 1000,
40
+ snapshotDir: null,
41
+ sqliteDir: null,
42
+ tokenBudget: {
43
+ bootContext: 2000,
44
+ searchResult: 500,
45
+ progressiveLoad: true,
46
+ },
47
+ tier: {
48
+ hotDays: 7,
49
+ warmDays: 30,
50
+ },
51
+ embedding: {
52
+ enabled: false,
53
+ model: 'nomic-embed-text',
54
+ endpoint: null,
55
+ },
56
+ backup: {
57
+ enabled: false,
58
+ dir: null,
59
+ schedule: 'daily',
60
+ keepCount: 7,
61
+ incremental: true,
62
+ },
63
+ },
64
+ };
65
+ exports.default = defaults;
66
+ //# sourceMappingURL=config.default.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.default.js","sourceRoot":"","sources":["../../src/lib/config.default.ts"],"names":[],"mappings":";;;;;AAAA,iEAAiE;AACjE,gDAAwB;AAGxB,MAAM,QAAQ,GAAe;IAC3B,SAAS,EAAE,cAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,CAAC;IAC9C,QAAQ,EAAE,cAAI,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC;IACrD,QAAQ,EAAE,YAAY;IACtB,UAAU,EAAE,IAAI;IAChB,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,OAAO,IAAI,IAAI;IAEjC,MAAM,EAAE;QACN,QAAQ,EAAE,CAAC;QACX,gBAAgB,EAAE,CAAC;QACnB,aAAa,EAAE,GAAG;QAClB,YAAY,EAAE,EAAE;QAChB,iBAAiB,EAAE,EAAE;QACrB,eAAe,EAAE,KAAK;QACtB,cAAc,EAAE,GAAG;KACpB;IAED,SAAS,EAAE;QACT,SAAS,EAAE,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,oBAAoB,CAAC;QAC9D,YAAY,EAAE,CAAC,oBAAoB,EAAE,kBAAkB,CAAC;QACxD,UAAU,EAAE,EAAE;KACf;IAED,IAAI,EAAE;QACJ,eAAe,EAAE,EAAE;QACnB,YAAY,EAAE,EAAE;KACjB;IAED,QAAQ,EAAE;QACR,OAAO,EAAE,IAAI;QACb,iBAAiB,EAAE,IAAI;QACvB,cAAc,EAAE,IAAI;QACpB,OAAO,EAAE,MAAM;QACf,sBAAsB,EAAE,EAAE;QAC1B,kBAAkB,EAAE,EAAE;QACtB,iBAAiB,EAAE,IAAI;QACvB,WAAW,EAAE,IAAI;QACjB,SAAS,EAAE,IAAI;QACf,WAAW,EAAE;YACX,WAAW,EAAE,IAAI;YACjB,YAAY,EAAE,GAAG;YACjB,eAAe,EAAE,IAAI;SACtB;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,CAAC;YACV,QAAQ,EAAE,EAAE;SACb;QACD,SAAS,EAAE;YACT,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,kBAAkB;YACzB,QAAQ,EAAE,IAAI;SACf;QACD,MAAM,EAAE;YACN,OAAO,EAAE,KAAK;YACd,GAAG,EAAE,IAAI;YACT,QAAQ,EAAE,OAAO;YACjB,SAAS,EAAE,CAAC;YACZ,WAAW,EAAE,IAAI;SAClB;KACF;CACF,CAAC;AAEF,kBAAe,QAAQ,CAAC"}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const config_default_1 = __importDefault(require("./config.default"));
7
+ let local = {};
8
+ try {
9
+ // NOTE: require() intentionally kept — config.local.js is a runtime-optional CJS file
10
+ // that may or may not exist. Static import cannot handle optional modules gracefully.
11
+ local = require('./config.local.js');
12
+ }
13
+ catch (e) {
14
+ const err = e;
15
+ if (err.code !== 'MODULE_NOT_FOUND')
16
+ throw e;
17
+ }
18
+ /** Deep merge: local overrides default, nested objects are merged (not replaced) */
19
+ function deepMerge(base, override) {
20
+ const result = { ...base };
21
+ for (const key of Object.keys(override)) {
22
+ const ov = override[key];
23
+ const bv = base[key];
24
+ if (ov && typeof ov === 'object' && !Array.isArray(ov) &&
25
+ bv && typeof bv === 'object' && !Array.isArray(bv)) {
26
+ result[key] = deepMerge(bv, ov);
27
+ }
28
+ else {
29
+ result[key] = ov;
30
+ }
31
+ }
32
+ return result;
33
+ }
34
+ const config = deepMerge(config_default_1.default, local);
35
+ exports.default = config;
36
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":";;;;;AAEA,sEAAwC;AAMxC,IAAI,KAAK,GAA4B,EAAE,CAAC;AACxC,IAAI,CAAC;IACH,sFAAsF;IACtF,sFAAsF;IACtF,KAAK,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAAC;AACvC,CAAC;AAAC,OAAO,CAAU,EAAE,CAAC;IACpB,MAAM,GAAG,GAAG,CAA0B,CAAC;IACvC,IAAI,GAAG,CAAC,IAAI,KAAK,kBAAkB;QAAE,MAAM,CAAC,CAAC;AAC/C,CAAC;AAED,oFAAoF;AACpF,SAAS,SAAS,CAChB,IAAO,EACP,QAAwB;IAExB,MAAM,MAAM,GAAG,EAAE,GAAG,IAAI,EAA6B,CAAC;IACtD,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC;QACxC,MAAM,EAAE,GAAG,QAAQ,CAAC,GAA4B,CAAC,CAAC;QAClD,MAAM,EAAE,GAAG,IAAI,CAAC,GAAc,CAAC,CAAC;QAChC,IACE,EAAE,IAAI,OAAO,EAAE,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;YAClD,EAAE,IAAI,OAAO,EAAE,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC,EAClD,CAAC;YACD,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS,CACrB,EAA6B,EAC7B,EAA0C,CAC3C,CAAC;QACJ,CAAC;aAAM,CAAC;YACN,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC;QACnB,CAAC;IACH,CAAC;IACD,OAAO,MAAW,CAAC;AACrB,CAAC;AAED,MAAM,MAAM,GAAe,SAAS,CAClC,wBAA8C,EAC9C,KAAwD,CAChC,CAAC;AAE3B,kBAAe,MAAM,CAAC"}
@@ -0,0 +1,15 @@
1
+ interface SessionContext {
2
+ agentName: string | null;
3
+ kvChain: Record<string, string>;
4
+ }
5
+ /** Get current session context */
6
+ export declare function getContext(): SessionContext;
7
+ /** Set agent name (called during n2_boot) */
8
+ export declare function setAgentName(name: string): void;
9
+ /** Get agent name with fallback */
10
+ export declare function getAgentName(): string;
11
+ /** Set KV chain parent (for session linking) */
12
+ export declare function setKvChainParent(project: string, sessionId: string): void;
13
+ /** Get and consume KV chain parent */
14
+ export declare function popKvChainParent(project: string): string | null;
15
+ export {};
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ // Soul v9.0 — Session context manager. Replaces global state anti-pattern.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.getContext = getContext;
5
+ exports.setAgentName = setAgentName;
6
+ exports.getAgentName = getAgentName;
7
+ exports.setKvChainParent = setKvChainParent;
8
+ exports.popKvChainParent = popKvChainParent;
9
+ const _ctx = {
10
+ agentName: null,
11
+ kvChain: {},
12
+ };
13
+ /** Get current session context */
14
+ function getContext() {
15
+ return _ctx;
16
+ }
17
+ /** Set agent name (called during n2_boot) */
18
+ function setAgentName(name) {
19
+ _ctx.agentName = name;
20
+ }
21
+ /** Get agent name with fallback */
22
+ function getAgentName() {
23
+ return _ctx.agentName || process.env.N2_AGENT_NAME || 'default';
24
+ }
25
+ /** Set KV chain parent (for session linking) */
26
+ function setKvChainParent(project, sessionId) {
27
+ _ctx.kvChain[project] = sessionId;
28
+ }
29
+ /** Get and consume KV chain parent */
30
+ function popKvChainParent(project) {
31
+ const parent = _ctx.kvChain[project] || null;
32
+ delete _ctx.kvChain[project];
33
+ return parent;
34
+ }
35
+ //# sourceMappingURL=context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"context.js","sourceRoot":"","sources":["../../src/lib/context.ts"],"names":[],"mappings":";AAAA,2EAA2E;;AAa3E,gCAEC;AAGD,oCAEC;AAGD,oCAEC;AAGD,4CAEC;AAGD,4CAIC;AA9BD,MAAM,IAAI,GAAmB;IAC3B,SAAS,EAAE,IAAI;IACf,OAAO,EAAE,EAAE;CACZ,CAAC;AAEF,kCAAkC;AAClC,SAAgB,UAAU;IACxB,OAAO,IAAI,CAAC;AACd,CAAC;AAED,6CAA6C;AAC7C,SAAgB,YAAY,CAAC,IAAY;IACvC,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;AACxB,CAAC;AAED,mCAAmC;AACnC,SAAgB,YAAY;IAC1B,OAAO,IAAI,CAAC,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,SAAS,CAAC;AAClE,CAAC;AAED,gDAAgD;AAChD,SAAgB,gBAAgB,CAAC,OAAe,EAAE,SAAiB;IACjE,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC;AACpC,CAAC;AAED,sCAAsC;AACtC,SAAgB,gBAAgB,CAAC,OAAe;IAC9C,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,IAAI,CAAC;IAC7C,OAAO,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC7B,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -0,0 +1,34 @@
1
+ interface CoreMemoryFile {
2
+ agent: string;
3
+ memory: Record<string, string>;
4
+ updatedAt: string;
5
+ }
6
+ /**
7
+ * CoreMemory — Agent-specific always-loaded memory.
8
+ * Automatically included in context at boot.
9
+ * Data path: data/memory/core-memory/{agent}.json
10
+ */
11
+ export declare class CoreMemory {
12
+ private readonly dir;
13
+ private _cache;
14
+ constructor(dataDir: string);
15
+ /** Agent core memory file path */
16
+ private _filePath;
17
+ /** Load agent core memory */
18
+ read(agentName: string): CoreMemoryFile;
19
+ /** Write key-value to core memory */
20
+ write(agentName: string, key: string, value: string): {
21
+ action: string;
22
+ };
23
+ /** Remove key from core memory */
24
+ remove(agentName: string, key: string): boolean;
25
+ /** List all keys for an agent */
26
+ keys(agentName: string): string[];
27
+ /** Generate prompt text for boot injection */
28
+ toPrompt(agentName: string, maxTokens?: number): string;
29
+ /** Summary of all agents' core memories */
30
+ toContextAll(): string;
31
+ /** Invalidate cache */
32
+ invalidateCache(): void;
33
+ }
34
+ export {};