forked from Keelrleek/Harbor
next_functions, defer and decomp_progress: an easy-first queue per band, deferrals with reasons, tiered progress
This commit is contained in:
1 parent
ec210c019f
commit
2d2f5fe7c5
5 files changed
+325
-3
No files matched your search
@@ -262,6 +262,13 @@ def build_parser():
|
||||
p.add_argument("--max-bytes", type=int, dest="max_bytes")
|
||||
p.add_argument("--count", type=int, default=16)
|
||||
p.add_argument("--as", dest="as_type", default="hex", choices=["hex", "int32", "uint32", "float", "double", "string"])
|
||||
p = sub.add_parser("next-functions", help="functions in your bands to decompile next, easiest first")
|
||||
p.add_argument("-n", type=int, default=10)
|
||||
p = sub.add_parser("defer", help="set a function aside with a reason and evidence")
|
||||
p.add_argument("address")
|
||||
p.add_argument("reason")
|
||||
p.add_argument("evidence")
|
||||
sub.add_parser("progress", help="functions and bytes per tier: exact, verified, readable, deferred, raw")
|
||||
p = sub.add_parser("feed", help="the latest tool calls of the team (or one agent), from the hooks")
|
||||
p.add_argument("--agent", dest="filter_agent")
|
||||
p.add_argument("--limit", type=int, default=30)
|
||||
@@ -706,6 +713,20 @@ def main(argv=None):
|
||||
else:
|
||||
res = r.lookup(args.target)
|
||||
out(res, json.dumps(res, indent=1))
|
||||
elif cmd in ("next-functions", "defer", "progress"):
|
||||
from .queue import FunctionQueue
|
||||
q = FunctionQueue(harbor)
|
||||
if cmd == "next-functions":
|
||||
rows = q.next_functions(who(), args.n)
|
||||
out(rows, "\n".join(f"{r['address']:<10} {r['score']:<7} {(r['name'] or r['file'] or ''):<34} {r['why']}"
|
||||
for r in rows))
|
||||
elif cmd == "defer":
|
||||
res = q.defer(who(), args.address, args.reason, args.evidence)
|
||||
out(res, f"deferred {args.address}: {args.reason}")
|
||||
else:
|
||||
res = q.progress()
|
||||
out(res, "\n".join(f"{t:<9} {v['functions']:>6} functions {v['bytes']:>9} bytes"
|
||||
for t, v in res["tiers"].items()))
|
||||
elif cmd == "who":
|
||||
rows = harbor.experts(args.scope)
|
||||
out(rows, "\n".join(f"{e['agent']:<9} " + ", ".join(f"{v} {k}" for k, v in e["detail"].items()) for e in rows)
|
||||
|
||||
Reference in new issue
Block a user