cognitive-kit 1.0.0-alpha.2 → 1.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +297 -64
- package/dist/host/adapters/FileSystemAdapter.d.ts +22 -0
- package/dist/host/adapters/FileSystemAdapter.js +203 -0
- package/dist/host/adapters/FileSystemAdapter.js.map +1 -0
- package/dist/host/adapters/PostgresAdapter.d.ts +30 -0
- package/dist/host/adapters/PostgresAdapter.js +252 -0
- package/dist/host/adapters/PostgresAdapter.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/docs/examples/custom-adapter.md +79 -0
- package/docs/examples/federation.md +60 -0
- package/docs/examples/library-embed.md +69 -0
- package/docs/examples/mcp-server.md +48 -0
- package/docs/examples/pg-explorer.md +48 -0
- package/docs/guides/claude-desktop-integration.md +71 -0
- package/docs/guides/cursor-integration.md +64 -0
- package/docs/guides/vscode-integration.md +80 -0
- package/mcp.json +50 -0
- package/package.json +4 -2
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
# Cursor Integration Guide
|
|
2
|
+
|
|
3
|
+
Connect Cognitive Kit to Cursor AI editor via MCP.
|
|
4
|
+
|
|
5
|
+
## Setup
|
|
6
|
+
|
|
7
|
+
### 1. Configure MCP in Cursor
|
|
8
|
+
|
|
9
|
+
1. Open Cursor Settings
|
|
10
|
+
2. Navigate to **Features → MCP**
|
|
11
|
+
3. Click **+ Add New MCP Server**
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
Name: cognitive-kit
|
|
15
|
+
Type: command
|
|
16
|
+
Command: npx cognitive-kit
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
4. Add environment variables (optional):
|
|
20
|
+
|
|
21
|
+
| Variable | Value |
|
|
22
|
+
|----------|-------|
|
|
23
|
+
| `KIT_HOST_ID` | `cursor-my-project` |
|
|
24
|
+
| `KIT_HOST_NAME` | `My Project` |
|
|
25
|
+
| `KIT_SOVEREIGN_KEY` | *(optional)* |
|
|
26
|
+
|
|
27
|
+
### 2. Verify
|
|
28
|
+
|
|
29
|
+
Run any tool from Cursor's MCP panel:
|
|
30
|
+
|
|
31
|
+
```
|
|
32
|
+
cognitive_reason({ problem: "Why is this function failing?" })
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Available Commands
|
|
36
|
+
|
|
37
|
+
Via Cursor's AI chat:
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
Analyze this code using cognitive_reason:
|
|
41
|
+
[code block]
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
Plan the implementation using cognitive_plan:
|
|
46
|
+
[requirements]
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
Check for security issues using security_gate:
|
|
51
|
+
[code/config]
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
Research this topic using cognitive_research:
|
|
56
|
+
[topic]
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Tips
|
|
60
|
+
|
|
61
|
+
- Use `agency_execute` for complex multi-step tasks
|
|
62
|
+
- Use `guardian_status` to monitor system health
|
|
63
|
+
- Use `code_archaeologist` for codebase analysis
|
|
64
|
+
- Use `consensus_engine` for architectural decisions
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# VS Code Integration Guide
|
|
2
|
+
|
|
3
|
+
Connect Cognitive Kit to VS Code via MCP for inline reasoning, code analysis, planning, and security auditing.
|
|
4
|
+
|
|
5
|
+
## Setup
|
|
6
|
+
|
|
7
|
+
### 1. Install the Kit
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install -g cognitive-kit
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
### 2. Configure MCP
|
|
14
|
+
|
|
15
|
+
Create or edit `.vscode/mcp.json` in your project:
|
|
16
|
+
|
|
17
|
+
```json
|
|
18
|
+
{
|
|
19
|
+
"servers": {
|
|
20
|
+
"cognitive-kit": {
|
|
21
|
+
"type": "stdio",
|
|
22
|
+
"command": "npx",
|
|
23
|
+
"args": ["cognitive-kit"],
|
|
24
|
+
"env": {
|
|
25
|
+
"KIT_HOST_ID": "vscode-${workspaceFolderBasename}",
|
|
26
|
+
"KIT_HOST_NAME": "${workspaceFolderBasename}"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### 3. Restart VS Code
|
|
34
|
+
|
|
35
|
+
The kit starts automatically. You can now use all 31 tools from the VS Code MCP interface.
|
|
36
|
+
|
|
37
|
+
## VS Code Extension
|
|
38
|
+
|
|
39
|
+
Alternatively, install the VS Code extension (if published):
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
code --install-extension cognitive-kit-vscode
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The extension provides:
|
|
46
|
+
|
|
47
|
+
- **`Cognitive Kit: Analyze Selection`** — Runs reasoning on selected code/text
|
|
48
|
+
- **`Cognitive Kit: Reflect on Workspace`** — Meta-reflection on project state
|
|
49
|
+
- **`Cognitive Kit: Show Status`** — Guardian metrics and tool counts
|
|
50
|
+
|
|
51
|
+
## Example Workflows
|
|
52
|
+
|
|
53
|
+
### Code Review
|
|
54
|
+
|
|
55
|
+
1. Select a block of code
|
|
56
|
+
2. Run `Cognitive Kit: Analyze Selection`
|
|
57
|
+
3. The kit applies `cognitive_reason` for logical analysis
|
|
58
|
+
4. Results appear in a new editor panel
|
|
59
|
+
|
|
60
|
+
### Security Audit
|
|
61
|
+
|
|
62
|
+
Via MCP, call:
|
|
63
|
+
|
|
64
|
+
```
|
|
65
|
+
security_gate(payload: "the code to inspect")
|
|
66
|
+
ethics_audit(subject: "implementation decision")
|
|
67
|
+
threat_mapper(systemDescription: "architecture overview")
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Project Planning
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
agency_execute(objective: "Design authentication module", mode: "adaptive")
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Requirements
|
|
77
|
+
|
|
78
|
+
- VS Code ≥ 1.96
|
|
79
|
+
- Node.js ≥ 20
|
|
80
|
+
- Internet for first `npx` run
|
package/mcp.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"servers": {
|
|
3
|
+
"cognitive-kit": {
|
|
4
|
+
"name": "Cognitive Kit",
|
|
5
|
+
"description": "Pluggable cognitive layer — 31+ MCP tools for reasoning, research, planning, creativity, security, knowledge, analysis, agency orchestration, and adaptive pipelines",
|
|
6
|
+
"type": "stdio",
|
|
7
|
+
"command": "npx",
|
|
8
|
+
"args": ["cognitive-kit"],
|
|
9
|
+
"env": {
|
|
10
|
+
"KIT_HOST_ID": "${workspaceFolderBasename}",
|
|
11
|
+
"KIT_HOST_NAME": "${workspaceFolderBasename}",
|
|
12
|
+
"KIT_SOVEREIGN_KEY": ""
|
|
13
|
+
},
|
|
14
|
+
"icon": "🧠",
|
|
15
|
+
"tools": [
|
|
16
|
+
"cognitive_reason",
|
|
17
|
+
"cognitive_research",
|
|
18
|
+
"cognitive_plan",
|
|
19
|
+
"cognitive_create",
|
|
20
|
+
"cognitive_reflect",
|
|
21
|
+
"security_gate",
|
|
22
|
+
"ethics_audit",
|
|
23
|
+
"integrity_ledger",
|
|
24
|
+
"threat_mapper",
|
|
25
|
+
"red_team",
|
|
26
|
+
"blast_radius",
|
|
27
|
+
"guardian_status",
|
|
28
|
+
"guardian_freeze",
|
|
29
|
+
"guardian_unfreeze",
|
|
30
|
+
"memory_vam",
|
|
31
|
+
"knowledge_evolve",
|
|
32
|
+
"context_synth",
|
|
33
|
+
"code_archaeologist",
|
|
34
|
+
"sentiment_adapter",
|
|
35
|
+
"consensus_engine",
|
|
36
|
+
"execution_flow",
|
|
37
|
+
"swarm_orchestrator",
|
|
38
|
+
"meta_orchestrator",
|
|
39
|
+
"subagent_protocol",
|
|
40
|
+
"agency_execute",
|
|
41
|
+
"skill_forge",
|
|
42
|
+
"skill_list_forged",
|
|
43
|
+
"federation_status",
|
|
44
|
+
"federation_connect",
|
|
45
|
+
"federation_execute",
|
|
46
|
+
"federation_disconnect"
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cognitive-kit",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.3",
|
|
4
4
|
"description": "Pluggable cognitive layer — port of GCS v15.3 as an embeddable MCP cognitive kit. Provides reasoning, research, planning, creativity, reflection, security, knowledge, analysis, agency orchestration, and adaptive pipelines via MCP protocol.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -24,6 +24,8 @@
|
|
|
24
24
|
"files": [
|
|
25
25
|
"dist",
|
|
26
26
|
"types",
|
|
27
|
+
"docs",
|
|
28
|
+
"mcp.json",
|
|
27
29
|
"README.md",
|
|
28
30
|
"LICENSE"
|
|
29
31
|
],
|
|
@@ -33,7 +35,7 @@
|
|
|
33
35
|
"scripts": {
|
|
34
36
|
"build": "tsc -p tsconfig.json",
|
|
35
37
|
"dev": "tsc --watch -p tsconfig.json",
|
|
36
|
-
"test": "node
|
|
38
|
+
"test": "node tests/mcp-test-all.mjs && node tests/guardian-test.mjs && node tests/forge-test.mjs && node tests/federation-test.mjs",
|
|
37
39
|
"start": "node dist/cli.js",
|
|
38
40
|
"prepublishOnly": "npm run build"
|
|
39
41
|
},
|