passport-bridge 0.50.0 → 0.52.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (234) hide show
  1. package/README.md +53 -146
  2. package/dist/cli.js +2 -3
  3. package/dist/cliArgs.d.ts +1 -7
  4. package/dist/cliArgs.js +17 -73
  5. package/dist/cliClient.d.ts +1 -6
  6. package/dist/cliClient.js +1 -16
  7. package/dist/cliConnect.d.ts +4 -21
  8. package/dist/cliConnect.js +14 -18
  9. package/dist/cliConnections.d.ts +5 -7
  10. package/dist/cliConnections.js +10 -21
  11. package/dist/cliGuardHealth.d.ts +3 -3
  12. package/dist/cliGuardHealth.js +4 -8
  13. package/dist/cliHook.d.ts +1 -4
  14. package/dist/cliHook.js +40 -43
  15. package/dist/cliHookAfter.d.ts +2 -25
  16. package/dist/cliHookAfter.js +9 -61
  17. package/dist/cliHookClassify.js +2 -2
  18. package/dist/cliHookDecide.d.ts +6 -1
  19. package/dist/cliHookDecide.js +25 -19
  20. package/dist/cliHookDeliver.d.ts +4 -7
  21. package/dist/cliHookDeliver.js +8 -7
  22. package/dist/cliHookGuard.d.ts +2 -3
  23. package/dist/cliHookGuard.js +2 -3
  24. package/dist/cliHookInstall.d.ts +1 -1
  25. package/dist/cliHookLinks.d.ts +2 -4
  26. package/dist/cliHookLinks.js +3 -22
  27. package/dist/cliHookParse.d.ts +16 -7
  28. package/dist/cliHookParse.js +140 -51
  29. package/dist/cliHookSessionState.d.ts +1 -2
  30. package/dist/cliHookSessionState.js +3 -7
  31. package/dist/cliInit.d.ts +1 -2
  32. package/dist/cliInit.js +5 -11
  33. package/dist/cliMain.js +21 -218
  34. package/dist/cliMemberCall.d.ts +1 -1
  35. package/dist/cliOutput.js +19 -48
  36. package/dist/cliResult.js +2 -6
  37. package/dist/cliSetupOrg.js +2 -4
  38. package/dist/cliStatus.d.ts +0 -3
  39. package/dist/cliStatus.js +5 -40
  40. package/dist/cliStatusLocal.d.ts +3 -13
  41. package/dist/cliStatusLocal.js +2 -11
  42. package/dist/cliSuggest.d.ts +1 -1
  43. package/dist/cliSuggest.js +2 -2
  44. package/dist/commandRepair.d.ts +1 -6
  45. package/dist/commandRepair.js +8 -31
  46. package/dist/completion.js +11 -50
  47. package/dist/connectPayload.d.ts +27 -0
  48. package/dist/connectPayload.js +18 -0
  49. package/dist/connectorKit/cli.generated.d.ts +2 -1
  50. package/dist/connectorKit/cli.generated.js +37 -7
  51. package/dist/connectorKit/launchers.generated.d.ts +34 -0
  52. package/dist/connectorKit/launchers.generated.js +194 -0
  53. package/dist/connectorKit/manifest.generated.d.ts +3 -0
  54. package/dist/connectorKit/manifests/kubernetes.generated.js +5 -2
  55. package/dist/connectorKit/manifests/kubernetesCli.generated.d.ts +3 -2
  56. package/dist/connectorKit/manifests/kubernetesCli.generated.js +24 -3
  57. package/dist/connectorKit/manifests/kubernetesEffects.generated.js +9 -4
  58. package/dist/connectorKit/manifests/kubernetesObjects.generated.js +59 -11
  59. package/dist/connectorKit/manifests/sentryApi.generated.js +11 -9
  60. package/dist/connectorKit/manifests/sentryCapture.generated.js +2 -2
  61. package/dist/connectorKit/manifests/sentryCatalog.generated.d.ts +3 -0
  62. package/dist/connectorKit/manifests/sentryCatalog.generated.js +28 -2
  63. package/dist/connectorKit/manifests/sentryCli.generated.js +7 -6
  64. package/dist/connectorKit/manifests/sentryIssues.generated.d.ts +7 -2
  65. package/dist/connectorKit/manifests/sentryIssues.generated.js +39 -19
  66. package/dist/connectorKit/manifests/terraform.generated.js +20 -7
  67. package/dist/connectorKit/manifests/terraformPlan.generated.d.ts +2 -2
  68. package/dist/connectorKit/manifests/terraformPlan.generated.js +13 -3
  69. package/dist/connectorKit/shell.generated.d.ts +5 -3
  70. package/dist/connectorKit/shell.generated.js +58 -25
  71. package/dist/connectorKit/shellFed.generated.d.ts +30 -0
  72. package/dist/connectorKit/shellFed.generated.js +53 -0
  73. package/dist/{cliHookSpawn.js → connectorKit/spawns.generated.js} +1 -0
  74. package/dist/controlPlaneActions.generated.d.ts +7 -0
  75. package/dist/controlPlaneActions.generated.js +4 -0
  76. package/dist/controlPlaneAnswer.d.ts +1 -3
  77. package/dist/controlPlaneGuard.d.ts +5 -37
  78. package/dist/controlPlaneGuard.js +9 -46
  79. package/dist/controlPlaneIds.d.ts +8 -25
  80. package/dist/controlPlaneIds.js +10 -153
  81. package/dist/controlPlaneKubernetes.d.ts +3 -2
  82. package/dist/controlPlaneKubernetes.js +21 -3
  83. package/dist/controlPlaneLate.d.ts +9 -2
  84. package/dist/controlPlaneLate.js +37 -3
  85. package/dist/controlPlaneLateHold.d.ts +13 -7
  86. package/dist/controlPlaneLateHold.js +29 -10
  87. package/dist/controlPlaneNpm.generated.d.ts +3 -0
  88. package/dist/controlPlaneNpm.generated.js +13 -1
  89. package/dist/controlPlaneNpmGuard.js +7 -7
  90. package/dist/controlPlaneRailwayGuard.d.ts +20 -86
  91. package/dist/controlPlaneRailwayGuard.js +38 -231
  92. package/dist/controlPlaneRailwayReach.d.ts +0 -31
  93. package/dist/controlPlaneRailwayReach.js +5 -131
  94. package/dist/controlPlaneSupabase.d.ts +6 -21
  95. package/dist/controlPlaneSupabase.js +17 -51
  96. package/dist/controlPlaneTerraform.js +25 -11
  97. package/dist/controlPlaneUnnamed.generated.d.ts +1 -1
  98. package/dist/cpCli.d.ts +13 -2
  99. package/dist/cpCli.js +50 -5
  100. package/dist/execShims.d.ts +2 -72
  101. package/dist/execShims.js +24 -303
  102. package/dist/execVendors.d.ts +4 -59
  103. package/dist/execVendors.js +25 -332
  104. package/dist/gitDirs.d.ts +7 -0
  105. package/dist/gitDirs.js +54 -0
  106. package/dist/gitPush.d.ts +1 -3
  107. package/dist/gitPush.js +3 -11
  108. package/dist/gitRun.d.ts +6 -0
  109. package/dist/gitRun.js +18 -0
  110. package/dist/initAppsStep.d.ts +1 -1
  111. package/dist/initAppsStep.js +1 -1
  112. package/dist/initKeysStep.d.ts +5 -13
  113. package/dist/initKeysStep.js +23 -145
  114. package/dist/initOutro.d.ts +1 -4
  115. package/dist/initOutro.js +1 -28
  116. package/dist/initPlan.d.ts +0 -2
  117. package/dist/initPlan.js +4 -31
  118. package/dist/initState.d.ts +1 -2
  119. package/dist/keysHere.d.ts +4 -4
  120. package/dist/keysHere.js +3 -3
  121. package/dist/keysKept.d.ts +0 -3
  122. package/dist/keysKept.js +7 -20
  123. package/dist/keysLocal.d.ts +3 -70
  124. package/dist/keysLocal.js +19 -192
  125. package/dist/keysLocalGoogle.d.ts +0 -31
  126. package/dist/keysLocalGoogle.js +10 -109
  127. package/dist/keysReport.d.ts +2 -36
  128. package/dist/keysReport.js +31 -53
  129. package/dist/keysV1Cleanup.js +4 -1
  130. package/dist/launcherHealth.js +1 -2
  131. package/dist/pluginPin.d.ts +1 -1
  132. package/dist/pluginPin.js +1 -1
  133. package/dist/psqlSupabase.d.ts +50 -0
  134. package/dist/psqlSupabase.js +391 -0
  135. package/dist/scanSignedIn.d.ts +0 -4
  136. package/dist/scanSignedIn.js +4 -6
  137. package/dist/statusKeys.d.ts +4 -1
  138. package/dist/statusKeys.js +6 -0
  139. package/dist/term.js +4 -6
  140. package/dist/terraformPlans.d.ts +3 -0
  141. package/dist/terraformPlans.js +3 -0
  142. package/dist/version.d.ts +1 -1
  143. package/dist/version.js +1 -1
  144. package/npm-shrinkwrap.json +2 -2
  145. package/package.json +1 -10
  146. package/dist/accessClient.d.ts +0 -128
  147. package/dist/accessClient.js +0 -436
  148. package/dist/cliAccess.d.ts +0 -3
  149. package/dist/cliAccess.js +0 -119
  150. package/dist/cliExec.d.ts +0 -51
  151. package/dist/cliExec.js +0 -337
  152. package/dist/cliExecGuard.d.ts +0 -10
  153. package/dist/cliExecGuard.js +0 -36
  154. package/dist/cliGitCredential.d.ts +0 -41
  155. package/dist/cliGitCredential.js +0 -500
  156. package/dist/cliHookRedact.d.ts +0 -29
  157. package/dist/cliHookRedact.js +0 -196
  158. package/dist/cliHookRewrite.d.ts +0 -90
  159. package/dist/cliHookRewrite.js +0 -356
  160. package/dist/cliKeys.d.ts +0 -40
  161. package/dist/cliKeys.js +0 -606
  162. package/dist/cliKeysBack.d.ts +0 -55
  163. package/dist/cliKeysBack.js +0 -131
  164. package/dist/cliKeysKeep.d.ts +0 -34
  165. package/dist/cliKeysKeep.js +0 -111
  166. package/dist/cliKeysRotate.d.ts +0 -24
  167. package/dist/cliKeysRotate.js +0 -161
  168. package/dist/cliKeysShim.d.ts +0 -43
  169. package/dist/cliKeysShim.js +0 -121
  170. package/dist/cliKeysSignOut.d.ts +0 -33
  171. package/dist/cliKeysSignOut.js +0 -72
  172. package/dist/cliKeysTypes.d.ts +0 -74
  173. package/dist/cliKeysTypes.js +0 -1
  174. package/dist/cliKubeCredential.d.ts +0 -58
  175. package/dist/cliKubeCredential.js +0 -301
  176. package/dist/cliPagination.d.ts +0 -15
  177. package/dist/cliPagination.js +0 -55
  178. package/dist/cliReady.d.ts +0 -10
  179. package/dist/cliReady.js +0 -59
  180. package/dist/cliSession.d.ts +0 -20
  181. package/dist/cliSession.js +0 -163
  182. package/dist/controlPlaneExec.d.ts +0 -93
  183. package/dist/controlPlaneExec.js +0 -258
  184. package/dist/execAzure.d.ts +0 -79
  185. package/dist/execAzure.js +0 -280
  186. package/dist/execGit.d.ts +0 -20
  187. package/dist/execGit.js +0 -45
  188. package/dist/execGithubRepo.d.ts +0 -30
  189. package/dist/execGithubRepo.js +0 -191
  190. package/dist/execGoogle.d.ts +0 -17
  191. package/dist/execGoogle.js +0 -52
  192. package/dist/execLinks.d.ts +0 -63
  193. package/dist/execLinks.js +0 -120
  194. package/dist/execMarker.d.ts +0 -7
  195. package/dist/execMarker.js +0 -66
  196. package/dist/execMask.d.ts +0 -55
  197. package/dist/execMask.js +0 -189
  198. package/dist/execNoKey.d.ts +0 -9
  199. package/dist/execNoKey.js +0 -32
  200. package/dist/execSpawn.d.ts +0 -16
  201. package/dist/execSpawn.js +0 -47
  202. package/dist/execTarget.d.ts +0 -10
  203. package/dist/execTarget.js +0 -34
  204. package/dist/gitCredentialRetire.d.ts +0 -25
  205. package/dist/gitCredentialRetire.js +0 -143
  206. package/dist/gitCredentialSetup.d.ts +0 -94
  207. package/dist/gitCredentialSetup.js +0 -357
  208. package/dist/gitInvocation.d.ts +0 -41
  209. package/dist/gitInvocation.js +0 -207
  210. package/dist/gitPushDecisions.d.ts +0 -6
  211. package/dist/gitPushDecisions.js +0 -69
  212. package/dist/gitReadOnly.d.ts +0 -10
  213. package/dist/gitReadOnly.js +0 -57
  214. package/dist/index.d.ts +0 -2
  215. package/dist/index.js +0 -1
  216. package/dist/keysAzure.d.ts +0 -14
  217. package/dist/keysAzure.js +0 -23
  218. package/dist/keysInV1.d.ts +0 -9
  219. package/dist/keysInV1.js +0 -48
  220. package/dist/keysKeychain.d.ts +0 -14
  221. package/dist/keysKeychain.js +0 -52
  222. package/dist/keysLocalEdit.d.ts +0 -13
  223. package/dist/keysLocalEdit.js +0 -153
  224. package/dist/keysSecret.d.ts +0 -6
  225. package/dist/keysSecret.js +0 -43
  226. package/dist/offInV1.d.ts +0 -26
  227. package/dist/offInV1.js +0 -28
  228. package/dist/railwayDecisions.d.ts +0 -12
  229. package/dist/railwayDecisions.js +0 -114
  230. package/dist/releaseTooling.d.ts +0 -7
  231. package/dist/releaseTooling.js +0 -29
  232. package/dist/supabaseDecisions.d.ts +0 -9
  233. package/dist/supabaseDecisions.js +0 -98
  234. /package/dist/{cliHookSpawn.d.ts → connectorKit/spawns.generated.d.ts} +0 -0
