centient 2.21.0 → 2.25.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.
Files changed (91) hide show
  1. package/CHANGELOG.md +106 -0
  2. package/README.md +134 -21
  3. package/dist/cli.d.ts +38 -0
  4. package/dist/cli.d.ts.map +1 -0
  5. package/dist/cli.js +816 -0
  6. package/dist/cli.js.map +1 -0
  7. package/dist/commands.d.ts +18 -0
  8. package/dist/commands.d.ts.map +1 -0
  9. package/dist/commands.js +341 -0
  10. package/dist/commands.js.map +1 -0
  11. package/dist/index.d.ts +1 -1
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +86 -18
  14. package/dist/index.js.map +1 -1
  15. package/dist/server.d.ts +4 -0
  16. package/dist/server.d.ts.map +1 -1
  17. package/dist/server.js +167 -96
  18. package/dist/server.js.map +1 -1
  19. package/dist/telemetry/tracer.d.ts.map +1 -1
  20. package/dist/telemetry/tracer.js +15 -1
  21. package/dist/telemetry/tracer.js.map +1 -1
  22. package/dist/tools/knowledge/promoteDecision.d.ts.map +1 -1
  23. package/dist/tools/knowledge/promoteDecision.js +7 -1
  24. package/dist/tools/knowledge/promoteDecision.js.map +1 -1
  25. package/dist/tools/knowledge/promoteLearning.d.ts.map +1 -1
  26. package/dist/tools/knowledge/promoteLearning.js +7 -1
  27. package/dist/tools/knowledge/promoteLearning.js.map +1 -1
  28. package/dist/tools/memory-bank/pushToMemoryBank.d.ts +9 -0
  29. package/dist/tools/memory-bank/pushToMemoryBank.d.ts.map +1 -0
  30. package/dist/tools/memory-bank/pushToMemoryBank.js +195 -0
  31. package/dist/tools/memory-bank/pushToMemoryBank.js.map +1 -0
  32. package/dist/tools/patterns/executeSkill.js +0 -41
  33. package/dist/tools/patterns/executeSkill.js.map +1 -1
  34. package/dist/tools/patterns/loadSkill.js +0 -17
  35. package/dist/tools/patterns/loadSkill.js.map +1 -1
  36. package/dist/tools/patterns/searchPatterns.js +0 -15
  37. package/dist/tools/patterns/searchPatterns.js.map +1 -1
  38. package/dist/tools/patterns/signPattern.js +0 -20
  39. package/dist/tools/patterns/signPattern.js.map +1 -1
  40. package/dist/utils/AuditLogger.d.ts +25 -18
  41. package/dist/utils/AuditLogger.d.ts.map +1 -1
  42. package/dist/utils/AuditLogger.js +261 -150
  43. package/dist/utils/AuditLogger.js.map +1 -1
  44. package/dist/utils/GeminiEmbeddingService.d.ts +25 -0
  45. package/dist/utils/GeminiEmbeddingService.d.ts.map +1 -0
  46. package/dist/utils/GeminiEmbeddingService.js +115 -0
  47. package/dist/utils/GeminiEmbeddingService.js.map +1 -0
  48. package/dist/utils/InstanceRegistry.d.ts +47 -0
  49. package/dist/utils/InstanceRegistry.d.ts.map +1 -0
  50. package/dist/utils/InstanceRegistry.js +195 -0
  51. package/dist/utils/InstanceRegistry.js.map +1 -0
  52. package/dist/utils/MetaKnowledgeEncryption.d.ts +21 -0
  53. package/dist/utils/MetaKnowledgeEncryption.d.ts.map +1 -0
  54. package/dist/utils/MetaKnowledgeEncryption.js +125 -0
  55. package/dist/utils/MetaKnowledgeEncryption.js.map +1 -0
  56. package/dist/utils/MetaKnowledgeManager.d.ts +18 -0
  57. package/dist/utils/MetaKnowledgeManager.d.ts.map +1 -1
  58. package/dist/utils/MetaKnowledgeManager.js +110 -6
  59. package/dist/utils/MetaKnowledgeManager.js.map +1 -1
  60. package/dist/utils/PatternIndexer.d.ts +1 -2
  61. package/dist/utils/PatternIndexer.d.ts.map +1 -1
  62. package/dist/utils/PatternIndexer.js +40 -72
  63. package/dist/utils/PatternIndexer.js.map +1 -1
  64. package/dist/utils/SessionCoordinator.d.ts +0 -1
  65. package/dist/utils/SessionCoordinator.d.ts.map +1 -1
  66. package/dist/utils/SessionCoordinator.js +3 -61
  67. package/dist/utils/SessionCoordinator.js.map +1 -1
  68. package/dist/utils/VertexSync.d.ts +12 -0
  69. package/dist/utils/VertexSync.d.ts.map +1 -0
  70. package/dist/utils/VertexSync.js +173 -0
  71. package/dist/utils/VertexSync.js.map +1 -0
  72. package/dist/utils/config.d.ts +60 -0
  73. package/dist/utils/config.d.ts.map +1 -0
  74. package/dist/utils/config.js +246 -0
  75. package/dist/utils/config.js.map +1 -0
  76. package/dist/utils/rlvr/RewardHistoryStore.d.ts +0 -2
  77. package/dist/utils/rlvr/RewardHistoryStore.d.ts.map +1 -1
  78. package/dist/utils/rlvr/RewardHistoryStore.js +5 -18
  79. package/dist/utils/rlvr/RewardHistoryStore.js.map +1 -1
  80. package/package.json +2 -1
  81. package/templates/claude/commands/check-duplicate.md +57 -0
  82. package/templates/claude/commands/checkpoint.md +47 -0
  83. package/templates/claude/commands/constraint.md +60 -0
  84. package/templates/claude/commands/finalize.md +56 -0
  85. package/templates/claude/commands/history.md +60 -0
  86. package/templates/claude/commands/note.md +50 -0
  87. package/templates/claude/commands/patterns.md +51 -0
  88. package/templates/claude/commands/promote.md +62 -0
  89. package/templates/claude/commands/recall.md +55 -0
  90. package/templates/claude/commands/session-start.md +52 -0
  91. package/templates/claude/commands/session-status.md +62 -0
