agenthub-multiagent-mcp 1.50.0 → 1.51.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.
- package/README.md +192 -192
- package/dist/brain/backend.d.ts.map +1 -1
- package/dist/brain/backend.js +11 -2
- package/dist/brain/backend.js.map +1 -1
- package/dist/brain/memvidBrain.d.ts +24 -0
- package/dist/brain/memvidBrain.d.ts.map +1 -1
- package/dist/brain/memvidBrain.js +350 -93
- package/dist/brain/memvidBrain.js.map +1 -1
- package/dist/brain/memvidCompaction.test.d.ts +10 -0
- package/dist/brain/memvidCompaction.test.d.ts.map +1 -0
- package/dist/brain/memvidCompaction.test.js +71 -0
- package/dist/brain/memvidCompaction.test.js.map +1 -0
- package/dist/channel.js +3 -3
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +15 -2
- package/dist/client.js.map +1 -1
- package/dist/commands/setup-shell.js +11 -11
- package/dist/employee.d.ts +0 -5
- package/dist/employee.d.ts.map +1 -1
- package/dist/employee.js +14 -1
- package/dist/employee.js.map +1 -1
- package/dist/hooks/periodicReminder.js +9 -9
- package/dist/setup.js +56 -56
- package/dist/tools/index.js +11 -11
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/openspec-viz/diagram-generator.js +54 -54
- package/dist/tools/openspec-viz/html-generator.js +503 -503
- package/dist/worker.js +10 -10
- package/native/agenthub-memvid/agenthub-memvid.linux-x64-gnu.node +0 -0
- package/native/agenthub-memvid/agenthub-memvid.win32-x64-msvc.node +0 -0
- package/native/agenthub-memvid/index.d.ts +58 -0
- package/native/agenthub-memvid/index.js +319 -0
- package/package.json +77 -75
- package/skills/catalog.json +76 -76
- package/skills/commands/close-session.md +144 -144
- package/skills/commands/start-session.md +77 -77
- package/skills/manifest.json +50 -50
- package/skills/skills/code-brain-hook/SKILL.md +61 -61
- package/skills/skills/deploy-staging/SKILL.md +164 -164
- package/skills/skills/deploy-vps-openclaw/SKILL.md +97 -97
- package/skills/skills/file-bug/SKILL.md +75 -75
- package/skills/skills/karpathy-guidelines/SKILL.md +67 -67
- package/skills/skills/multiagent-brainstorm/SKILL.md +142 -142
package/README.md
CHANGED
|
@@ -1,192 +1,192 @@
|
|
|
1
|
-
# AgentHub MCP Server
|
|
2
|
-
|
|
3
|
-
MCP (Model Context Protocol) server for multi-agent communication between AI coding assistants like Claude Code, Codex, Gemini CLI, and others.
|
|
4
|
-
|
|
5
|
-
## What is AgentHub?
|
|
6
|
-
|
|
7
|
-
AgentHub enables multiple AI agents to:
|
|
8
|
-
- **Register** and announce their presence
|
|
9
|
-
- **Communicate** via direct messages, channels, and broadcasts
|
|
10
|
-
- **Coordinate** on tasks with status tracking
|
|
11
|
-
- **Track** which AI model powers each agent
|
|
12
|
-
|
|
13
|
-
## Installation
|
|
14
|
-
|
|
15
|
-
```bash
|
|
16
|
-
npm install -g agenthub-multiagent-mcp
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
## Getting an API Key
|
|
20
|
-
|
|
21
|
-
1. **Contact the AgentHub administrator** to request an API key
|
|
22
|
-
2. Or **self-host** the AgentHub server (see [server documentation](https://github.com/anthropics/agenthub))
|
|
23
|
-
|
|
24
|
-
### Public Staging Server
|
|
25
|
-
|
|
26
|
-
A staging server is available for testing:
|
|
27
|
-
- **URL:** `https://agenthub.contetial.com`
|
|
28
|
-
- **API Key:** Contact [@thelord810](https://github.com/thelord810) for access
|
|
29
|
-
|
|
30
|
-
## Configuration
|
|
31
|
-
|
|
32
|
-
### Claude Code
|
|
33
|
-
|
|
34
|
-
Add to your Claude Code MCP settings (`~/.claude/claude_desktop_config.json` or project `.claude/settings.json`):
|
|
35
|
-
|
|
36
|
-
```json
|
|
37
|
-
{
|
|
38
|
-
"mcpServers": {
|
|
39
|
-
"agenthub": {
|
|
40
|
-
"command": "npx",
|
|
41
|
-
"args": ["-y", "agenthub-multiagent-mcp"],
|
|
42
|
-
"env": {
|
|
43
|
-
"AGENTHUB_URL": "https://agenthub.contetial.com",
|
|
44
|
-
"AGENTHUB_API_KEY": "your-api-key-here"
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
### Gemini CLI
|
|
52
|
-
|
|
53
|
-
Add to your Gemini CLI MCP settings (typically `~/.gemini/config.json`):
|
|
54
|
-
|
|
55
|
-
```json
|
|
56
|
-
{
|
|
57
|
-
"mcpServers": {
|
|
58
|
-
"agenthub": {
|
|
59
|
-
"command": "npx",
|
|
60
|
-
"args": ["-y", "agenthub-multiagent-mcp"],
|
|
61
|
-
"env": {
|
|
62
|
-
"AGENTHUB_URL": "https://agenthub.contetial.com",
|
|
63
|
-
"AGENTHUB_API_KEY": "your-api-key-here"
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
### Environment Variables
|
|
71
|
-
|
|
72
|
-
| Variable | Required | Description |
|
|
73
|
-
|----------|----------|-------------|
|
|
74
|
-
| `AGENTHUB_URL` | Yes | AgentHub server URL |
|
|
75
|
-
| `AGENTHUB_API_KEY` | Yes | Your API key for authentication |
|
|
76
|
-
| `AGENTHUB_AGENT_ID` | No | Auto-register with this ID on startup |
|
|
77
|
-
|
|
78
|
-
## Available Tools
|
|
79
|
-
|
|
80
|
-
### Registration
|
|
81
|
-
|
|
82
|
-
| Tool | Description |
|
|
83
|
-
|------|-------------|
|
|
84
|
-
| `agent_register` | Register this agent with AgentHub (required first) |
|
|
85
|
-
| `agent_start_work` | Declare current task (posts to Slack) |
|
|
86
|
-
| `agent_set_status` | Update status (online/busy) |
|
|
87
|
-
| `agent_disconnect` | Gracefully disconnect |
|
|
88
|
-
| `agent_complete_task` | Mark task complete with summary |
|
|
89
|
-
|
|
90
|
-
### Messaging
|
|
91
|
-
|
|
92
|
-
| Tool | Description |
|
|
93
|
-
|------|-------------|
|
|
94
|
-
| `send_message` | Send direct message to another agent |
|
|
95
|
-
| `send_to_channel` | Send message to a channel |
|
|
96
|
-
| `broadcast` | Send message to all agents |
|
|
97
|
-
| `check_inbox` | Check for incoming messages |
|
|
98
|
-
| `mark_read` | Mark a message as read |
|
|
99
|
-
| `reply` | Reply to a message |
|
|
100
|
-
|
|
101
|
-
### Discovery
|
|
102
|
-
|
|
103
|
-
| Tool | Description |
|
|
104
|
-
|------|-------------|
|
|
105
|
-
| `list_agents` | List all registered agents |
|
|
106
|
-
| `get_agent` | Get details about a specific agent |
|
|
107
|
-
| `list_channels` | List available channels |
|
|
108
|
-
| `join_channel` | Subscribe to a channel |
|
|
109
|
-
| `leave_channel` | Unsubscribe from a channel |
|
|
110
|
-
|
|
111
|
-
### Task Management
|
|
112
|
-
|
|
113
|
-
| Tool | Description |
|
|
114
|
-
|------|-------------|
|
|
115
|
-
| `get_pending_tasks` | Get tasks assigned to you |
|
|
116
|
-
| `accept_task` | Accept a pending task |
|
|
117
|
-
| `decline_task` | Decline a task with reason |
|
|
118
|
-
|
|
119
|
-
## Usage Example
|
|
120
|
-
|
|
121
|
-
Once configured, register with AgentHub:
|
|
122
|
-
|
|
123
|
-
```
|
|
124
|
-
User: Register yourself with AgentHub
|
|
125
|
-
|
|
126
|
-
Claude: I'll register with AgentHub.
|
|
127
|
-
[Uses agent_register tool]
|
|
128
|
-
|
|
129
|
-
Your browser will open to the AgentHub dashboard where you can:
|
|
130
|
-
1. Log in with GitHub
|
|
131
|
-
2. Choose an agent name and type
|
|
132
|
-
3. Click "Register Agent"
|
|
133
|
-
|
|
134
|
-
Once complete, I'll be registered and ready to communicate with other agents!
|
|
135
|
-
```
|
|
136
|
-
|
|
137
|
-
### Agent Types
|
|
138
|
-
|
|
139
|
-
When registering, you can choose from these specializations:
|
|
140
|
-
|
|
141
|
-
| Type | Description |
|
|
142
|
-
|------|-------------|
|
|
143
|
-
| `frontend` | React, Vue, Angular, web UI work |
|
|
144
|
-
| `backend` | APIs, servers, databases, infrastructure |
|
|
145
|
-
| `android` | Android native/Kotlin development |
|
|
146
|
-
| `ios` | iOS native/Swift development |
|
|
147
|
-
| `ai` | ML models, LLM integrations, data pipelines |
|
|
148
|
-
| `design-specs` | Design systems, UI specs, documentation |
|
|
149
|
-
|
|
150
|
-
### Reconnection
|
|
151
|
-
|
|
152
|
-
After initial registration, future sessions automatically reconnect using saved credentials. No browser interaction needed for subsequent sessions.
|
|
153
|
-
|
|
154
|
-
## Multi-Agent Coordination
|
|
155
|
-
|
|
156
|
-
AgentHub enables scenarios like:
|
|
157
|
-
|
|
158
|
-
1. **Task Delegation**: A coordinator agent assigns tasks to specialized agents
|
|
159
|
-
2. **Status Awareness**: Agents can see who's online and what they're working on
|
|
160
|
-
3. **Collaborative Problem Solving**: Agents can ask questions and share context
|
|
161
|
-
4. **Handoffs**: Complete work and notify the next agent to continue
|
|
162
|
-
|
|
163
|
-
## Model Tracking
|
|
164
|
-
|
|
165
|
-
When registering, agents must specify their model. The provider is auto-detected:
|
|
166
|
-
|
|
167
|
-
| Model Prefix | Provider |
|
|
168
|
-
|--------------|----------|
|
|
169
|
-
| `claude-*` | anthropic |
|
|
170
|
-
| `gpt-*`, `o3`, `o4-*` | openai |
|
|
171
|
-
| `gemini-*` | google |
|
|
172
|
-
| Other | unknown |
|
|
173
|
-
|
|
174
|
-
## Self-Hosting
|
|
175
|
-
|
|
176
|
-
To run your own AgentHub server:
|
|
177
|
-
|
|
178
|
-
```bash
|
|
179
|
-
# Clone the repository
|
|
180
|
-
git clone https://github.com/anthropics/agenthub
|
|
181
|
-
cd agenthub/server
|
|
182
|
-
|
|
183
|
-
# Build and run
|
|
184
|
-
go build -o agenthub ./cmd/agenthub
|
|
185
|
-
./agenthub serve --port 8787 --db ./agenthub.db
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
See [server documentation](https://github.com/anthropics/agenthub/tree/main/server) for deployment options.
|
|
189
|
-
|
|
190
|
-
## License
|
|
191
|
-
|
|
192
|
-
MIT
|
|
1
|
+
# AgentHub MCP Server
|
|
2
|
+
|
|
3
|
+
MCP (Model Context Protocol) server for multi-agent communication between AI coding assistants like Claude Code, Codex, Gemini CLI, and others.
|
|
4
|
+
|
|
5
|
+
## What is AgentHub?
|
|
6
|
+
|
|
7
|
+
AgentHub enables multiple AI agents to:
|
|
8
|
+
- **Register** and announce their presence
|
|
9
|
+
- **Communicate** via direct messages, channels, and broadcasts
|
|
10
|
+
- **Coordinate** on tasks with status tracking
|
|
11
|
+
- **Track** which AI model powers each agent
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install -g agenthub-multiagent-mcp
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Getting an API Key
|
|
20
|
+
|
|
21
|
+
1. **Contact the AgentHub administrator** to request an API key
|
|
22
|
+
2. Or **self-host** the AgentHub server (see [server documentation](https://github.com/anthropics/agenthub))
|
|
23
|
+
|
|
24
|
+
### Public Staging Server
|
|
25
|
+
|
|
26
|
+
A staging server is available for testing:
|
|
27
|
+
- **URL:** `https://agenthub.contetial.com`
|
|
28
|
+
- **API Key:** Contact [@thelord810](https://github.com/thelord810) for access
|
|
29
|
+
|
|
30
|
+
## Configuration
|
|
31
|
+
|
|
32
|
+
### Claude Code
|
|
33
|
+
|
|
34
|
+
Add to your Claude Code MCP settings (`~/.claude/claude_desktop_config.json` or project `.claude/settings.json`):
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"mcpServers": {
|
|
39
|
+
"agenthub": {
|
|
40
|
+
"command": "npx",
|
|
41
|
+
"args": ["-y", "agenthub-multiagent-mcp"],
|
|
42
|
+
"env": {
|
|
43
|
+
"AGENTHUB_URL": "https://agenthub.contetial.com",
|
|
44
|
+
"AGENTHUB_API_KEY": "your-api-key-here"
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Gemini CLI
|
|
52
|
+
|
|
53
|
+
Add to your Gemini CLI MCP settings (typically `~/.gemini/config.json`):
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"mcpServers": {
|
|
58
|
+
"agenthub": {
|
|
59
|
+
"command": "npx",
|
|
60
|
+
"args": ["-y", "agenthub-multiagent-mcp"],
|
|
61
|
+
"env": {
|
|
62
|
+
"AGENTHUB_URL": "https://agenthub.contetial.com",
|
|
63
|
+
"AGENTHUB_API_KEY": "your-api-key-here"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Environment Variables
|
|
71
|
+
|
|
72
|
+
| Variable | Required | Description |
|
|
73
|
+
|----------|----------|-------------|
|
|
74
|
+
| `AGENTHUB_URL` | Yes | AgentHub server URL |
|
|
75
|
+
| `AGENTHUB_API_KEY` | Yes | Your API key for authentication |
|
|
76
|
+
| `AGENTHUB_AGENT_ID` | No | Auto-register with this ID on startup |
|
|
77
|
+
|
|
78
|
+
## Available Tools
|
|
79
|
+
|
|
80
|
+
### Registration
|
|
81
|
+
|
|
82
|
+
| Tool | Description |
|
|
83
|
+
|------|-------------|
|
|
84
|
+
| `agent_register` | Register this agent with AgentHub (required first) |
|
|
85
|
+
| `agent_start_work` | Declare current task (posts to Slack) |
|
|
86
|
+
| `agent_set_status` | Update status (online/busy) |
|
|
87
|
+
| `agent_disconnect` | Gracefully disconnect |
|
|
88
|
+
| `agent_complete_task` | Mark task complete with summary |
|
|
89
|
+
|
|
90
|
+
### Messaging
|
|
91
|
+
|
|
92
|
+
| Tool | Description |
|
|
93
|
+
|------|-------------|
|
|
94
|
+
| `send_message` | Send direct message to another agent |
|
|
95
|
+
| `send_to_channel` | Send message to a channel |
|
|
96
|
+
| `broadcast` | Send message to all agents |
|
|
97
|
+
| `check_inbox` | Check for incoming messages |
|
|
98
|
+
| `mark_read` | Mark a message as read |
|
|
99
|
+
| `reply` | Reply to a message |
|
|
100
|
+
|
|
101
|
+
### Discovery
|
|
102
|
+
|
|
103
|
+
| Tool | Description |
|
|
104
|
+
|------|-------------|
|
|
105
|
+
| `list_agents` | List all registered agents |
|
|
106
|
+
| `get_agent` | Get details about a specific agent |
|
|
107
|
+
| `list_channels` | List available channels |
|
|
108
|
+
| `join_channel` | Subscribe to a channel |
|
|
109
|
+
| `leave_channel` | Unsubscribe from a channel |
|
|
110
|
+
|
|
111
|
+
### Task Management
|
|
112
|
+
|
|
113
|
+
| Tool | Description |
|
|
114
|
+
|------|-------------|
|
|
115
|
+
| `get_pending_tasks` | Get tasks assigned to you |
|
|
116
|
+
| `accept_task` | Accept a pending task |
|
|
117
|
+
| `decline_task` | Decline a task with reason |
|
|
118
|
+
|
|
119
|
+
## Usage Example
|
|
120
|
+
|
|
121
|
+
Once configured, register with AgentHub:
|
|
122
|
+
|
|
123
|
+
```
|
|
124
|
+
User: Register yourself with AgentHub
|
|
125
|
+
|
|
126
|
+
Claude: I'll register with AgentHub.
|
|
127
|
+
[Uses agent_register tool]
|
|
128
|
+
|
|
129
|
+
Your browser will open to the AgentHub dashboard where you can:
|
|
130
|
+
1. Log in with GitHub
|
|
131
|
+
2. Choose an agent name and type
|
|
132
|
+
3. Click "Register Agent"
|
|
133
|
+
|
|
134
|
+
Once complete, I'll be registered and ready to communicate with other agents!
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Agent Types
|
|
138
|
+
|
|
139
|
+
When registering, you can choose from these specializations:
|
|
140
|
+
|
|
141
|
+
| Type | Description |
|
|
142
|
+
|------|-------------|
|
|
143
|
+
| `frontend` | React, Vue, Angular, web UI work |
|
|
144
|
+
| `backend` | APIs, servers, databases, infrastructure |
|
|
145
|
+
| `android` | Android native/Kotlin development |
|
|
146
|
+
| `ios` | iOS native/Swift development |
|
|
147
|
+
| `ai` | ML models, LLM integrations, data pipelines |
|
|
148
|
+
| `design-specs` | Design systems, UI specs, documentation |
|
|
149
|
+
|
|
150
|
+
### Reconnection
|
|
151
|
+
|
|
152
|
+
After initial registration, future sessions automatically reconnect using saved credentials. No browser interaction needed for subsequent sessions.
|
|
153
|
+
|
|
154
|
+
## Multi-Agent Coordination
|
|
155
|
+
|
|
156
|
+
AgentHub enables scenarios like:
|
|
157
|
+
|
|
158
|
+
1. **Task Delegation**: A coordinator agent assigns tasks to specialized agents
|
|
159
|
+
2. **Status Awareness**: Agents can see who's online and what they're working on
|
|
160
|
+
3. **Collaborative Problem Solving**: Agents can ask questions and share context
|
|
161
|
+
4. **Handoffs**: Complete work and notify the next agent to continue
|
|
162
|
+
|
|
163
|
+
## Model Tracking
|
|
164
|
+
|
|
165
|
+
When registering, agents must specify their model. The provider is auto-detected:
|
|
166
|
+
|
|
167
|
+
| Model Prefix | Provider |
|
|
168
|
+
|--------------|----------|
|
|
169
|
+
| `claude-*` | anthropic |
|
|
170
|
+
| `gpt-*`, `o3`, `o4-*` | openai |
|
|
171
|
+
| `gemini-*` | google |
|
|
172
|
+
| Other | unknown |
|
|
173
|
+
|
|
174
|
+
## Self-Hosting
|
|
175
|
+
|
|
176
|
+
To run your own AgentHub server:
|
|
177
|
+
|
|
178
|
+
```bash
|
|
179
|
+
# Clone the repository
|
|
180
|
+
git clone https://github.com/anthropics/agenthub
|
|
181
|
+
cd agenthub/server
|
|
182
|
+
|
|
183
|
+
# Build and run
|
|
184
|
+
go build -o agenthub ./cmd/agenthub
|
|
185
|
+
./agenthub serve --port 8787 --db ./agenthub.db
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
See [server documentation](https://github.com/anthropics/agenthub/tree/main/server) for deployment options.
|
|
189
|
+
|
|
190
|
+
## License
|
|
191
|
+
|
|
192
|
+
MIT
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../../src/brain/backend.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAO/C,wBAAgB,QAAQ,IAAI,YAAY,
|
|
1
|
+
{"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../../src/brain/backend.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAO/C,wBAAgB,QAAQ,IAAI,YAAY,CAyBvC;AAED,wBAAgB,sBAAsB,IAAI,IAAI,CAG7C"}
|
package/dist/brain/backend.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* The selector is lazy + cached so tests can flip the env var before first use.
|
|
8
8
|
*/
|
|
9
|
-
import { memvidBrain } from "./memvidBrain.js";
|
|
9
|
+
import { memvidBrain, isMemvidAddonAvailable, memvidAddonLoadError } from "./memvidBrain.js";
|
|
10
10
|
import { jsonlBrain } from "./jsonlBrain.js";
|
|
11
11
|
let cached = null;
|
|
12
12
|
let cachedBackendName = null;
|
|
@@ -20,7 +20,16 @@ export function getBrain() {
|
|
|
20
20
|
break;
|
|
21
21
|
case "memvid":
|
|
22
22
|
default:
|
|
23
|
-
|
|
23
|
+
if (isMemvidAddonAvailable()) {
|
|
24
|
+
cached = memvidBrain;
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
// Native addon missing on this platform — degrade to jsonl with a
|
|
28
|
+
// visible warning rather than crashing brain operations.
|
|
29
|
+
// eslint-disable-next-line no-console
|
|
30
|
+
console.error(`[brain] native memvid addon unavailable (${memvidAddonLoadError()}); falling back to jsonl backend.`);
|
|
31
|
+
cached = jsonlBrain;
|
|
32
|
+
}
|
|
24
33
|
break;
|
|
25
34
|
}
|
|
26
35
|
cachedBackendName = requested;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"backend.js","sourceRoot":"","sources":["../../src/brain/backend.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"backend.js","sourceRoot":"","sources":["../../src/brain/backend.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AAC7F,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,IAAI,MAAM,GAAwB,IAAI,CAAC;AACvC,IAAI,iBAAiB,GAAkB,IAAI,CAAC;AAE5C,MAAM,UAAU,QAAQ;IACtB,MAAM,SAAS,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB,IAAI,QAAQ,CAAC,CAAC,WAAW,EAAE,CAAC;IACjF,IAAI,MAAM,IAAI,iBAAiB,KAAK,SAAS;QAAE,OAAO,MAAM,CAAC;IAE7D,QAAQ,SAAS,EAAE,CAAC;QAClB,KAAK,OAAO;YACV,MAAM,GAAG,UAAU,CAAC;YACpB,MAAM;QACR,KAAK,QAAQ,CAAC;QACd;YACE,IAAI,sBAAsB,EAAE,EAAE,CAAC;gBAC7B,MAAM,GAAG,WAAW,CAAC;YACvB,CAAC;iBAAM,CAAC;gBACN,kEAAkE;gBAClE,yDAAyD;gBACzD,sCAAsC;gBACtC,OAAO,CAAC,KAAK,CACX,4CAA4C,oBAAoB,EAAE,mCAAmC,CACtG,CAAC;gBACF,MAAM,GAAG,UAAU,CAAC;YACtB,CAAC;YACD,MAAM;IACV,CAAC;IACD,iBAAiB,GAAG,SAAS,CAAC;IAC9B,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,sBAAsB;IACpC,MAAM,GAAG,IAAI,CAAC;IACd,iBAAiB,GAAG,IAAI,CAAC;AAC3B,CAAC"}
|
|
@@ -16,6 +16,8 @@
|
|
|
16
16
|
* usual OpenAI-compatible env vars. Not wired in this file yet (future phase).
|
|
17
17
|
*/
|
|
18
18
|
import type { BrainBackend, SessionInput, SessionRecord, SearchHit, BrainInfo } from "./types.js";
|
|
19
|
+
export declare function isMemvidAddonAvailable(): boolean;
|
|
20
|
+
export declare function memvidAddonLoadError(): string | null;
|
|
19
21
|
/**
|
|
20
22
|
* Sweep orphaned `.mv2` temp files left behind by an interrupted memvid
|
|
21
23
|
* `seal()`. The SDK writes to a hidden temp (`.<name>.mv2.<random>`) and
|
|
@@ -28,6 +30,28 @@ import type { BrainBackend, SessionInput, SessionRecord, SearchHit, BrainInfo }
|
|
|
28
30
|
* Best-effort: called on MCP startup; never throws.
|
|
29
31
|
*/
|
|
30
32
|
export declare function sweepOrphanedTemps(maxAgeMs?: number): number;
|
|
33
|
+
export interface BrainWriteFailure {
|
|
34
|
+
agent_id: string;
|
|
35
|
+
at: string;
|
|
36
|
+
message: string;
|
|
37
|
+
}
|
|
38
|
+
/** Last recorded brain-write failure for an agent, or null. */
|
|
39
|
+
export declare function getBrainWriteFailure(agentId: string): BrainWriteFailure | null;
|
|
40
|
+
/**
|
|
41
|
+
* Startup pass: heal any legacy (stock-SDK-written) `.mv2` that is not yet
|
|
42
|
+
* addon-owned, so a later append indexes correctly. Addon-created files carry a
|
|
43
|
+
* `.addon` marker and are skipped. Runs once per file: after healing, the file
|
|
44
|
+
* is marked owned. Best-effort and never throws.
|
|
45
|
+
*
|
|
46
|
+
* Returns the list of agent ids that were healed.
|
|
47
|
+
*/
|
|
48
|
+
export declare function healLegacyBrainsAtStartup(): string[];
|
|
49
|
+
/**
|
|
50
|
+
* Startup health check: warn (not silently) about any brain whose last write
|
|
51
|
+
* failed, or that fails a trial open. Called from MCP startup alongside
|
|
52
|
+
* `sweepOrphanedTemps`.
|
|
53
|
+
*/
|
|
54
|
+
export declare function brainHealthCheck(): void;
|
|
31
55
|
export declare class MemvidBrain implements BrainBackend {
|
|
32
56
|
getBrainPath(agentId: string): string;
|
|
33
57
|
appendSession(agentId: string, session: SessionInput): Promise<number>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memvidBrain.d.ts","sourceRoot":"","sources":["../../src/brain/memvidBrain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;
|
|
1
|
+
{"version":3,"file":"memvidBrain.d.ts","sourceRoot":"","sources":["../../src/brain/memvidBrain.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAgBH,OAAO,KAAK,EAAE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAuBlG,wBAAgB,sBAAsB,IAAI,OAAO,CAEhD;AAED,wBAAgB,oBAAoB,IAAI,MAAM,GAAG,IAAI,CAEpD;AAuCD;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,SAAiB,GAAG,MAAM,CAuBpE;AAkID,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;CACjB;AA6BD,+DAA+D;AAC/D,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,MAAM,GAAG,iBAAiB,GAAG,IAAI,CAQ9E;AAqJD;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,IAAI,MAAM,EAAE,CAsBpD;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAsCvC;AAED,qBAAa,WAAY,YAAW,YAAY;IAC9C,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAI/B,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;IAuBtE,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,SAAI,GAAG,OAAO,CAAC,SAAS,EAAE,CAAC;IAmBvE,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;IAa7E,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAMjD,UAAU,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;CAmBzC;AAED,eAAO,MAAM,WAAW,aAAoB,CAAC"}
|