centient 2.25.1 → 3.1.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 (133) hide show
  1. package/CHANGELOG.md +130 -0
  2. package/README.md +68 -38
  3. package/dist/cli.d.ts +6 -1
  4. package/dist/cli.d.ts.map +1 -1
  5. package/dist/cli.js +109 -48
  6. package/dist/cli.js.map +1 -1
  7. package/dist/commands.d.ts +8 -0
  8. package/dist/commands.d.ts.map +1 -1
  9. package/dist/commands.js +138 -34
  10. package/dist/commands.js.map +1 -1
  11. package/dist/index.js +12 -2
  12. package/dist/index.js.map +1 -1
  13. package/dist/postinstall.d.ts +3 -0
  14. package/dist/postinstall.d.ts.map +1 -0
  15. package/dist/postinstall.js +96 -0
  16. package/dist/postinstall.js.map +1 -0
  17. package/dist/server.d.ts.map +1 -1
  18. package/dist/server.js +25 -2
  19. package/dist/server.js.map +1 -1
  20. package/dist/tools/channels/channelCreate.d.ts +9 -0
  21. package/dist/tools/channels/channelCreate.d.ts.map +1 -0
  22. package/dist/tools/channels/channelCreate.js +109 -0
  23. package/dist/tools/channels/channelCreate.js.map +1 -0
  24. package/dist/tools/channels/channelDelete.d.ts +9 -0
  25. package/dist/tools/channels/channelDelete.d.ts.map +1 -0
  26. package/dist/tools/channels/channelDelete.js +87 -0
  27. package/dist/tools/channels/channelDelete.js.map +1 -0
  28. package/dist/tools/channels/channelList.d.ts +9 -0
  29. package/dist/tools/channels/channelList.d.ts.map +1 -0
  30. package/dist/tools/channels/channelList.js +85 -0
  31. package/dist/tools/channels/channelList.js.map +1 -0
  32. package/dist/tools/channels/channelMessage.d.ts +9 -0
  33. package/dist/tools/channels/channelMessage.d.ts.map +1 -0
  34. package/dist/tools/channels/channelMessage.js +121 -0
  35. package/dist/tools/channels/channelMessage.js.map +1 -0
  36. package/dist/tools/channels/channelRead.d.ts +9 -0
  37. package/dist/tools/channels/channelRead.d.ts.map +1 -0
  38. package/dist/tools/channels/channelRead.js +113 -0
  39. package/dist/tools/channels/channelRead.js.map +1 -0
  40. package/dist/tools/channels/index.d.ts +11 -0
  41. package/dist/tools/channels/index.d.ts.map +1 -0
  42. package/dist/tools/channels/index.js +11 -0
  43. package/dist/tools/channels/index.js.map +1 -0
  44. package/dist/tools/consultation/consultLlmStream.d.ts.map +1 -1
  45. package/dist/tools/consultation/consultLlmStream.js.map +1 -1
  46. package/dist/tools/consultation/seekConsensus.d.ts.map +1 -1
  47. package/dist/tools/consultation/seekConsensus.js +5 -1
  48. package/dist/tools/consultation/seekConsensus.js.map +1 -1
  49. package/dist/tools/knowledge/index.d.ts +3 -3
  50. package/dist/tools/knowledge/index.d.ts.map +1 -1
  51. package/dist/tools/knowledge/index.js +3 -3
  52. package/dist/tools/knowledge/index.js.map +1 -1
  53. package/dist/tools/knowledge/promoteDecision.d.ts.map +1 -1
  54. package/dist/tools/knowledge/promoteDecision.js +12 -2
  55. package/dist/tools/knowledge/promoteDecision.js.map +1 -1
  56. package/dist/tools/knowledge/promoteLearning.d.ts.map +1 -1
  57. package/dist/tools/knowledge/promoteLearning.js +5 -1
  58. package/dist/tools/knowledge/promoteLearning.js.map +1 -1
  59. package/dist/tools/memory-bank/pushToMemoryBank.js.map +1 -1
  60. package/dist/tools/trails/executeTrailScript.d.ts.map +1 -1
  61. package/dist/tools/trails/executeTrailScript.js +8 -8
  62. package/dist/tools/trails/executeTrailScript.js.map +1 -1
  63. package/dist/tools/trails/index.d.ts +6 -6
  64. package/dist/tools/trails/index.d.ts.map +1 -1
  65. package/dist/tools/trails/index.js +6 -6
  66. package/dist/tools/trails/index.js.map +1 -1
  67. package/dist/tools/trails/trailDiscoverAuto.d.ts.map +1 -1
  68. package/dist/tools/trails/trailDiscoverAuto.js +9 -9
  69. package/dist/tools/trails/trailDiscoverAuto.js.map +1 -1
  70. package/dist/tools/trails/trailDiscoverConvergence.d.ts.map +1 -1
  71. package/dist/tools/trails/trailDiscoverConvergence.js +8 -8
  72. package/dist/tools/trails/trailDiscoverConvergence.js.map +1 -1
  73. package/dist/tools/trails/trailDiscoverInfluence.d.ts.map +1 -1
  74. package/dist/tools/trails/trailDiscoverInfluence.js +12 -10
  75. package/dist/tools/trails/trailDiscoverInfluence.js.map +1 -1
  76. package/dist/tools/trails/trailList.d.ts.map +1 -1
  77. package/dist/tools/trails/trailList.js +15 -10
  78. package/dist/tools/trails/trailList.js.map +1 -1
  79. package/dist/tools/trails/trailQueryByTopic.d.ts.map +1 -1
  80. package/dist/tools/trails/trailQueryByTopic.js +9 -6
  81. package/dist/tools/trails/trailQueryByTopic.js.map +1 -1
  82. package/dist/tools/trails/trailQueryIntersect.d.ts.map +1 -1
  83. package/dist/tools/trails/trailQueryIntersect.js +7 -7
  84. package/dist/tools/trails/trailQueryIntersect.js.map +1 -1
  85. package/dist/tools/trails/trailQueryTopics.d.ts.map +1 -1
  86. package/dist/tools/trails/trailQueryTopics.js +9 -8
  87. package/dist/tools/trails/trailQueryTopics.js.map +1 -1
  88. package/dist/tools/trails/trailView.d.ts.map +1 -1
  89. package/dist/tools/trails/trailView.js +12 -10
  90. package/dist/tools/trails/trailView.js.map +1 -1
  91. package/dist/utils/AuditLogger.d.ts.map +1 -1
  92. package/dist/utils/AuditLogger.js +13 -5
  93. package/dist/utils/AuditLogger.js.map +1 -1
  94. package/dist/utils/ChannelCoordinator.d.ts +70 -0
  95. package/dist/utils/ChannelCoordinator.d.ts.map +1 -0
  96. package/dist/utils/ChannelCoordinator.js +497 -0
  97. package/dist/utils/ChannelCoordinator.js.map +1 -0
  98. package/dist/utils/GeminiEmbeddingService.d.ts.map +1 -1
  99. package/dist/utils/GeminiEmbeddingService.js.map +1 -1
  100. package/dist/utils/InstanceRegistry.d.ts.map +1 -1
  101. package/dist/utils/InstanceRegistry.js +4 -4
  102. package/dist/utils/InstanceRegistry.js.map +1 -1
  103. package/dist/utils/MetaKnowledgeManager.d.ts.map +1 -1
  104. package/dist/utils/MetaKnowledgeManager.js +5 -1
  105. package/dist/utils/MetaKnowledgeManager.js.map +1 -1
  106. package/dist/utils/PatternIndexer.d.ts.map +1 -1
  107. package/dist/utils/PatternIndexer.js +2 -1
  108. package/dist/utils/PatternIndexer.js.map +1 -1
  109. package/dist/utils/SessionCoordinator.d.ts.map +1 -1
  110. package/dist/utils/SessionCoordinator.js.map +1 -1
  111. package/dist/utils/VertexSync.d.ts.map +1 -1
  112. package/dist/utils/VertexSync.js.map +1 -1
  113. package/dist/utils/channelSchema.d.ts +170 -0
  114. package/dist/utils/channelSchema.d.ts.map +1 -0
  115. package/dist/utils/channelSchema.js +20 -0
  116. package/dist/utils/channelSchema.js.map +1 -0
  117. package/dist/utils/config.d.ts.map +1 -1
  118. package/dist/utils/config.js +19 -9
  119. package/dist/utils/config.js.map +1 -1
  120. package/dist/utils/rlvr/RewardHistoryStore.js +1 -1
  121. package/dist/utils/rlvr/RewardHistoryStore.js.map +1 -1
  122. package/package.json +5 -4
  123. package/templates/claude/commands/check-duplicate.md +2 -1
  124. package/templates/claude/commands/checkpoint.md +2 -1
  125. package/templates/claude/commands/constraint.md +10 -7
  126. package/templates/claude/commands/finalize.md +2 -1
  127. package/templates/claude/commands/history.md +10 -7
  128. package/templates/claude/commands/note.md +9 -9
  129. package/templates/claude/commands/patterns.md +1 -1
  130. package/templates/claude/commands/promote.md +5 -1
  131. package/templates/claude/commands/recall.md +1 -1
  132. package/templates/claude/commands/session-start.md +2 -1
  133. package/templates/claude/commands/session-status.md +1 -1
