probe-research 0.11.0 → 0.13.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.
- package/README.md +27 -5
- package/bin/probe-research.js +88 -4
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -6,14 +6,36 @@ The Probe Research setup wizard.
|
|
|
6
6
|
npx probe-research
|
|
7
7
|
```
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
Signs in to [Probe Research](https://research.prbe.ai) through your browser and
|
|
10
|
+
opens the main wizard menu. If you create an account, finish onboarding on the
|
|
11
|
+
website first. Its final step gives you a command like:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx probe-research install ABCD234567
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
The 10-character code signs you in once without another browser approval, and
|
|
18
|
+
`install` opens the guided tooling setup for Claude Code, Codex, or pi. Choose
|
|
19
|
+
your agents, select past coding sessions and/or a folder to backfill, then
|
|
20
|
+
confirm the capabilities before anything is installed. Imports run after setup
|
|
21
|
+
and show what they found for review before uploading. Both imports are optional;
|
|
22
|
+
choosing only a folder leaves session history out. Each
|
|
23
|
+
selected agent receives its own capture credential when capture is enabled.
|
|
24
|
+
|
|
25
|
+
`npx probe-research ABCD234567` also signs in, then opens the main menu.
|
|
26
|
+
`npx probe-research install` runs guided setup with browser sign-in. Expired or
|
|
27
|
+
already-used codes need to be replaced on the website.
|
|
12
28
|
|
|
13
29
|
This package is a thin launcher. Probe Research is a Python CLI; this exists so
|
|
14
30
|
the entry point matches the `npx <tool>` shape people already expect. It resolves
|
|
15
31
|
a real `probe` (via an existing install, `uv`, or `pipx`) and hands over — there
|
|
16
32
|
is no reimplementation here that could drift from the CLI.
|
|
17
33
|
|
|
18
|
-
|
|
19
|
-
|
|
34
|
+
The main menu requires a signed-in account. Choose **Sign out** to clear this
|
|
35
|
+
device's credentials, stop capture, and exit the wizard. Run the command again
|
|
36
|
+
to sign in to another account. You can also change what's enabled, diagnose a
|
|
37
|
+
problem, update, print the manual steps, or remove Probe from the device.
|
|
38
|
+
|
|
39
|
+
Publishing this launcher requires `probe-research>=0.147.0` to be available on
|
|
40
|
+
PyPI first. That CLI version introduces website sign-in codes; older installed
|
|
41
|
+
CLIs are upgraded before the launcher forwards the new commands.
|
package/bin/probe-research.js
CHANGED
|
@@ -63,14 +63,37 @@ const MANIFEST_TIMEOUT_MS = 1500;
|
|
|
63
63
|
* to repair the thing it installed. A healthy 0.26.x install pays one refetch,
|
|
64
64
|
* which is the right trade against a broken one staying broken forever.
|
|
65
65
|
*
|
|
66
|
-
* (1)
|
|
66
|
+
* (1) was why it was 0.36.0. The dashboard's last onboarding step hands out
|
|
67
67
|
* `npx probe-research backfill`, and `probe backfill` does not exist before
|
|
68
68
|
* 0.36.0. Arguments are forwarded to whatever `probe` this launcher resolves,
|
|
69
69
|
* so under the old floor a user with 0.35.0 on PATH gets `No such command
|
|
70
70
|
* 'backfill'` from a command the product just told them to run. A floor is the
|
|
71
71
|
* only thing that can catch it: the copied command is identical either way.
|
|
72
|
+
*
|
|
73
|
+
* (1) also raised the floor to 0.56.0, and the failure is quieter. 0.56.0 adds the
|
|
74
|
+
* BULK verbs an automated caller reaches for rather than a human:
|
|
75
|
+
*
|
|
76
|
+
* probe artifact add --from-manifest FILE import many files in one process
|
|
77
|
+
* probe artifact move ID --to LEVEL promote/demote/lateral
|
|
78
|
+
* probe metrics backfill RUN --key K a whole derived curve, one request
|
|
79
|
+
*
|
|
80
|
+
* The first of those is the one that makes a floor load-bearing. It exists
|
|
81
|
+
* because per-file `artifact add` costs a process start and a slug resolution
|
|
82
|
+
* each, so 200k files is tens of CPU-hours -- which means whatever issues it is
|
|
83
|
+
* importing at that scale, unattended. Against a pre-0.56.0 `probe` on PATH,
|
|
84
|
+
* `--from-manifest` is an unknown OPTION: the CLI exits 2 having queued
|
|
85
|
+
* nothing, and there is no operator watching to read it. The old floor is
|
|
86
|
+
* satisfied by every one of those installs.
|
|
87
|
+
*
|
|
88
|
+
* PUBLISHING ORDER MATTERS. `${DIST}>=${target}` must resolve, so this package
|
|
89
|
+
* may only be `npm publish`ed once a CLI at or above the floor is live on PyPI.
|
|
90
|
+
* That ordering is not enforced anywhere: the PyPI release is automated and
|
|
91
|
+
* `npm publish` is manual, so it is a human who has to get it right. Raising
|
|
92
|
+
* the floor ahead of the release strands the from-zero entry point.
|
|
72
93
|
*/
|
|
73
|
-
|
|
94
|
+
// 0.147.0 adds positional website sign-in codes to wizard/install. Publish this
|
|
95
|
+
// launcher only after that CLI release is available on PyPI.
|
|
96
|
+
const MIN_CLI = "0.147.0";
|
|
74
97
|
const UV_INSTALL = "curl -LsSf https://astral.sh/uv/install.sh | sh";
|
|
75
98
|
|
|
76
99
|
/** Compare dotted numeric versions. Returns true when `a` >= `b`. */
|
|
@@ -151,11 +174,70 @@ function run(cmd, args) {
|
|
|
151
174
|
process.exit(r.status === null ? 1 : r.status);
|
|
152
175
|
}
|
|
153
176
|
|
|
177
|
+
/**
|
|
178
|
+
* The words the launcher itself interprets. Everything else is a CLI command of
|
|
179
|
+
* its own and is forwarded untouched.
|
|
180
|
+
*
|
|
181
|
+
* Every device setup goes through the wizard (Richard, 2026-09-29), so every
|
|
182
|
+
* setup spelling this package has ever advertised lands on `probe wizard`, and
|
|
183
|
+
* the launcher never forwards a retired setup command such as `probe install`:
|
|
184
|
+
* a later CLI deletes those, and a copied `npx probe-research install CODE` has
|
|
185
|
+
* to keep working across that release.
|
|
186
|
+
*/
|
|
187
|
+
const LauncherVerb = Object.freeze({
|
|
188
|
+
WIZARD: "wizard",
|
|
189
|
+
/** Launcher-only: "straight into the guided install", skipping the menu. */
|
|
190
|
+
INSTALL: "install",
|
|
191
|
+
});
|
|
192
|
+
/** What `install` means -- exactly what `probe install` always ran (`main.py`). */
|
|
193
|
+
const INSTALL_ACTION = Object.freeze(["--action", "configure"]);
|
|
194
|
+
/** The website's one-time sign-in code; the CLI enforces the same shape. */
|
|
195
|
+
const SIGN_IN_CODE = /^[A-Z0-9]{10}$/;
|
|
196
|
+
/** The CLI root's own options: a call that starts with one names its own
|
|
197
|
+
* command (`--base-url X doctor`, `--base-url=X doctor`) and reaches `probe`
|
|
198
|
+
* untouched. */
|
|
199
|
+
const ROOT_ONLY_FLAGS = Object.freeze(["--version", "--help", "--base-url", "--spool-dir", "--async", "--sync"]);
|
|
200
|
+
|
|
201
|
+
/**
|
|
202
|
+
* `probe` arguments for what was typed after `npx probe-research`.
|
|
203
|
+
*
|
|
204
|
+
* (nothing) -> wizard
|
|
205
|
+
* CODE [flags] -> wizard CODE [flags]
|
|
206
|
+
* install [CODE] [flags] -> wizard [CODE] --action configure [flags]
|
|
207
|
+
* CODE install [flags] -> wizard CODE --action configure [flags]
|
|
208
|
+
* --flag ... -> wizard --flag ... (the CLI root's own excepted)
|
|
209
|
+
* anything else -> unchanged (`doctor`, `backfill`, `wizard ...`)
|
|
210
|
+
*
|
|
211
|
+
* A sign-in code keeps its meaning either way: bare, it signs in and opens the
|
|
212
|
+
* menu; with `install`, the one-time exchange waits for the agent selection so
|
|
213
|
+
* it grants exactly what the user chose.
|
|
214
|
+
*/
|
|
215
|
+
function cliArgs(args) {
|
|
216
|
+
const [first, ...rest] = args;
|
|
217
|
+
if (first === undefined) return [LauncherVerb.WIZARD];
|
|
218
|
+
if (SIGN_IN_CODE.test(first)) {
|
|
219
|
+
if (rest[0] === LauncherVerb.INSTALL) {
|
|
220
|
+
return [LauncherVerb.WIZARD, first, ...INSTALL_ACTION, ...rest.slice(1)];
|
|
221
|
+
}
|
|
222
|
+
return [LauncherVerb.WIZARD, first, ...rest];
|
|
223
|
+
}
|
|
224
|
+
if (first === LauncherVerb.INSTALL) {
|
|
225
|
+
const code = rest.length && SIGN_IN_CODE.test(rest[0]) ? rest.slice(0, 1) : [];
|
|
226
|
+
return [LauncherVerb.WIZARD, ...code, ...INSTALL_ACTION, ...rest.slice(code.length)];
|
|
227
|
+
}
|
|
228
|
+
// Flags alone (`npx probe-research --agent codex`) used to reach the CLI's
|
|
229
|
+
// root as `probe --agent codex`, which is not a command at all.
|
|
230
|
+
if (first.startsWith("-") && !ROOT_ONLY_FLAGS.includes(first.split("=")[0])) {
|
|
231
|
+
return [LauncherVerb.WIZARD, ...args];
|
|
232
|
+
}
|
|
233
|
+
return args;
|
|
234
|
+
}
|
|
235
|
+
|
|
154
236
|
async function main() {
|
|
155
237
|
const args = process.argv.slice(2);
|
|
156
238
|
// `npx probe-research` with no arguments runs the wizard — that is the entire
|
|
157
239
|
// reason this package exists, so it should not require remembering a verb.
|
|
158
|
-
const forwarded = args
|
|
240
|
+
const forwarded = cliArgs(args);
|
|
159
241
|
const wanted = MIN_CLI;
|
|
160
242
|
|
|
161
243
|
// Hand off to an existing install only when it is BOTH above the floor and
|
|
@@ -194,7 +276,9 @@ async function main() {
|
|
|
194
276
|
// "fetching the latest" and then change nothing. Measured exactly that before
|
|
195
277
|
// this line existed.
|
|
196
278
|
const target = latest && atLeast(latest, wanted) ? latest : wanted;
|
|
197
|
-
|
|
279
|
+
// `[all]`: the CLI's dependencies are an extra from the release after
|
|
280
|
+
// 0.188 (plan 2.11); asking for it is harmless while core still has them.
|
|
281
|
+
const spec = `${DIST}[all]>=${target}`;
|
|
198
282
|
// REFRESH. uv caches the ENVIRONMENT it built for a requirement, so a range
|
|
199
283
|
// like `>=0.10.0` keeps serving whatever it resolved the FIRST time — every
|
|
200
284
|
// user frozen on the version they happened to run on day one, with the
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "probe-research",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Setup wizard for Probe Research in Claude Code. Runs from zero with npx.",
|
|
3
|
+
"version": "0.13.0",
|
|
4
|
+
"description": "Setup wizard for Probe Research in Claude Code and Codex. Runs from zero with npx.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"probe-research": "bin/probe-research.js"
|
|
7
7
|
},
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"homepage": "https://research.prbe.ai/connect",
|
|
20
20
|
"keywords": [
|
|
21
21
|
"claude-code",
|
|
22
|
+
"codex",
|
|
22
23
|
"mlops",
|
|
23
24
|
"experiment-tracking",
|
|
24
25
|
"probe-research"
|