Harness

Language differences

What the TypeScript, Python and Ruby harnesses each have, and where names and behavior differ.

The three harnesses share the decision model, the tool mapping, the guards and the run state. They differ in naming, framework adapters, and a few features.

Features#

FeatureTypeScriptPythonRuby
Guards: permissions, verify the person, approval, requester only, grounding, args, budget, content, customYesYesYes
decoy guardYesNoYes
Plans (requestPlan, planStatus)YesNoYes
Dry-run previewYesNoYes
Tool drift (reportTools)YesNoYes
check, after, wrapYesYesYes
Vercel AI SDK v7 adapterYesNoNo
RubyLLM adapterNoNoYes
Human toolsAI SDK toolsHumanTool callables with JSON SchemaRubyLLM tools, or plain callables
Verification, confirmations, reviewer approvalsYesYesYes
Properties (property, sign)YesYesYes
Runs on a backend task tokenYesYesYes
Grounding requireTranscriptYesNoNo
Built-in storesmemoryStore()MemoryStoreMemoryStore, CacheStore (Rails.cache)
Sync or asyncAsync (promises)SyncSync

Names#

TypeScriptPythonRuby
createHarness({ agent, ... })Harness(agent=..., ...)Scute::Harness.new(agent: ..., ...)
guards.verifyPersonguards.verify_personScute::Guards.verify_person
guards.requesterOnlyguards.requester_onlyScute::Guards.requester_only
defaultTier, onDecision, onAlertdefault_tier, on_decision, on_alertdefault_tier:, on_decision:, on_alert:
harness.run({ actsFor, task: { actions } })harness.run(acts_for=..., actions=...)harness.run(acts_for:, task: { actions: })
run.startVerification(), submitCode(), verificationStatus()start_verification(), submit_code(), verification_status()same as Python
run.complete(), run.revoke()run.complete(), run.revoke()run.complete!, run.revoke!
run.budgetExhausted()run.budget_exhausted()run.budget_exhausted?
run.allowedTools()run.allowed_tools()run.allowed_tools
run.recordUsage({ usd })run.record_usage(usd=...)run.record_usage(usd:)
Verdict runs: kind is proceed or transformverdict.runsverdict.runs?
Decision kinds and modes as stringsstringssymbols (:deny, :monitor, :high)
Event field callIdcall_idcall_id

Guard names, as they appear in results and events: TypeScript uses verifyPerson and requesterOnly; Python and Ruby use verify_person and requester_only. The others are the same everywhere.

Behavior differences#

  • Confirmations. A run.confirm() confirmation is used up when the call runs in Python and Ruby. In TypeScript it is used up when approval passes the call, even if a later guard stops it.
  • after return value. TypeScript returns { result, results }; Python and Ruby return the result.
  • wrap. TypeScript wraps an async function of the arguments object. Python wraps a function called with keyword arguments, works as a decorator, and takes messages for grounding. Ruby wraps a block and returns a lambda. TypeScript and Ruby pass no conversation to grounding.
  • Bad guard answers. TypeScript turns an unknown decision kind into deny with reason invalid_decision. Python and Ruby raise inside the harness, which becomes deny with reason guard_error.
  • Content scanning. TypeScript scans results as JSON-serialized and also checks object keys and text behind invisible characters for injections. Python scans pydantic models, dataclasses and named tuples as dicts; Ruby scans objects through as_json or to_h. Python also treats scak_ keys as credentials.
  • Arg patterns. pattern is a RegExp in TypeScript, a regex string in Python, and a Regexp or string in Ruby.
  • Snapshots. Python and Ruby mask tokens in run.snapshot(). The TypeScript snapshot includes the task token.
  • Errors. TypeScript throws ScuteHarnessError (status, code, body). Python raises APIError, ConfigurationError and ValueError. Ruby raises Scute::APIError, Scute::ConfigurationError and ArgumentError. See types and errors.
  • Closing token runs. TypeScript closes a backend token's task when it has the secret, and throws no_credentials when it does not. Python and Ruby stop the run locally and leave the task to your backend.

Tool drift reports are compatible: Ruby computes the same tool definition hash as TypeScript.