@vatio-ai/cli 0.92.1 → 0.93.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.
@@ -189,8 +189,8 @@ export class ApiClient extends HttpClient {
189
189
 
190
190
  // --- business -------------------------------------------------------
191
191
 
192
- // Name, description and brand: one row for every environment, the same
193
- // one the inbox's Business page edits.
192
+ // Name and brand: one row for every environment, the same one the inbox
193
+ // edits under Channels → Web widget.
194
194
  business() {
195
195
  return this.get("/business");
196
196
  }
@@ -1,8 +1,10 @@
1
- // business — the business the agent works for: name, description and brand
2
- // (logo, color, about). Not part of vatio.yml: it belongs to
3
- // whoever runs the business and is usually edited on the inbox's Business
4
- // page. This is the same row, for a developer setting a workspace up from a
5
- // terminal. One value for every environment, live on save.
1
+ // business — the business the agent works for: its name and brand (logo,
2
+ // color, about), the same row the inbox edits under Channels → Web widget.
3
+ // Not part of vatio.yml: one value for every environment, live on save.
4
+ //
5
+ // It also held a description of the business, which moved into the agent's
6
+ // instructions: one written before is shown here, and --clear-description
7
+ // removes it once the instructions say it.
6
8
 
7
9
  import { readFileSync, statSync } from "node:fs";
8
10
  import { basename, extname } from "node:path";
@@ -16,9 +18,12 @@ const LOGO_MAX_BYTES = 2 * 1024 * 1024;
16
18
 
17
19
  const USAGE =
18
20
  "Usage: vatio business [show]\n" +
19
- " vatio business set [--name NAME] [--description TEXT | --description-file FILE]\n" +
20
- " [--about TEXT] [--color #RRGGBB | --color default]\n" +
21
- " [--logo FILE | --remove-logo]";
21
+ " vatio business set [--name NAME] [--about TEXT] [--color #RRGGBB | --color default]\n" +
22
+ " [--logo FILE | --remove-logo] [--clear-description]";
23
+
24
+ const DESCRIPTION_MOVED =
25
+ "The business description moved into the agent's instructions: write what the business does in " +
26
+ "`agent.instructions` in vatio.yml, where it is tested and published like the rest.";
22
27
 
23
28
  export async function business(config, args) {
24
29
  const workspace = config.resolveWorkspaceRequired();
@@ -31,13 +36,10 @@ export async function business(config, args) {
31
36
  }
32
37
  if (sub === "set") {
33
38
  const fields = {};
39
+ if (args.includes("--description") || args.includes("--description-file")) fail(DESCRIPTION_MOVED);
34
40
  const name = takeValue(args, "--name");
35
- const description = takeValue(args, "--description");
36
- const file = takeValue(args, "--description-file");
37
- if (description !== null && file !== null) fail("Give --description or --description-file, not both");
38
41
  if (name !== null) fields.name = name;
39
- if (description !== null) fields.summary = description;
40
- if (file !== null) fields.summary = readFileSync(file === "-" ? 0 : file, "utf8");
42
+ if (takeFlag(args, "--clear-description")) fields.summary = "";
41
43
 
42
44
  const about = takeValue(args, "--about");
43
45
  if (about !== null) fields.about = about;
@@ -90,8 +92,14 @@ function rejectLeftovers(args) {
90
92
  function print(payload, workspace) {
91
93
  console.log(`${payload.name} (workspace ${workspace})`);
92
94
  console.log("");
93
- console.log(payload.summary ? indent(payload.summary) : " No description yet. Set one: vatio business set --description \"…\"");
94
- console.log("");
95
+ if (payload.summary) {
96
+ console.log("Business description (Vatio still adds it to every prompt):");
97
+ console.log(indent(payload.summary));
98
+ console.log(
99
+ ` ${DESCRIPTION_MOVED} Once live runs that version, \`vatio business set --clear-description\` removes this one.`
100
+ );
101
+ console.log("");
102
+ }
95
103
 
96
104
  console.log("Brand:");
97
105
  console.log(` logo ${payload.logo_url ?? "none (vatio business set --logo FILE)"}`);
@@ -108,8 +108,8 @@ export async function push(config, args) {
108
108
 
109
109
  // The remote has to exist before the workspace can be checked: the slug is in
110
110
  // the URL of the call that checks it. It is created unnamed; the display name
111
- // is the business name (`vatio business set --name`, or the inbox's Business
112
- // page), not part of a push.
111
+ // is the business name (`vatio business set --name`, or the inbox's Channels
112
+ // → Web widget), not part of a push.
113
113
  const clients = workspacesClient(config);
114
114
  const created = !(await clients.workspaceExists(workspace));
115
115
  if (created) {
@@ -93,8 +93,10 @@ function replyTarget(config, args, usage) {
93
93
  }
94
94
 
95
95
  // What the inbox's Reportar does, from the terminal: a reply that was wrong,
96
- // and what it should have done. The note makes it a test case. A reply that
97
- // is already right is not a report: `vatio test add` keeps it.
96
+ // and what it should have done. On live the note makes it a report and a
97
+ // test case; on preview it is a note for the coding agent, closed by the
98
+ // next push. A reply that is already right is not a flag: `vatio test add`
99
+ // keeps it.
98
100
  async function addFlag(config, args) {
99
101
  if (args.includes("--passes")) {
100
102
  fail('A reply that is already right is a test, not a report: `vatio test add "WHAT IT SHOULD DO"` keeps it.');
@@ -112,9 +114,17 @@ async function addFlag(config, args) {
112
114
  }
113
115
 
114
116
  const reply = String(flag.reply ?? "").trim().replace(/\s+/g, " ");
115
- console.log(`${flag.rewritten ? "Rewrote" : "Reported"} ${flag.public_id}, chat ${flag.chat_id} on ${flag.environment}:`);
117
+ const note = flag.environment === "preview";
118
+ console.log(
119
+ `${flag.rewritten ? "Rewrote" : note ? "Noted" : "Reported"} ${flag.public_id}, chat ${flag.chat_id} on ${flag.environment}:`
120
+ );
116
121
  console.log(` [agent #${flag.message_id}] ${reply.length > 200 ? `${reply.slice(0, 200)}…` : reply}`);
117
- if (flag.test_case) {
122
+ if (note) {
123
+ console.log(
124
+ "A note on preview, not a test case: `vatio flags` lists it for your coding agent until your next `vatio push` closes it. " +
125
+ 'Once the agent gets it right, `vatio test add "WHAT IT SHOULD DO"` keeps that reply as a test.'
126
+ );
127
+ } else if (flag.test_case) {
118
128
  console.log("It is a test case now: `vatio test` replays it, `vatio flags` lists it, `vatio flags rm` removes it.");
119
129
  } else {
120
130
  console.log("No visitor message comes before that reply, so there is nothing to replay: it is not a test case.");
@@ -175,9 +185,10 @@ export async function test(config, args) {
175
185
 
176
186
  const TEST_ADD_USAGE = 'vatio test add "WHAT IT SHOULD DO" [--chat ID | --message ID] [--env NAME]';
177
187
 
178
- // A reply that is right, kept as a test so it stays right: a photo of its
179
- // turn, like a report's case, with no report for Vatio to triage or fix. A
180
- // set of `vatio chat --new` + `vatio test add` is a test suite.
188
+ // A reply kept as a test of what it should do, right already or not yet: a
189
+ // photo of its turn, like a report's case, with no report for Vatio to
190
+ // triage or fix. A set of `vatio chat --new` + `vatio test add` is a test
191
+ // suite, and on preview the only way to make one: a flag there is a note.
181
192
  async function addTest(config, args) {
182
193
  const body = replyTarget(config, args, TEST_ADD_USAGE);
183
194
  const { url, token } = workspaceBase(config);
@@ -153,7 +153,7 @@ export async function init(config, args) {
153
153
  if (agentsNote) console.log(agentsNote);
154
154
  if (!authorized) console.log(`Local only for now — \`vatio push\` is what creates ${slug} on the platform.`);
155
155
  if (!authorized && String(name ?? "").trim() !== "") {
156
- console.log("Set the display name once it exists: `vatio business set --name NAME`, or the inbox's Business page.");
156
+ console.log("Set the display name once it exists: `vatio business set --name NAME`, or in the inbox under Channels → Web widget.");
157
157
  }
158
158
  console.log("");
159
159
  console.log("Next:");
@@ -200,7 +200,7 @@ function writeAgentsNote(target) {
200
200
  // The smallest file that deploys: which workspace, and what the agent does.
201
201
  // The slug is already validated as a slug, so it needs no quoting. The display
202
202
  // name is not here: it is the business name, set with `vatio business set --name`
203
- // or on the inbox's Business page.
203
+ // or in the inbox under Channels → Web widget.
204
204
  function starterManifest(slug) {
205
205
  const lines = ["# Which Vatio workspace this directory deploys to.", `workspace: ${slug}`, ""];
206
206
  lines.push("agent:");
package/lib/help.mjs CHANGED
@@ -79,9 +79,11 @@ Commands default as listed.
79
79
  Every open report: the conversation, what each tool
80
80
  answered, and what should have happened
81
81
  flags add "NOTE" [--chat ID|--message ID] [--env NAME]
82
- Report a reply and what should have happened:
82
+ Flag a reply and what should have happened:
83
83
  the agent's last one in the chat \`vatio chat\`
84
- is in (default: preview). It is a test case now
84
+ is in (default: preview). On live it is a report
85
+ and a test case; on preview, a note for your
86
+ coding agent that the next push closes
85
87
  flags rm ID [ID...] Remove a report and its test case, open or
86
88
  resolved, as the inbox's Remove does
87
89
  tools [--env NAME] [--period 1h|1d|7d|30d] [--json]
@@ -98,8 +100,8 @@ Commands default as listed.
98
100
  test --show RUN_ID One run's report so far, with the replay chat of
99
101
  each case that did not pass (vatio chat show ID)
100
102
  test add "NOTE" [--chat ID|--message ID] [--env NAME]
101
- Keep a reply that is right as a test: the agent's
102
- last one in the chat \`vatio chat\` is in
103
+ Keep a reply as a test of what it should do: the
104
+ agent's last one in the chat \`vatio chat\` is in
103
105
  test list [--json] | test rm ID [ID...]
104
106
  The tests \`test add\` made; reports are \`flags\`
105
107
  eval Deprecated: \`vatio test --wait\` under its old name
@@ -118,11 +120,13 @@ Commands default as listed.
118
120
  kb history BASE What reached live, newest first
119
121
  (entry commands take --env; --env live writes live)
120
122
 
121
- Business (one value for every environment, live on save; also on the inbox's
122
- Business page):
123
- business [show] Name, description, brand
124
- business set [--name NAME] [--description TEXT | --description-file FILE]
125
- [--about TEXT] [--color #RRGGBB|default] [--logo FILE | --remove-logo]
123
+ Business (one value for every environment, live on save; also in the inbox,
124
+ under Channels → Web widget):
125
+ business [show] Name and brand, and the old business description
126
+ if there is one
127
+ business set [--name NAME] [--about TEXT] [--color #RRGGBB|default]
128
+ [--logo FILE | --remove-logo] [--clear-description]
129
+ What the business does goes in agent.instructions
126
130
 
127
131
  Credentials:
128
132
  secrets list|set KEY [VALUE]|rm KEY [--env NAME | --tests]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vatio-ai/cli",
3
- "version": "0.92.1",
3
+ "version": "0.93.0",
4
4
  "description": "Vatio CLI — deploy and manage Vatio agent workspaces",
5
5
  "keywords": [
6
6
  "vatio",