@vm0/cli 9.272.7 → 9.272.9

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.
Files changed (102) hide show
  1. package/{agent-OR54XWKM.js → agent-JDYYCFFO.js} +6 -6
  2. package/{banking-RYRQVHNP.js → banking-MN6JH4W5.js} +4 -4
  3. package/{browser-QFHKWZQZ.js → browser-ZP3U7XUT.js} +4 -4
  4. package/{chat-42JUDAWT.js → chat-6HKZUD3S.js} +5 -5
  5. package/{chunk-TKCI4Y6C.js → chunk-6LWCFOJJ.js} +5 -17
  6. package/{chunk-TKCI4Y6C.js.map → chunk-6LWCFOJJ.js.map} +1 -1
  7. package/{chunk-AUQD6PDJ.js → chunk-ANBQ4XWM.js} +8 -4
  8. package/{chunk-AUQD6PDJ.js.map → chunk-ANBQ4XWM.js.map} +1 -1
  9. package/{chunk-I33UGRYO.js → chunk-CB7OHO7A.js} +2 -2
  10. package/{chunk-SCRSK75J.js → chunk-ERQOEAWS.js} +7 -3
  11. package/{chunk-SCRSK75J.js.map → chunk-ERQOEAWS.js.map} +1 -1
  12. package/{chunk-WDSB4HUQ.js → chunk-GZWZFIXW.js} +2 -2
  13. package/{chunk-7OITCSJK.js → chunk-LMAYGYZK.js} +2 -2
  14. package/{chunk-ULUHZEGW.js → chunk-P24Q7EMQ.js} +2 -2
  15. package/{chunk-EUU32MCA.js → chunk-R645E73Z.js} +2 -2
  16. package/{chunk-V2OXQR2E.js → chunk-WNWWB3WF.js} +8 -2
  17. package/chunk-WNWWB3WF.js.map +1 -0
  18. package/{chunk-LSF542OO.js → chunk-YFOMVTVJ.js} +2 -2
  19. package/{computer-use-SHDFHKFG.js → computer-use-LXSCXHSK.js} +4 -4
  20. package/{connector-JHUSFYKI.js → connector-RVP22ZRZ.js} +7 -7
  21. package/{credit-HQBTHE3H.js → credit-RTSUVDT2.js} +5 -5
  22. package/{developer-support-II7AKXLL.js → developer-support-WWPQYCSV.js} +4 -4
  23. package/{doctor-Q3KRDZSD.js → doctor-LCF4TAOW.js} +5 -5
  24. package/{feishu-DLKFD4ES.js → feishu-I2CSLJWZ.js} +4 -4
  25. package/{finance-WVJ4YSXK.js → finance-DJESBGK6.js} +4 -4
  26. package/{generate-OIGXCKT7.js → generate-KPPLJZDY.js} +97 -34
  27. package/generate-KPPLJZDY.js.map +1 -0
  28. package/{github-OA535CZN.js → github-M3XOPOGW.js} +4 -4
  29. package/{goal-YIUP3XWQ.js → goal-22DFQ4IR.js} +4 -4
  30. package/{host-HF2IRRRU.js → host-7HJZ7B4D.js} +4 -4
  31. package/{logs-MW6DDXIO.js → logs-EW4ILZJ3.js} +6 -6
  32. package/{mail-TOR63WSJ.js → mail-6L6LPKCH.js} +6 -6
  33. package/{maps-ZR2TP5PC.js → maps-JFBDULLB.js} +4 -4
  34. package/{model-YFQVYG7N.js → model-KVWK7LU7.js} +5 -5
  35. package/{model-provider-Z5TE5PGP.js → model-provider-NGEMWSWX.js} +5 -5
  36. package/{org-JUQ3EGS7.js → org-F4C5MUPY.js} +4 -4
  37. package/package.json +1 -1
  38. package/{people-search-OQF7KRHM.js → people-search-LKNHV6SR.js} +4 -4
  39. package/{phone-2YCIE2QH.js → phone-SU4SAXQR.js} +4 -4
  40. package/{preference-AS6HIRYP.js → preference-MRQ5UCKF.js} +4 -4
  41. package/{resource-ZOVEXYKR.js → resource-35YNNBER.js} +4 -4
  42. package/{scrape-ZL6WEVEN.js → scrape-EK5XJ53L.js} +4 -4
  43. package/{search-HX373F2T.js → search-566TALXR.js} +6 -6
  44. package/{secret-F56JZ3SJ.js → secret-2V3YCXFF.js} +4 -4
  45. package/{slack-ZXWXU64N.js → slack-RY4MFK67.js} +4 -4
  46. package/{teams-UJWQ6BYO.js → teams-WD7BYGL7.js} +4 -4
  47. package/{telegram-ACFTFLED.js → telegram-TMT67J54.js} +4 -4
  48. package/{upgrade-N76GQ4GZ.js → upgrade-25IW4Y4P.js} +3 -3
  49. package/{variable-Z26DWCFB.js → variable-RFADYZMT.js} +4 -4
  50. package/{video-2CFWOD2G.js → video-YLNJ2TZU.js} +3 -3
  51. package/{weather-TAYZ6IOF.js → weather-LDVUKOT6.js} +4 -4
  52. package/{web-Y4JKA25B.js → web-QUDPNP6O.js} +4 -4
  53. package/{web-search-5FLMMI3R.js → web-search-VIJGJUE2.js} +4 -4
  54. package/{whoami-QD3APKJC.js → whoami-W4PDJTXV.js} +6 -6
  55. package/{workflow-Y2B7UGNK.js → workflow-2WI4PX7J.js} +5 -5
  56. package/zero.js +43 -43
  57. package/chunk-V2OXQR2E.js.map +0 -1
  58. package/generate-OIGXCKT7.js.map +0 -1
  59. /package/{agent-OR54XWKM.js.map → agent-JDYYCFFO.js.map} +0 -0
  60. /package/{banking-RYRQVHNP.js.map → banking-MN6JH4W5.js.map} +0 -0
  61. /package/{browser-QFHKWZQZ.js.map → browser-ZP3U7XUT.js.map} +0 -0
  62. /package/{chat-42JUDAWT.js.map → chat-6HKZUD3S.js.map} +0 -0
  63. /package/{chunk-I33UGRYO.js.map → chunk-CB7OHO7A.js.map} +0 -0
  64. /package/{chunk-WDSB4HUQ.js.map → chunk-GZWZFIXW.js.map} +0 -0
  65. /package/{chunk-7OITCSJK.js.map → chunk-LMAYGYZK.js.map} +0 -0
  66. /package/{chunk-ULUHZEGW.js.map → chunk-P24Q7EMQ.js.map} +0 -0
  67. /package/{chunk-EUU32MCA.js.map → chunk-R645E73Z.js.map} +0 -0
  68. /package/{chunk-LSF542OO.js.map → chunk-YFOMVTVJ.js.map} +0 -0
  69. /package/{computer-use-SHDFHKFG.js.map → computer-use-LXSCXHSK.js.map} +0 -0
  70. /package/{connector-JHUSFYKI.js.map → connector-RVP22ZRZ.js.map} +0 -0
  71. /package/{credit-HQBTHE3H.js.map → credit-RTSUVDT2.js.map} +0 -0
  72. /package/{developer-support-II7AKXLL.js.map → developer-support-WWPQYCSV.js.map} +0 -0
  73. /package/{doctor-Q3KRDZSD.js.map → doctor-LCF4TAOW.js.map} +0 -0
  74. /package/{feishu-DLKFD4ES.js.map → feishu-I2CSLJWZ.js.map} +0 -0
  75. /package/{finance-WVJ4YSXK.js.map → finance-DJESBGK6.js.map} +0 -0
  76. /package/{github-OA535CZN.js.map → github-M3XOPOGW.js.map} +0 -0
  77. /package/{goal-YIUP3XWQ.js.map → goal-22DFQ4IR.js.map} +0 -0
  78. /package/{host-HF2IRRRU.js.map → host-7HJZ7B4D.js.map} +0 -0
  79. /package/{logs-MW6DDXIO.js.map → logs-EW4ILZJ3.js.map} +0 -0
  80. /package/{mail-TOR63WSJ.js.map → mail-6L6LPKCH.js.map} +0 -0
  81. /package/{maps-ZR2TP5PC.js.map → maps-JFBDULLB.js.map} +0 -0
  82. /package/{model-YFQVYG7N.js.map → model-KVWK7LU7.js.map} +0 -0
  83. /package/{model-provider-Z5TE5PGP.js.map → model-provider-NGEMWSWX.js.map} +0 -0
  84. /package/{org-JUQ3EGS7.js.map → org-F4C5MUPY.js.map} +0 -0
  85. /package/{people-search-OQF7KRHM.js.map → people-search-LKNHV6SR.js.map} +0 -0
  86. /package/{phone-2YCIE2QH.js.map → phone-SU4SAXQR.js.map} +0 -0
  87. /package/{preference-AS6HIRYP.js.map → preference-MRQ5UCKF.js.map} +0 -0
  88. /package/{resource-ZOVEXYKR.js.map → resource-35YNNBER.js.map} +0 -0
  89. /package/{scrape-ZL6WEVEN.js.map → scrape-EK5XJ53L.js.map} +0 -0
  90. /package/{search-HX373F2T.js.map → search-566TALXR.js.map} +0 -0
  91. /package/{secret-F56JZ3SJ.js.map → secret-2V3YCXFF.js.map} +0 -0
  92. /package/{slack-ZXWXU64N.js.map → slack-RY4MFK67.js.map} +0 -0
  93. /package/{teams-UJWQ6BYO.js.map → teams-WD7BYGL7.js.map} +0 -0
  94. /package/{telegram-ACFTFLED.js.map → telegram-TMT67J54.js.map} +0 -0
  95. /package/{upgrade-N76GQ4GZ.js.map → upgrade-25IW4Y4P.js.map} +0 -0
  96. /package/{variable-Z26DWCFB.js.map → variable-RFADYZMT.js.map} +0 -0
  97. /package/{video-2CFWOD2G.js.map → video-YLNJ2TZU.js.map} +0 -0
  98. /package/{weather-TAYZ6IOF.js.map → weather-LDVUKOT6.js.map} +0 -0
  99. /package/{web-Y4JKA25B.js.map → web-QUDPNP6O.js.map} +0 -0
  100. /package/{web-search-5FLMMI3R.js.map → web-search-VIJGJUE2.js.map} +0 -0
  101. /package/{whoami-QD3APKJC.js.map → whoami-W4PDJTXV.js.map} +0 -0
  102. /package/{workflow-Y2B7UGNK.js.map → workflow-2WI4PX7J.js.map} +0 -0
