()
| 3566 | |
| 3567 | |
| 3568 | def main() -> None: |
| 3569 | args = parse_args() |
| 3570 | if args.command == "inspect-target": |
| 3571 | result = inspect_target(args.target_path) |
| 3572 | print(json.dumps(result, allow_nan=False, sort_keys=True)) |
| 3573 | return |
| 3574 | if args.command == "inspect-setup": |
| 3575 | result = inspect_setup(args) |
| 3576 | print(json.dumps(result, allow_nan=False, sort_keys=True)) |
| 3577 | return |
| 3578 | with closing(connect()) as connection: |
| 3579 | if args.command == "create-workspace": |
| 3580 | result = create_workspace(connection, args) |
| 3581 | elif args.command == "get-workspace": |
| 3582 | result = workspace_state(connection, args.workspace_id, thread_id=args.thread_id) |
| 3583 | elif args.command == "get-latest-workspace": |
| 3584 | result = latest_workspace(connection, args.thread_id) |
| 3585 | elif args.command == "begin-diff-resolution": |
| 3586 | result = begin_diff_resolution(connection, args) |
| 3587 | elif args.command == "cancel-diff-resolution": |
| 3588 | result = cancel_diff_resolution(connection, args) |
| 3589 | elif args.command == "set-diff-target": |
| 3590 | result = set_diff_target(connection, args) |
| 3591 | elif args.command == "save-workspace": |
| 3592 | result = save_workspace(connection, args) |
| 3593 | elif args.command == "set-capability-preflight": |
| 3594 | result = set_capability_preflight(connection, args) |
| 3595 | elif args.command == "start-scan": |
| 3596 | result = start_scan(connection, args) |
| 3597 | elif args.command == "get-scan": |
| 3598 | result = scan_context(connection, args.scan_id, args.occurrence_id) |
| 3599 | elif args.command == "list-findings": |
| 3600 | result = list_findings(connection, args) |
| 3601 | elif args.command == "update-progress": |
| 3602 | result = update_progress(connection, args) |
| 3603 | elif args.command == "complete-scan": |
| 3604 | result = complete_scan(connection, args) |
| 3605 | elif args.command == "cancel-scan": |
| 3606 | result = cancel_scan(connection, args) |
| 3607 | elif args.command == "fail-scan": |
| 3608 | result = fail_scan(connection, args) |
| 3609 | elif args.command == "mark-handoff-delivered": |
| 3610 | result = mark_handoff_delivered(connection, args) |
| 3611 | elif args.command == "claim-handoff-delivery": |
| 3612 | result = claim_handoff_delivery(connection, args) |
| 3613 | elif args.command == "release-handoff-delivery": |
| 3614 | result = release_handoff_delivery(connection, args) |
| 3615 | elif args.command == "set-finding-triage": |
| 3616 | result = set_finding_triage(connection, args) |
| 3617 | elif args.command == "request-finding-remediation": |
| 3618 | result = request_finding_remediation(connection, args) |
| 3619 | elif args.command == "request-finding-remediation-action": |
| 3620 | result = request_finding_remediation_action(connection, args) |
| 3621 | elif args.command == "claim-finding-remediation-resend": |
| 3622 | result = claim_finding_remediation_resend(connection, args) |
| 3623 | elif args.command == "mark-finding-remediation-delivered": |
| 3624 | result = mark_finding_remediation_delivered(connection, args) |
| 3625 | elif args.command == "release-finding-remediation-claim": |
no test coverage detected