package/CHANGELOG.md CHANGED
@@ -5,6 +5,129 @@ All notable changes to the MCP Server for Context Engineering.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [3.1.0] - 2026-01-12
9
+
10
+ ### Added
11
+
12
+ - **Automatic Global Installation** - Slash commands install automatically on npm install
13
+ - `npm postinstall` script installs 11 commands to `~/.claude/commands/`
14
+ - Works for both fresh installs and upgrades
15
+ - Version comparison ensures outdated commands are updated
16
+ - Customized commands (no version header) are never overwritten
17
+ - Silent on no-op, logs only when changes made
18
+
19
+ - **Manual Global Setup** - New CLI command for explicit control
20
+ - `centient setup-global` - Install/update global commands
21
+ - `centient setup-global --force` - Force reinstall all commands
22
+ - `centient setup-global --remove` - Remove centient commands from global location
23
+
24
+ ### Changed
25
+
26
+ - **Zero-Config Experience** - No more `centient init` required per project
27
+ - After `npm install -g centient`, all 11 slash commands work everywhere
28
+ - Project-local commands (`.claude/commands/`) still override global
29
+ - `centient init` now only needed for project-specific customization
30
+
31
+ - **Test Suite** - 1,422 tests (+17 new tests for setup-global CLI parsing and postinstall logic)
32
+
33
+ ### Documentation
34
+
35
+ - Added "Automatic Global Installation" section to README.md
36
+ - Updated CLI Commands documentation with setup-global command
37
+ - All template versions bumped to 3.1.0
38
+
39
+ ## [3.0.0] - 2026-01-12
40
+
41
+ ### Changed
42
+
43
+ - **MCP SDK Upgrade** - Major version upgrade from 0.5.0 to 1.25.2
44
+ - Breaking: MCP protocol compatibility updated to latest spec
45
+ - Enables latest MCP features and improvements
46
+
47
+ - **Vitest Upgrade** - Major version upgrade from 1.6.1 to 4.0.17
48
+ - Breaking: `poolOptions` config moved to top-level options
49
+ - Breaking: Constructor mocks require `function`/`class`, not arrow functions
50
+ - Resolves all security vulnerabilities in esbuild/vite chain
51
+
52
+ - **Qdrant Client Upgrade** - 1.15.1 to 1.16.2
53
+ - API change: `vectors_count` renamed to `indexed_vectors_count`
54
+
55
+ ### Updated Dependencies
56
+
57
+ | Package | Before | After |
58
+ |---------|--------|-------|
59
+ | `@modelcontextprotocol/sdk` | 0.5.0 | 1.25.2 |
60
+ | `@google/genai` | 1.29.0 | 1.35.0 |
61
+ | `vitest` | 1.6.1 | 4.0.17 |
62
+ | `@vitest/coverage-v8` | 1.6.1 | 4.0.17 |
63
+ | `@qdrant/js-client-rest` | 1.15.1 | 1.16.2 |
64
+ | `tsx` | 4.20.6 | 4.21.0 |
65
+
66
+ ### Security
67
+
68
+ - Resolved 5 moderate severity vulnerabilities (esbuild ≤0.24.2)
69
+ - Zero vulnerabilities in dependency tree
70
+
71
+ ## [2.25.1] - 2026-01-12
72
+
73
+ ### Fixed
74
+
75
+ - **NPM Package** - Include `templates` directory in package files
76
+ - Templates were missing from v2.25.0 causing `centient init` to fail
77
+ - Added `templates` to the `files` array in package.json
78
+
79
+ ## [2.25.0] - 2026-01-12
80
+
81
+ ### Added
82
+
83
+ - **CLI Scaffolding Commands** - Project initialization and maintenance
84
+ - `centient init` - Scaffold `.claude/` directory with slash command templates
85
+ - `centient check-commands` - Show status of installed commands (missing/outdated/current/customized)
86
+ - `centient update-commands` - Update outdated commands with version comparison
87
+ - `centient update-commands --dry-run` - Preview updates without modifying files
88
+
89
+ - **Slash Command Templates** (11 commands)
90
+ - `/session-start` - Initialize session memory with Qdrant coordination
91
+ - `/checkpoint` - Save progress checkpoint with session notes
92
+ - `/finalize` - End session and create finalization artifacts
93
+ - `/note` - Add decision/hypothesis/blocker/learning/finding to session
94
+ - `/recall` - Recall context from session memory or Memory Bank
95
+ - `/patterns` - Search pattern library for reusable solutions
96
+ - `/check-duplicate` - Check for duplicate work before starting
97
+ - `/constraint` - Track and enforce session constraints
98
+ - `/history` - Query session history and temporal graph
99
+ - `/promote` - Promote learnings to cross-project meta-knowledge
100
+ - `/session-status` - Show current session status and statistics
101
+
102
+ - **Version Tracking** - YAML frontmatter with `centient-version` header
103
+ - Enables automatic outdated detection via semver comparison
104
+ - Four-state model: missing, outdated, current, customized
105
+
106
+ ### Changed
107
+
108
+ - **Test Suite** - 1,382 tests (42 new tests for CLI scaffolding)
109
+ - `tests/commands.test.ts` - 32 tests for version extraction and comparison
110
+ - `tests/cli.test.ts` - 10 tests for init/check-commands/update-commands parsing
111
+
112
+ ### Documentation
113
+
114
+ - Added `docs/CLI_SCAFFOLDING_ARCHITECTURE.md` - 362-line architecture deep-dive
115
+ - Updated README.md with CLI Commands section
116
+ - Extracted CLI Scaffolding Pattern to shared pattern library
117
+
118
+ ## [2.24.0] - 2026-01-12
119
+
120
+ ### Added
121
+
122
+ - **Vertex AI Memory Bank Sync** - Automatic sync on promote
123
+ - `promote_learning` and `promote_decision` now sync to Vertex AI Memory Bank
124
+ - Added `--json` flag for machine-readable output from Python sync script
125
+ - Configured via `metaKnowledge.vertex.syncOnPromote` in config
126
+
127
+ ### Changed
128
+
129
+ - **push_to_memory_bank** - Added `--json` flag for machine-readable Python output
130
+
8
131
  ## [2.23.0] - 2026-01-11
