From ef585216d484e7cb840b3e552a070b037ae38b4a Mon Sep 17 00:00:00 2001 From: Cho Young-Hwi Date: Fri, 24 Apr 2026 15:45:02 +0900 Subject: [PATCH 1/3] [#163] Save full tokenURI data to config.json on registration Persist agentLlmModel and agentRegisteredAt alongside existing fields after ERC-8004 registration. Include both in the generate-binding response for plotlink.xyz. Co-Authored-By: Claude Opus 4.6 (1M context) --- app/routes/settings.ts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/app/routes/settings.ts b/app/routes/settings.ts index 034aff6..338512d 100644 --- a/app/routes/settings.ts +++ b/app/routes/settings.ts @@ -67,6 +67,8 @@ settings.post("/generate-binding", async (c) => { agentName: (config.agentName as string) || undefined, agentDescription: (config.agentDescription as string) || undefined, agentGenre: (config.agentGenre as string) || undefined, + agentLlmModel: (config.agentLlmModel as string) || undefined, + agentRegisteredAt: (config.agentRegisteredAt as string) || undefined, }); } catch (err: unknown) { const msg = err instanceof Error ? err.message : "Failed to generate binding proof"; @@ -107,13 +109,14 @@ settings.post("/register-agent", async (c) => { } catch { /* not registered — continue */ } // Build agentURI as inline JSON + const registeredAt = new Date().toISOString(); const agentURI = JSON.stringify({ name: body.name.trim(), description: body.description.trim(), ...(body.genre?.trim() && { genre: body.genre.trim() }), llmModel: "Claude", registeredBy: "plotlink-ows", - registeredAt: new Date().toISOString(), + registeredAt, }); // Create OWS-backed wallet client and call register() @@ -155,12 +158,14 @@ settings.post("/register-agent", async (c) => { return c.json({ error: "Transaction succeeded but Registered event not found" }, 500); } - // Cache agent data in config.json (survives npx reinstalls, no Prisma dependency) + // Cache full tokenURI data in config.json (survives npx reinstalls, no Prisma dependency) writeConfig({ agentId, - agentName: body.name, - agentDescription: body.description, - ...(body.genre && { agentGenre: body.genre }), + agentName: body.name.trim(), + agentDescription: body.description.trim(), + ...(body.genre?.trim() && { agentGenre: body.genre.trim() }), + agentLlmModel: "Claude", + agentRegisteredAt: registeredAt, }); return c.json({ From 7b55c7049b54570569c042a26da2e061fbb4f8db Mon Sep 17 00:00:00 2001 From: Cho Young-Hwi Date: Fri, 24 Apr 2026 15:46:57 +0900 Subject: [PATCH 2/3] [#163] Bump version to 1.0.22 Co-Authored-By: Claude Opus 4.6 (1M context) --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 16f68bb..311b829 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "plotlink-ows", - "version": "1.0.21", + "version": "1.0.22", "bin": { "plotlink-ows": "./bin/plotlink-ows.js" }, From b3bebb66914e2b9f5425fca220d30d02309c73a8 Mon Sep 17 00:00:00 2001 From: Cho Young-Hwi Date: Fri, 24 Apr 2026 15:48:09 +0900 Subject: [PATCH 3/3] [#163] Include agentRegisteredBy in config and binding response Co-Authored-By: Claude Opus 4.6 (1M context) --- app/routes/settings.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/routes/settings.ts b/app/routes/settings.ts index 338512d..291c4d9 100644 --- a/app/routes/settings.ts +++ b/app/routes/settings.ts @@ -68,6 +68,7 @@ settings.post("/generate-binding", async (c) => { agentDescription: (config.agentDescription as string) || undefined, agentGenre: (config.agentGenre as string) || undefined, agentLlmModel: (config.agentLlmModel as string) || undefined, + agentRegisteredBy: (config.agentRegisteredBy as string) || undefined, agentRegisteredAt: (config.agentRegisteredAt as string) || undefined, }); } catch (err: unknown) { @@ -165,6 +166,7 @@ settings.post("/register-agent", async (c) => { agentDescription: body.description.trim(), ...(body.genre?.trim() && { agentGenre: body.genre.trim() }), agentLlmModel: "Claude", + agentRegisteredBy: "plotlink-ows", agentRegisteredAt: registeredAt, });