@@ -0,0 +1,60 @@
1
+ ---
2
+ centient-version: 2.25.1
3
+ description: Browse session history
4
+ allowed-tools: mcp__centient__searchArtifacts, mcp__centient__loadSession, mcp__centient__diffSessions
5
+ ---
6
+
7
+ # /history
8
+
9
+ Browse and search session history from finalization packs.
10
+
11
+ ## Usage
12
+
13
+ ```
14
+ /history # List recent sessions
15
+ /history authentication # Search sessions by keyword
16
+ /history load 2026-01-10 # Load specific session
17
+ /history diff 2026-01-09 2026-01-10 # Compare sessions
18
+ ```
19
+
20
+ ## Commands
21
+
22
+ | Command | Description |
23
+ |---------|-------------|
24
+ | (no args) | List recent sessions |
25
+ | `<keyword>` | Search sessions by keyword |
26
+ | `load <date>` | Load full session context |
27
+ | `diff <date1> <date2>` | Compare two sessions |
28
+
29
+ ## Workflow
30
+
31
+ ### Listing/Searching Sessions
32
+
33
+ Call `searchArtifacts` with:
34
+ - `keyword`: Search term (optional)
35
+ - `limit`: Max results (default 20)
36
+
37
+ ### Loading a Session
38
+
39
+ Call `loadSession` with:
40
+ - `project`: Current project name
41
+ - `sessionId`: Session date/ID
42
+ - `includeCode`: true to include code blocks
43
+
44
+ ### Comparing Sessions
45
+
46
+ Call `diffSessions` with:
47
+ - `project`: Current project name
48
+ - `sessionA`: First session ID
49
+ - `sessionB`: Second session ID
50
+ - `format`: "summary", "detailed", or "json"
51
+
52
+ ## What You'll See
53
+
54
+ - Session date and title
55
+ - Type (development, bugfix, exploration, etc.)
56
+ - Key decisions and learnings
57
+ - Files modified
58
+ - Patterns identified
59
+
60
+ History command: $ARGUMENTS
@@ -0,0 +1,50 @@
1
+ ---
2
+ centient-version: 2.25.1
3
+ description: Add a note to session memory
4
+ allowed-tools: mcp__centient__save_session_note
5
+ ---
6
+
7
+ # /note
8
+
9
+ Add a decision, hypothesis, blocker, learning, or finding to session memory.
10
+
11
+ ## Usage
12
+
13
+ ```
14
+ /note decision: Using PostgreSQL over MySQL because...
15
+ /note hypothesis: Caching will reduce latency by 50%
16
+ /note blocker: API rate limiting preventing integration tests
17
+ /note learning: The SDK requires explicit error handling
18
+ /note finding: The bottleneck is in the database query
19
+ ```
20
+
21
+ ## Note Types
22
+
23
+ | Type | When to Use |
24
+ |------|-------------|
25
+ | `decision` | When choosing between alternatives (include rationale) |
26
+ | `hypothesis` | When making an assumption to validate |
27
+ | `blocker` | When encountering an impediment |
28
+ | `learning` | When discovering something valuable |
29
+ | `finding` | When research reveals a fact (can be verified) |
30
+ | `pattern` | When recognizing a reusable approach |
31
+
32
+ ## Workflow
33
+
34
+ 1. Parse the note type from the beginning of the argument
35
+ 2. Call `save_session_note` with:
36
+ - `type`: One of decision, hypothesis, blocker, learning, finding, pattern
37
+ - `content`: The note content
38
+ - `metadata`: Include confidence level if applicable
39
+
40
+ 3. Confirm the note was saved
41
+
42
+ ## Best Practices
43
+
44
+ - **Decisions**: Include alternatives considered and rationale
45
+ - **Hypotheses**: Include validation criteria
46
+ - **Blockers**: Include current status (resolved/unresolved)
47
+ - **Learnings**: Include evidence or source
48
+ - **Findings**: Mark as verified if confirmed by testing
49
+
50
+ Note to add: $ARGUMENTS
@@ -0,0 +1,51 @@
1
+ ---
2
+ centient-version: 2.25.1
3
+ description: Search pattern library
4
+ allowed-tools: mcp__centient__findPatterns, mcp__centient__searchPatterns, mcp__centient__loadSkill
5
+ ---
6
+
7
+ # /patterns
8
+
9
+ Search the pattern library for reusable solutions.
10
+
11
+ ## Usage
12
+
13
+ ```
14
+ /patterns authentication
15
+ /patterns database security
16
+ /patterns --category security
17
+ ```
18
+
19
+ ## What This Does
20
+
21
+ 1. Searches pattern library via `findPatterns` (semantic) or `searchPatterns` (keyword)
22
+ 2. Displays matching patterns with quality scores
23
+ 3. Offers to load full documentation for selected patterns
24
+
25
+ ## Workflow
26
+
27
+ 1. **Search Patterns**: Call `findPatterns` with:
28
+ - `query`: The search term(s)
29
+ - `mode`: "fast" for quick results, "comprehensive" for deep search
30
+ - `category`: Optional category filter
31
+
32
+ 2. **Display Results**: Show patterns with:
33
+ - Name and category
34
+ - Quality score (X.X/10)
35
+ - Brief description
36
+ - Usage count
37
+
38
+ 3. **Load Details**: If user wants more info, call `loadSkill` with:
39
+ - `skillId`: Pattern ID (e.g., "security/authentication-jwt")
40
+ - `includeCode`: true to include implementation
41
+
42
+ ## Categories
43
+
44
+ - `database` - Database patterns (RLS, migrations, queries)
45
+ - `security` - Security patterns (auth, validation, encryption)
46
+ - `ui` - UI/UX patterns (forms, tables, navigation)
47
+ - `backend` - Backend patterns (APIs, caching, queues)
48
+ - `testing` - Testing patterns (unit, integration, e2e)
49
+ - `architecture` - Architecture patterns (microservices, events)
50
+
51
+ Search query: $ARGUMENTS
@@ -0,0 +1,62 @@
1
+ ---
2
+ centient-version: 2.25.1
3
+ description: Promote to cross-project knowledge
4
+ allowed-tools: mcp__centient__promote_learning, mcp__centient__promote_decision
5
+ ---
6
+
7
+ # /promote
8
+
9
+ Promote a learning or decision to cross-project meta-knowledge (Tier 3).
10
+
11
+ ## Usage
12
+
13
+ ```
14
+ /promote learning: Always validate API responses before parsing
15
+ /promote decision: Use structured logging over console.log
16
+ ```
17
+
18
+ ## What This Does
19
+
20
+ 1. Parses the type (learning or decision)
21
+ 2. Calls the appropriate promote tool
22
+ 3. Syncs to Vertex AI Memory Bank if enabled
23
+ 4. Confirms promotion with storage location
24
+
25
+ ## Workflow
26
+
27
+ ### For Learnings
28
+
29
+ Call `promote_learning` with:
30
+ - `title`: Short title for the learning
31
+ - `content`: Full description including context and examples
32
+ - `sourceProject`: Current project name
33
+ - `sourceSession`: Current session ID
34
+ - `tags`: Relevant tags for discovery
35
+ - `verified`: Whether validated through testing
36
+
37
+ ### For Decisions
38
+
39
+ Call `promote_decision` with:
40
+ - `title`: Short title for the decision
41
+ - `decision`: What was decided
42
+ - `rationale`: Why this decision was made
43
+ - `sourceProject`: Current project name
44
+ - `sourceSession`: Current session ID
45
+ - `tags`: Relevant tags for discovery
46
+
47
+ ## Storage
48
+
49
+ Promoted knowledge is stored in:
50
+ - `~/.mcp-context/learnings/` - Universal learnings
51
+ - `~/.mcp-context/decisions/` - Universal decisions
52
+
53
+ If Vertex AI sync is enabled, also pushed to Memory Bank.
54
+
55
+ ## When to Promote
56
+
57
+ Promote when:
58
+ - A learning applies across multiple projects
59
+ - A decision represents a universal best practice
60
+ - The knowledge would help future you or others
61
+
62
+ What to promote: $ARGUMENTS
@@ -0,0 +1,55 @@
1
+ ---
2
+ centient-version: 2.25.1
3
+ description: Recall context from memory
4
+ allowed-tools: mcp__centient__session_search, mcp__centient__memory_bank_search
5
+ ---
6
+
7
+ # /recall
8
+
9
+ Search session memory and Memory Bank for relevant context.
10
+
11
+ ## Usage
12
+
13
+ ```
14
+ /recall authentication decisions
15
+ /recall what did we decide about caching
16
+ /recall --session database # Current session only
17
+ /recall --history RLS patterns # Memory Bank only
18
+ ```
19
+
20
+ ## What This Does
21
+
22
+ 1. Searches current session memory via `session_search`
23
+ 2. Searches persistent Memory Bank via `memory_bank_search`
24
+ 3. Returns relevant context with relevance scores
25
+
26
+ ## Workflow
27
+
28
+ 1. **Search Session Memory**: Call `session_search` with:
29
+ - `query`: The search term
30
+ - `limit`: Number of results (default 5)
31
+ - `include_relationships`: true for related notes
32
+
33
+ 2. **Search Memory Bank**: Call `memory_bank_search` with:
34
+ - `query`: The search term
35
+ - `projectName`: Current project
36
+ - `topK`: Number of results
37
+
38
+ 3. **Display Results**: Show context from both sources:
39
+ - Session memories (ephemeral, current session)
40
+ - Memory Bank (persistent, cross-session)
41
+
42
+ ## Options
43
+
44
+ - `--session`: Search only current session memory
45
+ - `--history`: Search only Memory Bank (persistent)
46
+ - Default: Search both
47
+
48
+ ## Best Uses
49
+
50
+ - "What did we decide about X?"
51
+ - "Have we solved this problem before?"
52
+ - "What patterns apply to X?"
53
+ - "What blockers have we encountered?"
54
+
55
+ Search query: $ARGUMENTS
@@ -0,0 +1,52 @@
1
+ ---
2
+ centient-version: 2.25.1
3
+ description: Initialize session memory
4
+ allowed-tools: mcp__centient__*
5
+ ---
6
+
7
+ # /session-start
8
+
9
+ Initialize a new development session with full context loading.
10
+
11
+ ## Usage
12
+
13
+ ```
14
+ /session-start [optional-feature-keyword]
15
+ /session-start --reference YYYY-MM-DD [feature-keyword]
16
+ ```
17
+
18
+ ## What This Does
19
+
20
+ 1. Calls `start_session_coordination` to initialize Qdrant session memory
21
+ 2. Optionally seeds session with related memories from Memory Bank
22
+ 3. Checks context health via `getContextHealth`
23
+ 4. Searches for related past work if keyword provided
24
+ 5. Displays session dashboard
25
+
26
+ ## Workflow
27
+
28
+ 1. **Initialize Session**: Call `start_session_coordination` with:
29
+ - `sessionId`: Format as `YYYY-MM-DD-<keyword>` (e.g., `2026-01-12-auth-flow`)
30
+ - `projectPath`: Current working directory
31
+ - `seedTopic`: The keyword argument (if provided)
32
+
33
+ 2. **Check Context Health**: Call `getContextHealth` and display status
34
+
35
+ 3. **Search Related Work** (if keyword provided):
36
+ - Call `memory_bank_search` with the keyword
37
+ - Show relevant past memories
38
+
39
+ 4. **Display Dashboard**:
40
+ ```
41
+ ═══════════════════════════════════════
42
+ Session Initialized: <project-name>
43
+ ═══════════════════════════════════════
44
+ Session ID: <session-id>
45
+ Context Health: <status>
46
+ Memory Bank: <seeded-count> related memories
47
+ ═══════════════════════════════════════
48
+ ```
49
+
50
+ 5. **Ask for Focus**: "What are you working on today?"
51
+
52
+ Session keyword: $ARGUMENTS
@@ -0,0 +1,62 @@
1
+ ---
2
+ centient-version: 2.25.1
3
+ description: Show current session state
4
+ allowed-tools: mcp__centient__get_session_stats, mcp__centient__get_session_summary, mcp__centient__getContextHealth
5
+ ---
6
+
7
+ # /session-status
8
+
9
+ Show the current session state and statistics.
10
+
11
+ ## Usage
12
+
13
+ ```
14
+ /session-status
15
+ /session-status --health # Include context health
16
+ /session-status --tree # Include branch visualization
17
+ ```
18
+
19
+ ## What This Does
20
+
21
+ 1. Calls `get_session_stats` for note counts
22
+ 2. Calls `get_session_summary` for comprehensive view
23
+ 3. Optionally calls `getContextHealth` for context window status
24
+
25
+ ## Workflow
26
+
27
+ 1. **Get Statistics**: Call `get_session_stats` to see:
28
+ - Total notes in session
29
+ - Notes by type (decisions, hypotheses, blockers, etc.)
30
+
31
+ 2. **Get Summary**: Call `get_session_summary` with:
32
+ - `includeMemories`: true for formatted memories
33
+ - `includeTree`: true for branch visualization
34
+
35
+ 3. **Check Health** (optional): Call `getContextHealth` to see:
36
+ - Token usage percentage
37
+ - Recommendations for optimization
38
+
39
+ ## Display
40
+
41
+ ```
42
+ ═══════════════════════════════════════
43
+ Session Status: 2026-01-12-feature
44
+ ═══════════════════════════════════════
45
+
46
+ Notes:
47
+ Decisions: 3
48
+ Hypotheses: 2
49
+ Blockers: 1 (0 resolved)
50
+ Learnings: 4
51
+ Patterns: 1
52
+
53
+ Context Health: GOOD (15% capacity)
54
+
55
+ Branch Tree:
56
+ main
57
+ ├─ feature-a (merged)
58
+ └─ feature-b (active)
59
+ ═══════════════════════════════════════
60
+ ```
61
+
62
+ Status options: $ARGUMENTS