9
132
 
10
133
  ### Changed
@@ -442,6 +565,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
442
565
 
443
566
  ---
444
567
 
568
+ [3.1.0]: https://github.com/Szermer/centient/compare/v3.0.0...v3.1.0
569
+ [3.0.0]: https://github.com/Szermer/centient/compare/v2.25.1...v3.0.0
570
+ [2.25.1]: https://github.com/Szermer/centient/compare/v2.25.0...v2.25.1
571
+ [2.25.0]: https://github.com/Szermer/centient/compare/v2.24.0...v2.25.0
572
+ [2.24.0]: https://github.com/Szermer/centient/compare/v2.23.0...v2.24.0
573
+ [2.23.0]: https://github.com/Szermer/centient/compare/v2.22.0...v2.23.0
574
+ [2.22.0]: https://github.com/Szermer/centient/compare/v2.21.0...v2.22.0
445
575
  [2.21.0]: https://github.com/Szermer/centient/compare/v2.20.0...v2.21.0
446
576
  [2.20.0]: https://github.com/Szermer/centient/compare/v2.19.0...v2.20.0
447
577
  [2.19.0]: https://github.com/Szermer/centient/compare/v2.14.0...v2.19.0
package/README.md CHANGED
@@ -1,9 +1,9 @@
1
1
  # Centient
