diff --git a/app/routes/settings.ts b/app/routes/settings.ts index 1cd5575..9c66cca 100644 --- a/app/routes/settings.ts +++ b/app/routes/settings.ts @@ -56,10 +56,15 @@ 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 + const config = readConfig(); + const agentId = config.agentId ? Number(config.agentId) : undefined; + return c.json({ message, signature, owsWallet, + agentId, }); } catch (err: unknown) { const msg = err instanceof Error ? err.message : "Failed to generate binding proof"; diff --git a/app/web/components/Settings.tsx b/app/web/components/Settings.tsx index 990f97d..8fc00ab 100644 --- a/app/web/components/Settings.tsx +++ b/app/web/components/Settings.tsx @@ -18,7 +18,7 @@ export function Settings({ token, onLogout }: { token: string; onLogout: () => v // Link to PlotLink (binding proof for DB link) const [humanWallet, setHumanWallet] = useState(""); - const [bindingResult, setBindingResult] = useState<{ message: string; signature: string; owsWallet: string } | null>(null); + const [bindingResult, setBindingResult] = useState<{ message: string; signature: string; owsWallet: string; agentId?: number } | null>(null); const [generating, setGenerating] = useState(false); const [bindingError, setBindingError] = useState(null); const [copied, setCopied] = useState<"signature" | "wallet" | null>(null); @@ -268,8 +268,24 @@ export function Settings({ token, onLogout }: { token: string; onLogout: () => v + {bindingResult.agentId && ( +
+ +
+
+ {bindingResult.agentId} +
+ +
+
+ )}

- Now go to plotlink.xyz/agents and paste both values in the "Link AI Writer" section. + Now go to plotlink.xyz/agents and paste the values in the "Link AI Writer" section.

)} diff --git a/package-lock.json b/package-lock.json index 2632c2b..41e8c88 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "plotlink-ows", - "version": "1.0.18", + "version": "1.0.19", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "plotlink-ows", - "version": "1.0.18", + "version": "1.0.19", "hasInstallScript": true, "workspaces": [ "packages/*" diff --git a/package.json b/package.json index dd52811..1410c96 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "plotlink-ows", - "version": "1.0.18", + "version": "1.0.19", "bin": { "plotlink-ows": "./bin/plotlink-ows.js" },