package/README.md CHANGED
@@ -31,7 +31,7 @@ Or step by step:
31
31
  passport login
32
32
  passport status
33
33
  passport search "open issues"
34
- passport describe github_search_issues
34
+ passport search github_search_issues
35
35
  passport run github_search_issues '{"query":"SSO"}'
36
36
  ```
37
37
 
@@ -45,34 +45,29 @@ passport run github_search_issues '{"query":"SSO"}'
45
45
  - Remote servers must use HTTPS. Plain HTTP works only on `localhost`, `127.0.0.0/8`, or `::1`.
46
46
  - Requires a gateway reporting serverInfo `passport` 0.5.0 or newer with the four-tool CLI protocol; older servers fail before any tool call.
47
47
  - A profile saved by `passport-bridge login` belongs to an agent, not the CLI. `status`, `doctor`, and every gateway command say so (`This sign-in was made for an agent by passport-bridge login, so Passport CLI can't use it.`, exit 2, cause `agent_sign_in`) and name `passport login` (with `--cloud <origin>` off passportmcp.com); the agent keeps its own sign-in.
48
- - `passport help [command]` documents every option. `passport help` groups commands by what you're doing (Get started, Daily, Troubleshoot); `passport help --all` adds the ones for scripts and integrations (`session`, `access`, `resources`, `prompts`, `kube-credential`, `git-credential`, `completion`), which run either way. For health, `status` is your whole setup (start there), `doctor` says why a command fails, and `ready` runs `doctor`'s checks for scripts and CI. `help`, `version`, `profiles`, `use`, and `completion` work offline.
48
+ - `passport help [command]` documents every option. `passport help` groups commands by what you're doing (Get started, Daily, Troubleshoot); `passport help --all` adds the ones for scripts and integrations (`completion`, `help`). For health, `status` is your whole setup (start there), and `doctor` says why a command fails; in scripts and CI, `doctor --json` and its exit code. `help`, `version`, `profiles`, `use`, and `completion` work offline.
49
49
 
