@vatio-ai/skills 1.28.1 → 1.29.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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vatio",
3
3
  "description": "Vatio skills for Claude Code, Cursor and Codex: add an AI agent to the app you're building with /vatio-init, then improve it daily with /vatio-improve and learn what people ask it with /vatio-analyze.",
4
- "version": "1.28.1",
4
+ "version": "1.29.0",
5
5
  "author": {
6
6
  "name": "Vatio",
7
7
  "url": "https://vatio.ai"
package/README.md CHANGED
@@ -77,8 +77,10 @@ program, the [Vatio CLI](https://github.com/vatio-ai/cli)
77
77
  before it leaves) bring your workspace's conversations to your terminal.
78
78
  `vatio docs` fetches the docs.
79
79
  - **How each command ended.** The CLI tells Vatio which command ran, its exit
80
- code and, on failure, what it printed; never arguments, file contents,
81
- secrets or what a chat said. `VATIO_TELEMETRY=0` turns it off.
80
+ code, how long it took, which version of these skills the project has and,
81
+ on failure, what it printed; never arguments, file contents, secrets or what
82
+ a chat said. Installing these skills tells Vatio once, with their version
83
+ and the coding agent. `VATIO_TELEMETRY=0` turns both off.
82
84
  - **Feedback.** `vatio feedback "..."` sends the text your agent writes about
83
85
  what got in its way.
84
86
  - **Your coding session, only if you say yes.** `vatio-share-session` shows
package/bin/install.mjs CHANGED
@@ -4,8 +4,10 @@
4
4
  // .agents/skills/ Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode, Cline, Amp
5
5
  // .claude/skills/ Claude Code, which does not read .agents/
6
6
  // Running it again overwrites the copies with this version's.
7
- import { cpSync, existsSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
8
- import { dirname, join, relative } from "node:path";
7
+ import { randomUUID } from "node:crypto";
8
+ import { cpSync, existsSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from "node:fs";
9
+ import { homedir } from "node:os";
10
+ import { dirname, join, relative, resolve } from "node:path";
9
11
  import { fileURLToPath } from "node:url";
10
12
 
11
13
  const usage = `usage: npx @vatio-ai/skills [--dir PATH]
@@ -72,3 +74,67 @@ function installedByUs(dir, name) {
72
74
  console.log(`
73
75
  Ask your coding agent to build or improve a Vatio agent and it will use them.
74
76
  Docs: https://vatio.ai/docs/integrations/claude-code`);
77
+
78
+ await reportInstall();
79
+
80
+ // One event saying the skills were installed: this version, which coding
81
+ // agent ran it, and the CLI's session for this directory, so the commands
82
+ // that follow here read as the same session. Nothing about the project.
83
+ // VATIO_TELEMETRY=0 (or DO_NOT_TRACK=1) skips it, as it does for the CLI.
84
+ async function reportInstall() {
85
+ const off = ["0", "false", "off", "no"].includes(String(process.env.VATIO_TELEMETRY ?? "").trim().toLowerCase()) ||
86
+ ["1", "true"].includes(String(process.env.DO_NOT_TRACK ?? "").trim().toLowerCase());
87
+ if (off) return;
88
+
89
+ console.log("Letting Vatio know these skills were installed (their version and the coding agent, nothing else).\nVATIO_TELEMETRY=0 skips it.");
90
+ const base = String(process.env.VATIO_BASE_URL ?? "").trim().replace(/\/+$/, "") || "https://vatio.ai";
91
+ try {
92
+ await fetch(`${base}/api/developer/v1/cli/events`, {
93
+ method: "POST",
94
+ headers: {
95
+ "Content-Type": "application/json",
96
+ "User-Agent": `vatio-skills/${version}`,
97
+ "X-Vatio-Session": sessionId(),
98
+ "X-Vatio-Agent": codingAgent()
99
+ },
100
+ body: JSON.stringify({ kind: "install", command: "skills install", exit_code: 0, skills: `copy ${version}` }),
101
+ signal: AbortSignal.timeout(1_500)
102
+ });
103
+ } catch {
104
+ // Telemetry never fails an install.
105
+ }
106
+ }
107
+
108
+ // The same detection as the CLI's (cli/lib/telemetry.mjs), which this
109
+ // package cannot import.
110
+ function codingAgent() {
111
+ const env = process.env;
112
+ if (env.VATIO_AGENT) return String(env.VATIO_AGENT).slice(0, 64);
113
+ if (env.CLAUDECODE) return "claude-code";
114
+ if (env.CURSOR_AGENT || env.CURSOR_TRACE_ID) return "cursor";
115
+ if (env.CODEX_THREAD_ID || env.CODEX_SESSION_ID || env.CODEX_SANDBOX || env.CODEX_MANAGED_BY_NPM) return "codex";
116
+ if (env.GEMINI_CLI) return "gemini-cli";
117
+ if (env.REPL_ID) return "replit";
118
+ if (env.CI) return "ci";
119
+ return process.stdout.isTTY ? "human" : "unknown";
120
+ }
121
+
122
+ // The CLI's session for this directory (~/.vatio/sessions.json), or a new
123
+ // one it will pick up: a session ends after 30 minutes without a command.
124
+ function sessionId() {
125
+ const home = String(process.env.VATIO_HOME ?? "").trim();
126
+ const path = join(home === "" ? join(homedir(), ".vatio") : resolve(home), "sessions.json");
127
+ const key = resolve(root);
128
+ try {
129
+ const sessions = existsSync(path) ? JSON.parse(readFileSync(path, "utf8")) : {};
130
+ const now = Date.now();
131
+ const current = sessions[key];
132
+ const id = current && now - Date.parse(current.last_used_at) < 30 * 60 * 1000 ? current.id : randomUUID();
133
+ sessions[key] = { id, last_used_at: new Date(now).toISOString() };
134
+ mkdirSync(dirname(path), { recursive: true });
135
+ writeFileSync(path, JSON.stringify(sessions));
136
+ return id;
137
+ } catch {
138
+ return randomUUID();
139
+ }
140
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vatio-ai/skills",
3
- "version": "1.28.1",
3
+ "version": "1.29.0",
4
4
  "description": "Vatio skills for Claude Code, Cursor and Codex: add an AI agent to the app you're building with /vatio-init, then improve it daily with /vatio-improve and learn what people ask it with /vatio-analyze.",
5
5
  "keywords": [
6
6
  "vatio",