2
2
 
3
- **Version:** 2.24.0
3
+ **Version:** 3.1.0
4
4
  **Status:** Production Ready
5
- **Tools:** 93 across 16 modules
6
- **Tests:** 1343 passing
5
+ **Tools:** 98 across 17 modules
6
+ **Tests:** 1405 passing
7
7
 
8
8
  Centient is an MCP server that exposes context engineering operations as executable tools, enabling progressive skill loading and achieving **98.7% token reduction** through intelligent context management.
9
9
 
@@ -93,12 +93,12 @@ For full functionality, add environment variables to your config:
93
93
 
94
94
  ### Environment Variables
95
95
 
96
- | Variable | Required | Description |
97
- | -------------------- | ------------------- | -------------------------------------------------- |
98
- | `OPENROUTER_API_KEY` | Consultation module | OpenRouter for LLM completions (unified billing) |
99
- | `QDRANT_URL` | Session module | Qdrant Cloud URL |
100
- | `QDRANT_API_KEY` | Session module | Qdrant API key |
101
- | `GEMINI_API_KEY` | Session + Search | Gemini for embeddings and File Search |
96
+ | Variable | Required | Description |
97
+ | -------------------- | ------------------- | ------------------------------------------------ |
98
+ | `OPENROUTER_API_KEY` | Consultation module | OpenRouter for LLM completions (unified billing) |
99
+ | `QDRANT_URL` | Session module | Qdrant Cloud URL |
100
+ | `QDRANT_API_KEY` | Session module | Qdrant API key |
101
+ | `GEMINI_API_KEY` | Session + Search | Gemini for embeddings and File Search |
102
102
 
103
103
  **API Key Usage:**
104
104
 
@@ -109,26 +109,37 @@ For full functionality, add environment variables to your config:
109
109
 
110
110
  ## CLI Commands
111
111
 
112
- Centient provides CLI commands for project scaffolding and diagnostics.
112
+ Centient provides CLI commands for slash command management and diagnostics.
113
113
 
114
- ### Project Scaffolding
114
+ ### Automatic Global Installation (v3.1.0+)
115
115
 
116
- Initialize and maintain slash commands in your project:
116
+ **Slash commands are automatically installed when you install centient:**
117
117
 
118
118
  ```bash
119
- # Initialize .claude/ directory with command templates
120
- centient init
119
+ npm install -g centient
120
+ # → Automatically installs 11 slash commands to ~/.claude/commands/
121
+ # → Commands are now available in ALL projects
122
+ ```
121
123
 
122
- # Force overwrite existing files
123
- centient init --force
124
+ On upgrade, outdated commands are automatically updated while preserving your customizations.
124
125
 
125
- # Check status of installed commands
126
- centient check-commands
126
+ ### Manual Command Management
127
127
 
128
- # Update outdated commands (preserves customizations)
129
- centient update-commands
128
+ ```bash
129
+ # Check global command status
130
+ centient setup-global # Install/update global commands
131
+ centient setup-global --force # Force reinstall all
132
+ centient setup-global --remove # Remove centient commands (preserves custom)
133
+
134
+ # Project-local commands (optional, overrides global)
135
+ centient init # Initialize .claude/ directory with commands
136
+ centient init --force # Force overwrite existing files
137
+ centient check-commands # Check status of installed commands
138
+ centient update-commands # Update outdated commands
130
139
  ```
131
140
 
141
+ **Command precedence:** Project-local (`.claude/commands/`) overrides global (`~/.claude/commands/`)
142
+
132
143
  **Command Status:**
133
144
  | Status | Description |
134
145
  |--------|-------------|
@@ -137,23 +148,29 @@ centient update-commands
137
148
  | Outdated | Installed version lower than template |
138
149
  | Customized | No version header (user modified) |
139
150
 
