with client.messages.stream(
model=model,
max_tokens=max_tokens,
system=system,
tools=TOOLS,
messages=messages,
) as stream:
for event in stream:
... # Emit streaming events; see the full source.
message = stream.get_final_message()
def main() -> int:
parser = argparse.ArgumentParser(description=__doc__)
commands = parser.add_subparsers(dest="command", required=True)
benchmark = commands.add_parser("run", help="Record the working tree and run the standard Harbor workflow")
benchmark.add_argument("--config", type=Path, required=True)
benchmark.add_argument("--job-name")
benchmark.add_argument("--cache-dir", type=Path, default=default_cache_dir())
benchmark.add_argument("--prepare-only", action="store_true", help="Build and record inputs without starting containers or calling the model")
benchmark.add_argument("--install-only", action="store_true", help="Run setup and dependency preflight without calling the model or verifier")
benchmark.add_argument("--legacy-open-network", action="store_true", help="Explicitly reproduce an earlier protocol without integrity enforcement")
audit = commands.add_parser("audit", help="Freeze completed outputs and produce evidence-bound integrity accounting")
audit.add_argument("--job-dir", type=Path, required=True)
audit.add_argument("--output-dir", type=Path, required=True)
audit.add_argument("--review", type=Path, help="Reviewed verdicts bound to this output freeze")
cache = commands.add_parser("import-apt", help="Import a manifest and its sibling packages/ directory")
cache.add_argument("manifest", type=Path)
cache.add_argument("--cache-dir", type=Path, default=default_cache_dir())
retained = commands.add_parser("verify-retained", help="Run an authorized verifier batch on an unchanged retained solution, without model calls")