@vm0/cli 9.209.1 → 9.209.3

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 CHANGED
@@ -74,7 +74,7 @@ import {
74
74
  uo,
75
75
  volumeConfigSchema,
76
76
  withErrorHandler
77
- } from "./chunk-E4QFFTUC.js";
77
+ } from "./chunk-O6UJMPWI.js";
78
78
  import {
79
79
  external_exports
80
80
  } from "./chunk-S3DAXIKY.js";
@@ -411,7 +411,7 @@ function getConfigPath() {
411
411
  return join(os.homedir(), ".vm0", "config.json");
412
412
  }
413
413
  var infoCommand = new Command().name("info").description("Display environment and debug information").action(async () => {
414
- console.log(source_default.bold(`VM0 CLI v${"9.209.1"}`));
414
+ console.log(source_default.bold(`VM0 CLI v${"9.209.3"}`));
415
415
  console.log();
416
416
  const config = await loadConfig();
417
417
  const hasEnvToken = !!process.env.VM0_TOKEN;
@@ -1113,7 +1113,7 @@ var composeCommand = new Command().name("compose").description("Create or update
1113
1113
  options.autoUpdate = false;
1114
1114
  }
1115
1115
  if (options.autoUpdate !== false) {
1116
- await startSilentUpgrade("9.209.1");
1116
+ await startSilentUpgrade("9.209.3");
1117
1117
  }
1118
1118
  try {
1119
1119
  const { config, agentName, agent, basePath } = await loadAndValidateConfig(resolvedConfigFile);
@@ -1210,7 +1210,7 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
1210
1210
  withErrorHandler(
1211
1211
  async (identifier, prompt, options) => {
1212
1212
  if (options.autoUpdate !== false) {
1213
- await startSilentUpgrade("9.209.1");
1213
+ await startSilentUpgrade("9.209.3");
1214
1214
  }
1215
1215
  const { name, version } = parseIdentifier(identifier);
1216
1216
  let composeId;
@@ -3016,13 +3016,13 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
3016
3016
  if (latestVersion === null) {
3017
3017
  throw new Error("Could not check for updates. Please try again later.");
3018
3018
  }
3019
- if (latestVersion === "9.209.1") {
3020
- console.log(source_default.green(`\u2713 Already up to date (${"9.209.1"})`));
3019
+ if (latestVersion === "9.209.3") {
3020
+ console.log(source_default.green(`\u2713 Already up to date (${"9.209.3"})`));
3021
3021
  return;
3022
3022
  }
3023
3023
  console.log(
3024
3024
  source_default.yellow(
3025
- `Current version: ${"9.209.1"} -> Latest version: ${latestVersion}`
3025
+ `Current version: ${"9.209.3"} -> Latest version: ${latestVersion}`
3026
3026
  )
3027
3027
  );
3028
3028
  console.log();
@@ -3049,7 +3049,7 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
3049
3049
  const success = await performUpgrade(packageManager);
3050
3050
  if (success) {
3051
3051
  console.log(
3052
- source_default.green(`\u2713 Upgraded from ${"9.209.1"} to ${latestVersion}`)
3052
+ source_default.green(`\u2713 Upgraded from ${"9.209.3"} to ${latestVersion}`)
3053
3053
  );
3054
3054
  return;
3055
3055
  }
@@ -3116,7 +3116,7 @@ var whoamiCommand = new Command().name("whoami").description("Show current ident
3116
3116
 
3117
3117
  // src/index.ts
3118
3118
  var program = new Command();
3119
- program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.209.1");
3119
+ program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.209.3");
3120
3120
  program.addCommand(authCommand);
3121
3121
  program.addCommand(infoCommand);
3122
3122
  program.addCommand(composeCommand);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vm0/cli",
3
- "version": "9.209.1",
3
+ "version": "9.209.3",
4
4
  "description": "CLI application",
5
5
  "repository": {
6
6
  "type": "git",
package/zero.js CHANGED
@@ -178,7 +178,7 @@ import {
178
178
  uploadWebFile,
179
179
  upsertZeroOrgModelProvider,
180
180
  withErrorHandler
181
- } from "./chunk-E4QFFTUC.js";
181
+ } from "./chunk-O6UJMPWI.js";
182
182
  import {
183
183
  CONNECTOR_TYPES,
184
184
  CONNECTOR_TYPE_KEYS,
@@ -13279,6 +13279,8 @@ ${formatRegistryListing(templates, "presentation templates")}`;
13279
13279
  "Produce exactly the requested slide count. Do not let a template's reference example or preview slide count override the requested count.",
13280
13280
  "Before authoring, make an internal slide plan with exactly the requested count and map each slide to a narrative role plus a selected template layout or device.",
13281
13281
  "Adapt the selected template to the requested slide count: for shorter decks, merge or omit lower-priority content roles; for longer decks, split dense sections into multiple focused slides or reuse layout patterns with different substantive content. Do not add decorative, duplicate, or empty filler slides.",
13282
+ "Use selected template references only for structure, layout devices, spacing, and visual language. Do not inherit or continue any reference deck's sample subject, sample story, sample copy, sample metrics, preview imagery, or media seed names.",
13283
+ "Derive every presentation image/media choice from the user's requested topic, story, source material, or cited facts.",
13282
13284
  "Before laying out slides, establish the deck's arc: the opening problem or question, how it develops, and what conclusion lands; every slide should serve a clear narrative role in that arc.",
13283
13285
  "Vary slide forms across the deck \u2014 full-bleed statement, evidence with data, pull quote, section break, summary \u2014 and avoid defaulting every slide to title-plus-bullets.",
13284
13286
  "Each slide carries one idea; prefer a single strong statement over a list, and never exceed three bullets on any slide."
@@ -14483,13 +14485,13 @@ init_esm_shims();
14483
14485
 
14484
14486
  // src/lib/host/publish-static-site.ts
14485
14487
  init_esm_shims();
14486
- import { readFile as readFile3 } from "fs/promises";
14487
14488
 
14488
14489
  // src/lib/host/static-site.ts
14489
14490
  init_esm_shims();
14490
14491
  import { createHash } from "crypto";
14491
14492
  import { readdir, readFile as readFile2, stat } from "fs/promises";
14492
14493
  import { extname as extname4, relative, resolve, sep, dirname, posix } from "path";
14494
+ var DEFAULT_HOSTED_SITE_ROBOTS_TXT = "User-agent: *\nDisallow: /\n";
14493
14495
  var MIME_BY_EXTENSION4 = {
14494
14496
  ".html": "text/html; charset=utf-8",
14495
14497
  ".htm": "text/html; charset=utf-8",
@@ -14615,6 +14617,24 @@ async function hashFile(path2) {
14615
14617
  const bytes = await readFile2(path2);
14616
14618
  return createHash("sha256").update(bytes).digest("hex");
14617
14619
  }
14620
+ function textFile(path2, content) {
14621
+ const bytes = new TextEncoder().encode(content);
14622
+ return {
14623
+ content: bytes,
14624
+ path: path2,
14625
+ size: bytes.byteLength,
14626
+ sha256: createHash("sha256").update(bytes).digest("hex"),
14627
+ contentType: inferContentType4(path2)
14628
+ };
14629
+ }
14630
+ function ensureDefaultRobots(files, options) {
14631
+ if (options.defaultRobots !== "disallow-all" || files.some((file) => {
14632
+ return file.path === "/robots.txt";
14633
+ })) {
14634
+ return files;
14635
+ }
14636
+ return [...files, textFile("/robots.txt", DEFAULT_HOSTED_SITE_ROBOTS_TXT)];
14637
+ }
14618
14638
  async function walk(root, dir, files) {
14619
14639
  const entries = await readdir(dir, { withFileTypes: true });
14620
14640
  for (const entry of entries) {
@@ -14652,6 +14672,9 @@ async function assertReferencesExist(files) {
14652
14672
  if (!shouldValidateReferences(ext)) {
14653
14673
  continue;
14654
14674
  }
14675
+ if (!file.absolutePath) {
14676
+ throw new Error(`Hosted-site file has no source: ${file.path}`);
14677
+ }
14655
14678
  const text = await readFile2(file.absolutePath, "utf8");
14656
14679
  const references = collectReferences(ext, text);
14657
14680
  for (const reference of references) {
@@ -14670,7 +14693,7 @@ async function assertReferencesExist(files) {
14670
14693
  }
14671
14694
  }
14672
14695
  }
14673
- async function scanStaticSite(rootPath) {
14696
+ async function scanStaticSite(rootPath, options = {}) {
14674
14697
  const root = resolve(rootPath);
14675
14698
  const rootStat = await stat(root);
14676
14699
  if (!rootStat.isDirectory()) {
@@ -14684,17 +14707,32 @@ async function scanStaticSite(rootPath) {
14684
14707
  throw new Error("Hosted site directory must include index.html");
14685
14708
  }
14686
14709
  await assertReferencesExist(files);
14710
+ const publishFiles = [...ensureDefaultRobots(files, options)];
14687
14711
  return {
14688
14712
  root,
14689
- files: files.sort((a, b) => {
14713
+ files: publishFiles.sort((a, b) => {
14690
14714
  return a.path.localeCompare(b.path);
14691
14715
  })
14692
14716
  };
14693
14717
  }
14718
+ async function readStaticSiteFile(file) {
14719
+ if (file.content) {
14720
+ return file.content;
14721
+ }
14722
+ if (!file.absolutePath) {
14723
+ throw new Error(`Hosted-site file has no source: ${file.path}`);
14724
+ }
14725
+ const bytes = await readFile2(file.absolutePath);
14726
+ return new Uint8Array(bytes);
14727
+ }
14694
14728
 
14695
14729
  // src/lib/host/publish-static-site.ts
14696
14730
  async function publishStaticSite(options) {
14697
- const scan = await scanStaticSite(options.dir);
14731
+ const artifactKind = options.artifactKind ?? "hosted-site";
14732
+ const scan = await scanStaticSite(
14733
+ options.dir,
14734
+ artifactKind === "hosted-site" ? { defaultRobots: "disallow-all" } : {}
14735
+ );
14698
14736
  const totalSize = scan.files.reduce((sum, file) => {
14699
14737
  return sum + file.size;
14700
14738
  }, 0);
@@ -14705,7 +14743,7 @@ async function publishStaticSite(options) {
14705
14743
  const prepared = await prepareHostedSite({
14706
14744
  site: options.site,
14707
14745
  ...options.slugSuffix !== void 0 && { slugSuffix: options.slugSuffix },
14708
- artifactKind: options.artifactKind ?? "hosted-site",
14746
+ artifactKind,
14709
14747
  spaFallback: Boolean(options.spaFallback),
14710
14748
  files: scan.files.map((file) => {
14711
14749
  return {
@@ -14728,7 +14766,7 @@ async function publishStaticSite(options) {
14728
14766
  throw new Error(`Missing upload URL for ${file.path}`);
14729
14767
  }
14730
14768
  options.onProgress?.({ phase: "uploading", path: file.path });
14731
- const bytes = await readFile3(file.absolutePath);
14769
+ const bytes = await readStaticSiteFile(file);
14732
14770
  const response = await fetch(uploadUrl, {
14733
14771
  method: "PUT",
14734
14772
  headers: { "Content-Type": file.contentType },
@@ -16105,7 +16143,7 @@ function registerZeroCommands(prog, commands) {
16105
16143
  var program = new Command();
16106
16144
  program.name("zero").description(
16107
16145
  "Zero CLI \u2014 interact with the zero platform from inside the sandbox"
16108
- ).version("9.209.1").addHelpText("after", () => {
16146
+ ).version("9.209.3").addHelpText("after", () => {
16109
16147
  return buildZeroHelpText();
16110
16148
  });
16111
16149
  if (process.argv[1]?.endsWith("zero.js") || process.argv[1]?.endsWith("zero.ts") || process.argv[1]?.endsWith("zero")) {