Dispatch a parsed `dcode auth` invocation. Returns: Process exit code (`0` on success, non-zero on error).
(args: argparse.Namespace)
| 158 | |
| 159 | |
| 160 | def run_auth_command(args: argparse.Namespace) -> int: |
| 161 | """Dispatch a parsed `dcode auth` invocation. |
| 162 | |
| 163 | Returns: |
| 164 | Process exit code (`0` on success, non-zero on error). |
| 165 | """ |
| 166 | command = getattr(args, "auth_command", None) |
| 167 | if command in {"list", "ls"}: |
| 168 | return _run_list() |
| 169 | if command == "set": |
| 170 | return _run_set( |
| 171 | args.provider, |
| 172 | from_env=args.from_env, |
| 173 | project=getattr(args, "project", None), |
| 174 | ) |
| 175 | if command in {"remove", "rm", "delete"}: |
| 176 | return _run_remove(args.provider) |
| 177 | if command == "status": |
| 178 | return _run_status(getattr(args, "provider", None)) |
| 179 | if command == "path": |
| 180 | return _run_path() |
| 181 | from deepagents_code.ui import show_auth_help |
| 182 | |
| 183 | show_auth_help() |
| 184 | return 0 |
| 185 | |
| 186 | |
| 187 | def _resolution_label(status: ProviderAuthStatus) -> str: |
searching dependent graphs…