In most cases it is a bad idea for a defendant to be his own lawyer, and the more complex the situation, the more true that is. If you have been charged, you need a lawyer, and should hire one locally. The lawyer will know the ins and outs of local procedure to try to accomplish your goals.
In answer to your specific questions, the judge and prosecutor have absolute immunity from being sued. The lawyer, not being a public official, is not subject to a 1983 lawsuit, but might be the subject of a state court malpractice lawsuit. I should point out that a person who can be shown as having committed fraud is unlikely to do well in any lawsuit. It is possible that to sue the lawyer you might have to give up the attorney-client privilege as to that lawyer.
It would be appropriate to file a motion in the criminal case, claiming that there was a deal, the prosecutor violated the deal, and/or the attorney committed ineffective assistance of counsel by failing to prepare and get signed the court order as directed. You could request the remedy of a dismissal, or compelling the prosecutor to comply, or other remedy that might be available under local law or procedure.
A leading US Supreme Court case on the prosecutor's duty to comply with his deals is Santobello v. New York, 404 U.S. 257 (1971).
Contact me at 248-399-6930 for a free consultation. You and I do not have an attorney-client relationship formed by our communications on this website. Advice given by me on this website is general advice based on partial information. You should not rely on any advice given without first hiring a lawyer in the area where the case is pending, and providing that lawyer with full information.
You will need an attorney to accomplish what you want to accomplish.
NOT LEGAL ADVICE. FOR EDUCATION AND INFORMATION ONLY. Mr. Rafter is licensed to practice in the Commonwealth of Virginia and the US Federal Courts in Virginia. There is no implied or actual attorney-client relationship arising from this education exchange. You should speak with an attorney licensed in your state, to whom you have provided all the facts before you take steps that may impact your legal rights. Mr. Rafter is under no obligation to answer subsequent emails or phone calls related to this matter.