@vatio-ai/cli 0.64.0 → 0.66.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/README.md CHANGED
@@ -23,7 +23,7 @@ vatio docs --save # the whole developer contract as markdown, live from Vatio
23
23
  ```
24
24
 
25
25
  `vatio docs` prints the same contract that
26
- [docs.vatio.ai/docs.md](https://docs.vatio.ai/docs.md) serves, and
26
+ [vatio.ai/docs/docs.md](https://vatio.ai/docs/docs.md) serves, and
27
27
  `vatio docs --save` writes it next to the workspace.
28
28
 
29
29
  Don't guess `vatio.yml` keys. Unknown root keys fail validation, and the rules
@@ -82,7 +82,7 @@ config show|set|unset base_url and token, per developer
82
82
  `pr-42`.
83
83
 
84
84
  Run `npx @vatio-ai/cli help` for the whole surface, and see
85
- [docs.vatio.ai](https://docs.vatio.ai) for the platform.
85
+ [vatio.ai/docs](https://vatio.ai/docs) for the platform.
86
86
 
87
87
  ## Where your credentials live
88
88
 
@@ -102,4 +102,4 @@ upgraded to understand a new one.
102
102
  Bugs and questions go to [issues](https://github.com/vatio-ai/cli/issues). This repository is a read-only mirror of
103
103
  the CLI as it ships inside Vatio, so a pull request cannot be merged here: open
104
104
  an issue describing the change instead. Release notes live in the
105
- [changelog](https://docs.vatio.ai/changelog).
105
+ [changelog](https://vatio.ai/docs/changelog).
@@ -91,14 +91,17 @@ export class ApiClient extends HttpClient {
91
91
  return this.get("/secrets", { environment });
92
92
  }
93
93
 
94
- upsertSecret({ key, value, environment = null }) {
94
+ // `tests`: the value every environment but live, and every eval replay,
95
+ // uses instead.
96
+ upsertSecret({ key, value, environment = null, tests = false }) {
95
97
  const body = { value };
96
98
  if (environment) body.environment = environment;
99
+ if (tests) body.tests = true;
97
100
  return this.put(`/secrets/${encode(key)}`, body);
98
101
  }
99
102
 
100
- deleteSecret({ key, environment = null }) {
101
- return this.delete(`/secrets/${encode(key)}${query({ environment })}`);
103
+ deleteSecret({ key, environment = null, tests = false }) {
104
+ return this.delete(`/secrets/${encode(key)}${query({ environment, tests: tests ? 1 : null })}`);
102
105
  }
103
106
 
104
107
  // --- knowledge bases ------------------------------------------------
@@ -87,8 +87,8 @@ export async function auth(config, args) {
87
87
  console.log(" }");
88
88
  console.log("");
89
89
  console.log("Put it on the widget as data-visitor-token, and push.");
90
- console.log("Full examples: https://docs.vatio.ai/authentication/");
91
- console.log("Inbox metadata: https://docs.vatio.ai/authentication/#enrich-the-inbox");
90
+ console.log("Full examples: https://vatio.ai/docs/authentication/");
91
+ console.log("Inbox metadata: https://vatio.ai/docs/authentication/#enrich-the-inbox");
92
92
  }
93
93
 
94
94
  function ignorePrivateKey(root) {
@@ -9,7 +9,7 @@ import { VERSION } from "../version.mjs";
9
9
  import { fail, takeValue } from "../support.mjs";
10
10
  import { workspacesClient } from "./deploy.mjs";
11
11
 
12
- export const DOCS_URL = "https://docs.vatio.ai";
12
+ export const DOCS_URL = "https://vatio.ai/docs";
13
13
 
14
14
  export function version() {
15
15
  console.log(`Vatio CLI ${VERSION} (node)`);
@@ -94,7 +94,7 @@ export async function supabaseAuth(config, args) {
94
94
  console.log(" data: { orders: \"$\" }");
95
95
  console.log(" message: { when_empty: No orders yet., default: \"Found {{count}} orders.\" }");
96
96
  console.log("");
97
- console.log("Docs: https://docs.vatio.ai/authentication/supabase");
97
+ console.log("Docs: https://vatio.ai/docs/authentication/supabase");
98
98
  }
99
99
 
100
100
  async function connectedProject(config, workspace) {
@@ -4,7 +4,7 @@
4
4
  // them is in vatio.yml.
5
5
 
6
6
  import { deployClient } from "./deploy.mjs";
7
- import { askSecret, branchDefault, fail, paint, takeValue } from "../support.mjs";
7
+ import { askSecret, branchDefault, fail, paint, takeFlag, takeValue } from "../support.mjs";
8
8
 
9
9
  // live, preview, or a branch's own like fix-pagos.
10
10
  const ENVIRONMENT_NAME = /^[a-z0-9]+(?:[-_][a-z0-9]+)*$/;
@@ -23,12 +23,22 @@ function environmentOption(args, fallback, cwd) {
23
23
 
24
24
  // Without an environment a secret is the value everywhere. On a branch, or
25
25
  // with --env, it is the value only that environment uses -- a preview pointing
26
- // its tools at staging while live keeps production.
26
+ // its tools at staging while live keeps production. With --tests, the value
27
+ // every environment but live and every eval replay uses, branches included,
28
+ // so it never takes the branch's environment.
27
29
  export async function secrets(config, args) {
28
30
  const workspace = config.resolveWorkspaceRequired();
29
31
  const client = deployClient(config, workspace);
30
- const environment = environmentOption(args, null, config.workspaceRoot);
31
- const where = environment ? `${environment} on workspace ${workspace}` : `workspace ${workspace}`;
32
+ const tests = takeFlag(args, "--tests");
33
+ if (tests && (takeValue(args, "--env") ?? takeValue(args, "--environment") ?? takeValue(args, "-e"))) {
34
+ fail("--tests is the value for every environment but live; drop --env");
35
+ }
36
+ const environment = tests ? null : environmentOption(args, null, config.workspaceRoot);
37
+ const where = tests
38
+ ? `workspace ${workspace}, for tests`
39
+ : environment
40
+ ? `${environment} on workspace ${workspace}`
41
+ : `workspace ${workspace}`;
32
42
  const sub = args.shift() ?? "list";
33
43
 
34
44
  if (sub === "list") {
@@ -44,31 +54,31 @@ export async function secrets(config, args) {
44
54
  // into a terminal scrollback.
45
55
  console.log(`Secrets on ${where} (${keys.length}):`);
46
56
  for (const secret of keys) {
47
- const scope = secret.environment ? ` (only ${secret.environment})` : "";
57
+ const scope = secret.tests ? " (tests)" : secret.environment ? ` (only ${secret.environment})` : "";
48
58
  console.log(` ${secret.key ?? secret}${scope}`);
49
59
  }
50
60
  return;
51
61
  }
52
62
  if (sub === "set") {
53
63
  const key = args.shift();
54
- if (!key) fail("Usage: vatio secrets set KEY [VALUE] [--env NAME]");
64
+ if (!key) fail("Usage: vatio secrets set KEY [VALUE] [--env NAME | --tests]");
55
65
  // Asked for rather than typed on the command line, where it would stay in
56
66
  // shell history.
57
67
  const value = args.shift() ?? (await askSecret(`${paint("green", "?")} Paste your secret: `));
58
68
  if (value === "") fail(`No value given for ${key}`);
59
- await client.upsertSecret({ key, value, environment });
69
+ await client.upsertSecret({ key, value, environment, tests });
60
70
  console.log(`${paint("green", "✓")} Set secret ${key} on ${where}`);
61
71
  return;
62
72
  }
63
73
  if (sub === "rm" || sub === "remove" || sub === "delete") {
64
74
  const key = args.shift();
65
- if (!key) fail("Usage: vatio secrets rm KEY [--env NAME]");
66
- await client.deleteSecret({ key, environment });
75
+ if (!key) fail("Usage: vatio secrets rm KEY [--env NAME | --tests]");
76
+ await client.deleteSecret({ key, environment, tests });
67
77
  console.log(`Removed ${key} from ${where}`);
68
78
  return;
69
79
  }
70
80
 
71
- fail("Usage: vatio secrets list|set KEY [VALUE]|rm KEY [--env NAME]");
81
+ fail("Usage: vatio secrets list|set KEY [VALUE]|rm KEY [--env NAME | --tests]");
72
82
  }
73
83
 
74
84
  // Repeatable: `--origin https://a.com --origin https://b.com`.
