Repository navigation
Harness: budget pauses close the run; plans, previews, tool drift and decoys - #7
Merged
Merged
Conversation
… decoys Brings Scute::Harness up to @scute/harness (TypeScript): - A check answered deny with reason budget_exceeded (Scute paused the agent and ended its tasks) closes the run for good, like task_closed; it never mints a new task for the paused agent. - run.request_plan(calls, reason:) files several calls for one review, built from the tool specs with each call's arguments as its details, and keeps the plan id in the run's state. Checks then send the plan and the call's arguments (a filed approval for the exact call still wins), so each approved step runs once. run.plan_status shows where it stands. - run.preview(tool, args) is a dry run: no proofs, no budget used. - run.report_tools(definitions) sends a SHA-256 per tool definition (name, description, input schema, keys sorted at every level), the same hash as the TypeScript harness; only hashes leave the process. - Scute::Guards.decoy(tools) refuses a call to a decoy tool, reports it (Scute pauses the agent) and closes the run, even when the report can't be sent. Unit tests against the fake API. The live suite checks the budget pause closing the run; the plan, preview, drift and decoy examples are written and skipped until the API deploys them. README section and CHANGELOG line.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Brings
Scute::Harnessup to@scute/harness(TypeScript), including its fix that closes the run when Scute pauses the agent over budget. The plans, preview, drift and decoy endpoints are in open API PRs, not deployed yet.What changes
denywith reasonbudget_exceededmeans Scute paused the agent and ended its tasks.task_closed, and never mints a new task for the paused agent.run.request_plan(calls, reason:)files several calls for one review (POST /agent/plans).details. The plan id is kept in the run's state.planwith the call's arguments asdetails, so each approved step runs once. An approval filed for the exact call still takes precedence.run.plan_statusreads the plan (GET /agent/plans/:id). Anot_neededanswer keeps no plan.run.preview(tool, args)sends a dry run (dry_run: true) with no proofs and no plan. It doesn't count toward the budget guard, and it answers anAuthz::Decision.run.report_tools(definitions)sends{ name, hash }per tool (POST /agent/tools).{ name, description ("" when missing), inputSchema (null when missing) }, with object keys sorted at every level.Scute::Guards.decoy(tools)refuses a call to a decoy tool ("I can't continue with this. A person will follow up.", reasondecoy_called), reports it (POST /agent/decoys, Scute pauses the agent) and closes the run.report: falseonly refuses.The new run methods live in two small modules (
Harness::Plans,Harness::ToolReports), included inRunlikeHumanSteps.Tests
bundle exec rake liveagainst scute-api-v2: 82 examples, 0 failures, 5 pending.run.tokenanswerstask_closed, and no second task was minted.README section ("Plans and previews", "Tool drift and decoys") and a CHANGELOG line.