@vatio-ai/cli 0.62.0 → 0.62.1

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,16 +1,26 @@
1
1
  // whatsapp / instagram -- both are set up in the console now: connecting your
2
2
  // own number or account needs Meta's consent screen, and test phones and
3
- // accounts are a form with a code. The CLI only says where.
3
+ // accounts are a form with a code. The CLI only says where, and that depends
4
+ // on whether the workspace has published: before, only the Test page is in the
5
+ // console's sidebar; after, the channel's own page under Integrations.
4
6
 
5
7
  import { deployClient } from "./deploy.mjs";
6
8
 
7
- export const whatsapp = (config) => inConsole(config, "WhatsApp");
8
- export const instagram = (config) => inConsole(config, "Instagram");
9
+ export const whatsapp = (config) =>
10
+ inConsole(config, { name: "WhatsApp", key: "whatsapp", own: "number", test: "phone" });
11
+ export const instagram = (config) =>
12
+ inConsole(config, { name: "Instagram", key: "instagram", own: "account", test: "account" });
9
13
 
10
14
  async function inConsole(config, channel) {
11
15
  const status = await deployClient(config, config.resolveWorkspaceRequired()).deployStatus();
12
- const url = status.integrations_url ?? `${config.resolveBaseUrl()}/workspaces`;
13
- console.log(`${channel} is set up in the console: your own account, and the test phones and`);
14
- console.log("accounts that reach a preview or a branch.");
16
+ const url = status[`${channel.key}_url`] ?? status.integrations_url ?? `${config.resolveBaseUrl()}/workspaces`;
17
+ // An older server sends no `published`; a live deployment means the same.
18
+ const published = status.published ?? Boolean(status.live);
19
+
20
+ if (published) {
21
+ console.log(`Connect your own ${channel.own} and manage test ${channel.test}s in the console:`);
22
+ } else {
23
+ console.log(`Test ${channel.name} on the console's Test page: verify your ${channel.test} there and talk to your agent.`);
24
+ }
15
25
  console.log(` ${url}`);
16
26
  }
package/lib/help.mjs CHANGED
@@ -107,8 +107,9 @@ and the one its pull request deploys to. Elsewhere commands default as listed.
107
107
  Where Vatio tells your backend what happened
108
108
 
109
109
  Channels:
110
- whatsapp Set up in the console; prints the link
111
- instagram Set up in the console; prints the link
110
+ whatsapp Set up in the console; prints the link (Test page
111
+ until you publish, then Integrations)
112
+ instagram The same, for Instagram
112
113
 
113
114
  Everything else:
114
115
  config show|get KEY|set KEY VALUE|unset KEY
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vatio-ai/cli",
3
- "version": "0.62.0",
3
+ "version": "0.62.1",
4
4
  "description": "Vatio CLI — deploy and manage Vatio agent workspaces",
5
5
  "keywords": [
6
6
  "vatio",