
Security News
GPT-6 Astra Attempts Supply Chain Attacks Against Open Source Maintainers in Testing
GPT-6 Astra hits 100% on ExploitBench and finds zero-days autonomously, while independent tests reveal scope violations and monitoring gaps.
Official TypeScript SDK for Go2 — short links your AI agent can call. Create branded URLs, track every click, query per-run agent attribution.
Official TypeScript SDK for Go2 — short links your AI agent can call.
Create branded short URLs, track every click with edge-native analytics, query per-run agent attribution, and control link lifecycle. Built for AI agents (Claude, Cursor, Codex, Mastra, Vercel AI SDK) and the humans who build with them.
For agent runtimes: install the
go2-mcp-serverMCP server. Same API surface, exposed as MCP tools.
npm install go2-sdk
# or
pnpm add go2-sdk
# or
yarn add go2-sdk
import { Go2 } from "go2-sdk";
const go2 = new Go2({ apiKey: process.env.GO2_API_KEY! });
// Create a tracked short link, stamped with agent context
const link = await go2.links.create({
destinationUrl: "https://example.com/dashboard",
slug: "claude-dashboard",
agentId: "claude-code",
agentRunId: "run_2026_04_27_a1b2",
agentActorId: "user_42",
});
console.log(link.shortUrl); // https://go2.gg/claude-dashboard
// Pull the click stream for that run
const { data: clicks } = await go2.agentAttribution.list({
agentRunId: "run_2026_04_27_a1b2",
});
Every link your agent creates becomes a first-class object:
(agent_id, run_id, actor_id, tool_call_id) — rewind from any click to the run that produced the linkStamp every link with run-level identity. Three ways to provide the context:
const link = await go2.links.create({
destinationUrl: "https://docs.go2.gg",
agentId: "claude-code",
agentRunId: "run_abc",
agentActorId: "user_42",
agentMetadata: { promptHash: "abc123", toolCall: "tc_xyz" },
});
Append short query keys to the short URL — they're stripped before the destination redirect:
https://go2.gg/abc?ag=claude-code&ar=run_abc&at=tc_xyz&au=user_42
Send x-agent-id, x-agent-run-id, x-agent-tool-call-id, x-agent-actor-id.
// Click stream for a specific run
const { data } = await go2.agentAttribution.list({
agentRunId: "run_abc",
});
// Roll-up grouped by agent_run_id
const summary = await go2.agentAttribution.summary({
groupBy: "agent_run_id",
since: "24h",
});
// Distinct (agent_id, agent_run_id) pairs with click counts
const runs = await go2.agentAttribution.runs();
// Create
const link = await go2.links.create({
destinationUrl: "https://example.com",
slug: "custom-slug", // optional
agentId: "claude-code", // optional — agent attribution
agentRunId: "run_abc", // optional
});
// List
const { data, meta } = await go2.links.list({ page: 1, perPage: 20 });
// Read / update / delete
const link = await go2.links.get("lnk_abc");
const updated = await go2.links.update("lnk_abc", { title: "Updated" });
await go2.links.delete("lnk_abc");
// Per-link analytics
const stats = await go2.links.stats("lnk_abc");
// Click stream by agent_id / agent_run_id / agent_actor_id / link_id
const { data } = await go2.agentAttribution.list({ agentRunId: "run_abc" });
// Roll-up by agent_id or agent_run_id
const summary = await go2.agentAttribution.summary({ groupBy: "agent_run_id" });
// Distinct runs with click counts
const runs = await go2.agentAttribution.runs();
const { data } = await go2.domains.list();
const domain = await go2.domains.create({ domain: "links.example.com" });
const verified = await go2.domains.verify(domain.id);
const webhook = await go2.webhooks.create({
name: "Click Tracker",
url: "https://your-server.com/webhooks/go2",
events: ["click", "link.created"],
});
// Secret is returned ONCE on creation
console.log(webhook.secret);
const qr = await go2.qr.generate({
url: "https://go2.gg/my-link",
size: 512,
foregroundColor: "#000000",
backgroundColor: "#FFFFFF",
});
const gallery = await go2.galleries.create({
slug: "myprofile",
title: "John Doe",
theme: "gradient",
});
await go2.galleries.addItem(gallery.id, {
type: "link",
title: "My Website",
url: "https://example.com",
});
import { Go2, Go2Error } from "go2-sdk";
try {
await go2.links.create({ destinationUrl: "not-a-url" });
} catch (error) {
if (error instanceof Go2Error) {
console.error(error.code, error.status, error.message);
}
}
const go2 = new Go2({
apiKey: process.env.GO2_API_KEY!,
apiUrl: "https://api.go2.gg", // override for self-host or staging
});
Fully typed. All inputs, outputs, and errors have full TS definitions. Works in Node 18+, Bun, Deno, Cloudflare Workers, browsers (with caveats — keep your API key on the server).
Go2 is AGPL-3.0. Self-host on Cloudflare Workers + D1 + KV with one wrangler deploy. See github.com/rakesh1002/go2.gg. Commercial license available for proprietary use — contact hello@go2.gg.
AGPL-3.0-only. Commercial license available — contact hello@go2.gg.
FAQs
Official TypeScript SDK for Go2 — short links your AI agent can call. Create branded URLs, track every click, query per-run agent attribution.
We found that go2-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.

Security News
GPT-6 Astra hits 100% on ExploitBench and finds zero-days autonomously, while independent tests reveal scope violations and monitoring gaps.

Product
Socket can now send alerts and supply chain attack notifications to Microsoft Teams, with filters that route the right updates to each channel.

Security News
pnpm 12 rewrites the package manager in Rust, cutting install times by up to 90% while preserving pnpm 11 workflows and lockfiles.