@vm0/cli 9.238.10 → 9.240.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/{agent-VWHCJWZY.js → agent-BU3F5RW5.js} +5 -5
- package/{banking-UYV4KCLK.js → banking-L74MGBP6.js} +3 -3
- package/{chat-OOUCK4HC.js → chat-IYZH3T3O.js} +4 -4
- package/{chunk-UE3OEM3D.js → chunk-3IH2QU57.js} +2 -2
- package/{chunk-2RXY3HJP.js → chunk-6R4HTQSH.js} +2 -2
- package/{chunk-2RXY3HJP.js.map → chunk-6R4HTQSH.js.map} +1 -1
- package/{chunk-LYCVL2W5.js → chunk-7BHKM63H.js} +21 -21
- package/chunk-7BHKM63H.js.map +1 -0
- package/{chunk-SU52N7MI.js → chunk-MFO54L7D.js} +765 -73
- package/chunk-MFO54L7D.js.map +1 -0
- package/{chunk-MGWDPQX4.js → chunk-PCP7O5ST.js} +2 -2
- package/{chunk-2V4PI7HM.js → chunk-QCYKZV5E.js} +4 -4
- package/{chunk-DXQAOOHT.js → chunk-UHBFZAMT.js} +2 -2
- package/{chunk-5TQGEY3V.js → chunk-V77QTHRL.js} +4 -4
- package/{chunk-JS2LCJYQ.js → chunk-YHR4HVAA.js} +3 -3
- package/{computer-use-66SZB72Q.js → computer-use-WY7PTADU.js} +3 -3
- package/{connector-SEINY3HC.js → connector-HQKPT3NI.js} +4 -4
- package/{credit-ZLYRKMOD.js → credit-3VSUM5MJ.js} +46 -6
- package/credit-3VSUM5MJ.js.map +1 -0
- package/{developer-support-SIQRIU7K.js → developer-support-5BH43Z25.js} +3 -3
- package/{doctor-HL4DIDTT.js → doctor-DSWP27KJ.js} +5 -5
- package/{generate-CHPRSKIL.js → generate-OGV26ZYH.js} +4 -4
- package/{github-KNXOOMF5.js → github-VQ65HTCS.js} +3 -3
- package/{goal-AZUCCMTO.js → goal-TSNIPDUC.js} +3 -3
- package/{host-RPF534W5.js → host-T24ERN32.js} +3 -3
- package/index.js +12 -12
- package/index.js.map +1 -1
- package/{logs-RB5S3W4B.js → logs-N2U6VGYP.js} +5 -5
- package/{maps-TXNZYOWG.js → maps-QJAHISKI.js} +3 -3
- package/{memory-MCDKPOQL.js → memory-M5KENS56.js} +3 -3
- package/{model-E2BLTXPE.js → model-AH2AZKKM.js} +4 -4
- package/{model-provider-GABQJBJ6.js → model-provider-QWF2AOQA.js} +4 -4
- package/{org-4Q4YFZ7C.js → org-T4N5A63U.js} +3 -3
- package/package.json +1 -1
- package/{phone-YT3PGN5K.js → phone-LT7NI7U4.js} +3 -3
- package/{preference-V26XZNX6.js → preference-Y3DR33YJ.js} +3 -3
- package/{relationship-JGDNCKJ3.js → relationship-C4H3MOT2.js} +3 -3
- package/{resource-A6OHWERG.js → resource-VIGI33NN.js} +3 -3
- package/scrape-FPAOJRQU.js +99 -0
- package/scrape-FPAOJRQU.js.map +1 -0
- package/{search-XURNW4NC.js → search-CZ6N5LLL.js} +5 -5
- package/{secret-3U6BHQG2.js → secret-T5L72H7R.js} +3 -3
- package/{slack-QGSLAQLM.js → slack-O5AEPMB3.js} +3 -3
- package/{teams-Q2CZOB7M.js → teams-6BZVHEUM.js} +3 -3
- package/{telegram-RL4SWPF4.js → telegram-33Y34S6K.js} +3 -3
- package/{variable-GNSMGSAU.js → variable-CLPVIKW5.js} +3 -3
- package/{video-NLV65CGS.js → video-E3KESQP6.js} +2 -2
- package/{web-XXVD26OD.js → web-RHIEBRDN.js} +3 -3
- package/{whoami-OG6OXABR.js → whoami-YIED4I4V.js} +5 -5
- package/{workflow-OMCXEZGC.js → workflow-JBYQGDQO.js} +3 -3
- package/zero.js +47 -38
- package/zero.js.map +1 -1
- package/chunk-LYCVL2W5.js.map +0 -1
- package/chunk-SU52N7MI.js.map +0 -1
- package/credit-ZLYRKMOD.js.map +0 -1
- /package/{agent-VWHCJWZY.js.map → agent-BU3F5RW5.js.map} +0 -0
- /package/{banking-UYV4KCLK.js.map → banking-L74MGBP6.js.map} +0 -0
- /package/{chat-OOUCK4HC.js.map → chat-IYZH3T3O.js.map} +0 -0
- /package/{chunk-UE3OEM3D.js.map → chunk-3IH2QU57.js.map} +0 -0
- /package/{chunk-MGWDPQX4.js.map → chunk-PCP7O5ST.js.map} +0 -0
- /package/{chunk-2V4PI7HM.js.map → chunk-QCYKZV5E.js.map} +0 -0
- /package/{chunk-DXQAOOHT.js.map → chunk-UHBFZAMT.js.map} +0 -0
- /package/{chunk-5TQGEY3V.js.map → chunk-V77QTHRL.js.map} +0 -0
- /package/{chunk-JS2LCJYQ.js.map → chunk-YHR4HVAA.js.map} +0 -0
- /package/{computer-use-66SZB72Q.js.map → computer-use-WY7PTADU.js.map} +0 -0
- /package/{connector-SEINY3HC.js.map → connector-HQKPT3NI.js.map} +0 -0
- /package/{developer-support-SIQRIU7K.js.map → developer-support-5BH43Z25.js.map} +0 -0
- /package/{doctor-HL4DIDTT.js.map → doctor-DSWP27KJ.js.map} +0 -0
- /package/{generate-CHPRSKIL.js.map → generate-OGV26ZYH.js.map} +0 -0
- /package/{github-KNXOOMF5.js.map → github-VQ65HTCS.js.map} +0 -0
- /package/{goal-AZUCCMTO.js.map → goal-TSNIPDUC.js.map} +0 -0
- /package/{host-RPF534W5.js.map → host-T24ERN32.js.map} +0 -0
- /package/{logs-RB5S3W4B.js.map → logs-N2U6VGYP.js.map} +0 -0
- /package/{maps-TXNZYOWG.js.map → maps-QJAHISKI.js.map} +0 -0
- /package/{memory-MCDKPOQL.js.map → memory-M5KENS56.js.map} +0 -0
- /package/{model-E2BLTXPE.js.map → model-AH2AZKKM.js.map} +0 -0
- /package/{model-provider-GABQJBJ6.js.map → model-provider-QWF2AOQA.js.map} +0 -0
- /package/{org-4Q4YFZ7C.js.map → org-T4N5A63U.js.map} +0 -0
- /package/{phone-YT3PGN5K.js.map → phone-LT7NI7U4.js.map} +0 -0
- /package/{preference-V26XZNX6.js.map → preference-Y3DR33YJ.js.map} +0 -0
- /package/{relationship-JGDNCKJ3.js.map → relationship-C4H3MOT2.js.map} +0 -0
- /package/{resource-A6OHWERG.js.map → resource-VIGI33NN.js.map} +0 -0
- /package/{search-XURNW4NC.js.map → search-CZ6N5LLL.js.map} +0 -0
- /package/{secret-3U6BHQG2.js.map → secret-T5L72H7R.js.map} +0 -0
- /package/{slack-QGSLAQLM.js.map → slack-O5AEPMB3.js.map} +0 -0
- /package/{teams-Q2CZOB7M.js.map → teams-6BZVHEUM.js.map} +0 -0
- /package/{telegram-RL4SWPF4.js.map → telegram-33Y34S6K.js.map} +0 -0
- /package/{variable-GNSMGSAU.js.map → variable-CLPVIKW5.js.map} +0 -0
- /package/{video-NLV65CGS.js.map → video-E3KESQP6.js.map} +0 -0
- /package/{web-XXVD26OD.js.map → web-RHIEBRDN.js.map} +0 -0
- /package/{whoami-OG6OXABR.js.map → whoami-YIED4I4V.js.map} +0 -0
- /package/{workflow-OMCXEZGC.js.map → workflow-JBYQGDQO.js.map} +0 -0
|
@@ -3,7 +3,7 @@ import { createRequire as __createRequire } from "node:module";
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
UNKNOWN_PERMISSION_GRANT
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-MFO54L7D.js";
|
|
7
7
|
import {
|
|
8
8
|
init_esm_shims
|
|
9
9
|
} from "./chunk-DIRAZ3YX.js";
|
|
@@ -130,4 +130,4 @@ export {
|
|
|
130
130
|
resolveFirewallMetadataPolicies,
|
|
131
131
|
permissionGrantsToFirewallPolicies
|
|
132
132
|
};
|
|
133
|
-
//# sourceMappingURL=chunk-
|
|
133
|
+
//# sourceMappingURL=chunk-PCP7O5ST.js.map
|
|
@@ -10,14 +10,14 @@ import {
|
|
|
10
10
|
parseBoundedLogCount,
|
|
11
11
|
parseSearchQuery,
|
|
12
12
|
parseTime
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-7BHKM63H.js";
|
|
14
14
|
import {
|
|
15
15
|
searchZeroLogs
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-MFO54L7D.js";
|
|
17
17
|
import {
|
|
18
18
|
source_default,
|
|
19
19
|
withErrorHandler
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-6R4HTQSH.js";
|
|
21
21
|
import {
|
|
22
22
|
Command
|
|
23
23
|
} from "./chunk-B3W2RUBP.js";
|
|
@@ -174,4 +174,4 @@ export {
|
|
|
174
174
|
runLogsSearch,
|
|
175
175
|
searchCommand
|
|
176
176
|
};
|
|
177
|
-
//# sourceMappingURL=chunk-
|
|
177
|
+
//# sourceMappingURL=chunk-QCYKZV5E.js.map
|
|
@@ -3,7 +3,7 @@ import { createRequire as __createRequire } from "node:module";
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
getApiUrl
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-6R4HTQSH.js";
|
|
7
7
|
import {
|
|
8
8
|
init_esm_shims
|
|
9
9
|
} from "./chunk-DIRAZ3YX.js";
|
|
@@ -32,4 +32,4 @@ export {
|
|
|
32
32
|
toPlatformUrl,
|
|
33
33
|
getPlatformOrigin
|
|
34
34
|
};
|
|
35
|
-
//# sourceMappingURL=chunk-
|
|
35
|
+
//# sourceMappingURL=chunk-UHBFZAMT.js.map
|
|
@@ -3,13 +3,13 @@ import { createRequire as __createRequire } from "node:module";
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
resolveFirewallMetadataPolicies
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PCP7O5ST.js";
|
|
7
7
|
import {
|
|
8
8
|
getZeroConnectorCatalogPermissions
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MFO54L7D.js";
|
|
10
10
|
import {
|
|
11
11
|
source_default
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-6R4HTQSH.js";
|
|
13
13
|
import {
|
|
14
14
|
init_esm_shims
|
|
15
15
|
} from "./chunk-DIRAZ3YX.js";
|
|
@@ -89,4 +89,4 @@ export {
|
|
|
89
89
|
policyIcon,
|
|
90
90
|
loadConnectorPermissionInfos
|
|
91
91
|
};
|
|
92
|
-
//# sourceMappingURL=chunk-
|
|
92
|
+
//# sourceMappingURL=chunk-V77QTHRL.js.map
|
|
@@ -50,7 +50,7 @@ if (DSN) {
|
|
|
50
50
|
Sentry.init({
|
|
51
51
|
dsn: DSN,
|
|
52
52
|
environment: process.env.SENTRY_ENVIRONMENT ?? "production",
|
|
53
|
-
release: "9.
|
|
53
|
+
release: "9.240.0",
|
|
54
54
|
sendDefaultPii: false,
|
|
55
55
|
tracesSampleRate: 0,
|
|
56
56
|
shutdownTimeout: 500,
|
|
@@ -69,7 +69,7 @@ if (DSN) {
|
|
|
69
69
|
}
|
|
70
70
|
});
|
|
71
71
|
Sentry.setContext("cli", {
|
|
72
|
-
version: "9.
|
|
72
|
+
version: "9.240.0",
|
|
73
73
|
command: process.argv.slice(2).join(" ")
|
|
74
74
|
});
|
|
75
75
|
Sentry.setContext("runtime", {
|
|
@@ -146,4 +146,4 @@ async function configureGlobalProxyFromEnv() {
|
|
|
146
146
|
export {
|
|
147
147
|
configureGlobalProxyFromEnv
|
|
148
148
|
};
|
|
149
|
-
//# sourceMappingURL=chunk-
|
|
149
|
+
//# sourceMappingURL=chunk-YHR4HVAA.js.map
|
|
@@ -12,11 +12,11 @@ import {
|
|
|
12
12
|
fetchComputerUseScreenshot,
|
|
13
13
|
getComputerUseCommand,
|
|
14
14
|
listComputerUseHosts
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-MFO54L7D.js";
|
|
16
16
|
import {
|
|
17
17
|
ApiRequestError,
|
|
18
18
|
withErrorHandler
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-6R4HTQSH.js";
|
|
20
20
|
import "./chunk-LRHXR7JT.js";
|
|
21
21
|
import {
|
|
22
22
|
Command
|
|
@@ -969,4 +969,4 @@ export {
|
|
|
969
969
|
formatComputerUseResultForConsole,
|
|
970
970
|
zeroComputerUseCommand
|
|
971
971
|
};
|
|
972
|
-
//# sourceMappingURL=computer-use-
|
|
972
|
+
//# sourceMappingURL=computer-use-WY7PTADU.js.map
|
|
@@ -3,7 +3,7 @@ import { createRequire as __createRequire } from "node:module";
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
getPlatformOrigin
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UHBFZAMT.js";
|
|
7
7
|
import {
|
|
8
8
|
connectZeroConnectorManualGrant,
|
|
9
9
|
customConnectorProposalSchema,
|
|
@@ -13,12 +13,12 @@ import {
|
|
|
13
13
|
getZeroCustomConnector,
|
|
14
14
|
listZeroConnectorCatalogStatus,
|
|
15
15
|
listZeroCustomConnectors
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-MFO54L7D.js";
|
|
17
17
|
import "./chunk-LTDQISD7.js";
|
|
18
18
|
import {
|
|
19
19
|
source_default,
|
|
20
20
|
withErrorHandler
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-6R4HTQSH.js";
|
|
22
22
|
import "./chunk-LRHXR7JT.js";
|
|
23
23
|
import {
|
|
24
24
|
Command
|
|
@@ -801,4 +801,4 @@ var zeroConnectorCommand = new Command().name("connector").description("Check th
|
|
|
801
801
|
export {
|
|
802
802
|
zeroConnectorCommand
|
|
803
803
|
};
|
|
804
|
-
//# sourceMappingURL=connector-
|
|
804
|
+
//# sourceMappingURL=connector-HQKPT3NI.js.map
|
|
@@ -3,17 +3,20 @@ import { createRequire as __createRequire } from "node:module";
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
getPlatformOrigin
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UHBFZAMT.js";
|
|
7
7
|
import {
|
|
8
8
|
createZeroCreditCheckout,
|
|
9
|
+
getZeroBillingStatus,
|
|
9
10
|
getZeroOrgMembers
|
|
10
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-MFO54L7D.js";
|
|
11
12
|
import "./chunk-LTDQISD7.js";
|
|
12
13
|
import {
|
|
13
14
|
source_default,
|
|
14
15
|
withErrorHandler
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import
|
|
16
|
+
} from "./chunk-6R4HTQSH.js";
|
|
17
|
+
import {
|
|
18
|
+
decodeZeroTokenPayload
|
|
19
|
+
} from "./chunk-LRHXR7JT.js";
|
|
17
20
|
import {
|
|
18
21
|
Command,
|
|
19
22
|
Option
|
|
@@ -31,7 +34,13 @@ function parseCredits(value) {
|
|
|
31
34
|
}
|
|
32
35
|
return credits;
|
|
33
36
|
}
|
|
34
|
-
|
|
37
|
+
function requireZeroCapabilityForCreditAction(capability, message) {
|
|
38
|
+
const payload = decodeZeroTokenPayload();
|
|
39
|
+
if (payload && !payload.capabilities.includes(capability)) {
|
|
40
|
+
throw new Error(message);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
var zeroCreditCommand = new Command().name("credit").description("View credit balance or create a checkout link to buy credits").argument("[credits]", "Number of credits to buy", parseCredits).addOption(
|
|
35
44
|
new Option("--auto-recharge", "Enable auto-recharge after checkout")
|
|
36
45
|
).option(
|
|
37
46
|
"--auto-recharge-threshold <credits>",
|
|
@@ -44,6 +53,37 @@ var zeroCreditCommand = new Command().name("credit").description("Create a Strip
|
|
|
44
53
|
).action(
|
|
45
54
|
withErrorHandler(
|
|
46
55
|
async (credits, options) => {
|
|
56
|
+
if (credits === void 0) {
|
|
57
|
+
requireZeroCapabilityForCreditAction(
|
|
58
|
+
"billing:read",
|
|
59
|
+
"checking credit status requires billing:read capability"
|
|
60
|
+
);
|
|
61
|
+
if (options.autoRecharge === true || options.autoRechargeThreshold !== void 0 || options.autoRechargeAmount !== void 0) {
|
|
62
|
+
throw new Error("auto-recharge options require a credit amount");
|
|
63
|
+
}
|
|
64
|
+
const billing = await getZeroBillingStatus();
|
|
65
|
+
console.log(source_default.bold("Credit status:"));
|
|
66
|
+
console.log(` Tier: ${source_default.cyan(billing.tier)}`);
|
|
67
|
+
console.log(
|
|
68
|
+
` Available credits: ${source_default.cyan(billing.credits.toLocaleString())}`
|
|
69
|
+
);
|
|
70
|
+
console.log(
|
|
71
|
+
` Auto-recharge: ${billing.autoRecharge.enabled ? source_default.green("enabled") : "disabled"}`
|
|
72
|
+
);
|
|
73
|
+
if (billing.autoRecharge.enabled) {
|
|
74
|
+
console.log(
|
|
75
|
+
` Threshold: ${billing.autoRecharge.threshold?.toLocaleString() ?? "not set"}`
|
|
76
|
+
);
|
|
77
|
+
console.log(
|
|
78
|
+
` Amount: ${billing.autoRecharge.amount?.toLocaleString() ?? "not set"}`
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
return;
|
|
82
|
+
}
|
|
83
|
+
requireZeroCapabilityForCreditAction(
|
|
84
|
+
"billing:write",
|
|
85
|
+
"buying credits requires billing:write capability"
|
|
86
|
+
);
|
|
47
87
|
const members = await getZeroOrgMembers();
|
|
48
88
|
if (members.role !== "admin") {
|
|
49
89
|
console.log(
|
|
@@ -85,4 +125,4 @@ var zeroCreditCommand = new Command().name("credit").description("Create a Strip
|
|
|
85
125
|
export {
|
|
86
126
|
zeroCreditCommand
|
|
87
127
|
};
|
|
88
|
-
//# sourceMappingURL=credit-
|
|
128
|
+
//# sourceMappingURL=credit-3VSUM5MJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/commands/zero/credit.ts"],"sourcesContent":["import { Command, Option } from \"commander\";\nimport chalk from \"chalk\";\nimport type { ZeroCapability } from \"@vm0/api-contracts/contracts/composes\";\n\nimport {\n createZeroCreditCheckout,\n getZeroBillingStatus,\n getZeroOrgMembers,\n} from \"../../lib/api\";\nimport { withErrorHandler } from \"../../lib/command\";\nimport { decodeZeroTokenPayload } from \"../../lib/api/zero-token\";\nimport { getPlatformOrigin } from \"./doctor/platform-url\";\n\nfunction parseCredits(value: string): number {\n const credits = Number(value.replaceAll(\",\", \"\"));\n if (!Number.isInteger(credits) || credits <= 0) {\n throw new Error(\"credits must be a positive integer\");\n }\n return credits;\n}\n\nfunction requireZeroCapabilityForCreditAction(\n capability: ZeroCapability,\n message: string,\n): void {\n const payload = decodeZeroTokenPayload();\n if (payload && !payload.capabilities.includes(capability)) {\n throw new Error(message);\n }\n}\n\nexport const zeroCreditCommand = new Command()\n .name(\"credit\")\n .description(\"View credit balance or create a checkout link to buy credits\")\n .argument(\"[credits]\", \"Number of credits to buy\", parseCredits)\n .addOption(\n new Option(\"--auto-recharge\", \"Enable auto-recharge after checkout\"),\n )\n .option(\n \"--auto-recharge-threshold <credits>\",\n \"Recharge when balance is at or below this number of credits\",\n parseCredits,\n )\n .option(\n \"--auto-recharge-amount <credits>\",\n \"Credits to buy for each auto-recharge\",\n parseCredits,\n )\n .action(\n withErrorHandler(\n async (\n credits: number | undefined,\n options: {\n readonly autoRecharge?: boolean;\n readonly autoRechargeThreshold?: number;\n readonly autoRechargeAmount?: number;\n },\n ) => {\n if (credits === undefined) {\n requireZeroCapabilityForCreditAction(\n \"billing:read\",\n \"checking credit status requires billing:read capability\",\n );\n if (\n options.autoRecharge === true ||\n options.autoRechargeThreshold !== undefined ||\n options.autoRechargeAmount !== undefined\n ) {\n throw new Error(\"auto-recharge options require a credit amount\");\n }\n\n const billing = await getZeroBillingStatus();\n console.log(chalk.bold(\"Credit status:\"));\n console.log(` Tier: ${chalk.cyan(billing.tier)}`);\n console.log(\n ` Available credits: ${chalk.cyan(billing.credits.toLocaleString())}`,\n );\n console.log(\n ` Auto-recharge: ${\n billing.autoRecharge.enabled ? chalk.green(\"enabled\") : \"disabled\"\n }`,\n );\n if (billing.autoRecharge.enabled) {\n console.log(\n ` Threshold: ${billing.autoRecharge.threshold?.toLocaleString() ?? \"not set\"}`,\n );\n console.log(\n ` Amount: ${billing.autoRecharge.amount?.toLocaleString() ?? \"not set\"}`,\n );\n }\n return;\n }\n\n requireZeroCapabilityForCreditAction(\n \"billing:write\",\n \"buying credits requires billing:write capability\",\n );\n const members = await getZeroOrgMembers();\n if (members.role !== \"admin\") {\n console.log(\n chalk.yellow(\n \"Only organization admins can buy credits. Run `zero doctor credit` to see the current credit status and org admins.\",\n ),\n );\n return;\n }\n\n const origin = await getPlatformOrigin();\n const successUrl = `${origin}/?settings=usage&credit=success`;\n const cancelUrl = `${origin}/?settings=usage&credit=canceled`;\n if (\n options.autoRecharge !== true &&\n (options.autoRechargeThreshold !== undefined ||\n options.autoRechargeAmount !== undefined)\n ) {\n throw new Error(\n \"--auto-recharge-threshold and --auto-recharge-amount require --auto-recharge\",\n );\n }\n\n if (\n options.autoRecharge === true &&\n (options.autoRechargeThreshold === undefined ||\n options.autoRechargeAmount === undefined)\n ) {\n throw new Error(\n \"--auto-recharge requires --auto-recharge-threshold and --auto-recharge-amount\",\n );\n }\n\n const autoRecharge =\n options.autoRecharge === true\n ? {\n enabled: true,\n threshold: options.autoRechargeThreshold,\n amount: options.autoRechargeAmount,\n }\n : undefined;\n\n const result = await createZeroCreditCheckout({\n credits,\n successUrl,\n cancelUrl,\n ...(autoRecharge ? { autoRecharge } : {}),\n });\n console.log(chalk.bold(\"Credit checkout link:\"));\n console.log(result.url);\n },\n ),\n );\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAaA,SAAS,aAAa,OAAuB;AAC3C,QAAM,UAAU,OAAO,MAAM,WAAW,KAAK,EAAE,CAAC;AAChD,MAAI,CAAC,OAAO,UAAU,OAAO,KAAK,WAAW,GAAG;AAC9C,UAAM,IAAI,MAAM,oCAAoC;AAAA,EACtD;AACA,SAAO;AACT;AAEA,SAAS,qCACP,YACA,SACM;AACN,QAAM,UAAU,uBAAuB;AACvC,MAAI,WAAW,CAAC,QAAQ,aAAa,SAAS,UAAU,GAAG;AACzD,UAAM,IAAI,MAAM,OAAO;AAAA,EACzB;AACF;AAEO,IAAM,oBAAoB,IAAI,QAAQ,EAC1C,KAAK,QAAQ,EACb,YAAY,8DAA8D,EAC1E,SAAS,aAAa,4BAA4B,YAAY,EAC9D;AAAA,EACC,IAAI,OAAO,mBAAmB,qCAAqC;AACrE,EACC;AAAA,EACC;AAAA,EACA;AAAA,EACA;AACF,EACC;AAAA,EACC;AAAA,EACA;AAAA,EACA;AACF,EACC;AAAA,EACC;AAAA,IACE,OACE,SACA,YAKG;AACH,UAAI,YAAY,QAAW;AACzB;AAAA,UACE;AAAA,UACA;AAAA,QACF;AACA,YACE,QAAQ,iBAAiB,QACzB,QAAQ,0BAA0B,UAClC,QAAQ,uBAAuB,QAC/B;AACA,gBAAM,IAAI,MAAM,+CAA+C;AAAA,QACjE;AAEA,cAAM,UAAU,MAAM,qBAAqB;AAC3C,gBAAQ,IAAI,eAAM,KAAK,gBAAgB,CAAC;AACxC,gBAAQ,IAAI,WAAW,eAAM,KAAK,QAAQ,IAAI,CAAC,EAAE;AACjD,gBAAQ;AAAA,UACN,wBAAwB,eAAM,KAAK,QAAQ,QAAQ,eAAe,CAAC,CAAC;AAAA,QACtE;AACA,gBAAQ;AAAA,UACN,oBACE,QAAQ,aAAa,UAAU,eAAM,MAAM,SAAS,IAAI,UAC1D;AAAA,QACF;AACA,YAAI,QAAQ,aAAa,SAAS;AAChC,kBAAQ;AAAA,YACN,kBAAkB,QAAQ,aAAa,WAAW,eAAe,KAAK,SAAS;AAAA,UACjF;AACA,kBAAQ;AAAA,YACN,eAAe,QAAQ,aAAa,QAAQ,eAAe,KAAK,SAAS;AAAA,UAC3E;AAAA,QACF;AACA;AAAA,MACF;AAEA;AAAA,QACE;AAAA,QACA;AAAA,MACF;AACA,YAAM,UAAU,MAAM,kBAAkB;AACxC,UAAI,QAAQ,SAAS,SAAS;AAC5B,gBAAQ;AAAA,UACN,eAAM;AAAA,YACJ;AAAA,UACF;AAAA,QACF;AACA;AAAA,MACF;AAEA,YAAM,SAAS,MAAM,kBAAkB;AACvC,YAAM,aAAa,GAAG,MAAM;AAC5B,YAAM,YAAY,GAAG,MAAM;AAC3B,UACE,QAAQ,iBAAiB,SACxB,QAAQ,0BAA0B,UACjC,QAAQ,uBAAuB,SACjC;AACA,cAAM,IAAI;AAAA,UACR;AAAA,QACF;AAAA,MACF;AAEA,UACE,QAAQ,iBAAiB,SACxB,QAAQ,0BAA0B,UACjC,QAAQ,uBAAuB,SACjC;AACA,cAAM,IAAI;AAAA,UACR;AAAA,QACF;AAAA,MACF;AAEA,YAAM,eACJ,QAAQ,iBAAiB,OACrB;AAAA,QACE,SAAS;AAAA,QACT,WAAW,QAAQ;AAAA,QACnB,QAAQ,QAAQ;AAAA,MAClB,IACA;AAEN,YAAM,SAAS,MAAM,yBAAyB;AAAA,QAC5C;AAAA,QACA;AAAA,QACA;AAAA,QACA,GAAI,eAAe,EAAE,aAAa,IAAI,CAAC;AAAA,MACzC,CAAC;AACD,cAAQ,IAAI,eAAM,KAAK,uBAAuB,CAAC;AAC/C,cAAQ,IAAI,OAAO,GAAG;AAAA,IACxB;AAAA,EACF;AACF;","names":[]}
|
|
@@ -4,11 +4,11 @@ const require = __createRequire(import.meta.url);
|
|
|
4
4
|
import {
|
|
5
5
|
requestDeveloperSupportConsent,
|
|
6
6
|
submitDeveloperSupport
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-MFO54L7D.js";
|
|
8
8
|
import "./chunk-LTDQISD7.js";
|
|
9
9
|
import {
|
|
10
10
|
withErrorHandler
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-6R4HTQSH.js";
|
|
12
12
|
import "./chunk-LRHXR7JT.js";
|
|
13
13
|
import {
|
|
14
14
|
Command
|
|
@@ -60,4 +60,4 @@ Notes:
|
|
|
60
60
|
export {
|
|
61
61
|
zeroDeveloperSupportCommand
|
|
62
62
|
};
|
|
63
|
-
//# sourceMappingURL=developer-support-
|
|
63
|
+
//# sourceMappingURL=developer-support-5BH43Z25.js.map
|
|
@@ -3,11 +3,11 @@ import { createRequire as __createRequire } from "node:module";
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
findFirewallMetadataPermission
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PCP7O5ST.js";
|
|
7
7
|
import {
|
|
8
8
|
getPlatformOrigin,
|
|
9
9
|
toPlatformUrl
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-UHBFZAMT.js";
|
|
11
11
|
import {
|
|
12
12
|
UNKNOWN_PERMISSION_GRANT,
|
|
13
13
|
createComputerUseAuthorizationRequest,
|
|
@@ -20,14 +20,14 @@ import {
|
|
|
20
20
|
getZeroOrg,
|
|
21
21
|
getZeroOrgMembers,
|
|
22
22
|
hasUnsafeFirewallPath
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-MFO54L7D.js";
|
|
24
24
|
import "./chunk-LTDQISD7.js";
|
|
25
25
|
import {
|
|
26
26
|
ApiRequestError,
|
|
27
27
|
getApiUrl,
|
|
28
28
|
source_default,
|
|
29
29
|
withErrorHandler
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-6R4HTQSH.js";
|
|
31
31
|
import "./chunk-LRHXR7JT.js";
|
|
32
32
|
import {
|
|
33
33
|
Command,
|
|
@@ -1191,4 +1191,4 @@ Notes:
|
|
|
1191
1191
|
export {
|
|
1192
1192
|
zeroDoctorCommand
|
|
1193
1193
|
};
|
|
1194
|
-
//# sourceMappingURL=doctor-
|
|
1194
|
+
//# sourceMappingURL=doctor-DSWP27KJ.js.map
|
|
@@ -3,7 +3,7 @@ import { createRequire as __createRequire } from "node:module";
|
|
|
3
3
|
const require = __createRequire(import.meta.url);
|
|
4
4
|
import {
|
|
5
5
|
getPlatformOrigin
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-UHBFZAMT.js";
|
|
7
7
|
import {
|
|
8
8
|
buildPresentationRunbookInstructionLines,
|
|
9
9
|
findDesignSystem,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
getZeroAgentUserConnectors,
|
|
26
26
|
listZeroConnectorCatalog,
|
|
27
27
|
listZeroConnectorCatalogStatus
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-MFO54L7D.js";
|
|
29
29
|
import "./chunk-LTDQISD7.js";
|
|
30
30
|
import {
|
|
31
31
|
generateWebImage,
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
generateWebVoice,
|
|
34
34
|
source_default,
|
|
35
35
|
withErrorHandler
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-6R4HTQSH.js";
|
|
37
37
|
import "./chunk-LRHXR7JT.js";
|
|
38
38
|
import {
|
|
39
39
|
Command,
|
|
@@ -2693,4 +2693,4 @@ var generateCommand = new Command().name("generate").description(
|
|
|
2693
2693
|
export {
|
|
2694
2694
|
generateCommand
|
|
2695
2695
|
};
|
|
2696
|
-
//# sourceMappingURL=generate-
|
|
2696
|
+
//# sourceMappingURL=generate-OGV26ZYH.js.map
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
completeGithubFileUpload,
|
|
6
6
|
downloadGithubFile,
|
|
7
7
|
initGithubFileUpload
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-MFO54L7D.js";
|
|
9
9
|
import "./chunk-LTDQISD7.js";
|
|
10
10
|
import {
|
|
11
11
|
withErrorHandler
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-6R4HTQSH.js";
|
|
13
13
|
import "./chunk-LRHXR7JT.js";
|
|
14
14
|
import {
|
|
15
15
|
Command
|
|
@@ -200,4 +200,4 @@ Examples:
|
|
|
200
200
|
export {
|
|
201
201
|
zeroGithubCommand
|
|
202
202
|
};
|
|
203
|
-
//# sourceMappingURL=github-
|
|
203
|
+
//# sourceMappingURL=github-VQ65HTCS.js.map
|
|
@@ -10,11 +10,11 @@ import {
|
|
|
10
10
|
getGoal,
|
|
11
11
|
pauseGoal,
|
|
12
12
|
resumeGoal
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-MFO54L7D.js";
|
|
14
14
|
import "./chunk-LTDQISD7.js";
|
|
15
15
|
import {
|
|
16
16
|
withErrorHandler
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-6R4HTQSH.js";
|
|
18
18
|
import "./chunk-LRHXR7JT.js";
|
|
19
19
|
import {
|
|
20
20
|
Command
|
|
@@ -77,4 +77,4 @@ var zeroGoalCommand = new Command().name("goal").description("Manage the current
|
|
|
77
77
|
export {
|
|
78
78
|
zeroGoalCommand
|
|
79
79
|
};
|
|
80
|
-
//# sourceMappingURL=goal-
|
|
80
|
+
//# sourceMappingURL=goal-TSNIPDUC.js.map
|
|
@@ -11,12 +11,12 @@ import {
|
|
|
11
11
|
getHostedSiteFiles,
|
|
12
12
|
hostedArtifactKindSchema,
|
|
13
13
|
prepareHostedSite
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-MFO54L7D.js";
|
|
15
15
|
import "./chunk-LTDQISD7.js";
|
|
16
16
|
import {
|
|
17
17
|
source_default,
|
|
18
18
|
withErrorHandler
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-6R4HTQSH.js";
|
|
20
20
|
import "./chunk-LRHXR7JT.js";
|
|
21
21
|
import {
|
|
22
22
|
Command
|
|
@@ -548,4 +548,4 @@ Notes:
|
|
|
548
548
|
export {
|
|
549
549
|
zeroHostCommand
|
|
550
550
|
};
|
|
551
|
-
//# sourceMappingURL=host-
|
|
551
|
+
//# sourceMappingURL=host-T24ERN32.js.map
|
package/index.js
CHANGED
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
renderRunCreated,
|
|
37
37
|
require_dist,
|
|
38
38
|
showNextSteps
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-7BHKM63H.js";
|
|
40
40
|
import {
|
|
41
41
|
Kn,
|
|
42
42
|
uo
|
|
@@ -74,7 +74,7 @@ import {
|
|
|
74
74
|
prepareStorage,
|
|
75
75
|
searchLogs,
|
|
76
76
|
volumeConfigSchema
|
|
77
|
-
} from "./chunk-
|
|
77
|
+
} from "./chunk-MFO54L7D.js";
|
|
78
78
|
import "./chunk-LTDQISD7.js";
|
|
79
79
|
import {
|
|
80
80
|
ApiRequestError,
|
|
@@ -88,10 +88,10 @@ import {
|
|
|
88
88
|
saveConfig,
|
|
89
89
|
source_default,
|
|
90
90
|
withErrorHandler
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-6R4HTQSH.js";
|
|
92
92
|
import {
|
|
93
93
|
configureGlobalProxyFromEnv
|
|
94
|
-
} from "./chunk-
|
|
94
|
+
} from "./chunk-YHR4HVAA.js";
|
|
95
95
|
import "./chunk-LRHXR7JT.js";
|
|
96
96
|
import {
|
|
97
97
|
Command,
|
|
@@ -429,7 +429,7 @@ function getConfigPath() {
|
|
|
429
429
|
return join(os.homedir(), ".vm0", "config.json");
|
|
430
430
|
}
|
|
431
431
|
var infoCommand = new Command().name("info").description("Display environment and debug information").action(async () => {
|
|
432
|
-
console.log(source_default.bold(`VM0 CLI v${"9.
|
|
432
|
+
console.log(source_default.bold(`VM0 CLI v${"9.240.0"}`));
|
|
433
433
|
console.log();
|
|
434
434
|
const config = await loadConfig();
|
|
435
435
|
const hasEnvToken = !!process.env.VM0_TOKEN;
|
|
@@ -1132,7 +1132,7 @@ var composeCommand = new Command().name("compose").description("Create or update
|
|
|
1132
1132
|
options.autoUpdate = false;
|
|
1133
1133
|
}
|
|
1134
1134
|
if (options.autoUpdate !== false) {
|
|
1135
|
-
await startSilentUpgrade("9.
|
|
1135
|
+
await startSilentUpgrade("9.240.0");
|
|
1136
1136
|
}
|
|
1137
1137
|
try {
|
|
1138
1138
|
const { config, agentName, agent, basePath } = await loadAndValidateConfig(resolvedConfigFile);
|
|
@@ -1229,7 +1229,7 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
|
|
|
1229
1229
|
withErrorHandler(
|
|
1230
1230
|
async (identifier, prompt, options) => {
|
|
1231
1231
|
if (options.autoUpdate !== false) {
|
|
1232
|
-
await startSilentUpgrade("9.
|
|
1232
|
+
await startSilentUpgrade("9.240.0");
|
|
1233
1233
|
}
|
|
1234
1234
|
const { name, version } = parseIdentifier(identifier);
|
|
1235
1235
|
let composeId;
|
|
@@ -3094,13 +3094,13 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
|
|
|
3094
3094
|
if (latestVersion === null) {
|
|
3095
3095
|
throw new Error("Could not check for updates. Please try again later.");
|
|
3096
3096
|
}
|
|
3097
|
-
if (latestVersion === "9.
|
|
3098
|
-
console.log(source_default.green(`\u2713 Already up to date (${"9.
|
|
3097
|
+
if (latestVersion === "9.240.0") {
|
|
3098
|
+
console.log(source_default.green(`\u2713 Already up to date (${"9.240.0"})`));
|
|
3099
3099
|
return;
|
|
3100
3100
|
}
|
|
3101
3101
|
console.log(
|
|
3102
3102
|
source_default.yellow(
|
|
3103
|
-
`Current version: ${"9.
|
|
3103
|
+
`Current version: ${"9.240.0"} -> Latest version: ${latestVersion}`
|
|
3104
3104
|
)
|
|
3105
3105
|
);
|
|
3106
3106
|
console.log();
|
|
@@ -3127,7 +3127,7 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
|
|
|
3127
3127
|
const success = await performUpgrade(packageManager);
|
|
3128
3128
|
if (success) {
|
|
3129
3129
|
console.log(
|
|
3130
|
-
source_default.green(`\u2713 Upgraded from ${"9.
|
|
3130
|
+
source_default.green(`\u2713 Upgraded from ${"9.240.0"} to ${latestVersion}`)
|
|
3131
3131
|
);
|
|
3132
3132
|
return;
|
|
3133
3133
|
}
|
|
@@ -3194,7 +3194,7 @@ var whoamiCommand = new Command().name("whoami").description("Show current ident
|
|
|
3194
3194
|
|
|
3195
3195
|
// src/index.ts
|
|
3196
3196
|
var program = new Command();
|
|
3197
|
-
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.
|
|
3197
|
+
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.240.0");
|
|
3198
3198
|
program.addCommand(authCommand);
|
|
3199
3199
|
program.addCommand(infoCommand);
|
|
3200
3200
|
program.addCommand(composeCommand);
|