agenauto-nextjs 1.2.0 → 1.3.0

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.
package/dist/index.js CHANGED
@@ -51,7 +51,22 @@ function AgenAutoProvider({ agentKey, apiUrl = "https://agenauto.lat", showBadge
51
51
  agentName: data.agent.name,
52
52
  model: data.agent.model
53
53
  });
54
- console.log(`AgenAuto: Connected \u2713 (Agent: ${data.agent.name})`);
54
+ console.log(`AgenAuto: Connected (Agent: ${data.agent.name})`);
55
+ fetch(`${apiUrl}/api/v1/register`, {
56
+ method: "POST",
57
+ headers: { "Content-Type": "application/json" },
58
+ body: JSON.stringify({
59
+ agentKey,
60
+ platform: "nextjs",
61
+ siteUrl: typeof window !== "undefined" ? window.location.origin : "",
62
+ version: "1.3.0",
63
+ extra: {
64
+ framework: "nextjs",
65
+ sdk: "agenauto-nextjs"
66
+ }
67
+ })
68
+ }).catch(() => {
69
+ });
55
70
  }
56
71
  }).catch(() => {
57
72
  console.warn("AgenAuto: Connection failed. Check your agent key.");
package/dist/index.mjs CHANGED
@@ -17,7 +17,22 @@ function AgenAutoProvider({ agentKey, apiUrl = "https://agenauto.lat", showBadge
17
17
  agentName: data.agent.name,
18
18
  model: data.agent.model
19
19
  });
20
- console.log(`AgenAuto: Connected \u2713 (Agent: ${data.agent.name})`);
20
+ console.log(`AgenAuto: Connected (Agent: ${data.agent.name})`);
21
+ fetch(`${apiUrl}/api/v1/register`, {
22
+ method: "POST",
23
+ headers: { "Content-Type": "application/json" },
24
+ body: JSON.stringify({
25
+ agentKey,
26
+ platform: "nextjs",
27
+ siteUrl: typeof window !== "undefined" ? window.location.origin : "",
28
+ version: "1.3.0",
29
+ extra: {
30
+ framework: "nextjs",
31
+ sdk: "agenauto-nextjs"
32
+ }
33
+ })
34
+ }).catch(() => {
35
+ });
21
36
  }
22
37
  }).catch(() => {
23
38
  console.warn("AgenAuto: Connection failed. Check your agent key.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agenauto-nextjs",
3
- "version": "1.2.0",
3
+ "version": "1.3.0",
4
4
  "description": "AgenAuto SDK for Next.js — autonomous AI agent for your React/Next.js project",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",