+28
-6
@@ -237,7 +237,27 @@ #!/usr/bin/env node | ||
| if (detected.length === 0) { | ||
| detected.push('unknown'); | ||
| detected.push('no-agent'); | ||
| actions.push('No AI agent detected in current directory.'); | ||
| actions.push('Manual setup:'); | ||
| actions.push(' npx agent-obs@latest server # start MCP server'); | ||
| actions.push(' Add agent-obs to your agent MCP config'); | ||
| // Create a starter .mcp.json so they have something to work with | ||
| const mcpJsonPath = path.join(cwd, '.mcp.json'); | ||
| if (!fs.existsSync(mcpJsonPath)) { | ||
| const starter = { mcpServers: { 'agent-obs': { command: 'npx', args: ['-y', 'agent-obs@latest', 'server'] } } }; | ||
| fs.writeFileSync(mcpJsonPath, JSON.stringify(starter, null, 2) + '\n'); | ||
| actions.push('Created .mcp.json with agent-obs pre-configured'); | ||
| } else { | ||
| actions.push('.mcp.json already exists — add agent-obs manually if not present'); | ||
| } | ||
| // Also create a starter instruction file | ||
| const instrPath = path.join(cwd, '.agent-obs-instructions.md'); | ||
| if (!fs.existsSync(instrPath)) { | ||
| fs.writeFileSync(instrPath, `After every tool call, report to agent-obs's log_tool_call. | ||
| Start each task with start_session. End with end_session. | ||
| Never skip log_tool_call — every tool call must be logged.\n`); | ||
| actions.push('Created .agent-obs-instructions.md (self-reporting prompt)'); | ||
| } | ||
| actions.push(''); | ||
| actions.push('Next: paste the config into your agent\'s MCP settings,'); | ||
| actions.push('or run your agent from this directory to auto-detect.'); | ||
| } | ||
@@ -348,2 +368,4 @@ | ||
| if (command === 'demo') { | ||
| const portIdx = args.indexOf('--port'); | ||
| const port = portIdx >= 0 ? parseInt(args[portIdx + 1]) : 9400; | ||
| const { seedDemoSession, getSessions } = require('./database'); | ||
@@ -354,4 +376,4 @@ seedDemoSession(); | ||
| const { exec } = require('child_process'); | ||
| exec('open http://localhost:9400'); | ||
| await startServer(9400); | ||
| exec(`open http://localhost:${port} 2>/dev/null || xdg-open http://localhost:${port} 2>/dev/null`); | ||
| await startServer(port); | ||
| return; | ||
@@ -358,0 +380,0 @@ } |
+1
-1
| { | ||
| "name": "agent-obs", | ||
| "version": "1.0.3", | ||
| "version": "1.0.4", | ||
| "description": "Open source agent observability — see what your agents did, why they failed, and what it cost. Runs locally.", | ||
@@ -5,0 +5,0 @@ "main": "cli.js", |
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
AI-detected potential code anomaly
Supply chain riskAI has identified unusual behaviors that may pose a security risk.
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
106485
1.15%1814
1.06%7
-12.5%