140
- **What `centient init` creates:**
151
+ **Global commands installed automatically** (in `~/.claude/commands/`):
152
+
153
+ | Command | Description |
154
+ |---------|-------------|
155
+ | `/session-start` | Initialize session memory |
156
+ | `/note` | Add decision/hypothesis/blocker |
157
+ | `/checkpoint` | Save progress checkpoint |
158
+ | `/finalize` | End session, create artifacts |
159
+ | `/promote` | Promote to cross-project knowledge |
160
+ | `/patterns` | Search pattern library |
161
+ | `/recall` | Recall from memory |
162
+ | `/check-duplicate` | Detect duplicate work |
163
+ | `/constraint` | Manage constraints |
164
+ | `/history` | Browse session history |
165
+ | `/session-status` | Show session state |
166
+
167
+ **Optional project-local structure** (via `centient init`):
168
+
141
169
  ```
142
170
  .claude/
143
- ├── commands/
144
- ├── session-start.md # Initialize session memory
145
- │ ├── note.md # Add decision/hypothesis/blocker
146
- │ ├── checkpoint.md # Save progress checkpoint
147
- │ ├── finalize.md # End session, create artifacts
148
- │ ├── promote.md # Promote to cross-project knowledge
149
- │ ├── patterns.md # Search pattern library
150
- │ ├── recall.md # Recall from memory
151
- │ ├── check-duplicate.md # Detect duplicate work
152
- │ ├── constraint.md # Manage constraints
153
- │ ├── history.md # Browse session history
154
- │ └── session-status.md # Show session state
155
- ├── hooks/ # (if templates exist)
156
- └── settings.json # (if template exists)
171
+ ├── commands/ # Project-specific command overrides
172
+ ├── hooks/ # Git hooks (if templates exist)
173
+ └── settings.json # Project settings
157
174
  ```
158
175
 
159
176
  ### Diagnostics
@@ -165,7 +182,7 @@ centient --version
165
182
  # Show help
166
183
  centient --help
167
184
 
168
- # List all 93 MCP tools
185
+ # List all 98 MCP tools
169
186
  centient --list-tools
170
187
 
171
188
  # Run health check (validates API connections)
@@ -185,7 +202,7 @@ centient --monitor --follow # Live tail mode
185
202
 
186
203
  ## Architecture
187
204
 
188
- ### 16 Modules, 93 Tools
205
+ ### 17 Modules, 98 Tools
189
206
 
190
207
  | Module | Tools | Purpose |
191
208
  | ------------------------------------ | ----- | ------------------------------------------------------- |
