omp-fabric 1.0.2 → 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,18 @@
|
|
|
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
|
+
|
|
9
|
+
## 1.0.3
|
|
10
|
+
|
|
11
|
+
### Fixed
|
|
12
|
+
|
|
13
|
+
- **Reads never paged on Windows.** The guard that decides whether a path is pageable scanned for the last colon in the whole path string, and a Windows drive designator is a colon, so `omp.read` stopped at the host's per-call line cap and reported the wrong reason for stopping. The drive root is now excluded from that scan on every platform. Windows users were getting the truncated reads that 1.0.0 set out to fix.
|
|
14
|
+
- Three test files assumed a POSIX environment: a drive-letter path encoding, two bash fixtures that read `/dev/zero`, and PATH fixtures that Windows could not resolve. All three now run on both platforms with no skips.
|
|
15
|
+
|
|
3
16
|
## 1.0.2
|
|
4
17
|
|
|
5
18
|
### Fixed
|
|
@@ -8730,6 +8730,8 @@ var countLines = (text) => {
|
|
|
8730
8730
|
};
|
|
8731
8731
|
var READ_SELECTOR_PATTERN = /:(raw:)?(\d+)(-(\d+)?)?$/i;
|
|
8732
8732
|
var READ_RAW_SELECTOR_PATTERN = /:raw$/i;
|
|
8733
|
+
var WINDOWS_PATH_ROOT_PATTERN = /^(?:\\\\[?.]\\)?[A-Za-z]:(?=[\\/])/;
|
|
8734
|
+
var withoutWindowsRoot = (rawPath) => rawPath.slice(WINDOWS_PATH_ROOT_PATTERN.exec(rawPath)?.[0].length ?? 0);
|
|
8733
8735
|
var readPageSelector = (target, offset) => target.endLimit === Number.POSITIVE_INFINITY ? `${target.base}:raw:${offset}-` : `${target.base}:raw:${offset}-${target.endLimit}`;
|
|
8734
8736
|
var parseReadTarget = (rawPath) => {
|
|
8735
8737
|
if (typeof rawPath !== "string" || rawPath.length === 0 || rawPath.includes("://")) return void 0;
|
|
@@ -8747,8 +8749,9 @@ var parseReadTarget = (rawPath) => {
|
|
|
8747
8749
|
selected: true
|
|
8748
8750
|
};
|
|
8749
8751
|
}
|
|
8750
|
-
const
|
|
8751
|
-
const
|
|
8752
|
+
const body = withoutWindowsRoot(rawPath);
|
|
8753
|
+
const lastColon = body.lastIndexOf(":");
|
|
8754
|
+
const suffix = lastColon === -1 ? "" : body.slice(lastColon + 1);
|
|
8752
8755
|
const pageable = suffix.length === 0;
|
|
8753
8756
|
return { base: rawPath, start: 1, endLimit: Number.POSITIVE_INFINITY, pageable, selected: false };
|
|
8754
8757
|
};
|
|
@@ -8868,6 +8871,19 @@ var findTruncationSignal = (details) => {
|
|
|
8868
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.`
|
|
8869
8872
|
};
|
|
8870
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
|
+
};
|
|
8871
8887
|
var resultHasTruncation = (details) => {
|
|
8872
8888
|
if (details === null || typeof details !== "object" || Array.isArray(details)) return false;
|
|
8873
8889
|
const meta = Reflect.get(details, "meta");
|
|
@@ -8898,7 +8914,10 @@ var normalizeResult = (name, result, artifactPaths, appendReadNewline = true, ex
|
|
|
8898
8914
|
const signal = findTruncationSignal(result.details);
|
|
8899
8915
|
return signal ? appendTruncationMarker(text, signal) : text;
|
|
8900
8916
|
}
|
|
8901
|
-
if (name === "ls")
|
|
8917
|
+
if (name === "ls") {
|
|
8918
|
+
const signal = lsTruncationSignal(result.details);
|
|
8919
|
+
return signal ? appendTruncationMarker(text, signal) : text;
|
|
8920
|
+
}
|
|
8902
8921
|
let details = result.details;
|
|
8903
8922
|
let output = text;
|
|
8904
8923
|
if (isOmpShellToolName(name) && details && typeof details === "object" && !Array.isArray(details)) {
|