probe-research 0.31.0 → 0.32.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 +6 -3
- package/package.json +1 -1
package/bin/probe-research.js
CHANGED
|
@@ -831,11 +831,14 @@ function sleep(ms) {
|
|
|
831
831
|
}
|
|
832
832
|
|
|
833
833
|
/** Run an agent's call (`step`) under the backstop; a call it had to stop answers `run_again` (75). */
|
|
834
|
-
async function runAgentCall(cmd, cmdArgs, startedMs, step) {
|
|
834
|
+
async function runAgentCall(cmd, cmdArgs, startedMs, step, watch = null) {
|
|
835
835
|
const ran = await agentRun.runWithBackstop(cmd, cmdArgs, { deadlineMs: startedMs + agentRun.AGENT_BUDGET_MS });
|
|
836
836
|
if (ran.stopped) {
|
|
837
|
+
// `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
|
+
if (watch) await watch.update();
|
|
837
840
|
await refuseAgent(step, agentRun.Reason.RUN_AGAIN, "Stopped at the agent's time limit: run the same command again.",
|
|
838
|
-
agentRun.EXIT_AGAIN);
|
|
841
|
+
agentRun.EXIT_AGAIN, watch ? watch.getFacts() : {});
|
|
839
842
|
}
|
|
840
843
|
if (ran.error) await refuseAgent(step, agentRun.Reason.INCOMPLETE, `could not run ${cmd}: ${ran.error}`, 1);
|
|
841
844
|
if (SHIM_REASONS[ran.code]) {
|
|
@@ -1036,7 +1039,7 @@ async function waitForSignIn(json, startedMs) {
|
|
|
1036
1039
|
// Read only while it waited for the install: a `probe` already here is handed the sign-in at once.
|
|
1037
1040
|
if (watch.hasWatched()) await sayInstalled(watch, startedMs);
|
|
1038
1041
|
return runAgentCall(probe, ["wizard", "--action", "login", "--pending", ...(json ? ["--json"] : [])], startedMs,
|
|
1039
|
-
AgentStep.SIGN_IN_WAIT);
|
|
1042
|
+
AgentStep.SIGN_IN_WAIT, watch);
|
|
1040
1043
|
}
|
|
1041
1044
|
|
|
1042
1045
|
/** Probe installed during the wait (PR39): approved, say so, and hand the CLI the save only with time for it. */
|