50
50
  ## Commands
51
51
 
52
- | Command | Purpose |
53
- | --------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
54
- | `init [--yes] [--move-keys] [--no-open] [--cloud <origin>] [--skip-apps\|--skip-agents\|--skip-guard] [--verbose] [--json]` | Set up Passport for this computer's agents in one pass. Every step asks first, can be skipped, and is safe to run again. |
55
- | `init --org <pek_key> --yes [--agents <list>] [--lock [--strict]]` | Set up every agent on this computer for your company without asking anything (MDM and scripts); `--lock` (root) locks the guard on. See [Company rollout](#company-rollout). |
56
- | `login` | Browser sign-in or sign-up (or device sign-in with `--workspace`); saves a rotating CLI credential and makes the profile active. |
57
- | `logout` | Revoke the credential and always remove the local profile (warns if revocation fails). |
58
- | `profiles` / `use <name>` | List stored profiles / select the active one. Offline. |
59
- | `status` | Your setup on one screen: you, this computer, each agent's guard and its fix; apps; the CLI keys on this computer; the CLI version. |
60
- | `doctor` | Check Node, how your sign-in is stored, the server, your sign-in, and that this CLI and the server match. Exit 1 on a failed check, 2 when not signed in. |
61
- | `ready` | Readiness preflight for automation; gate on its `ready` field and exit code. |
62
- | `search [query] [--app <key>]` | Search permitted tools. Empty query lists the full catalog. |
63
- | `describe <tool>` | One exact definition with its full parameter schema. |
64
- | `run <tool> [json]` | Run a tool through Passport governance. |
65
- | `connect [app...] [--alias <name>] [--open] [--wait <s>]` | Show member sign-in links and optionally wait for completion. |
66
- | `connections [app] [--no-open]` | What's connected for you and what still needs you, then your connections page in the browser. See [Your connections](#your-connections). |
67
- | `resources [uri] [--out <file>]` | List or read MCP resources. |
68
- | `prompts [name] [--set k=v] [--out <file>]` | List or get MCP prompts. |
69
- | `scan [--path <dir>] [--verbose] [--check]` | Find keys your agents can reach on this computer and what each can do, without an account. Signed in, also report the MCP servers set up in your agents to your workspace and exit 5 when its policy doesn't allow one. `--check` scans files only (not the shell environment), never reports, and exits 5 on a high or medium key. |
70
- | `hook` | Records the CLIs agents run and, with `--guard`, decides each one before it runs from your rules (`install`, `uninstall`, `status`). |
71
- | `session` | Run NDJSON commands over one authenticated MCP session. |
72
- | `access` | Signed managed access: `keygen`, `actions`, `run`, `invoke`, `status`, `cancel`. |
73
- | `update`, `update check`, `update off\|on` | Install the exact version Passport names, check what runs here, or turn automatic updates off on this computer. See [Updates](#updates). |
74
- | `completion <bash\|zsh\|fish>` | Print a completion script. Offline. |
75
- | `help [command]`, `version` | Help; package version and local profile context. |
52
+ | Command | Purpose |
53
+ | ------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
54
+ | `init [--yes] [--no-open] [--cloud <origin>] [--skip-apps\|--skip-agents\|--skip-guard] [--verbose] [--json]` | Set up Passport for this computer's agents in one pass. Every step asks first, can be skipped, and is safe to run again. |
55
+ | `init --org <pek_key> --yes [--agents <list>] [--lock [--strict]]` | Set up every agent on this computer for your company without asking anything (MDM and scripts); `--lock` (root) locks the guard on. See [Company rollout](#company-rollout). |
56
+ | `login` | Browser sign-in or sign-up (or device sign-in with `--workspace`); saves a rotating CLI credential and makes the profile active. |
57
+ | `logout` | Revoke the credential and always remove the local profile (warns if revocation fails). |
58
+ | `profiles` / `use <name>` | List stored profiles / select the active one. Offline. |
59
+ | `status` | Your setup on one screen: you, this computer, each agent's guard and its fix; apps; the CLI keys on this computer; the CLI version. |
60
+ | `doctor` | Check Node, how your sign-in is stored, the server, your sign-in, and that this CLI and the server match. Exit 1 on a failed check, 2 when not signed in. Scripts and CI: `--json` and the exit code. |
61
+ | `search [query] [--app <key>]` | Search permitted tools. Empty query lists the full catalog; one tool's exact name shows its full parameter schema. |
62
+ | `run <tool> [json]` | Run a tool through Passport governance. |
63
+ | `connect [--no-open]` | What's connected for you and what still needs you, then your connections page in the browser. See [Your connections](#your-connections). |
64
+ | `connect <app...> [--alias <name>] [--open] [--wait <s>]` | Show member sign-in links and optionally wait for completion. |
65
+ | `request <app> --reason "<why>"` | Ask for an app your company doesn't offer you yet; no app lists your requests, `--cancel` takes one back. |
66
+ | `scan [--path <dir>] [--verbose] [--check]` | Find keys your agents can reach on this computer and what each can do, without an account. Signed in, also report the MCP servers set up in your agents to your workspace and exit 5 when its policy doesn't allow one. `--check` scans files only (not the shell environment), never reports, and exits 5 on a high or medium key. |
67
+ | `hook` | Records the CLIs agents run and, with `--guard`, decides each one before it runs from your rules (`install`, `uninstall`, `status`). |
68
+ | `update`, `update check`, `update off\|on` | Install the exact version Passport names, check what runs here, or turn automatic updates off on this computer. See [Updates](#updates). |
69
+ | `completion <bash\|zsh\|fish>` | Print a completion script. Offline. |
70
+ | `help [command]`, `version` | Help; package version and local profile context. |
76
71
 
77
72
  Global options: `--profile <name>`, `--json`, `--timeout <seconds>` (default 30), `--quiet`, `--caller <id>`.
78
73
 
@@ -97,29 +92,19 @@ passport connect github --wait 120
97
92
 
98
93
  - An approval-required call exits 4 with its approval ID. `--wait <s>` retries only after a definite `approval_pending` response.
99
94
  - The CLI never retries after a network failure or timeout, since the outcome is unknown.
100
- - `connect` with no app names uses one aggregate link when several apps need sign-in. Agent tokens get guidance but cannot create sign-in links.
95
+ - `connect --wait` with no app names uses one aggregate link when several apps need sign-in. Agent tokens get guidance but cannot create sign-in links; for them, bare `connect` lists their connections.
101
96
 
102
97
  ### Your connections
103
98
 
104
99
  ```sh
105
- passport connections
106
- passport connections github
100
+ passport connect
101
+ passport connect --no-open
107
102
  ```
108
103
 
109
- - Lists every app you're granted: `Connected as you`, `Needs connecting`, `Ready · connected by your company` (no sign-in of yours), or `Waiting on your admin`. Apps that need you come first; a named app comes before them.
104
+ - `passport connect` with no app (signed in as a person) lists every app you're granted: `Connected as you`, `Needs connecting`, `Ready · connected by your company` (no sign-in of yours), or `Waiting on your admin`. Apps that need you come first. With an app (`passport connect github`) it shows that app's sign-in link instead.
110
105
  - Then opens your connections page in the browser (`#cp/connections`), where Connect and Reconnect start your own sign-in with the app. `--no-open` and `--json` print the link instead. The link works for 10 minutes and never signs a browser in: it goes through your workspace's sign-in when the browser isn't signed in, and refuses a browser signed in as someone else.
111
- - When the CLI or an agent is refused because an app needs connecting, the refusal names `passport connections <app>`; the MCP's `passport_manage_connections` returns the same page as `connectionsUrl`.
112
- - `--json`: `{workspace,apps:[{app,name,status,connectedAs?}],needsYou,url?,expiresAt?,opened}`. Agent tokens have no connections page (exit 6, `member_profile_required`).
113
-
114
- ### Resources and prompts
115
-
116
- ```sh
117
- passport resources passport+github://welcome
118
- passport resources passport+github://image --out image.png
119
- passport prompts github_summarize --set note=welcome
120
- ```
121
-
122
- Human mode prints text content. Binary content needs `--out <file>` or `--json`.
106
+ - When the CLI or an agent is refused because an app needs connecting, the refusal names `passport connect <app> --wait 120`; the MCP's `passport_manage_connections` returns the same page as `connectionsUrl`.
107
+ - `--json`: `{workspace,apps:[{app,name,status,connectedAs?}],needsYou,url?,expiresAt?,opened}`. Agent tokens have no connections page.
123
108
 
124
109
  ### Key scan
125
110
 
@@ -132,9 +117,9 @@ passport scan --local # signed in, but send nothing
132
117
 
133
118
  Reads agent MCP configs (Claude Desktop, Claude Code, Cursor, VS Code, Codex), CLI sign-in files (GitHub CLI, Railway, Vercel, Wrangler, AWS, Stripe CLI, Supabase, npm, Composer), well-known shell variable names, and `.env*` files up to three folders deep in the project. It never prints, saves, or sends any part of a key, needs no profile, and skips `.env` files in your home folder. Sign-ins held by the OS keychain are named but not flagged. `passport-bridge scan` and `passport-bridge init` run the `passport` CLI's own implementation.
134
119
 
135
- It ends with the CLI keys found on this computer (`CLI keys on this computer, which stay: Railway, Cloudflare.`) and an npm token's own line. They stay: in v1 Passport holds no keys (`src/offInV1.ts`). That list (`src/keysHere.ts`, plus `~/.npmrc`) is the one `passport status` and `passport keys` show. Each entry is a vendor, a file, and, signed in, a fingerprint (`fp_` and 8 characters of an HMAC keyed with `$PASSPORT_HOME/opaque-salt`, which never leaves the computer); `--verbose` shows them and `--json` carries them as `keys`.
120
+ It ends with the CLI keys found on this computer (`CLI keys on this computer, which stay: Railway, Cloudflare.`) and an npm token's own line. They stay: in v1 Passport holds no keys. That list (`src/keysHere.ts`, plus `~/.npmrc`) is the one `passport status` shows. Each entry is a vendor, a file, and, signed in, a fingerprint (`fp_` and 8 characters of an HMAC keyed with `$PASSPORT_HOME/opaque-salt`, which never leaves the computer); `--verbose` shows them and `--json` carries them as `keys`.
136
121
 
137
- Signed in (a member profile, never an agent token), scan then sends the MCP-config inventory to `POST /api/my/discovery/scan` for **Agents → Discovered**: the computer's name, and each MCP server's name and how it connects (a host, or a command class like `npx`), never paths, arguments, environment values, or keys. After the inventory is in, it sends the keys list's counts by app name to `POST /api/my/keys/report`, so To fix matches; never a value, file, or fingerprint. The closing lines say exactly that before what Passport made of it: `No key left this computer.`, `Signed in, so Passport got this computer's name, each MCP server's name and how it connects (a host, or a command like npx), and how many keys each app has here. Never env values, arguments, files, or keys. To skip this: passport scan --local`, then `Sent the MCP setup on <computer> to Passport: …`. A workspace that requires MCP servers to go through Passport makes it exit 5. A problem sending it is one line (`Couldn't send this computer's MCP setup to Passport, so nothing was saved there.` and the server's reason) and never fails the scan. Without a profile, with `--local`, and with `--check`, nothing leaves the computer (`Nothing left this computer.`). `passport discover` is its old name: it still sends the inventory alone, with the same output and exit code, and says `passport discover is now part of passport scan.` on stderr.
122
+ Signed in (a member profile, never an agent token), scan then sends the MCP-config inventory to `POST /api/my/discovery/scan` for **Agents → Discovered**: the computer's name, and each MCP server's name and how it connects (a host, or a command class like `npx`), never paths, arguments, environment values, or keys. After the inventory is in, it sends the keys list's counts by app name to `POST /api/my/keys/report`, so To fix matches; never a value, file, or fingerprint. The closing lines say exactly that before what Passport made of it: `No key left this computer.`, `Signed in, so Passport got this computer's name, each MCP server's name and how it connects (a host, or a command like npx), and how many keys each app has here. Never env values, arguments, files, or keys. To skip this: passport scan --local`, then `Sent the MCP setup on <computer> to Passport: …`. A workspace that requires MCP servers to go through Passport makes it exit 5. A problem sending it is one line (`Couldn't send this computer's MCP setup to Passport, so nothing was saved there.` and the server's reason) and never fails the scan. Without a profile, with `--local`, and with `--check`, nothing leaves the computer (`Nothing left this computer.`).
138
123
 
139
124
  ### Set up with init
140
125
 
@@ -152,7 +137,7 @@ Six steps, each reusing the command that owns it:
152
137
  1. **Scan**: the same local scan as `passport scan`, as one summary line (`--verbose` prints the table).
153
138
  2. **Sign in**: reuses the active or only CLI profile, asks which one when there are several, or runs the browser sign-in from `passport login`.
154
139
  3. **Apps**: Railway, Vercel, Supabase, Cloudflare, GitHub, and Stripe, when the scan found a key or its CLI is on PATH. Missing apps are added through the same catalog rules as the web (an app your workspace reviews first says `! Stripe needs approval from your admin.`), then one sign-in page covers the rest. In a terminal init waits until they connect (Enter stops waiting); with `--yes` or without a terminal it prints the page, adds `passport connect --wait 300` to `next`, and moves on.
155
- 4. **Keys**: in v1 Passport holds no keys, so init moves nothing (`--move-keys` is accepted and does nothing). The plan lists what it found: `Your GitHub and Railway keys stay on this computer.`
140
+ 4. **Keys**: in v1 Passport holds no keys, so init moves nothing. The plan lists what it found: `Your GitHub and Railway keys stay on this computer.`
156
141
  5. **Agents**: Passport's one MCP URL with this workspace as its hint (`https://passportmcp.com/mcp?ws=<workspace>`), with each agent's own browser sign-in; a server that doesn't serve `/mcp` yet (read from its OAuth protected-resource metadata) gets the workspace's own URL (`https://<host>/w/<workspace>/mcp`). An entry already at the one URL counts as set up. Once the server serves `/mcp`, an entry at this workspace's own URL or a local bridge entry for this workspace (`passport-bridge serve --profile <agent>@<workspace>`) moves to the one URL: the plan says `Move Cursor and Codex to Passport's one URL`, and each row's status is `updated`. Codex without its CLI gets its `[mcp_servers.passport]` table (and subtables) replaced in place. An entry for another workspace is left as is. No token lands in a config file. **Agents** shows `Uses an old URL` on an agent still on the workspace's own URL until init moves it. Claude Code and Codex through their own CLIs (`claude mcp add --transport http --scope user`, `codex mcp add --url`), Cursor through `~/.cursor/mcp.json`, VS Code through `code --add-mcp` or its user `mcp.json`. Claude Desktop connects through Settings → Connectors: on a terminal init copies the URL and says `Claude Desktop: paste the copied URL in Settings → Connectors → Add custom connector`; without one it names the URL.
157
142
  6. **Guard**: (step by step asks `Check each shell command in <agents> before it runs? [Y/n]`) runs `passport hook install --guard` for Claude Code, Codex, and Cursor (in Codex, a command your rules ask about is blocked with how to approve it, since Codex can't show Passport's questions), pointing at the launcher `$PASSPORT_HOME/cli/bin/passport` (`passport.cmd` on Windows), which runs a stable copy of the CLI in `$PASSPORT_HOME/cli/<version>/` (never npm's cache), or at a global `passport-bridge` of the same version or newer. An upgrade rewrites the launcher and the `cli/current` link in one rename each, so hooks follow without being edited; the launcher runs the recorded node, or the node on PATH once that one is removed. A hook from an older init that names a version folder is replaced where it stands, next to your other hooks. Once the new copy is in place, older copies are deleted unless a hook still runs them.
158
143
  What changes on disk, and how to undo it:
@@ -176,7 +161,7 @@ npx passport-bridge@latest init --org pek_example --yes # Jamf, Kandji,
176
161
  npx passport-bridge@latest init --org pek_example --yes --agents claude-code,codex
177
162
  ```
178
163
 
179
- `init --org` is `init` for MDM: it never asks anything and never signs in. `passport setup --org` is its old name and still runs it for one release, saying `passport setup --org is now passport init --org.` on stderr; `passport setup` without `--org` exits 6 and names `init --org`. init's own step flags (`--dry-run`, `--move-keys`, `--skip-*`, `--no-open`, `--verbose`) don't go with `--org` (exit 6), and `--agents`, `--lock`, and `--strict` need `--org`. It installs the stable copy of the CLI, adds Passport to every detected agent (Claude Code, Cursor, Codex, VS Code; Claude Desktop gets the connector step) at the one URL with the enrollment key as its hint (`https://passportmcp.com/mcp?enroll=pek_…`), turns on the guard and audit hooks for Claude Code, Codex, and Cursor, and records the key in `$PASSPORT_HOME/enrollment.json` (mode 600). It prints one line per agent:
164
+ `init --org` is `init` for MDM: it never asks anything and never signs in. init's own step flags (`--dry-run`, `--skip-*`, `--no-open`, `--verbose`) don't go with `--org` (exit 6), and `--agents`, `--lock`, and `--strict` need `--org`. It installs the stable copy of the CLI, adds Passport to every detected agent (Claude Code, Cursor, Codex, VS Code; Claude Desktop gets the connector step) at the one URL with the enrollment key as its hint (`https://passportmcp.com/mcp?enroll=pek_…`), turns on the guard and audit hooks for Claude Code, Codex, and Cursor, and records the key in `$PASSPORT_HOME/enrollment.json` (mode 600). It prints one line per agent:
180
165
 
181
166
  ```
182
167
  Passport setup for passportmcp.com (enrollment pek_…mple)
@@ -217,7 +202,7 @@ What the guard asks about comes from `GET /api/cp/cli` (`src/cpCli.ts`), cached
217
202
  **How a line is read** (`src/hookLine.ts`). Each simple command is read in the folder it runs in (after a `cd`), and so are the commands a line hides: `bash -c '…'`, `eval`, `$(…)`, a heredoc fed to a shell, a shell script it runs (`./x.sh`, `bash x.sh`, `source x.sh`) and a package script (`npm run x`). Scripts are read only to catch a hidden vendor command or one that can't be undone; nothing is sent. Everyday commands (`ls`, `npm test`, `rm -rf build`) are neither classified nor recorded.
218
203
 
219
204
  - Claude Code: `PreToolUse`, plus `PostToolUse` and `PostToolUseFailure` (failed or interrupted calls, recorded as ran with a non-zero exit), in `~/.claude/settings.json` (`CLAUDE_CONFIG_DIR` honored).
220
- - Codex: the same events in `~/.codex/hooks.json` (`CODEX_HOME` honored). Codex supports deny only, so it never gets the rewrite.
205
+ - Codex: the same events in `~/.codex/hooks.json` (`CODEX_HOME` honored). Codex supports deny only.
221
206
  - Cursor: `beforeShellExecution`/`afterShellExecution` in `~/.cursor/hooks.json`. Cursor also imports Claude Code's hooks by default; that imported copy stands down when Passport's own Cursor entry is registered.
222
207
 
223
208
  **Guard health** (`src/cliGuardHealth.ts`). `passport hook status` and `passport status` show each agent's guard (On · Off · Outdated · Not trusted · Partly set up · Locked) with its fix, and a guard run reports it to Passport at most once a day.
@@ -230,45 +215,14 @@ The Passport plugin (`rsyed94/passport-plugins`) runs the same two hooks from th
230
215
  passport status
231
216
  ```
232
217
 
233
- - `status` is one screen, like `gh auth status`, with a label per row (`You` with the name you signed in as, `Computer`, `Guard`, `Apps`, `Keys`, `Typing`, `CLI`); under 60 columns each label gets its own row, and piped it never wraps. `Guard` lists each agent's guard on this computer (`✓ Claude Code On`, `! Codex Not trusted`) with its fix on the line under it. Status first adds any hook slots an upgrade left missing (`src/hookRepair.ts`, also from the hooks' flush and after any command; only for a person signed in on the computer, never with an agent key, a pinned endpoint, or in CI, and it keeps no marker: nothing is written unless a slot is missing) and says so; an agent still missing one reads `Partly set up` with what Passport can't see.
234
-
235
- ### Keys and passport exec
218
+ - `status` is one screen, like `gh auth status`, with a label per row (`You` with the name you signed in as, `Computer`, `Guard`, `Apps`, `Keys`, `CLI`); under 60 columns each label gets its own row, and piped it never wraps. `Guard` lists each agent's guard on this computer (`✓ Claude Code On`, `! Codex Not trusted`) with its fix on the line under it. Status first adds any hook slots an upgrade left missing (`src/hookRepair.ts`, also from the hooks' flush and after any command; only for a person signed in on the computer, never with an agent key, a pinned endpoint, or in CI, and it keeps no marker: nothing is written unless a slot is missing) and says so; an agent still missing one reads `Partly set up` with what Passport can't see.
236
219
 
