@vm0/cli 9.125.7 → 9.126.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/{chunk-JJFBKM2R.js → chunk-QCBJS3R3.js} +68 -41
- package/{chunk-JJFBKM2R.js.map → chunk-QCBJS3R3.js.map} +1 -1
- package/index.js +16 -13
- package/index.js.map +1 -1
- package/package.json +1 -1
- package/zero.js +8 -6
- package/zero.js.map +1 -1
|
@@ -73642,7 +73642,7 @@ if (DSN) {
|
|
|
73642
73642
|
init2({
|
|
73643
73643
|
dsn: DSN,
|
|
73644
73644
|
environment: process.env.SENTRY_ENVIRONMENT ?? "production",
|
|
73645
|
-
release: "9.
|
|
73645
|
+
release: "9.126.1",
|
|
73646
73646
|
sendDefaultPii: false,
|
|
73647
73647
|
tracesSampleRate: 0,
|
|
73648
73648
|
shutdownTimeout: 500,
|
|
@@ -73661,7 +73661,7 @@ if (DSN) {
|
|
|
73661
73661
|
}
|
|
73662
73662
|
});
|
|
73663
73663
|
setContext("cli", {
|
|
73664
|
-
version: "9.
|
|
73664
|
+
version: "9.126.1",
|
|
73665
73665
|
command: process.argv.slice(2).join(" ")
|
|
73666
73666
|
});
|
|
73667
73667
|
setContext("runtime", {
|
|
@@ -110037,6 +110037,7 @@ var networkLogEntrySchema = external_exports.object({
|
|
|
110037
110037
|
firewall_permission: external_exports.string().optional(),
|
|
110038
110038
|
firewall_rule_match: external_exports.string().optional(),
|
|
110039
110039
|
firewall_params: external_exports.record(external_exports.string(), external_exports.string()).optional(),
|
|
110040
|
+
firewall_billable: external_exports.boolean().optional(),
|
|
110040
110041
|
firewall_error: external_exports.string().optional(),
|
|
110041
110042
|
auth_resolved_secrets: external_exports.array(external_exports.string()).optional(),
|
|
110042
110043
|
auth_refreshed_connectors: external_exports.array(external_exports.string()).optional(),
|
|
@@ -112167,7 +112168,8 @@ var storedExecutionContextSchema = external_exports.object({
|
|
|
112167
112168
|
// VM profile for resource allocation (e.g., "vm0/default")
|
|
112168
112169
|
experimentalProfile: external_exports.string().optional(),
|
|
112169
112170
|
// Feature flags evaluated at job creation time (all switch states for user/org)
|
|
112170
|
-
featureFlags: external_exports.record(external_exports.string(), external_exports.boolean()).optional()
|
|
112171
|
+
featureFlags: external_exports.record(external_exports.string(), external_exports.boolean()).optional(),
|
|
112172
|
+
billableFirewalls: external_exports.array(external_exports.string()).optional()
|
|
112171
112173
|
});
|
|
112172
112174
|
var executionContextSchema = external_exports.object({
|
|
112173
112175
|
runId: external_exports.uuid(),
|
|
@@ -112211,7 +112213,8 @@ var executionContextSchema = external_exports.object({
|
|
|
112211
112213
|
// VM profile for resource allocation (e.g., "vm0/default")
|
|
112212
112214
|
experimentalProfile: external_exports.string().optional(),
|
|
112213
112215
|
// Feature flags evaluated at job creation time (all switch states for user/org)
|
|
112214
|
-
featureFlags: external_exports.record(external_exports.string(), external_exports.boolean()).optional()
|
|
112216
|
+
featureFlags: external_exports.record(external_exports.string(), external_exports.boolean()).optional(),
|
|
112217
|
+
billableFirewalls: external_exports.array(external_exports.string()).optional()
|
|
112215
112218
|
});
|
|
112216
112219
|
var runnersJobClaimContract = c13.router({
|
|
112217
112220
|
claim: {
|
|
@@ -115929,29 +115932,35 @@ var zeroPhoneSetupContract = c55.router({
|
|
|
115929
115932
|
// ../../packages/core/src/contracts/zero-uploads.ts
|
|
115930
115933
|
init_esm_shims();
|
|
115931
115934
|
var c56 = initContract();
|
|
115932
|
-
var
|
|
115935
|
+
var prepareRequestSchema = external_exports.object({
|
|
115936
|
+
filename: external_exports.string().min(1).max(255),
|
|
115937
|
+
contentType: external_exports.string().min(1).max(200),
|
|
115938
|
+
size: external_exports.number().int().nonnegative()
|
|
115939
|
+
});
|
|
115940
|
+
var prepareResponseSchema = external_exports.object({
|
|
115933
115941
|
id: external_exports.string(),
|
|
115934
115942
|
filename: external_exports.string(),
|
|
115935
115943
|
contentType: external_exports.string(),
|
|
115936
115944
|
size: external_exports.number(),
|
|
115945
|
+
/** Presigned PUT URL — browser uploads the file body here directly. */
|
|
115946
|
+
uploadUrl: external_exports.string().url(),
|
|
115947
|
+
/** Presigned GET URL returned to the app after upload succeeds. */
|
|
115937
115948
|
url: external_exports.string().url()
|
|
115938
115949
|
});
|
|
115939
115950
|
var zeroUploadsContract = c56.router({
|
|
115940
|
-
|
|
115951
|
+
prepare: {
|
|
115941
115952
|
method: "POST",
|
|
115942
|
-
path: "/api/zero/uploads",
|
|
115953
|
+
path: "/api/zero/uploads/prepare",
|
|
115943
115954
|
headers: authHeadersSchema,
|
|
115944
|
-
|
|
115945
|
-
body: c56.type(),
|
|
115955
|
+
body: prepareRequestSchema,
|
|
115946
115956
|
responses: {
|
|
115947
|
-
200:
|
|
115957
|
+
200: prepareResponseSchema,
|
|
115948
115958
|
400: apiErrorSchema,
|
|
115949
115959
|
401: apiErrorSchema,
|
|
115950
115960
|
403: apiErrorSchema,
|
|
115951
|
-
413: apiErrorSchema,
|
|
115952
115961
|
500: apiErrorSchema
|
|
115953
115962
|
},
|
|
115954
|
-
summary: "
|
|
115963
|
+
summary: "Prepare a direct-to-R2 upload"
|
|
115955
115964
|
}
|
|
115956
115965
|
});
|
|
115957
115966
|
|
|
@@ -116388,12 +116397,6 @@ var FEATURE_SWITCHES = {
|
|
|
116388
116397
|
enabled: true,
|
|
116389
116398
|
enabledOrgIdHashes: STAFF_ORG_ID_HASHES
|
|
116390
116399
|
},
|
|
116391
|
-
["redeemCode" /* RedeemCode */]: {
|
|
116392
|
-
maintainer: "yuma@vm0.ai",
|
|
116393
|
-
description: "Show redeem-code gift icon and dialog in the agent chat page header",
|
|
116394
|
-
enabled: false,
|
|
116395
|
-
enabledOrgIdHashes: STAFF_ORG_ID_HASHES
|
|
116396
|
-
},
|
|
116397
116400
|
["nanoBananaConnector" /* NanoBananaConnector */]: {
|
|
116398
116401
|
maintainer: "liangyou@vm0.ai",
|
|
116399
116402
|
description: "Show the Nano Banana (Google Gemini image generation) platform-managed connector",
|
|
@@ -117787,6 +117790,17 @@ async function downloadWebFile(fileId, outPath) {
|
|
|
117787
117790
|
const size = contentLengthHeader ? Number(contentLengthHeader) : 0;
|
|
117788
117791
|
return { path: outPath, mimetype, size };
|
|
117789
117792
|
}
|
|
117793
|
+
async function parseErrorBody(response, fallback) {
|
|
117794
|
+
let message = `${fallback} (HTTP ${response.status})`;
|
|
117795
|
+
let code = "UNKNOWN";
|
|
117796
|
+
try {
|
|
117797
|
+
const body = await response.json();
|
|
117798
|
+
if (body.error?.message) message = body.error.message;
|
|
117799
|
+
if (body.error?.code) code = body.error.code;
|
|
117800
|
+
} catch {
|
|
117801
|
+
}
|
|
117802
|
+
return { message, code };
|
|
117803
|
+
}
|
|
117790
117804
|
async function uploadWebFile(localPath, options) {
|
|
117791
117805
|
const stats = statSync(localPath);
|
|
117792
117806
|
if (!stats.isFile()) {
|
|
@@ -117803,35 +117817,48 @@ async function uploadWebFile(localPath, options) {
|
|
|
117803
117817
|
}
|
|
117804
117818
|
const filename = basename2(localPath);
|
|
117805
117819
|
const contentType = options?.contentType ?? inferContentType(localPath);
|
|
117806
|
-
const
|
|
117807
|
-
|
|
117808
|
-
|
|
117809
|
-
formData.append("file", blob, filename);
|
|
117810
|
-
const url2 = new URL("/api/zero/uploads", baseUrl);
|
|
117811
|
-
const headers = {
|
|
117812
|
-
Authorization: `Bearer ${token}`
|
|
117820
|
+
const prepareHeaders = {
|
|
117821
|
+
Authorization: `Bearer ${token}`,
|
|
117822
|
+
"Content-Type": "application/json"
|
|
117813
117823
|
};
|
|
117814
117824
|
const bypassSecret = process.env.VERCEL_AUTOMATION_BYPASS_SECRET;
|
|
117815
117825
|
if (bypassSecret) {
|
|
117816
|
-
|
|
117826
|
+
prepareHeaders["x-vercel-protection-bypass"] = bypassSecret;
|
|
117817
117827
|
}
|
|
117818
|
-
const
|
|
117828
|
+
const prepareUrl = new URL("/api/zero/uploads/prepare", baseUrl);
|
|
117829
|
+
const prepareRes = await fetch(prepareUrl, {
|
|
117819
117830
|
method: "POST",
|
|
117820
|
-
headers,
|
|
117821
|
-
body:
|
|
117831
|
+
headers: prepareHeaders,
|
|
117832
|
+
body: JSON.stringify({ filename, contentType, size: stats.size })
|
|
117822
117833
|
});
|
|
117823
|
-
if (!
|
|
117824
|
-
|
|
117825
|
-
|
|
117826
|
-
|
|
117827
|
-
|
|
117828
|
-
|
|
117829
|
-
if (body.error?.code) code = body.error.code;
|
|
117830
|
-
} catch {
|
|
117831
|
-
}
|
|
117832
|
-
throw new ApiRequestError(message, code, response.status);
|
|
117834
|
+
if (!prepareRes.ok) {
|
|
117835
|
+
const { message, code } = await parseErrorBody(
|
|
117836
|
+
prepareRes,
|
|
117837
|
+
"Failed to prepare upload"
|
|
117838
|
+
);
|
|
117839
|
+
throw new ApiRequestError(message, code, prepareRes.status);
|
|
117833
117840
|
}
|
|
117834
|
-
|
|
117841
|
+
const prepared = await prepareRes.json();
|
|
117842
|
+
const bytes = readFileSync3(localPath);
|
|
117843
|
+
const putRes = await fetch(prepared.uploadUrl, {
|
|
117844
|
+
method: "PUT",
|
|
117845
|
+
headers: { "Content-Type": contentType },
|
|
117846
|
+
body: new Uint8Array(bytes)
|
|
117847
|
+
});
|
|
117848
|
+
if (!putRes.ok) {
|
|
117849
|
+
throw new ApiRequestError(
|
|
117850
|
+
`Failed to upload file to storage (HTTP ${putRes.status})`,
|
|
117851
|
+
"UPLOAD_FAILED",
|
|
117852
|
+
putRes.status
|
|
117853
|
+
);
|
|
117854
|
+
}
|
|
117855
|
+
return {
|
|
117856
|
+
id: prepared.id,
|
|
117857
|
+
filename: prepared.filename,
|
|
117858
|
+
contentType: prepared.contentType,
|
|
117859
|
+
size: prepared.size,
|
|
117860
|
+
url: prepared.url
|
|
117861
|
+
};
|
|
117835
117862
|
}
|
|
117836
117863
|
|
|
117837
117864
|
// src/lib/utils/prompt-utils.ts
|
|
@@ -119006,4 +119033,4 @@ undici/lib/web/fetch/body.js:
|
|
|
119006
119033
|
undici/lib/web/websocket/frame.js:
|
|
119007
119034
|
(*! ws. MIT License. Einar Otto Stangvik <einaros@gmail.com> *)
|
|
119008
119035
|
*/
|
|
119009
|
-
//# sourceMappingURL=chunk-
|
|
119036
|
+
//# sourceMappingURL=chunk-QCBJS3R3.js.map
|