fluncle 0.291.0 → 0.292.0

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 (2) hide show
  1. package/bin/fluncle.mjs +153 -59
  2. package/package.json +1 -1
package/bin/fluncle.mjs CHANGED
@@ -24422,7 +24422,7 @@ function parseVersion(version) {
24422
24422
  var currentVersion;
24423
24423
  var init_version = __esm(() => {
24424
24424
  init_output();
24425
- currentVersion = "0.291.0".trim() ? "0.291.0".trim() : "0.1.0";
24425
+ currentVersion = "0.292.0".trim() ? "0.292.0".trim() : "0.1.0";
24426
24426
  });
24427
24427
 
24428
24428
  // src/update-notifier.ts
@@ -25987,7 +25987,7 @@ function parseVersion2(version) {
25987
25987
  var currentVersion2, latestReleaseUrl = "https://api.github.com/repos/mauricekleine/fluncle/releases/latest";
25988
25988
  var init_version2 = __esm(() => {
25989
25989
  init_output();
25990
- currentVersion2 = "0.291.0".trim() ? "0.291.0".trim() : "0.1.0";
25990
+ currentVersion2 = "0.292.0".trim() ? "0.292.0".trim() : "0.1.0";
25991
25991
  });
25992
25992
 
25993
25993
  // ../../packages/registry/src/index.ts
@@ -27856,6 +27856,77 @@ var init_status = __esm(() => {
27856
27856
  };
27857
27857
  });
27858
27858
 
27859
+ // ../../packages/contracts/src/video-bundle.ts
27860
+ function missingBundleFiles(required, hasArtifact) {
27861
+ return required.filter((id) => !hasArtifact(id)).map((id) => VIDEO_ARTIFACTS2[id].name);
27862
+ }
27863
+ var VIDEO_ARTIFACTS2, VIDEO_ARTIFACT_IDS2, RERENDER_REQUIRED_ARTIFACTS2, RERENDER_ADVISORY_ARTIFACTS, PUBLISH_REQUIRED_ARTIFACTS2;
27864
+ var init_video_bundle = __esm(() => {
27865
+ VIDEO_ARTIFACTS2 = {
27866
+ composition: {
27867
+ contentType: "text/plain; charset=utf-8",
27868
+ field: "composition",
27869
+ name: "composition.tsx"
27870
+ },
27871
+ cover: { contentType: "image/jpeg", field: "cover", name: "cover.jpg" },
27872
+ footage: { contentType: "video/mp4", field: "footage", name: "footage.mp4" },
27873
+ footageLandscape: {
27874
+ contentType: "video/mp4",
27875
+ field: "footage-landscape",
27876
+ name: "footage.landscape.mp4"
27877
+ },
27878
+ footageLandscapeSocial: {
27879
+ contentType: "video/mp4",
27880
+ field: "footage-landscape-social",
27881
+ name: "footage.landscape.social.mp4"
27882
+ },
27883
+ footageNotext: { contentType: "video/mp4", field: "footage-notext", name: "footage.notext.mp4" },
27884
+ footageSocial: { contentType: "video/mp4", field: "footage-social", name: "footage.social.mp4" },
27885
+ intent: { contentType: "application/json; charset=utf-8", field: "intent", name: "intent.json" },
27886
+ metrics: {
27887
+ contentType: "application/json; charset=utf-8",
27888
+ field: "metrics",
27889
+ name: "metrics.json"
27890
+ },
27891
+ note: { contentType: "text/plain; charset=utf-8", field: "note", name: "note.txt" },
27892
+ plate: { contentType: "image/png", field: "plate", name: "plate.png" },
27893
+ plateBackground: {
27894
+ contentType: "image/png",
27895
+ field: "plate-background",
27896
+ name: "plate.background.png"
27897
+ },
27898
+ poster: { contentType: "image/jpeg", field: "poster", name: "poster.jpg" },
27899
+ props: { contentType: "application/json; charset=utf-8", field: "props", name: "props.json" },
27900
+ render: { contentType: "application/json; charset=utf-8", field: "render", name: "render.json" },
27901
+ scene: { contentType: "application/json; charset=utf-8", field: "scene", name: "scene.json" }
27902
+ };
27903
+ VIDEO_ARTIFACT_IDS2 = [
27904
+ "footage",
27905
+ "footageSocial",
27906
+ "footageNotext",
27907
+ "footageLandscape",
27908
+ "footageLandscapeSocial",
27909
+ "poster",
27910
+ "cover",
27911
+ "plate",
27912
+ "plateBackground",
27913
+ "note",
27914
+ "composition",
27915
+ "props",
27916
+ "render",
27917
+ "intent",
27918
+ "metrics",
27919
+ "scene"
27920
+ ];
27921
+ RERENDER_REQUIRED_ARTIFACTS2 = ["composition", "props", "render"];
27922
+ RERENDER_ADVISORY_ARTIFACTS = ["intent", "metrics", "scene"];
27923
+ PUBLISH_REQUIRED_ARTIFACTS2 = [
27924
+ "footage",
27925
+ "footageSocial",
27926
+ ...RERENDER_REQUIRED_ARTIFACTS2
27927
+ ];
27928
+ });
27929
+
27859
27930
  // src/commands/track.ts
27860
27931
  async function trackGetCommand(idOrLogId) {
27861
27932
  return publicApiGet(`/api/v1/tracks/${encodeURIComponent(idOrLogId)}`);
@@ -27876,14 +27947,13 @@ function isPlatesOnlyUpload(files) {
27876
27947
  }
27877
27948
  function checkBundleCompleteness(files) {
27878
27949
  const uploadingFootage = FOOTAGE_FIELDS.some((option) => Boolean(files[option]));
27879
- const missingFrom = (specs) => uploadingFootage ? specs.filter((spec) => !files[spec.option]).map((spec) => spec.file) : [];
27880
27950
  const plateWarnings = [];
27881
27951
  if (files.plateBackground && !files.plate) {
27882
27952
  plateWarnings.push("plate.background.png without plate.png. The background is the parallax layer OF a plate; pass --plate (or drop it in the --dir) too");
27883
27953
  }
27884
27954
  return {
27885
- missingAdvisory: missingFrom(RERENDER_ADVISORY_FIELDS),
27886
- missingContract: missingFrom(RERENDER_CONTRACT_FIELDS),
27955
+ missingAdvisory: uploadingFootage ? missingBundleFiles(RERENDER_ADVISORY_ARTIFACTS, (id) => Boolean(files[id])) : [],
27956
+ missingContract: uploadingFootage ? missingBundleFiles(RERENDER_REQUIRED_ARTIFACTS2, (id) => Boolean(files[id])) : [],
27887
27957
  plateWarnings,
27888
27958
  uploadingFootage
27889
27959
  };
@@ -27907,10 +27977,10 @@ function validateBundleCompleteness(files, onProgress, options) {
27907
27977
  }
27908
27978
  async function trackVideoCommand(idOrLogId, files, onProgress, options = {}) {
27909
27979
  validateBundleCompleteness(files, onProgress, options);
27910
- const present = VIDEO_FIELDS.map((spec) => ({
27911
- field: spec.field,
27912
- path: files[spec.option]
27913
- })).filter((spec) => Boolean(spec.path));
27980
+ const present = VIDEO_ARTIFACT_IDS2.flatMap((id) => {
27981
+ const path = files[id];
27982
+ return path ? [{ field: VIDEO_ARTIFACTS2[id].field, path }] : [];
27983
+ });
27914
27984
  if (present.length === 0) {
27915
27985
  throw new CliError("nothing_to_upload", "No bundle files resolved to upload (pass --dir <bundle> or explicit file flags).");
27916
27986
  }
@@ -27945,7 +28015,7 @@ async function trackVideoCommand(idOrLogId, files, onProgress, options = {}) {
27945
28015
  const manifest = files.render ? await readManifestFields(files.render) : {};
27946
28016
  const videoModel = files.model?.trim().slice(0, 120) || manifest.model || DEFAULT_VIDEO_MODEL;
27947
28017
  const videoModelReasoning = files.reasoning?.trim().slice(0, 120) || manifest.reasoning || DEFAULT_VIDEO_REASONING;
27948
- const squared = Boolean(urls["footage"] && urls["footage-social"]);
28018
+ const squared = Boolean(urls[VIDEO_ARTIFACTS2.footage.field] && urls[VIDEO_ARTIFACTS2.footageSocial.field]);
27949
28019
  const finalize = await adminApiPost(`/api/v1/admin/tracks/${encodeURIComponent(idOrLogId)}/video/finalize`, {
27950
28020
  videoModel,
27951
28021
  videoModelReasoning,
@@ -28102,38 +28172,11 @@ async function trackNoteCommand(idOrLogId, options) {
28102
28172
  }
28103
28173
  return adminApiPost(`/api/v1/admin/tracks/${encodeURIComponent(idOrLogId)}/note`, body);
28104
28174
  }
28105
- var DEFAULT_VIDEO_MODEL = "anthropic/claude-opus-5", DEFAULT_VIDEO_REASONING = "high", FOUND_BASE = "https://found.fluncle.com", VIDEO_FIELDS, RERENDER_CONTRACT_FIELDS, RERENDER_ADVISORY_FIELDS, FOOTAGE_FIELDS, PLATE_FIELDS, NON_FILE_OPTIONS, DIVERSITY_LEDGER_FIELDS;
28175
+ var DEFAULT_VIDEO_MODEL = "anthropic/claude-opus-5", DEFAULT_VIDEO_REASONING = "high", FOUND_BASE = "https://found.fluncle.com", FOOTAGE_FIELDS, PLATE_FIELDS, NON_FILE_OPTIONS, DIVERSITY_LEDGER_FIELDS;
28106
28176
  var init_track = __esm(() => {
28177
+ init_video_bundle();
28107
28178
  init_api2();
28108
28179
  init_output();
28109
- VIDEO_FIELDS = [
28110
- { field: "footage", option: "footage" },
28111
- { field: "footage-social", option: "footageSocial" },
28112
- { field: "footage-notext", option: "footageNotext" },
28113
- { field: "footage-landscape", option: "footageLandscape" },
28114
- { field: "footage-landscape-social", option: "footageLandscapeSocial" },
28115
- { field: "poster", option: "poster" },
28116
- { field: "cover", option: "cover" },
28117
- { field: "plate", option: "plate" },
28118
- { field: "plate-background", option: "plateBackground" },
28119
- { field: "note", option: "note" },
28120
- { field: "composition", option: "composition" },
28121
- { field: "props", option: "props" },
28122
- { field: "render", option: "render" },
28123
- { field: "intent", option: "intent" },
28124
- { field: "metrics", option: "metrics" },
28125
- { field: "scene", option: "scene" }
28126
- ];
28127
- RERENDER_CONTRACT_FIELDS = [
28128
- { file: "composition.tsx", option: "composition" },
28129
- { file: "props.json", option: "props" },
28130
- { file: "render.json", option: "render" }
28131
- ];
28132
- RERENDER_ADVISORY_FIELDS = [
28133
- { file: "intent.json", option: "intent" },
28134
- { file: "metrics.json", option: "metrics" },
28135
- { file: "scene.json", option: "scene" }
28136
- ];
28137
28180
  FOOTAGE_FIELDS = [
28138
28181
  "footage",
28139
28182
  "footageSocial",
@@ -28750,6 +28793,7 @@ async function trackUpdateCommand2(trackId, options) {
28750
28793
  return adminApiPatch(`/api/v1/admin/tracks/${encodeURIComponent(trackId)}`, body);
28751
28794
  }
28752
28795
  var init_track2 = __esm(() => {
28796
+ init_video_bundle();
28753
28797
  init_api2();
28754
28798
  init_output();
28755
28799
  });
@@ -32734,6 +32778,72 @@ var init_format2 = __esm(() => {
32734
32778
 
32735
32779
  // src/cli.ts
32736
32780
  import { existsSync as existsSync6, readFileSync as readFileSync7 } from "fs";
32781
+
32782
+ // ../../packages/contracts/src/video-bundle.ts
32783
+ var VIDEO_ARTIFACTS = {
32784
+ composition: {
32785
+ contentType: "text/plain; charset=utf-8",
32786
+ field: "composition",
32787
+ name: "composition.tsx"
32788
+ },
32789
+ cover: { contentType: "image/jpeg", field: "cover", name: "cover.jpg" },
32790
+ footage: { contentType: "video/mp4", field: "footage", name: "footage.mp4" },
32791
+ footageLandscape: {
32792
+ contentType: "video/mp4",
32793
+ field: "footage-landscape",
32794
+ name: "footage.landscape.mp4"
32795
+ },
32796
+ footageLandscapeSocial: {
32797
+ contentType: "video/mp4",
32798
+ field: "footage-landscape-social",
32799
+ name: "footage.landscape.social.mp4"
32800
+ },
32801
+ footageNotext: { contentType: "video/mp4", field: "footage-notext", name: "footage.notext.mp4" },
32802
+ footageSocial: { contentType: "video/mp4", field: "footage-social", name: "footage.social.mp4" },
32803
+ intent: { contentType: "application/json; charset=utf-8", field: "intent", name: "intent.json" },
32804
+ metrics: {
32805
+ contentType: "application/json; charset=utf-8",
32806
+ field: "metrics",
32807
+ name: "metrics.json"
32808
+ },
32809
+ note: { contentType: "text/plain; charset=utf-8", field: "note", name: "note.txt" },
32810
+ plate: { contentType: "image/png", field: "plate", name: "plate.png" },
32811
+ plateBackground: {
32812
+ contentType: "image/png",
32813
+ field: "plate-background",
32814
+ name: "plate.background.png"
32815
+ },
32816
+ poster: { contentType: "image/jpeg", field: "poster", name: "poster.jpg" },
32817
+ props: { contentType: "application/json; charset=utf-8", field: "props", name: "props.json" },
32818
+ render: { contentType: "application/json; charset=utf-8", field: "render", name: "render.json" },
32819
+ scene: { contentType: "application/json; charset=utf-8", field: "scene", name: "scene.json" }
32820
+ };
32821
+ var VIDEO_ARTIFACT_IDS = [
32822
+ "footage",
32823
+ "footageSocial",
32824
+ "footageNotext",
32825
+ "footageLandscape",
32826
+ "footageLandscapeSocial",
32827
+ "poster",
32828
+ "cover",
32829
+ "plate",
32830
+ "plateBackground",
32831
+ "note",
32832
+ "composition",
32833
+ "props",
32834
+ "render",
32835
+ "intent",
32836
+ "metrics",
32837
+ "scene"
32838
+ ];
32839
+ var RERENDER_REQUIRED_ARTIFACTS = ["composition", "props", "render"];
32840
+ var PUBLISH_REQUIRED_ARTIFACTS = [
32841
+ "footage",
32842
+ "footageSocial",
32843
+ ...RERENDER_REQUIRED_ARTIFACTS
32844
+ ];
32845
+
32846
+ // src/cli.ts
32737
32847
  import path2 from "path";
32738
32848
 
32739
32849
  // ../../node_modules/commander/lib/error.js
@@ -38063,26 +38173,10 @@ async function runTrackVideo(idOrLogId, options, trackVideoCommand) {
38063
38173
  }
38064
38174
  return fromDir(name);
38065
38175
  };
38066
- const files = {
38067
- composition: resolveFile(options.composition, "composition.tsx"),
38068
- cover: resolveFile(options.cover, "cover.jpg"),
38069
- footage: resolveFile(options.footage, "footage.mp4"),
38070
- footageLandscape: resolveFile(options.footageLandscape, "footage.landscape.mp4"),
38071
- footageLandscapeSocial: resolveFile(options.footageLandscapeSocial, "footage.landscape.social.mp4"),
38072
- footageNotext: resolveFile(options.footageNotext, "footage.notext.mp4"),
38073
- footageSocial: resolveFile(options.footageSocial, "footage.social.mp4"),
38074
- intent: resolveFile(options.intent, "intent.json"),
38075
- metrics: resolveFile(options.metrics, "metrics.json"),
38076
- model: options.model,
38077
- note: resolveFile(options.note, "note.txt"),
38078
- plate: resolveFile(options.plate, "plate.png"),
38079
- plateBackground: resolveFile(options.plateBackground, "plate.background.png"),
38080
- poster: resolveFile(options.poster, "poster.jpg"),
38081
- props: resolveFile(options.props, "props.json"),
38082
- reasoning: options.reasoning,
38083
- render: resolveFile(options.render, "render.json"),
38084
- scene: resolveFile(options.scene, "scene.json")
38085
- };
38176
+ const files = { model: options.model, reasoning: options.reasoning };
38177
+ for (const id of VIDEO_ARTIFACT_IDS) {
38178
+ files[id] = resolveFile(options[id], VIDEO_ARTIFACTS[id].name);
38179
+ }
38086
38180
  await Promise.resolve().then(() => init_track());
38087
38181
  if (!files.footage && !options.allowPartial && !isPlatesOnlyUpload(files)) {
38088
38182
  throw new Error("A footage cut is required (--footage <file>, or --dir containing footage.mp4). Pass --allow-partial for a deliberate partial refresh (e.g. poster-only), or upload plates alone (--plate/--plate-background) for the plate-lane pre-upload.");
package/package.json CHANGED
@@ -31,5 +31,5 @@
31
31
  "url": "git+https://github.com/mauricekleine/fluncle.git"
32
32
  },
33
33
  "type": "module",
34
- "version": "0.291.0"
34
+ "version": "0.292.0"
35
35
  }