probe-research 0.33.0 → 0.35.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/bin/probe-research.js +13 -5
- package/package.json +1 -1
- package/upkeep.json +1 -0
package/bin/probe-research.js
CHANGED
|
@@ -150,8 +150,10 @@ const FIX_MIN = "0.385.0";
|
|
|
150
150
|
* PR C's confirmed `service stop` (0.455.0); 0.456.0 was cut before #4527 merged.
|
|
151
151
|
* 0.461.0 since probe auto mode (#4543): `session control` and `install --session-control`, the pages' "Who
|
|
152
152
|
* turns Probe on or off in each chat?"; 0.460.0 was cut before #4543 merged.
|
|
153
|
+
* 0.475.0 since fixes-1108b: `import review --chats-limit` (#4613; past-work.md's "just a few first"), settings
|
|
154
|
+
* read back with `incomplete_settings` and the install's `stage` (#4612, 0.474.0), the W&B login check (#4610).
|
|
153
155
|
*/
|
|
154
|
-
const AGENT_MIN_CLI = "0.
|
|
156
|
+
const AGENT_MIN_CLI = "0.475.0";
|
|
155
157
|
/** `install` flags only AGENT_MIN_CLI knows (D36). */
|
|
156
158
|
const AGENT_INSTALL_FLAGS = Object.freeze(["--recommended", "--who-records", "--session-default", "--session-control",
|
|
157
159
|
"--profile", "--attempt"]);
|
|
@@ -745,6 +747,8 @@ const WAIT_RESERVE_MS = 20 * 1000;
|
|
|
745
747
|
* answer `waiting_for_approval` though the person approved, so the agent runs it again instead.
|
|
746
748
|
*/
|
|
747
749
|
const APPROVED_RESERVE_MS = 30 * 1000;
|
|
750
|
+
/** Kept from `sign-in --wait`'s budget for its one approval read after a stop (the read's own 3 s timeout + 1 s). */
|
|
751
|
+
const APPROVAL_READ_RESERVE_MS = 4 * 1000;
|
|
748
752
|
/** How often a running download is looked at again. */
|
|
749
753
|
const DOWNLOAD_POLL_MS = 1000;
|
|
750
754
|
/** The uninstall barrier (`probe.shared.updates.uninstall_barrier.path`). */
|
|
@@ -832,13 +836,17 @@ function sleep(ms) {
|
|
|
832
836
|
|
|
833
837
|
/** Run an agent's call (`step`) under the backstop; a call it had to stop answers `run_again` (75). */
|
|
834
838
|
async function runAgentCall(cmd, cmdArgs, startedMs, step, watch = null) {
|
|
835
|
-
|
|
839
|
+
// `sign-in --wait` keeps APPROVAL_READ_RESERVE_MS of the budget for the approval read below (#4602 review).
|
|
840
|
+
const deadlineMs = startedMs + agentRun.AGENT_BUDGET_MS - (watch ? APPROVAL_READ_RESERVE_MS : 0);
|
|
841
|
+
const ran = await agentRun.runWithBackstop(cmd, cmdArgs, { deadlineMs });
|
|
836
842
|
if (ran.stopped) {
|
|
837
843
|
// `sign-in --wait`'s (fixes-1108): a call stopped unsaved still says whether the person approved, read once
|
|
838
|
-
// after the CLI is gone, so the agent never says "still waiting" to someone who approved.
|
|
839
|
-
|
|
844
|
+
// after the CLI is gone, so the agent never says "still waiting" to someone who approved. Only while the
|
|
845
|
+
// sign-in still waits: a CLI stopped mid-save already took it, and the server still answers "approved".
|
|
846
|
+
const isWaiting = Boolean(watch && signIn.loadPending());
|
|
847
|
+
if (isWaiting) await watch.update();
|
|
840
848
|
await refuseAgent(step, agentRun.Reason.RUN_AGAIN, "Stopped at the agent's time limit: run the same command again.",
|
|
841
|
-
agentRun.EXIT_AGAIN,
|
|
849
|
+
agentRun.EXIT_AGAIN, isWaiting ? watch.getFacts() : {});
|
|
842
850
|
}
|
|
843
851
|
if (ran.error) await refuseAgent(step, agentRun.Reason.INCOMPLETE, `could not run ${cmd}: ${ran.error}`, 1);
|
|
844
852
|
if (SHIM_REASONS[ran.code]) {
|
package/package.json
CHANGED