resolve-solo 0.3.0 → 0.4.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/dist/setup.js ADDED
@@ -0,0 +1,108 @@
1
+ /**
2
+ * Claude Code Integration Setup
3
+ *
4
+ * Automatically configures Claude Code to use resolve-solo MCP server.
5
+ */
6
+ import * as fs from 'node:fs';
7
+ import * as path from 'node:path';
8
+ import * as os from 'node:os';
9
+ import { execSync } from 'node:child_process';
10
+ /**
11
+ * Attempt to automatically configure Claude Code integration
12
+ */
13
+ export function setupClaudeIntegration() {
14
+ // Method 1: Try using `claude mcp add` if available
15
+ try {
16
+ execSync('claude mcp add resolve-solo-mcp', { stdio: 'pipe' });
17
+ return {
18
+ success: true,
19
+ message: 'Successfully configured Claude Code via `claude mcp add`',
20
+ method: 'claude-mcp',
21
+ };
22
+ }
23
+ catch (error) {
24
+ // Claude CLI not available or command failed, try manual config
25
+ }
26
+ // Method 2: Try editing Claude Code config file directly
27
+ const configPaths = [
28
+ path.join(os.homedir(), '.config', 'claude', 'config.json'),
29
+ path.join(os.homedir(), '.claude', 'config.json'),
30
+ path.join(os.homedir(), '.claude.json'),
31
+ ];
32
+ for (const configPath of configPaths) {
33
+ if (fs.existsSync(configPath)) {
34
+ try {
35
+ const config = JSON.parse(fs.readFileSync(configPath, 'utf-8'));
36
+ // Initialize mcpServers if needed
37
+ if (!config.mcpServers) {
38
+ config.mcpServers = {};
39
+ }
40
+ // Add resolve-solo server
41
+ config.mcpServers['resolve-solo'] = {
42
+ command: 'resolve-solo-mcp',
43
+ description: 'On-call investigation assistant for incident response',
44
+ };
45
+ // Write back
46
+ fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
47
+ return {
48
+ success: true,
49
+ message: `Successfully configured Claude Code by editing ${configPath}`,
50
+ method: 'manual-json',
51
+ configPath,
52
+ };
53
+ }
54
+ catch (error) {
55
+ // Config file exists but couldn't be edited, continue to next
56
+ continue;
57
+ }
58
+ }
59
+ }
60
+ // Method 3: Couldn't auto-configure, return manual instructions
61
+ return {
62
+ success: false,
63
+ message: 'Could not auto-configure. Manual setup required.',
64
+ method: 'manual-instructions',
65
+ };
66
+ }
67
+ /**
68
+ * Get manual setup instructions for user
69
+ */
70
+ export function getManualInstructions() {
71
+ return `
72
+ Manual Setup Instructions:
73
+
74
+ 1. Locate your Claude Code configuration file:
75
+ - Linux/Mac: ~/.config/claude/config.json or ~/.claude.json
76
+ - Windows: %USERPROFILE%\\.claude\\config.json
77
+
78
+ 2. Add the resolve-solo MCP server:
79
+ {
80
+ "mcpServers": {
81
+ "resolve-solo": {
82
+ "command": "resolve-solo-mcp",
83
+ "description": "On-call investigation assistant"
84
+ }
85
+ }
86
+ }
87
+
88
+ 3. Restart Claude Code
89
+
90
+ 4. Test by asking: "investigate timeout issues"
91
+
92
+ Alternatively, if your Claude Code CLI supports it:
93
+ claude mcp add resolve-solo-mcp
94
+ `;
95
+ }
96
+ /**
97
+ * Verify that resolve-solo-mcp binary is accessible
98
+ */
99
+ export function verifyBinaryAccessible() {
100
+ try {
101
+ execSync('which resolve-solo-mcp', { stdio: 'pipe' });
102
+ return true;
103
+ }
104
+ catch (error) {
105
+ return false;
106
+ }
107
+ }
108
+ //# sourceMappingURL=setup.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup.js","sourceRoot":"","sources":["../src/setup.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAS9C;;GAEG;AACH,MAAM,UAAU,sBAAsB;IACpC,oDAAoD;IACpD,IAAI,CAAC;QACH,QAAQ,CAAC,iCAAiC,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;QAC/D,OAAO;YACL,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AE,CAAC;gBACf,8DAA8D;gBAC9D,SAAS;YACX,CAAC;QACH,CAAC;IACH,CAAC;IAED,gEAAgE;IAChE,OAAO;QACL,OAAO,EAAE,KAAK;QACd,OAAO,EAAE,kDAAkD;QAC3D,MAAM,EAAE,qBAAqB;KAC9B,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB;IACnC,OAAO;;;;;;;;;;;;;;;;;;;;;;;CAuBR,CAAC;AACF,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB;IACpC,IAAI,CAAC;QACH,QAAQ,CAAC,wBAAwB,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;QACtD,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
package/dist/types.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Core types for Resolve Solo
3
3
  */
4
- export type Intent = 'help' | 'demo' | 'demo-seed' | 'demo-reset' | 'investigate' | 'details' | 'note' | 'close' | 'report-weekly' | 'doctor' | 'uninstall' | 'unknown';
4
+ export type Intent = 'help' | 'demo' | 'demo-seed' | 'demo-reset' | 'investigate' | 'details' | 'note' | 'close' | 'report-weekly' | 'setup' | 'doctor' | 'uninstall' | 'unknown';
5
5
  export interface ParsedCommand {
6
6
  intent: Intent;
7
7
  args: string[];
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,MAAM,GACd,MAAM,GACN,MAAM,GACN,WAAW,GACX,YAAY,GACZ,aAAa,GACb,SAAS,GACT,MAAM,GACN,OAAO,GACP,eAAe,GACf,QAAQ,GACR,WAAW,GACX,SAAS,CAAC;AAEd,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,MAAM,GACd,MAAM,GACN,MAAM,GACN,WAAW,GACX,YAAY,GACZ,aAAa,GACb,SAAS,GACT,MAAM,GACN,OAAO,GACP,eAAe,GACf,OAAO,GACP,QAAQ,GACR,WAAW,GACX,SAAS,CAAC;AAEd,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB"}
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "name": "resolve-solo",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Local-first CLI on-call assistant for individual engineers",
5
5
  "main": "./dist/index.js",
6
6
  "type": "module",
7
7
  "bin": {
8
- "resolveai": "./dist/cli.js"
8
+ "resolveai": "./dist/cli.js",
9
+ "resolve-solo-mcp": "./dist/mcp-cli.js"
9
10
  },
10
11
  "scripts": {
11
12
  "dev": "tsx src/cli.ts",
@@ -42,7 +43,9 @@
42
43
  },
43
44
  "dependencies": {
44
45
  "chalk": "^5.3.0",
45
- "commander": "^12.1.0"
46
+ "commander": "^12.1.0",
47
+ "@modelcontextprotocol/sdk": "^0.5.0",
48
+ "zod": "^3.23.8"
46
49
  },
47
50
  "optionalDependencies": {
48
51
  "better-sqlite3": "^11.7.0"