package/lib/config.mjs CHANGED
@@ -204,7 +204,7 @@ export class Config {
204
204
  const normalized = String(key ?? "").trim();
205
205
  if (normalized === "assistants") {
206
206
  throw new ConfigError(
207
- 'config key "assistants" was removed — Vatio no longer installs local skills; see https://docs.vatio.ai'
207
+ 'config key "assistants" was removed — Vatio no longer installs local skills; see https://vatio.ai/docs'
208
208
  );
209
209
  }
210
210
  if (normalized === "workspace") {
package/lib/help.mjs CHANGED
@@ -91,10 +91,12 @@ and the one its pull request deploys to. Elsewhere commands default as listed.
91
91
  business hours --clear No hours: someone is always available
92
92
 
93
93
  Credentials:
94
- secrets list|set KEY [VALUE]|rm KEY [--env NAME]
94
+ secrets list|set KEY [VALUE]|rm KEY [--env NAME | --tests]
95
95
  Without VALUE, set asks for it with the input hidden.
96
96
  On a branch or with --env, the value only that
97
- environment uses; otherwise the value everywhere
97
+ environment uses; otherwise the value everywhere.
98
+ With --tests, the value every environment but live
99
+ and every eval uses, like a staging URL
98
100
  tokens list|create [--env NAME] [--label NAME] [--origin URL]...|revoke PREFIX
99
101
  tokens origins PREFIX URL...
100
102
  The origins a token is accepted from (replaces the list)
@@ -127,8 +129,8 @@ and the one its pull request deploys to. Elsewhere commands default as listed.
127
129
  Keys: base_url, token
128
130
 
129
131
  Environment: VATIO_BASE_URL, VATIO_TOKEN, VATIO_HOME, VATIO_NO_UPDATE_NOTIFIER,
130
- VATIO_TELEMETRY=0 (see docs.vatio.ai/cli/workspace#telemetry)
132
+ VATIO_TELEMETRY=0 (see vatio.ai/docs/cli/workspace#telemetry)
131
133
 
132
- Docs: https://docs.vatio.ai
134
+ Docs: https://vatio.ai/docs
133
135
  `;
134
136
  }
package/lib/telemetry.mjs CHANGED
@@ -80,7 +80,7 @@ function noticeOnce() {
80
80
  process.stderr.write(
81
81
  "vatio: the CLI tells Vatio how each command ended (never arguments, files or secrets),\n" +
82
82
  "so we can see where coding agents get stuck. Turn it off with VATIO_TELEMETRY=0.\n" +
83
- "Details: https://docs.vatio.ai/cli/workspace#telemetry\n\n"
83
+ "Details: https://vatio.ai/docs/cli/workspace#telemetry\n\n"
84
84
  );
85
85
  safely(() => {
86
86
  mkdirSync(dirname(path), { recursive: true });
@@ -44,7 +44,7 @@ export async function printUpdateNotice(check) {
44
44
  process.stderr.write(
45
45
  `\n${paint("yellow", `A new release of vatio is available: ${VERSION} → ${latest}`)}\n` +
46
46
  `To upgrade, run: ${upgrade}\n` +
47
- `${paint("cyan", "https://docs.vatio.ai/changelog")}\n`
47
+ `${paint("cyan", "https://vatio.ai/docs/changelog")}\n`
48
48
  );
49
49
  }
50
50
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vatio-ai/cli",
3
- "version": "0.64.0",
3
+ "version": "0.66.0",
4
4
  "description": "Vatio CLI — deploy and manage Vatio agent workspaces",
5
5
  "keywords": [
6
6
  "vatio",