@@ -204,6 +221,7 @@ centient --monitor --follow # Live tail mode
204
221
  | [Branching](#branching-module) | 6 | Session branching and decision trees |
205
222
  | [Knowledge](#knowledge-module) | 3 | Cross-project meta-knowledge |
206
223
  | [Trails](#trails-module) | 8 | DevLex syntopic trail discovery |
224
+ | [Channels](#channels-module) | 5 | Channel-based agent communication |
207
225
  | [RLVR](#rlvr-module) | 1 | Reinforcement learning verification |
208
226
 
209
227
  ### Patterns Module (13 tools)
@@ -392,6 +410,16 @@ DevLex syntopic trail discovery for knowledge exploration:
392
410
  - `trail_list` - List existing trails
393
411
  - `trail_view` - View trail details
394
412
 
413
+ ### Channels Module (5 tools)
414
+
415
+ Channel-based agent communication for multi-agent coordination:
416
+
417
+ - `channel_create` - Create a new channel for agent communication
418
+ - `channel_message` - Post message with threading, @mentions, task linking
419
+ - `channel_read` - Read messages with filtering (unread, mentions, time)
420
+ - `channel_list` - List all channels with optional unread counts
421
+ - `channel_delete` - Delete a channel and all its messages
422
+
395
423
  ### RLVR Module (1 tool)
396
424
 
397
425
  Reinforcement learning verification:
@@ -492,7 +520,7 @@ npm run lint # Type checking
492
520
  ```
493
521
  src/
494
522
  ├── index.ts # Entry point (stdio transport)
495
- ├── server.ts # MCP server config (93 tools)
523
+ ├── server.ts # MCP server config (98 tools)
496
524
  ├── tools/
497
525
  │ ├── patterns/ # Progressive skill loading (13 tools)
498
526
  │ ├── artifacts/ # Historical knowledge (5 tools)
@@ -509,11 +537,13 @@ src/
509
537
  │ ├── branching/ # Session branching (6 tools)
510
538
  │ ├── knowledge/ # Cross-project meta-knowledge (3 tools)
511
539
  │ ├── trails/ # DevLex syntopic discovery (8 tools)
540
+ │ ├── channels/ # Agent communication (5 tools)
512
541
  │ └── rlvr/ # RLVR verification (1 tool)
513
542
  └── utils/
514
543
  ├── SessionCoordinator.ts # Qdrant session management
515
544
  ├── ResearchCoordinator.ts # Research session management
516
545
  ├── MetaKnowledgeManager.ts # Cross-project meta-knowledge
546
+ ├── ChannelCoordinator.ts # Agent communication channels
517
547
  └── tokenEstimator.ts # Token usage tracking
518
548
  ```
519
549
 
package/dist/cli.d.ts CHANGED
@@ -28,11 +28,16 @@ export interface UpdateOptions {
28
28
  force: boolean;
29
29
  dryRun: boolean;
30
30
  }
31
+ export interface SetupGlobalOptions {
32
+ force: boolean;
33
+ remove: boolean;
34
+ }
31
35
  export declare function parseArgs(args: string[]): {
32
- action: "server" | "version" | "help" | "list-tools" | "health" | "config" | "monitor" | "log" | "stats" | "init" | "check-commands" | "update-commands";
36
+ action: "server" | "version" | "help" | "list-tools" | "health" | "config" | "monitor" | "log" | "stats" | "init" | "setup-global" | "check-commands" | "update-commands";
33
37
  monitorOptions?: MonitorOptions;
34
38
  logOptions?: LogOptions;
35
39
  initOptions?: InitOptions;
40
+ setupGlobalOptions?: SetupGlobalOptions;
36
41
  updateOptions?: UpdateOptions;
37
42
  };
38
43
  //# sourceMappingURL=cli.d.ts.map
package/dist/cli.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAgC1D,wBAAgB,YAAY,IAAI,IAAI,CAEnC;AAKD,wBAAgB,SAAS,IAAI,IAAI,CAgDhC;AAKD,wBAAgB,UAAU,CAAC,KAAK,EAAE,IAAI,EAAE,GAAG,IAAI,CAoF9C;AAKD,wBAAsB,WAAW,IAAI,OAAO,CAAC,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ACR,QAAQ,GACR,SAAS,GACT,KAAK,GACL,OAAO,GACP,MAAM,GACN,cAAc,GACd,gBAAgB,GAChB,iBAAiB,CAAC;IACtB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,aAAa,CAAC,EAAE,aAAa,CAAC;CAC/B,CAyJA"}
package/dist/cli.js CHANGED
@@ -5,7 +5,7 @@ import { homedir } from "os";
5
5
  import { createReadStream } from "fs";
6
6
  import { createInterface } from "readline";
7
7
  import { listInstances, getAggregatedStats, formatUptime, isHeartbeatStale, } from "./utils/InstanceRegistry.js";
8
- import { getAuditLogPath as getConfigAuditLogPath, getMetaKnowledgeConfig } from "./utils/config.js";
8
+ import { getAuditLogPath as getConfigAuditLogPath, getMetaKnowledgeConfig, } from "./utils/config.js";
9
9
  import { getSharedPatternsPath } from "./utils/filesystem.js";
10
10
  const __dirname = dirname(fileURLToPath(import.meta.url));
11
11
  function getVersion() {
@@ -28,7 +28,8 @@ export function printHelp() {
28
28
  Usage: centient [command] [options]
29
29
 
30
30
  Commands:
31
- init Initialize .claude/ directory with commands
31
+ init Initialize .claude/ directory with commands (project-local)
32
+ setup-global Install commands to ~/.claude/commands/ (global)
32
33
  check-commands Show missing/outdated commands
33
34
  update-commands Update outdated commands
34
35
 
@@ -39,8 +40,9 @@ Options:
39
40
  --health Run health check and exit
40
41
  --config Show current configuration
41
42
  --stats Show usage statistics and exit
42
- --force Force overwrite (for init/update-commands)
43
+ --force Force overwrite (for init/update-commands/setup-global)
43
44
  --dry-run Show what would be updated without making changes
45
+ --remove Remove global commands (for setup-global)
44
46
 
45
47
  Instance Monitoring (like ps):
46
48
  --monitor List all running centient instances
@@ -58,8 +60,11 @@ Audit Log (per-project):
58
60
  Running without arguments starts the MCP server (stdio transport).
59
61
 
60
62
  Examples:
61
- centient init # Initialize project with commands
63
+ centient init # Initialize project with commands (local)
62
64
  centient init --force # Overwrite existing commands
65
+ centient setup-global # Install commands globally (~/.claude/commands/)
66
+ centient setup-global --force # Force reinstall global commands
67
+ centient setup-global --remove # Remove global centient commands
63
68
  centient check-commands # Check command status
64
69
  centient update-commands # Update outdated commands
65
70
  centient update-commands --dry-run # Preview what would be updated
@@ -77,28 +82,50 @@ export function printTools(tools) {
77
82
  for (const tool of tools) {
78
83
  let module = "other";
79
84
  const name = tool.name;
80
- if (name.includes("Pattern") || name.includes("Skill") || name === "findPatterns") {
85
+ if (name.includes("Pattern") ||
86
+ name.includes("Skill") ||
87
+ name === "findPatterns") {
81
88
  module = "patterns";
82
89
  }
83
- else if (name.includes("Artifact") || (name.includes("Session") && name.includes("load"))) {
90
+ else if (name.includes("Artifact") ||
91
+ (name.includes("Session") && name.includes("load"))) {
84
92
  module = "artifacts";
85
93
  }
86
- else if (name.includes("Note") || name === "getDecisions" || name === "getHypotheses") {
94
+ else if (name.includes("Note") ||
95
+ name === "getDecisions" ||
96
+ name === "getHypotheses") {
87
97
  module = "memory";
88
98
  }
89
- else if (name.includes("Compression") || name.includes("Reuse") || name.includes("Cost") || name.includes("Analytics") || name.includes("Audit")) {
99
+ else if (name.includes("Compression") ||
100
+ name.includes("Reuse") ||
101
+ name.includes("Cost") ||
102
+ name.includes("Analytics") ||
103
+ name.includes("Audit")) {
90
104
  module = "metrics";
91
105
  }
92
- else if (name.includes("semantic") || (name.includes("index") && name.includes("Session")) || name.includes("SearchStats")) {
106
+ else if (name.includes("semantic") ||
107
+ (name.includes("index") && name.includes("Session")) ||
108
+ name.includes("SearchStats")) {
93
109
  module = "search";
94
110
  }
95
- else if (name.includes("session") || name.includes("Session") || name.includes("Constraint") || name.includes("Claim") || name.includes("Citation") || name.includes("Verification") || name.includes("Feasibility") || name.includes("Duplicate") || name.includes("Approval")) {
111
+ else if (name.includes("session") ||
112
+ name.includes("Session") ||
113
+ name.includes("Constraint") ||
114
+ name.includes("Claim") ||
115
+ name.includes("Citation") ||
116
+ name.includes("Verification") ||
117
+ name.includes("Feasibility") ||
118
+ name.includes("Duplicate") ||
119
+ name.includes("Approval")) {
96
120
  module = "session";
97
121
  }
98
122
  else if (name.includes("Stuck") || name.includes("Recovery")) {
99
123
  module = "stuck";
100
124
  }
101
- else if (name.includes("Health") || name.includes("Circuit") || name.includes("RateLimit") || name.includes("Qdrant")) {
125
+ else if (name.includes("Health") ||
126
+ name.includes("Circuit") ||
127
+ name.includes("RateLimit") ||
128
+ name.includes("Qdrant")) {
102
129
  module = "health";
103
130
  }
104
131
  else if (name.includes("Research") || name.includes("Model")) {
@@ -107,19 +134,29 @@ export function printTools(tools) {
107
134
  else if (name.includes("memory_bank")) {
108
135
  module = "memory-bank";
109
136
  }
110
- else if (name.includes("Relationship") || name.includes("Graph") || name.includes("link")) {
137
+ else if (name.includes("Relationship") ||
138
+ name.includes("Graph") ||
139
+ name.includes("link")) {
111
140
  module = "graph";
112
141
  }
113
- else if (name.includes("consult") || name.includes("Consultation") || name.includes("Consensus") || name.includes("Review") || (name.includes("Decision") && name.includes("validate"))) {
142
+ else if (name.includes("consult") ||
143
+ name.includes("Consultation") ||
144
+ name.includes("Consensus") ||
145
+ name.includes("Review") ||
146
+ (name.includes("Decision") && name.includes("validate"))) {
114
147
  module = "consultation";
115
148
  }
116
- else if (name.includes("Branch") || name.includes("branch") || (name.includes("Decision") && name.includes("Point"))) {
149
+ else if (name.includes("Branch") ||
150
+ name.includes("branch") ||
151
+ (name.includes("Decision") && name.includes("Point"))) {
117
152
  module = "branching";
118
153
  }
119
154
  else if (name.includes("rlvr")) {
120
155
  module = "rlvr";
121
156
  }
122
- else if (name.includes("Learning") || name.includes("Knowledge") || name.includes("promote")) {
157
+ else if (name.includes("Learning") ||
158
+ name.includes("Knowledge") ||
159
+ name.includes("promote")) {
123
160
  module = "knowledge";
124
161
  }
125
162
  else if (name.includes("trail")) {
@@ -171,7 +208,9 @@ export async function printHealth() {
171
208
  };
172
209
  console.log("Environment:");
173
210
  for (const [key, value] of Object.entries(envVars)) {
174
- const status = value ? "\x1b[32m✓\x1b[0m configured" : "\x1b[31m✗\x1b[0m not set";
211
+ const status = value
212
+ ? "\x1b[32m✓\x1b[0m configured"
213
+ : "\x1b[31m✗\x1b[0m not set";
175
214
  console.log(` ${key.padEnd(20)} ${status}`);
176
215
  }
177
216
  console.log("\nServices:");
@@ -276,31 +315,33 @@ export function printConfig() {
276
315
  console.log("");
277
316
  }
278
317
  const isTTY = process.stdout.isTTY ?? false;
279
- const colors = isTTY ? {
280
- reset: "\x1b[0m",
281
- bright: "\x1b[1m",
282
- dim: "\x1b[2m",
283
- red: "\x1b[31m",
284
- green: "\x1b[32m",
285
- yellow: "\x1b[33m",
286
- blue: "\x1b[34m",
287
- magenta: "\x1b[35m",
288
- cyan: "\x1b[36m",
289
- white: "\x1b[37m",
290
- gray: "\x1b[90m",
291
- } : {
292
- reset: "",
293
- bright: "",
294
- dim: "",
295
- red: "",
296
- green: "",
297
- yellow: "",
298
- blue: "",
299
- magenta: "",
300
- cyan: "",
301
- white: "",
302
- gray: "",
303
- };
318
+ const colors = isTTY
319
+ ? {
320
+ reset: "\x1b[0m",
321
+ bright: "\x1b[1m",
322
+ dim: "\x1b[2m",
323
+ red: "\x1b[31m",
324
+ green: "\x1b[32m",
325
+ yellow: "\x1b[33m",
326
+ blue: "\x1b[34m",
327
+ magenta: "\x1b[35m",
328
+ cyan: "\x1b[36m",
329
+ white: "\x1b[37m",
330
+ gray: "\x1b[90m",
331
+ }
332
+ : {
333
+ reset: "",
334
+ bright: "",
335
+ dim: "",
336
+ red: "",
337
+ green: "",
338
+ yellow: "",
339
+ blue: "",
340
+ magenta: "",
341
+ cyan: "",
342
+ white: "",
343
+ gray: "",
344
+ };
304
345
  function formatLogEntry(entry) {
305
346
  const time = new Date(entry.timestamp).toLocaleTimeString();
306
347
  const outcomeColor = entry.outcome === "success" ? colors.green : colors.red;
@@ -381,9 +422,12 @@ export async function printStats() {
381
422
  }
382
423
  stats.lastTimestamp = entry.timestamp;
383
424
  stats.toolCounts[entry.tool] = (stats.toolCounts[entry.tool] || 0) + 1;
384
- stats.toolTotalDurations[entry.tool] = (stats.toolTotalDurations[entry.tool] || 0) + entry.duration;
385
- stats.toolDurationCounts[entry.tool] = (stats.toolDurationCounts[entry.tool] || 0) + 1;
386
- stats.eventTypeCounts[entry.eventType] = (stats.eventTypeCounts[entry.eventType] || 0) + 1;
425
+ stats.toolTotalDurations[entry.tool] =
426
+ (stats.toolTotalDurations[entry.tool] || 0) + entry.duration;
427
+ stats.toolDurationCounts[entry.tool] =
428
+ (stats.toolDurationCounts[entry.tool] || 0) + 1;
429
+ stats.eventTypeCounts[entry.eventType] =
430
+ (stats.eventTypeCounts[entry.eventType] || 0) + 1;
387
431
  if (entry.outcome === "success") {
388
432
  stats.successCount++;
389
433
  }
@@ -550,7 +594,7 @@ function printInstancesJson(instances) {
550
594
  const stats = getAggregatedStats();
551
595
  const output = {
552
596
  timestamp: new Date().toISOString(),
553
- instances: instances.map(i => ({
597
+ instances: instances.map((i) => ({
554
598
  ...i,
555
599
  reqPerMin: calculateReqPerMin(i),
556
600
  stale: isHeartbeatStale(i),
@@ -578,7 +622,7 @@ function printInstancesSummary(version) {
578
622
  console.log(`Memory: ${stats.totalMemoryMB} MB total`);
579
623
  console.log(`Requests: ${stats.totalRequests} total`);
580
624
  if (instances.length > 0) {
581
- const oldest = instances.reduce((a, b) => a.uptime > b.uptime ? a : b);
625
+ const oldest = instances.reduce((a, b) => (a.uptime > b.uptime ? a : b));
582
626
  console.log(`Oldest: ${formatUptime(oldest.uptime)} (${oldest.projectName})`);
583
627
  }
584
628
  console.log("");
@@ -639,7 +683,7 @@ export async function monitor(options) {
639
683
  const version = getVersion();
640
684
  let instances = listInstances();
641
685
  if (options.project) {
642
- instances = instances.filter(i => i.projectName.toLowerCase().includes(options.project.toLowerCase()));
686
+ instances = instances.filter((i) => i.projectName.toLowerCase().includes(options.project.toLowerCase()));
643
687
  }
644
688
  if (options.quiet) {
645
689
  printInstancesQuiet(instances);
@@ -704,9 +748,11 @@ export function parseArgs(args) {
704
748
  let monitorSummary = false;
705
749
  let initForce = false;
706
750
  let updateDryRun = false;
751
+ let setupGlobalRemove = false;
707
752
  let hasMonitor = false;
708
753
  let hasLog = false;
709
754
  let hasInit = false;
755
+ let hasSetupGlobal = false;
710
756
  let hasCheckCommands = false;
711
757
  let hasUpdateCommands = false;
712
758
  for (let i = 0; i < args.length; i++) {
@@ -730,6 +776,9 @@ export function parseArgs(args) {
730
776
  case "init":
731
777
  hasInit = true;
732
778
  break;
779
+ case "setup-global":
780
+ hasSetupGlobal = true;
781
+ break;
733
782
  case "check-commands":
734
783
  hasCheckCommands = true;
735
784
  break;
@@ -765,6 +814,9 @@ export function parseArgs(args) {
765
814
  case "--dry-run":
766
815
  updateDryRun = true;
767
816
  break;
817
+ case "--remove":
818
+ setupGlobalRemove = true;
819
+ break;
768
820
  case "-p":
769
821
  case "--project":
770
822
  const projectArg = args[i + 1];
@@ -805,11 +857,20 @@ export function parseArgs(args) {
805
857
  if (hasInit) {
806
858
  return { action: "init", initOptions: { force: initForce } };
807
859
  }
860
+ if (hasSetupGlobal) {
861
+ return {
862
+ action: "setup-global",
863
+ setupGlobalOptions: { force: initForce, remove: setupGlobalRemove },
864
+ };
865
+ }
808
866
  if (hasCheckCommands) {
809
867
  return { action: "check-commands" };
810
868
  }
811
869
  if (hasUpdateCommands) {
812
- return { action: "update-commands", updateOptions: { force: initForce, dryRun: updateDryRun } };
870
+ return {
871
+ action: "update-commands",
872
+ updateOptions: { force: initForce, dryRun: updateDryRun },
873
+ };
813
874
  }
814
875
  return { action: "server" };
815
876
  }