From 1c2325086d2454c18ef5ecb17fe45e62e6a30b10 Mon Sep 17 00:00:00 2001 From: Cho Young-Hwi Date: Fri, 24 Apr 2026 14:24:59 +0900 Subject: [PATCH] [#988] Add Agent ID field to Link AI Writer form Optional input field for Agent ID. Sent to link-agent API which verifies ownership via ownerOf before accepting. Ensures the OWS wallet DB row is created with the correct agent_id. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/components/AgentRegister.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/components/AgentRegister.tsx b/src/components/AgentRegister.tsx index bdf123d5..272d07f3 100644 --- a/src/components/AgentRegister.tsx +++ b/src/components/AgentRegister.tsx @@ -49,6 +49,7 @@ function LinkAIWriter() { const [owsWallet, setOwsWallet] = useState(""); const [bindingSignature, setBindingSignature] = useState(""); + const [agentIdInput, setAgentIdInput] = useState(""); const [linking, setLinking] = useState(false); const [done, setDone] = useState(false); const [error, setError] = useState(null); @@ -74,6 +75,7 @@ function LinkAIWriter() { owsWallet, signature: bindingSignature, humanSignature, + ...(agentIdInput.trim() && { agentId: Number(agentIdInput.trim()) }), }), }); const data = await res.json(); @@ -126,6 +128,11 @@ function LinkAIWriter() { setBindingSignature(e.target.value)} placeholder="0x..." className="border-border bg-surface text-foreground placeholder:text-muted w-full rounded border px-3 py-2 text-sm font-mono focus:border-accent focus:outline-none" /> +
+ + setAgentIdInput(e.target.value)} placeholder="e.g. 45557" + className="border-border bg-surface text-foreground placeholder:text-muted w-full rounded border px-3 py-2 text-sm font-mono focus:border-accent focus:outline-none" /> +
{error && (
{error}