@vatio-ai/skills 1.29.1 → 1.29.2

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.29.1",
4
+ "version": "1.29.2",
5
5
  "author": {
6
6
  "name": "Vatio",
7
7
  "url": "https://vatio.ai"
package/bin/install.mjs CHANGED
@@ -4,10 +4,11 @@
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 { spawnSync } from "node:child_process";
7
8
  import { randomUUID } from "node:crypto";
8
9
  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";
10
+ import { homedir, platform } from "node:os";
11
+ import { basename, dirname, join, relative, resolve } from "node:path";
11
12
  import { fileURLToPath } from "node:url";
12
13
 
13
14
  const usage = `usage: npx @vatio-ai/skills [--dir PATH]
@@ -116,7 +117,30 @@ function codingAgent() {
116
117
  if (env.GEMINI_CLI) return "gemini-cli";
117
118
  if (env.REPL_ID) return "replit";
118
119
  if (env.CI) return "ci";
119
- return process.stdout.isTTY ? "human" : "unknown";
120
+ if (process.stdout.isTTY) return "human";
121
+ const parent = launcher();
122
+ return parent ? `unknown:${parent}` : "unknown";
123
+ }
124
+
125
+ // What started the installer, when no coding agent said so: the first
126
+ // ancestor that is not a shell or Node, by its process name.
127
+ function launcher() {
128
+ if (platform() === "win32") return null;
129
+ const skip = new Set(["sh", "bash", "zsh", "fish", "dash", "ksh", "env", "node", "npm", "npx", "pnpm", "yarn", "bun", "sudo", "xargs", "timeout", "login"]);
130
+ try {
131
+ let pid = process.ppid;
132
+ for (let depth = 0; depth < 6 && pid > 1; depth++) {
133
+ const out = spawnSync("ps", ["-o", "ppid=,comm=", "-p", String(pid)], { encoding: "utf8", timeout: 500 });
134
+ const match = /^\s*(\d+)\s+(.+?)\s*$/.exec(out.stdout ?? "");
135
+ if (!match) return null;
136
+ const name = basename(match[2]).replace(/^-/, "");
137
+ if (!skip.has(name)) return name.replace(/[^\w .-]/g, "").slice(0, 40) || null;
138
+ pid = Number(match[1]);
139
+ }
140
+ } catch {
141
+ return null;
142
+ }
143
+ return null;
120
144
  }
121
145
 
122
146
  // The CLI's session for this directory (~/.vatio/sessions.json), or a new
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vatio-ai/skills",
3
- "version": "1.29.1",
3
+ "version": "1.29.2",
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",