@agent-native/skills 0.0.0-beta-20260819155526
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/README.md +49 -0
- package/dist/built-in-apps.d.ts +60 -0
- package/dist/built-in-apps.d.ts.map +1 -0
- package/dist/built-in-apps.js +114 -0
- package/dist/built-in-apps.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +11 -0
- package/dist/cli.js.map +1 -0
- package/dist/connect.d.ts +81 -0
- package/dist/connect.d.ts.map +1 -0
- package/dist/connect.js +419 -0
- package/dist/connect.js.map +1 -0
- package/dist/index.d.ts +116 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1335 -0
- package/dist/index.js.map +1 -0
- package/dist/install.d.ts +80 -0
- package/dist/install.d.ts.map +1 -0
- package/dist/install.js +722 -0
- package/dist/install.js.map +1 -0
- package/dist/mcp-config-writers.d.ts +123 -0
- package/dist/mcp-config-writers.d.ts.map +1 -0
- package/dist/mcp-config-writers.js +722 -0
- package/dist/mcp-config-writers.js.map +1 -0
- package/dist/telemetry.d.ts +20 -0
- package/dist/telemetry.d.ts.map +1 -0
- package/dist/telemetry.js +205 -0
- package/dist/telemetry.js.map +1 -0
- package/package.json +47 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-config-writers.js","sourceRoot":"","sources":["../src/mcp-config-writers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,MAAM,uBAAuB,GAAG,oBAAoB,CAAC;AACrD,MAAM,uBAAuB,GAAG,MAAM,CAAC;AAWvC,MAAM,CAAC,MAAM,OAAO,GAAe;IACjC,aAAa;IACb,iBAAiB;IACjB,OAAO;IACP,QAA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AG,CAAC,IAAI,CAAC,EAAE,CAAC;YAC9C,CAAC,EAAE,CAAC;YACJ,OAAO,CAAC,GAAG,KAAK,CAAC,MAAM,IAAI,oBAAoB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,IAAI;gBAAE,CAAC,EAAE,CAAC;YACxE,SAAS;QACX,CAAC;QACD,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QACnB,CAAC,EAAE,CAAC;IACN,CAAC;IAED,MAAM,IAAI,GAAG,GAAG;SACb,IAAI,CAAC,IAAI,CAAC;SACV,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC;SAC1B,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACzB,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IAC5B,OAAO,CAAC,GAAG,SAAS,CAAC,CAAC;AACxB,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gCAAgC,CAC9C,MAAgB,EAChB,UAAkB,EAClB,MAAc,EACd,OAAe,EACf,KAAyB;IAEzB,MAAM,IAAI,GAAG,aAAa,CAAC,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;IACnD,IAAI,MAAM,KAAK,OAAO,EAAE,CAAC;QACvB,OAAO,4BAA4B,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,CAAC;IAChE,CAAC;IACD,OAAO,gCAAgC,CACrC,IAAI,EACJ,yBAAyB,CAAC,MAAM,CAAC,EACjC,MAAM,EACN,UAAU,CACX,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Shared MCP client-config writers.\n *\n * Extracted so both `agent-native mcp install` (see `mcp.ts`) and\n * `agent-native connect` (see `connect.ts`) write the EXACT same on-disk\n * config file targets and formats for every supported client.\n *\n * Supported clients and their config files:\n * - claude-code / claude-code-cli → `.mcp.json` (project) or\n * `~/.claude.json` (user). JSON `mcpServers[name] = entry`.\n * - cowork → `~/.cowork/mcp.json`. Same JSON shape.\n * - cursor → `.cursor/mcp.json` (project) or\n * `~/.cursor/mcp.json` (user). JSON `mcpServers[name] = entry`.\n * - opencode → `opencode.json` (project) or\n * `~/.config/opencode/opencode.json` (user). JSON `mcp[name] = entry`.\n * - github-copilot → `.vscode/mcp.json` (project) or the\n * VS Code user `mcp.json`. JSON `servers[name] = entry`.\n * - codex → `$CODEX_HOME/config.toml` when set,\n * otherwise `~/.codex/config.toml`.\n * `[mcp_servers.<name>]` block.\n *\n * Node-only. No new npm deps — hand-rolled JSON merge + minimal TOML block\n * merge, mirroring `mcp.ts`.\n */\n\nimport fs from \"node:fs\";\nimport os from \"node:os\";\nimport path from \"node:path\";\n\nconst MCP_LEGACY_ROUTE_PREFIX = \"/_agent-native/mcp\";\nconst MCP_PUBLIC_ROUTE_PREFIX = \"/mcp\";\n\nexport type ClientId =\n | \"claude-code\"\n | \"claude-code-cli\"\n | \"codex\"\n | \"cowork\"\n | \"cursor\"\n | \"opencode\"\n | \"github-copilot\";\n\nexport const CLIENTS: ClientId[] = [\n \"claude-code\",\n \"claude-code-cli\",\n \"codex\",\n \"cowork\",\n \"cursor\",\n \"opencode\",\n \"github-copilot\",\n];\n\n/** The HTTP MCP server entry written into a JSON client config. */\nexport interface HttpMcpEntry {\n type: \"http\";\n url: string;\n headers?: Record<string, string>;\n}\n\n/** Build the HTTP MCP server entry for a deployed agent-native app. */\nexport function buildHttpMcpEntry(\n mcpUrl: string,\n token?: string,\n headers?: Record<string, string>,\n): HttpMcpEntry {\n const mergedHeaders = {\n ...(headers ?? {}),\n ...(token ? { Authorization: `Bearer ${token}` } : {}),\n };\n return {\n type: \"http\",\n url: mcpUrl,\n ...(Object.keys(mergedHeaders).length ? { headers: mergedHeaders } : {}),\n };\n}\n\nfunction mergedHeadersFor(\n token?: string,\n headers?: Record<string, string>,\n): Record<string, string> {\n return {\n ...(headers ?? {}),\n ...(token ? { Authorization: `Bearer ${token}` } : {}),\n };\n}\n\nexport function buildHttpMcpEntryForClient(\n client: ClientId,\n mcpUrl: string,\n token?: string,\n headers?: Record<string, string>,\n): Record<string, unknown> {\n const mergedHeaders = mergedHeadersFor(token, headers);\n if (client === \"cursor\") {\n return {\n url: mcpUrl,\n ...(Object.keys(mergedHeaders).length ? { headers: mergedHeaders } : {}),\n };\n }\n if (client === \"opencode\") {\n return {\n type: \"remote\",\n url: mcpUrl,\n enabled: true,\n ...(Object.keys(mergedHeaders).length ? { headers: mergedHeaders } : {}),\n };\n }\n if (client === \"github-copilot\") {\n return {\n type: \"http\",\n url: mcpUrl,\n ...(Object.keys(mergedHeaders).length\n ? { requestInit: { headers: mergedHeaders } }\n : {}),\n };\n }\n return buildHttpMcpEntry(mcpUrl, token, headers) as unknown as Record<\n string,\n unknown\n >;\n}\n\nexport function buildLocalMcpEntryForClient(\n client: ClientId,\n args: string[],\n env?: Record<string, string>,\n command = \"agent-native\",\n): Record<string, unknown> {\n const cleanEnv = env ? Object.fromEntries(Object.entries(env)) : {};\n if (client === \"opencode\") {\n return {\n type: \"local\",\n command: [command, ...args],\n enabled: true,\n ...(Object.keys(cleanEnv).length ? { environment: cleanEnv } : {}),\n };\n }\n if (client === \"github-copilot\") {\n return {\n type: \"stdio\",\n command,\n args,\n ...(Object.keys(cleanEnv).length ? { env: cleanEnv } : {}),\n };\n }\n return {\n command,\n args,\n ...(Object.keys(cleanEnv).length ? { env: cleanEnv } : {}),\n };\n}\n\n// ---------------------------------------------------------------------------\n// Config file locations — kept identical to `mcp.ts`.\n// ---------------------------------------------------------------------------\n\n/**\n * Cowork consumes MCP exactly like Claude Code (same JSON server-entry\n * shape). Resolved lazily so `os.homedir()` reflects the current `$HOME`.\n */\nexport function coworkConfigPath(): string {\n return path.join(os.homedir(), \".cowork\", \"mcp.json\");\n}\n\nexport function claudeCodeProjectConfig(baseDir: string): string {\n return path.join(baseDir, \".mcp.json\");\n}\n\nexport function claudeCodeUserConfig(): string {\n return path.join(os.homedir(), \".claude.json\");\n}\n\nexport function codexConfigPath(): string {\n const codexHome = process.env.CODEX_HOME?.trim();\n if (codexHome) return path.join(codexHome, \"config.toml\");\n return path.join(os.homedir(), \".codex\", \"config.toml\");\n}\n\nexport function cursorProjectConfig(baseDir: string): string {\n return path.join(baseDir, \".cursor\", \"mcp.json\");\n}\n\nexport function cursorUserConfig(): string {\n return path.join(os.homedir(), \".cursor\", \"mcp.json\");\n}\n\nexport function opencodeProjectConfig(baseDir: string): string {\n return path.join(baseDir, \"opencode.json\");\n}\n\nexport function opencodeUserConfig(): string {\n const xdgConfigHome = process.env.XDG_CONFIG_HOME?.trim();\n const configRoot = xdgConfigHome || path.join(os.homedir(), \".config\");\n return path.join(configRoot, \"opencode\", \"opencode.json\");\n}\n\nexport function githubCopilotProjectConfig(baseDir: string): string {\n return path.join(baseDir, \".vscode\", \"mcp.json\");\n}\n\nexport function githubCopilotUserConfig(): string {\n if (process.platform === \"darwin\") {\n return path.join(\n os.homedir(),\n \"Library\",\n \"Application Support\",\n \"Code\",\n \"User\",\n \"mcp.json\",\n );\n }\n if (process.platform === \"win32\") {\n const appData =\n process.env.APPDATA || path.join(os.homedir(), \"AppData\", \"Roaming\");\n return path.join(appData, \"Code\", \"User\", \"mcp.json\");\n }\n const xdgConfigHome = process.env.XDG_CONFIG_HOME?.trim();\n const configRoot = xdgConfigHome || path.join(os.homedir(), \".config\");\n return path.join(configRoot, \"Code\", \"User\", \"mcp.json\");\n}\n\n/**\n * Resolve the on-disk config path for a client.\n *\n * `scope` only affects Claude Code / Claude Code CLI: `\"user\"` → the global\n * `~/.claude.json`, anything else → the project-local `.mcp.json` rooted at\n * `baseDir`.\n */\nexport function configPathFor(\n client: ClientId,\n baseDir: string,\n scope: string | undefined,\n): string {\n switch (client) {\n case \"claude-code\":\n case \"claude-code-cli\":\n return scope === \"user\"\n ? claudeCodeUserConfig()\n : claudeCodeProjectConfig(baseDir);\n case \"cowork\":\n return coworkConfigPath();\n case \"codex\":\n return codexConfigPath();\n case \"cursor\":\n return scope === \"user\"\n ? cursorUserConfig()\n : cursorProjectConfig(baseDir);\n case \"opencode\":\n return scope === \"user\"\n ? opencodeUserConfig()\n : opencodeProjectConfig(baseDir);\n case \"github-copilot\":\n return scope === \"user\"\n ? githubCopilotUserConfig()\n : githubCopilotProjectConfig(baseDir);\n }\n}\n\n// ---------------------------------------------------------------------------\n// JSON client configs (Claude Code, Claude Code CLI, Cowork)\n// ---------------------------------------------------------------------------\n\n/**\n * Read an existing MCP config without conflating missing and unreadable files.\n * Only ENOENT means the config is absent; any other read failure must abort\n * before a caller can overwrite existing user configuration.\n */\nfunction readExistingConfigFile(file: string): string | undefined {\n try {\n return fs.readFileSync(file, \"utf-8\");\n } catch (error) {\n if ((error as NodeJS.ErrnoException).code === \"ENOENT\") return undefined;\n const detail = error instanceof Error ? ` (${error.message})` : \"\";\n throw new Error(\n `Cannot read MCP config file: ${file}\\n` +\n `Check that the file is readable and re-run. The file has not been modified.${detail}`,\n );\n }\n}\n\n/**\n * Read and parse a JSON config file.\n *\n * - Missing file → returns `{}` (fresh config).\n * - Empty file → returns `{}` (treat as not-yet-initialised).\n * - Non-empty file that fails to parse → throws a descriptive Error so the\n * caller can surface it to the user instead of silently overwriting the\n * file with only the new MCP entry (data-loss hazard).\n */\nfunction readJsonFile(file: string): Record<string, any> {\n const raw = readExistingConfigFile(file);\n if (raw === undefined) return {};\n if (!raw.trim()) return {};\n try {\n const parsed = JSON.parse(raw);\n return parsed && typeof parsed === \"object\" ? parsed : {};\n } catch {\n throw new Error(\n `Cannot parse JSON config file: ${file}\\n` +\n `Fix or move the file and re-run. The file has not been modified.`,\n );\n }\n}\n\n/**\n * Write `data` to `file` atomically: write a sibling temp file, then rename it\n * over the target. `rename(2)` is atomic on the same filesystem, so a crash or\n * `kill` mid-write can never leave a half-written/truncated file. This matters\n * most for `~/.claude.json`, which is Claude Code's entire user state (projects,\n * history, auth) — a torn write there would corrupt the user's whole config,\n * not just our MCP entry. The temp file lives in the target's directory so the\n * rename stays within one filesystem.\n */\nexport function writeFileAtomic(file: string, data: string): void {\n const dir = path.dirname(file);\n fs.mkdirSync(dir, { recursive: true });\n // Preserve the target's existing permission bits. A fresh temp file would\n // otherwise be created with the umask default (typically 0644), silently\n // loosening a secret-bearing file the user locked down to 0600 (e.g. .env).\n let mode: number | undefined;\n try {\n mode = fs.statSync(file).mode & 0o777;\n } catch {\n // Target doesn't exist yet — let the default creation mode apply.\n }\n const tmp = path.join(dir, `.${path.basename(file)}.tmp-${process.pid}`);\n try {\n fs.writeFileSync(tmp, data, \"utf-8\");\n if (mode !== undefined) fs.chmodSync(tmp, mode);\n fs.renameSync(tmp, file);\n } catch (err) {\n try {\n fs.rmSync(tmp, { force: true });\n } catch {}\n throw err;\n }\n}\n\n/**\n * Idempotently write `mcpServers[name] = entry` into a JSON config file.\n * Pass `entry === null` to delete the named entry. Re-running with the same\n * name replaces the existing entry in place — never duplicates.\n */\nexport function jsonMcpConfigKeyForClient(client: ClientId): string {\n if (client === \"opencode\") return \"mcp\";\n if (client === \"github-copilot\") return \"servers\";\n return \"mcpServers\";\n}\n\nfunction writeJsonMcpEntryAtKey(\n file: string,\n serversKey: string,\n name: string,\n entry: Record<string, unknown> | null,\n): void {\n const config = readJsonFile(file);\n if (!config[serversKey] || typeof config[serversKey] !== \"object\") {\n config[serversKey] = {};\n }\n const servers = config[serversKey] as Record<string, unknown>;\n if (entry === null) {\n delete servers[name];\n } else {\n servers[name] = entry;\n }\n writeFileAtomic(file, JSON.stringify(config, null, 2) + \"\\n\");\n}\n\nexport function writeJsonMcpEntry(\n file: string,\n name: string,\n entry: Record<string, unknown> | null,\n): void {\n writeJsonMcpEntryAtKey(file, \"mcpServers\", name, entry);\n}\n\nexport function writeJsonMcpEntryForClient(\n client: ClientId,\n file: string,\n name: string,\n entry: Record<string, unknown> | null,\n): void {\n writeJsonMcpEntryAtKey(file, jsonMcpConfigKeyForClient(client), name, entry);\n}\n\nexport function hasJsonMcpEntry(file: string, name: string): boolean {\n const config = readJsonFile(file);\n return !!config?.mcpServers && name in config.mcpServers;\n}\n\nexport function hasJsonMcpEntryForClient(\n client: ClientId,\n file: string,\n name: string,\n): boolean {\n const config = readJsonFile(file);\n const servers = config?.[jsonMcpConfigKeyForClient(client)];\n return !!servers && typeof servers === \"object\" && name in servers;\n}\n\n// ---------------------------------------------------------------------------\n// Codex TOML (hand-rolled minimal block merge, no new dep)\n// ---------------------------------------------------------------------------\n\nfunction tomlQuote(s: string): string {\n return `\"${s.replace(/\\\\/g, \"\\\\\\\\\").replace(/\"/g, '\\\\\"')}\"`;\n}\n\nfunction codexMcpHeader(name: string): string {\n return `[mcp_servers.${tomlQuote(name)}]`;\n}\n\n/**\n * Parse a TOML table-header line such as `[mcp_servers.\"plan\".http_headers]`\n * or `[mcp_servers.plan] # local note` into its decoded dotted-key components\n * (`[\"mcp_servers\", \"plan\", \"http_headers\"]`). Returns `null` when the line is\n * not a single `[table]` header — blank lines, key/value pairs, comments,\n * invalid trailing content, and `[[array-of-tables]]` headers all return `null`,\n * so the result doubles as a reliable \"is this line a table boundary?\" check.\n *\n * Handles bare keys (`A-Za-z0-9_-`) and quoted keys (basic `\"...\"` with `\\`\n * escapes, and literal `'...'`), tolerating whitespace around the dot\n * separators per the TOML spec. Quoted-key escape handling mirrors the inverse\n * of `tomlQuote` (`\\\"` → `\"`, `\\\\` → `\\`).\n */\nfunction parseTomlTableHeader(line: string): string[] | null {\n const trimmed = line.trim();\n if (trimmed.length < 2 || trimmed[0] !== \"[\") return null;\n // `[[array-of-tables]]` is a different construct — leave it untouched.\n if (trimmed[1] === \"[\") return null;\n\n let quote: '\"' | \"'\" | null = null;\n let escaped = false;\n let closeIndex = -1;\n for (let i = 1; i < trimmed.length; i++) {\n const ch = trimmed[i];\n if (quote === '\"') {\n if (escaped) {\n escaped = false;\n continue;\n }\n if (ch === \"\\\\\") {\n escaped = true;\n continue;\n }\n if (ch === '\"') quote = null;\n continue;\n }\n if (quote === \"'\") {\n if (ch === \"'\") quote = null;\n continue;\n }\n if (ch === '\"' || ch === \"'\") {\n quote = ch;\n continue;\n }\n if (ch === \"]\") {\n closeIndex = i;\n break;\n }\n }\n if (closeIndex < 0) return null;\n const trailing = trimmed.slice(closeIndex + 1).trim();\n if (trailing && !trailing.startsWith(\"#\")) return null;\n\n const inner = trimmed.slice(1, closeIndex);\n const keys: string[] = [];\n const isWs = (c: string) => c === \" \" || c === \"\\t\";\n const isBare = (c: string) => /[A-Za-z0-9_-]/.test(c);\n let i = 0;\n let expectKey = true;\n while (i < inner.length) {\n while (i < inner.length && isWs(inner[i])) i++;\n if (i >= inner.length) break;\n const ch = inner[i];\n if (ch === \".\") {\n if (expectKey) return null; // leading or doubled dot\n expectKey = true;\n i++;\n continue;\n }\n if (!expectKey) return null; // two keys with no dot between them\n if (ch === '\"' || ch === \"'\") {\n const quote = ch;\n i++;\n let key = \"\";\n while (i < inner.length && inner[i] !== quote) {\n if (quote === '\"' && inner[i] === \"\\\\\" && i + 1 < inner.length) {\n const next = inner[i + 1];\n key += next === '\"' ? '\"' : next === \"\\\\\" ? \"\\\\\" : `\\\\${next}`;\n i += 2;\n continue;\n }\n key += inner[i];\n i++;\n }\n if (i >= inner.length) return null; // unterminated quote\n i++; // consume the closing quote\n keys.push(key);\n expectKey = false;\n } else if (isBare(ch)) {\n let key = \"\";\n while (i < inner.length && isBare(inner[i])) {\n key += inner[i];\n i++;\n }\n keys.push(key);\n expectKey = false;\n } else {\n return null; // unexpected character — not a table header\n }\n }\n if (expectKey) return null; // empty header or trailing dot\n return keys.length ? keys : null;\n}\n\n/**\n * The MCP server name a TOML table header belongs to, or `undefined` when the\n * header is not under `[mcp_servers.*]`. The server's own table\n * (`[mcp_servers.<name>]`) AND every sub-table of it\n * (`[mcp_servers.<name>.http_headers]`, `[mcp_servers.<name>.env]`, …) resolve\n * to the same `<name>`, so callers can treat a server and all its sub-tables as\n * one removable unit. This is what prevents a re-install from orphaning a stale\n * `[mcp_servers.<name>.http_headers]` sub-table that would then collide with the\n * freshly written inline `http_headers` (a TOML duplicate-key error).\n */\nfunction codexServerNameOfHeader(line: string): string | undefined {\n const keys = parseTomlTableHeader(line);\n if (!keys || keys.length < 2 || keys[0] !== \"mcp_servers\") return undefined;\n return keys[1];\n}\n\n/** Build a `[mcp_servers.<name>]` block for an HTTP-type MCP server. */\nexport function buildCodexHttpBlock(\n name: string,\n mcpUrl: string,\n token?: string,\n headers?: Record<string, string>,\n): string {\n const lines: string[] = [codexMcpHeader(name)];\n lines.push(`url = ${tomlQuote(mcpUrl)}`);\n const mergedHeaders = {\n ...(headers ?? {}),\n ...(token ? { Authorization: `Bearer ${token}` } : {}),\n };\n const headerEntries = Object.entries(mergedHeaders);\n if (headerEntries.length) {\n lines.push(\n `http_headers = { ${headerEntries\n .map(([key, value]) => `${tomlQuote(key)} = ${tomlQuote(value)}`)\n .join(\", \")} }`,\n );\n }\n return lines.join(\"\\n\") + \"\\n\";\n}\n\nexport function buildCodexLocalBlock(\n name: string,\n args: string[],\n env?: Record<string, string>,\n command = \"agent-native\",\n): string {\n const lines: string[] = [codexMcpHeader(name)];\n lines.push(`command = ${tomlQuote(command)}`);\n lines.push(`args = [${args.map(tomlQuote).join(\", \")}]`);\n const cleanEnv = env ? Object.fromEntries(Object.entries(env)) : {};\n if (Object.keys(cleanEnv).length) {\n const inline = Object.entries(cleanEnv)\n .map(([key, value]) => `${key} = ${tomlQuote(value)}`)\n .join(\", \");\n lines.push(`env = { ${inline} }`);\n }\n return lines.join(\"\\n\") + \"\\n\";\n}\n\n/**\n * Replace (or append) the entire `[mcp_servers.<name>]` footprint in a TOML\n * file without disturbing other content. The footprint is the server's own\n * table AND every sub-table of it (`[mcp_servers.<name>.http_headers]`,\n * `[mcp_servers.<name>.env]`, …), each spanning its header line plus every\n * following line until the next table header or EOF. Removing the whole\n * footprint — wherever the pieces sit in the file — is what keeps a re-install\n * from leaving a stale sub-table that collides with the freshly written inline\n * block (a TOML duplicate-key error). Matches both the canonical quoted header\n * and the legacy bare header. Pass `block === null` to remove the footprint.\n * Identical algorithm to `mcp.ts`'s `writeCodexBlock` so the two never diverge.\n */\nexport function writeCodexBlock(\n file: string,\n name: string,\n block: string | null,\n): void {\n const content = readExistingConfigFile(file) ?? \"\";\n\n const lines = content.split(/\\r?\\n/);\n const out: string[] = [];\n let i = 0;\n let removed = false;\n while (i < lines.length) {\n const line = lines[i];\n if (codexServerNameOfHeader(line) === name) {\n // Skip this table and its body (until the next table header), covering\n // the server table itself and any of its sub-tables.\n removed = true;\n i++;\n while (i < lines.length && parseTomlTableHeader(lines[i]) === null) i++;\n continue;\n }\n out.push(line);\n i++;\n }\n\n let next = out\n .join(\"\\n\")\n .replace(/\\n{3,}/g, \"\\n\\n\")\n .replace(/\\n*$/, \"\\n\");\n if (block !== null) {\n next = next.replace(/\\n*$/, \"\\n\");\n if (next.trim().length) next += \"\\n\";\n next += block;\n }\n if (block === null && !removed) return; // nothing to do\n\n writeFileAtomic(file, next);\n}\n\nexport function codexHasBlock(file: string, name: string): boolean {\n const content = readExistingConfigFile(file);\n return (\n content\n ?.split(/\\r?\\n/)\n .some((line) => codexServerNameOfHeader(line) === name) ?? false\n );\n}\n\n// ---------------------------------------------------------------------------\n// Unified write helper\n// ---------------------------------------------------------------------------\n\n/**\n * Idempotently write the HTTP MCP server entry for `serverName` into the\n * given client's config file and return the file path that was written.\n * Re-running replaces the same named entry — never duplicates.\n */\nexport function writeHttpEntryForClient(\n client: ClientId,\n serverName: string,\n mcpUrl: string,\n token: string | undefined,\n baseDir: string,\n scope: string | undefined,\n headers?: Record<string, string>,\n): string {\n const file = configPathFor(client, baseDir, scope);\n if (client === \"codex\") {\n writeCodexBlock(\n file,\n serverName,\n buildCodexHttpBlock(serverName, mcpUrl, token, headers),\n );\n } else {\n writeJsonMcpEntryForClient(\n client,\n file,\n serverName,\n buildHttpMcpEntryForClient(client, mcpUrl, token, headers),\n );\n }\n return file;\n}\n\n// ---------------------------------------------------------------------------\n// Same-URL duplicate removal\n// ---------------------------------------------------------------------------\n\n/**\n * Canonicalise a URL for comparison: strip hash, search params, and trailing\n * slashes. Returns `undefined` for invalid URLs.\n */\nexport function canonicalUrl(value: string | undefined): string | undefined {\n if (!value) return undefined;\n try {\n const u = new URL(value);\n u.hash = \"\";\n u.search = \"\";\n const pathname = u.pathname.replace(/\\/+$/, \"\");\n if (\n pathname === MCP_LEGACY_ROUTE_PREFIX ||\n pathname.endsWith(MCP_LEGACY_ROUTE_PREFIX)\n ) {\n u.pathname = `${pathname.slice(0, -MCP_LEGACY_ROUTE_PREFIX.length)}${MCP_PUBLIC_ROUTE_PREFIX}`;\n }\n return u.toString().replace(/\\/+$/, \"\");\n } catch {\n return undefined;\n }\n}\n\n/**\n * After writing the canonical `keepName` entry into a JSON config file,\n * remove any OTHER entries whose URL normalises to the same value as\n * `mcpUrl`. This cleans up stale alias names, legacy default names, and\n * leftover custom names that all pointed at the same server.\n *\n * Returns the list of entry names that were removed.\n */\nfunction removeJsonSameUrlDuplicatesAtKey(\n file: string,\n serversKey: string,\n mcpUrl: string,\n keepName: string,\n): string[] {\n let config: Record<string, any>;\n try {\n const raw = fs.readFileSync(file, \"utf-8\");\n if (!raw.trim()) return [];\n config = JSON.parse(raw);\n } catch {\n return [];\n }\n const servers = config?.[serversKey];\n if (!servers || typeof servers !== \"object\" || Array.isArray(servers)) {\n return [];\n }\n const targetCanonical = canonicalUrl(mcpUrl);\n if (!targetCanonical) return [];\n\n const toRemove: string[] = [];\n for (const name of Object.keys(servers)) {\n if (name === keepName) continue;\n const entry = servers[name];\n if (!entry || typeof entry !== \"object\") continue;\n const entryUrl = typeof entry.url === \"string\" ? entry.url : undefined;\n if (canonicalUrl(entryUrl) === targetCanonical) {\n toRemove.push(name);\n }\n }\n if (toRemove.length === 0) return [];\n for (const name of toRemove) {\n delete servers[name];\n }\n writeFileAtomic(file, JSON.stringify(config, null, 2) + \"\\n\");\n return toRemove;\n}\n\nexport function removeJsonSameUrlDuplicates(\n file: string,\n mcpUrl: string,\n keepName: string,\n): string[] {\n return removeJsonSameUrlDuplicatesAtKey(file, \"mcpServers\", mcpUrl, keepName);\n}\n\n/**\n * After writing the canonical `keepName` Codex block, remove any OTHER\n * `[mcp_servers.*]` servers in the same TOML file whose `url =` line normalises\n * to the same value as `mcpUrl`. A server's entire footprint is removed — its\n * own table AND any sub-tables (`.http_headers`, `.env`, …), even when they are\n * not contiguous — so cleanup never leaves an orphaned sub-table behind.\n * Returns removed entry names in first-seen order.\n */\nexport function removeCodexSameUrlDuplicates(\n file: string,\n mcpUrl: string,\n keepName: string,\n): string[] {\n let content = \"\";\n try {\n content = fs.readFileSync(file, \"utf-8\");\n } catch {\n return [];\n }\n const targetCanonical = canonicalUrl(mcpUrl);\n if (!targetCanonical) return [];\n\n const lines = content.split(/\\r?\\n/);\n\n // Pass 1: map each server name to the canonical URL declared on its own\n // table, preserving first-seen order. Sub-tables don't carry the URL, so they\n // only register the name.\n const serverUrls = new Map<string, string | undefined>();\n let i = 0;\n while (i < lines.length) {\n const keys = parseTomlTableHeader(lines[i]);\n const name =\n keys && keys.length >= 2 && keys[0] === \"mcp_servers\"\n ? keys[1]\n : undefined;\n if (name === undefined) {\n i++;\n continue;\n }\n const isServerTable = keys!.length === 2;\n const body: string[] = [];\n i++;\n while (i < lines.length && parseTomlTableHeader(lines[i]) === null) {\n body.push(lines[i]);\n i++;\n }\n if (isServerTable) {\n const urlMatch = body\n .join(\"\\n\")\n .match(/^\\s*url\\s*=\\s*\"((?:\\\\.|[^\"])*)\"/m);\n const blockUrl = urlMatch\n ? urlMatch[1].replace(/\\\\\"/g, '\"').replace(/\\\\\\\\/g, \"\\\\\")\n : undefined;\n serverUrls.set(name, canonicalUrl(blockUrl));\n } else if (!serverUrls.has(name)) {\n serverUrls.set(name, undefined);\n }\n }\n\n const removeSet = new Set<string>();\n for (const [name, canonical] of serverUrls) {\n if (name !== keepName && canonical && canonical === targetCanonical) {\n removeSet.add(name);\n }\n }\n if (removeSet.size === 0) return [];\n\n // Pass 2: rebuild, dropping every table/sub-table belonging to a removed\n // server.\n const out: string[] = [];\n i = 0;\n while (i < lines.length) {\n const name = codexServerNameOfHeader(lines[i]);\n if (name !== undefined && removeSet.has(name)) {\n i++;\n while (i < lines.length && parseTomlTableHeader(lines[i]) === null) i++;\n continue;\n }\n out.push(lines[i]);\n i++;\n }\n\n const next = out\n .join(\"\\n\")\n .replace(/\\n{3,}/g, \"\\n\\n\")\n .replace(/\\n*$/, \"\\n\");\n writeFileAtomic(file, next);\n return [...removeSet];\n}\n\n/**\n * Unified helper: after writing the canonical `serverName` entry for the\n * given `client`, remove same-URL duplicates from its config file.\n * Returns the list of removed names (empty if nothing was cleaned up).\n */\nexport function removeSameUrlDuplicatesForClient(\n client: ClientId,\n serverName: string,\n mcpUrl: string,\n baseDir: string,\n scope: string | undefined,\n): string[] {\n const file = configPathFor(client, baseDir, scope);\n if (client === \"codex\") {\n return removeCodexSameUrlDuplicates(file, mcpUrl, serverName);\n }\n return removeJsonSameUrlDuplicatesAtKey(\n file,\n jsonMcpConfigKeyForClient(client),\n mcpUrl,\n serverName,\n );\n}\n"]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export interface CliTelemetryOptions {
|
|
2
|
+
/** Stable identifier for the emitting CLI, e.g. "skills-installer". */
|
|
3
|
+
cli: string;
|
|
4
|
+
cliVersion: string;
|
|
5
|
+
command: string;
|
|
6
|
+
interactive: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface CliTelemetry {
|
|
9
|
+
track(event: string, properties?: Record<string, unknown>): void;
|
|
10
|
+
captureException(error: unknown, context?: CliExceptionContext): void;
|
|
11
|
+
flush(): Promise<void>;
|
|
12
|
+
}
|
|
13
|
+
export interface CliExceptionContext {
|
|
14
|
+
handled?: boolean;
|
|
15
|
+
level?: "fatal" | "error" | "warning" | "info" | "debug";
|
|
16
|
+
tags?: Record<string, string | number | boolean | null | undefined>;
|
|
17
|
+
extra?: Record<string, unknown>;
|
|
18
|
+
}
|
|
19
|
+
export declare function createCliTelemetry(options: CliTelemetryOptions): CliTelemetry;
|
|
20
|
+
//# sourceMappingURL=telemetry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"telemetry.d.ts","sourceRoot":"","sources":["../src/telemetry.ts"],"names":[],"mappings":"AA8BA,MAAM,WAAW,mBAAmB;IAClC,uEAAuE;IACvE,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAC;IACjE,gBAAgB,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACtE,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;IACzD,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAC,CAAC;IACpE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACjC;AAmJD,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,mBAAmB,GAAG,YAAY,CAwD7E"}
|
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Best-effort install-funnel telemetry for the skills CLI.
|
|
3
|
+
*
|
|
4
|
+
* Events are POSTed to the first-party Agent Native Analytics endpoint
|
|
5
|
+
* (analytics.agent-native.com/track) using a PUBLIC, write-only key — the same
|
|
6
|
+
* mechanism every agent-native app uses to report client-side events. Nothing
|
|
7
|
+
* here ever blocks or throws into the install flow: sends are fire-and-forget
|
|
8
|
+
* and `flush()` awaits any in-flight requests with a short cap before exit.
|
|
9
|
+
*
|
|
10
|
+
* Privacy: we report skill NAMES, client ids, scope, counts, platform, and the
|
|
11
|
+
* CLI version — never file paths, repo names, cwd, skill sources, or anything
|
|
12
|
+
* user-identifying. A random per-machine install id (unique installs) and a
|
|
13
|
+
* per-invocation run id (step-by-step dropoff) are the only identifiers.
|
|
14
|
+
*
|
|
15
|
+
* Opt out with DO_NOT_TRACK=1 or AGENT_NATIVE_TELEMETRY_DISABLED=1.
|
|
16
|
+
*/
|
|
17
|
+
import crypto from "node:crypto";
|
|
18
|
+
import fs from "node:fs";
|
|
19
|
+
import os from "node:os";
|
|
20
|
+
import path from "node:path";
|
|
21
|
+
// Public, write-only analytics key. Safe to embed (revocable from the Analytics
|
|
22
|
+
// settings UI). Override with AGENT_NATIVE_ANALYTICS_PUBLIC_KEY for testing or
|
|
23
|
+
// to point telemetry at a different first-party analytics instance.
|
|
24
|
+
// guard:allow-public-key -- first-party analytics write key is public by design.
|
|
25
|
+
const EMBEDDED_PUBLIC_KEY = "anpk_dc523e34b99bc34d76e82d94c46593544e4a8509a4bfc93c";
|
|
26
|
+
const DEFAULT_ENDPOINT = "https://analytics.agent-native.com/track";
|
|
27
|
+
const FLUSH_TIMEOUT_MS = 1500;
|
|
28
|
+
function resolvePublicKey() {
|
|
29
|
+
const fromEnv = process.env.AGENT_NATIVE_ANALYTICS_PUBLIC_KEY?.trim();
|
|
30
|
+
return fromEnv || EMBEDDED_PUBLIC_KEY;
|
|
31
|
+
}
|
|
32
|
+
function resolveEndpoint() {
|
|
33
|
+
const fromEnv = process.env.AGENT_NATIVE_ANALYTICS_ENDPOINT?.trim();
|
|
34
|
+
return (fromEnv || DEFAULT_ENDPOINT).replace(/\/+$/, "");
|
|
35
|
+
}
|
|
36
|
+
function telemetryDisabled() {
|
|
37
|
+
return (process.env.DO_NOT_TRACK === "1" ||
|
|
38
|
+
process.env.AGENT_NATIVE_TELEMETRY_DISABLED === "1" ||
|
|
39
|
+
process.env.NODE_ENV === "test" ||
|
|
40
|
+
typeof fetch !== "function");
|
|
41
|
+
}
|
|
42
|
+
const MAX_EXCEPTION_MESSAGE_LENGTH = 1000;
|
|
43
|
+
const MAX_EXCEPTION_STACK_LENGTH = 8000;
|
|
44
|
+
const MAX_EXCEPTION_TAGS = 30;
|
|
45
|
+
const MAX_EXCEPTION_EXTRA_KEYS = 30;
|
|
46
|
+
const MAX_EXCEPTION_VALUE_LENGTH = 1000;
|
|
47
|
+
const SECRET_RE = /\b(?:bearer|basic)\s+[^\s]+/gi;
|
|
48
|
+
const SECRET_KEY_RE = /(?:authorization|cookie|set[-_]?cookie|token|secret|password|passwd|pwd|api[-_]?key|apikey|credential)/i;
|
|
49
|
+
function redactExceptionText(value) {
|
|
50
|
+
return value
|
|
51
|
+
.replace(SECRET_RE, (match) => `${match.split(/\s+/, 1)[0]} <redacted>`)
|
|
52
|
+
.replace(/([A-Za-z0-9_$.-]*(?:authorization|cookie|token|secret|password|passwd|pwd|api[-_]?key|apikey|credential)[A-Za-z0-9_$.-]*\s*[:=]\s*)([^\s,;}]+)/gi, "$1<redacted>");
|
|
53
|
+
}
|
|
54
|
+
function boundedExceptionText(value, max) {
|
|
55
|
+
const text = typeof value === "string" ? value : String(value ?? "Unknown error");
|
|
56
|
+
const safe = redactExceptionText(text);
|
|
57
|
+
return safe.length > max ? safe.slice(0, max) : safe;
|
|
58
|
+
}
|
|
59
|
+
function safeExceptionValue(value, depth = 2) {
|
|
60
|
+
if (value == null ||
|
|
61
|
+
typeof value === "boolean" ||
|
|
62
|
+
typeof value === "number") {
|
|
63
|
+
return value;
|
|
64
|
+
}
|
|
65
|
+
if (typeof value === "string") {
|
|
66
|
+
return boundedExceptionText(value, MAX_EXCEPTION_VALUE_LENGTH);
|
|
67
|
+
}
|
|
68
|
+
if (depth <= 0)
|
|
69
|
+
return boundedExceptionText(value, MAX_EXCEPTION_VALUE_LENGTH);
|
|
70
|
+
if (Array.isArray(value)) {
|
|
71
|
+
return value
|
|
72
|
+
.slice(0, 20)
|
|
73
|
+
.map((item) => safeExceptionValue(item, depth - 1));
|
|
74
|
+
}
|
|
75
|
+
if (typeof value === "object") {
|
|
76
|
+
const out = {};
|
|
77
|
+
for (const [key, child] of Object.entries(value)) {
|
|
78
|
+
if (Object.keys(out).length >= MAX_EXCEPTION_EXTRA_KEYS)
|
|
79
|
+
break;
|
|
80
|
+
const safeKey = boundedExceptionText(key, 100);
|
|
81
|
+
out[safeKey] = SECRET_KEY_RE.test(safeKey)
|
|
82
|
+
? "<redacted>"
|
|
83
|
+
: safeExceptionValue(child, depth - 1);
|
|
84
|
+
}
|
|
85
|
+
return out;
|
|
86
|
+
}
|
|
87
|
+
return boundedExceptionText(value, MAX_EXCEPTION_VALUE_LENGTH);
|
|
88
|
+
}
|
|
89
|
+
function captureException(error, context, trackEvent) {
|
|
90
|
+
const exception = error instanceof Error
|
|
91
|
+
? {
|
|
92
|
+
type: boundedExceptionText(error.name || "Error", 200),
|
|
93
|
+
message: boundedExceptionText(error.message || error.name || "Error", MAX_EXCEPTION_MESSAGE_LENGTH),
|
|
94
|
+
stack: error.stack
|
|
95
|
+
? boundedExceptionText(error.stack, MAX_EXCEPTION_STACK_LENGTH)
|
|
96
|
+
: undefined,
|
|
97
|
+
}
|
|
98
|
+
: {
|
|
99
|
+
type: "Error",
|
|
100
|
+
message: boundedExceptionText(error, MAX_EXCEPTION_MESSAGE_LENGTH),
|
|
101
|
+
stack: undefined,
|
|
102
|
+
};
|
|
103
|
+
const tags = {};
|
|
104
|
+
for (const [key, value] of Object.entries(context.tags ?? {})) {
|
|
105
|
+
if (Object.keys(tags).length >= MAX_EXCEPTION_TAGS || value == null)
|
|
106
|
+
break;
|
|
107
|
+
const safeKey = boundedExceptionText(key, 100);
|
|
108
|
+
tags[safeKey] = SECRET_KEY_RE.test(safeKey)
|
|
109
|
+
? "<redacted>"
|
|
110
|
+
: boundedExceptionText(value, 200);
|
|
111
|
+
}
|
|
112
|
+
const extra = safeExceptionValue(context.extra);
|
|
113
|
+
trackEvent("$exception", {
|
|
114
|
+
app: "agent-native-cli",
|
|
115
|
+
template: "cli",
|
|
116
|
+
runtime: "cli",
|
|
117
|
+
source: "cli",
|
|
118
|
+
exceptionType: exception.type,
|
|
119
|
+
exceptionMessage: exception.message,
|
|
120
|
+
...(exception.stack ? { exceptionStack: exception.stack } : {}),
|
|
121
|
+
handled: context.handled ?? false,
|
|
122
|
+
level: context.level ?? "error",
|
|
123
|
+
occurredAt: new Date().toISOString(),
|
|
124
|
+
...(Object.keys(tags).length ? { exceptionTags: tags } : {}),
|
|
125
|
+
...(extra && typeof extra === "object" ? { exceptionExtra: extra } : {}),
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Read (or lazily create) a stable per-machine install id, shared across both
|
|
130
|
+
* skills CLIs so one developer counts once. Best-effort: an unwritable home
|
|
131
|
+
* directory just yields an ephemeral id for this run.
|
|
132
|
+
*/
|
|
133
|
+
function resolveInstallId() {
|
|
134
|
+
try {
|
|
135
|
+
const dir = path.join(os.homedir(), ".agent-native");
|
|
136
|
+
const file = path.join(dir, "installation-id");
|
|
137
|
+
const existing = fs.existsSync(file)
|
|
138
|
+
? fs.readFileSync(file, "utf8").trim()
|
|
139
|
+
: "";
|
|
140
|
+
if (existing)
|
|
141
|
+
return existing;
|
|
142
|
+
const id = crypto.randomUUID();
|
|
143
|
+
fs.mkdirSync(dir, { recursive: true });
|
|
144
|
+
fs.writeFileSync(file, `${id}\n`, "utf8");
|
|
145
|
+
return id;
|
|
146
|
+
}
|
|
147
|
+
catch {
|
|
148
|
+
return crypto.randomUUID();
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
export function createCliTelemetry(options) {
|
|
152
|
+
const publicKey = resolvePublicKey();
|
|
153
|
+
const disabled = telemetryDisabled() || !publicKey;
|
|
154
|
+
const endpoint = resolveEndpoint();
|
|
155
|
+
let installId = disabled ? "" : undefined;
|
|
156
|
+
const runId = crypto.randomUUID();
|
|
157
|
+
const inFlight = new Set();
|
|
158
|
+
const base = {
|
|
159
|
+
cli: options.cli,
|
|
160
|
+
cliVersion: options.cliVersion,
|
|
161
|
+
command: options.command,
|
|
162
|
+
node: process.version,
|
|
163
|
+
platform: process.platform,
|
|
164
|
+
ci: process.env.CI === "true",
|
|
165
|
+
interactive: options.interactive,
|
|
166
|
+
runId,
|
|
167
|
+
};
|
|
168
|
+
function track(event, properties) {
|
|
169
|
+
if (disabled)
|
|
170
|
+
return;
|
|
171
|
+
installId ??= resolveInstallId();
|
|
172
|
+
const body = JSON.stringify({
|
|
173
|
+
publicKey,
|
|
174
|
+
event,
|
|
175
|
+
anonymousId: installId,
|
|
176
|
+
sessionId: runId,
|
|
177
|
+
timestamp: new Date().toISOString(),
|
|
178
|
+
properties: { ...base, installId, ...properties },
|
|
179
|
+
});
|
|
180
|
+
const promise = fetch(endpoint, {
|
|
181
|
+
method: "POST",
|
|
182
|
+
headers: { "Content-Type": "application/json" },
|
|
183
|
+
body,
|
|
184
|
+
keepalive: true,
|
|
185
|
+
})
|
|
186
|
+
.then(() => undefined)
|
|
187
|
+
.catch(() => undefined);
|
|
188
|
+
inFlight.add(promise);
|
|
189
|
+
void promise.finally(() => inFlight.delete(promise));
|
|
190
|
+
}
|
|
191
|
+
async function flush() {
|
|
192
|
+
if (disabled || inFlight.size === 0)
|
|
193
|
+
return;
|
|
194
|
+
await Promise.race([
|
|
195
|
+
Promise.allSettled([...inFlight]),
|
|
196
|
+
new Promise((resolve) => setTimeout(resolve, FLUSH_TIMEOUT_MS)),
|
|
197
|
+
]);
|
|
198
|
+
}
|
|
199
|
+
return {
|
|
200
|
+
track,
|
|
201
|
+
captureException: (error, context = {}) => captureException(error, context, track),
|
|
202
|
+
flush,
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
//# sourceMappingURL=telemetry.js.map
|
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,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;IACvD,CAAC;IAED,KAAK,UAAU,KAAK;QAClB,IAAI,QAAQ,IAAI,QAAQ,CAAC,IAAI,KAAK,CAAC;YAAE,OAAO;QAC5C,MAAM,OAAO,CAAC,IAAI,CAAC;YACjB,OAAO,CAAC,UAAU,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC;YACjC,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;SAChE,CAAC,CAAC;IACL,CAAC;IAED,OAAO;QACL,KAAK;QACL,gBAAgB,EAAE,CAAC,KAAK,EAAE,OAAO,GAAG,EAAE,EAAE,EAAE,CACxC,gBAAgB,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC;QACzC,KAAK;KACN,CAAC;AACJ,CAAC","sourcesContent":["/**\n * Best-effort install-funnel telemetry for the skills CLI.\n *\n * Events are POSTed to the first-party Agent Native Analytics endpoint\n * (analytics.agent-native.com/track) using a PUBLIC, write-only key — the same\n * mechanism every agent-native app uses to report client-side events. Nothing\n * here ever blocks or throws into the install flow: sends are fire-and-forget\n * and `flush()` awaits any in-flight requests with a short cap before exit.\n *\n * Privacy: we report skill NAMES, client ids, scope, counts, platform, and the\n * CLI version — never file paths, repo names, cwd, skill sources, or anything\n * user-identifying. A random per-machine install id (unique installs) and a\n * per-invocation run id (step-by-step dropoff) are the only identifiers.\n *\n * Opt out with DO_NOT_TRACK=1 or AGENT_NATIVE_TELEMETRY_DISABLED=1.\n */\nimport crypto from \"node:crypto\";\nimport fs from \"node:fs\";\nimport os from \"node:os\";\nimport path from \"node:path\";\n\n// Public, write-only analytics key. Safe to embed (revocable from the Analytics\n// settings UI). Override with AGENT_NATIVE_ANALYTICS_PUBLIC_KEY for testing or\n// to point telemetry at a different first-party analytics instance.\n// guard:allow-public-key -- first-party analytics write key is public by design.\nconst EMBEDDED_PUBLIC_KEY =\n \"anpk_dc523e34b99bc34d76e82d94c46593544e4a8509a4bfc93c\";\nconst DEFAULT_ENDPOINT = \"https://analytics.agent-native.com/track\";\nconst FLUSH_TIMEOUT_MS = 1500;\n\nexport interface CliTelemetryOptions {\n /** Stable identifier for the emitting CLI, e.g. \"skills-installer\". */\n cli: string;\n cliVersion: string;\n command: string;\n interactive: boolean;\n}\n\nexport interface CliTelemetry {\n track(event: string, properties?: Record<string, unknown>): void;\n captureException(error: unknown, context?: CliExceptionContext): void;\n flush(): Promise<void>;\n}\n\nexport interface CliExceptionContext {\n handled?: boolean;\n level?: \"fatal\" | \"error\" | \"warning\" | \"info\" | \"debug\";\n tags?: Record<string, string | number | boolean | null | undefined>;\n extra?: Record<string, unknown>;\n}\n\nfunction resolvePublicKey(): string {\n const fromEnv = process.env.AGENT_NATIVE_ANALYTICS_PUBLIC_KEY?.trim();\n return fromEnv || EMBEDDED_PUBLIC_KEY;\n}\n\nfunction resolveEndpoint(): string {\n const fromEnv = process.env.AGENT_NATIVE_ANALYTICS_ENDPOINT?.trim();\n return (fromEnv || DEFAULT_ENDPOINT).replace(/\\/+$/, \"\");\n}\n\nfunction telemetryDisabled(): boolean {\n return (\n process.env.DO_NOT_TRACK === \"1\" ||\n process.env.AGENT_NATIVE_TELEMETRY_DISABLED === \"1\" ||\n process.env.NODE_ENV === \"test\" ||\n typeof fetch !== \"function\"\n );\n}\n\nconst MAX_EXCEPTION_MESSAGE_LENGTH = 1000;\nconst MAX_EXCEPTION_STACK_LENGTH = 8000;\nconst MAX_EXCEPTION_TAGS = 30;\nconst MAX_EXCEPTION_EXTRA_KEYS = 30;\nconst MAX_EXCEPTION_VALUE_LENGTH = 1000;\nconst SECRET_RE = /\\b(?:bearer|basic)\\s+[^\\s]+/gi;\nconst SECRET_KEY_RE =\n /(?:authorization|cookie|set[-_]?cookie|token|secret|password|passwd|pwd|api[-_]?key|apikey|credential)/i;\n\nfunction redactExceptionText(value: string): string {\n return value\n .replace(SECRET_RE, (match) => `${match.split(/\\s+/, 1)[0]} <redacted>`)\n .replace(\n /([A-Za-z0-9_$.-]*(?:authorization|cookie|token|secret|password|passwd|pwd|api[-_]?key|apikey|credential)[A-Za-z0-9_$.-]*\\s*[:=]\\s*)([^\\s,;}]+)/gi,\n \"$1<redacted>\",\n );\n}\n\nfunction boundedExceptionText(value: unknown, max: number): string {\n const text =\n typeof value === \"string\" ? value : String(value ?? \"Unknown error\");\n const safe = redactExceptionText(text);\n return safe.length > max ? safe.slice(0, max) : safe;\n}\n\nfunction safeExceptionValue(value: unknown, depth = 2): unknown {\n if (\n value == null ||\n typeof value === \"boolean\" ||\n typeof value === \"number\"\n ) {\n return value;\n }\n if (typeof value === \"string\") {\n return boundedExceptionText(value, MAX_EXCEPTION_VALUE_LENGTH);\n }\n if (depth <= 0)\n return boundedExceptionText(value, MAX_EXCEPTION_VALUE_LENGTH);\n if (Array.isArray(value)) {\n return value\n .slice(0, 20)\n .map((item) => safeExceptionValue(item, depth - 1));\n }\n if (typeof value === \"object\") {\n const out: Record<string, unknown> = {};\n for (const [key, child] of Object.entries(value)) {\n if (Object.keys(out).length >= MAX_EXCEPTION_EXTRA_KEYS) break;\n const safeKey = boundedExceptionText(key, 100);\n out[safeKey] = SECRET_KEY_RE.test(safeKey)\n ? \"<redacted>\"\n : safeExceptionValue(child, depth - 1);\n }\n return out;\n }\n return boundedExceptionText(value, MAX_EXCEPTION_VALUE_LENGTH);\n}\n\nfunction captureException(\n error: unknown,\n context: CliExceptionContext,\n trackEvent: (event: string, properties?: Record<string, unknown>) => void,\n): void {\n const exception =\n error instanceof Error\n ? {\n type: boundedExceptionText(error.name || \"Error\", 200),\n message: boundedExceptionText(\n error.message || error.name || \"Error\",\n MAX_EXCEPTION_MESSAGE_LENGTH,\n ),\n stack: error.stack\n ? boundedExceptionText(error.stack, MAX_EXCEPTION_STACK_LENGTH)\n : undefined,\n }\n : {\n type: \"Error\",\n message: boundedExceptionText(error, MAX_EXCEPTION_MESSAGE_LENGTH),\n stack: undefined,\n };\n const tags: Record<string, string> = {};\n for (const [key, value] of Object.entries(context.tags ?? {})) {\n if (Object.keys(tags).length >= MAX_EXCEPTION_TAGS || value == null) break;\n const safeKey = boundedExceptionText(key, 100);\n tags[safeKey] = SECRET_KEY_RE.test(safeKey)\n ? \"<redacted>\"\n : boundedExceptionText(value, 200);\n }\n const extra = safeExceptionValue(context.extra);\n trackEvent(\"$exception\", {\n app: \"agent-native-cli\",\n template: \"cli\",\n runtime: \"cli\",\n source: \"cli\",\n exceptionType: exception.type,\n exceptionMessage: exception.message,\n ...(exception.stack ? { exceptionStack: exception.stack } : {}),\n handled: context.handled ?? false,\n level: context.level ?? \"error\",\n occurredAt: new Date().toISOString(),\n ...(Object.keys(tags).length ? { exceptionTags: tags } : {}),\n ...(extra && typeof extra === \"object\" ? { exceptionExtra: extra } : {}),\n });\n}\n\n/**\n * Read (or lazily create) a stable per-machine install id, shared across both\n * skills CLIs so one developer counts once. Best-effort: an unwritable home\n * directory just yields an ephemeral id for this run.\n */\nfunction resolveInstallId(): string {\n try {\n const dir = path.join(os.homedir(), \".agent-native\");\n const file = path.join(dir, \"installation-id\");\n const existing = fs.existsSync(file)\n ? fs.readFileSync(file, \"utf8\").trim()\n : \"\";\n if (existing) return existing;\n const id = crypto.randomUUID();\n fs.mkdirSync(dir, { recursive: true });\n fs.writeFileSync(file, `${id}\\n`, \"utf8\");\n return id;\n } catch {\n return crypto.randomUUID();\n }\n}\n\nexport function createCliTelemetry(options: CliTelemetryOptions): CliTelemetry {\n const publicKey = resolvePublicKey();\n const disabled = telemetryDisabled() || !publicKey;\n const endpoint = resolveEndpoint();\n let installId: string | undefined = disabled ? \"\" : undefined;\n const runId = crypto.randomUUID();\n const inFlight = new Set<Promise<void>>();\n\n const base = {\n cli: options.cli,\n cliVersion: options.cliVersion,\n command: options.command,\n node: process.version,\n platform: process.platform,\n ci: process.env.CI === \"true\",\n interactive: options.interactive,\n runId,\n };\n\n function track(event: string, properties?: Record<string, unknown>): void {\n if (disabled) return;\n installId ??= resolveInstallId();\n const body = JSON.stringify({\n publicKey,\n event,\n anonymousId: installId,\n sessionId: runId,\n timestamp: new Date().toISOString(),\n properties: { ...base, installId, ...properties },\n });\n const promise = fetch(endpoint, {\n method: \"POST\",\n headers: { \"Content-Type\": \"application/json\" },\n body,\n keepalive: true,\n })\n .then(() => undefined)\n .catch(() => undefined);\n inFlight.add(promise);\n void promise.finally(() => inFlight.delete(promise));\n }\n\n async function flush(): Promise<void> {\n if (disabled || inFlight.size === 0) return;\n await Promise.race([\n Promise.allSettled([...inFlight]),\n new Promise((resolve) => setTimeout(resolve, FLUSH_TIMEOUT_MS)),\n ]);\n }\n\n return {\n track,\n captureException: (error, context = {}) =>\n captureException(error, context, track),\n flush,\n };\n}\n"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@agent-native/skills",
|
|
3
|
+
"version": "0.0.0-beta-20260819155526",
|
|
4
|
+
"description": "Install BuilderIO skills for coding agents.",
|
|
5
|
+
"homepage": "https://github.com/BuilderIO/agent-native#readme",
|
|
6
|
+
"bugs": {
|
|
7
|
+
"url": "https://github.com/BuilderIO/agent-native/issues"
|
|
8
|
+
},
|
|
9
|
+
"license": "MIT",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "https://github.com/BuilderIO/agent-native",
|
|
13
|
+
"directory": "packages/skills"
|
|
14
|
+
},
|
|
15
|
+
"bin": {
|
|
16
|
+
"skills": "dist/cli.js"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"dist"
|
|
20
|
+
],
|
|
21
|
+
"type": "module",
|
|
22
|
+
"types": "dist/index.d.ts",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"default": "./dist/index.js"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public",
|
|
31
|
+
"provenance": true
|
|
32
|
+
},
|
|
33
|
+
"dependencies": {
|
|
34
|
+
"@clack/prompts": "^1.7.0",
|
|
35
|
+
"@agent-native/core": "0.0.0-beta-20260819155526"
|
|
36
|
+
},
|
|
37
|
+
"devDependencies": {
|
|
38
|
+
"@types/node": "^25.9.2",
|
|
39
|
+
"typescript-7": "npm:typescript@^7.0.2",
|
|
40
|
+
"vitest": "^4.1.5"
|
|
41
|
+
},
|
|
42
|
+
"scripts": {
|
|
43
|
+
"build": "tsc",
|
|
44
|
+
"typecheck": "tsc --noEmit",
|
|
45
|
+
"test": "vitest --run src --passWithNoTests"
|
|
46
|
+
}
|
|
47
|
+
}
|