@lazyagent/lazy-agents 0.0.1 → 0.0.3
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/bin/lazy.js +3 -1
- package/package.json +1 -1
- package/src/setup.js +16 -26
package/bin/lazy.js
CHANGED
|
@@ -166,7 +166,8 @@ program
|
|
|
166
166
|
program
|
|
167
167
|
.command('setup')
|
|
168
168
|
.description('Create .claude/agents/ sub-agents and .claude/mcp.json for Claude Code')
|
|
169
|
-
.option('--github-token <token>', 'GitHub
|
|
169
|
+
.option('--github-token <token>', 'GitHub token for x-github-token header (falls back to $GITHUB_TOKEN)')
|
|
170
|
+
.option('--server <url>', 'Lazy-agents server URL (default: http://localhost:3000)')
|
|
170
171
|
.option('--agents <roles>', 'Comma-separated roles to create (default: all). Options: architect,developer,tester,reviewer,researcher,debugger,planner,security')
|
|
171
172
|
.option('--mcp-only', 'Only create .claude/mcp.json, skip agent files')
|
|
172
173
|
.option('--agents-only', 'Only create .claude/agents/, skip mcp.json')
|
|
@@ -177,6 +178,7 @@ program
|
|
|
177
178
|
const { setup } = require('../src/setup');
|
|
178
179
|
await setup({
|
|
179
180
|
githubToken: opts.githubToken || null,
|
|
181
|
+
serverUrl: opts.server || null,
|
|
180
182
|
agents: opts.agents || null,
|
|
181
183
|
mcpOnly: opts.mcpOnly || false,
|
|
182
184
|
agentsOnly: opts.agentsOnly || false,
|
package/package.json
CHANGED
package/src/setup.js
CHANGED
|
@@ -125,27 +125,20 @@ Think like an attacker. Never assume internal data is safe.`,
|
|
|
125
125
|
// ──────────────────────────────────────────────
|
|
126
126
|
// MCP server definitions
|
|
127
127
|
// ──────────────────────────────────────────────
|
|
128
|
-
function buildMcpConfig(githubToken, cwd) {
|
|
128
|
+
function buildMcpConfig(githubToken, cwd, serverUrl) {
|
|
129
|
+
const lazyServerUrl = serverUrl || 'https://let-me-being-lazy-be-production.up.railway.app';
|
|
130
|
+
const token = githubToken || '${GITHUB_TOKEN}';
|
|
131
|
+
|
|
129
132
|
return {
|
|
130
133
|
mcpServers: {
|
|
131
|
-
|
|
132
|
-
command: 'npx',
|
|
133
|
-
args: ['-y', '@modelcontextprotocol/server-github'],
|
|
134
|
-
env: {
|
|
135
|
-
GITHUB_PERSONAL_ACCESS_TOKEN: githubToken || '${GITHUB_TOKEN}',
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
|
-
filesystem: {
|
|
139
|
-
command: 'npx',
|
|
140
|
-
args: ['-y', '@modelcontextprotocol/server-filesystem', cwd],
|
|
141
|
-
},
|
|
142
|
-
memory: {
|
|
143
|
-
command: 'npx',
|
|
144
|
-
args: ['-y', '@modelcontextprotocol/server-memory'],
|
|
145
|
-
},
|
|
146
|
-
context7: {
|
|
134
|
+
'lazy-agents': {
|
|
147
135
|
command: 'npx',
|
|
148
|
-
args: [
|
|
136
|
+
args: [
|
|
137
|
+
'mcp-remote',
|
|
138
|
+
`${lazyServerUrl}/mcp`,
|
|
139
|
+
'--header',
|
|
140
|
+
`x-github-token: ${token}`,
|
|
141
|
+
],
|
|
149
142
|
},
|
|
150
143
|
},
|
|
151
144
|
};
|
|
@@ -185,6 +178,7 @@ function prompt(question) {
|
|
|
185
178
|
// ──────────────────────────────────────────────
|
|
186
179
|
async function setup({
|
|
187
180
|
githubToken,
|
|
181
|
+
serverUrl,
|
|
188
182
|
agents: agentSpec,
|
|
189
183
|
mcpOnly = false,
|
|
190
184
|
agentsOnly = false,
|
|
@@ -251,7 +245,7 @@ async function setup({
|
|
|
251
245
|
console.log('[lazy] skip .claude/mcp.json (--force to overwrite)');
|
|
252
246
|
skipped++;
|
|
253
247
|
} else {
|
|
254
|
-
const config = buildMcpConfig(resolvedToken, cwd);
|
|
248
|
+
const config = buildMcpConfig(resolvedToken, cwd, serverUrl);
|
|
255
249
|
fs.writeFileSync(mcpFile, JSON.stringify(config, null, 2) + '\n', 'utf8');
|
|
256
250
|
console.log('[lazy] wrote .claude/mcp.json');
|
|
257
251
|
created++;
|
|
@@ -266,14 +260,10 @@ async function setup({
|
|
|
266
260
|
}
|
|
267
261
|
|
|
268
262
|
if (!agentsOnly) {
|
|
269
|
-
const
|
|
270
|
-
|
|
271
|
-
: '(set GITHUB_TOKEN env var or re-run with --github-token)';
|
|
263
|
+
const resolvedServer = serverUrl || 'https://let-me-being-lazy-be-production.up.railway.app';
|
|
264
|
+
const tokenNote = resolvedToken ? '(token saved)' : '(set GITHUB_TOKEN env var or re-run with --github-token)';
|
|
272
265
|
console.log(`\nMCP servers:
|
|
273
|
-
|
|
274
|
-
filesystem @modelcontextprotocol/server-filesystem
|
|
275
|
-
memory @modelcontextprotocol/server-memory
|
|
276
|
-
context7 @upstash/context7-mcp`);
|
|
266
|
+
lazy-agents mcp-remote ${resolvedServer}/mcp --header x-github-token ${tokenNote}`);
|
|
277
267
|
}
|
|
278
268
|
}
|
|
279
269
|
|