@@ -28,25 +28,30 @@ import {
28
28
  getZeroBillingStatus,
29
29
  listZeroConnectorCatalog,
30
30
  listZeroConnectorCatalogStatus
31
- } from "./chunk-TKCI4Y6C.js";
31
+ } from "./chunk-6LWCFOJJ.js";
32
32
  import {
33
33
  generateWebImage,
34
34
  generateWebVideo,
35
35
  generateWebVoice
36
- } from "./chunk-WDSB4HUQ.js";
36
+ } from "./chunk-GZWZFIXW.js";
37
37
  import {
38
38
  planUpgradeUrl
39
39
  } from "./chunk-2NW76WYJ.js";
40
40
  import {
41
41
  getPlatformOrigin
42
- } from "./chunk-SCRSK75J.js";
42
+ } from "./chunk-ERQOEAWS.js";
43
43
  import "./chunk-MA22KQYU.js";
44
44
  import {
45
45
  ApiRequestError,
46
46
  source_default,
47
47
  withErrorHandler
48
- } from "./chunk-EUU32MCA.js";
49
- import "./chunk-MD3YWUKO.js";
48
+ } from "./chunk-R645E73Z.js";
49
+ import {
50
+ isFeatureEnabled
51
+ } from "./chunk-WNWWB3WF.js";
52
+ import {
53
+ decodeZeroTokenPayload
54
+ } from "./chunk-MD3YWUKO.js";
50
55
  import {
51
56
  Command,
52
57
  InvalidArgumentError,
@@ -1147,6 +1152,15 @@ init_esm_shims();
1147
1152
 
1148
1153
  // src/commands/zero/shared/html-artifact-authoring.ts
1149
1154
  init_esm_shims();
1155
+ var HTML_RESOURCE_INDEX_BASE_URL = "https://static.vm0.io/html-resources/9e005c4ace807d67338dfa701877df10175a4d2a1c677dea1414aba76867493d";
1156
+ var HTML_RESOURCE_INDEX_URLS = {
1157
+ website: `${HTML_RESOURCE_INDEX_BASE_URL}/website.json`,
1158
+ report: `${HTML_RESOURCE_INDEX_BASE_URL}/report.json`,
1159
+ poster: `${HTML_RESOURCE_INDEX_BASE_URL}/poster.json`,
1160
+ "dashboard-design": `${HTML_RESOURCE_INDEX_BASE_URL}/dashboard-design.json`,
1161
+ "mobile-app-design": `${HTML_RESOURCE_INDEX_BASE_URL}/mobile-app-design.json`,
1162
+ "docs-design": `${HTML_RESOURCE_INDEX_BASE_URL}/docs-design.json`
1163
+ };
1150
1164
  function slugify(value) {
1151
1165
  const slug = value.toLowerCase().replace(/[^a-z0-9]+/gu, "-").replace(/^-+|-+$/gu, "").replace(/-{2,}/gu, "-").slice(0, 48).replace(/-+$/u, "");
1152
1166
  return slug.length >= 3 ? slug : "html-artifact";
@@ -1175,12 +1189,86 @@ function createHtmlArtifactAuthoringPacket(options) {
1175
1189
  const hostCommand = `zero host ${outputDir3} --site ${site}${artifactKindFlag}${options.kind === "website" ? " --spa" : ""}`;
1176
1190
  const title = titleForKind(options.kind);
1177
1191
  const candidateSlice = selectResourceCandidates(options.kind);
1178
- const selectionSchema = {
1192
+ const tokenPayload = decodeZeroTokenPayload();
1193
+ const resourceIndexUrl = isFeatureEnabled(
1194
+ "htmlResourceIndex" /* HtmlResourceIndex */,
1195
+ {
1196
+ userId: tokenPayload?.userId,
1197
+ orgId: tokenPayload?.orgId,
1198
+ overrides: tokenPayload?.featureSwitchOverrides
1199
+ }
1200
+ ) ? HTML_RESOURCE_INDEX_URLS[options.kind] : void 0;
1201
+ const selectionSchema = resourceIndexUrl ? {
1202
+ skills: "string[]",
1203
+ templates: "string[]",
1204
+ designSystems: "string[]",
1205
+ rationale: "string"
1206
+ } : {
1179
1207
  skills: "string[]",
1180
1208
  template: "string",
1181
1209
  designSystem: "string | null",
1182
1210
  rationale: "string"
1183
1211
  };
1212
+ const selectionLines = resourceIndexUrl ? [
1213
+ "## Stage 1: Resource Selection",
1214
+ "- Download only the target-specific Resource Index listed below.",
1215
+ "- The index contains templates and target-specific skills for this target, plus design systems for HTML generation.",
1216
+ "- Derive keywords from the user prompt and search the index's `id`, `name`, and `description` fields.",
1217
+ "- Select resources only when they are useful for the request. There is no fixed selection count for any resource type.",
1218
+ "- Choose only IDs present in the index; do not invent resource IDs.",
1219
+ "- Treat the selection JSON as internal working state, then continue to authoring.",
1220
+ "",
1221
+ "## Selection Output Schema",
1222
+ "```json",
1223
+ JSON.stringify(selectionSchema, null, 2),
1224
+ "```",
1225
+ "",
1226
+ "## Resource Index",
1227
+ `URL: \`${resourceIndexUrl}\``,
1228
+ ""
1229
+ ] : [
1230
+ "## Stage 1: Resource Selection",
1231
+ "- Choose generation resources from the bundled registry slice below.",
1232
+ "- Select one template, one or more skills, and zero or one design system.",
1233
+ "- Choose only IDs present in this packet; do not invent registry IDs.",
1234
+ "- Prefer compatible resources, but the user prompt is the highest-priority signal.",
1235
+ "- Treat the selection JSON as internal working state, then continue to authoring.",
1236
+ "",
1237
+ "## Selection Output Schema",
1238
+ "```json",
1239
+ JSON.stringify(selectionSchema, null, 2),
1240
+ "```",
1241
+ "",
1242
+ "## Candidate Registry Slice",
1243
+ `Registry: \`${candidateSlice.registryVersion}\``,
1244
+ `Default Git Source: \`${candidateSlice.source.repo}@${candidateSlice.source.ref}\``,
1245
+ "",
1246
+ "```json",
1247
+ JSON.stringify(candidateSlice.candidates, null, 2),
1248
+ "```",
1249
+ ""
1250
+ ];
1251
+ const resolutionLines = resourceIndexUrl ? [
1252
+ "## Stage 2: Resolve Selected Resources",
1253
+ "- Resolve and download only resources selected from the index. Do not fetch unselected resources.",
1254
+ "- For a selected entry without `source.archive`, resolve its `source.path` from the index's pinned `source.repo@source.ref`. Do not run `zero resource pull` for it.",
1255
+ ...options.kind === "website" ? [
1256
+ "- For a selected entry with `source.archive`, run its exact `source.pull.command`, then use `source.pull.resolvedPath`. Do not construct or guess a direct R2 URL.",
1257
+ "- The Website index includes vm0 built-in R2 template packages as template entries with `source.archive`.",
1258
+ "- Each built-in Website template entry includes the exact pull command and extracted package path in `source.pull`."
1259
+ ] : [],
1260
+ "- For directory refs, inspect the most relevant files such as `SKILL.md`, `DESIGN.md`, `README.md`, tokens, examples, and templates.",
1261
+ "- If a source file cannot be fetched, state that limitation and fall back to the index metadata for that resource.",
1262
+ ""
1263
+ ] : [
1264
+ "## Stage 2: Resolve Selected Resources",
1265
+ "- First resolve every required resource listed above, then resolve every selected resource before authoring.",
1266
+ "- For a candidate without `source.archive`, resolve `source.path` only from the pinned Git Source above. Do not run `zero resource pull` for it.",
1267
+ "- For a candidate with `source.archive`, run `zero resource pull <candidate-id> --dir ./generated/resources` with that candidate's `id`, then resolve it at `./generated/resources/<source.path>`. Do not look for it in the Git Source.",
1268
+ "- For directory refs, inspect the most relevant files such as `SKILL.md`, `DESIGN.md`, `README.md`, tokens, examples, and templates.",
1269
+ "- If a source file cannot be fetched, state that limitation and fall back to the registry metadata for that resource.",
1270
+ ""
1271
+ ];
1184
1272
  const artifact = {
1185
1273
  outputMode: "primary-artifact-with-supporting-assets",
1186
1274
  primaryArtifact: {
@@ -1221,33 +1309,8 @@ function createHtmlArtifactAuthoringPacket(options) {
1221
1309
  "## User Prompt",
1222
1310
  options.prompt,
1223
1311
  "",
1224
- "## Stage 1: Resource Selection",
1225
- "- Choose generation resources from the bundled registry slice below.",
1226
- "- Select one template, one or more skills, and zero or one design system.",
1227
- "- Choose only IDs present in this packet; do not invent registry IDs.",
1228
- "- Prefer compatible resources, but the user prompt is the highest-priority signal.",
1229
- "- Treat the selection JSON as internal working state, then continue to authoring.",
1230
- "",
1231
- "## Selection Output Schema",
1232
- "```json",
1233
- JSON.stringify(selectionSchema, null, 2),
1234
- "```",
1235
- "",
1236
- "## Candidate Registry Slice",
1237
- `Registry: \`${candidateSlice.registryVersion}\``,
1238
- `Default Git Source: \`${candidateSlice.source.repo}@${candidateSlice.source.ref}\``,
1239
- "",
1240
- "```json",
1241
- JSON.stringify(candidateSlice.candidates, null, 2),
1242
- "```",
1243
- "",
1244
- "## Stage 2: Resolve Selected Resources",
1245
- "- First resolve every required resource listed above, then resolve every selected resource before authoring.",
1246
- "- For a candidate without `source.archive`, resolve `source.path` only from the pinned Git Source above. Do not run `zero resource pull` for it.",
1247
- "- For a candidate with `source.archive`, run `zero resource pull <candidate-id> --dir ./generated/resources` with that candidate's `id`, then resolve it at `./generated/resources/<source.path>`. Do not look for it in the Git Source.",
1248
- "- For directory refs, inspect the most relevant files such as `SKILL.md`, `DESIGN.md`, `README.md`, tokens, examples, and templates.",
1249
- "- If a source file cannot be fetched, state that limitation and fall back to the registry metadata for that resource.",
1250
- "",
1312
+ ...selectionLines,
1313
+ ...resolutionLines,
1251
1314
  "## Stage 3: Author Artifact",
1252
1315
  `Author a production-quality ${title} as a static HTML artifact using the selected generation resources.`,
1253
1316
  "",
@@ -2791,4 +2854,4 @@ var generateCommand = new Command().name("generate").description(
2791
2854
  export {
2792
2855
  generateCommand
2793
2856
  };
2794
- //# sourceMappingURL=generate-OIGXCKT7.js.map
2857
+ //# sourceMappingURL=generate-KPPLJZDY.js.map