tuna-agent 0.1.97 → 0.1.98
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.
|
@@ -209,7 +209,7 @@ export class ClaudeCodeAdapter {
|
|
|
209
209
|
// Write MCP config to agent folder .mcp.json on first round
|
|
210
210
|
// Claude Code reads .mcp.json automatically for project-level MCPs
|
|
211
211
|
if (round === 0) {
|
|
212
|
-
writeAgentFolderMcpConfig(cwd, this.agentConfig);
|
|
212
|
+
writeAgentFolderMcpConfig(cwd, this.agentConfig, task.agentId);
|
|
213
213
|
// Seed memoryCount from Mem0 so it survives daemon restarts (non-blocking)
|
|
214
214
|
fetchMem0Count(localAgentName).then(count => {
|
|
215
215
|
const m = this.getMetricsForAgent(localAgentId);
|
package/dist/mcp/setup.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export declare function getMcpConfigPath(): string | undefined;
|
|
|
40
40
|
* Claude Code reads .mcp.json automatically for project-level MCPs.
|
|
41
41
|
* Note: .claude/settings.json mcpServers is NOT reliably read by Claude Code CLI.
|
|
42
42
|
*/
|
|
43
|
-
export declare function writeAgentFolderMcpConfig(agentFolderPath: string, config: AgentConfig): void;
|
|
43
|
+
export declare function writeAgentFolderMcpConfig(agentFolderPath: string, config: AgentConfig, agentId?: string): void;
|
|
44
44
|
/**
|
|
45
45
|
* Clean up MCP config file.
|
|
46
46
|
*/
|
package/dist/mcp/setup.js
CHANGED
|
@@ -428,13 +428,15 @@ export function getMcpConfigPath() {
|
|
|
428
428
|
* Claude Code reads .mcp.json automatically for project-level MCPs.
|
|
429
429
|
* Note: .claude/settings.json mcpServers is NOT reliably read by Claude Code CLI.
|
|
430
430
|
*/
|
|
431
|
-
export function writeAgentFolderMcpConfig(agentFolderPath, config) {
|
|
431
|
+
export function writeAgentFolderMcpConfig(agentFolderPath, config, agentId) {
|
|
432
432
|
const knowledgeServerPath = path.join(__dirname, 'knowledge-server.js');
|
|
433
433
|
const ideaServerPath = path.join(__dirname, 'idea-server.js');
|
|
434
434
|
const browserServerPath = path.join(__dirname, 'browser-server.js');
|
|
435
435
|
// Derive agent name from folder path (e.g. ~/agents/co-founder → "co-founder")
|
|
436
436
|
// config.name is the machine name, NOT the agent name
|
|
437
437
|
const agentName = path.basename(agentFolderPath) || config.name;
|
|
438
|
+
// Use per-agent ID if provided, otherwise fall back to machine-level config
|
|
439
|
+
const mcpAgentId = agentId || config.agentId;
|
|
438
440
|
try {
|
|
439
441
|
const mcpJsonPath = path.join(agentFolderPath, '.mcp.json');
|
|
440
442
|
// Read existing .mcp.json to preserve other servers (e.g. playwright)
|
|
@@ -451,7 +453,7 @@ export function writeAgentFolderMcpConfig(agentFolderPath, config) {
|
|
|
451
453
|
knowledgeServerPath,
|
|
452
454
|
'--api-url', config.apiUrl,
|
|
453
455
|
'--token', config.agentToken,
|
|
454
|
-
'--agent-id',
|
|
456
|
+
'--agent-id', mcpAgentId,
|
|
455
457
|
],
|
|
456
458
|
},
|
|
457
459
|
'tuna-idea': {
|
|
@@ -460,7 +462,7 @@ export function writeAgentFolderMcpConfig(agentFolderPath, config) {
|
|
|
460
462
|
ideaServerPath,
|
|
461
463
|
'--api-url', config.apiUrl,
|
|
462
464
|
'--token', config.agentToken,
|
|
463
|
-
'--agent-id',
|
|
465
|
+
'--agent-id', mcpAgentId,
|
|
464
466
|
],
|
|
465
467
|
},
|
|
466
468
|
'tuna-browser': {
|