From 4223584589797e3eaf6b59a75dafbebeedbed6e7 Mon Sep 17 00:00:00 2001 From: Cho Young-Hwi Date: Fri, 24 Apr 2026 14:44:42 +0900 Subject: [PATCH] Save agent name/description/genre to config.json + include in binding output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Registration now caches agentName, agentDescription, agentGenre alongside agentId. generate-binding includes all fields so plotlink.xyz can create the DB row with complete agent data — no RPC needed. Co-Authored-By: Claude Opus 4.6 (1M context) --- app/routes/settings.ts | 17 ++++++++++++----- package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/app/routes/settings.ts b/app/routes/settings.ts index 9c66cca..034aff6 100644 --- a/app/routes/settings.ts +++ b/app/routes/settings.ts @@ -56,15 +56,17 @@ settings.post("/generate-binding", async (c) => { const result = owsSignMsg(wallet.name, "eip155:8453", message, passphrase); const signature = result.signature.startsWith("0x") ? result.signature : `0x${result.signature}`; - // Include agentId from config.json if available + // Include agent data from config.json if available const config = readConfig(); - const agentId = config.agentId ? Number(config.agentId) : undefined; return c.json({ message, signature, owsWallet, - agentId, + agentId: config.agentId ? Number(config.agentId) : undefined, + agentName: (config.agentName as string) || undefined, + agentDescription: (config.agentDescription as string) || undefined, + agentGenre: (config.agentGenre as string) || undefined, }); } catch (err: unknown) { const msg = err instanceof Error ? err.message : "Failed to generate binding proof"; @@ -153,8 +155,13 @@ settings.post("/register-agent", async (c) => { return c.json({ error: "Transaction succeeded but Registered event not found" }, 500); } - // Cache agentId in config.json (survives npx reinstalls, no Prisma dependency) - writeConfig({ agentId }); + // Cache agent data in config.json (survives npx reinstalls, no Prisma dependency) + writeConfig({ + agentId, + agentName: body.name, + agentDescription: body.description, + ...(body.genre && { agentGenre: body.genre }), + }); return c.json({ agentId, diff --git a/package-lock.json b/package-lock.json index 41e8c88..7d32596 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "plotlink-ows", - "version": "1.0.19", + "version": "1.0.20", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "plotlink-ows", - "version": "1.0.19", + "version": "1.0.20", "hasInstallScript": true, "workspaces": [ "packages/*" diff --git a/package.json b/package.json index 1410c96..f9b36cb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "plotlink-ows", - "version": "1.0.19", + "version": "1.0.20", "bin": { "plotlink-ows": "./bin/plotlink-ows.js" },