@agentvalet/register 0.4.1 → 0.4.2

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.
Files changed (2) hide show
  1. package/dist/index.js +90 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -277,6 +277,84 @@ Dashboard: https://app.agentvalet.ai
277
277
  console.log(chalk2.green(" \u2713 SKILL.md created in current directory"));
278
278
  console.log(chalk2.dim(" Commit this file to your repo"));
279
279
  }
280
+ function writeQuickstartDoc(opts) {
281
+ const dest = path.join(process.cwd(), "AGENTVALET.md");
282
+ if (existsSync(dest)) {
283
+ console.log(chalk2.dim(" AGENTVALET.md already exists \u2014 skipping"));
284
+ return;
285
+ }
286
+ const { agentId, ownerId, proxyUrl, keyPath, detected } = opts;
287
+ const ideSection = (() => {
288
+ const lines = [];
289
+ if (detected.cursor) {
290
+ lines.push(`### Cursor
291
+ The \`.mcp.json\` in this directory has been configured. Restart Cursor and the AgentValet MCP server will start automatically.`);
292
+ }
293
+ if (detected.claudeCode) {
294
+ lines.push(`### Claude Code
295
+ The \`.mcp.json\` in this directory has been configured. Run \`/mcp\` in Claude Code to verify \`agentvalet\` appears in the list.`);
296
+ }
297
+ if (detected.codex) {
298
+ lines.push(`### Codex
299
+ \`~/.codex/config.toml\` has been updated with the MCP server block. See \`AGENTS.md\` for platform call instructions.`);
300
+ }
301
+ if (detected.openclaw) {
302
+ lines.push(`### OpenClaw
303
+ See \`SKILL.md\` for platform call instructions.`);
304
+ }
305
+ if (lines.length === 0) {
306
+ lines.push(`Add the MCP server to your IDE manually. See: https://docs.agentvalet.ai/setup`);
307
+ }
308
+ return lines.join("\n\n");
309
+ })();
310
+ const content = `# AgentValet \u2014 Quick Reference
311
+
312
+ ## This agent
313
+
314
+ | | |
315
+ |---|---|
316
+ | Agent ID | \`${agentId}\` |
317
+ | Owner ID | \`${ownerId}\` |
318
+ | Proxy URL | \`${proxyUrl}\` |
319
+ | Private key | \`${keyPath}\` |
320
+
321
+ Dashboard: https://app.agentvalet.ai
322
+ Activate or manage this agent at: https://app.agentvalet.ai/agents
323
+
324
+ ---
325
+
326
+ ## CLI commands
327
+
328
+ | Command | What it does |
329
+ |---|---|
330
+ | \`npx @agentvalet/register\` | Register a new agent or re-run setup |
331
+ | \`npx @agentvalet/register refresh\` | Refresh approved platform permissions |
332
+
333
+ > These commands use \`npx\` \u2014 you do not need to install the package globally.
334
+
335
+ ---
336
+
337
+ ## IDE setup
338
+
339
+ ${ideSection}
340
+
341
+ ---
342
+
343
+ ## Environment variables
344
+
345
+ Set these wherever your IDE agent reads environment from:
346
+
347
+ \`\`\`
348
+ AGENT_ID=${agentId}
349
+ OWNER_ID=${ownerId}
350
+ PROXY_URL=${proxyUrl}
351
+ AGENT_PRIVATE_KEY_PATH=${keyPath}
352
+ \`\`\`
353
+ `;
354
+ writeFileSync(dest, content, "utf8");
355
+ console.log(chalk2.green(" \u2713 AGENTVALET.md created \u2014 quick reference for this agent"));
356
+ console.log(chalk2.dim(" Add to .gitignore if it contains sensitive paths"));
357
+ }
280
358
  function ensureMcpServer() {
281
359
  try {
282
360
  execSync("npx --yes @agentvalet/mcp-server --version", {
@@ -328,7 +406,7 @@ mcp__agent-authority__use_platform({
328
406
  })
329
407
  \`\`\`
330
408
 
331
- To refresh this file: \`agentvalet-register refresh\`
409
+ To refresh this file: \`npx @agentvalet/register refresh\`
332
410
  `;
333
411
  }
334
412
 
@@ -1209,6 +1287,13 @@ async function registerAgentFlow(apiKey, ownerId) {
1209
1287
  if (detected.openclaw) {
1210
1288
  writeSkillMd();
1211
1289
  }
1290
+ writeQuickstartDoc({
1291
+ agentId: agent.agent_id,
1292
+ ownerId,
1293
+ proxyUrl,
1294
+ keyPath,
1295
+ detected
1296
+ });
1212
1297
  ensureMcpServer();
1213
1298
  } else if (shouldSetup === false) {
1214
1299
  console.log("");
@@ -1235,6 +1320,10 @@ async function registerAgentFlow(apiKey, ownerId) {
1235
1320
  );
1236
1321
  console.log(chalk6.dim(" Approve this agent in your dashboard to activate it."));
1237
1322
  console.log("");
1323
+ console.log(" Useful commands:");
1324
+ console.log(chalk6.dim(" npx @agentvalet/register \u2014 register another agent"));
1325
+ console.log(chalk6.dim(" npx @agentvalet/register refresh \u2014 refresh approved permissions"));
1326
+ console.log("");
1238
1327
  }
1239
1328
  function showCredentials(config) {
1240
1329
  console.log("");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentvalet/register",
3
- "version": "0.4.1",
3
+ "version": "0.4.2",
4
4
  "description": "Self-register AI agents with AgentValet",
5
5
  "type": "module",
6
6
  "bin": {