@vatio-ai/cli 0.63.0 → 0.65.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 +3 -3
- package/bin/vatio.mjs +3 -0
- package/lib/api-client.mjs +13 -0
- package/lib/commands/identity-key.mjs +2 -2
- package/lib/commands/misc.mjs +1 -1
- package/lib/commands/propose.mjs +51 -0
- package/lib/commands/supabase-auth.mjs +1 -1
- package/lib/config.mjs +1 -1
- package/lib/help.mjs +8 -2
- package/lib/telemetry.mjs +1 -1
- package/lib/update-notice.mjs +1 -1
- package/package.json +1 -1
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
|
-
[
|
|
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
|
-
[
|
|
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://
|
|
105
|
+
[changelog](https://vatio.ai/docs/changelog).
|
package/bin/vatio.mjs
CHANGED
|
@@ -21,6 +21,7 @@ import { business } from "../lib/commands/business.mjs";
|
|
|
21
21
|
import { instagram, whatsapp } from "../lib/commands/channels.mjs";
|
|
22
22
|
import { docs, feedback } from "../lib/commands/support-commands.mjs";
|
|
23
23
|
import { evalCommand, flags } from "../lib/commands/improve.mjs";
|
|
24
|
+
import { propose } from "../lib/commands/propose.mjs";
|
|
24
25
|
import { printUpdateNotice, startUpdateCheck } from "../lib/update-notice.mjs";
|
|
25
26
|
import { beginRun, isCodingAgent, reportRun, telemetryEnabled } from "../lib/telemetry.mjs";
|
|
26
27
|
|
|
@@ -108,6 +109,8 @@ async function run(command, args) {
|
|
|
108
109
|
return await flags(config, args);
|
|
109
110
|
case "eval":
|
|
110
111
|
return await evalCommand(config, args);
|
|
112
|
+
case "propose":
|
|
113
|
+
return await propose(config, args);
|
|
111
114
|
case "docs":
|
|
112
115
|
return await docs(config, args);
|
|
113
116
|
case "feedback":
|
package/lib/api-client.mjs
CHANGED
|
@@ -65,6 +65,19 @@ export class ApiClient extends HttpClient {
|
|
|
65
65
|
return this.delete(`/env/${encode(name)}`);
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
+
// --- proposals ------------------------------------------------------
|
|
69
|
+
|
|
70
|
+
proposals() {
|
|
71
|
+
return this.get("/proposals");
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
propose({ environment, title, summary }) {
|
|
75
|
+
const body = { environment };
|
|
76
|
+
if (title) body.title = title;
|
|
77
|
+
if (summary != null) body.summary = summary;
|
|
78
|
+
return this.post("/proposals", body);
|
|
79
|
+
}
|
|
80
|
+
|
|
68
81
|
// The project "Connect Supabase" picked in the console, if any.
|
|
69
82
|
supabase() {
|
|
70
83
|
return this.get("/supabase");
|
|
@@ -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://
|
|
91
|
-
console.log("Inbox metadata: https://
|
|
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) {
|
package/lib/commands/misc.mjs
CHANGED
|
@@ -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://
|
|
12
|
+
export const DOCS_URL = "https://vatio.ai/docs";
|
|
13
13
|
|
|
14
14
|
export function version() {
|
|
15
15
|
console.log(`Vatio CLI ${VERSION} (node)`);
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { deployClient } from "./deploy.mjs";
|
|
3
|
+
import { fail, takeEnv, takeFlag, takeValue } from "../support.mjs";
|
|
4
|
+
|
|
5
|
+
// `vatio propose`: put a branch's environment in front of the workspace's
|
|
6
|
+
// owner as a change to accept from the inbox, for a workspace with no
|
|
7
|
+
// repository connected -- there, the pull request is the proposal. Vatio
|
|
8
|
+
// replays every eval case on it and mails the owner once they finish; the
|
|
9
|
+
// owner accepts (which publishes it) or discards it. Proposing the same
|
|
10
|
+
// environment again, after another push, updates it and replays the evals.
|
|
11
|
+
export async function propose(config, args) {
|
|
12
|
+
const workspace = config.resolveWorkspaceRequired();
|
|
13
|
+
const client = deployClient(config, workspace);
|
|
14
|
+
if (takeFlag(args, "--list")) return await list(client, workspace);
|
|
15
|
+
|
|
16
|
+
const title = takeValue(args, "--title");
|
|
17
|
+
const summaryFile = takeValue(args, "--summary-file");
|
|
18
|
+
let summary = takeValue(args, "--summary");
|
|
19
|
+
if (summaryFile) {
|
|
20
|
+
try {
|
|
21
|
+
summary = readFileSync(summaryFile, "utf8");
|
|
22
|
+
} catch (error) {
|
|
23
|
+
fail(`Could not read ${summaryFile}: ${error.message}`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
const environment = takeEnv(args, { fallback: null, cwd: config.workspaceRoot });
|
|
27
|
+
if (!environment) {
|
|
28
|
+
fail('usage: vatio propose --env NAME --title "What it fixes" [--summary TEXT | --summary-file PATH]');
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const payload = await client.propose({ environment, title, summary });
|
|
32
|
+
console.log(`${payload.created ? "Proposed" : "Updated"} ${payload.environment} as ${payload.id}: ${payload.title}`);
|
|
33
|
+
const runs = Array.isArray(payload.runs) ? payload.runs : [];
|
|
34
|
+
const cases = runs.reduce((sum, run) => sum + (run.cases ?? 0), 0);
|
|
35
|
+
if (cases > 0) {
|
|
36
|
+
console.log(`Replaying ${cases} eval case${cases === 1 ? "" : "s"} there; the owner gets a mail when they finish.`);
|
|
37
|
+
} else {
|
|
38
|
+
console.log("No eval cases to replay: the owner decides on the change alone.");
|
|
39
|
+
}
|
|
40
|
+
console.log(`Accept or discard it in the inbox: ${payload.url}`);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
async function list(client, workspace) {
|
|
44
|
+
const payload = await client.proposals();
|
|
45
|
+
const rows = Array.isArray(payload.data) ? payload.data : [];
|
|
46
|
+
console.log(`Proposals on workspace ${workspace} (${rows.length}):`);
|
|
47
|
+
for (const row of rows) {
|
|
48
|
+
console.log(` ${row.id} ${row.status.padEnd(9)} ${row.environment} ${row.title}`);
|
|
49
|
+
console.log(` ${row.url}`);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -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://
|
|
97
|
+
console.log("Docs: https://vatio.ai/docs/authentication/supabase");
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
async function connectedProject(config, workspace) {
|
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://
|
|
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
|
@@ -60,6 +60,12 @@ and the one its pull request deploys to. Elsewhere commands default as listed.
|
|
|
60
60
|
judge it; exits 1 if one fails. Default: the
|
|
61
61
|
branch's environment, else preview
|
|
62
62
|
eval --show RUN_ID One run's report
|
|
63
|
+
propose [--env NAME] --title TEXT [--summary TEXT|--summary-file PATH]
|
|
64
|
+
Without a GitHub repo: put the branch's
|
|
65
|
+
environment in front of the owner, who accepts
|
|
66
|
+
(publishes) or discards it in the inbox. Replays
|
|
67
|
+
every eval case there first
|
|
68
|
+
propose --list Every proposal and where it stands
|
|
63
69
|
|
|
64
70
|
Knowledge:
|
|
65
71
|
kb [list] Bases, and whether a deployed agent reads each
|
|
@@ -121,8 +127,8 @@ and the one its pull request deploys to. Elsewhere commands default as listed.
|
|
|
121
127
|
Keys: base_url, token
|
|
122
128
|
|
|
123
129
|
Environment: VATIO_BASE_URL, VATIO_TOKEN, VATIO_HOME, VATIO_NO_UPDATE_NOTIFIER,
|
|
124
|
-
VATIO_TELEMETRY=0 (see
|
|
130
|
+
VATIO_TELEMETRY=0 (see vatio.ai/docs/cli/workspace#telemetry)
|
|
125
131
|
|
|
126
|
-
Docs: https://
|
|
132
|
+
Docs: https://vatio.ai/docs
|
|
127
133
|
`;
|
|
128
134
|
}
|
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://
|
|
83
|
+
"Details: https://vatio.ai/docs/cli/workspace#telemetry\n\n"
|
|
84
84
|
);
|
|
85
85
|
safely(() => {
|
|
86
86
|
mkdirSync(dirname(path), { recursive: true });
|
package/lib/update-notice.mjs
CHANGED
|
@@ -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://
|
|
47
|
+
`${paint("cyan", "https://vatio.ai/docs/changelog")}\n`
|
|
48
48
|
);
|
|
49
49
|
}
|
|
50
50
|
|