@vm0/cli 9.162.2 → 9.163.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-XJJ2UVRQ.js → chunk-SOKXIK7S.js} +10 -24
- package/{chunk-XJJ2UVRQ.js.map → chunk-SOKXIK7S.js.map} +1 -1
- package/index.js +9 -9
- package/package.json +1 -1
- package/zero.js +150 -11
- package/zero.js.map +1 -1
package/index.js
CHANGED
|
@@ -68,7 +68,7 @@ import {
|
|
|
68
68
|
source_default,
|
|
69
69
|
volumeConfigSchema,
|
|
70
70
|
withErrorHandler
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-SOKXIK7S.js";
|
|
72
72
|
import {
|
|
73
73
|
__toESM,
|
|
74
74
|
init_esm_shims
|
|
@@ -387,7 +387,7 @@ function getConfigPath() {
|
|
|
387
387
|
return join(os.homedir(), ".vm0", "config.json");
|
|
388
388
|
}
|
|
389
389
|
var infoCommand = new Command().name("info").description("Display environment and debug information").action(async () => {
|
|
390
|
-
console.log(source_default.bold(`VM0 CLI v${"9.
|
|
390
|
+
console.log(source_default.bold(`VM0 CLI v${"9.163.1"}`));
|
|
391
391
|
console.log();
|
|
392
392
|
const config = await loadConfig();
|
|
393
393
|
const hasEnvToken = !!process.env.VM0_TOKEN;
|
|
@@ -4280,7 +4280,7 @@ var composeCommand = new Command().name("compose").description("Create or update
|
|
|
4280
4280
|
options.autoUpdate = false;
|
|
4281
4281
|
}
|
|
4282
4282
|
if (options.autoUpdate !== false) {
|
|
4283
|
-
await startSilentUpgrade("9.
|
|
4283
|
+
await startSilentUpgrade("9.163.1");
|
|
4284
4284
|
}
|
|
4285
4285
|
try {
|
|
4286
4286
|
let result;
|
|
@@ -4372,7 +4372,7 @@ var mainRunCommand = new Command().name("run").description("Run an agent").argum
|
|
|
4372
4372
|
withErrorHandler(
|
|
4373
4373
|
async (identifier, prompt, options) => {
|
|
4374
4374
|
if (options.autoUpdate !== false) {
|
|
4375
|
-
await startSilentUpgrade("9.
|
|
4375
|
+
await startSilentUpgrade("9.163.1");
|
|
4376
4376
|
}
|
|
4377
4377
|
const { name, version } = parseIdentifier(identifier);
|
|
4378
4378
|
let composeId;
|
|
@@ -6165,13 +6165,13 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
|
|
|
6165
6165
|
if (latestVersion === null) {
|
|
6166
6166
|
throw new Error("Could not check for updates. Please try again later.");
|
|
6167
6167
|
}
|
|
6168
|
-
if (latestVersion === "9.
|
|
6169
|
-
console.log(source_default.green(`\u2713 Already up to date (${"9.
|
|
6168
|
+
if (latestVersion === "9.163.1") {
|
|
6169
|
+
console.log(source_default.green(`\u2713 Already up to date (${"9.163.1"})`));
|
|
6170
6170
|
return;
|
|
6171
6171
|
}
|
|
6172
6172
|
console.log(
|
|
6173
6173
|
source_default.yellow(
|
|
6174
|
-
`Current version: ${"9.
|
|
6174
|
+
`Current version: ${"9.163.1"} -> Latest version: ${latestVersion}`
|
|
6175
6175
|
)
|
|
6176
6176
|
);
|
|
6177
6177
|
console.log();
|
|
@@ -6198,7 +6198,7 @@ var upgradeCommand = new Command().name("upgrade").description("Upgrade vm0 CLI
|
|
|
6198
6198
|
const success = await performUpgrade(packageManager);
|
|
6199
6199
|
if (success) {
|
|
6200
6200
|
console.log(
|
|
6201
|
-
source_default.green(`\u2713 Upgraded from ${"9.
|
|
6201
|
+
source_default.green(`\u2713 Upgraded from ${"9.163.1"} to ${latestVersion}`)
|
|
6202
6202
|
);
|
|
6203
6203
|
return;
|
|
6204
6204
|
}
|
|
@@ -6265,7 +6265,7 @@ var whoamiCommand = new Command().name("whoami").description("Show current ident
|
|
|
6265
6265
|
|
|
6266
6266
|
// src/index.ts
|
|
6267
6267
|
var program = new Command();
|
|
6268
|
-
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.
|
|
6268
|
+
program.name("vm0").description("VM0 CLI - Build and run agents with natural language").version("9.163.1");
|
|
6269
6269
|
program.addCommand(authCommand);
|
|
6270
6270
|
program.addCommand(infoCommand);
|
|
6271
6271
|
program.addCommand(composeCommand);
|
package/package.json
CHANGED
package/zero.js
CHANGED
|
@@ -152,7 +152,7 @@ import {
|
|
|
152
152
|
zeroAgentCustomSkillNameSchema,
|
|
153
153
|
zeroLocalAgentCommand,
|
|
154
154
|
zeroTokenAllowsFeatureSwitch
|
|
155
|
-
} from "./chunk-
|
|
155
|
+
} from "./chunk-SOKXIK7S.js";
|
|
156
156
|
import {
|
|
157
157
|
__toESM,
|
|
158
158
|
init_esm_shims
|
|
@@ -2843,6 +2843,15 @@ var BUILT_IN_GENERATION_COMMANDS = {
|
|
|
2843
2843
|
models: "gpt-4o-mini-tts"
|
|
2844
2844
|
}
|
|
2845
2845
|
};
|
|
2846
|
+
var GENERATION_CONTEXT = {
|
|
2847
|
+
website: {
|
|
2848
|
+
lines: [
|
|
2849
|
+
"Standalone static website artifacts can be authored locally and published with zero host for a public URL.",
|
|
2850
|
+
"zero host is for static directories with index.html; it is not a general deploy system for apps that need a backend, database, worker, or long-running process.",
|
|
2851
|
+
"Existing web app changes should usually follow the project's own build, test, and deploy workflow."
|
|
2852
|
+
]
|
|
2853
|
+
}
|
|
2854
|
+
};
|
|
2846
2855
|
var GENERATION_TYPE_ORDER = [
|
|
2847
2856
|
"image",
|
|
2848
2857
|
"video",
|
|
@@ -2902,6 +2911,9 @@ function getBuiltInProviders(generationType) {
|
|
|
2902
2911
|
function getBuiltInCommand(generationType) {
|
|
2903
2912
|
return BUILT_IN_GENERATION_COMMANDS[generationType] ?? null;
|
|
2904
2913
|
}
|
|
2914
|
+
function getGenerationContext(generationType) {
|
|
2915
|
+
return GENERATION_CONTEXT[generationType] ?? null;
|
|
2916
|
+
}
|
|
2905
2917
|
function getAvailableGenerationTypes() {
|
|
2906
2918
|
const available = /* @__PURE__ */ new Set();
|
|
2907
2919
|
for (const type of CONNECTOR_TYPE_KEYS) {
|
|
@@ -3055,6 +3067,15 @@ function renderBuiltInProvider(generationType) {
|
|
|
3055
3067
|
console.log(` Use: ${provider.command}`);
|
|
3056
3068
|
}
|
|
3057
3069
|
}
|
|
3070
|
+
function renderGenerationContext(generationType) {
|
|
3071
|
+
const context = getGenerationContext(generationType);
|
|
3072
|
+
if (!context) return;
|
|
3073
|
+
console.log("");
|
|
3074
|
+
console.log("Context:");
|
|
3075
|
+
for (const line of context.lines) {
|
|
3076
|
+
console.log(` - ${line}`);
|
|
3077
|
+
}
|
|
3078
|
+
}
|
|
3058
3079
|
function renderText(params) {
|
|
3059
3080
|
const { generationType, agentId, ready, other, showAll } = params;
|
|
3060
3081
|
const label = GENERATION_TYPE_LABELS[generationType];
|
|
@@ -3081,6 +3102,7 @@ function renderText(params) {
|
|
|
3081
3102
|
}
|
|
3082
3103
|
}
|
|
3083
3104
|
renderBuiltInProvider(generationType);
|
|
3105
|
+
renderGenerationContext(generationType);
|
|
3084
3106
|
if (showAll && other.length > 0) {
|
|
3085
3107
|
console.log("");
|
|
3086
3108
|
console.log(`Other ${generationType} generation connectors`);
|
|
@@ -3141,6 +3163,8 @@ var generateCommand = new Command().name("generate").description("Show generatio
|
|
|
3141
3163
|
agentId: agentId ?? null,
|
|
3142
3164
|
choices: ready,
|
|
3143
3165
|
otherCandidates: other,
|
|
3166
|
+
builtInCommand: getBuiltInCommand(generationType),
|
|
3167
|
+
generationContext: getGenerationContext(generationType),
|
|
3144
3168
|
builtInProvider: builtInProviders[0] ?? null,
|
|
3145
3169
|
builtInProviders
|
|
3146
3170
|
},
|
|
@@ -7344,14 +7368,19 @@ import { readFileSync as readFileSync14 } from "fs";
|
|
|
7344
7368
|
init_esm_shims();
|
|
7345
7369
|
var OPEN_DESIGN_REPO = "vm0-ai/open-design";
|
|
7346
7370
|
var OPEN_DESIGN_COMMIT = "d021b04720ace133f1d6133d1487326f5fc28f07";
|
|
7347
|
-
var
|
|
7348
|
-
|
|
7371
|
+
var VM0_REPO = "vm0-ai/vm0";
|
|
7372
|
+
var NOTION_ILLUSTRATION_COMMIT = "12d5aa42de4323c034cfb6e8005c69304dd510e5";
|
|
7373
|
+
var OPEN_DESIGN_REGISTRY_VERSION = `federated:${OPEN_DESIGN_REPO}@${OPEN_DESIGN_COMMIT}`;
|
|
7374
|
+
function sourceRef(repo, commit, path) {
|
|
7349
7375
|
return {
|
|
7350
|
-
repo
|
|
7351
|
-
commit
|
|
7376
|
+
repo,
|
|
7377
|
+
commit,
|
|
7352
7378
|
path
|
|
7353
7379
|
};
|
|
7354
7380
|
}
|
|
7381
|
+
function source(path) {
|
|
7382
|
+
return sourceRef(OPEN_DESIGN_REPO, OPEN_DESIGN_COMMIT, path);
|
|
7383
|
+
}
|
|
7355
7384
|
var OPEN_DESIGN_REGISTRY = [
|
|
7356
7385
|
{
|
|
7357
7386
|
id: "od:skill:data-report",
|
|
@@ -7608,6 +7637,38 @@ var OPEN_DESIGN_REGISTRY = [
|
|
|
7608
7637
|
bestFor: ["phone-framed product mocks", "consumer mobile UI"],
|
|
7609
7638
|
status: "curated",
|
|
7610
7639
|
priority: 34
|
|
7640
|
+
},
|
|
7641
|
+
{
|
|
7642
|
+
id: "vm0:image-style:notion-illustration",
|
|
7643
|
+
kind: "image-style",
|
|
7644
|
+
name: "Notion Illustration",
|
|
7645
|
+
description: "Zero-native illustration style for hand-drawn product spot illustrations with simple ink contours and soft backgrounds.",
|
|
7646
|
+
source: sourceRef(
|
|
7647
|
+
VM0_REPO,
|
|
7648
|
+
NOTION_ILLUSTRATION_COMMIT,
|
|
7649
|
+
".claude/skills/notion-illustration"
|
|
7650
|
+
),
|
|
7651
|
+
targets: ["website", "poster", "presentation", "report"],
|
|
7652
|
+
tags: ["image", "illustration", "notion", "spot", "hand-drawn", "product"],
|
|
7653
|
+
triggers: [
|
|
7654
|
+
"illustration",
|
|
7655
|
+
"notion illustration",
|
|
7656
|
+
"spot illustration",
|
|
7657
|
+
"hand drawn",
|
|
7658
|
+
"product illustration"
|
|
7659
|
+
],
|
|
7660
|
+
bestFor: [
|
|
7661
|
+
"in-app empty states",
|
|
7662
|
+
"gallery previews",
|
|
7663
|
+
"product narrative artwork"
|
|
7664
|
+
],
|
|
7665
|
+
outputKinds: ["image"],
|
|
7666
|
+
primaryOutputKind: "image",
|
|
7667
|
+
executorHints: ["skill-authored", "built-in-image"],
|
|
7668
|
+
previewHint: "image",
|
|
7669
|
+
remixHint: "prompt-with-resource-hints",
|
|
7670
|
+
status: "experimental",
|
|
7671
|
+
priority: 18
|
|
7611
7672
|
}
|
|
7612
7673
|
];
|
|
7613
7674
|
function toOpenDesignTarget(value) {
|
|
@@ -7680,6 +7741,16 @@ function selectOpenDesignCandidates(options) {
|
|
|
7680
7741
|
repo: OPEN_DESIGN_REPO,
|
|
7681
7742
|
commit: OPEN_DESIGN_COMMIT
|
|
7682
7743
|
},
|
|
7744
|
+
sources: [
|
|
7745
|
+
{
|
|
7746
|
+
repo: OPEN_DESIGN_REPO,
|
|
7747
|
+
commit: OPEN_DESIGN_COMMIT
|
|
7748
|
+
},
|
|
7749
|
+
{
|
|
7750
|
+
repo: VM0_REPO,
|
|
7751
|
+
commit: NOTION_ILLUSTRATION_COMMIT
|
|
7752
|
+
}
|
|
7753
|
+
],
|
|
7683
7754
|
candidates: {
|
|
7684
7755
|
skills: selectByKind(
|
|
7685
7756
|
"skill",
|
|
@@ -7698,6 +7769,30 @@ function selectOpenDesignCandidates(options) {
|
|
|
7698
7769
|
options.target,
|
|
7699
7770
|
options.prompt,
|
|
7700
7771
|
limitPerKind
|
|
7772
|
+
),
|
|
7773
|
+
imageStyles: selectByKind(
|
|
7774
|
+
"image-style",
|
|
7775
|
+
options.target,
|
|
7776
|
+
options.prompt,
|
|
7777
|
+
limitPerKind
|
|
7778
|
+
),
|
|
7779
|
+
audioStyles: selectByKind(
|
|
7780
|
+
"audio-style",
|
|
7781
|
+
options.target,
|
|
7782
|
+
options.prompt,
|
|
7783
|
+
limitPerKind
|
|
7784
|
+
),
|
|
7785
|
+
videoTemplates: selectByKind(
|
|
7786
|
+
"video-template",
|
|
7787
|
+
options.target,
|
|
7788
|
+
options.prompt,
|
|
7789
|
+
limitPerKind
|
|
7790
|
+
),
|
|
7791
|
+
bundleTemplates: selectByKind(
|
|
7792
|
+
"bundle-template",
|
|
7793
|
+
options.target,
|
|
7794
|
+
options.prompt,
|
|
7795
|
+
limitPerKind
|
|
7701
7796
|
)
|
|
7702
7797
|
}
|
|
7703
7798
|
};
|
|
@@ -7743,20 +7838,55 @@ function createHtmlArtifactAuthoringPacket(options) {
|
|
|
7743
7838
|
skills: "string[]",
|
|
7744
7839
|
template: "string",
|
|
7745
7840
|
designSystem: "string | null",
|
|
7841
|
+
imageStyle: "string | null",
|
|
7842
|
+
audioStyle: "string | null",
|
|
7843
|
+
videoTemplate: "string | null",
|
|
7844
|
+
bundleTemplate: "string | null",
|
|
7746
7845
|
rationale: "string"
|
|
7747
7846
|
};
|
|
7847
|
+
const artifact = {
|
|
7848
|
+
outputMode: "primary-artifact-with-supporting-assets",
|
|
7849
|
+
primaryArtifact: {
|
|
7850
|
+
kind: options.kind,
|
|
7851
|
+
path: `${outputDir}/index.html`
|
|
7852
|
+
},
|
|
7853
|
+
supportingAssets: [
|
|
7854
|
+
{
|
|
7855
|
+
kind: "image",
|
|
7856
|
+
path: `${outputDir}/assets/`,
|
|
7857
|
+
optional: true
|
|
7858
|
+
},
|
|
7859
|
+
{
|
|
7860
|
+
kind: "audio",
|
|
7861
|
+
path: `${outputDir}/assets/`,
|
|
7862
|
+
optional: true
|
|
7863
|
+
},
|
|
7864
|
+
{
|
|
7865
|
+
kind: "video",
|
|
7866
|
+
path: `${outputDir}/assets/`,
|
|
7867
|
+
optional: true
|
|
7868
|
+
},
|
|
7869
|
+
{
|
|
7870
|
+
kind: "metadata",
|
|
7871
|
+
path: `${outputDir}/metadata.json`,
|
|
7872
|
+
optional: true
|
|
7873
|
+
}
|
|
7874
|
+
],
|
|
7875
|
+
previewKind: "hosted-url",
|
|
7876
|
+
outputDir
|
|
7877
|
+
};
|
|
7748
7878
|
const instructions = [
|
|
7749
7879
|
`# Zero built-in generate ${options.kind}`,
|
|
7750
7880
|
"",
|
|
7751
|
-
"This is
|
|
7881
|
+
"This is a federated generation resource-selection packet for the current agent.",
|
|
7752
7882
|
`Zero is not generating this ${title} on the server. You select resources, resolve them, and author the artifact.`,
|
|
7753
7883
|
"",
|
|
7754
7884
|
"## User Prompt",
|
|
7755
7885
|
options.prompt,
|
|
7756
7886
|
"",
|
|
7757
7887
|
"## Stage 1: Resource Selection",
|
|
7758
|
-
"- Choose
|
|
7759
|
-
"- Select one template, one or more skills,
|
|
7888
|
+
"- Choose generation resources from the bundled federated registry slice below.",
|
|
7889
|
+
"- Select one template, one or more skills, zero or one design system, and optional media/style resources when relevant.",
|
|
7760
7890
|
"- Choose only IDs present in this packet; do not invent registry IDs.",
|
|
7761
7891
|
"- Prefer compatible resources, but the user prompt is the highest-priority signal.",
|
|
7762
7892
|
"- Treat the selection JSON as internal working state, then continue to authoring.",
|
|
@@ -7774,13 +7904,19 @@ function createHtmlArtifactAuthoringPacket(options) {
|
|
|
7774
7904
|
"```",
|
|
7775
7905
|
"",
|
|
7776
7906
|
"## Stage 2: Resolve Selected Resources",
|
|
7777
|
-
"- For every selected resource, fetch or read the referenced
|
|
7907
|
+
"- For every selected resource, fetch or read the referenced source before authoring.",
|
|
7778
7908
|
"- Source refs are pinned as `repo@commit:path`; use the commit in the packet for reproducibility.",
|
|
7779
7909
|
"- For directory refs, inspect the most relevant files such as `SKILL.md`, `DESIGN.md`, `README.md`, tokens, examples, and templates.",
|
|
7780
7910
|
"- If a source file cannot be fetched, state that limitation and fall back to the registry metadata for that resource.",
|
|
7781
7911
|
"",
|
|
7782
7912
|
"## Stage 3: Author Artifact",
|
|
7783
|
-
`Author a production-quality ${title} as a static HTML artifact using the selected
|
|
7913
|
+
`Author a production-quality ${title} as a static HTML artifact using the selected generation resources.`,
|
|
7914
|
+
"",
|
|
7915
|
+
"## Artifact Output Model",
|
|
7916
|
+
`- Primary artifact: \`${artifact.primaryArtifact.kind}\` at \`${artifact.primaryArtifact.path}\`.`,
|
|
7917
|
+
`- Output mode: \`${artifact.outputMode}\`.`,
|
|
7918
|
+
"- Supporting images, audio, video, or metadata may live inside the same output directory when the result needs them.",
|
|
7919
|
+
"- Treat the output directory as a project bundle when multiple media types are generated, while keeping the HTML entry point primary.",
|
|
7784
7920
|
"",
|
|
7785
7921
|
"## Output Contract",
|
|
7786
7922
|
`- Write the artifact under \`${outputDir}/\`.`,
|
|
@@ -7807,6 +7943,8 @@ function createHtmlArtifactAuthoringPacket(options) {
|
|
|
7807
7943
|
}),
|
|
7808
7944
|
"",
|
|
7809
7945
|
"## Verification",
|
|
7946
|
+
"- Use `agent-browser` for browser verification when available. Start with `agent-browser skills get core` if you need command guidance.",
|
|
7947
|
+
"- Prefer `agent-browser` over Playwright, Puppeteer, or installing browser automation dependencies.",
|
|
7810
7948
|
"- Open the HTML locally and verify it is nonblank.",
|
|
7811
7949
|
"- Check that keyboard/click interactions work when present.",
|
|
7812
7950
|
"- Check that text does not overflow or overlap at desktop and mobile viewport sizes.",
|
|
@@ -7824,6 +7962,7 @@ function createHtmlArtifactAuthoringPacket(options) {
|
|
|
7824
7962
|
kind: options.kind,
|
|
7825
7963
|
prompt: options.prompt,
|
|
7826
7964
|
registryVersion: candidateSlice.registryVersion,
|
|
7965
|
+
artifact,
|
|
7827
7966
|
selection: {
|
|
7828
7967
|
candidates: candidateSlice.candidates,
|
|
7829
7968
|
outputSchema: selectionSchema
|
|
@@ -9760,7 +9899,7 @@ function registerZeroCommands(prog, commands) {
|
|
|
9760
9899
|
var program = new Command();
|
|
9761
9900
|
program.name("zero").description(
|
|
9762
9901
|
"Zero CLI \u2014 interact with the zero platform from inside the sandbox"
|
|
9763
|
-
).version("9.
|
|
9902
|
+
).version("9.163.1").addHelpText("after", () => {
|
|
9764
9903
|
return buildZeroHelpText();
|
|
9765
9904
|
});
|
|
9766
9905
|
if (process.argv[1]?.endsWith("zero.js") || process.argv[1]?.endsWith("zero.ts") || process.argv[1]?.endsWith("zero")) {
|