probe-research 0.12.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 +4 -1
- package/bin/probe-research.js +57 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -16,7 +16,10 @@ npx probe-research install ABCD234567
|
|
|
16
16
|
|
|
17
17
|
The 10-character code signs you in once without another browser approval, and
|
|
18
18
|
`install` opens the guided tooling setup for Claude Code, Codex, or pi. Choose
|
|
19
|
-
your agents
|
|
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
|
|
20
23
|
selected agent receives its own capture credential when capture is enabled.
|
|
21
24
|
|
|
22
25
|
`npx probe-research ABCD234567` also signs in, then opens the main menu.
|
package/bin/probe-research.js
CHANGED
|
@@ -174,13 +174,61 @@ function run(cmd, args) {
|
|
|
174
174
|
process.exit(r.status === null ? 1 : r.status);
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
-
/**
|
|
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
|
+
*/
|
|
178
215
|
function cliArgs(args) {
|
|
179
|
-
|
|
180
|
-
if (
|
|
181
|
-
|
|
182
|
-
if (
|
|
183
|
-
|
|
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];
|
|
184
232
|
}
|
|
185
233
|
return args;
|
|
186
234
|
}
|
|
@@ -228,7 +276,9 @@ async function main() {
|
|
|
228
276
|
// "fetching the latest" and then change nothing. Measured exactly that before
|
|
229
277
|
// this line existed.
|
|
230
278
|
const target = latest && atLeast(latest, wanted) ? latest : wanted;
|
|
231
|
-
|
|
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}`;
|
|
232
282
|
// REFRESH. uv caches the ENVIRONMENT it built for a requirement, so a range
|
|
233
283
|
// like `>=0.10.0` keeps serving whatever it resolved the FIRST time — every
|
|
234
284
|
// user frozen on the version they happened to run on day one, with the
|