@vm0/cli 4.35.1 → 4.35.2
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 +55 -78
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -13680,7 +13680,6 @@ var executionContextSchema = external_exports.object({
|
|
|
13680
13680
|
secretNames: external_exports.array(external_exports.string()).nullable(),
|
|
13681
13681
|
checkpointId: external_exports.string().uuid().nullable(),
|
|
13682
13682
|
sandboxToken: external_exports.string(),
|
|
13683
|
-
apiUrl: external_exports.string(),
|
|
13684
13683
|
// New fields for E2B parity:
|
|
13685
13684
|
workingDir: external_exports.string(),
|
|
13686
13685
|
storageManifest: storageManifestSchema.nullable(),
|
|
@@ -15048,47 +15047,31 @@ var composeCommand = new Command().name("compose").description("Create or update
|
|
|
15048
15047
|
const instructionsPath = agent.instructions;
|
|
15049
15048
|
const provider = agent.provider;
|
|
15050
15049
|
console.log(`Uploading instructions: ${instructionsPath}`);
|
|
15051
|
-
|
|
15052
|
-
|
|
15053
|
-
|
|
15054
|
-
|
|
15055
|
-
|
|
15056
|
-
|
|
15057
|
-
|
|
15058
|
-
|
|
15059
|
-
|
|
15060
|
-
|
|
15061
|
-
|
|
15062
|
-
);
|
|
15063
|
-
} catch (error43) {
|
|
15064
|
-
console.error(chalk2.red(`\u2717 Failed to upload instructions`));
|
|
15065
|
-
if (error43 instanceof Error) {
|
|
15066
|
-
console.error(chalk2.dim(` ${error43.message}`));
|
|
15067
|
-
}
|
|
15068
|
-
process.exit(1);
|
|
15069
|
-
}
|
|
15050
|
+
const result = await uploadInstructions(
|
|
15051
|
+
agentName,
|
|
15052
|
+
instructionsPath,
|
|
15053
|
+
basePath,
|
|
15054
|
+
provider
|
|
15055
|
+
);
|
|
15056
|
+
console.log(
|
|
15057
|
+
chalk2.green(
|
|
15058
|
+
`\u2713 Instructions ${result.action === "deduplicated" ? "(unchanged)" : "uploaded"}: ${result.versionId.slice(0, 8)}`
|
|
15059
|
+
)
|
|
15060
|
+
);
|
|
15070
15061
|
}
|
|
15071
15062
|
const skillResults = [];
|
|
15072
15063
|
if (agent.skills && Array.isArray(agent.skills)) {
|
|
15073
15064
|
const skillUrls = agent.skills;
|
|
15074
15065
|
console.log(`Uploading ${skillUrls.length} skill(s)...`);
|
|
15075
15066
|
for (const skillUrl of skillUrls) {
|
|
15076
|
-
|
|
15077
|
-
|
|
15078
|
-
|
|
15079
|
-
|
|
15080
|
-
|
|
15081
|
-
|
|
15082
|
-
|
|
15083
|
-
|
|
15084
|
-
);
|
|
15085
|
-
} catch (error43) {
|
|
15086
|
-
console.error(chalk2.red(`\u2717 Failed to upload skill: ${skillUrl}`));
|
|
15087
|
-
if (error43 instanceof Error) {
|
|
15088
|
-
console.error(chalk2.dim(` ${error43.message}`));
|
|
15089
|
-
}
|
|
15090
|
-
process.exit(1);
|
|
15091
|
-
}
|
|
15067
|
+
console.log(chalk2.dim(` Downloading: ${skillUrl}`));
|
|
15068
|
+
const result = await uploadSkill(skillUrl);
|
|
15069
|
+
skillResults.push(result);
|
|
15070
|
+
console.log(
|
|
15071
|
+
chalk2.green(
|
|
15072
|
+
` \u2713 Skill ${result.action === "deduplicated" ? "(unchanged)" : "uploaded"}: ${result.skillName} (${result.versionId.slice(0, 8)})`
|
|
15073
|
+
)
|
|
15074
|
+
);
|
|
15092
15075
|
}
|
|
15093
15076
|
}
|
|
15094
15077
|
const skillSecrets = /* @__PURE__ */ new Map();
|
|
@@ -16065,39 +16048,19 @@ var runCmd = new Command2().name("run").description("Execute an agent").argument
|
|
|
16065
16048
|
if (verbose) {
|
|
16066
16049
|
console.log(chalk5.dim(` Using compose ID: ${identifier}`));
|
|
16067
16050
|
}
|
|
16068
|
-
|
|
16069
|
-
|
|
16070
|
-
|
|
16071
|
-
composeContent = compose.content;
|
|
16072
|
-
} catch (error43) {
|
|
16073
|
-
if (error43 instanceof Error) {
|
|
16074
|
-
console.error(chalk5.red(`\u2717 Compose not found: ${name}`));
|
|
16075
|
-
}
|
|
16076
|
-
process.exit(1);
|
|
16077
|
-
}
|
|
16051
|
+
const compose = await apiClient.getComposeById(name);
|
|
16052
|
+
composeId = compose.id;
|
|
16053
|
+
composeContent = compose.content;
|
|
16078
16054
|
} else {
|
|
16079
16055
|
if (verbose) {
|
|
16080
16056
|
const displayRef = scope ? `${scope}/${name}` : name;
|
|
16081
16057
|
console.log(chalk5.dim(` Resolving agent: ${displayRef}`));
|
|
16082
16058
|
}
|
|
16083
|
-
|
|
16084
|
-
|
|
16085
|
-
|
|
16086
|
-
|
|
16087
|
-
|
|
16088
|
-
console.log(chalk5.dim(` Resolved to compose ID: ${composeId}`));
|
|
16089
|
-
}
|
|
16090
|
-
} catch (error43) {
|
|
16091
|
-
if (error43 instanceof Error) {
|
|
16092
|
-
const displayRef = scope ? `${scope}/${name}` : name;
|
|
16093
|
-
console.error(chalk5.red(`\u2717 Agent not found: ${displayRef}`));
|
|
16094
|
-
console.error(
|
|
16095
|
-
chalk5.dim(
|
|
16096
|
-
" Make sure you've composed the agent with: vm0 compose"
|
|
16097
|
-
)
|
|
16098
|
-
);
|
|
16099
|
-
}
|
|
16100
|
-
process.exit(1);
|
|
16059
|
+
const compose = await apiClient.getComposeByName(name, scope);
|
|
16060
|
+
composeId = compose.id;
|
|
16061
|
+
composeContent = compose.content;
|
|
16062
|
+
if (verbose) {
|
|
16063
|
+
console.log(chalk5.dim(` Resolved to compose ID: ${composeId}`));
|
|
16101
16064
|
}
|
|
16102
16065
|
}
|
|
16103
16066
|
let agentComposeVersionId;
|
|
@@ -16118,14 +16081,8 @@ var runCmd = new Command2().name("run").description("Execute an agent").argument
|
|
|
16118
16081
|
)
|
|
16119
16082
|
);
|
|
16120
16083
|
}
|
|
16121
|
-
} catch
|
|
16122
|
-
|
|
16123
|
-
console.error(chalk5.red(`\u2717 Version not found: ${version2}`));
|
|
16124
|
-
console.error(
|
|
16125
|
-
chalk5.dim(" Make sure the version hash is correct.")
|
|
16126
|
-
);
|
|
16127
|
-
}
|
|
16128
|
-
process.exit(1);
|
|
16084
|
+
} catch {
|
|
16085
|
+
throw new Error(`Version not found: ${version2}`);
|
|
16129
16086
|
}
|
|
16130
16087
|
}
|
|
16131
16088
|
const varNames = extractVarNames(composeContent);
|
|
@@ -16207,6 +16164,11 @@ var runCmd = new Command2().name("run").description("Execute an agent").argument
|
|
|
16207
16164
|
console.error(
|
|
16208
16165
|
chalk5.red("\u2717 Not authenticated. Run: vm0 auth login")
|
|
16209
16166
|
);
|
|
16167
|
+
} else if (error43.message.startsWith("Version not found:")) {
|
|
16168
|
+
console.error(chalk5.red(`\u2717 ${error43.message}`));
|
|
16169
|
+
console.error(
|
|
16170
|
+
chalk5.dim(" Make sure the version hash is correct.")
|
|
16171
|
+
);
|
|
16210
16172
|
} else if (error43.message.includes("not found")) {
|
|
16211
16173
|
console.error(chalk5.red(`\u2717 Agent not found: ${identifier}`));
|
|
16212
16174
|
console.error(
|
|
@@ -16639,7 +16601,11 @@ var pushCommand = new Command4().name("push").description("Push local files to c
|
|
|
16639
16601
|
} catch (error43) {
|
|
16640
16602
|
console.error(chalk7.red("\u2717 Push failed"));
|
|
16641
16603
|
if (error43 instanceof Error) {
|
|
16642
|
-
|
|
16604
|
+
if (error43.message.includes("Not authenticated")) {
|
|
16605
|
+
console.error(chalk7.dim(" Run: vm0 auth login"));
|
|
16606
|
+
} else {
|
|
16607
|
+
console.error(chalk7.dim(` ${error43.message}`));
|
|
16608
|
+
}
|
|
16643
16609
|
}
|
|
16644
16610
|
process.exit(1);
|
|
16645
16611
|
}
|
|
@@ -16752,7 +16718,11 @@ var pullCommand = new Command5().name("pull").description("Pull cloud files to l
|
|
|
16752
16718
|
} catch (error43) {
|
|
16753
16719
|
console.error(chalk9.red("\u2717 Pull failed"));
|
|
16754
16720
|
if (error43 instanceof Error) {
|
|
16755
|
-
|
|
16721
|
+
if (error43.message.includes("Not authenticated")) {
|
|
16722
|
+
console.error(chalk9.dim(" Run: vm0 auth login"));
|
|
16723
|
+
} else {
|
|
16724
|
+
console.error(chalk9.dim(` ${error43.message}`));
|
|
16725
|
+
}
|
|
16756
16726
|
}
|
|
16757
16727
|
process.exit(1);
|
|
16758
16728
|
}
|
|
@@ -16813,7 +16783,11 @@ var statusCommand = new Command6().name("status").description("Show status of cl
|
|
|
16813
16783
|
} catch (error43) {
|
|
16814
16784
|
console.error(chalk10.red("\u2717 Status check failed"));
|
|
16815
16785
|
if (error43 instanceof Error) {
|
|
16816
|
-
|
|
16786
|
+
if (error43.message.includes("Not authenticated")) {
|
|
16787
|
+
console.error(chalk10.dim(" Run: vm0 auth login"));
|
|
16788
|
+
} else {
|
|
16789
|
+
console.error(chalk10.dim(` ${error43.message}`));
|
|
16790
|
+
}
|
|
16817
16791
|
}
|
|
16818
16792
|
process.exit(1);
|
|
16819
16793
|
}
|
|
@@ -17734,7 +17708,7 @@ async function autoPullArtifact(runOutput, artifactDir) {
|
|
|
17734
17708
|
}
|
|
17735
17709
|
var cookCmd = new Command17().name("cook").description("One-click agent preparation and execution from vm0.yaml");
|
|
17736
17710
|
cookCmd.argument("[prompt]", "Prompt for the agent").option("-y, --yes", "Skip confirmation prompts").action(async (prompt, options) => {
|
|
17737
|
-
const shouldExit = await checkAndUpgrade("4.35.
|
|
17711
|
+
const shouldExit = await checkAndUpgrade("4.35.2", prompt);
|
|
17738
17712
|
if (shouldExit) {
|
|
17739
17713
|
process.exit(0);
|
|
17740
17714
|
}
|
|
@@ -18707,7 +18681,10 @@ var setCommand = new Command25().name("set").description("Set your scope slug").
|
|
|
18707
18681
|
let existingScope;
|
|
18708
18682
|
try {
|
|
18709
18683
|
existingScope = await apiClient.getScope();
|
|
18710
|
-
} catch {
|
|
18684
|
+
} catch (error43) {
|
|
18685
|
+
if (!(error43 instanceof Error) || !error43.message.includes("No scope configured")) {
|
|
18686
|
+
throw error43;
|
|
18687
|
+
}
|
|
18711
18688
|
}
|
|
18712
18689
|
let scope;
|
|
18713
18690
|
if (existingScope) {
|
|
@@ -19362,7 +19339,7 @@ var setupGithubCommand = new Command28().name("setup-github").description("Initi
|
|
|
19362
19339
|
|
|
19363
19340
|
// src/index.ts
|
|
19364
19341
|
var program = new Command29();
|
|
19365
|
-
program.name("vm0").description("VM0 CLI - A modern build tool").version("4.35.
|
|
19342
|
+
program.name("vm0").description("VM0 CLI - A modern build tool").version("4.35.2");
|
|
19366
19343
|
program.command("info").description("Display environment information").action(async () => {
|
|
19367
19344
|
console.log(chalk31.bold("System Information:"));
|
|
19368
19345
|
console.log(`Node Version: ${process.version}`);
|