nex-level-code 0.1.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/commands/doctor.d.ts +3 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +164 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/install.d.ts +3 -0
- package/dist/commands/install.d.ts.map +1 -0
- package/dist/commands/install.js +31 -0
- package/dist/commands/install.js.map +1 -0
- package/dist/commands/mcp.d.ts +3 -0
- package/dist/commands/mcp.d.ts.map +1 -0
- package/dist/commands/mcp.js +56 -0
- package/dist/commands/mcp.js.map +1 -0
- package/dist/commands/status.d.ts +3 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +142 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/uninstall.d.ts +3 -0
- package/dist/commands/uninstall.d.ts.map +1 -0
- package/dist/commands/uninstall.js +114 -0
- package/dist/commands/uninstall.js.map +1 -0
- package/dist/commands/update.d.ts +3 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +26 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/mcp/server.d.ts +12 -0
- package/dist/mcp/server.d.ts.map +1 -0
- package/dist/mcp/server.js +270 -0
- package/dist/mcp/server.js.map +1 -0
- package/dist/registry/tools.d.ts +64 -0
- package/dist/registry/tools.d.ts.map +1 -0
- package/dist/registry/tools.js +212 -0
- package/dist/registry/tools.js.map +1 -0
- package/dist/services/install.d.ts +36 -0
- package/dist/services/install.d.ts.map +1 -0
- package/dist/services/install.js +371 -0
- package/dist/services/install.js.map +1 -0
- package/package.json +57 -0
- package/templates/hooks/dev-logger.js +252 -0
- package/templates/hooks/memory-check.js +64 -0
- package/templates/hooks/session-start.js +115 -0
- package/templates/rules/claude.md +27 -0
- package/templates/rules/cursor.md +27 -0
- package/templates/starters/MEMORY.md +23 -0
- package/templates/starters/session-handoff.md +19 -0
package/dist/index.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const commander_1 = require("commander");
|
|
5
|
+
const install_1 = require("./commands/install");
|
|
6
|
+
const status_1 = require("./commands/status");
|
|
7
|
+
const doctor_1 = require("./commands/doctor");
|
|
8
|
+
const update_1 = require("./commands/update");
|
|
9
|
+
const uninstall_1 = require("./commands/uninstall");
|
|
10
|
+
const mcp_1 = require("./commands/mcp");
|
|
11
|
+
const program = new commander_1.Command();
|
|
12
|
+
program
|
|
13
|
+
.name('nlc')
|
|
14
|
+
.description('Nex Level Code (NLC) — 1-click setup for AI coding agent infrastructure')
|
|
15
|
+
.version('0.1.0');
|
|
16
|
+
(0, install_1.registerInstallCommand)(program);
|
|
17
|
+
(0, status_1.registerStatusCommand)(program);
|
|
18
|
+
(0, doctor_1.registerDoctorCommand)(program);
|
|
19
|
+
(0, update_1.registerUpdateCommand)(program);
|
|
20
|
+
(0, uninstall_1.registerUninstallCommand)(program);
|
|
21
|
+
(0, mcp_1.registerMcpCommand)(program);
|
|
22
|
+
program.parse();
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAEA,yCAAoC;AACpC,gDAA4D;AAC5D,8CAA0D;AAC1D,8CAA0D;AAC1D,8CAA0D;AAC1D,oDAAgE;AAChE,wCAAoD;AAEpD,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACJ,IAAI,CAAC,KAAK,CAAC;KACX,WAAW,CAAC,yEAAyE,CAAC;KACtF,OAAO,CAAC,OAAO,CAAC,CAAC;AAEpB,IAAA,gCAAsB,EAAC,OAAO,CAAC,CAAC;AAChC,IAAA,8BAAqB,EAAC,OAAO,CAAC,CAAC;AAC/B,IAAA,8BAAqB,EAAC,OAAO,CAAC,CAAC;AAC/B,IAAA,8BAAqB,EAAC,OAAO,CAAC,CAAC;AAC/B,IAAA,oCAAwB,EAAC,OAAO,CAAC,CAAC;AAClC,IAAA,wBAAkB,EAAC,OAAO,CAAC,CAAC;AAE5B,OAAO,CAAC,KAAK,EAAE,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NLC MCP Server — Model Context Protocol server for in-session agent tools.
|
|
3
|
+
*
|
|
4
|
+
* Exposes tools that let the agent check NLC status, read/update memory,
|
|
5
|
+
* and manage session handoffs.
|
|
6
|
+
*/
|
|
7
|
+
interface McpOptions {
|
|
8
|
+
verbose?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function startMcpServer(options?: McpOptions): Promise<void>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AASH,UAAU,UAAU;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAkCD,wBAAsB,cAAc,CAAC,OAAO,GAAE,UAAe,GAAG,OAAO,CAAC,IAAI,CAAC,CAqN5E"}
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* NLC MCP Server — Model Context Protocol server for in-session agent tools.
|
|
4
|
+
*
|
|
5
|
+
* Exposes tools that let the agent check NLC status, read/update memory,
|
|
6
|
+
* and manage session handoffs.
|
|
7
|
+
*/
|
|
8
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
+
if (k2 === undefined) k2 = k;
|
|
10
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
13
|
+
}
|
|
14
|
+
Object.defineProperty(o, k2, desc);
|
|
15
|
+
}) : (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
o[k2] = m[k];
|
|
18
|
+
}));
|
|
19
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
20
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
21
|
+
}) : function(o, v) {
|
|
22
|
+
o["default"] = v;
|
|
23
|
+
});
|
|
24
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
+
var ownKeys = function(o) {
|
|
26
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
+
var ar = [];
|
|
28
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
+
return ar;
|
|
30
|
+
};
|
|
31
|
+
return ownKeys(o);
|
|
32
|
+
};
|
|
33
|
+
return function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
})();
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
exports.startMcpServer = startMcpServer;
|
|
43
|
+
const mcp_js_1 = require("@modelcontextprotocol/sdk/server/mcp.js");
|
|
44
|
+
const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
45
|
+
const zod_1 = require("zod");
|
|
46
|
+
const fs = __importStar(require("fs-extra"));
|
|
47
|
+
const path = __importStar(require("path"));
|
|
48
|
+
const os = __importStar(require("os"));
|
|
49
|
+
function log(options, ...args) {
|
|
50
|
+
if (options.verbose) {
|
|
51
|
+
process.stderr.write(`[nlc-mcp] ${args.join(' ')}\n`);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
function cwdToProjectKey(cwd) {
|
|
55
|
+
return cwd
|
|
56
|
+
.replace(/\\/g, '-')
|
|
57
|
+
.replace(/\//g, '-')
|
|
58
|
+
.replace(/:/g, '-')
|
|
59
|
+
.replace(/_/g, '-')
|
|
60
|
+
.replace(/^([a-z])/, (m) => m.toUpperCase());
|
|
61
|
+
}
|
|
62
|
+
function getMemoryDir(cwd) {
|
|
63
|
+
const home = os.homedir();
|
|
64
|
+
const key = cwdToProjectKey(cwd);
|
|
65
|
+
const lowerKey = key.replace(/^([A-Z])/, (m) => m.toLowerCase());
|
|
66
|
+
const candidates = [
|
|
67
|
+
path.join(home, '.claude', 'projects', lowerKey, 'memory'),
|
|
68
|
+
path.join(home, '.claude', 'projects', key, 'memory'),
|
|
69
|
+
path.join(home, '.nlc', 'projects', lowerKey),
|
|
70
|
+
];
|
|
71
|
+
for (const p of candidates) {
|
|
72
|
+
if (fs.pathExistsSync(p))
|
|
73
|
+
return p;
|
|
74
|
+
}
|
|
75
|
+
return candidates[0];
|
|
76
|
+
}
|
|
77
|
+
async function startMcpServer(options = {}) {
|
|
78
|
+
const server = new mcp_js_1.McpServer({
|
|
79
|
+
name: 'nex-level-code',
|
|
80
|
+
version: '0.1.0',
|
|
81
|
+
});
|
|
82
|
+
// ─── Tool: nlc-status ────────────────────────────────────────
|
|
83
|
+
server.registerTool('nlc-status', {
|
|
84
|
+
description: 'Check NLC installation status. Returns which components are installed and healthy.',
|
|
85
|
+
inputSchema: {
|
|
86
|
+
cwd: zod_1.z.string().optional().describe('Project working directory (defaults to process.cwd())'),
|
|
87
|
+
},
|
|
88
|
+
}, async (params) => {
|
|
89
|
+
const cwd = params.cwd || process.cwd();
|
|
90
|
+
const home = os.homedir();
|
|
91
|
+
const checks = {};
|
|
92
|
+
// Check Claude Code hooks
|
|
93
|
+
const scriptsDir = path.join(home, '.claude', 'scripts');
|
|
94
|
+
const scripts = ['nlc-session-start.js', 'nlc-memory-check.js', 'nlc-dev-logger.js'];
|
|
95
|
+
let installed = 0;
|
|
96
|
+
for (const s of scripts) {
|
|
97
|
+
if (await fs.pathExists(path.join(scriptsDir, s)))
|
|
98
|
+
installed++;
|
|
99
|
+
}
|
|
100
|
+
checks['hook_scripts'] = `${installed}/${scripts.length} installed`;
|
|
101
|
+
// Check memory files
|
|
102
|
+
const memoryDir = getMemoryDir(cwd);
|
|
103
|
+
checks['memory_dir'] = memoryDir;
|
|
104
|
+
checks['session_handoff'] = await fs.pathExists(path.join(memoryDir, 'session-handoff.md')) ? 'exists' : 'missing';
|
|
105
|
+
checks['memory_md'] = await fs.pathExists(path.join(memoryDir, 'MEMORY.md')) ? 'exists' : 'missing';
|
|
106
|
+
// Check today's dev log
|
|
107
|
+
const today = new Date().toISOString().split('T')[0];
|
|
108
|
+
const devLog = path.join(memoryDir, `${today}.md`);
|
|
109
|
+
checks['dev_log_today'] = await fs.pathExists(devLog) ? 'exists' : 'none yet';
|
|
110
|
+
return {
|
|
111
|
+
content: [{ type: 'text', text: JSON.stringify(checks, null, 2) }],
|
|
112
|
+
};
|
|
113
|
+
});
|
|
114
|
+
// ─── Tool: nlc-handoff ───────────────────────────────────────
|
|
115
|
+
server.registerTool('nlc-handoff', {
|
|
116
|
+
description: 'Read or update the session handoff file. Use action "read" to get current content, "update" to write new content.',
|
|
117
|
+
inputSchema: {
|
|
118
|
+
action: zod_1.z.enum(['read', 'update']).describe('Action to perform'),
|
|
119
|
+
cwd: zod_1.z.string().optional().describe('Project working directory'),
|
|
120
|
+
content: zod_1.z.string().optional().describe('New content for the handoff file (required for "update")'),
|
|
121
|
+
},
|
|
122
|
+
}, async (params) => {
|
|
123
|
+
const cwd = params.cwd || process.cwd();
|
|
124
|
+
const memoryDir = getMemoryDir(cwd);
|
|
125
|
+
const handoffPath = path.join(memoryDir, 'session-handoff.md');
|
|
126
|
+
if (params.action === 'read') {
|
|
127
|
+
if (!await fs.pathExists(handoffPath)) {
|
|
128
|
+
return { content: [{ type: 'text', text: 'No session-handoff.md found. Run `nlc install` to create one.' }] };
|
|
129
|
+
}
|
|
130
|
+
const content = await fs.readFile(handoffPath, 'utf-8');
|
|
131
|
+
return { content: [{ type: 'text', text: content }] };
|
|
132
|
+
}
|
|
133
|
+
if (params.action === 'update') {
|
|
134
|
+
if (!params.content) {
|
|
135
|
+
return { content: [{ type: 'text', text: 'Error: content is required for update action.' }] };
|
|
136
|
+
}
|
|
137
|
+
await fs.ensureDir(memoryDir);
|
|
138
|
+
await fs.writeFile(handoffPath, params.content);
|
|
139
|
+
return { content: [{ type: 'text', text: `session-handoff.md updated (${params.content.length} chars).` }] };
|
|
140
|
+
}
|
|
141
|
+
return { content: [{ type: 'text', text: 'Unknown action.' }] };
|
|
142
|
+
});
|
|
143
|
+
// ─── Tool: nlc-memory ────────────────────────────────────────
|
|
144
|
+
server.registerTool('nlc-memory', {
|
|
145
|
+
description: 'Read or update MEMORY.md. Use action "read" to get current content, "update" to write new content.',
|
|
146
|
+
inputSchema: {
|
|
147
|
+
action: zod_1.z.enum(['read', 'update']).describe('Action to perform'),
|
|
148
|
+
cwd: zod_1.z.string().optional().describe('Project working directory'),
|
|
149
|
+
content: zod_1.z.string().optional().describe('New content for MEMORY.md (required for "update")'),
|
|
150
|
+
},
|
|
151
|
+
}, async (params) => {
|
|
152
|
+
const cwd = params.cwd || process.cwd();
|
|
153
|
+
const memoryDir = getMemoryDir(cwd);
|
|
154
|
+
const memoryPath = path.join(memoryDir, 'MEMORY.md');
|
|
155
|
+
if (params.action === 'read') {
|
|
156
|
+
if (!await fs.pathExists(memoryPath)) {
|
|
157
|
+
return { content: [{ type: 'text', text: 'No MEMORY.md found. Run `nlc install` to create one.' }] };
|
|
158
|
+
}
|
|
159
|
+
const content = await fs.readFile(memoryPath, 'utf-8');
|
|
160
|
+
return { content: [{ type: 'text', text: content }] };
|
|
161
|
+
}
|
|
162
|
+
if (params.action === 'update') {
|
|
163
|
+
if (!params.content) {
|
|
164
|
+
return { content: [{ type: 'text', text: 'Error: content is required for update action.' }] };
|
|
165
|
+
}
|
|
166
|
+
await fs.ensureDir(memoryDir);
|
|
167
|
+
await fs.writeFile(memoryPath, params.content);
|
|
168
|
+
return { content: [{ type: 'text', text: `MEMORY.md updated (${params.content.length} chars).` }] };
|
|
169
|
+
}
|
|
170
|
+
return { content: [{ type: 'text', text: 'Unknown action.' }] };
|
|
171
|
+
});
|
|
172
|
+
// ─── Tool: nlc-log ───────────────────────────────────────────
|
|
173
|
+
server.registerTool('nlc-log', {
|
|
174
|
+
description: 'Read development logs. Returns today\'s log by default, or specify a date.',
|
|
175
|
+
inputSchema: {
|
|
176
|
+
cwd: zod_1.z.string().optional().describe('Project working directory'),
|
|
177
|
+
date: zod_1.z.string().optional().describe('Date to read (YYYY-MM-DD format). Defaults to today.'),
|
|
178
|
+
days: zod_1.z.number().optional().describe('Number of recent days to include. Defaults to 1.'),
|
|
179
|
+
},
|
|
180
|
+
}, async (params) => {
|
|
181
|
+
const cwd = params.cwd || process.cwd();
|
|
182
|
+
const memoryDir = getMemoryDir(cwd);
|
|
183
|
+
const daysBack = params.days || 1;
|
|
184
|
+
const logs = [];
|
|
185
|
+
for (let i = 0; i < daysBack; i++) {
|
|
186
|
+
const d = new Date();
|
|
187
|
+
d.setDate(d.getDate() - i);
|
|
188
|
+
const dateStr = params.date && i === 0 ? params.date : d.toISOString().split('T')[0];
|
|
189
|
+
const logPath = path.join(memoryDir, `${dateStr}.md`);
|
|
190
|
+
if (await fs.pathExists(logPath)) {
|
|
191
|
+
const content = await fs.readFile(logPath, 'utf-8');
|
|
192
|
+
logs.push(content);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
if (logs.length === 0) {
|
|
196
|
+
return { content: [{ type: 'text', text: 'No development logs found.' }] };
|
|
197
|
+
}
|
|
198
|
+
return { content: [{ type: 'text', text: logs.join('\n\n') }] };
|
|
199
|
+
});
|
|
200
|
+
// ─── Tool: nlc-doctor ────────────────────────────────────────
|
|
201
|
+
server.registerTool('nlc-doctor', {
|
|
202
|
+
description: 'Run NLC health checks and report any issues.',
|
|
203
|
+
inputSchema: {
|
|
204
|
+
cwd: zod_1.z.string().optional().describe('Project working directory'),
|
|
205
|
+
},
|
|
206
|
+
}, async (params) => {
|
|
207
|
+
const cwd = params.cwd || process.cwd();
|
|
208
|
+
const home = os.homedir();
|
|
209
|
+
const issues = [];
|
|
210
|
+
const healthy = [];
|
|
211
|
+
// Check scripts
|
|
212
|
+
const scriptsDir = path.join(home, '.claude', 'scripts');
|
|
213
|
+
const scripts = ['nlc-session-start.js', 'nlc-memory-check.js', 'nlc-dev-logger.js'];
|
|
214
|
+
for (const s of scripts) {
|
|
215
|
+
if (await fs.pathExists(path.join(scriptsDir, s))) {
|
|
216
|
+
healthy.push(`Script ${s}: installed`);
|
|
217
|
+
}
|
|
218
|
+
else {
|
|
219
|
+
issues.push(`Script ${s}: MISSING`);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
// Check settings
|
|
223
|
+
const settingsPath = path.join(home, '.claude', 'settings.json');
|
|
224
|
+
if (await fs.pathExists(settingsPath)) {
|
|
225
|
+
try {
|
|
226
|
+
const settings = await fs.readJSON(settingsPath);
|
|
227
|
+
healthy.push('Settings file: valid');
|
|
228
|
+
// Check hooks
|
|
229
|
+
const hooks = settings.hooks || {};
|
|
230
|
+
let nlcHooks = 0;
|
|
231
|
+
for (const [, hookGroups] of Object.entries(hooks)) {
|
|
232
|
+
for (const group of hookGroups) {
|
|
233
|
+
for (const h of group.hooks || []) {
|
|
234
|
+
if (h.command?.includes('nlc-'))
|
|
235
|
+
nlcHooks++;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
if (nlcHooks > 0) {
|
|
240
|
+
healthy.push(`Hooks: ${nlcHooks} registered`);
|
|
241
|
+
}
|
|
242
|
+
else {
|
|
243
|
+
issues.push('Hooks: no NLC hooks registered');
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
catch {
|
|
247
|
+
issues.push('Settings file: invalid JSON');
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
else {
|
|
251
|
+
issues.push('Settings file: MISSING');
|
|
252
|
+
}
|
|
253
|
+
const report = [
|
|
254
|
+
'# NLC Health Check',
|
|
255
|
+
'',
|
|
256
|
+
`Issues: ${issues.length}`,
|
|
257
|
+
`Healthy: ${healthy.length}`,
|
|
258
|
+
'',
|
|
259
|
+
...issues.map(i => `❌ ${i}`),
|
|
260
|
+
...healthy.map(h => `✅ ${h}`),
|
|
261
|
+
].join('\n');
|
|
262
|
+
return { content: [{ type: 'text', text: report }] };
|
|
263
|
+
});
|
|
264
|
+
// ─── Start server ────────────────────────────────────────────
|
|
265
|
+
log(options, 'Starting NLC MCP server...');
|
|
266
|
+
const transport = new stdio_js_1.StdioServerTransport();
|
|
267
|
+
await server.connect(transport);
|
|
268
|
+
log(options, 'NLC MCP server running.');
|
|
269
|
+
}
|
|
270
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/mcp/server.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA6CH,wCAqNC;AAhQD,oEAAoE;AACpE,wEAAiF;AACjF,6BAAwB;AACxB,6CAA+B;AAC/B,2CAA6B;AAC7B,uCAAyB;AAMzB,SAAS,GAAG,CAAC,OAAmB,EAAE,GAAG,IAAW;IAC9C,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;QACpB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,aAAa,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACxD,CAAC;AACH,CAAC;AAED,SAAS,eAAe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S,GAAG,IAAI,+BAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,GAAG,CAAC,OAAO,EAAE,yBAAyB,CAAC,CAAC;AAC1C,CAAC"}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unified Tool Registry — Single source of truth for all AI coding tools.
|
|
3
|
+
*
|
|
4
|
+
* Maps each tool to its config paths so NLC can install to the right locations.
|
|
5
|
+
* Inspired by @ai-coders/context tool registry pattern.
|
|
6
|
+
*/
|
|
7
|
+
export interface ToolDefinition {
|
|
8
|
+
id: string;
|
|
9
|
+
displayName: string;
|
|
10
|
+
/** How to detect if this tool is in use */
|
|
11
|
+
detection: {
|
|
12
|
+
/** Directories to check for (relative to home or project) */
|
|
13
|
+
globalDirs: string[];
|
|
14
|
+
/** Files to check for (relative to project root) */
|
|
15
|
+
projectFiles: string[];
|
|
16
|
+
};
|
|
17
|
+
/** Where NLC installs its pieces */
|
|
18
|
+
paths: {
|
|
19
|
+
/** Directory for hook scripts (global) */
|
|
20
|
+
scriptsDir: string;
|
|
21
|
+
/** Settings/config file for hook registration (global) */
|
|
22
|
+
settingsFile: string;
|
|
23
|
+
/** Rules/instructions file (project-level) */
|
|
24
|
+
rulesFile: string;
|
|
25
|
+
/** MCP config file (project-level) */
|
|
26
|
+
mcpConfigFile: string;
|
|
27
|
+
/** Memory/context directory (global, per-project) */
|
|
28
|
+
memoryDir: string;
|
|
29
|
+
};
|
|
30
|
+
/** Hook system capabilities */
|
|
31
|
+
hooks: {
|
|
32
|
+
/** Does this tool support lifecycle hooks? */
|
|
33
|
+
supported: boolean;
|
|
34
|
+
/** Hook event names this tool recognizes */
|
|
35
|
+
events: string[];
|
|
36
|
+
/** Format of the settings file */
|
|
37
|
+
settingsFormat: 'json' | 'yaml' | 'toml';
|
|
38
|
+
};
|
|
39
|
+
/** Permission system */
|
|
40
|
+
permissions: {
|
|
41
|
+
/** Does this tool have a permission allow-list? */
|
|
42
|
+
supported: boolean;
|
|
43
|
+
/** Permission entries to auto-approve */
|
|
44
|
+
allowList: string[];
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
export declare const TOOL_REGISTRY: ToolDefinition[];
|
|
48
|
+
/**
|
|
49
|
+
* Detect which AI tools are installed on this machine.
|
|
50
|
+
*/
|
|
51
|
+
export declare function detectInstalledTools(): ToolDefinition[];
|
|
52
|
+
/**
|
|
53
|
+
* Get a tool definition by ID.
|
|
54
|
+
*/
|
|
55
|
+
export declare function getToolById(id: string): ToolDefinition | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* Get all tool IDs.
|
|
58
|
+
*/
|
|
59
|
+
export declare function getAllToolIds(): string[];
|
|
60
|
+
/**
|
|
61
|
+
* Get tools that support hooks (the full NLC experience).
|
|
62
|
+
*/
|
|
63
|
+
export declare function getToolsWithHooks(): ToolDefinition[];
|
|
64
|
+
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/registry/tools.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,MAAM,CAAC;IACpB,2CAA2C;IAC3C,SAAS,EAAE;QACT,6DAA6D;QAC7D,UAAU,EAAE,MAAM,EAAE,CAAC;QACrB,oDAAoD;QACpD,YAAY,EAAE,MAAM,EAAE,CAAC;KACxB,CAAC;IACF,oCAAoC;IACpC,KAAK,EAAE;QACL,0CAA0C;QAC1C,UAAU,EAAE,MAAM,CAAC;QACnB,0DAA0D;QAC1D,YAAY,EAAE,MAAM,CAAC;QACrB,8CAA8C;QAC9C,SAAS,EAAE,MAAM,CAAC;QAClB,sCAAsC;QACtC,aAAa,EAAE,MAAM,CAAC;QACtB,qDAAqD;QACrD,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;IACF,+BAA+B;IAC/B,KAAK,EAAE;QACL,8CAA8C;QAC9C,SAAS,EAAE,OAAO,CAAC;QACnB,4CAA4C;QAC5C,MAAM,EAAE,MAAM,EAAE,CAAC;QACjB,kCAAkC;QAClC,cAAc,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;KAC1C,CAAC;IACF,wBAAwB;IACxB,WAAW,EAAE;QACX,mDAAmD;QACnD,SAAS,EAAE,OAAO,CAAC;QACnB,yCAAyC;QACzC,SAAS,EAAE,MAAM,EAAE,CAAC;KACrB,CAAC;CACH;AAID,eAAO,MAAM,aAAa,EAAE,cAAc,EAqIzC,CAAC;AAEF;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,cAAc,EAAE,CASvD;AAED;;GAEG;AACH,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAElE;AAED;;GAEG;AACH,wBAAgB,aAAa,IAAI,MAAM,EAAE,CAExC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,cAAc,EAAE,CAEpD"}
|
|
@@ -0,0 +1,212 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Unified Tool Registry — Single source of truth for all AI coding tools.
|
|
4
|
+
*
|
|
5
|
+
* Maps each tool to its config paths so NLC can install to the right locations.
|
|
6
|
+
* Inspired by @ai-coders/context tool registry pattern.
|
|
7
|
+
*/
|
|
8
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
+
if (k2 === undefined) k2 = k;
|
|
10
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
13
|
+
}
|
|
14
|
+
Object.defineProperty(o, k2, desc);
|
|
15
|
+
}) : (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
o[k2] = m[k];
|
|
18
|
+
}));
|
|
19
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
20
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
21
|
+
}) : function(o, v) {
|
|
22
|
+
o["default"] = v;
|
|
23
|
+
});
|
|
24
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
+
var ownKeys = function(o) {
|
|
26
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
+
var ar = [];
|
|
28
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
+
return ar;
|
|
30
|
+
};
|
|
31
|
+
return ownKeys(o);
|
|
32
|
+
};
|
|
33
|
+
return function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
39
|
+
};
|
|
40
|
+
})();
|
|
41
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
+
exports.TOOL_REGISTRY = void 0;
|
|
43
|
+
exports.detectInstalledTools = detectInstalledTools;
|
|
44
|
+
exports.getToolById = getToolById;
|
|
45
|
+
exports.getAllToolIds = getAllToolIds;
|
|
46
|
+
exports.getToolsWithHooks = getToolsWithHooks;
|
|
47
|
+
const os = __importStar(require("os"));
|
|
48
|
+
const path = __importStar(require("path"));
|
|
49
|
+
const HOME = os.homedir();
|
|
50
|
+
exports.TOOL_REGISTRY = [
|
|
51
|
+
// ─── Claude Code ───────────────────────────────────────────────
|
|
52
|
+
{
|
|
53
|
+
id: 'claude',
|
|
54
|
+
displayName: 'Claude Code',
|
|
55
|
+
detection: {
|
|
56
|
+
globalDirs: [path.join(HOME, '.claude')],
|
|
57
|
+
projectFiles: ['CLAUDE.md', '.claude/settings.json'],
|
|
58
|
+
},
|
|
59
|
+
paths: {
|
|
60
|
+
scriptsDir: path.join(HOME, '.claude', 'scripts'),
|
|
61
|
+
settingsFile: path.join(HOME, '.claude', 'settings.json'),
|
|
62
|
+
rulesFile: 'CLAUDE.md',
|
|
63
|
+
mcpConfigFile: '.mcp.json',
|
|
64
|
+
memoryDir: path.join(HOME, '.claude', 'projects'),
|
|
65
|
+
},
|
|
66
|
+
hooks: {
|
|
67
|
+
supported: true,
|
|
68
|
+
events: ['SessionStart', 'UserPromptSubmit', 'Stop', 'PreCompact', 'SessionEnd'],
|
|
69
|
+
settingsFormat: 'json',
|
|
70
|
+
},
|
|
71
|
+
permissions: {
|
|
72
|
+
supported: true,
|
|
73
|
+
allowList: [
|
|
74
|
+
'Bash(*)', 'Read(*)', 'Edit(*)', 'Write(*)',
|
|
75
|
+
'Grep(*)', 'Glob(*)', 'WebFetch(*)', 'WebSearch(*)',
|
|
76
|
+
],
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
// ─── Cursor AI ─────────────────────────────────────────────────
|
|
80
|
+
{
|
|
81
|
+
id: 'cursor',
|
|
82
|
+
displayName: 'Cursor AI',
|
|
83
|
+
detection: {
|
|
84
|
+
globalDirs: [path.join(HOME, '.cursor')],
|
|
85
|
+
projectFiles: ['.cursorrules', '.cursor/rules'],
|
|
86
|
+
},
|
|
87
|
+
paths: {
|
|
88
|
+
scriptsDir: path.join(HOME, '.cursor', 'scripts'),
|
|
89
|
+
settingsFile: path.join(HOME, '.cursor', 'settings.json'),
|
|
90
|
+
rulesFile: '.cursorrules',
|
|
91
|
+
mcpConfigFile: '.cursor/mcp.json',
|
|
92
|
+
memoryDir: path.join(HOME, '.cursor', 'projects'),
|
|
93
|
+
},
|
|
94
|
+
hooks: {
|
|
95
|
+
supported: false, // Cursor doesn't have lifecycle hooks yet
|
|
96
|
+
events: [],
|
|
97
|
+
settingsFormat: 'json',
|
|
98
|
+
},
|
|
99
|
+
permissions: {
|
|
100
|
+
supported: false,
|
|
101
|
+
allowList: [],
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
// ─── GitHub Copilot ────────────────────────────────────────────
|
|
105
|
+
{
|
|
106
|
+
id: 'github',
|
|
107
|
+
displayName: 'GitHub Copilot',
|
|
108
|
+
detection: {
|
|
109
|
+
globalDirs: [],
|
|
110
|
+
projectFiles: ['.github/copilot-instructions.md'],
|
|
111
|
+
},
|
|
112
|
+
paths: {
|
|
113
|
+
scriptsDir: '', // No hook scripts support
|
|
114
|
+
settingsFile: '',
|
|
115
|
+
rulesFile: '.github/copilot-instructions.md',
|
|
116
|
+
mcpConfigFile: '.github/mcp.json',
|
|
117
|
+
memoryDir: '',
|
|
118
|
+
},
|
|
119
|
+
hooks: {
|
|
120
|
+
supported: false,
|
|
121
|
+
events: [],
|
|
122
|
+
settingsFormat: 'json',
|
|
123
|
+
},
|
|
124
|
+
permissions: {
|
|
125
|
+
supported: false,
|
|
126
|
+
allowList: [],
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
// ─── Windsurf (Codeium) ────────────────────────────────────────
|
|
130
|
+
{
|
|
131
|
+
id: 'windsurf',
|
|
132
|
+
displayName: 'Windsurf (Codeium)',
|
|
133
|
+
detection: {
|
|
134
|
+
globalDirs: [path.join(HOME, '.windsurf')],
|
|
135
|
+
projectFiles: ['.windsurfrules'],
|
|
136
|
+
},
|
|
137
|
+
paths: {
|
|
138
|
+
scriptsDir: path.join(HOME, '.windsurf', 'scripts'),
|
|
139
|
+
settingsFile: path.join(HOME, '.windsurf', 'settings.json'),
|
|
140
|
+
rulesFile: '.windsurfrules',
|
|
141
|
+
mcpConfigFile: '.windsurf/mcp.json',
|
|
142
|
+
memoryDir: path.join(HOME, '.windsurf', 'projects'),
|
|
143
|
+
},
|
|
144
|
+
hooks: {
|
|
145
|
+
supported: false,
|
|
146
|
+
events: [],
|
|
147
|
+
settingsFormat: 'json',
|
|
148
|
+
},
|
|
149
|
+
permissions: {
|
|
150
|
+
supported: false,
|
|
151
|
+
allowList: [],
|
|
152
|
+
},
|
|
153
|
+
},
|
|
154
|
+
// ─── OpenAI Codex ──────────────────────────────────────────────
|
|
155
|
+
{
|
|
156
|
+
id: 'codex',
|
|
157
|
+
displayName: 'OpenAI Codex CLI',
|
|
158
|
+
detection: {
|
|
159
|
+
globalDirs: [path.join(HOME, '.codex')],
|
|
160
|
+
projectFiles: ['AGENTS.md', '.codex/config.json'],
|
|
161
|
+
},
|
|
162
|
+
paths: {
|
|
163
|
+
scriptsDir: '',
|
|
164
|
+
settingsFile: path.join(HOME, '.codex', 'config.json'),
|
|
165
|
+
rulesFile: 'AGENTS.md',
|
|
166
|
+
mcpConfigFile: '.codex/mcp.json',
|
|
167
|
+
memoryDir: '',
|
|
168
|
+
},
|
|
169
|
+
hooks: {
|
|
170
|
+
supported: false,
|
|
171
|
+
events: [],
|
|
172
|
+
settingsFormat: 'json',
|
|
173
|
+
},
|
|
174
|
+
permissions: {
|
|
175
|
+
supported: false,
|
|
176
|
+
allowList: [],
|
|
177
|
+
},
|
|
178
|
+
},
|
|
179
|
+
];
|
|
180
|
+
/**
|
|
181
|
+
* Detect which AI tools are installed on this machine.
|
|
182
|
+
*/
|
|
183
|
+
function detectInstalledTools() {
|
|
184
|
+
const fs = require('fs-extra');
|
|
185
|
+
return exports.TOOL_REGISTRY.filter(tool => {
|
|
186
|
+
// Check global directories
|
|
187
|
+
for (const dir of tool.detection.globalDirs) {
|
|
188
|
+
if (fs.pathExistsSync(dir))
|
|
189
|
+
return true;
|
|
190
|
+
}
|
|
191
|
+
return false;
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Get a tool definition by ID.
|
|
196
|
+
*/
|
|
197
|
+
function getToolById(id) {
|
|
198
|
+
return exports.TOOL_REGISTRY.find(t => t.id === id);
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Get all tool IDs.
|
|
202
|
+
*/
|
|
203
|
+
function getAllToolIds() {
|
|
204
|
+
return exports.TOOL_REGISTRY.map(t => t.id);
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Get tools that support hooks (the full NLC experience).
|
|
208
|
+
*/
|
|
209
|
+
function getToolsWithHooks() {
|
|
210
|
+
return exports.TOOL_REGISTRY.filter(t => t.hooks.supported);
|
|
211
|
+
}
|
|
212
|
+
//# sourceMappingURL=tools.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tools.js","sourceRoot":"","sources":["../../src/registry/tools.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0LH,oDASC;AAKD,kCAEC;AAKD,sCAEC;AAKD,8CAEC;AAtND,uCAAyB;AACzB,2CAA6B;AA2C7B,MAAM,IAAI,GAAG,EAAE,CAAC,OAAO,EAAE,CAAC;AAEb,QAAA,aAAa,GAAqB;IAC7C,kEAAkE;IAClE;QACE,EAAE,EAAE,QAAQ;QACZ,WAAW,EAAE,aAAa;QAC1B,SAAS,EAAE;YACT,UAAU,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;YACxC,YAAY,EAAE,CAAC,WAAW,EAAE,uBAAuB,CAAC;SACrD;QACD,KAAK,EAAE;YACL,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,SAAS,CAAC;YACjD,YAAY,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,eAAe,CAAC;YACzD,SAAS,EAAE,WAAW;YACtB,aAAa,EAAE,WAAW;YAC1B,SAAS,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,SAAS,EAAE,UAAU,CAAC;SAClD;QACD,KAAK,EAAE;YACL,SAAS,EAAE,IAAI;YACf,MAAM,EAAE,CAAC,cAAc,EAAE,kBAAkB,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,CAAC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B;YAChC,SAAS,EAAE,EAAE;SACd;QACD,KAAK,EAAE;YACL,SAAS,EAAE,KAAK;YAChB,MAAM,EAAE,EAAE;YACV,cAAc,EAAE,MAAM;SACvB;QACD,WAAW,EAAE;YACX,SAAS,EAAE,KAAK;YAChB,SAAS,EAAE,EAAE;SACd;KACF;CACF,CAAC;AAEF;;GAEG;AACH,SAAgB,oBAAoB;IAClC,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAC/B,OAAO,qBAAa,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;QACjC,2BAA2B;QAC3B,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC;YAC5C,IAAI,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC;gBAAE,OAAO,IAAI,CAAC;QAC1C,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;GAEG;AACH,SAAgB,WAAW,CAAC,EAAU;IACpC,OAAO,qBAAa,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC;AAC9C,CAAC;AAED;;GAEG;AACH,SAAgB,aAAa;IAC3B,OAAO,qBAAa,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AACtC,CAAC;AAED;;GAEG;AACH,SAAgB,iBAAiB;IAC/B,OAAO,qBAAa,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* NLC Install Service — The core of Nex Level Code.
|
|
3
|
+
*
|
|
4
|
+
* Detects the AI tool, copies hook scripts, registers hooks,
|
|
5
|
+
* sets permissions, creates starter files, and adds MCP config.
|
|
6
|
+
*/
|
|
7
|
+
import { ToolDefinition } from '../registry/tools';
|
|
8
|
+
export interface InstallOptions {
|
|
9
|
+
tool?: string;
|
|
10
|
+
force?: boolean;
|
|
11
|
+
skipHooks?: boolean;
|
|
12
|
+
skipRules?: boolean;
|
|
13
|
+
verbose?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface InstallResult {
|
|
16
|
+
tool: ToolDefinition;
|
|
17
|
+
scriptsInstalled: string[];
|
|
18
|
+
hooksRegistered: string[];
|
|
19
|
+
rulesFile: string | null;
|
|
20
|
+
starterFiles: string[];
|
|
21
|
+
mcpConfigured: boolean;
|
|
22
|
+
permissionsSet: boolean;
|
|
23
|
+
warnings: string[];
|
|
24
|
+
}
|
|
25
|
+
export declare class InstallService {
|
|
26
|
+
run(options?: InstallOptions): Promise<InstallResult>;
|
|
27
|
+
private resolveTool;
|
|
28
|
+
private installHookScripts;
|
|
29
|
+
private registerHooks;
|
|
30
|
+
private setPermissions;
|
|
31
|
+
private installRules;
|
|
32
|
+
private createStarterFiles;
|
|
33
|
+
private configureMcp;
|
|
34
|
+
private printSummary;
|
|
35
|
+
}
|
|
36
|
+
//# sourceMappingURL=install.d.ts.map
|