237
- In v1 Passport never gives an agent or a CLI a working credential (decided 2026-11-16): it decides Allow or Block and records what happened, and your CLIs keep their own sign-ins.
220
+ ### Keys, git, and Kubernetes
238
221
 
239
- ```sh
240
- passport exec -- railway up -e staging
241
- passport keys # the CLI keys found on this computer; they stay
242
- ```
222
+ In v1 Passport never gives an agent or a CLI a working credential (decided 2026-11-16): it decides Allow or Block and records what happened, and your CLIs, git, and kubectl keep their own sign-ins. The guard decides each command in place, `git push` ref by ref. `status` and `scan` list the CLI keys on this computer; they stay. Once, the CLI clears what older versions' key custody left in `$PASSPORT_HOME`, and whenever it reports the guard (`init` and the hooks' flush) it removes the vendor shims they wrote in `$PASSPORT_HOME/cli/bin` (`src/keysV1Cleanup.ts`, `src/execShims.ts`); `passport logout` removes them too.
243
223
 
244
- - `exec -- <cli> …` runs railway, gh, vercel, wrangler, supabase, stripe, aws, neonctl, flyctl, gcloud, firebase, az, or azd from PATH. It classifies the command here, asks `POST /api/my/exec/authorize` (for a vendor CLI that is a basic platform, `POST /api/cp/decide/cli` first), and on allow runs the CLI with this shell's own environment and sign-in, minus Passport's own sign-in variables. Output and the exit code pass through.
245
- - Nothing waits for a person: a block, or `undecided` (Passport couldn't decide in time where rules are enforced), is refused at once with Passport's words (exit 5). Offline, nothing runs (exit 1). `--wait`, `--mask`, `--no-masking` and `--verbose` are accepted and change nothing.
246
- - `exec -- git …` decides each push ref by ref as the guard does (a block exits 5), then runs git with your own sign-in.
247
- - Shells, `env`, and subcommands that would run another program are refused before anything is sent (exit 6).
248
- - In Claude Code the guard decides vendor commands in place; it no longer rewrites them to `passport exec`.
249
- - Off in v1, each printing one line and exiting 0: `passport keys move`, `keys add`, `keys rotate`, `keys keep`, `keys signed-out`, and adding a shim (`keys shim <cli>`). `keys shim` and `keys shim --remove <cli|all>` still list and remove shims an earlier version added.
250
-
251
- ### git and Kubernetes
252
-
253
- - `passport git-credential setup` is off in v1 and changes nothing; `setup --remove` restores git's earlier helpers. `passport git-credential get` never calls Passport: it hands the request to the helpers git used before setup, or answers nothing so git tries its next helper (exit 0, never `quit=1`). The guard decides every `git push` itself.
254
- - `passport kube-credential` is off in v1: it prints one line on stderr and exits 1, so kubectl stops with a clear message. Point kubectl at your own credentials.
255
224
  - The guard places kube commands by cluster and namespace (`--context`/`--kube-context`, `--kubeconfig`, `-n`, then the kubeconfig: `src/kubeconfig.ts`), keyed `<cluster>/<namespace>` with the cluster an EKS ARN, a GKE name, or a digest of its server URL. Deleting a namespace, persistent volume or claim, or custom resource definition, and `delete --all`, are Irreversible in Production; `exec`, `cp`, `attach`, and `port-forward` are changes.
256
225
 
257
- ### Persistent sessions
258
-
259
- ```sh
260
- printf '%s\n' \
261
- '{"id":"find","argv":["search","open issues"]}' \
262
- '{"id":"call","argv":["run","github_search_issues","{\"query\":\"SSO\"}"]}' \
263
- | passport session --profile cli@ws_example
264
- ```
265
-
266
- - One `{"id"?:string|number,"argv":string[]}` request per line, run in order; one JSON response per line with `ok`, `exitCode`, and `result` or error fields. `id` is echoed.
267
- - A failed request does not close the session. EOF, SIGINT, or SIGTERM closes it cleanly.
268
- - Limits: 1 MiB per line, 128 arguments. Set `--profile`, `--caller`, and `--timeout` on `passport session`, not per request.
269
- - Allowed commands: `status`, `search`, `describe`, `run`, `connect`, `resources`, `prompts` (and `discover`, the old inventory name, for one release).
270
- - Governance is unchanged; access tokens keep normal expiry and refresh.
271
-
272
226
  ### Updates
273
227
 
274
228
  `passport update` moves this computer's Passport CLI to the exact `passport-bridge` version Passport names (`src/cliUpdate.ts`, `src/selfUpdate.ts`): the one you or your admin asked for on **Agents** (`Update`, or `Update all N` on **Agents → Everyone**), else the newest published version (a server-side constant, `LATEST_PUBLISHED_BRIDGE_VERSION` in `shared/agentUpdateContract.ts`). A range, a tag, a prerelease, or a version not newer than this one is never installed.
@@ -318,85 +272,38 @@ passport login --workspace ws_example --agent claude-code --profile claude-code@
318
272
  ```sh
319
273
  export PASSPORT_ENDPOINT=https://passport.example.com/mcp
320
274
  export PASSPORT_AGENT_KEY="$CI_PASSPORT_AGENT_KEY"
321
- passport ready --json
275
+ passport doctor --json
322
276
  passport search "deployment status" --json
323
277
  ```
324
278
 
325
279
  `PASSPORT_ENDPOINT` is Passport's one URL (`https://<host>/mcp`): the agent token's own prefix says which workspace. A workspace's own older URL (`https://<host>/w/<workspace>/mcp`) still works. Set both variables together. Environment auth overrides stored profiles, persists nothing, and cannot be combined with `--profile` or `login`/`logout`. Agent tokens skip member approval prompts; use a member profile for work that must pause for a human.
326
280
 
327
- ## Managed access
328
-
329
- Workload credentials that sign `private_key_jwt` assertions. Requires PostgreSQL and Enterprise workspace controls, with connections and grants set up in **Agents & access**. Creating new delegations is retired; existing delegation IDs still work.
330
-
331
- ```sh
332
- passport access keygen --algorithm ES256 # or RS256; never overwrites; private PEM is owner-only
333
- ```
334
-
335
- Register only the public JWK in **Agents & access**, then configure the workload:
336
-
337
- ```sh
338
- export PASSPORT_ENDPOINT=https://passport.example.com
339
- export PASSPORT_CLIENT_ID=ws_example~awc_example
340
- export PASSPORT_PRIVATE_KEY_FILE=/run/secrets/passport-access.pem
341
- export PASSPORT_WORKSPACE_ID=ws_example # optional; defaults to the client ID prefix
342
- export PASSPORT_CALLER_ID=build-job-1 # or --caller; required for invoke
343
-
344
- passport access actions --json
345
- passport access run --input run.json --json
346
- passport access invoke --input invocation.json --json
347
- passport access status <invocation-id> --json
348
- passport access cancel <run-id> --json
349
- ```
350
-
351
- - `run.json`: non-empty `capabilities` copied from `actions`; optional `delegationId`, `expiresInSeconds` (60 to 86,400), `callLimit` (1 to 10,000).
352
- - `invocation.json`: `runId`, a stable unique `invocationId`, `appId`, `tool`, `resource`, `connectionId`, and `args`.
353
- - Approval pending: after a human approves, invoke again with the same file and caller. Timeout or unknown result: check `access status` before any new write. Provider writes are never retried automatically.
354
- - Delegated work: `passport access actions --delegation-id <id> --json`, then include the same `delegationId` in `run.json`. The agent and the delegated person both need matching allow grants.
355
- - Tokens are never printed.
356
-
357
- SDK, from the package root or `passport-bridge/access`:
358
-
359
- ```js
360
- import { accessClientFromEnv } from "passport-bridge/access";
361
-
362
- const client = accessClientFromEnv(process.env, { callerId: "build-job-1" });
363
- const actions = await client.actions(); // or client.actions(delegationId)
364
- ```
365
-
366
- `AccessGatewayClient` exposes `actions`, `createRun`, `invoke`, `status`, and `cancel`.
367
-
368
281
  ## Output contract
369
282
 
370
283
  With `--json`, stdout is exactly one JSON value; hints and warnings go to stderr. JSON shapes only gain fields.
371
284
 
372
285
  A mistyped command, option, subcommand, or `help <command>` exits 6 with the closest match, stated rather than asked (`Unknown command "stauts". Did you mean: passport status`, `Unknown option "--jsn". Did you mean: --json`); with `--json` the match is in `next`. With nothing close it says where to look (`Run passport help to see every command.`). `help <unknown>` never prints the general help. Help pages lead with examples, and `passport help` ends with the exit codes below.
373
286
 
374
- Questions follow one convention (`src/cliAsk.ts`), only on a terminal: `[Y/n]` for a safe step (Enter is yes); `[y/N]` for a destructive one, such as signing a CLI out, switching who you're signed in as, or an undo (Enter is no); and for a severe one you type its name (`Type railway to confirm, or press Enter to cancel:`). `--yes` never answers a severe question. A severe step a script may take gets `--confirm=<name>`; replacing a key Passport holds, today's only severe step, deliberately has no flag, so it only ever happens on a person's answer at a terminal.
287
+ Questions follow one convention (`src/cliAsk.ts`), only on a terminal: `[Y/n]` for a safe step (Enter is yes); `[y/N]` for a destructive one, such as switching who you're signed in as, or an undo (Enter is no); and for a severe one you type its name (`Type railway to confirm, or press Enter to cancel:`). `--yes` never answers a severe question.
375
288
 
376
289
  On a terminal, human output comes from one renderer (`src/term.ts`): it wraps to the window's width (at least 40 columns, at most 100) without breaking a URL or a `passport` command, hangs wrapped lines under their label or mark, stacks a table one row at a time when its columns don't fit, and clips a live line (a countdown, a "Checking…" row) to one row so it's always replaced cleanly. Marks always sit next to words (`✓ On`, `! Not trusted`, `– skipped`), with `+`, `!`, `-` where the terminal can't show them. Piped output never wraps, has no color, and draws no live lines. `NO_COLOR` and `TERM=dumb` turn color off.
377
290
 
378
- | Command | JSON value |
379
- | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
380
- | `login` | `{profile,endpoint,client,surface,active,workspaceId,workspaceName?,memberName?,next}`; without a terminal or with `--json`, step one is `{status:"pending",verification_url,code,expires_in,next_step,login_id,next}` |
381
- | `profiles` | `{profiles:[{name,active,client?}],active?}` |
382
- | `use` | `{profile,active:true}` |
383
- | `logout` | `{profile,removed,revoked,shimsRemoved?}` |
384
- | `status` | `{workspace,member,endpoint,auth,profile?,client,mcps,guard?:{agents,repaired?},next?,computer,keys?,keysOnThisComputer?,cli:{version},signedInAs?,shims?:[{vendor,command,state}]}` |
385
- | `doctor` | `{version,ok,auth,profile?,profileCount,endpointOrigin?,server?,checks}`, also on failure |
386
- | `ready` | `{ready,version,ok,auth,profile?,profileCount,endpointOrigin?,server?,checks}` |
387
- | `search` | Gateway payload with `results` or `catalog`, and `note` |
388
- | `describe` | Tool definition (`tool`, `parameters`) plus `name`/`inputSchema` aliases |
389
- | `run` | Full governed MCP tool result, including `structuredContent` |
390
- | `connect` | Gateway payload with `connections` and optional `connectAllUrl` |
391
- | `resources`, `prompts` | MCP list, read, or get result |
392
- | `discover` | `{snapshot,report,compliant}` (the old name of `scan`'s inventory step, for one release) |
393
- | `scan` | `{version:1,findings:[{id,provider,kind,label,severity,location,locations,blastRadius}],agents,unreadable,checked,inventory?:{snapshot,report,compliant}}`; `inventory` only when signed in, or `{error}` when it couldn't be sent |
394
- | `session` | NDJSON `{id?,ok,exitCode,result?}` or `{id?,ok:false,error,cause,exitCode,...}` |
395
- | `access` | `keygen`: algorithm, paths, public JWK; `actions`: `{actions}`; `run`/`cancel`: `{run}`; `invoke`: governed result; `status`: `{receipt}` |
396
- | `update` | `{version,latest,requested,auto,install,outcome?,to?}`; `check` leaves out `outcome`; `off`/`on`: `{auto}`. A failed update is an error with `cause: "update_failed"` and a `hint`. |
397
- | `completion` | `{shell,script}` |
398
- | `help` | `{command,help}` |
399
- | `version` | `{version,profileCount,profileSelected,selectionSource,next,endpoint?,profile?}` |
291
+ | Command | JSON value |
292
+ | ------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
293
+ | `login` | `{profile,endpoint,client,surface,active,workspaceId,workspaceName?,memberName?,next}`; without a terminal or with `--json`, step one is `{status:"pending",verification_url,code,expires_in,next_step,login_id,next}` |
294
+ | `profiles` | `{profiles:[{name,active,client?}],active?}` |
295
+ | `use` | `{profile,active:true}` |
296
+ | `logout` | `{profile,removed,revoked,shimsRemoved?}` |
297
+ | `status` | `{workspace,member,endpoint,auth,profile?,client,mcps,guard?:{agents,repaired?},next?,computer,keys?,keysOnThisComputer?,cli:{version},signedInAs?}` |
298
+ | `doctor` | `{ready,version,ok,auth,profile?,profileCount,endpointOrigin?,server?,checks}`, also on failure |
299
+ | `search` | Gateway payload with `results` or `catalog`, and `note`; for one tool's exact name, its definition (`tool`, `parameters`) plus `name`/`inputSchema` aliases |
300
+ | `run` | Full governed MCP tool result, including `structuredContent` |
301
+ | `connect` | No app, as a person: `{workspace,apps,needsYou,url?,expiresAt?,opened}`; else the gateway payload with `connections` and optional `connectAllUrl` |
302
+ | `scan` | `{version:1,findings:[{id,provider,kind,label,severity,location,locations,blastRadius}],agents,unreadable,checked,inventory?:{snapshot,report,compliant}}`; `inventory` only when signed in, or `{error}` when it couldn't be sent |
303
+ | `update` | `{version,latest,requested,auto,install,outcome?,to?}`; `check` leaves out `outcome`; `off`/`on`: `{auto}`. A failed update is an error with `cause: "update_failed"` and a `hint`. |
304
+ | `completion` | `{shell,script}` |
305
+ | `help` | `{command,help}` |
306
+ | `version` | `{version,profileCount,profileSelected,selectionSource,next,endpoint?,profile?}` |
400
307
 
401
308
  Errors: `{"error":"...","cause":"blocked","exitCode":5,"app":"github"}`, optionally with `approvalId`, `hint`, `profiles`, `next` (`argv` plus description), `remediation`, `retry`, `requiredInput`, or `connectUrl`.
402
309
 
package/dist/cli.js CHANGED
@@ -28,9 +28,8 @@ function arg(flag, fallback = "") {
28
28
  return i >= 0 && process.argv[i + 1] ? process.argv[i + 1] : fallback;
29
29
  }
30
30
  /** `npx passport-bridge@latest scan` and `init` (with `--org` for MDM) run the
31
- * `passport` CLI's own implementation, so both bins behave identically.
32
- * `setup` is here for `setup --org`, init's old name for one release. */
33
- const PASSPORT_ONE_LINERS = new Set(["scan", "init", "setup"]);
31
+ * `passport` CLI's own implementation, so both bins behave identically. */
32
+ const PASSPORT_ONE_LINERS = new Set(["scan", "init"]);
34
33
  async function passportOneLiner() {
35
34
  const { main: passport } = await import("./cliMain.js");
36
35
  process.exitCode = await passport(process.argv.slice(2), process.env, {
package/dist/cliArgs.d.ts CHANGED
@@ -1,11 +1,5 @@
1
- export declare const COMMANDS: readonly ["init", "login", "logout", "profiles", "use", "status", "doctor", "ready", "search", "describe", "run", "connect", "connections", "request", "resources", "prompts", "discover", "scan", "hook", "exec", "kube-credential", "git-credential", "keys", "setup", "session", "access", "update", "completion", "help", "version"];
1
+ export declare const COMMANDS: readonly ["init", "login", "logout", "profiles", "use", "status", "doctor", "search", "run", "connect", "request", "scan", "hook", "update", "completion", "help", "version"];
2
2
  export type Command = (typeof COMMANDS)[number];
3
- /** Old names that still run for one release, left out of help, completion,
4
- * and suggestions. `discover` is part of `scan` now; `setup --org` is
5
- * `init --org`. */
6
- export declare const HIDDEN_COMMANDS: readonly Command[];
7
- /** Every command help, completion, and suggestions name. */
8
- export declare const VISIBLE_COMMANDS: readonly Command[];
9
3
  /** A usage mistake. `suggestion` is the command the person most likely meant. */
10
4
  export declare class ArgError extends Error {
11
5
  readonly suggestion?: string[] | undefined;
package/dist/cliArgs.js CHANGED
@@ -7,36 +7,17 @@ export const COMMANDS = [
7
7
  "use",
8
8
  "status",
9
9
  "doctor",
10
- "ready",
11
10
  "search",
12
- "describe",
13
11
  "run",
14
12
  "connect",
15
- "connections",
16
13
  "request",
17
- "resources",
18
- "prompts",
19
- "discover",
20
14
  "scan",
21
15
  "hook",
22
- "exec",
23
- "kube-credential",
24
- "git-credential",
25
- "keys",
26
- "setup",
27
- "session",
28
- "access",
29
16
  "update",
30
17
  "completion",
31
18
  "help",
32
19
  "version"
33
20
  ];
34
- /** Old names that still run for one release, left out of help, completion,
35
- * and suggestions. `discover` is part of `scan` now; `setup --org` is
36
- * `init --org`. */
37
- export const HIDDEN_COMMANDS = ["discover", "setup"];
38
- /** Every command help, completion, and suggestions name. */
39
- export const VISIBLE_COMMANDS = COMMANDS.filter((command) => !HIDDEN_COMMANDS.includes(command));
40
21
  const FLAGS = {
41
22
  profile: { kind: "value" },
42
23
  json: { kind: "boolean" },
@@ -44,56 +25,38 @@ const FLAGS = {
44
25
  quiet: { kind: "boolean" },
45
26
  caller: { kind: "value" },
46
27
  help: { kind: "boolean" },
47
- cloud: { kind: "value", commands: ["login", "init", "setup"] },
48
- workspace: { kind: "value", commands: ["login", "access"] },
49
- client: { kind: "value", commands: ["login", "hook", "exec"] },
28
+ cloud: { kind: "value", commands: ["login", "init"] },
29
+ workspace: { kind: "value", commands: ["login"] },
30
+ client: { kind: "value", commands: ["login", "hook"] },
50
31
  apply: { kind: "boolean", commands: ["hook"] },
51
32
  guard: { kind: "boolean", commands: ["hook"] },
52
33
  hold: { kind: "value", commands: ["hook"] },
53
- "no-open": { kind: "boolean", commands: ["login", "init", "connections"] },
54
- yes: { kind: "boolean", commands: ["init", "setup", "keys"] },
55
- // `init --org` is setup for MDM; `setup --org` still runs it for one release.
56
- org: { kind: "value", commands: ["init", "setup"] },
57
- clients: { kind: "value", commands: ["init", "setup"] },
58
- lock: { kind: "boolean", commands: ["init", "setup"] },
59
- strict: { kind: "boolean", commands: ["init", "setup"] },
34
+ "no-open": { kind: "boolean", commands: ["login", "init", "connect"] },
35
+ yes: { kind: "boolean", commands: ["init"] },
36
+ // `init --org` is setup for MDM.
37
+ org: { kind: "value", commands: ["init"] },
38
+ clients: { kind: "value", commands: ["init"] },
39
+ lock: { kind: "boolean", commands: ["init"] },
40
+ strict: { kind: "boolean", commands: ["init"] },
60
41
  "skip-apps": { kind: "boolean", commands: ["init"] },
61
42
  "skip-agents": { kind: "boolean", commands: ["init"] },
62
43
  "skip-guard": { kind: "boolean", commands: ["init"] },
63
- "move-keys": { kind: "boolean", commands: ["init"] },
64
44
  "dry-run": { kind: "boolean", commands: ["init"] },
65
- "ask-again": { kind: "boolean", commands: ["exec"] },
66
- // The guard's own rewrite (Claude Code): the railway decision exec spends instead of deciding again.
67
- decision: { kind: "value", commands: ["exec"] },
68
45
  app: { kind: "value", commands: ["search"] },
69
46
  args: { kind: "value", commands: ["run"] },
70
- set: { kind: "repeat", commands: ["run", "prompts"] },
47
+ set: { kind: "repeat", commands: ["run"] },
71
48
  "set-json": { kind: "repeat", commands: ["run"] },
72
- wait: { kind: "value", commands: ["run", "connect", "exec"] },
73
- session: { kind: "value", commands: ["exec"] },
49
+ wait: { kind: "value", commands: ["run", "connect"] },
74
50
  alias: { kind: "value", commands: ["connect"] },
75
51
  open: { kind: "boolean", commands: ["connect"] },
76
52
  reason: { kind: "value", commands: ["request"] },
77
53
  cancel: { kind: "boolean", commands: ["request"] },
78
- out: { kind: "value", commands: ["resources", "prompts"] },
79
- verbose: { kind: "boolean", commands: ["scan", "init", "exec", "login", "hook"] },
80
- "no-masking": { kind: "boolean", commands: ["exec"] },
81
- mask: { kind: "boolean", commands: ["exec"] },
82
- cluster: { kind: "value", commands: ["kube-credential"] },
83
- context: { kind: "value", commands: ["kube-credential"] },
84
- "no-shim": { kind: "boolean", commands: ["keys"] },
54
+ verbose: { kind: "boolean", commands: ["scan", "init", "login", "hook"] },
85
55
  switch: { kind: "boolean", commands: ["login"] },
86
56
  complete: { kind: "value", commands: ["login"] },
87
57
  path: { kind: "value", commands: ["scan"] },
88
58
  check: { kind: "boolean", commands: ["scan"] },
89
- input: { kind: "value", commands: ["access"] },
90
- algorithm: { kind: "value", commands: ["access"] },
91
- "private-key-file": { kind: "value", commands: ["access"] },
92
- "public-jwk-file": { kind: "value", commands: ["access"] },
93
- "delegation-id": { kind: "value", commands: ["access"] },
94
- "client-id": { kind: "value", commands: ["access"] },
95
59
  all: { kind: "boolean", commands: ["help"] },
96
- remove: { kind: "boolean", commands: ["keys", "git-credential"] },
97
60
  local: { kind: "boolean", commands: ["scan"] },
98
61
  // The detached check the CLI and hooks start; not for people to type.
99
62
  background: { kind: "boolean", commands: ["update"] }
@@ -118,7 +81,7 @@ function optionsFor(command) {
118
81
  return [...new Set(names)];
119
82
  }
120
83
  function unknownCommand(raw, help = false) {
121
- const guess = closest(raw, VISIBLE_COMMANDS);
84
+ const guess = closest(raw, COMMANDS);
122
85
  const argv = guess ? ["passport", ...(help ? ["help"] : []), guess] : undefined;
123
86
  return new ArgError(`Unknown command "${raw}". ${argv ? `Did you mean: ${argv.join(" ")}` : "See every command with passport help."}`, argv);
124
87
  }
@@ -208,10 +171,6 @@ export function parseArgs(argv) {
208
171
  }
209
172
  else {
210
173
  positionals.push(raw);
211
- // `passport exec railway up --service api`: everything after the CLI's
212
- // name belongs to that CLI, flags included.
213
- if (command === "exec")
214
- positionalOnly = true;
215
174
  }
216
175
  }
217
176
  if (unknown !== undefined)
@@ -234,7 +193,7 @@ function settle(args) {
234
193
  }
235
194
  if (command === "help" && positionals[0] !== undefined && !knownCommand(positionals[0]))
236
195
  throw unknownCommand(positionals[0], true);
237
- // `help keys add` shows the page for keys, which covers its subcommands.
196
+ // `help hook install` shows the page for hook, which covers its subcommands.
238
197
  if (command === "help")
239
198
  positionals.splice(1);
240
199
  validateShape(command, positionals);
@@ -250,37 +209,22 @@ function validateShape(command, positionals) {
250
209
  use: 1,
251
210
  status: 0,
252
211
  doctor: 0,
253
- ready: 0,
254
- describe: 1,
255
212
  run: 2,
256
- resources: 1,
257
- prompts: 1,
258
- discover: 0,
259
213
  scan: 0,
260
214
  hook: 1,
261
- "kube-credential": 1,
262
- "git-credential": 1,
263
- keys: 3,
264
- setup: 3,
265
- session: 0,
266
- access: 2,
267
215
  completion: 1,
268
216
  help: 1,
269
217
  version: 0
270
218
  };
271
219
  const minimum = {
272
- describe: 1,
273
220
  run: 1,
274
221
  use: 1,
275
- completion: 1,
276
- exec: 1
222
+ completion: 1
277
223
  };
278
224
  const needs = {
279
225
  run: "run needs a tool name.",
280
- describe: "describe needs a tool name.",
281
226
  use: "use needs a profile name. See them with passport profiles.",
282
- completion: "completion needs bash, zsh, or fish.",
283
- exec: "exec needs a command to run.\nUse: passport exec -- railway up"
227
+ completion: "completion needs bash, zsh, or fish."
284
228
  };
285
229
  if (positionals.length < (minimum[command] ?? 0)) {
286
230
  throw new ArgError(needs[command] ?? `${command} needs a name.`);
@@ -1,4 +1,3 @@
1
- import { Client } from "@modelcontextprotocol/sdk/client/index.js";
2
1
  import type { CallToolResult } from "@modelcontextprotocol/sdk/types.js";
3
2
  export { SERVER_TOO_OLD } from "./cliProtocol.js";
4
3
  export declare const MIN_CLI_SERVER_VERSION: string;
@@ -42,7 +41,7 @@ export type MemberApi = {
42
41
  fetchApi: (path: string, init?: RequestInit) => Promise<Response>;
43
42
  };
44
43
  /** Same-origin REST calls without an MCP session, for commands that only
45
- * need the member API (`passport exec`, `passport keys`). */
44
+ * need the member API (`passport update`, `passport connect`). */
46
45
  export declare function memberApi(options: GatewayOptions): MemberApi;
47
46
  /** One authenticated MCP session for one CLI invocation. */
48
47
  export declare class CliGateway {
@@ -65,10 +64,6 @@ export declare class CliGateway {
65
64
  * fleet discovery. The caller supplies only a path; credentials never leave
66
65
  * the Passport origin pinned by the saved profile. */
67
66
  fetchApi(path: string, init?: RequestInit): Promise<Response>;
68
- listResources(): Promise<Awaited<ReturnType<Client["listResources"]>>>;
69
- readResource(uri: string): ReturnType<Client["readResource"]>;
70
- listPrompts(): Promise<Awaited<ReturnType<Client["listPrompts"]>>>;
71
- getPrompt(name: string, args: Record<string, string>): ReturnType<Client["getPrompt"]>;
72
67
  close(): Promise<void>;
73
68
  private requestOptions;
74
69
  }