probe-research 0.10.2 → 0.10.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/bin/probe-research.js +25 -7
- package/package.json +1 -1
package/bin/probe-research.js
CHANGED
|
@@ -35,10 +35,12 @@ const DIST = "probe-research";
|
|
|
35
35
|
* `probe-research==<our version>` resolves to a PyPI version that does not
|
|
36
36
|
* exist. That is exactly how 0.10.1 shipped broken.
|
|
37
37
|
*
|
|
38
|
-
* Bump this only when the launcher starts depending on a NEW CLI feature
|
|
39
|
-
*
|
|
38
|
+
* Bump this only when the launcher starts depending on a NEW CLI feature —
|
|
39
|
+
* or when the plugin's skill prose starts referencing new CLI verbs, so a
|
|
40
|
+
* fresh install can never pair old-CLI with new-prose (0066 tags review).
|
|
41
|
+
* 0.24.0 is the release that introduced the `tag` verbs and tags filters.
|
|
40
42
|
*/
|
|
41
|
-
const MIN_CLI = "0.
|
|
43
|
+
const MIN_CLI = "0.24.0";
|
|
42
44
|
const UV_INSTALL = "curl -LsSf https://astral.sh/uv/install.sh | sh";
|
|
43
45
|
|
|
44
46
|
/** Compare dotted numeric versions. Returns true when `a` >= `b`. */
|
|
@@ -100,15 +102,29 @@ function main() {
|
|
|
100
102
|
if (found && atLeast(found, wanted)) return run("probe", forwarded);
|
|
101
103
|
console.error(
|
|
102
104
|
`probe-research: installed probe ${found || "(unknown version)"} is older than ` +
|
|
103
|
-
`${wanted}; fetching
|
|
105
|
+
`${wanted}; fetching the latest…`,
|
|
104
106
|
);
|
|
105
107
|
}
|
|
106
108
|
// A FLOOR, not an exact pin. Unpinned, `uv tool run --from probe-research`
|
|
107
109
|
// reuses an already-installed 0.8.2 tool; pinned exactly, it demands a PyPI
|
|
108
110
|
// version that may not exist. `>=` fixes both.
|
|
109
111
|
const spec = `${DIST}>=${wanted}`;
|
|
110
|
-
|
|
111
|
-
|
|
112
|
+
// REFRESH. uv caches the ENVIRONMENT it built for a requirement, so a range
|
|
113
|
+
// like `>=0.10.0` keeps serving whatever it resolved the FIRST time — every
|
|
114
|
+
// user frozen on the version they happened to run on day one, with the
|
|
115
|
+
// launcher silently never delivering another update.
|
|
116
|
+
//
|
|
117
|
+
// It has to be the full `--refresh`: `--refresh-package` only refreshes
|
|
118
|
+
// package METADATA and still reuses the built environment (measured — it
|
|
119
|
+
// kept returning 0.10.0 after 0.10.1 was published). The full refresh costs
|
|
120
|
+
// ~100ms, which is nothing for a command that only runs when there is no
|
|
121
|
+
// usable local install.
|
|
122
|
+
if (has("uv")) {
|
|
123
|
+
return run("uv", ["tool", "run", "--refresh", "--from", spec, "probe", ...forwarded]);
|
|
124
|
+
}
|
|
125
|
+
if (has("pipx")) {
|
|
126
|
+
return run("pipx", ["run", "--no-cache", "--spec", spec, "probe", ...forwarded]);
|
|
127
|
+
}
|
|
112
128
|
|
|
113
129
|
if (process.platform === "win32") {
|
|
114
130
|
console.error(
|
|
@@ -129,7 +145,9 @@ function main() {
|
|
|
129
145
|
// The installer drops uv in ~/.local/bin, which is not on THIS process's PATH
|
|
130
146
|
// because it was resolved before the install ran.
|
|
131
147
|
const uv = `${os.homedir()}/.local/bin/uv`;
|
|
132
|
-
return run(uv, [
|
|
148
|
+
return run(uv, [
|
|
149
|
+
"tool", "run", "--refresh", "--from", `${DIST}>=${wanted}`, "probe", ...forwarded,
|
|
150
|
+
]);
|
|
133
151
|
}
|
|
134
152
|
|
|
135
153
|
main();
|