@vatio-ai/cli 0.121.0 → 0.123.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/bin/vatio.mjs CHANGED
@@ -15,7 +15,7 @@ import { configCommand, doctor, init, version, whoami } from "../lib/commands/mi
15
15
  import { diff, publish, pull, push, rollback, status } from "../lib/commands/deploy.mjs";
16
16
  import { env } from "../lib/commands/env.mjs";
17
17
  import { keys, secrets } from "../lib/commands/workspace-admin.mjs";
18
- import { templates, webhooks } from "../lib/commands/webhooks.mjs";
18
+ import { webhooks } from "../lib/commands/webhooks.mjs";
19
19
  import { contacts } from "../lib/commands/contacts.mjs";
20
20
  import { auth } from "../lib/commands/identity-key.mjs";
21
21
  import { chat, chatHelp } from "../lib/commands/chat.mjs";
@@ -25,8 +25,7 @@ import { quietHours } from "../lib/commands/quiet-hours.mjs";
25
25
  import { team } from "../lib/commands/team.mjs";
26
26
  import { instagram, whatsapp } from "../lib/commands/channels.mjs";
27
27
  import { docs, feedback, shareSession } from "../lib/commands/support-commands.mjs";
28
- import { messages } from "../lib/commands/messages.mjs";
29
- import { evalCommand, flags, test, tools } from "../lib/commands/improve.mjs";
28
+ import { test, tools } from "../lib/commands/improve.mjs";
30
29
  import { printUpdateNotice, startUpdateCheck } from "../lib/update-notice.mjs";
31
30
  import { runLatest } from "../lib/run-latest.mjs";
32
31
  import { beginRun, isCodingAgent, reportRun, telemetryEnabled } from "../lib/telemetry.mjs";
