vibedgames 0.10.0 → 0.10.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.
Files changed (175) hide show
  1. package/assets/rebuild-object/.cache/spec-search/core_3d.json +1 -0
  2. package/assets/rebuild-object/.cache/spec-search/cs2.json +1 -0
  3. package/assets/rebuild-object/LICENSE +201 -0
  4. package/assets/rebuild-object/NOTICE +7 -0
  5. package/assets/rebuild-object/docs/materials/material-reference.json +2324 -0
  6. package/assets/rebuild-object/docs/specs/render-profile.v2.example.json +63 -0
  7. package/assets/rebuild-object/docs/specs/render-profile.v2.schema.json +56 -0
  8. package/assets/rebuild-object/docs/specs/vocabulary/README.md +86 -0
  9. package/assets/rebuild-object/docs/specs/vocabulary/core_3d.jsonl +12 -0
  10. package/assets/rebuild-object/docs/specs/vocabulary/core_3d_reconstruction.jsonl +37 -0
  11. package/assets/rebuild-object/docs/specs/vocabulary/cs2.jsonl +8 -0
  12. package/assets/rebuild-object/docs/specs/vocabulary/cs2_reconstruction.jsonl +62 -0
  13. package/assets/rebuild-object/forge/_shared/artifact_cache.py +54 -0
  14. package/assets/rebuild-object/forge/_shared/chirality.py +272 -0
  15. package/assets/rebuild-object/forge/_shared/color_metrics.py +107 -0
  16. package/assets/rebuild-object/forge/_shared/feature_acceptance_policy.py +113 -0
  17. package/assets/rebuild-object/forge/_shared/image_hash.py +113 -0
  18. package/assets/rebuild-object/forge/_shared/jpeg.py +448 -0
  19. package/assets/rebuild-object/forge/_shared/material_physics.py +253 -0
  20. package/assets/rebuild-object/forge/_shared/pipeline_routing.py +177 -0
  21. package/assets/rebuild-object/forge/_shared/scalp_field.py +302 -0
  22. package/assets/rebuild-object/forge/_shared/sdf_primitives.py +172 -0
  23. package/assets/rebuild-object/forge/_shared/spec_search.py +1792 -0
  24. package/assets/rebuild-object/forge/_shared/spec_search_profiles.json +58 -0
  25. package/assets/rebuild-object/forge/_shared/status_banner.py +35 -0
  26. package/assets/rebuild-object/forge/_shared/subdivision.py +232 -0
  27. package/assets/rebuild-object/forge/_shared/vertex_paint.py +236 -0
  28. package/assets/rebuild-object/forge/_shared/workflow_state.py +406 -0
  29. package/assets/rebuild-object/forge/materials/__init__.py +17 -0
  30. package/assets/rebuild-object/forge/materials/compatibility.py +106 -0
  31. package/assets/rebuild-object/forge/materials/reference.py +240 -0
  32. package/assets/rebuild-object/forge/next.py +116 -0
  33. package/assets/rebuild-object/forge/report.py +38 -0
  34. package/assets/rebuild-object/forge/requirements.txt +6 -0
  35. package/assets/rebuild-object/forge/stage1_intake/analyze_texture.py +255 -0
  36. package/assets/rebuild-object/forge/stage1_intake/bind_detail_properties.py +99 -0
  37. package/assets/rebuild-object/forge/stage1_intake/build_detail_inventory.py +349 -0
  38. package/assets/rebuild-object/forge/stage1_intake/camera_fitting_math.py +133 -0
  39. package/assets/rebuild-object/forge/stage1_intake/camera_fitting_solver.py +197 -0
  40. package/assets/rebuild-object/forge/stage1_intake/camera_fitting_types.py +291 -0
  41. package/assets/rebuild-object/forge/stage1_intake/camera_image_helpers.py +133 -0
  42. package/assets/rebuild-object/forge/stage1_intake/check_intake_correctness.py +116 -0
  43. package/assets/rebuild-object/forge/stage1_intake/check_reference_admission.py +203 -0
  44. package/assets/rebuild-object/forge/stage1_intake/cs2_foundation.py +139 -0
  45. package/assets/rebuild-object/forge/stage1_intake/cs2_manifest.py +230 -0
  46. package/assets/rebuild-object/forge/stage1_intake/cs2_review_contract.py +42 -0
  47. package/assets/rebuild-object/forge/stage1_intake/delight_albedo.py +352 -0
  48. package/assets/rebuild-object/forge/stage1_intake/detect_cs2.py +276 -0
  49. package/assets/rebuild-object/forge/stage1_intake/detect_reference_effects.py +275 -0
  50. package/assets/rebuild-object/forge/stage1_intake/extract_cs2_textures.py +126 -0
  51. package/assets/rebuild-object/forge/stage1_intake/extract_gradient_stops.py +149 -0
  52. package/assets/rebuild-object/forge/stage1_intake/extract_hair_evidence.py +385 -0
  53. package/assets/rebuild-object/forge/stage1_intake/extract_landmarks.py +456 -0
  54. package/assets/rebuild-object/forge/stage1_intake/extract_part_color_recipe.py +496 -0
  55. package/assets/rebuild-object/forge/stage1_intake/extract_pbr_evidence.py +843 -0
  56. package/assets/rebuild-object/forge/stage1_intake/fetch_cs2_metadata.py +147 -0
  57. package/assets/rebuild-object/forge/stage1_intake/label_glb_nodes.py +318 -0
  58. package/assets/rebuild-object/forge/stage1_intake/locate_cs2_vpk.py +73 -0
  59. package/assets/rebuild-object/forge/stage1_intake/material_region_analysis.py +227 -0
  60. package/assets/rebuild-object/forge/stage1_intake/probe_glb.py +357 -0
  61. package/assets/rebuild-object/forge/stage1_intake/probe_image.py +168 -0
  62. package/assets/rebuild-object/forge/stage1_intake/run_vision_adapter.py +45 -0
  63. package/assets/rebuild-object/forge/stage1_intake/search_specs.py +258 -0
  64. package/assets/rebuild-object/forge/stage1_intake/semantic_decomposition.py +119 -0
  65. package/assets/rebuild-object/forge/stage1_intake/solve_camera_pose.py +254 -0
  66. package/assets/rebuild-object/forge/stage2_spec/apply_material_analysis.py +192 -0
  67. package/assets/rebuild-object/forge/stage2_spec/cs2_adapters.py +62 -0
  68. package/assets/rebuild-object/forge/stage2_spec/derive_geometry.py +118 -0
  69. package/assets/rebuild-object/forge/stage2_spec/hair_profile.py +306 -0
  70. package/assets/rebuild-object/forge/stage2_spec/humanoid_proportions.py +214 -0
  71. package/assets/rebuild-object/forge/stage2_spec/new_pre_spec_assessment.py +343 -0
  72. package/assets/rebuild-object/forge/stage2_spec/new_sculpt_spec.py +2396 -0
  73. package/assets/rebuild-object/forge/stage2_spec/validate_sculpt_spec.py +2871 -0
  74. package/assets/rebuild-object/forge/stage3_build/bake_projected_texture.py +181 -0
  75. package/assets/rebuild-object/forge/stage3_build/decimate.py +272 -0
  76. package/assets/rebuild-object/forge/stage3_build/generate_threejs_factory.py +4099 -0
  77. package/assets/rebuild-object/forge/stage3_build/module_cache.py +155 -0
  78. package/assets/rebuild-object/forge/stage3_build/morph_targets.py +178 -0
  79. package/assets/rebuild-object/forge/stage3_build/orchestrate_passes.py +653 -0
  80. package/assets/rebuild-object/forge/stage3_build/uv_unwrap.py +622 -0
  81. package/assets/rebuild-object/forge/stage3_build/visual_hull.py +357 -0
  82. package/assets/rebuild-object/forge/stage4_review/_fit_divine_eye.py +64 -0
  83. package/assets/rebuild-object/forge/stage4_review/append_review.py +453 -0
  84. package/assets/rebuild-object/forge/stage4_review/attachment_anchor.py +349 -0
  85. package/assets/rebuild-object/forge/stage4_review/calibrate_eye.py +131 -0
  86. package/assets/rebuild-object/forge/stage4_review/check_part_coverage.py +298 -0
  87. package/assets/rebuild-object/forge/stage4_review/compare_region_passes.py +169 -0
  88. package/assets/rebuild-object/forge/stage4_review/correction_loop.py +258 -0
  89. package/assets/rebuild-object/forge/stage4_review/cs2_review.py +224 -0
  90. package/assets/rebuild-object/forge/stage4_review/diagnose_render.py +356 -0
  91. package/assets/rebuild-object/forge/stage4_review/diagnose_render_multi_angle.py +143 -0
  92. package/assets/rebuild-object/forge/stage4_review/divine_eye.py +461 -0
  93. package/assets/rebuild-object/forge/stage4_review/fit_params.py +381 -0
  94. package/assets/rebuild-object/forge/stage4_review/geometry_integrity.py +294 -0
  95. package/assets/rebuild-object/forge/stage4_review/hair_gate.py +216 -0
  96. package/assets/rebuild-object/forge/stage4_review/interior_difference.py +188 -0
  97. package/assets/rebuild-object/forge/stage4_review/joint_loops.py +209 -0
  98. package/assets/rebuild-object/forge/stage4_review/make_comparison_sheet.py +292 -0
  99. package/assets/rebuild-object/forge/stage4_review/material_comparator.py +181 -0
  100. package/assets/rebuild-object/forge/stage4_review/material_feedback.py +143 -0
  101. package/assets/rebuild-object/forge/stage4_review/material_gate.py +126 -0
  102. package/assets/rebuild-object/forge/stage4_review/material_views.py +184 -0
  103. package/assets/rebuild-object/forge/stage4_review/mesh_reference_compare.py +362 -0
  104. package/assets/rebuild-object/forge/stage4_review/multi_pass.py +102 -0
  105. package/assets/rebuild-object/forge/stage4_review/objectness.py +143 -0
  106. package/assets/rebuild-object/forge/stage4_review/pairwise_penetration.py +376 -0
  107. package/assets/rebuild-object/forge/stage4_review/per_feature.py +215 -0
  108. package/assets/rebuild-object/forge/stage4_review/render_bridge.py +556 -0
  109. package/assets/rebuild-object/forge/stage4_review/scalp_exposure.py +257 -0
  110. package/assets/rebuild-object/forge/stage4_review/self_intersection.py +592 -0
  111. package/assets/rebuild-object/forge/stage4_review/swept_arc_gate.py +336 -0
  112. package/assets/rebuild-object/forge/stage4_review/turntable_gate.py +415 -0
  113. package/assets/rebuild-object/forge/stage4_review/validate_render_profile.py +182 -0
  114. package/assets/rebuild-object/forge/stage4_review/vertex_region_gate.py +456 -0
  115. package/assets/rebuild-object/forge/stage4_review/vlm_gate.py +196 -0
  116. package/assets/rebuild-object/forge/stage5_rig/NOTES.md +149 -0
  117. package/assets/rebuild-object/forge/stage5_rig/__init__.py +6 -0
  118. package/assets/rebuild-object/forge/stage5_rig/emit_rig.py +420 -0
  119. package/assets/rebuild-object/forge/stage5_rig/geodesic_skinning.py +508 -0
  120. package/assets/rebuild-object/forge/stage5_rig/rig_spec.py +174 -0
  121. package/assets/rebuild-object/forge/stage5_rig/validate_rig_payload.py +195 -0
  122. package/assets/rebuild-object/forge/state.py +98 -0
  123. package/assets/rebuild-object/steps.json +381 -0
  124. package/dist/{chunk-FXXVXDTW.js → chunk-24TITAFS.js} +1 -1
  125. package/dist/{chunk-OGX4DKIS.js → chunk-2C5PG2QO.js} +1 -1
  126. package/dist/{chunk-HYOXGNWS.js → chunk-2DEVOKI7.js} +1 -1
  127. package/dist/{chunk-RRI23NK2.js → chunk-2GHPYT2P.js} +1 -1
  128. package/dist/{chunk-S7HYWITX.js → chunk-2HXGMXGC.js} +1 -1
  129. package/dist/{chunk-N2UHAQXC.js → chunk-36FORP7T.js} +0 -1
  130. package/dist/{chunk-VB4WLJR2.js → chunk-3IXRQTRF.js} +1 -1
  131. package/dist/{chunk-2KVQJKIZ.js → chunk-4ENHS32B.js} +23 -36
  132. package/dist/{chunk-SXYQL4GK.js → chunk-4YHA32OE.js} +1 -1
  133. package/dist/{chunk-4FJXCS3K.js → chunk-4ZGQKPK5.js} +1 -1
  134. package/dist/{chunk-SBXCK2I2.js → chunk-6CLUPFQA.js} +2 -2
  135. package/dist/{chunk-TXOE5UY5.js → chunk-7WTF2BA4.js} +1 -1
  136. package/dist/{chunk-R2WVORGD.js → chunk-AAXZNK4Z.js} +1 -1
  137. package/dist/{chunk-DOOQUFPG.js → chunk-ALLBT4FB.js} +1 -1
  138. package/dist/{chunk-HRKVAXNN.js → chunk-BAZDPPIG.js} +5 -5
  139. package/dist/{chunk-RPJR3S5S.js → chunk-CYDENLZ4.js} +5 -8
  140. package/dist/{chunk-I5LELJSK.js → chunk-DKSUD44G.js} +1 -1
  141. package/dist/{chunk-43P4U7CB.js → chunk-DWWSJKTE.js} +1 -1
  142. package/dist/{chunk-SUSX3QIA.js → chunk-E72TFJZP.js} +1 -1
  143. package/dist/{chunk-E3FJUPLT.js → chunk-EUAAQMUA.js} +2 -0
  144. package/dist/{chunk-U6DTE5IX.js → chunk-F7LYJSZE.js} +1 -1
  145. package/dist/{chunk-MEAO33XW.js → chunk-FMON3C74.js} +8 -8
  146. package/dist/{chunk-GLEW7VJQ.js → chunk-FPILHRLZ.js} +1 -1
  147. package/dist/{chunk-OPUCUUID.js → chunk-G63MXDX2.js} +4 -0
  148. package/dist/{chunk-4UU622RK.js → chunk-GGO6ZYYI.js} +1 -3
  149. package/dist/{chunk-2ZKS7V72.js → chunk-GZCRYYS6.js} +5 -5
  150. package/dist/{chunk-E7NDOZ27.js → chunk-LE4GVTYI.js} +8 -8
  151. package/dist/{chunk-RKS7SI5L.js → chunk-NO6KPV64.js} +1 -1
  152. package/dist/{chunk-KJK5CB6E.js → chunk-NXW3Z4Y4.js} +1 -1
  153. package/dist/{chunk-7RPLQWR2.js → chunk-OHOAZGO4.js} +1 -1
  154. package/dist/chunk-PYJNI5WD.js +83 -0
  155. package/dist/{chunk-NCX6LYNJ.js → chunk-Q4XAGTFX.js} +1 -1
  156. package/dist/{chunk-3UGGMFJJ.js → chunk-QMZBSVKF.js} +1 -1
  157. package/dist/{chunk-ABTUEIRC.js → chunk-QO66UBOS.js} +2 -2
  158. package/dist/{chunk-LONQWRTR.js → chunk-S4KVGQQO.js} +8 -8
  159. package/dist/{chunk-HX5Q63UA.js → chunk-T777EXAO.js} +1 -1
  160. package/dist/{chunk-UQ7VO6B3.js → chunk-TZZNRA3S.js} +1 -1
  161. package/dist/{chunk-CTY2WZQK.js → chunk-UC3QLWMQ.js} +1 -1
  162. package/dist/{chunk-MR5KIFI7.js → chunk-UDJH2RED.js} +3 -3
  163. package/dist/{chunk-ZHLPE6LI.js → chunk-UIKYK7KI.js} +1 -1
  164. package/dist/{chunk-KAGVI3CE.js → chunk-UJRSQO2B.js} +1 -1
  165. package/dist/{chunk-Q2QC6KAZ.js → chunk-V7LEYVXB.js} +29 -25
  166. package/dist/{chunk-DB7WVFS7.js → chunk-WRMQEXUC.js} +1 -1
  167. package/dist/{chunk-HSMG6U7J.js → chunk-WXSBNC67.js} +3 -9
  168. package/dist/{chunk-QLCVLCPM.js → chunk-X4QIOXNQ.js} +1 -1
  169. package/dist/{chunk-5YPLKGY3.js → chunk-Y6WHUK2O.js} +1 -1
  170. package/dist/{chunk-VZEJ2ZHE.js → chunk-Z3E7ORGQ.js} +5 -5
  171. package/dist/index.js +20 -20
  172. package/package.json +32 -22
  173. package/dist/{chunk-Q3XQPNF6.js → chunk-BN7TR6OR.js} +3 -3
  174. package/dist/{chunk-LORGE2NB.js → chunk-U2NCN5RO.js} +3 -3
  175. package/dist/{chunk-UPHB5HWO.js → chunk-VQTTSPA3.js} +3 -3
