@vatio-ai/cli 0.44.0 → 0.46.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 +1 -1
- package/lib/commands/identity-key.mjs +1 -1
- package/lib/commands/misc.mjs +1 -1
- package/lib/commands/support-commands.mjs +34 -1
- package/lib/config.mjs +1 -1
- package/lib/help.mjs +2 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -45,7 +45,7 @@ doctor Node, config, workspace and token status
|
|
|
45
45
|
`pr-42`.
|
|
46
46
|
|
|
47
47
|
Run `npx @vatio-ai/cli help` for the whole surface, and see
|
|
48
|
-
[vatio.ai
|
|
48
|
+
[docs.vatio.ai](https://docs.vatio.ai) for the platform.
|
|
49
49
|
|
|
50
50
|
## Where your credentials live
|
|
51
51
|
|
|
@@ -81,7 +81,7 @@ export async function auth(config, args) {
|
|
|
81
81
|
console.log(" }");
|
|
82
82
|
console.log("");
|
|
83
83
|
console.log("Put it on the widget as data-visitor-token, and push.");
|
|
84
|
-
console.log("Full examples: https://vatio.ai/
|
|
84
|
+
console.log("Full examples: https://docs.vatio.ai/authentication/");
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
function ignorePrivateKey(root) {
|
package/lib/commands/misc.mjs
CHANGED
|
@@ -11,7 +11,7 @@ import { fail, takeValue } from "../support.mjs";
|
|
|
11
11
|
import { deviceLogin } from "./auth.mjs";
|
|
12
12
|
import { workspacesClient } from "./deploy.mjs";
|
|
13
13
|
|
|
14
|
-
export const DOCS_URL = "https://vatio.ai
|
|
14
|
+
export const DOCS_URL = "https://docs.vatio.ai";
|
|
15
15
|
|
|
16
16
|
export function version() {
|
|
17
17
|
console.log(`Vatio CLI ${VERSION} (node)`);
|
|
@@ -4,9 +4,11 @@
|
|
|
4
4
|
import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
5
5
|
import { dirname, resolve } from "node:path";
|
|
6
6
|
|
|
7
|
+
import { buildBundle } from "../bundle.mjs";
|
|
7
8
|
import { HttpClient } from "../http.mjs";
|
|
8
9
|
import { VERSION } from "../version.mjs";
|
|
9
10
|
import { fail, takeFlag, takeValue } from "../support.mjs";
|
|
11
|
+
import { findWorkspaceRoot } from "../workspace.mjs";
|
|
10
12
|
import { DOCS_URL } from "./misc.mjs";
|
|
11
13
|
|
|
12
14
|
// The whole developer contract as markdown, live from the platform. Fetched
|
|
@@ -50,6 +52,9 @@ function issuesClient(config) {
|
|
|
50
52
|
// `vatio issue` is a change worth making, written against a template the
|
|
51
53
|
// platform also validates against. It is not an issue tracker: there are no
|
|
52
54
|
// states, labels, assignees or backlog, and that is on purpose.
|
|
55
|
+
//
|
|
56
|
+
// Sent from a workspace, it carries the workspace -- see workspaceSource
|
|
57
|
+
// below, and `--no-source` to send the sentence alone.
|
|
53
58
|
export async function issue(config, args) {
|
|
54
59
|
const sub = args[0];
|
|
55
60
|
if (sub === "list") return await issueList(config);
|
|
@@ -58,6 +63,7 @@ export async function issue(config, args) {
|
|
|
58
63
|
|
|
59
64
|
if (takeFlag(args, "--template")) return await issueTemplate(config);
|
|
60
65
|
|
|
66
|
+
const withoutSource = takeFlag(args, "--no-source");
|
|
61
67
|
const file = takeValue(args, "--file");
|
|
62
68
|
const workspace = takeValue(args, "--workspace") ?? safeWorkspace(config);
|
|
63
69
|
|
|
@@ -67,6 +73,14 @@ export async function issue(config, args) {
|
|
|
67
73
|
|
|
68
74
|
const body = { cli_version: VERSION };
|
|
69
75
|
if (workspace) body.workspace = workspace;
|
|
76
|
+
|
|
77
|
+
const source = withoutSource ? null : workspaceSource();
|
|
78
|
+
if (source?.files) {
|
|
79
|
+
body.files = source.files;
|
|
80
|
+
console.log(`Attaching ${source.root} — ${source.files.length} files, the same ones \`vatio push\` sends.`);
|
|
81
|
+
} else if (source?.error) {
|
|
82
|
+
console.log(`Not attaching your workspace: ${source.error}`);
|
|
83
|
+
}
|
|
70
84
|
if (file) {
|
|
71
85
|
body.markdown = readFileSync(file, "utf8");
|
|
72
86
|
} else {
|
|
@@ -75,7 +89,8 @@ export async function issue(config, args) {
|
|
|
75
89
|
fail(
|
|
76
90
|
"Usage: vatio issue \"what should change\"\n" +
|
|
77
91
|
" vatio issue --file ISSUE.md\n" +
|
|
78
|
-
" vatio issue --template
|
|
92
|
+
" vatio issue --template # the shape it is read against\n" +
|
|
93
|
+
" vatio issue --no-source # without your workspace attached"
|
|
79
94
|
);
|
|
80
95
|
}
|
|
81
96
|
body.message = message;
|
|
@@ -160,6 +175,24 @@ async function issueComment(config, id, rest) {
|
|
|
160
175
|
console.log(`Replied on issue ${id}.`);
|
|
161
176
|
}
|
|
162
177
|
|
|
178
|
+
// The directory the issue was typed in, sent whole -- the same bundle `check`
|
|
179
|
+
// and `push` send, because which files matter is the platform's contract and
|
|
180
|
+
// this client does not get a second answer to it.
|
|
181
|
+
//
|
|
182
|
+
// Nothing here can stop an issue from being sent: a directory that is not a
|
|
183
|
+
// workspace, or one too large to bundle, travels without its source. The call
|
|
184
|
+
// site says so out loud, since a developer is entitled to know what left their
|
|
185
|
+
// machine, and `--no-source` declines in advance.
|
|
186
|
+
function workspaceSource() {
|
|
187
|
+
try {
|
|
188
|
+
const root = findWorkspaceRoot(process.cwd());
|
|
189
|
+
if (!root) return null;
|
|
190
|
+
return { root, files: buildBundle(root) };
|
|
191
|
+
} catch (error) {
|
|
192
|
+
return { error: error.message };
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
163
196
|
// A workspace is useful context on an issue but never required: `vatio issue`
|
|
164
197
|
// has to work from anywhere, including a directory that is not a workspace.
|
|
165
198
|
function safeWorkspace(config) {
|
package/lib/config.mjs
CHANGED
|
@@ -186,7 +186,7 @@ export class Config {
|
|
|
186
186
|
const normalized = String(key ?? "").trim();
|
|
187
187
|
if (normalized === "assistants") {
|
|
188
188
|
throw new ConfigError(
|
|
189
|
-
'config key "assistants" was removed — Vatio no longer installs local skills; see https://vatio.ai
|
|
189
|
+
'config key "assistants" was removed — Vatio no longer installs local skills; see https://docs.vatio.ai'
|
|
190
190
|
);
|
|
191
191
|
}
|
|
192
192
|
if (normalized === "workspace") {
|
package/lib/help.mjs
CHANGED
|
@@ -61,12 +61,13 @@ flag, the directory decides.
|
|
|
61
61
|
|
|
62
62
|
Everything else:
|
|
63
63
|
issue "what should change"|list|show ID|comment ID "reply"|--template
|
|
64
|
+
Sends your workspace along; --no-source to not
|
|
64
65
|
mcp Speak MCP over stdio, for a coding agent
|
|
65
66
|
config show|get KEY|set KEY VALUE|unset KEY
|
|
66
67
|
Keys: base_url, token
|
|
67
68
|
|
|
68
69
|
Environment: VATIO_BASE_URL, VATIO_TOKEN, VATIO_HOME
|
|
69
70
|
|
|
70
|
-
Docs: https://vatio.ai
|
|
71
|
+
Docs: https://docs.vatio.ai
|
|
71
72
|
`;
|
|
72
73
|
}
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vatio-ai/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.46.0",
|
|
4
4
|
"description": "Vatio CLI — deploy and manage Vatio agent workspaces",
|
|
5
5
|
"keywords": ["vatio", "agent", "ai", "cli", "deploy"],
|
|
6
6
|
"homepage": "https://vatio.ai",
|
|
7
|
-
"bugs": "https://vatio.ai
|
|
7
|
+
"bugs": "https://docs.vatio.ai",
|
|
8
8
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
9
9
|
"author": "Vatio",
|
|
10
10
|
"type": "module",
|