@@ -98,8 +97,6 @@ async function run(command, args) {
98
97
  return await diff(config, args);
99
98
  case "keys":
100
99
  return await keys(config, args);
101
- case "templates":
102
- return await templates(config, args);
103
100
  case "webhooks":
104
101
  return await webhooks(config, args);
105
102
  case "contacts":
@@ -108,8 +105,6 @@ async function run(command, args) {
108
105
  return await auth(config, args);
109
106
  case "chat":
110
107
  return await chat(config, args);
111
- case "messages":
112
- return await messages(config, args);
113
108
  case "kb":
114
109
  return await kb(config, args);
115
110
  case "business":
@@ -124,12 +119,8 @@ async function run(command, args) {
124
119
  return await whatsapp(config, args);
125
120
  case "instagram":
126
121
  return await instagram(config, args);
127
- case "flags":
128
- return await flags(config, args);
129
122
  case "test":
130
123
  return await test(config, args);
131
- case "eval":
132
- return await evalCommand(config, args);
133
124
  case "tools":
134
125
  return await tools(config, args);
135
126
  case "changelog":
@@ -32,7 +32,6 @@ const MINE_REMOVED =
32
32
 
33
33
  // One noun per thing on the inbox's WhatsApp page, each with the same verbs:
34
34
  // the number itself, its test phones, its templates and its failed messages.
35
- // `test-phones`, `vatio templates` and `vatio messages failed` still work.
36
35
  export async function whatsapp(config, args = []) {
37
36
  const json = takeFlag(args, "--json");
38
37
  const sub = args.shift();
@@ -57,7 +56,6 @@ export async function whatsapp(config, args = []) {
57
56
  case "team":
58
57
  return printTeam(await client().whatsappTeam(), { json });
59
58
  case "phones":
60
- case "test-phones":
61
59
  return phones(config, client(), args, { json });
62
60
  case "templates":
63
61
  return templates(config, json ? [...args, "--json"] : args);
@@ -189,7 +187,7 @@ function printNumber(number, { json = false } = {}) {
189
187
  const live = number.live
190
188
  ? paint("green", "live: the agent answers everyone who writes")
191
189
  : paint("cyan", "paused: vatio whatsapp live on to answer");
192
- console.log(`\n${number.number ?? number.display_phone_number ?? "Your number"}: ${live}`);
190
+ console.log(`\n${number.number ?? "Your number"}: ${live}`);
193
191
  if (number.last_health_error) console.log(` ${paint("red", "problem:")} ${number.last_health_error} (vatio whatsapp check)`);
194
192
  if (number.failed_deliveries) console.log(` ${number.failed_deliveries} failed deliveries: vatio whatsapp failed`);
195
193
  }
@@ -122,7 +122,7 @@ workspace has never met.
122
122
  \`--as-phone\` opens a preview chat that speaks as a phone, for tools that
123
123
  need $contact.phone_number or a team role (access: supervisor and up): \`me\`
124
124
  is your own verified WhatsApp, with your role on the team; a number from
125
- \`vatio whatsapp test-phones\` is a customer. It stays a CLI chat: nothing goes
125
+ \`vatio whatsapp phones\` is a customer. It stays a CLI chat: nothing goes
126
126
  to WhatsApp.
127
127
 
128
128
  \`export\` prints what people said and what they were answered between two
@@ -63,18 +63,6 @@ async function fetchMarkdown(config, path, what) {
63
63
  }
64
64
  }
65
65
 
66
- // `vatio flags` until 0.120.0, when reports and tests became one list: kept
67
- // for the skills, scripts and muscle memory that still call it.
68
- export async function flags(config, args) {
69
- const sub = args[0];
70
- const removing = ["rm", "remove", "delete"].includes(sub);
71
- const now = sub === "add" ? "vatio test add" : removing ? "vatio test rm" : "vatio test list";
72
- console.error(`vatio: \`vatio flags${sub === "add" || removing ? ` ${sub}` : ""}\` is \`${now}\` now.`);
73
- if (sub === "add") return await addTest(config, args.slice(1));
74
- if (removing) return await removeTests(config, args.slice(1));
75
- return await listTests(config, args);
76
- }
77
-
78
66
  // Each tool's calls, error rate, timeouts and p50/p95 latency over a period,
79
67
  // then the calls that failed with what your backend answered.
80
68
  export async function tools(config, args) {
@@ -102,7 +90,7 @@ export async function test(config, args) {
102
90
  if (args[0] === "add") return await addTest(config, args.slice(1));
103
91
  if (args[0] === "list") return await listTests(config, args.slice(1));
104
92
  if (["rm", "remove", "delete"].includes(args[0])) return await removeTests(config, args.slice(1));
105
- return await runTests(config, args, { name: "test", waitByDefault: false });
93
+ return await runTests(config, args);
106
94
  }
107
95
 
108
96
  const TEST_ADD_USAGE =
@@ -219,25 +207,15 @@ async function removeTests(config, ids) {
219
207
  }
220
208
  }
221
209
 
222
- // What `vatio test` was called until 0.81.0. Kept, waiting as it always did,
223
- // for the CI jobs and older skills that still call it; the name also reads as
224
- // the shell's eval to command guards, which refused it.
225
- export async function evalCommand(config, args) {
226
- console.error("vatio: `vatio eval` is deprecated; use `vatio test --wait` (or `vatio test` to start the run and return).");
227
- return await runTests(config, args, { name: "eval", waitByDefault: true });
228
- }
229
-
230
- async function runTests(config, args, { name, waitByDefault }) {
210
+ async function runTests(config, args) {
231
211
  const show = takeValue(args, "--show");
232
212
  if (show) return await testShow(config, show);
233
213
 
234
214
  const environment = takeEnv(args, { fallback: "preview" });
235
215
  const agent = takeValue(args, "--agent");
236
216
  const wait = takeFlag(args, "--wait");
237
- const noWait = takeFlag(args, "--no-wait");
238
217
  const timeoutS = Number(takeValue(args, "--timeout") ?? DEFAULT_TIMEOUT_S);
239
218
  const identity = takeIdentity(args, config);
240
- const waiting = wait || (waitByDefault && !noWait);
241
219
 
242
220
  const { url, token } = workspaceBase(config);
243
221
  const client = new HttpClient({ baseUrl: url, token });
@@ -284,26 +262,24 @@ async function runTests(config, args, { name, waitByDefault }) {
284
262
  const total = runs.reduce((sum, run) => sum + run.cases, 0);
285
263
  console.error(`vatio: replaying ${total} case${total === 1 ? "" : "s"} on ${environment}…`);
286
264
  await printSkillsHint();
287
- if (!waiting) {
288
- for (const run of runs) console.log(`Run ${run.id} (${run.agent}): vatio ${name} --show ${run.id}`);
289
- if (name === "test") {
290
- console.log(
291
- "The runs keep going on Vatio's servers, five cases at a time. `vatio test --show RUN_ID` prints the\n" +
292
- "report so far; `vatio test --wait` waits for this version's runs and exits 1 if a case fails."
293
- );
294
- }
265
+ if (!wait) {
266
+ for (const run of runs) console.log(`Run ${run.id} (${run.agent}): vatio test --show ${run.id}`);
267
+ console.log(
268
+ "The runs keep going on Vatio's servers, five cases at a time. `vatio test --show RUN_ID` prints the\n" +
269
+ "report so far; `vatio test --wait` waits for this version's runs and exits 1 if a case fails."
270
+ );
295
271
  return;
296
272
  }
297
273
  // Said before waiting, so the id is there to read the run again later
298
274
  // however this command ends.
299
- for (const run of runs) console.error(`vatio: run ${run.id} (${run.agent}): vatio ${name} --show ${run.id}`);
275
+ for (const run of runs) console.error(`vatio: run ${run.id} (${run.agent}): vatio test --show ${run.id}`);
300
276
 
301
277
  const deadline = Date.now() + timeoutS * 1000;
302
278
  const finished = [];
303
279
  for (const run of runs) {
304
280
  let row = run;
305
281
  while (!row.finished) {
306
- if (Date.now() > deadline) fail(`Timed out after ${timeoutS}s; the run keeps going. See it with: vatio ${name} --show ${run.id}`);
282
+ if (Date.now() > deadline) fail(`Timed out after ${timeoutS}s; the run keeps going. See it with: vatio test --show ${run.id}`);
307
283
  await sleep(POLL_MS);
308
284
  row = await client.get(`/evals/runs/${run.id}`);
309
285
  }
@@ -3,7 +3,7 @@
3
3
  import { deployClient } from "./deploy.mjs";
4
4
  import { fail, takeEnv, takeFlag, takeValue } from "../support.mjs";
5
5
 
6
- const USAGE = "vatio messages failed [--since DATE] [--until DATE] [--error-code CODE] " +
6
+ const USAGE = "vatio whatsapp failed [--since DATE] [--until DATE] [--error-code CODE] " +
7
7
  "[--error-contains TEXT] [--before ID] [--json]";
8
8
 
9
9
  export async function messages(config, args) {
@@ -1,4 +1,4 @@
1
- // `vatio templates` / `vatio webhooks` — what a developer sets up so their
1
+ // `vatio whatsapp templates` / `vatio webhooks` — what a developer sets up so their
2
2
  // backend can send WhatsApp messages through the server API: the templates
3
3
  // the number can send and new ones for Meta to approve, and where Vatio
4
4
  // reports what happened. Sending itself is the backend's job, with a server
@@ -16,11 +16,11 @@ function takeAll(args, name) {
16
16
  return values;
17
17
  }
18
18
 
19
- const LIST_USAGE = "vatio templates list [--env live] [--json]";
20
- const CREATE_USAGE = "vatio templates create NAME --language CODE --body TEXT [--example VALUE]... " +
19
+ const LIST_USAGE = "vatio whatsapp templates list [--env live] [--json]";
20
+ const CREATE_USAGE = "vatio whatsapp templates create NAME --language CODE --body TEXT [--example VALUE]... " +
21
21
  "[--category utility|marketing] [--footer TEXT] [--json]";
22
- const RM_USAGE = "vatio templates rm NAME [--language CODE] [--json]";
23
- const SYNC_USAGE = "vatio templates sync [--json]";
22
+ const RM_USAGE = "vatio whatsapp templates rm NAME [--language CODE] [--json]";
23
+ const SYNC_USAGE = "vatio whatsapp templates sync [--json]";
24
24
 
25
25
  export async function templates(config, args) {
26
26
  const json = takeFlag(args, "--json");
@@ -53,12 +53,12 @@ export async function templates(config, args) {
53
53
  if (list.length === 0) {
54
54
  if (live && payload.whatsapp_connected === false) {
55
55
  console.log("This workspace has no WhatsApp number of its own yet. The templates you create stay on Vatio's " +
56
- "test number until you connect one, and then Vatio moves them to it: vatio templates list --env preview");
56
+ "test number until you connect one, and then Vatio moves them to it: vatio whatsapp templates list --env preview");
57
57
  } else if (!live && payload.whatsapp_connected === true) {
58
- console.log("This workspace has its own WhatsApp number, so its templates are there: vatio templates list");
58
+ console.log("This workspace has its own WhatsApp number, so its templates are there: vatio whatsapp templates list");
59
59
  } else {
60
60
  console.log(`No templates on ${live ? "this workspace's WhatsApp number" : "Vatio's test number for this workspace"} yet. Create one:`);
61
- console.log(' vatio templates create order_shipped --language es --body "Hi {{1}}, order {{2}} is on its way." ' +
61
+ console.log(' vatio whatsapp templates create order_shipped --language es --body "Hi {{1}}, order {{2}} is on its way." ' +
62
62
  '--example Ana --example "#1042"');
63
63
  }
64
64
  return;
@@ -100,7 +100,7 @@ async function createTemplate(config, args, json) {
100
100
  console.log(`Submitted ${template.name} (${template.language}) for Meta's review on ` +
101
101
  `${own ? "your own number" : "Vatio's test number"}: ${template.category}, ` +
102
102
  `${count} param${count === 1 ? "" : "s"}, ${paint("cyan", template.status)}.`);
103
- console.log("Meta usually decides within minutes, at most 24 hours. Check with: vatio templates list" +
103
+ console.log("Meta usually decides within minutes, at most 24 hours. Check with: vatio whatsapp templates list" +
104
104
  (own ? "" : " --env preview"));
105
105
  console.log(own
106
106
  ? "Once APPROVED, your backend sends it with a live key outside the 24-hour window with:"
package/lib/help.mjs CHANGED
@@ -115,9 +115,6 @@ the two you are in. Commands default as listed.
115
115
  and what each tool answered, tests that fail or
116
116
  answer differently each time; then every test
117
117
  test rm ID [ID...] Remove a test, or a report (F-) and its test
118
- eval Deprecated: \`vatio test --wait\` under its old name
119
- flags [add|rm] Deprecated: \`vatio test list\`, \`test add\` and
120
- \`test rm\` under their old name
121
118
 
122
119
  Knowledge:
123
120
  kb [list] Bases, and whether a deployed agent reads each
@@ -218,8 +215,6 @@ the two you are in. Commands default as listed.
218
215
  whatsapp failed [--since DATE] [--until DATE] [--error-code CODE]
219
216
  [--error-contains TEXT] [--before ID]
220
217
  Messages Vatio gave up retrying (default: live)
221
- templates ... Older spelling of whatsapp templates; still works
222
- messages failed ... Older spelling of whatsapp failed; still works
223
218
 
224
219
  Channels:
225
220
  instagram The same, for Instagram
package/lib/suggest.mjs CHANGED
@@ -35,16 +35,13 @@ export const COMMANDS = [
35
35
  "docs",
36
36
  "doctor",
37
37
  "env",
38
- "eval",
39
38
  "feedback",
40
- "flags",
41
39
  "init",
42
40
  "instagram",
43
41
  "kb",
44
42
  "keys",
45
43
  "login",
46
44
  "logout",
47
- "messages",
48
45
  "publish",
49
46
  "pull",
50
47
  "push",
@@ -54,7 +51,6 @@ export const COMMANDS = [
54
51
  "share-session",
55
52
  "status",
56
53
  "team",
57
- "templates",
58
54
  "test",
59
55
  "tools",
60
56
  "version",
@@ -74,17 +70,17 @@ export const COMMANDS = [
74
70
  const SUBCOMMAND_OF = {
75
71
  add: ["test"],
76
72
  cat: ["kb"],
77
- create: ["kb", "keys", "templates", "webhooks"],
73
+ create: ["kb", "keys", "webhooks"],
78
74
  delete: ["contacts"],
79
75
  deliveries: ["webhooks"],
80
76
  enable: ["webhooks"],
81
77
  export: ["chat", "contacts"],
82
- failed: ["messages"],
78
+ failed: ["whatsapp"],
83
79
  follow: ["kb"],
84
80
  get: ["config"],
85
81
  history: ["kb"],
86
82
  invite: ["team"],
87
- list: ["env", "kb", "secrets", "keys", "team", "templates", "webhooks", "test"],
83
+ list: ["env", "kb", "secrets", "keys", "team", "webhooks", "test"],
88
84
  off: ["quiet-hours"],
89
85
  origins: ["keys"],
90
86
  refresh: ["kb"],
@@ -94,7 +90,8 @@ const SUBCOMMAND_OF = {
94
90
  "rm-entry": ["kb"],
95
91
  set: ["business", "quiet-hours", "secrets", "config"],
96
92
  show: ["chat", "kb", "business", "quiet-hours", "config"],
97
- "test-phones": ["whatsapp"],
93
+ phones: ["whatsapp"],
94
+ templates: ["whatsapp"],
98
95
  unfollow: ["kb"],
99
96
  unset: ["config"],
100
97
  write: ["kb"]
package/lib/support.mjs CHANGED
@@ -20,16 +20,14 @@ export function fail(message) {
20
20
  // preview or live. The platform validates the name.
21
21
  //
22
22
  // Without it, the default is the command's own and is passed in, because the
23
- // sensible answer differs: push writes preview, keys are for live. `--as`
24
- // was the spelling on push and publish and stays as an alias -- it is sitting
25
- // in CI jobs, and there is nothing wrong with what it does.
23
+ // sensible answer differs: push writes preview, keys are for live.
26
24
  export function takeEnv(args, { fallback = null } = {}) {
27
25
  let environment;
28
26
  const rest = [];
29
27
 
30
28
  for (let i = 0; i < args.length; i += 1) {
31
29
  const arg = args[i];
32
- const match = /^--(env|as)(?:=(.*))?$/.exec(arg);
30
+ const match = /^--(env)(?:=(.*))?$/.exec(arg);
33
31
  if (!match) {
34
32
  rest.push(arg);
35
33
  continue;
package/lib/telemetry.mjs CHANGED
@@ -4,18 +4,22 @@
4
4
  //
5
5
  // Every request says which CLI made it, which coding agent is driving it, the
6
6
  // session it belongs to and the command it is part of. When a command ends,
7
- // one event says how: the exit code and, on failure, what was printed. Never
8
- // sent: arguments, file contents, secrets, or what a chat said.
7
+ // one event says how: the exit code, how long it took, which Vatio skills the
8
+ // project has and, on failure, what was printed. Never sent: arguments, file
9
+ // contents, secrets, or what a chat said.
9
10
  //
10
11
  // VATIO_TELEMETRY=0 (or DO_NOT_TRACK=1) turns all of it off except the
11
12
  // User-Agent, which only says which version is calling.
12
13
 
14
+ import { spawnSync } from "node:child_process";
13
15
  import { randomUUID } from "node:crypto";
14
16
  import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
15
- import { dirname, join } from "node:path";
17
+ import { basename, dirname, join, sep } from "node:path";
16
18
  import { arch, homedir, platform } from "node:os";
19
+ import { fileURLToPath } from "node:url";
17
20
 
18
21
  import { configHome } from "./config.mjs";
22
+ import { findSkills } from "./skills-hint.mjs";
19
23
  import { VERSION } from "./version.mjs";
20
24
 
21
25
  const SESSION_IDLE_MS = 30 * 60 * 1000;
@@ -26,26 +30,23 @@ const MAX_MESSAGE = 2_000;
26
30
  // there is a value (`vatio chat "hola"`), and values are not sent.
27
31
  const SUBCOMMANDS = {
28
32
  chat: ["show"],
29
- messages: ["failed"],
30
33
  env: ["list", "rm"],
31
34
  kb: ["list", "show", "create", "rm", "write", "cat", "rm-entry", "status", "publish", "history"],
32
35
  business: ["show", "set"],
33
36
  "quiet-hours": ["show", "set", "off"],
34
37
  secrets: ["list", "set", "rm"],
35
38
  keys: ["list", "create", "origins", "revoke"],
36
- templates: ["list", "create"],
37
39
  webhooks: ["list", "create", "test", "deliveries", "enable", "rm"],
38
40
  contacts: ["export", "delete"],
39
- whatsapp: ["only", "everyone"],
41
+ whatsapp: ["status", "connect", "live", "check", "disconnect", "invite", "team", "phones", "templates", "failed"],
40
42
  config: ["show", "get", "set", "unset"],
41
43
  "share-session": ["--should-ask", "--never"],
42
- test: ["add", "list", "rm"],
43
- flags: ["add", "rm"]
44
+ test: ["add", "list", "rm"]
44
45
  };
45
46
 
46
47
  export const USER_AGENT = `vatio-cli/${VERSION} (node ${process.version}; ${platform()} ${arch()})`;
47
48
 
48
- const run = { command: null };
49
+ const run = { command: null, startedAt: null };
49
50
 
50
51
  export function telemetryEnabled() {
51
52
  const off = ["0", "false", "off", "no"];
@@ -65,8 +66,51 @@ export function codingAgent() {
65
66
  // of Codex's once reported as "unknown".
66
67
  if (env.CODEX_THREAD_ID || env.CODEX_SESSION_ID || env.CODEX_SANDBOX || env.CODEX_MANAGED_BY_NPM) return "codex";
67
68
  if (env.GEMINI_CLI) return "gemini-cli";
69
+ if (env.REPL_ID) return "replit";
68
70
  if (env.CI) return "ci";
69
- return process.stdout.isTTY ? "human" : "unknown";
71
+ if (process.stdout.isTTY) return "human";
72
+ const parent = launcher();
73
+ return parent ? `unknown:${parent}` : "unknown";
74
+ }
75
+
76
+ // Run from a checkout of the CLI's own source rather than an installed
77
+ // package: the Vatio team working on the CLI, whose runs are not anyone's
78
+ // usage and are left out of what the team reads.
79
+ export function fromCheckout() {
80
+ return !fileURLToPath(import.meta.url).split(sep).includes("node_modules");
81
+ }
82
+
83
+ function reportedAgent() {
84
+ return fromCheckout() ? "vatio-dev" : codingAgent();
85
+ }
86
+
87
+ // What started this CLI, when no coding agent said so: the first ancestor
88
+ // that is not a shell or Node itself, by its process name ("Windsurf",
89
+ // "opencode"). Nothing else about it is read.
90
+ const NOT_LAUNCHERS = new Set(["sh", "bash", "zsh", "fish", "dash", "ksh", "env", "node", "npm", "npx", "pnpm", "yarn", "bun", "sudo", "xargs", "timeout", "login"]);
91
+
92
+ function launcher() {
93
+ if (platform() === "win32") return null;
94
+ return safely(() => {
95
+ let pid = process.ppid;
96
+ for (let depth = 0; depth < 6 && pid > 1; depth++) {
97
+ const out = spawnSync("ps", ["-o", "ppid=,comm=", "-p", String(pid)], { encoding: "utf8", timeout: 500 });
98
+ const match = /^\s*(\d+)\s+(.+?)\s*$/.exec(out.stdout ?? "");
99
+ if (!match) return null;
100
+ const name = basename(match[2]).replace(/^-/, "");
101
+ if (!NOT_LAUNCHERS.has(name)) return name.replace(/[^\w .-]/g, "").slice(0, 40) || null;
102
+ pid = Number(match[1]);
103
+ }
104
+ return null;
105
+ });
106
+ }
107
+
108
+ // Which Vatio skills the project has, as `npx @vatio-ai/skills` or the Claude
109
+ // Code plugin left them: "copy 1.28.0", "plugin 1.28.0", or "none".
110
+ function skillsInstalled() {
111
+ const found = safely(() => findSkills(process.cwd())) ?? [];
112
+ const install = found.find((candidate) => candidate.kind === "plugin") ?? found[0];
113
+ return install ? `${install.kind} ${install.version ?? "unknown"}` : "none";
70
114
  }
71
115
 
72
116
  export function isCodingAgent() {
@@ -75,6 +119,7 @@ export function isCodingAgent() {
75
119
 
76
120
  export function beginRun(command, args) {
77
121
  run.command = commandLabel(command, args);
122
+ run.startedAt = performance.now();
78
123
  noticeOnce();
79
124
  }
80
125
 
@@ -108,7 +153,7 @@ export function clientHeaders() {
108
153
  if (!telemetryEnabled()) return headers;
109
154
 
110
155
  headers["X-Vatio-Session"] = sessionId();
111
- headers["X-Vatio-Agent"] = codingAgent();
156
+ headers["X-Vatio-Agent"] = agentHeader();
112
157
  if (run.command) headers["X-Vatio-Command"] = run.command;
113
158
  return headers;
114
159
  }
@@ -123,6 +168,8 @@ export async function reportRun(config, { exitCode, error = null }) {
123
168
  kind: "run",
124
169
  command: run.command,
125
170
  exit_code: exitCode,
171
+ duration_ms: run.startedAt == null ? undefined : Math.round(performance.now() - run.startedAt),
172
+ skills: skillsInstalled(),
126
173
  error: error ? describeError(error) : undefined
127
174
  }).catch(() => {});
128
175
  }
@@ -136,7 +183,13 @@ export async function sendFeedback(config, message) {
136
183
  // What the developer chose to send -- `vatio feedback`, `vatio share-session` --
137
184
  // says which session and coding agent it came from even with telemetry off.
138
185
  export function chosenHeaders() {
139
- return { ...clientHeaders(), "X-Vatio-Session": sessionId(), "X-Vatio-Agent": codingAgent() };
186
+ return { ...clientHeaders(), "X-Vatio-Session": sessionId(), "X-Vatio-Agent": agentHeader() };
187
+ }
188
+
189
+ // Worked out once per run: finding the launcher asks `ps`.
190
+ function agentHeader() {
191
+ run.agent ??= reportedAgent();
192
+ return run.agent;
140
193
  }
141
194
 
142
195
  async function post(config, body, { strict = false } = {}) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vatio-ai/cli",
3
- "version": "0.121.0",
3
+ "version": "0.123.0",
4
4
  "description": "Vatio CLI — deploy and manage Vatio agent workspaces",
5
5
  "keywords": [
6
6
  "vatio",