@@ -22,7 +22,7 @@ import {
22
22
  parseColor,
23
23
  removeChromaFringe,
24
24
  writeJsonFile
25
- } from "./chunk-2KVQJKIZ.js";
25
+ } from "./chunk-4ENHS32B.js";
26
26
  import "./chunk-2SBBKY5C.js";
27
27
  import "./chunk-GKDUYJ7R.js";
28
28
 
@@ -15,7 +15,7 @@ import {
15
15
  parseArgs,
16
16
  snapImage,
17
17
  snapWarning
18
- } from "./chunk-2KVQJKIZ.js";
18
+ } from "./chunk-4ENHS32B.js";
19
19
  import "./chunk-2SBBKY5C.js";
20
20
  import "./chunk-GKDUYJ7R.js";
21
21
 
@@ -24,7 +24,7 @@ var pythonScript = (file) => (argv) => {
24
24
  const result = import_cross_spawn.default.sync(
25
25
  "uv",
26
26
  ["run", "--python", "3.12", "--no-project", path.join(ASSETS_DIR, file), ...argv],
27
- { stdio: "inherit" }
27
+ { env: { ...process.env, PYTHONDONTWRITEBYTECODE: "1" }, stdio: "inherit" }
28
28
  );
29
29
  if (result.error !== void 0 && result.error !== null) {
30
30
  consola.error(
@@ -13,7 +13,7 @@ import {
13
13
  main,
14
14
  parseArgs,
15
15
  snapSheet
16
- } from "./chunk-2KVQJKIZ.js";
16
+ } from "./chunk-4ENHS32B.js";
17
17
  import "./chunk-2SBBKY5C.js";
18
18
  import "./chunk-GKDUYJ7R.js";
19
19
 
@@ -118,7 +118,6 @@ var maybeScheduleAutoUpdate = () => {
118
118
  };
119
119
 
120
120
  export {
121
- markUpdateChecked,
122
121
  isNewerVersion,
123
122
  fetchLatestVersion,
124
123
  maybeScheduleAutoUpdate
@@ -12,7 +12,7 @@ import {
12
12
  packSpritesheet,
13
13
  parseArgs,
14
14
  writeJsonFile
15
- } from "./chunk-2KVQJKIZ.js";
15
+ } from "./chunk-4ENHS32B.js";
16
16
  import "./chunk-2SBBKY5C.js";
17
17
  import "./chunk-GKDUYJ7R.js";
18
18
 
@@ -29,24 +29,6 @@ import {
29
29
  } from "./chunk-2SBBKY5C.js";
30
30
 
31
31
  // ../../packages/asset-tools/src/args.ts
32
- import { readFileSync } from "node:fs";
33
- var headerDoc = (entry) => {
34
- if (entry === void 0 || entry === "") {
35
- return null;
36
- }
37
- let source;
38
- try {
39
- source = readFileSync(entry, "utf-8");
40
- } catch {
41
- return null;
42
- }
43
- const doc = /^(?:#![^\n]*\n)?\/\*\*(?<doc>[\s\S]*?)\*\//u.exec(source)?.groups?.doc;
44
- if (doc === void 0) {
45
- return null;
46
- }
47
- const text = doc.split("\n").map((line) => line.replace(/^\s*\* ?/u, "")).join("\n").trim();
48
- return text.length > 0 ? text : null;
49
- };
50
32
  var fail = (message) => {
51
33
  process.stderr.write(`${message}
52
34
  `);
@@ -63,6 +45,12 @@ var declaredOptions = (options) => {
63
45
  const strict = options.booleans !== void 0 || options.values !== void 0;
64
46
  return { booleans, known, strict };
65
47
  };
48
+ var optionsHelp = (options) => [
49
+ "options:",
50
+ ...(options.values ?? []).map((name) => ` --${name} <value>`),
51
+ ...(options.booleans ?? []).map((name) => ` --${name}`),
52
+ " -h, --help"
53
+ ].join("\n");
66
54
  var isValueToken = (token) => token !== void 0 && !token.startsWith("--");
67
55
  var parseArgs = (argv, options = {}) => {
68
56
  const { booleans, known, strict } = declaredOptions(options);
@@ -124,8 +112,7 @@ var parseArgs = (argv, options = {}) => {
124
112
  failUsage(`unrecognized arguments: ${unknown.join(" ")}`);
125
113
  }
126
114
  if (parsed.has("help")) {
127
- const help = headerDoc(process.argv[1]);
128
- process.stdout.write(`${help ?? "No help available."}
115
+ process.stdout.write(`${optionsHelp(options)}
129
116
  `);
130
117
  process.exit(0);
131
118
  }
@@ -242,7 +229,7 @@ var parseColor = (input) => {
242
229
  };
243
230
 
244
231
  // ../../packages/asset-tools/src/image/raster.ts
245
- import { mkdirSync, readFileSync as readFileSync2, writeFileSync } from "node:fs";
232
+ import { mkdirSync, readFileSync, writeFileSync } from "node:fs";
246
233
  import path from "node:path";
247
234
 
248
235
  // ../../packages/asset-tools/src/image/png.ts
@@ -839,7 +826,7 @@ var Bitmap = class _Bitmap {
839
826
  return bmp;
840
827
  }
841
828
  static fromFile(file) {
842
- const buffer = readFileSync2(file);
829
+ const buffer = readFileSync(file);
843
830
  const { width, height, data } = decodePng(buffer);
844
831
  return new _Bitmap(width, height, data);
845
832
  }
@@ -1159,7 +1146,7 @@ var readWebpSize = (buffer) => {
1159
1146
  return null;
1160
1147
  };
1161
1148
  var readImageSize = (file) => {
1162
- const buffer = readFileSync2(file);
1149
+ const buffer = readFileSync(file);
1163
1150
  if (buffer.length >= 24 && buffer[0] === 137 && buffer[1] === 80) {
1164
1151
  return readPngSize(buffer);
1165
1152
  }
@@ -2146,7 +2133,7 @@ var isJsonString = (value) => Object.prototype.toString.call(value) === "[object
2146
2133
  var isFiniteJsonNumber = (value) => Number.isFinite(value);
2147
2134
 
2148
2135
  // ../../packages/asset-tools/src/asset/tilemap.ts
2149
- import { existsSync, readFileSync as readFileSync3 } from "node:fs";
2136
+ import { existsSync, readFileSync as readFileSync2 } from "node:fs";
2150
2137
  import path2 from "node:path";
2151
2138
 
2152
2139
  // ../../packages/asset-tools/src/image/draw.ts
@@ -2265,7 +2252,7 @@ var MANIFEST_JSON_CANDIDATES = [
2265
2252
  ];
2266
2253
  var asInt = (value, fallback) => isFiniteJsonNumber(value) ? Math.trunc(value) : fallback;
2267
2254
  var loadManifestJson = (manifestPath) => {
2268
- const payload = parseJsonText(readFileSync3(manifestPath, "utf-8"));
2255
+ const payload = parseJsonText(readFileSync2(manifestPath, "utf-8"));
2269
2256
  if (!isJsonObject(payload)) {
2270
2257
  throw new Error("Manifest JSON must be an object at top-level.");
2271
2258
  }
@@ -2547,7 +2534,7 @@ var makeSelftestMap = (meta2) => {
2547
2534
 
2548
2535
  // ../../packages/asset-tools/src/asset/tilemap-server.ts
2549
2536
  import { randomUUID } from "node:crypto";
2550
- import { existsSync as existsSync2, mkdirSync as mkdirSync2, readFileSync as readFileSync4, writeFileSync as writeFileSync2 } from "node:fs";
2537
+ import { existsSync as existsSync2, mkdirSync as mkdirSync2, readFileSync as readFileSync3, writeFileSync as writeFileSync2 } from "node:fs";
2551
2538
  import { createServer } from "node:http";
2552
2539
  import path3 from "node:path";
2553
2540
  var DEFAULT_MAP_WIDTH = 64;
@@ -2636,7 +2623,7 @@ var createTilemapEditor = (options) => {
2636
2623
  throw new Error("Manifest has no tilesets.");
2637
2624
  }
2638
2625
  const selected = options.tileset !== void 0 && options.tileset !== null && options.tileset !== "" && names.includes(options.tileset) ? options.tileset : first;
2639
- const map = options.mapPath !== void 0 && options.mapPath !== null && options.mapPath !== "" && existsSync2(options.mapPath) ? parseTilemap(parseJsonText(readFileSync4(options.mapPath, "utf-8")), {
2626
+ const map = options.mapPath !== void 0 && options.mapPath !== null && options.mapPath !== "" && existsSync2(options.mapPath) ? parseTilemap(parseJsonText(readFileSync3(options.mapPath, "utf-8")), {
2640
2627
  height: DEFAULT_MAP_HEIGHT,
2641
2628
  width: DEFAULT_MAP_WIDTH
2642
2629
  }) : {
@@ -2679,7 +2666,7 @@ var createTilemapEditor = (options) => {
2679
2666
  }
2680
2667
  return {
2681
2668
  path: target,
2682
- ...parseTilemap(parseJsonText(readFileSync4(target, "utf-8")), {
2669
+ ...parseTilemap(parseJsonText(readFileSync3(target, "utf-8")), {
2683
2670
  height: DEFAULT_MAP_HEIGHT,
2684
2671
  width: DEFAULT_MAP_WIDTH
2685
2672
  })
@@ -2743,7 +2730,7 @@ var createTilemapEditor = (options) => {
2743
2730
  throw new Error("name is required");
2744
2731
  }
2745
2732
  const meta2 = metaFor(name);
2746
- const bytes = readFileSync4(meta2.path);
2733
+ const bytes = readFileSync3(meta2.path);
2747
2734
  res.writeHead(200, {
2748
2735
  "cache-control": "no-store",
2749
2736
  "content-length": bytes.length,
@@ -2858,7 +2845,7 @@ var writeTextFile = (target, contents) => {
2858
2845
  };
2859
2846
 
2860
2847
  // ../../packages/asset-tools/src/asset/manifest.ts
2861
- import { existsSync as existsSync4, readFileSync as readFileSync5 } from "node:fs";
2848
+ import { existsSync as existsSync4, readFileSync as readFileSync4 } from "node:fs";
2862
2849
  import path5 from "node:path";
2863
2850
 
2864
2851
  // ../../packages/asset-tools/src/asset/lua.ts
@@ -3151,7 +3138,7 @@ var collectJsonPaths = (payload) => {
3151
3138
  var extractManifestPaths = (manifestPath) => {
3152
3139
  const manifestDir = path5.resolve(path5.dirname(manifestPath));
3153
3140
  if (manifestPath.toLowerCase().endsWith(".json")) {
3154
- const payload = parseJsonText(readFileSync5(manifestPath, "utf-8"));
3141
+ const payload = parseJsonText(readFileSync4(manifestPath, "utf-8"));
3155
3142
  if (!isJsonObject(payload)) {
3156
3143
  throw new Error("JSON manifest must be an object at top-level.");
3157
3144
  }
@@ -3160,7 +3147,7 @@ var extractManifestPaths = (manifestPath) => {
3160
3147
  collectJsonPaths(payload).map((p) => resolveManifestPath(p, manifestDir, jsonRoot))
3161
3148
  );
3162
3149
  }
3163
- const text = readFileSync5(manifestPath, "utf-8");
3150
+ const text = readFileSync4(manifestPath, "utf-8");
3164
3151
  const luaRoot = LUA_META_ROOT_RE.exec(text)?.groups?.root ?? null;
3165
3152
  const out = /* @__PURE__ */ new Set();
3166
3153
  for (const match of text.matchAll(LUA_PATH_RE)) {
@@ -3229,13 +3216,13 @@ var rewritePaths = (base, sourceRoot, value) => {
3229
3216
  };
3230
3217
  var exportManifest = (manifestPath, packRelative, outPath) => {
3231
3218
  if (manifestPath.toLowerCase().endsWith(".json")) {
3232
- const payload = parseJsonText(readFileSync5(manifestPath, "utf-8"));
3219
+ const payload = parseJsonText(readFileSync4(manifestPath, "utf-8"));
3233
3220
  if (!isJsonObject(payload)) {
3234
3221
  throw new Error("JSON manifest must be an object at top-level.");
3235
3222
  }
3236
3223
  return payload;
3237
3224
  }
3238
- const parsed = parseLua(readFileSync5(manifestPath, "utf-8"));
3225
+ const parsed = parseLua(readFileSync4(manifestPath, "utf-8"));
3239
3226
  if (!isJsonObject(parsed)) {
3240
3227
  throw new Error("Lua manifest must return a table/object.");
3241
3228
  }
@@ -4453,7 +4440,7 @@ var buildSequenceGif = (frames, flatBackground) => {
4453
4440
  };
4454
4441
 
4455
4442
  // ../../packages/asset-tools/src/sprite/qc.ts
4456
- import { existsSync as existsSync5, readFileSync as readFileSync6 } from "node:fs";
4443
+ import { existsSync as existsSync5, readFileSync as readFileSync5 } from "node:fs";
4457
4444
  var ALPHA_ON = 16;
4458
4445
  var EMPTY_AREA_FRAC = 3e-3;
4459
4446
  var CLIP_BORDER_FRAC = 0.01;
@@ -4486,7 +4473,7 @@ var frameGeometry = (sheet, sheetPath, frameWidth, frameHeight) => {
4486
4473
  }
4487
4474
  const manifestPath = sheetPath.replace(/\.[^./\\]+$/u, ".json");
4488
4475
  if (existsSync5(manifestPath)) {
4489
- const parsed = parseJsonText(readFileSync6(manifestPath, "utf-8"));
4476
+ const parsed = parseJsonText(readFileSync5(manifestPath, "utf-8"));
4490
4477
  if (!isJsonObject2(parsed)) {
4491
4478
  throw new Error(`${manifestPath}: expected an object`);
4492
4479
  }
@@ -6,7 +6,7 @@ var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
7
  import {
8
8
  revokeLogin
9
- } from "./chunk-E3FJUPLT.js";
9
+ } from "./chunk-EUAAQMUA.js";
10
10
  import {
11
11
  clearConfig,
12
12
  getConfig
@@ -9,7 +9,7 @@ import {
9
9
  isJsonObject,
10
10
  isJsonString,
11
11
  parseJsonText
12
- } from "./chunk-2KVQJKIZ.js";
12
+ } from "./chunk-4ENHS32B.js";
13
13
  import "./chunk-2SBBKY5C.js";
14
14
  import "./chunk-GKDUYJ7R.js";
15
15
 
@@ -7,7 +7,7 @@ var __dirname = __pathDirname(__filename);
7
7
  import {
8
8
  rawTool,
9
9
  runRawTool
10
- } from "./chunk-OPUCUUID.js";
10
+ } from "./chunk-G63MXDX2.js";
11
11
  import {
12
12
  defineCommand
13
13
  } from "./chunk-MBXCVCC4.js";
@@ -26,7 +26,7 @@ var CHECK_TOOLS = {
26
26
  },
27
27
  "scripted-playtest": {
28
28
  description: "Drive a fixed input sweep through vg playtest and report progression.",
29
- load: rawTool(async () => await import("./chunk-4FJXCS3K.js"))
29
+ load: rawTool(async () => await import("./chunk-4ZGQKPK5.js"))
30
30
  }
31
31
  };
32
32
  var runCheck = async (argv) => {
@@ -14,7 +14,7 @@ import {
14
14
  main,
15
15
  normalizeCanvas,
16
16
  parseArgs
17
- } from "./chunk-2KVQJKIZ.js";
17
+ } from "./chunk-4ENHS32B.js";
18
18
  import "./chunk-2SBBKY5C.js";
19
19
  import "./chunk-GKDUYJ7R.js";
20
20
 
@@ -16,7 +16,7 @@ import {
16
16
  main,
17
17
  parseArgs,
18
18
  resolveProfile
19
- } from "./chunk-2KVQJKIZ.js";
19
+ } from "./chunk-4ENHS32B.js";
20
20
  import "./chunk-2SBBKY5C.js";
21
21
  import "./chunk-GKDUYJ7R.js";
22
22
 
@@ -12,7 +12,7 @@ import {
12
12
  main,
13
13
  parseArgs,
14
14
  parseColor
15
- } from "./chunk-2KVQJKIZ.js";
15
+ } from "./chunk-4ENHS32B.js";
16
16
  import "./chunk-2SBBKY5C.js";
17
17
  import "./chunk-GKDUYJ7R.js";
18
18
 
@@ -4,14 +4,11 @@ import { fileURLToPath as __fileURLToPath } from "node:url";
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import {
8
- assertKnownFlags
9
- } from "./chunk-RZ4DIJQW.js";
10
7
  import {
11
8
  authErrorCode,
12
9
  createClient
13
- } from "./chunk-CTY2WZQK.js";
14
- import "./chunk-E3FJUPLT.js";
10
+ } from "./chunk-UC3QLWMQ.js";
11
+ import "./chunk-EUAAQMUA.js";
15
12
  import {
16
13
  getToken
17
14
  } from "./chunk-Q5NZNXJE.js";
@@ -19,6 +16,9 @@ import {
19
16
  outputArgs,
20
17
  writeStructured
21
18
  } from "./chunk-COSLGSVO.js";
19
+ import {
20
+ assertKnownFlags
21
+ } from "./chunk-RZ4DIJQW.js";
22
22
  import {
23
23
  defineCommand
24
24
  } from "./chunk-MBXCVCC4.js";
@@ -6,16 +6,16 @@ var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
7
  import {
8
8
  isNewerVersion
9
- } from "./chunk-N2UHAQXC.js";
9
+ } from "./chunk-36FORP7T.js";
10
+ import {
11
+ getBaseUrl,
12
+ getConfigDir
13
+ } from "./chunk-Q5NZNXJE.js";
10
14
  import {
11
15
  SLUG_RE,
12
16
  findProjectRoot,
13
17
  readProjectConfig
14
18
  } from "./chunk-TMPBGXT4.js";
15
- import {
16
- getBaseUrl,
17
- getConfigDir
18
- } from "./chunk-Q5NZNXJE.js";
19
19
  import {
20
20
  defineCommand
21
21
  } from "./chunk-MBXCVCC4.js";
@@ -257,9 +257,6 @@ var playtestCommand = defineCommand({
257
257
  });
258
258
 
259
259
  export {
260
- resolveBinary,
261
- bootstrap,
262
- ensureMinimum,
263
260
  resolveGameUrl,
264
261
  bareTokens,
265
262
  expandGameFlag,
@@ -6,7 +6,7 @@ var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
7
  import {
8
8
  pythonScript
9
- } from "./chunk-RRI23NK2.js";
9
+ } from "./chunk-2GHPYT2P.js";
10
10
  import "./chunk-5535KDYI.js";
11
11
  import "./chunk-D2RF35HJ.js";
12
12
  import "./chunk-YNCYMWER.js";
@@ -8,7 +8,7 @@ import {
8
8
  OAuthError,
9
9
  pollDeviceToken,
10
10
  requestDeviceCode
11
- } from "./chunk-E3FJUPLT.js";
11
+ } from "./chunk-EUAAQMUA.js";
12
12
  import {
13
13
  getBaseUrl,
14
14
  saveConfig
@@ -13,7 +13,7 @@ import {
13
13
  parseArgs,
14
14
  runQc,
15
15
  toPythonJson
16
- } from "./chunk-2KVQJKIZ.js";
16
+ } from "./chunk-4ENHS32B.js";
17
17
  import "./chunk-2SBBKY5C.js";
18
18
  import "./chunk-GKDUYJ7R.js";
19
19
 
@@ -24,6 +24,8 @@ var OAUTH_SCOPES = {
24
24
  generate: "Generate images, audio, video and 3D with your credits",
25
25
  playtest: "Let a model playtest your games"
26
26
  };
27
+ var isOAuthScope = (scope) => Object.hasOwn(OAUTH_SCOPES, scope);
28
+ var CONNECTOR_OAUTH_SCOPES = Object.keys(OAUTH_SCOPES).filter(isOAuthScope).filter((scope) => scope !== "credits:write");
27
29
 
28
30
  // ../../packages/contract/src/cli.ts
29
31
  var CLI_VERSION_HEADER = "x-vg-cli";
@@ -16,7 +16,7 @@ import {
16
16
  parseColor,
17
17
  processSheet,
18
18
  toPythonJson
19
- } from "./chunk-2KVQJKIZ.js";
19
+ } from "./chunk-4ENHS32B.js";
20
20
  import "./chunk-2SBBKY5C.js";
21
21
  import "./chunk-GKDUYJ7R.js";
22
22
 
@@ -8,22 +8,22 @@ import {
8
8
  extractSource
9
9
  } from "./chunk-42K3BJJH.js";
10
10
  import "./chunk-G66HRVDW.js";
11
- import {
12
- SLUG_RE
13
- } from "./chunk-TMPBGXT4.js";
14
- import {
15
- assertKnownFlags
16
- } from "./chunk-RZ4DIJQW.js";
17
11
  import {
18
12
  createClient
19
- } from "./chunk-CTY2WZQK.js";
20
- import "./chunk-E3FJUPLT.js";
13
+ } from "./chunk-UC3QLWMQ.js";
14
+ import "./chunk-EUAAQMUA.js";
21
15
  import "./chunk-Q5NZNXJE.js";
16
+ import {
17
+ SLUG_RE
18
+ } from "./chunk-TMPBGXT4.js";
22
19
  import {
23
20
  isJsonOutput,
24
21
  outputArgs,
25
22
  writeStructured
26
23
  } from "./chunk-COSLGSVO.js";
24
+ import {
25
+ assertKnownFlags
26
+ } from "./chunk-RZ4DIJQW.js";
27
27
  import {
28
28
  defineCommand
29
29
  } from "./chunk-MBXCVCC4.js";
@@ -13,7 +13,7 @@ import {
13
13
  main,
14
14
  parseArgs,
15
15
  writeJsonFile
16
- } from "./chunk-2KVQJKIZ.js";
16
+ } from "./chunk-4ENHS32B.js";
17
17
  import "./chunk-2SBBKY5C.js";
18
18
  import "./chunk-GKDUYJ7R.js";
19
19
 
@@ -31,6 +31,10 @@ var runRawTool = async (group, tools, argv) => {
31
31
  ${usage(group, tools)}`);
32
32
  process.exit(2);
33
33
  }
34
+ if (rest.includes("--help") || rest.includes("-h")) {
35
+ console.log(`${entry.description}
36
+ `);
37
+ }
34
38
  const run = await entry.load();
35
39
  await run(rest);
36
40
  };
@@ -7,9 +7,8 @@ var __dirname = __pathDirname(__filename);
7
7
  import {
8
8
  fetchLatestVersion,
9
9
  isNewerVersion,
10
- markUpdateChecked,
11
10
  maybeScheduleAutoUpdate
12
- } from "./chunk-N2UHAQXC.js";
11
+ } from "./chunk-36FORP7T.js";
13
12
  import "./chunk-JN4WZCR7.js";
14
13
  import "./chunk-Q5NZNXJE.js";
15
14
  import "./chunk-RPSUFZAG.js";
@@ -18,6 +17,5 @@ import "./chunk-GKDUYJ7R.js";
18
17
  export {
19
18
  fetchLatestVersion,
20
19
  isNewerVersion,
21
- markUpdateChecked,
22
20
  maybeScheduleAutoUpdate
23
21
  };
@@ -4,14 +4,11 @@ import { fileURLToPath as __fileURLToPath } from "node:url";
4
4
  const require = __createRequire(import.meta.url);
5
5
  var __filename = __fileURLToPath(import.meta.url);
6
6
  var __dirname = __pathDirname(__filename);
7
- import {
8
- assertKnownFlags
9
- } from "./chunk-RZ4DIJQW.js";
10
7
  import {
11
8
  authErrorCode,
12
9
  createClient
13
- } from "./chunk-CTY2WZQK.js";
14
- import "./chunk-E3FJUPLT.js";
10
+ } from "./chunk-UC3QLWMQ.js";
11
+ import "./chunk-EUAAQMUA.js";
15
12
  import {
16
13
  getToken
17
14
  } from "./chunk-Q5NZNXJE.js";
@@ -19,6 +16,9 @@ import {
19
16
  outputArgs,
20
17
  writeStructured
21
18
  } from "./chunk-COSLGSVO.js";
19
+ import {
20
+ assertKnownFlags
21
+ } from "./chunk-RZ4DIJQW.js";
22
22
  import {
23
23
  defineCommand
24
24
  } from "./chunk-MBXCVCC4.js";
@@ -13,6 +13,11 @@ import {
13
13
  packSource
14
14
  } from "./chunk-42K3BJJH.js";
15
15
  import "./chunk-G66HRVDW.js";
16
+ import {
17
+ createClient
18
+ } from "./chunk-UC3QLWMQ.js";
19
+ import "./chunk-EUAAQMUA.js";
20
+ import "./chunk-Q5NZNXJE.js";
16
21
  import {
17
22
  SLUG_RE,
18
23
  findProjectRoot,
@@ -20,19 +25,14 @@ import {
20
25
  readProjectConfig,
21
26
  writeProjectConfig
22
27
  } from "./chunk-TMPBGXT4.js";
23
- import {
24
- assertKnownFlags
25
- } from "./chunk-RZ4DIJQW.js";
26
- import {
27
- createClient
28
- } from "./chunk-CTY2WZQK.js";
29
- import "./chunk-E3FJUPLT.js";
30
- import "./chunk-Q5NZNXJE.js";
31
28
  import {
32
29
  isJsonOutput,
33
30
  outputArgs,
34
31
  writeStructured
35
32
  } from "./chunk-COSLGSVO.js";
33
+ import {
34
+ assertKnownFlags
35
+ } from "./chunk-RZ4DIJQW.js";
36
36
  import {
37
37
  defineCommand
38
38
  } from "./chunk-MBXCVCC4.js";
@@ -12,7 +12,7 @@ import {
12
12
  parseArgs,
13
13
  recoverFrames,
14
14
  writeJsonFile
15
- } from "./chunk-2KVQJKIZ.js";
15
+ } from "./chunk-4ENHS32B.js";
16
16
  import "./chunk-2SBBKY5C.js";
17
17
  import "./chunk-GKDUYJ7R.js";
18
18
 
@@ -14,7 +14,7 @@ import {
14
14
  probeSheet,
15
15
  resolveTargets,
16
16
  writeJsonFile
17
- } from "./chunk-2KVQJKIZ.js";
17
+ } from "./chunk-4ENHS32B.js";
18
18
  import "./chunk-2SBBKY5C.js";
19
19
  import "./chunk-GKDUYJ7R.js";
20
20
 
@@ -13,7 +13,7 @@ import {
13
13
  main,
14
14
  parseArgs,
15
15
  readImageSize
16
- } from "./chunk-2KVQJKIZ.js";
16
+ } from "./chunk-4ENHS32B.js";
17
17
  import "./chunk-2SBBKY5C.js";
18
18
  import "./chunk-GKDUYJ7R.js";
19
19