@vm0/cli 9.58.0 → 9.58.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.
- package/index.js +63 -129
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -45,7 +45,7 @@ if (DSN) {
|
|
|
45
45
|
Sentry.init({
|
|
46
46
|
dsn: DSN,
|
|
47
47
|
environment: process.env.SENTRY_ENVIRONMENT ?? "production",
|
|
48
|
-
release: "9.58.
|
|
48
|
+
release: "9.58.1",
|
|
49
49
|
sendDefaultPii: false,
|
|
50
50
|
tracesSampleRate: 0,
|
|
51
51
|
shutdownTimeout: 500,
|
|
@@ -64,7 +64,7 @@ if (DSN) {
|
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
66
|
Sentry.setContext("cli", {
|
|
67
|
-
version: "9.58.
|
|
67
|
+
version: "9.58.1",
|
|
68
68
|
command: process.argv.slice(2).join(" ")
|
|
69
69
|
});
|
|
70
70
|
Sentry.setContext("runtime", {
|
|
@@ -673,7 +673,7 @@ function getConfigPath() {
|
|
|
673
673
|
return join2(homedir2(), ".vm0", "config.json");
|
|
674
674
|
}
|
|
675
675
|
var infoCommand = new Command6().name("info").description("Display environment and debug information").action(async () => {
|
|
676
|
-
console.log(chalk4.bold(`VM0 CLI v${"9.58.
|
|
676
|
+
console.log(chalk4.bold(`VM0 CLI v${"9.58.1"}`));
|
|
677
677
|
console.log();
|
|
678
678
|
const config = await loadConfig();
|
|
679
679
|
const hasEnvToken = !!process.env.VM0_TOKEN;
|
|
@@ -6448,11 +6448,12 @@ var computerConnectorContract = c18.router({
|
|
|
6448
6448
|
function bearerAuth(secretName) {
|
|
6449
6449
|
return { headers: { Authorization: `Bearer \${secrets.${secretName}}` } };
|
|
6450
6450
|
}
|
|
6451
|
-
|
|
6452
|
-
|
|
6453
|
-
}
|
|
6454
|
-
|
|
6455
|
-
|
|
6451
|
+
var FULL_ACCESS_PERMISSION = {
|
|
6452
|
+
name: "full-access",
|
|
6453
|
+
rules: ["ANY /{path+}"]
|
|
6454
|
+
};
|
|
6455
|
+
function api(base, auth) {
|
|
6456
|
+
return { base, auth, permissions: [FULL_ACCESS_PERMISSION] };
|
|
6456
6457
|
}
|
|
6457
6458
|
var SERVICE_CONFIGS = {
|
|
6458
6459
|
ahrefs: {
|
|
@@ -6655,16 +6656,8 @@ var SERVICE_CONFIGS = {
|
|
|
6655
6656
|
},
|
|
6656
6657
|
slack: {
|
|
6657
6658
|
apis: [
|
|
6658
|
-
api(
|
|
6659
|
-
|
|
6660
|
-
bearerAuth("SLACK_TOKEN"),
|
|
6661
|
-
"api-full-access"
|
|
6662
|
-
),
|
|
6663
|
-
api(
|
|
6664
|
-
"https://files.slack.com",
|
|
6665
|
-
bearerAuth("SLACK_TOKEN"),
|
|
6666
|
-
"files-full-access"
|
|
6667
|
-
)
|
|
6659
|
+
api("https://slack.com/api", bearerAuth("SLACK_TOKEN")),
|
|
6660
|
+
api("https://files.slack.com", bearerAuth("SLACK_TOKEN"))
|
|
6668
6661
|
],
|
|
6669
6662
|
placeholders: {
|
|
6670
6663
|
SLACK_TOKEN: "xoxb-0000-0000-vm0placeholder"
|
|
@@ -6672,30 +6665,14 @@ var SERVICE_CONFIGS = {
|
|
|
6672
6665
|
},
|
|
6673
6666
|
docusign: {
|
|
6674
6667
|
apis: [
|
|
6675
|
-
api(
|
|
6676
|
-
|
|
6677
|
-
bearerAuth("DOCUSIGN_TOKEN"),
|
|
6678
|
-
"demo-full-access"
|
|
6679
|
-
),
|
|
6680
|
-
api(
|
|
6681
|
-
"https://na1.docusign.net/restapi",
|
|
6682
|
-
bearerAuth("DOCUSIGN_TOKEN"),
|
|
6683
|
-
"na1-full-access"
|
|
6684
|
-
)
|
|
6668
|
+
api("https://demo.docusign.net/restapi", bearerAuth("DOCUSIGN_TOKEN")),
|
|
6669
|
+
api("https://na1.docusign.net/restapi", bearerAuth("DOCUSIGN_TOKEN"))
|
|
6685
6670
|
]
|
|
6686
6671
|
},
|
|
6687
6672
|
dropbox: {
|
|
6688
6673
|
apis: [
|
|
6689
|
-
api(
|
|
6690
|
-
|
|
6691
|
-
bearerAuth("DROPBOX_TOKEN"),
|
|
6692
|
-
"api-full-access"
|
|
6693
|
-
),
|
|
6694
|
-
api(
|
|
6695
|
-
"https://content.dropboxapi.com/2",
|
|
6696
|
-
bearerAuth("DROPBOX_TOKEN"),
|
|
6697
|
-
"content-full-access"
|
|
6698
|
-
)
|
|
6674
|
+
api("https://api.dropboxapi.com/2", bearerAuth("DROPBOX_TOKEN")),
|
|
6675
|
+
api("https://content.dropboxapi.com/2", bearerAuth("DROPBOX_TOKEN"))
|
|
6699
6676
|
]
|
|
6700
6677
|
},
|
|
6701
6678
|
linear: {
|
|
@@ -6703,21 +6680,9 @@ var SERVICE_CONFIGS = {
|
|
|
6703
6680
|
},
|
|
6704
6681
|
intercom: {
|
|
6705
6682
|
apis: [
|
|
6706
|
-
api(
|
|
6707
|
-
|
|
6708
|
-
|
|
6709
|
-
"us-full-access"
|
|
6710
|
-
),
|
|
6711
|
-
api(
|
|
6712
|
-
"https://api.eu.intercom.io",
|
|
6713
|
-
bearerAuth("INTERCOM_TOKEN"),
|
|
6714
|
-
"eu-full-access"
|
|
6715
|
-
),
|
|
6716
|
-
api(
|
|
6717
|
-
"https://api.au.intercom.io",
|
|
6718
|
-
bearerAuth("INTERCOM_TOKEN"),
|
|
6719
|
-
"au-full-access"
|
|
6720
|
-
)
|
|
6683
|
+
api("https://api.intercom.io", bearerAuth("INTERCOM_TOKEN")),
|
|
6684
|
+
api("https://api.eu.intercom.io", bearerAuth("INTERCOM_TOKEN")),
|
|
6685
|
+
api("https://api.au.intercom.io", bearerAuth("INTERCOM_TOKEN"))
|
|
6721
6686
|
]
|
|
6722
6687
|
},
|
|
6723
6688
|
jam: {
|
|
@@ -6725,24 +6690,16 @@ var SERVICE_CONFIGS = {
|
|
|
6725
6690
|
},
|
|
6726
6691
|
jotform: {
|
|
6727
6692
|
apis: [
|
|
6728
|
-
api(
|
|
6729
|
-
|
|
6730
|
-
|
|
6731
|
-
|
|
6732
|
-
|
|
6733
|
-
|
|
6734
|
-
|
|
6735
|
-
|
|
6736
|
-
|
|
6737
|
-
|
|
6738
|
-
"https://eu-api.jotform.com",
|
|
6739
|
-
{
|
|
6740
|
-
headers: {
|
|
6741
|
-
APIKEY: "${secrets.JOTFORM_TOKEN}"
|
|
6742
|
-
}
|
|
6743
|
-
},
|
|
6744
|
-
"eu-full-access"
|
|
6745
|
-
)
|
|
6693
|
+
api("https://api.jotform.com", {
|
|
6694
|
+
headers: {
|
|
6695
|
+
APIKEY: "${secrets.JOTFORM_TOKEN}"
|
|
6696
|
+
}
|
|
6697
|
+
}),
|
|
6698
|
+
api("https://eu-api.jotform.com", {
|
|
6699
|
+
headers: {
|
|
6700
|
+
APIKEY: "${secrets.JOTFORM_TOKEN}"
|
|
6701
|
+
}
|
|
6702
|
+
})
|
|
6746
6703
|
]
|
|
6747
6704
|
},
|
|
6748
6705
|
line: {
|
|
@@ -6750,42 +6707,26 @@ var SERVICE_CONFIGS = {
|
|
|
6750
6707
|
},
|
|
6751
6708
|
make: {
|
|
6752
6709
|
apis: [
|
|
6753
|
-
api(
|
|
6754
|
-
|
|
6755
|
-
|
|
6756
|
-
|
|
6757
|
-
|
|
6758
|
-
|
|
6759
|
-
|
|
6760
|
-
|
|
6761
|
-
|
|
6762
|
-
|
|
6763
|
-
|
|
6764
|
-
{
|
|
6765
|
-
|
|
6766
|
-
|
|
6767
|
-
|
|
6768
|
-
|
|
6769
|
-
|
|
6770
|
-
|
|
6771
|
-
|
|
6772
|
-
|
|
6773
|
-
{
|
|
6774
|
-
headers: {
|
|
6775
|
-
Authorization: "Token ${secrets.MAKE_TOKEN}"
|
|
6776
|
-
}
|
|
6777
|
-
},
|
|
6778
|
-
"us1-full-access"
|
|
6779
|
-
),
|
|
6780
|
-
api(
|
|
6781
|
-
"https://us2.make.com/api/v2",
|
|
6782
|
-
{
|
|
6783
|
-
headers: {
|
|
6784
|
-
Authorization: "Token ${secrets.MAKE_TOKEN}"
|
|
6785
|
-
}
|
|
6786
|
-
},
|
|
6787
|
-
"us2-full-access"
|
|
6788
|
-
)
|
|
6710
|
+
api("https://eu1.make.com/api/v2", {
|
|
6711
|
+
headers: {
|
|
6712
|
+
Authorization: "Token ${secrets.MAKE_TOKEN}"
|
|
6713
|
+
}
|
|
6714
|
+
}),
|
|
6715
|
+
api("https://eu2.make.com/api/v2", {
|
|
6716
|
+
headers: {
|
|
6717
|
+
Authorization: "Token ${secrets.MAKE_TOKEN}"
|
|
6718
|
+
}
|
|
6719
|
+
}),
|
|
6720
|
+
api("https://us1.make.com/api/v2", {
|
|
6721
|
+
headers: {
|
|
6722
|
+
Authorization: "Token ${secrets.MAKE_TOKEN}"
|
|
6723
|
+
}
|
|
6724
|
+
}),
|
|
6725
|
+
api("https://us2.make.com/api/v2", {
|
|
6726
|
+
headers: {
|
|
6727
|
+
Authorization: "Token ${secrets.MAKE_TOKEN}"
|
|
6728
|
+
}
|
|
6729
|
+
})
|
|
6789
6730
|
]
|
|
6790
6731
|
},
|
|
6791
6732
|
metabase: {
|
|
@@ -6870,16 +6811,8 @@ var SERVICE_CONFIGS = {
|
|
|
6870
6811
|
},
|
|
6871
6812
|
posthog: {
|
|
6872
6813
|
apis: [
|
|
6873
|
-
api(
|
|
6874
|
-
|
|
6875
|
-
bearerAuth("POSTHOG_ACCESS_TOKEN"),
|
|
6876
|
-
"us-full-access"
|
|
6877
|
-
),
|
|
6878
|
-
api(
|
|
6879
|
-
"https://app.posthog.com/api",
|
|
6880
|
-
bearerAuth("POSTHOG_ACCESS_TOKEN"),
|
|
6881
|
-
"cloud-full-access"
|
|
6882
|
-
)
|
|
6814
|
+
api("https://us.posthog.com/api", bearerAuth("POSTHOG_ACCESS_TOKEN")),
|
|
6815
|
+
api("https://app.posthog.com/api", bearerAuth("POSTHOG_ACCESS_TOKEN"))
|
|
6883
6816
|
]
|
|
6884
6817
|
},
|
|
6885
6818
|
stripe: {
|
|
@@ -6911,8 +6844,7 @@ var SERVICE_CONFIGS = {
|
|
|
6911
6844
|
{ length: 21 },
|
|
6912
6845
|
(_, i) => api(
|
|
6913
6846
|
`https://us${i + 1}.api.mailchimp.com/3.0`,
|
|
6914
|
-
bearerAuth("MAILCHIMP_TOKEN")
|
|
6915
|
-
`us${i + 1}-full-access`
|
|
6847
|
+
bearerAuth("MAILCHIMP_TOKEN")
|
|
6916
6848
|
)
|
|
6917
6849
|
)
|
|
6918
6850
|
},
|
|
@@ -9580,6 +9512,7 @@ function collectAndValidatePermissions(ref, serviceConfig) {
|
|
|
9580
9512
|
`API entry "${api2.base}" in service "${serviceConfig.name}" (ref "${ref}") has no permissions`
|
|
9581
9513
|
);
|
|
9582
9514
|
}
|
|
9515
|
+
const seen = /* @__PURE__ */ new Set();
|
|
9583
9516
|
for (const perm of api2.permissions) {
|
|
9584
9517
|
if (!perm.name) {
|
|
9585
9518
|
throw new Error(
|
|
@@ -9591,9 +9524,9 @@ function collectAndValidatePermissions(ref, serviceConfig) {
|
|
|
9591
9524
|
`Service "${serviceConfig.name}" (ref "${ref}") has a permission named "all", which is a reserved keyword`
|
|
9592
9525
|
);
|
|
9593
9526
|
}
|
|
9594
|
-
if (
|
|
9527
|
+
if (seen.has(perm.name)) {
|
|
9595
9528
|
throw new Error(
|
|
9596
|
-
`Duplicate permission name "${perm.name}" in service "${serviceConfig.name}" (ref "${ref}")`
|
|
9529
|
+
`Duplicate permission name "${perm.name}" in API entry "${api2.base}" of service "${serviceConfig.name}" (ref "${ref}")`
|
|
9597
9530
|
);
|
|
9598
9531
|
}
|
|
9599
9532
|
if (perm.rules.length === 0) {
|
|
@@ -9604,6 +9537,7 @@ function collectAndValidatePermissions(ref, serviceConfig) {
|
|
|
9604
9537
|
for (const rule of perm.rules) {
|
|
9605
9538
|
validateRule(rule, perm.name, serviceConfig.name);
|
|
9606
9539
|
}
|
|
9540
|
+
seen.add(perm.name);
|
|
9607
9541
|
available.add(perm.name);
|
|
9608
9542
|
}
|
|
9609
9543
|
}
|
|
@@ -9853,7 +9787,7 @@ var composeCommand = new Command7().name("compose").description("Create or updat
|
|
|
9853
9787
|
options.autoUpdate = false;
|
|
9854
9788
|
}
|
|
9855
9789
|
if (options.autoUpdate !== false) {
|
|
9856
|
-
await startSilentUpgrade("9.58.
|
|
9790
|
+
await startSilentUpgrade("9.58.1");
|
|
9857
9791
|
}
|
|
9858
9792
|
try {
|
|
9859
9793
|
let result;
|
|
@@ -11026,7 +10960,7 @@ var mainRunCommand = new Command8().name("run").description("Run an agent").argu
|
|
|
11026
10960
|
withErrorHandler(
|
|
11027
10961
|
async (identifier, prompt, options) => {
|
|
11028
10962
|
if (options.autoUpdate !== false) {
|
|
11029
|
-
await startSilentUpgrade("9.58.
|
|
10963
|
+
await startSilentUpgrade("9.58.1");
|
|
11030
10964
|
}
|
|
11031
10965
|
const { org, name, version } = parseIdentifier(identifier);
|
|
11032
10966
|
if (org && !options.experimentalSharedAgent) {
|
|
@@ -12713,7 +12647,7 @@ var cookAction = new Command34().name("cook").description("Quick start: prepare,
|
|
|
12713
12647
|
withErrorHandler(
|
|
12714
12648
|
async (prompt, options) => {
|
|
12715
12649
|
if (options.autoUpdate !== false) {
|
|
12716
|
-
const shouldExit = await checkAndUpgrade("9.58.
|
|
12650
|
+
const shouldExit = await checkAndUpgrade("9.58.1", prompt);
|
|
12717
12651
|
if (shouldExit) {
|
|
12718
12652
|
process.exit(0);
|
|
12719
12653
|
}
|
|
@@ -18064,13 +17998,13 @@ var upgradeCommand = new Command90().name("upgrade").description("Upgrade vm0 CL
|
|
|
18064
17998
|
if (latestVersion === null) {
|
|
18065
17999
|
throw new Error("Could not check for updates. Please try again later.");
|
|
18066
18000
|
}
|
|
18067
|
-
if (latestVersion === "9.58.
|
|
18068
|
-
console.log(chalk83.green(`\u2713 Already up to date (${"9.58.
|
|
18001
|
+
if (latestVersion === "9.58.1") {
|
|
18002
|
+
console.log(chalk83.green(`\u2713 Already up to date (${"9.58.1"})`));
|
|
18069
18003
|
return;
|
|
18070
18004
|
}
|
|
18071
18005
|
console.log(
|
|
18072
18006
|
chalk83.yellow(
|
|
18073
|
-
`Current version: ${"9.58.
|
|
18007
|
+
`Current version: ${"9.58.1"} -> Latest version: ${latestVersion}`
|
|
18074
18008
|
)
|
|
18075
18009
|
);
|
|
18076
18010
|
console.log();
|
|
@@ -18097,7 +18031,7 @@ var upgradeCommand = new Command90().name("upgrade").description("Upgrade vm0 CL
|
|
|
18097
18031
|
const success = await performUpgrade(packageManager);
|
|
18098
18032
|
if (success) {
|
|
18099
18033
|
console.log(
|
|
18100
|
-
chalk83.green(`\u2713 Upgraded from ${"9.58.
|
|
18034
|
+
chalk83.green(`\u2713 Upgraded from ${"9.58.1"} to ${latestVersion}`)
|
|
18101
18035
|
);
|
|
18102
18036
|
return;
|
|
18103
18037
|
}
|
|
@@ -18111,7 +18045,7 @@ var upgradeCommand = new Command90().name("upgrade").description("Upgrade vm0 CL
|
|
|
18111
18045
|
|
|
18112
18046
|
// src/index.ts
|
|
18113
18047
|
var program = new Command91();
|
|
18114
|
-
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.58.
|
|
18048
|
+
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.58.1");
|
|
18115
18049
|
program.addCommand(authCommand);
|
|
18116
18050
|
program.addCommand(infoCommand);
|
|
18117
18051
|
program.addCommand(composeCommand);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vm0/cli",
|
|
3
|
-
"version": "9.58.
|
|
3
|
+
"version": "9.58.1",
|
|
4
4
|
"description": "CLI application",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"dotenv": "^17.2.1",
|
|
24
24
|
"prompts": "^2.4.2",
|
|
25
25
|
"tar": "^7.5.7",
|
|
26
|
-
"undici": "^6.
|
|
26
|
+
"undici": "^6.24.0",
|
|
27
27
|
"yaml": "^2.3.4",
|
|
28
28
|
"zod": "^4.3.6"
|
|
29
29
|
}
|