omp-fabric 1.0.3 → 1.0.4

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.4
4
+
5
+ ### Fixed
6
+
7
+ - `omp.ls` was the one core tool that never emitted the partial-result marker, so a listing the host clamped at its entry cap looked complete to any program following the documented contract. It now carries the same marker, and its continuation is real: the host does not clamp a larger `ls` limit, so the marker offers one that returns the rest.
8
+
3
9
  ## 1.0.3
4
10
 
5
11
  ### Fixed
@@ -8871,6 +8871,19 @@ var findTruncationSignal = (details) => {
8871
8871
  note: `The host caps find at ${reached ?? "its result limit"} results and clamps any larger limit, so narrow pattern or path, or enumerate with omp.bash.`
8872
8872
  };
8873
8873
  };
8874
+ var lsTruncationSignal = (details) => {
8875
+ const reached = finiteNumber2(asRecord(details)?.entryLimitReached);
8876
+ if (reached === void 0) return void 0;
8877
+ const next = reached * 2;
8878
+ return {
8879
+ tool: "ls",
8880
+ partial: true,
8881
+ reasons: ["entryLimit"],
8882
+ entryLimit: reached,
8883
+ continue: { limit: next },
8884
+ note: `The host stopped the listing at ${reached} entries; re-run omp.ls with limit=${next} \u2014 the host does not clamp a larger ls limit \u2014 or enumerate with omp.bash.`
8885
+ };
8886
+ };
8874
8887
  var resultHasTruncation = (details) => {
8875
8888
  if (details === null || typeof details !== "object" || Array.isArray(details)) return false;
8876
8889
  const meta = Reflect.get(details, "meta");
@@ -8901,7 +8914,10 @@ var normalizeResult = (name, result, artifactPaths, appendReadNewline = true, ex
8901
8914
  const signal = findTruncationSignal(result.details);
8902
8915
  return signal ? appendTruncationMarker(text, signal) : text;
8903
8916
  }
8904
- if (name === "ls") return text;
8917
+ if (name === "ls") {
8918
+ const signal = lsTruncationSignal(result.details);
8919
+ return signal ? appendTruncationMarker(text, signal) : text;
8920
+ }
8905
8921
  let details = result.details;
8906
8922
  let output = text;
8907
8923
  if (isOmpShellToolName(name) && details && typeof details === "object" && !Array.isArray(details)) {