passport-bridge 0.37.0 → 0.38.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 (310) hide show
  1. package/README.md +53 -180
  2. package/dist/cliArgs.d.ts +3 -2
  3. package/dist/cliArgs.js +15 -59
  4. package/dist/cliClient.d.ts +1 -1
  5. package/dist/cliClient.js +1 -1
  6. package/dist/cliCodexTrust.d.ts +1 -1
  7. package/dist/cliConnections.d.ts +2 -2
  8. package/dist/cliDescribe.js +8 -1
  9. package/dist/cliExec.d.ts +12 -21
  10. package/dist/cliExec.js +85 -234
  11. package/dist/cliExecGuard.js +1 -1
  12. package/dist/cliGuardHealth.d.ts +46 -2
  13. package/dist/cliGuardHealth.js +108 -1
  14. package/dist/cliHook.d.ts +12 -14
  15. package/dist/cliHook.js +139 -324
  16. package/dist/cliHookAfter.d.ts +5 -14
  17. package/dist/cliHookAfter.js +16 -40
  18. package/dist/cliHookClassify.d.ts +0 -5
  19. package/dist/cliHookClients.d.ts +2 -2
  20. package/dist/cliHookDecide.d.ts +33 -88
  21. package/dist/cliHookDecide.js +124 -430
  22. package/dist/cliHookDeliver.d.ts +14 -79
  23. package/dist/cliHookDeliver.js +50 -202
  24. package/dist/cliHookExtras.d.ts +2 -22
  25. package/dist/cliHookExtras.js +2 -36
  26. package/dist/cliHookGuard.d.ts +11 -165
  27. package/dist/cliHookGuard.js +23 -525
  28. package/dist/cliHookInstall.d.ts +2 -4
  29. package/dist/cliHookInstall.js +19 -43
  30. package/dist/cliHookLifecycle.d.ts +2 -7
  31. package/dist/cliHookLifecycle.js +5 -33
  32. package/dist/cliHookLinks.js +30 -2
  33. package/dist/cliHookLocal.d.ts +4 -8
  34. package/dist/cliHookLocal.js +36 -36
  35. package/dist/cliHookMode.d.ts +2 -3
  36. package/dist/cliHookMode.js +2 -3
  37. package/dist/cliHookRedact.d.ts +2 -2
  38. package/dist/cliHookRedact.js +2 -2
  39. package/dist/cliHookRewrite.d.ts +37 -58
  40. package/dist/cliHookRewrite.js +86 -149
  41. package/dist/cliHookStatus.d.ts +2 -2
  42. package/dist/cliHookStatus.js +8 -16
  43. package/dist/cliHookVendorsMore.d.ts +2 -2
  44. package/dist/cliHookVendorsMore.js +2 -2
  45. package/dist/cliInit.d.ts +2 -7
  46. package/dist/cliInit.js +6 -21
  47. package/dist/cliKeysShim.d.ts +1 -1
  48. package/dist/cliLogin.js +4 -4
  49. package/dist/cliLogout.js +4 -9
  50. package/dist/cliMain.js +15 -56
  51. package/dist/cliMemberCall.d.ts +5 -13
  52. package/dist/cliMemberCall.js +0 -6
  53. package/dist/cliOutput.js +10 -95
  54. package/dist/cliScriptRead.d.ts +2 -1
  55. package/dist/cliScriptRead.js +4 -6
  56. package/dist/cliSetupOrg.js +0 -11
  57. package/dist/cliStatus.d.ts +17 -11
  58. package/dist/cliStatus.js +41 -149
  59. package/dist/completion.js +2 -23
  60. package/dist/connectorKit/manifests/github.generated.js +2 -2
  61. package/dist/controlPlane.generated.d.ts +99 -17
  62. package/dist/controlPlane.generated.js +35 -18
  63. package/dist/controlPlaneBasic.generated.d.ts +78 -0
  64. package/dist/controlPlaneBasic.generated.js +156 -0
  65. package/dist/controlPlaneCli.d.ts +14 -0
  66. package/dist/controlPlaneCli.js +55 -0
  67. package/dist/controlPlaneExec.d.ts +2 -3
  68. package/dist/controlPlaneExec.js +4 -8
  69. package/dist/controlPlaneGuard.js +2 -4
  70. package/dist/controlPlaneModel.generated.d.ts +10 -1
  71. package/dist/controlPlaneModel.generated.js +12 -0
  72. package/dist/controlPlaneRailwayGuard.d.ts +1 -1
  73. package/dist/controlPlaneRailwayGuard.js +3 -5
  74. package/dist/controlPlaneSupabase.js +2 -3
  75. package/dist/cpCli.d.ts +47 -0
  76. package/dist/cpCli.js +174 -0
  77. package/dist/cpRefusal.d.ts +15 -0
  78. package/dist/cpRefusal.js +14 -0
  79. package/dist/doctor.js +0 -14
  80. package/dist/execLinks.d.ts +0 -3
  81. package/dist/execLinks.js +0 -4
  82. package/dist/fastPathFlag.d.ts +11 -18
  83. package/dist/fastPathFlag.js +31 -37
  84. package/dist/hookFastPath.d.ts +9 -41
  85. package/dist/hookFastPath.js +12 -200
  86. package/dist/hookMain.js +1 -1
  87. package/dist/hookPromptFast.d.ts +9 -13
  88. package/dist/hookPromptFast.js +10 -38
  89. package/dist/hookRepair.js +1 -1
  90. package/dist/initAppsStep.d.ts +1 -1
  91. package/dist/initAppsStep.js +3 -2
  92. package/dist/initLocalSteps.js +1 -2
  93. package/dist/initOutro.js +10 -12
  94. package/dist/initPlan.d.ts +0 -3
  95. package/dist/initPlan.js +0 -27
  96. package/dist/initState.d.ts +0 -26
  97. package/dist/launcherFastAnswers.d.ts +5 -24
  98. package/dist/launcherFastAnswers.js +4 -22
  99. package/dist/launcherFastPath.d.ts +9 -13
  100. package/dist/launcherFastPath.js +13 -59
  101. package/dist/localCommands.js +8 -2
  102. package/dist/localIrreversible.d.ts +12 -0
  103. package/dist/localIrreversible.js +42 -0
  104. package/dist/nativeUnsync.d.ts +33 -0
  105. package/dist/nativeUnsync.js +175 -0
  106. package/dist/pluginPin.d.ts +1 -1
  107. package/dist/pluginPin.js +1 -1
  108. package/dist/railwayDecisions.d.ts +1 -1
  109. package/dist/railwayDecisions.js +7 -5
  110. package/dist/railwayLink.d.ts +31 -0
  111. package/dist/railwayLink.js +79 -0
  112. package/dist/term.js +1 -1
  113. package/dist/version.d.ts +1 -1
  114. package/dist/version.js +1 -1
  115. package/dist/webLinks.d.ts +7 -10
  116. package/dist/webLinks.js +14 -40
  117. package/npm-shrinkwrap.json +2 -2
  118. package/package.json +1 -1
  119. package/dist/approvalLines.d.ts +0 -17
  120. package/dist/approvalLines.js +0 -40
  121. package/dist/approvalNote.d.ts +0 -20
  122. package/dist/approvalNote.js +0 -33
  123. package/dist/approvalNotice.d.ts +0 -73
  124. package/dist/approvalNotice.js +0 -211
  125. package/dist/cliActions.d.ts +0 -31
  126. package/dist/cliActions.js +0 -383
  127. package/dist/cliActionsLocal.d.ts +0 -38
  128. package/dist/cliActionsLocal.js +0 -186
  129. package/dist/cliAllowances.d.ts +0 -47
  130. package/dist/cliAllowances.js +0 -89
  131. package/dist/cliAnswered.d.ts +0 -63
  132. package/dist/cliAnswered.js +0 -282
  133. package/dist/cliAutopilot.d.ts +0 -63
  134. package/dist/cliAutopilot.js +0 -374
  135. package/dist/cliAutopilotPolicy.d.ts +0 -317
  136. package/dist/cliAutopilotPolicy.js +0 -411
  137. package/dist/cliEnv.d.ts +0 -47
  138. package/dist/cliEnv.js +0 -168
  139. package/dist/cliGuardState.d.ts +0 -92
  140. package/dist/cliGuardState.js +0 -174
  141. package/dist/cliHookAllowance.d.ts +0 -22
  142. package/dist/cliHookAllowance.js +0 -34
  143. package/dist/cliHookAudit.d.ts +0 -44
  144. package/dist/cliHookAudit.js +0 -59
  145. package/dist/cliHookDecideRequest.d.ts +0 -48
  146. package/dist/cliHookDecideRequest.js +0 -69
  147. package/dist/cliHookEarly.d.ts +0 -10
  148. package/dist/cliHookEarly.js +0 -8
  149. package/dist/cliHookEnvironment.d.ts +0 -61
  150. package/dist/cliHookEnvironment.js +0 -303
  151. package/dist/cliHookHold.d.ts +0 -91
  152. package/dist/cliHookHold.js +0 -168
  153. package/dist/cliHookIac.d.ts +0 -32
  154. package/dist/cliHookIac.js +0 -53
  155. package/dist/cliHookKey.d.ts +0 -25
  156. package/dist/cliHookKey.js +0 -160
  157. package/dist/cliHookLease.d.ts +0 -78
  158. package/dist/cliHookLease.js +0 -224
  159. package/dist/cliHookNotice.d.ts +0 -30
  160. package/dist/cliHookNotice.js +0 -93
  161. package/dist/cliHookPairing.d.ts +0 -9
  162. package/dist/cliHookPairing.js +0 -42
  163. package/dist/cliHookPending.d.ts +0 -31
  164. package/dist/cliHookPending.js +0 -141
  165. package/dist/cliHookPlan.d.ts +0 -35
  166. package/dist/cliHookPlan.js +0 -34
  167. package/dist/cliHookReach.d.ts +0 -31
  168. package/dist/cliHookReach.js +0 -84
  169. package/dist/cliHookRepo.d.ts +0 -20
  170. package/dist/cliHookRepo.js +0 -57
  171. package/dist/cliHookServerDecision.d.ts +0 -30
  172. package/dist/cliHookServerDecision.js +0 -85
  173. package/dist/cliHookSessionEnd.d.ts +0 -90
  174. package/dist/cliHookSessionEnd.js +0 -275
  175. package/dist/cliHookStep.d.ts +0 -19
  176. package/dist/cliHookStep.js +0 -76
  177. package/dist/cliHookStop.d.ts +0 -37
  178. package/dist/cliHookStop.js +0 -59
  179. package/dist/cliHookStuck.d.ts +0 -42
  180. package/dist/cliHookStuck.js +0 -69
  181. package/dist/cliLoosening.d.ts +0 -56
  182. package/dist/cliLoosening.js +0 -195
  183. package/dist/cliPolicy.d.ts +0 -85
  184. package/dist/cliPolicy.js +0 -259
  185. package/dist/cliPolicyRefresh.d.ts +0 -7
  186. package/dist/cliPolicyRefresh.js +0 -20
  187. package/dist/cliPolicyV2.d.ts +0 -18
  188. package/dist/cliPolicyV2.js +0 -678
  189. package/dist/cliReceipt.d.ts +0 -18
  190. package/dist/cliReceipt.js +0 -75
  191. package/dist/cliRequest.d.ts +0 -30
  192. package/dist/cliRequest.js +0 -97
  193. package/dist/cliRequestTask.d.ts +0 -22
  194. package/dist/cliRequestTask.js +0 -87
  195. package/dist/cliRestoreRequests.d.ts +0 -57
  196. package/dist/cliRestoreRequests.js +0 -186
  197. package/dist/cliSeen.d.ts +0 -111
  198. package/dist/cliSeen.js +0 -358
  199. package/dist/cliSessions.d.ts +0 -18
  200. package/dist/cliSessions.js +0 -42
  201. package/dist/cliSessionsJson.d.ts +0 -99
  202. package/dist/cliSessionsJson.js +0 -201
  203. package/dist/cliSessionsRender.d.ts +0 -18
  204. package/dist/cliSessionsRender.js +0 -209
  205. package/dist/cliSetup.d.ts +0 -10
  206. package/dist/cliSetup.js +0 -161
  207. package/dist/cliSpeed.d.ts +0 -106
  208. package/dist/cliSpeed.js +0 -340
  209. package/dist/cliStatusGuard.d.ts +0 -42
  210. package/dist/cliStatusGuard.js +0 -90
  211. package/dist/cliSync.d.ts +0 -14
  212. package/dist/cliSync.js +0 -65
  213. package/dist/cliUndo.d.ts +0 -49
  214. package/dist/cliUndo.js +0 -304
  215. package/dist/cliUndoLocal.d.ts +0 -27
  216. package/dist/cliUndoLocal.js +0 -105
  217. package/dist/cliUsage.d.ts +0 -71
  218. package/dist/cliUsage.js +0 -333
  219. package/dist/cliWait.d.ts +0 -14
  220. package/dist/cliWait.js +0 -203
  221. package/dist/cliWhere.d.ts +0 -50
  222. package/dist/cliWhere.js +0 -120
  223. package/dist/cliWork.d.ts +0 -123
  224. package/dist/cliWork.js +0 -584
  225. package/dist/cliWorkWords.d.ts +0 -122
  226. package/dist/cliWorkWords.js +0 -361
  227. package/dist/envDatabase.d.ts +0 -28
  228. package/dist/envDatabase.js +0 -166
  229. package/dist/envLinksAzure.d.ts +0 -34
  230. package/dist/envLinksAzure.js +0 -179
  231. package/dist/envLinksCloud.d.ts +0 -44
  232. package/dist/envLinksCloud.js +0 -243
  233. package/dist/envLinksGitlab.d.ts +0 -66
  234. package/dist/envLinksGitlab.js +0 -352
  235. package/dist/envLinksHosting.d.ts +0 -55
  236. package/dist/envLinksHosting.js +0 -528
  237. package/dist/envLinksIac.d.ts +0 -62
  238. package/dist/envLinksIac.js +0 -267
  239. package/dist/envResolve.d.ts +0 -63
  240. package/dist/envResolve.js +0 -288
  241. package/dist/envTarget.d.ts +0 -61
  242. package/dist/envTarget.js +0 -59
  243. package/dist/execBackupAzure.d.ts +0 -14
  244. package/dist/execBackupAzure.js +0 -49
  245. package/dist/execBackupGoogle.d.ts +0 -24
  246. package/dist/execBackupGoogle.js +0 -141
  247. package/dist/execBackupLine.d.ts +0 -7
  248. package/dist/execBackupLine.js +0 -16
  249. package/dist/execBackupTarget.d.ts +0 -39
  250. package/dist/execBackupTarget.js +0 -262
  251. package/dist/execLease.d.ts +0 -5
  252. package/dist/execLease.js +0 -38
  253. package/dist/execPlan.d.ts +0 -20
  254. package/dist/execPlan.js +0 -38
  255. package/dist/gitBackup.d.ts +0 -111
  256. package/dist/gitBackup.js +0 -391
  257. package/dist/gitSnapshot.d.ts +0 -82
  258. package/dist/gitSnapshot.js +0 -478
  259. package/dist/holdNotice.d.ts +0 -23
  260. package/dist/holdNotice.js +0 -79
  261. package/dist/iacPlan.d.ts +0 -75
  262. package/dist/iacPlan.js +0 -384
  263. package/dist/iacPlanRead.d.ts +0 -88
  264. package/dist/iacPlanRead.js +0 -341
  265. package/dist/iacPlanStore.d.ts +0 -43
  266. package/dist/iacPlanStore.js +0 -139
  267. package/dist/initAutopilotStep.d.ts +0 -37
  268. package/dist/initAutopilotStep.js +0 -399
  269. package/dist/kubeBackup.d.ts +0 -78
  270. package/dist/kubeBackup.js +0 -261
  271. package/dist/kubeRollout.d.ts +0 -18
  272. package/dist/kubeRollout.js +0 -2
  273. package/dist/kubeWatch.d.ts +0 -138
  274. package/dist/kubeWatch.js +0 -513
  275. package/dist/leaseCommands.d.ts +0 -42
  276. package/dist/leaseCommands.js +0 -251
  277. package/dist/localBackups.d.ts +0 -112
  278. package/dist/localBackups.js +0 -276
  279. package/dist/localBackupsGate.d.ts +0 -33
  280. package/dist/localBackupsGate.js +0 -52
  281. package/dist/localRestore.d.ts +0 -42
  282. package/dist/localRestore.js +0 -107
  283. package/dist/localTrash.d.ts +0 -97
  284. package/dist/localTrash.js +0 -394
  285. package/dist/managedSkills.d.ts +0 -7
  286. package/dist/managedSkills.js +0 -268
  287. package/dist/managedSkillsContract.generated.d.ts +0 -82
  288. package/dist/managedSkillsContract.generated.js +0 -32
  289. package/dist/managedSkillsFiles.d.ts +0 -23
  290. package/dist/managedSkillsFiles.js +0 -215
  291. package/dist/managedSkillsValidation.d.ts +0 -13
  292. package/dist/managedSkillsValidation.js +0 -117
  293. package/dist/nativeSync.d.ts +0 -89
  294. package/dist/nativeSync.js +0 -376
  295. package/dist/recommendedPolicy.d.ts +0 -13
  296. package/dist/recommendedPolicy.generated.d.ts +0 -1
  297. package/dist/recommendedPolicy.generated.js +0 -1589
  298. package/dist/recommendedPolicy.js +0 -6
  299. package/dist/regenerable.d.ts +0 -48
  300. package/dist/regenerable.js +0 -312
  301. package/dist/repoRules.d.ts +0 -45
  302. package/dist/repoRules.js +0 -179
  303. package/dist/sessionBrief.d.ts +0 -28
  304. package/dist/sessionBrief.js +0 -92
  305. package/dist/sessionCreated.d.ts +0 -24
  306. package/dist/sessionCreated.js +0 -80
  307. package/dist/waitingLine.d.ts +0 -38
  308. package/dist/waitingLine.js +0 -79
  309. package/dist/watchNotice.d.ts +0 -70
  310. package/dist/watchNotice.js +0 -246
package/README.md CHANGED
@@ -23,7 +23,7 @@ New here? One command sets everything up:
23
23
  npx passport-bridge@latest init
24
24
  ```
25
25
 
26
- It scans for keys your agents can reach, signs you in (or up), connects the apps it found, shows the environments Passport placed, adds Passport to your agents, turns on the guard, and sets Autopilot: how much agents can do on their own. See [Set up with init](#set-up-with-init).
26
+ It scans for keys your agents can reach, signs you in (or up), connects the apps it found, adds Passport to your agents, and turns on the guard. See [Set up with init](#set-up-with-init).
27
27
 
28
28
  Or step by step:
29
29
 
@@ -45,7 +45,7 @@ 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, Keys and apps, Rules and asks, Troubleshoot); `passport help --all` adds the ones for scripts and integrations (`session`, `access`, `resources`, `prompts`, `setup`, `kube-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 (`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.
49
49
 
50
50
  ## Commands
51
51
 
@@ -56,7 +56,7 @@ passport run github_search_issues '{"query":"SSO"}'
56
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
57
  | `logout` | Revoke the credential and always remove the local profile (warns if revocation fails). |
58
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; Autopilot; apps; keys in Passport; this folder's environments; the CLI version. |
59
+ | `status` | Your setup on one screen: you, this computer, each agent's guard and its fix; apps; keys in Passport; the CLI version. |
60
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
61
  | `ready` | Readiness preflight for automation; gate on its `ready` field and exit code. |
62
62
  | `search [query] [--app <key>]` | Search permitted tools. Empty query lists the full catalog. |
@@ -64,17 +64,10 @@ passport run github_search_issues '{"query":"SSO"}'
64
64
  | `run <tool> [json]` | Run a tool through Passport governance. |
65
65
  | `connect [app...] [--alias <name>] [--open] [--wait <s>]` | Show member sign-in links and optionally wait for completion. |
66
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
- | `request <app> [--full] --reason "<why>"` | Ask an admin for an app you don't have, or for Full access where you have Read-only. A person decides in Passport; nothing is granted here. See [Asking for access](#asking-for-access). |
68
67
  | `resources [uri] [--out <file>]` | List or read MCP resources. |
69
68
  | `prompts [name] [--set k=v] [--out <file>]` | List or get MCP prompts. |
70
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. |
71
- | `hook` | Records the CLIs agents run and, with `--guard`, decides each one before it runs from your Autopilot rules (`install`, `uninstall`, `status`). |
72
- | `wait <approval-id> [--timeout <s>]` | Wait for a person to decide an approval request, until they do or it expires. Agents run it in the background. |
73
- | `rules test "<command>" [--environment <kind>]` | What Autopilot decides for a command, why, and which environment it acts on. |
74
- | `sessions [--all\|--running\|--production-changes] [--project <name>] [--pr <n>] [--since <when>]`, `sessions <id>` | Your agents' work items by project, Notable first; the Production writes ledger; or one session's outcome and recent actions. |
75
- | `changes [--env production] [--since <when>] [--until <date>]` | What your agents changed in Production, one row each, grouped by app and newest first. |
76
- | `undo <action-id>\|--last [--option <id>] [--yes]` | Undo an action Passport took a backup before, within 7 days. See [Undo](#undo). |
77
- | `setup` | Install and maintain assigned team workflows as managed skills. |
70
+ | `hook` | Records the CLIs agents run and, with `--guard`, decides each one before it runs from your rules (`install`, `uninstall`, `status`). |
78
71
  | `session` | Run NDJSON commands over one authenticated MCP session. |
79
72
  | `access` | Signed managed access: `keygen`, `actions`, `run`, `invoke`, `status`, `cancel`. |
80
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). |
@@ -118,20 +111,6 @@ passport connections github
118
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`.
119
112
  - `--json`: `{workspace,apps:[{app,name,status,connectedAs?}],needsYou,url?,expiresAt?,opened}`. Agent tokens have no connections page (exit 6, `member_profile_required`).
120
113
 
121
- ### Asking for access
122
-
123
- ```sh
124
- passport request github --full --reason "Open the release pull request for the fix"
125
- passport request linear --reason "Triage this week's bugs"
126
- ```
127
-
128
- - `request` files the same request an agent's `passport_request_access` files (`POST /api/my/app-requests`), into the queue admins already answer. It prints `Asked: Full access to GitHub. An admin at Acme decides.` and `Run your command again once it's approved.`; asking again for the same thing says `Already asked`. Where the workspace lets you add the app yourself, or you already have it, it says so and files nothing. `--json` prints `{filed:true,requestId,status,what,created,app}` or `{filed:false,message,app}`.
129
- - The reason (10 to 280 characters) goes to the admin. Agent tokens can't ask: their owner does. Ten requests an hour per person, shared with agents.
130
- - A Read-only or No access block names it: `You have read-only access to GitHub in Passport, so only reads run. Ask an admin for full access: passport request github --full --reason "<why>"`, then the app's Access link on the next line.
131
- - `passport request --task "railway writes in staging, supabase deletes in dev" [--reason "<why>"] [--session <id>]` asks the person, from inside an agent, for what the task needs (`POST /api/my/allowances`). It is one ask with **Approve all** and **Decline**; approved, those actions run without asking until the task ends. Each item is `<app> <changes|deletes> [in <environment>]`; never irreversible actions or Production deletes. The task is `--session`, else the agent's one running task on this computer. `--json` prints `{approvalId,created,allow,link}`.
132
-
133
- **Task allowances and leases.** cli-policy v2 `allowances` lists the person's allowances in running hook sessions (the agent's own session id, the app's CLIs, class, environment); the guard applies a match after block rules and, before running a command one let through, checks `GET /api/my/cli/session` (300 ms, fail-open) that it wasn't revoked. With `leases: true`, a deploy or migration in Staging or Production takes a lease first (`POST /api/my/leases`, 400 ms, fail-open), holds Claude Code while another session has it, and releases it from the audit hook; `passport exec` renews a long command's lease every 5 minutes.
134
-
135
114
  ### Resources and prompts
136
115
 
137
116
  ```sh
@@ -167,28 +146,17 @@ npx passport-bridge@latest init --yes --move-keys # also move CLI keys into Pas
167
146
  npx passport-bridge@latest init --yes --json # one summary object with each step's status and the plan
168
147
  ```
169
148
 
170
- Plan, then apply. Init scans and signs in, then reads every step below without changing anything and shows one plan: **Plan** (what the recommended setup changes), **Edits** (every file it edits, each backed up first), **Done** (already set up), **Kept** (not changed, with how to change it later), and **You do**, then the Autopilot presets and **Where** (environments). Labels sit in one column, at least two spaces from their text. One question follows: `Use the recommended setup? (n to choose step by step) [Y/n]`. Enter applies the plan; `n` walks each step with its own question. When nothing is missing it says `Nothing to change.` and asks nothing. It ends with a ✓ list of what's true now and what's left for you, and one next command (the `PATH` line, `passport connect --wait 300`, a first thing to ask your agent, or `passport status`).
149
+ Plan, then apply. Init scans and signs in, then reads every step below without changing anything and shows one plan: **Plan** (what the recommended setup changes), **Edits** (every file it edits, each backed up first), **Done** (already set up), **Kept** (not changed, with how to change it later), and **You do**. Labels sit in one column, at least two spaces from their text. One question follows: `Use the recommended setup? (n to choose step by step) [Y/n]`. Enter applies the plan; `n` walks each step with its own question. When nothing is missing it says `Nothing to change.` and asks nothing. It ends with a ✓ list of what's true now and what's left for you, and one next command (the `PATH` line, `passport connect --wait 300`, a first thing to ask your agent, or `passport status`).
171
150
 
172
- Eight steps, each reusing the command that owns it:
151
+ Six steps, each reusing the command that owns it:
173
152
 
174
153
  1. **Scan**: the same local scan as `passport scan`, as one summary line (`--verbose` prints the table).
175
154
  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`.
176
155
  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.
177
156
  4. **Keys**: the recommended setup keeps them; the plan says `Your GitHub and Railway keys stay on this computer. Move them any time.` with `Run: passport keys move` under it. Step by step asks the same question as `passport keys move` for each: `Move your Railway account token into Passport and sign the Railway CLI out on this computer? [y/N]` (a long question wraps; `[y/N]` stays on its last line). Enter keeps the key here; an answer that isn't y or n asks again (`Type y or n.`). Add `--move-keys` to move every key it finds without asking; the closing list then says which (`Moved your Railway key into Passport and signed that CLI out here`) and, once per moved key, where to rotate the old one (`Rotate the old Railway key, since copies may exist elsewhere: https://railway.com/account/tokens`). When Passport already holds a different key for that CLI, an interactive run asks `Passport already holds a different Railway key. Replace it with this computer's? Every agent that uses it switches to this one.` then `Type railway to confirm, or press Enter to cancel:`: only the name replaces it and signs the CLI out, keeping links; anything else prints `Kept the key in Passport. This computer's Railway CLI stays signed in.` `--yes` never replaces a key. Quiet when there's nothing to move.
178
- 5. **Where** (environments): the environments Passport has placed for your apps, grouped by kind (`Production production (Railway), production (Vercel)`), one row per resource. Anything Passport can't place counts as Production and is listed once: `Treated as Production until placed: blue (Railway). Change it in Rules.` A resource named for its kind (`production` in Production) is never called assumed. This folder's links follow (`This folder: Railway production (linked), counted as Production`). With no app connected yet it says they appear once one is.
179
- 6. **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.
180
- 7. **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.
181
- 8. **Autopilot**: how much agents can do on their own, per environment:
182
-
183
- ```
184
- Autopilot Production Ask before writes
185
- Staging Ask before deletes
186
- Development Ask if irreversible
187
- ```
188
-
189
- The plan shows them once. Step by step lists the three choices once, in the words Rules uses, then asks one short question per environment where a choice is left (`Staging (1 to 3) [2]`, Enter keeps it); the recommended setup and `--yes` keep the defaults. A team floor stricter than a default is shown with why (`Your team requires at least "Ask before writes" in Staging.`), and choices below it aren't offered. A CLI credential can only make presets stricter; a looser pick says so in one line and keeps the current ones. A re-run lists them under Done without asking. The closing list says what will ask: `Autopilot on: asks only for Production writes, deletes outside Development, and irreversible actions`. **Full autopilot** (every row runs, irreversible actions included) is turned on only in Rules on the web: init never offers it, skips rows already on it, and says `Full autopilot: nothing asks.` when every row is. A server without Autopilot gets no rules step (`Autopilot needs a newer Passport server.`); init never writes the retired safety profile.
190
-
191
- What changes on disk, and how to undo it:
157
+ 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.
158
+ 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.
159
+ What changes on disk, and how to undo it:
192
160
 
193
161
  | Where | What | Undo |
194
162
  | ------------------------------------------------------------------------ | -------------------------------------------------------------------------------- | ------------------------------------------------- |
@@ -209,7 +177,7 @@ npx passport-bridge@latest init --org pek_example --yes # Jamf, Kandji,
209
177
  npx passport-bridge@latest init --org pek_example --yes --agents claude-code,codex
210
178
  ```
211
179
 
212
- `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. 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:
180
+ `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:
213
181
 
214
182
  ```
215
183
  Passport setup for passportmcp.com (enrollment pek_…mple)
@@ -228,21 +196,6 @@ sudo npx passport-bridge@latest init --org pek_example --yes --lock --strict #
228
196
 
229
197
  `--lock`, run as root, puts the guard and audit hooks in each agent's managed settings instead of the per-person steps (as root those would write into root's home), so people can't turn them off (`src/cliSetupLock.ts`, `src/lockedHooks.ts`, a checked copy of `shared/lockedHooks.ts`). It writes a root-owned launcher (`/Library/Application Support/Passport/bin/passport` on macOS, `/opt/passport/bin/passport` on Linux, 0755) that sets `PASSPORT_HOOK_VIA=managed` and runs the person's own `$PASSPORT_HOME/cli/bin/passport`; without one it lets the command run, or with `--strict` blocks it with `Passport's guard isn't set up for you yet. Run: npx passport-bridge@latest init`. Then per agent: Claude Code gets the drop-in `managed-settings.d/50-passport.json`; Codex's `/etc/codex/requirements.toml` gets Passport's `[features]`/`[hooks]` lines between `# >>> passport` and `# <<< passport`; Cursor's system `hooks.json` gets Passport's two entries beside everyone else's. `--strict` adds `allowManagedHooksOnly` and `onFailure: "block"` (Claude Code), `allow_managed_hooks_only = true` (Codex), and `failClosed` (Cursor). A file it can't merge safely (someone else's drop-in or `[hooks]`, `hooks = false`, `disableAllHooks`, invalid JSON) is left untouched with the fix. Atomic writes, files 0644. Without root, or on Windows, it writes nothing and prints `Locking needs administrator rights. Run it with sudo, or deploy these through MDM:` with each path. `--clients` narrows it; `--strict` without `--lock` exits 6. It exits 0 and prints one line per agent (`Claude Code Locked · <path>`, `Already locked`, or `! Not locked: <reason>`); `--json` prints `{version,lock:{strict,shim,agents:[{agent,state,path,message?}]}}` with `state` one of `locked`, `already_locked`, `conflict`, `needs_admin`, `failed`. A hook from the person's own settings stands down when managed settings already run Passport's guard (`src/managedHooks.ts`). `PASSPORT_MANAGED_ROOT` puts every managed path under a folder (tests). Vendor docs: code.claude.com/docs/en/settings, code.claude.com/docs/en/hooks, learn.chatgpt.com/docs/enterprise/managed-configuration, cursor.com/docs/agent/hooks.
230
198
 
231
- ### Team workflows
232
-
233
- Codex and Claude Code on macOS and Linux. Requires a member profile.
234
-
235
- ```sh
236
- passport setup list
237
- passport setup install <setup-id> <workflow-key> --agent codex # preview
238
- passport setup install <setup-id> <workflow-key> --agent codex --apply
239
- passport setup installed
240
- passport setup rollback <skill-name> --apply
241
- passport setup remove <skill-name> --apply
242
- ```
243
-
244
- Changes preview unless `--apply` is passed. Personal edits are preserved. `installed`, `remove`, and `rollback` work offline. Installing a workflow never grants app permissions or provisions accounts.
245
-
246
199
  ### Shell hook
247
200
 
248
201
  ```sh
@@ -251,95 +204,36 @@ passport hook status
251
204
  passport hook uninstall --agent claude-code --guard --apply # guard only
252
205
  ```
253
206
 
254
- Two hooks per agent. `passport hook` runs after each shell command and records the vendor, a coarse verb, a risk class, and (with Autopilot) the environment name the flags gave and the guard's decision in Activity; the server works out the class and cause. `passport hook guard` runs before it and decides from the member's Autopilot rules (`src/cliHookGuard.ts`):
255
-
256
- - **Allow** (Claude Code `permissionDecision: "allow"`, Cursor `permission: "allow"`) only when every part of the line is understood and allowed: vendor commands in `src/cliHookVendors.ts` read with confidence, and everyday commands (below). Substitutions, heredocs, variables in a path, unknown wrappers or environment prefixes, scripts, aliases, `make`, and programs Passport doesn't know mean no decision, so the agent's own permission rules apply. Codex can't receive allow; its own approvals apply (see `passport sync`).
257
- - **Ask** or **deny** when any recognized command needs it. The strictest part of a compound command wins and names itself. `--help` and `--dry-run` never ask.
258
- - Each reason names its cause in one line: `Passport: railway redeploy writes to Production. Approve to run it.` A write a safety pack raises says what it does and how it's decided: `Passport: railway variables --set writes to Production. Rules decide it like a delete. Approve to run it.` (`rules test` shows `Class: Write, decided like a Delete`), or `Blocked by a team rule: no deletes in Production. Ask an admin to run it, or request an exception in Passport.` (a cause that isn't a rule reads `Blocked by Passport: <cause>`).
259
-
260
- **Speed.** Hooks must never slow agents down. The launcher `$PASSPORT_HOME/cli/bin/passport` (written by `src/initInstall.ts`) answers plain reads and local dev commands in POSIX sh without starting Node (`src/launcherFastPath.ts`): `ls`, `cat`, `rg`, `git status`, `cargo check`, and the rest of a fixed list, joined only by single pipes, with relative paths that stay in the folder and pass through no symlink or hidden file. It answers only while `cli-policy/fastpath.ok` is armed: a full guard run arms it for five minutes when the cached rules give those commands exactly the launcher's answer (`src/hookFastPath.ts`), and a policy or profile change removes it. Each answer appends one line (agent, session id, program names, never an argument) to `cli-policy/fastpath.spool`, which the next full run counts. Anything else, or any doubt, starts Node with the same input, through `dist/hookMain.js`, which loads only the guard. `src/launcherFastPath.test.ts` holds the launcher to the full guard's exact answer across both corpora and generated variants. `PASSPORT_HOOK_FAST=0` turns it off. The after-hook and the guard's own report never wait on the network: they queue to `$PASSPORT_HOME/hook-outbox/` and a detached `passport hook flush` sends them within the budget (`src/hookOutbox.ts`). Each guard run records its timings (numbers only, `src/cliSpeed.ts`), sent every five minutes with the answered counts. `npm run bench:guard` times it all on the compiled CLI.
261
-
262
- **Script reading** (`src/cliScriptRead.ts`, `src/cliScriptText.ts`). For the project's own code, `./x.sh`, `bash x.sh`, `source x.sh`, `make <targets>` (prerequisites first, variables resolved once), and `npm|pnpm|yarn run <name>` or `npm test` (with `pre`/`post` scripts), the guard reads the file and classifies every line like a typed command; the strictest finding wins and says where it came from (`railway up writes to Production (from --environment, in deploy.sh)`; Sessions shows `· from deploy.sh`). A line it can't follow makes that part **Partly checked**: no allow, reported as unchecked, with a hash (`opaqueIds`) instead of its name, keyed with 32 random bytes made on the computer and kept in `$PASSPORT_HOME/opaque-salt` (0600), never sent; suggestion counts are therefore per computer. Limits: 256 KB a file, 20 files and 3 levels a command, 30 ms a call. Results are cached in `$PASSPORT_HOME/scan-cache.json` (0600) by path, mtime, and size, then SHA-256; findings only. The after-hook reads it again and reports `drift` when it changed in between. Package scripts no longer take the launcher's fast path, since Node reads them. With a warm cache, a 60-line script adds a few milliseconds; `bench:guard --check` fails over 20 ms.
263
-
264
- **Everyday commands** (`src/cliHookLocal.ts`, tables in `src/localCommands.ts`, `localTools.ts`, `localFiles.ts`, `localGit.ts`, `localNetwork.ts`). Local commands are placed by what they touch on this computer. The project folder (the git root, else the agent's folder; never `/` or the home folder) is Development: reads such as `ls`, `rg`, `git status`, test runners, linters, builds, and type checks are Reads; `git commit`, formatters with `--write`, package scripts, and `mv`/`cp` are Writes; `rm`, `git clean -fd`, and `git reset --hard` are Deletes. Package installs (`npm install`, `pip install`, `brew install`) are Writes in Other apps. `git push` to the default branch (origin's HEAD, else `main`/`master`) is a Write in Production, to any other branch a Write in Development; deleting a remote branch (`--delete`, `:branch`) is a Delete in Other apps because teammates share it. Temporary folders (`/tmp`, `$TMPDIR`) count as Development; deleting one whole is Irreversible. Outside the project: deleting the home folder, `/`, system paths, or the whole project is Irreversible; other writes are Writes and deletes are Deletes in Other apps; writes to keys, shell startup files, or an agent's own settings are Deletes, and reads of them are no decision. `curl`/`wget` GETs are Reads and anything that sends data is a Write, in Other apps (Development for localhost). docker `ps`/`logs` read, `run`/`build`/`compose up` change, `rm`/`prune` delete. `sudo` never runs silently. The project's own code run directly (`node scripts/check.mjs`, `npx tsx scripts/x.ts`, `bash scripts/ci.sh`, `./scripts/ci.sh`, `make test`) is a Write in Development, like a package script; Passport can't read inside it, so it is never allowed and never recorded as opaque. `tsx --test` and `./node_modules/.bin/<tool>` are their tools, `bash -lc '…'` and `sh -c '…'` are read as the line inside, and Codex's `apply_patch <<'PATCH'` is a write to the files the patch names. A checkout an agent keeps for itself (`~/.codex/worktrees/…`, `~/.cursor/worktrees/…`) is the project, not the agent's settings. Symlinks are resolved before deciding, `cd` is followed through `&&`, `;`, and subshells, and redirects are writes where they land. The server keeps a generated copy of the tables (`node scripts/generate-local-commands.mjs`) for `rules test` on the web. Allowed project work and reads are counted on the machine ("Answered for you") rather than recorded one by one; installs, pushes, and anything that asks or blocks are recorded like vendor commands, with the environment kind and never a path.
265
-
266
- The environment comes from each vendor's own flags (`src/cliHookEnvironment.ts`): Railway `-e/--environment`, Wrangler and Sentry `-e/--env`, Vercel `--prod`/`--target` (a deploy without either is a preview), Supabase `--local`/`--linked`/`--project-ref` (`db reset` is local unless `--linked`), Stripe `--live` (test mode otherwise), `git push <remote> <branch>`, `psql` hosts (`localhost` is Development), fly and Heroku `-a/--app`, kubectl `--context`/`-n`, helm `--kube-context`/`-n`, AWS `--profile`, gcloud `--project`, plus any flags the server adds. Names follow Passport's rules (`prod|production|live|main` → Production, `stag|qa|uat|preview` → Staging, `dev|local|test|sandbox|feature|branch` → Development), and the workspace's own placement of a name wins. Anything else, or no flag at all (a linked project the hook can't see), counts as Production, and the reason says `Environment unknown, treated as Production.`
207
+ Two hooks per agent. `passport hook` runs after each shell command and records the vendor, a coarse verb and a risk class in Activity (never the command line, its output, or your folder path). `passport hook guard` runs before each command and decides only through the control plane (`src/cliHookDecide.ts`, docs/design/control-plane.md):
267
208
 
268
- **Attended or unattended** (`src/cliHookMode.ts`). With a person at the keyboard, an ask is the agent's own prompt with Passport's reason, except an irreversible command outside a Full autopilot row (cli-policy v2 `fullAutopilot`; there irreversible runs, and an ask a rule makes stays in the agent's prompt): it is approved only in Passport, so the guard files the request and holds as below, and blocks with `Passport can't be reached. Irreversible commands need approval in Passport.` if Passport doesn't answer. With nobody there, the guard asks Passport instead (`POST /api/my/cli/decide`, inside the hook's budget): the server knows grants already given this session, every rule, and the workspace's environments. An allow from it runs the command (for example, a retry after approval); an ask becomes an approval request on the web and the person's phone, and the agent reads ``Waiting for approval from Ramish. Run `passport wait <id>` to wait, or continue with other work.`` If Passport can't answer in time, the local decision stands and the reason adds `Passport couldn't be reached, so this computer decided.` Signals, strongest first:
209
+ - A consequential `gh`, `git push`, `railway` or `supabase` command on a platform your workspace connected goes to `POST /api/cp/decide` through the classifiers (`src/controlPlaneGuard.ts`, `src/controlPlaneRailwayGuard.ts`, `src/controlPlaneSupabase.ts`).
210
+ - A write or delete verb of a vendor CLI that is a basic platform for you (you hold a working key for it in Passport) goes to `POST /api/cp/decide/cli` with the verb only (`src/controlPlaneCli.ts`).
211
+ - A command that can't be undone on this computer (`rm -rf ~/`, `rm -rf /`, deleting the project folder, `chmod -R` of your home folder; `src/localIrreversible.ts`) goes to `POST /api/cp/decide/cli` as This computer (`cli:local`). It runs only when an admin allowed that kind of command (Always allow covers every computer); signed out, unreachable or unanswered, the guard refuses it here.
212
+ - A block refuses the command at once with Passport's own words; nothing waits for a person. Anything else gets no answer at all, so the agent's own permission rules apply (it may ask you). Unanswered in time, a platform's command runs as it would without Passport, and the after-hook tells Passport it ran.
269
213
 
270
- | Signal | Means |
271
- | ------------------------------------------------------------------------------------------------- | --------------------------------------- |
272
- | `PASSPORT_HOOK_MODE=attended\|unattended` | Override |
273
- | Claude Code `CLAUDE_CODE_SESSION_ATTENDED` (`1`/`0`), passed to every hook | Attended / unattended |
274
- | Hook input `permission_mode` `dontAsk` or `bypassPermissions` (Claude Code, Codex) | Unattended: prompts are suppressed |
275
- | Cursor `is_background_agent: true` | Unattended: background and cloud agents |
276
- | `CLAUDE_CODE_ENTRYPOINT` `sdk-cli` (`claude -p`), `sdk-ts`, `sdk-py`, `claude-code-github-action` | Unattended (older Claude Code builds) |
277
- | `CI`, `GITHUB_ACTIONS`, `GITLAB_CI`, `BUILDKITE`, `CIRCLECI`, `JENKINS_URL`, `TF_BUILD` | Unattended |
214
+ What the guard asks about comes from `GET /api/cp/cli` (`src/cpCli.ts`), cached at `$PASSPORT_HOME/cp-cli/<profile>.json` (mode 600) and refreshed by `passport login`, `passport status`, and the hooks' detached flush when it is over an hour old.
278
215
 
279
- Codex has no field for `codex exec`; its prompt-free modes count as unattended, where an ask blocks for now with the waiting line.
216
+ **Speed.** Hooks must never slow agents down. The launcher `$PASSPORT_HOME/cli/bin/passport` (written by `src/initInstall.ts`) answers plain reads and local dev commands in POSIX sh without starting Node (`src/launcherFastPath.ts`): it prints nothing, as the full guard would, and only while the cached `GET /api/cp/cli` is fresh (`cli-policy/fastpath2.ok`).
280
217
 
281
- The approval request carries a command summary with secrets removed on this computer (`src/cliHookRedact.ts`, using `passport scan`'s key formats plus secret-named flags, variables, JSON fields, URL credentials, and long opaque values; heredoc bodies are dropped). It is the only part of a command line that ever leaves the machine, and only approvers see it.
218
+ **Script reading** (`src/cliScriptRead.ts`, `src/cliScriptText.ts`). For the project's own code, `./x.sh`, `bash x.sh`, `source x.sh`, `make <targets>` and package scripts are read on this computer so what they run is recognized; never sent.
282
219
 
283
- The guard decides from local data inside `HOOK_BUDGET_MS` (1.5 s) and prints first; only an unattended ask (or an irreversible one) waits for the server, within the same budget. The one exception is End session (`src/cliHookSessionEnd.ts`): before a command it would let run on its own (an allow, or nothing to decide), a signed-in guard asks `GET /api/my/cli/session` (agent and session id only) whether a person ended that session, at most every 15 s per session and for at most 300 ms; an ended session is cached and refused with the server's line from then on, and no answer means the command proceeds. It is a guardrail, not a security boundary: the launcher's fast-path reads and a guard running with `PASSPORT_AGENT_KEY` don't check. After answering it never waits on the network: its report, the batches, and, at most every ten minutes, a refresh of a policy cache older than an hour go through the detached `passport hook flush`. Any failure is silent and fails open. Neither hook sends the raw command line, output, folder path, or environment. Both hooks exchange the profile's refresh credential without rotating it and keep the short-lived access token in `$PASSPORT_HOME/.<profile>.access.json` (`src/accessTokenCache.ts`, mode 600, atomic replace), so most runs send one request instead of an exchange and then the request. A cached token is used only with more than a minute left; a 401 on it drops it, exchanges once, and retries once.
220
+ **Everyday commands** (`src/cliHookLocal.ts`, tables in `src/localCommands.ts`, `localTools.ts`, `localFiles.ts`, `localGit.ts`, `localNetwork.ts`) are classified by what they touch on this computer. The guard says nothing for them, except the ones that can't be undone.
284
221
 
285
- An ask becomes one Activity row. In Claude Code, with the audit hook registered, the guard parks its report in `$PASSPORT_HOME/hook-pending/` (`src/cliHookPending.ts`, mode 600, claimed by atomic rename). The audit hook for the same tool-use id sends the run with `decision: "ask", ran: true` ("asked first, then ran"). An ask nobody claims within 30 minutes (no agent fires a hook for a declined prompt) is sent by the next hook run as `ran: false` ("asked first, not run"). An allow the server gave is parked the same way, so the run's row says `Approved earlier this session`. Cursor has no tool-use id to match, so its asks are sent at once as their own "asked first" row. Denies are always sent at once; asks and blocks the server decided are recorded by the server.
222
+ - 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).
223
+ - Codex: the same events in `~/.codex/hooks.json` (`CODEX_HOME` honored). Codex supports deny only, so it never gets the rewrite.
224
+ - 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.
286
225
 
287
- - 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). The audit entry also runs on `SessionStart`, `SessionEnd`, and (0.26.0+) `UserPromptSubmit`, for late approvals below.
288
- - Codex: the same events in `~/.codex/hooks.json` (`CODEX_HOME` honored). Codex sends every shell command as `tool_name: "Bash"` with the model's raw command string in `tool_input.command` (never shell-wrapped), so it is read exactly like Claude Code's; its `apply_patch` tool is a file edit, not a shell command, and isn't recorded. Codex supports deny only (an ask fails the hook open, and its allow rewrites commands), so an ask is a deny there that says why (`Codex can't ask from a hook, so Passport blocked it. Approve it in Passport or run it yourself.`), recorded as a block. With a member profile and Autopilot, it goes to Passport like an unattended ask: an approval request, then the waiting line. Trust the hooks in Codex's `/hooks`.
289
- - Cursor: `beforeShellExecution`/`afterShellExecution` in `~/.cursor/hooks.json`. Cursor also imports Claude Code's hooks by default; that imported copy records nothing when Passport's own Cursor entry exists, so rows aren't doubled.
290
-
291
- **Hold for approval** (`src/cliHookHold.ts`). When nobody is at the keyboard and Passport opens an approval request, the guard holds for a person before answering: `hook install --guard` and `init` write `passport hook guard --hold 25` with the entry's `timeout` at 40 seconds for Claude Code (`--hold <0-45>` changes it; `0` writes today's entry; `hook install` also fixes a timeout that's too short). At runtime the hold is capped by the timeout Claude Code enforces on that entry, read from its settings, and an entry the guard can't find means no hold. If someone approves in time, the guard asks Passport again with the same request, which consumes the approval once and re-checks every rule, and only that allow runs the original command, with no retry. Anything else (no decision, a decline, expiry, an error, or a slow answer) declines the command with one line: who decides, when the request expires, and `Run "passport wait <id>" as a background command; it exits when someone decides. Then run this command again.` A decline during the hold carries the person's note. An entry without `--hold` never holds, because Claude Code runs a command when its hook outlives the timeout; `PASSPORT_HOOK_HOLD` can shorten a hold, never lengthen it. Codex never holds (its hook can't run an approved command), and neither does Cursor (what it does when a hook outlives its timeout isn't documented). Managed installs (`init --org`) don't hold yet, since a person's older CLI wouldn't know the flag. A guard from before the hold (no `--hold`, or a timeout too short for it) is named once a day, and once per CLI version, after an interactive command on a terminal: `Approvals can now continue automatically. Run: passport hook install --apply` (stderr; never from the hook, piped, or with `--json`). `passport doctor` shows the same as a warning, and `hook install --apply` keeps an existing guard current without `--guard`. Each approval binds to a normalized command key (`src/cliHookKey.ts`): every word and redirect target is redacted first, then quoting, pipes into read-only filters whose flags are all on that filter's harmless list, `2>&1`, output sent to /dev/null, and a trailing `|| true` are ignored, so an equivalent retry matches the same request. A key that still shows anything the summary hides falls back to the summary, and a key over 400 characters is sent as a SHA-256 of the whole key.
292
-
293
- **Late approvals** (`src/approvalNotice.ts`, 0.26.0+). A guarded command's request stays open a day even after the agent stops waiting (its hold ended, its turn finished, or the session closed), including a `passport exec` that waited at the keyboard. Approving it then leaves a one-time pass for that exact command in that session: the agent's next try (the same command key, the same session id) gets the server's allow, once, and the pass lapses a day after the approval. A decline stays final. Nothing runs by itself. So the agent knows, the guard (and `exec`) leaves a marker per Claude Code session when it opens a request (`$PASSPORT_HOME/hook-approvals/<digest>.json`, mode 600, a time only, at most 200, two days), and the audit entry, on that session's next `SessionStart` (a resume) or `UserPromptSubmit`, asks `POST /api/my/cli/approved` with `{runtime, sessionId}` inside the hook's budget. Passport answers what it approved there that the agent hasn't used or heard about, marking each told, and the hook prints Claude Code's `hookSpecificOutput.additionalContext`: `Passport: a command this session asked about earlier was approved after you stopped waiting. It hasn't run.`, one line per approval with the command, who approved it (a display name, never an email), when, and when it lapses, then `If it's still needed, run the exact same command again; the approval lets it run once. Otherwise, ignore this.` The marker goes once nothing in the session waits. A prompt with no marker on the computer never touches the network or loads the hook: `src/hookPromptFast.ts` reads the event first and exits (about Node's own start, ~4 ms more on an M-series Mac). Codex and Cursor take no such context: their pass is used when the agent tries the command again. Existing installs add the `UserPromptSubmit` entry with `passport hook install --apply`.
294
-
295
- **Guard health** (`src/cliGuardHealth.ts`, states and fixes in `src/cliGuardState.ts`, a checked copy of `shared/guardContract.ts`). `passport hook status` and `passport status` show each agent's guard in the web's words, **On**, **Off**, **Outdated**, **Not trusted**, or **Locked**, and each problem's fix (on a terminal the command goes on its own `Run:` line): `passport hook install --agent <agent> --guard --apply`, `npx passport-bridge@latest init`, or `Open Codex → /hooks and trust Passport's hooks.` At most once a day (`$PASSPORT_HOME/guard/.<profile>.heartbeat`) the CLI sends `POST /api/my/guard-health` with `{cliVersion, launcherTarget?, clients: [{client, present, mode, guard, plugin, codexTrust?, locked?, disabledEnv?}]}`: flags only, never a command, path, or value. It goes from a guard run with at least 300 ms of its budget left (a hook's first one waits a day), from `passport exec`, and from `passport status`. Codex trust (`src/cliCodexTrust.ts`) compares `trusted_hash` in `~/.codex/config.toml` `[hooks.state."<hooks.json>:pre_tool_use:<group>:<handler>"]` with Codex's own hash of Passport's guard entry: SHA-256 of the sorted-key JSON of `{event_name, matcher?, hooks: [{type, command, timeout (600 when unset), async, statusMessage?, additionalContextLimit? (when not 2500)}]}`, as in openai/codex `hook_hash`/`version_for_toml`, checked against codex-cli 0.146.0's `hooks/list`. Missing is **Not trusted**, a different hash is **Not trusted** (modified), `enabled = false` is **Off**. **Locked** means managed settings hold Passport's guard: `/Library/Application Support/ClaudeCode/managed-settings.json` (and `managed-settings.d/`), `/etc/claude-code/…`, `/etc/codex/requirements.toml`, `/Library/Application Support/Cursor/hooks.json`, or `/etc/cursor/hooks.json` (`PASSPORT_MANAGED_ROOT` points tests elsewhere).
296
-
297
- **Coverage** (`src/cliSeen.ts`). The guard counts every command it saw, per agent per day, one character per command in `$PASSPORT_HOME/seen/<profile>.<agent>.<day>.log` (an app's action, not checked, or neither), and Cursor's imported copy of Claude Code's hook doesn't count twice. Counts go in their own batches, at most every five minutes, as `seen: {batch, day, count, governed, opaque}` on `POST /api/my/cli-activity`, never inside a report that can expire. `passport status` prints `Rules could decide 82% of commands Passport saw this week · 1,204 not checked` and a link to those commands on Work (from a server before the buckets: `Checked 94% of commands Passport saw this week`).
298
-
299
- **When Passport can't be reached.** Production fails closed (`src/cliHookReach.ts`): a write, delete, or irreversible command placed or assumed in Production never runs offline. A Production ask, attended too, goes to Passport within the budget; a Production write the rules would run checks `/healthz` first (at most `REACH_PROBE_MS`, 800 ms), skipped when Passport answered in the last `REACH_FRESH_MS` (60 s); only successes are remembered. Either way, no answer denies with `Passport couldn't be reached, so this Production write is blocked: run it again once Passport is back.` Reads and other environments never wait on it. Elsewhere a local run, block, or attended ask stands as decided. When the guard needs Passport (an unattended ask or Codex) and it doesn't answer within the budget, the environment's `offline` setting from cli-policy v2 decides: ask, block, or allow (ask everywhere by default). An ask nobody can answer (unattended, or Codex) blocks, a second-person action is always blocked, and allow never covers an irreversible action or an ask from a team floor, team or workspace rule, approver rule, or approved exception. A policy synced more than 7 days ago uses the default. The reason ends with one line saying why, such as `Nobody is here to approve it and Passport couldn't be reached, so it's blocked.`
300
-
301
- **App access.** The person's pass for the app a `passport exec` CLI acts on (Railway for `railway`, GitHub for `gh`, and so on) comes with cli-policy v2 as `access`, one record per CLI whose app limits the person (an older server's `appAccess` map is read the same way). The guard applies it before any rule, and no rule or exception lifts it. No access blocks every command of that CLI with `You don't have access to Railway in Passport. Ask an admin: passport request railway --reason "<why>"` and, on the next line, a link to the app's Access tab; read-only blocks everything but reads and names `passport request railway --full --reason "<why>"`. `passport exec` says the same (exit 5, cause `no_access`, with `Access: <link>`). A CLI whose app isn't in the workspace keeps working from its key.
302
-
303
- `src/cliPolicy.ts` caches the member's CLI policy (`GET /api/my/cli-policy`) at `$PASSPORT_HOME/cli-policy/<profile>.json` (mode 600). Servers with Autopilot send version 2 (`src/cliPolicyV2.ts`: presets, floors, CLI rules, irreversible and delete verbs, environment flags, placed environments; Full autopilot rows come as `handsoff` plus `fullAutopilot`, so CLI 0.33 and older ask before irreversible there, and a malformed list counts as none); older servers send version 1, and then the guard keeps its earlier shape: ask or deny before destructive verbs, never allow, no server call, and reports without the Autopilot fields. `passport login` and `passport status` refresh it and `passport logout` removes it. A 404 or error keeps the previous copy; with no copy the guard asks before every destructive verb. `PASSPORT_HOOK_DISABLED=1` turns both hooks off.
304
-
305
- Token numbers (`src/cliUsage.ts`, 0.24.0+): Claude Code's SessionStart and SessionEnd hooks note the session's `transcript_path` under `$PASSPORT_HOME/usage/<profile>/`; the detached `passport hook flush` reads what each transcript (and its subagents' files) added since the last byte offset, bounded per run, and sends per-session, per-model token counts and model ids as `usage` batches. No message content is kept or sent. Only when cli-policy v2 carries `usage: true` (the workspace keeps them); `PASSPORT_TOKEN_USAGE=off` turns it off on one computer.
226
+ **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.
306
227
 
307
228
  The Passport plugin (`rsyed94/passport-plugins`) runs the same two hooks from the agent's plugin folder, with `PASSPORT_HOOK_VIA=plugin`. `passport hook status` shows those agents as `via plugin`, and `hook install`, `init`, and `init --org` skip them (`Claude Code: already covered by the Passport plugin.`) so nothing is recorded twice. The plugin pins the CLI version in `src/pluginPin.ts`.
308
229
 
309
- ### Autopilot from the terminal
230
+ ### Status
310
231
 
311
232
  ```sh
312
- passport rules test "railway redeploy -e staging"
313
- passport rules test "rm -rf ~/"
314
- passport wait apr_123
315
- passport changes # Work: needs attention, working, waiting, done today
316
- passport changes --since 7d --env production # History: a week of work that touched Production
317
- passport tasks # the same list as passport changes
318
- passport tasks ses_123 # one task (an agent session), action by action
319
- passport sync # or: passport sync --remove
320
- passport env # or: passport env set railway qa staging
321
- passport where # or: passport where acme/api
322
- passport actions add scripts/deploy.py --environment production --class write
323
- passport actions sync # propose this repository's .passport/actions.toml
324
- passport actions add --local # Not checked's local scripts here, as local work, once you confirm
233
+ passport status
325
234
  ```
326
235
 
327
- - `changes` is Work in the terminal, read from the web's own route (`GET /api/my/changes`), so its groups, counts, and words are the web's: Needs attention (runs waiting for an approval, then how many asks and fixes wait in Passport), Working now, Waiting (done on one side, not live yet), and Done today. Each row is one change (a pull request, a release, a CI run, a config or data change) with the web row's words (`src/cliWorkWords.ts`, a checked copy of the web's). A merged pull request reads "merged" with ✓, never ✗; a CI dispatch or a merge is a CI or PR row, never a Production change on its own; sessions that only read are never listed. `--history` or any filter (`--since`, `--until`, `--project`, `--pr`, `--app`, `--agent`, `--env`) lists History by day, as the web's History with the same filters. `--json` prints `WorkJson` (`src/cliWork.ts`).
328
-
329
- - `tasks` (also `sessions`) prints the same list as `changes`, so the two never disagree; its older flags still read (`--all` is `--history`, `--running` is Working now only, `--production-changes` is `--history --env production`). `tasks <id>` opens one task (an agent session): its outcome and latest actions with what they acted on.
330
-
331
- - `env` lists where commands in this folder land, read the way each vendor's own CLI reads it (`src/envResolve.ts`; order: flag, the folder's link, the vendor's default, the workspace's saved mapping, the whole-word naming rule, else Production). Link readers: `src/envLinksHosting.ts` (Railway `~/.railway/config.json`, Vercel `.vercel/project.json` / `repo.json`, Supabase `supabase/.temp/project-ref`, Wrangler config, Netlify `.netlify/state.json`, Firebase `.firebaserc` + configstore, Convex `CONVEX_DEPLOYMENT`, Neon `.neon`), `src/envLinksCloud.ts` (Fly, Heroku git remotes, kubeconfig, AWS profile, gcloud configuration, Terraform workspace, Stripe key mode), and `src/envDatabase.ts` (database URLs: only `DATABASE_URL`, `DIRECT_URL`, `POSTGRES_URL*`, `DATABASE_URL_UNPOOLED`, reduced to a host-derived key; the URL, user, and password never leave the function). Files are read fresh for every command, size-capped, and a link file symlinked out of the project is ignored (`src/envLinkFs.ts`). For a placed id its mapping decides, and a different name in the link file is treated as a rename (sent as the new label, which the server stores). A name in a link file never loosens anything: an unplaced id is named only by a label the server confirmed through the connected app (`resources[].confirmed`), which the naming rule then reads (`source: "name"`, shown as `Staging (from its name)`); without one, or when it says nothing, it is assumed Production. The table keeps its columns when every row fits the terminal and stacks each row otherwise. Findings to a server that sends `resources` in cli-policy v2 carry `{kind, source, resourceKey?, label?, platform?, flag?, via}`. `env set` calls `PUT /api/my/environments/:platform/:key`; members may only say Production.
332
-
333
- - `where` reads the Production map (`GET /api/my/where?project=owner/name`, the project from this folder's origin, else the folder; none outside a repository): what is Production for the repository and why, then every target it ships to with its place, and how many need one. Outside a repository it lists the workspace's Production; `--json` prints the server's answer. Agents get the same words from the read-only `passport_where` tool (found with `passport_search_tools`, run with `passport_call`).
334
-
335
- - `rules test` classifies the command here and sends only its app and verb (and the environment kind) to `POST /api/my/rules/test`, never the command line. An everyday command goes as a finding (`{finding: {vendor, verb, risk, environment}}`), because only this computer can place its paths. It prints the decision, its cause, the environment, and the class. Without a server answer it decides from this computer's copy and says how old it is. `--environment` picks one when the flags don't say.
336
- - `wait` long-polls `GET /api/my/approvals/<id>/wait` (30 s per request), after a short first look that names who decides, until a person decides or the request expires; `--timeout <s>` caps it. Agents run it as a background command and are woken when it exits. Once Passport says the request is still pending (never for one that doesn't exist or is already decided), on a terminal it prints the approval link and one live line (`Waiting for Erin · 1:32 left`); piped, `Waiting for a decision on <id> (until it expires at 14:05).` and `Open in Passport: <url>`. Ctrl-C exits 4 with `The request is still open. Keep waiting any time.` and `Run: passport wait <id>`. Approved: `Approved by Ramish (once). Run the command again.`, or `… for this session. Matching commands in this session run without asking.` (exit 0). Declined: the person's note, cleaned and labelled, `Declined by Ramish. Their note: "Use staging first"` (exit 5, cause `approval_denied`). Expired: `Expired at 14:05 with no decision. Run the command again to ask again.` (exit 5, cause `approval_expired`). Still waiting at `--timeout`: exit 4 with the same command as `next`.
337
- - `sessions` lists work items the way the Sessions page does (`GET /api/my/work-items`): a pull request or branch with every session on it rolled up, grouped by project (or, for app connections, by the apps they used). Each item has its agents, then one shape line: actions, active time, failed, confirmed Production writes, unplaced changes, asks with how they ended, blocked, data checks, undone, and the share Passport couldn't check. Notable items come first; the rest fold into `14 routine work items · 3,200 reads · nothing needed you`. `--all` lists every item, `--running` only those with a running session, and `--production-changes` prints the ledger (`GET /api/my/production-ledger`, 7 days unless `--since`): changes to confirmed Production by app and target, then the unplaced count with a link to set environments. `--project`, `--pr`, `--since` (`today`, `24h`, `7d`, `30d`, `90d`, or a date read in local time), and `--status running|ended` go to the server, which applies them to every session in the window, never to a loaded page. The CLI follows up to five pages and then links the rest. `--project <name>` on its own (no lens, `--pr`, or `--status`) opens with the web project page's summary (`GET /api/my/projects/<name>`): sessions and how many run, Environments (the repository's placement, then each platform its changes reached and how many were unplaced), the rules for the apps and scripts it uses, and its Production writes, all over the same window as `--since` (any time without it), then the work list; `--json` adds it as `project` (`{project,link,sinceTs,environments:[{appKey,appName,role,label,kind,source,reached,unplaced}],rules:[{id,kind,label,decision}],moreRules,production:{total,unplaced,apps},totals}`), and a server without the page prints the list alone. A work item with several sessions links to its own page (`#projects/<name>/work?branch=`). Every count the server sends carries its window (`window: {since, until, label}`); the CLI prints the label after the count (`16 work items · … · Last 7 days`) and keeps its own words for an older server. `sessions <id>` reads one session (`GET /api/my/agent-sessions/<id>`): its title, place, agent, and active time; the web page's summary strip (actions, shipped, Production, failed, asked, not checked, undo, data checks); and its 15 latest actions with what each acted on, where it landed, and how it ended. On a terminal parts wrap only between `·` and the timeline stacks when it doesn't fit; piped output never wraps and has no color.
338
- - `changes` lists every write, delete, and irreversible action that ran on confirmed Production in the window (`GET /api/my/production-changes`), the list Sessions › Production writes shows: grouped by app, newest first, each with its time and command (and what it acted on), then the agent, the person, the pull request (else branch), Failed or Approved, and Undo available, Undone by, or Undo expired. Consecutive alike changes (same command, target, agent, person, repository, and branch) fold into one line, `git push → main ×28` with their span of times, unless one failed, was approved, or has an undo state; `--json` keeps every change. With changes from more than one repository, each line names its repository. Blocked and declined actions never reached Production and aren't listed; unplaced changes are one count with a link to set environments. `--since` takes `1h`, `6h`, `24h`, `7d` (the default), `30d`, `today`, or a date read in local time; `--until` a date; `--project`, `--pr`, `--app`, and `--agent` narrow on the server. `--env` accepts only `production` for now. When the window holds more than one read returns, it says so and links the web page. The deploy and error lanes are web-only.
339
- - `sync` writes the allows Passport is sure of into each agent's own permission settings, so those prompts disappear offline and in Codex (`src/nativeSync.ts`). Only reads, test runners, builds and type checks, linters that only check, `git status`, `git add`, and `git commit`, checked against the person's rules. Formatters, fixing linters, `mv`/`cp`, and package scripts stay with the hook, which sees what they touch; deletes, installs, pushes, and Production never sync. Claude Code: `Bash(npm test *)` in `permissions.allow` of `~/.claude/settings.json`. Codex: `prefix_rule(pattern = ["npm", "test"], decision = "allow")` in `~/.codex/rules/passport.rules`, a file Passport owns. Cursor CLI: `Shell(npm:test*)` in `permissions.allow` of `~/.cursor/cli-config.json`. Cursor: `npm test` in `terminalAllowlist` of `~/.cursor/permissions.json`, only when that list already exists there (defining it replaces Cursor's in-app list). Entries Passport added are listed in `$PASSPORT_HOME/native-sync.json`; an entry you had before is never claimed or removed, and a file Passport can't parse exactly (JSONC) is left alone. Sync runs on `init`, `init --org`, every rules refresh, and `passport sync`; `hook uninstall`, `sync --remove`, and signing out of the last profile take the entries out.
340
- - `status` is one screen, like `gh auth status`, with a label per row (`You` with the name you signed in as, `Computer`, `Guard`, `Autopilot`, `Apps`, `Keys`, `Shims`, `This folder`, `Allowlists`, `CLI`); under 60 columns each label gets its own row, and piped it never wraps. `Guard` lists each agent's guard (`✓ Claude Code On`, `! Codex Not trusted`) with its fix on the line under it, the coverage line, and sends the daily guard report when due. It also adds today's speed line, `Passport adds ~20 ms per action and asked you twice today. 412 actions ran on their own.` (across your computers when the server keeps speed numbers, else `(this computer)`), and `Answered for you: N prompts today` (allows the hook gave in Claude Code, and Codex commands Passport synced, counted only when the hook's `permission_mode` would have prompted: `default`, or `acceptEdits` for anything but its filesystem commands; never bypass, don't-ask, plan, auto, or an agent that sends no mode) and which agents' allowlists are synced. The presets read as Rules names them (`Production Ask before writes`). Under them, your specific rules, counted and named as Rules lists them (`2 specific rules:` then `Run git push --delete · Production`), then one line per exception among them that lets something run your presets would ask about: `! 1 exception: git push --delete runs in Production without asking.` Counts are appended locally (`$PASSPORT_HOME/prompts-answered/`) and sent in batches at most every five minutes as `answered: {batch, count, basis: "would-ask"}` on `POST /api/my/cli-activity`; counts older CLIs kept in `answered/` are deleted, never sent. 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. The coverage line's "not checked" count is the one Work's To fix shows: named commands in the last 7 days.
341
- - `actions` tells Passport what a project script does (`src/cliActions.ts`): `actions add <script> [args…] --environment <kind> --class <class>` sends the path in the repository (or `make`, `npm`, `pnpm`, `yarn` with the target), an argument glob, the repository's remote fingerprint and name, and the SHA-256 of what it runs, never its contents, to `POST /api/my/project-actions`. `--id <op_…>` resolves a Session row's **Tell Passport what this does** from this computer's scan cache. `actions sync` proposes each entry of `.passport/actions.toml`. `actions add --local` (`src/cliActionsLocal.ts`) reads this repository's package scripts (the root's and its workspaces') the way the guard does and takes the ones on your Not checked list (`GET /api/my/coverage`) that run code Passport can't read, plus the files they run; it leaves out any whose name may reach a live system (deploy, release, migrate…) or whose readable part runs a vendor CLI or changes files outside the project, lists the rest, and after you confirm (`[y/N]`, or `--yes`) sends each as Write in Development. Without a terminal or `--yes` it only lists. A write, delete, or irreversible in Production applies at once; anything looser waits for an admin. The guard then decides a matching run as vendor `project` with that class and environment; it never makes a line allowed on its own, and a changed script stops matching (`projectChanged`) until it's set again. `.passport/actions.toml` entries apply locally only when they ask or block.
342
- - `rules test`, `sessions`, `actions`, `sync`, and `where` need a member profile. `wait` also works for a cloud agent's agent token, on the approval its own `passport exec` opened.
236
+ - `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.
343
237
 
344
238
  ### Keys and passport exec
345
239
 
@@ -363,10 +257,9 @@ passport keys shim # the CLIs that run through Passport when you type
363
257
  - `keys move` finds CLI sign-ins (Railway, GitHub CLI, Vercel, Wrangler API tokens, Supabase, Stripe test keys, the AWS `default` profile) and tokens in Claude Code's settings `env`. For each it asks `[y/N]` (Enter keeps it; `--yes` moves them all; `keys move <cli>` only that CLI's), stores the key in Passport (`POST /api/my/keys`), then signs that CLI out by removing only the credential: the token fields of `~/.railway/config.json` (project links stay), `token` in Vercel's `auth.json` (not revoked; the current team stays), Wrangler's sign-in keys in `default.toml`, the Supabase `access-token` file and its keychain token (saved database passwords stay), the Stripe profile's API keys and its live key in the keychain (account, color, and other profiles stay), the AWS profile's key lines, or the one settings entry. Files are written atomically with their mode kept. Vendor sign-outs don't run because they do more (`railway logout` unlinks every project, `vercel logout` revokes the token Passport just stored); only the GitHub CLI's `gh auth logout --hostname github.com` runs, adding `--user <active>` when several accounts are signed in, so other hosts and accounts stay. Keychain items are deleted by exact service and account (`security delete-generic-password` on macOS, `secret-tool clear` on Linux); where that isn't possible the row says which keychain copy may stay. Wrangler OAuth tokens are removed locally, not revoked. A sign-out that fails leaves the key in Passport and says what's left on disk. `.env` files are never touched: "Used by your app, so Passport leaves it." Browser-session sign-ins (Railway, Vercel, Wrangler OAuth) can't move; the line says how to make a token instead. A different key than the one already in Passport is replaced only when the person types the CLI's name at a terminal (`Type railway to confirm, or press Enter to cancel:`); no flag does it, so an agent's script can never swap a key. The CLI then names the key it replaces (`replace: <keyId>` on `POST /api/my/keys`). The server alerts the owner and admins with an Undo, records it in the audit trail, and keeps the old value encrypted for seven days (`POST /api/my/keys/:id/restore` from the browser, or the alert). Without a person at a terminal (`--yes`, no terminal), both keys stay, and the line says `Replacing a key in Passport needs you at a terminal. Run passport keys move railway yourself.` The scan report sent afterwards carries provider counts only.
364
258
  - `keys rotate <app>` (an app like `github` or `cloudflare`, or its CLI) replaces a key Passport holds. It needs a person at a terminal: without one, or with `--json`, it exits 6 and nothing is read or sent, and no flag answers for you. It reads `GET /api/my/keys` for the key and its rotation guide, prints where to make the new key (`Make a new Railway key at https://railway.com/account/tokens` and one step), asks `Paste the new Railway key (it won't be shown): ` with echo off (AWS: the id and secret on one line), and sends it once to `POST /api/my/keys/:id/rotate` with this computer's name. Passport checks it with one harmless read at the provider (Railway `me`, GitHub `/user`, Vercel `/v2/user`, Cloudflare token verify, Supabase projects, Stripe balance, AWS `GetCallerIdentity`, Neon `/users/me`, Fly.io `viewer`) before it swaps anything, in one locked update that refuses if the key changed meanwhile. A refused, unchecked, or unchanged key exits 1 with `Railway didn't accept that key. Your old key is unchanged.` (or the matching line). On success it prints `✓ Railway accepted the new key. Agents use it from now on.`, then `Now revoke the old key at Railway: <page>` and the step. Like every replace from the CLI, the old value stays restorable for seven days and the owner and admins get an alert with an Undo; **Done** in the web records the revoke. The value is never printed, logged, or in `--json`; the audit trail says who rotated which app's key, when, and from which computer.
365
259
  - `exec -- <cli> …` runs railway, gh, vercel, wrangler, supabase, stripe, aws, neonctl, or flyctl from PATH. It classifies the command here, asks `POST /api/my/exec/authorize`, and on allow sets only that vendor's variables (`GH_TOKEN`, `RAILWAY_API_TOKEN`, `VERCEL_TOKEN`, `CLOUDFLARE_API_TOKEN`, `SUPABASE_ACCESS_TOKEN`, `STRIPE_API_KEY`, `AWS_*`, `NEON_API_KEY`, `FLY_API_TOKEN`) in the child's environment, removing Passport's own and any stray vendor tokens. Output and exit code pass through. Afterwards it reports the exit code and duration (`POST /api/my/exec/result`, best effort, two seconds at most) so the session row reads Ran or Failed. It refuses paths, shells, `env`, and subcommands that would print the key, sign in again, mint longer-lived tokens, or run another program with the key (`railway run`, `gh auth`, gh extensions, `aws configure`, `vercel dev`, `fly tokens`).
366
- - Asks wait for your approval in Passport (web or push) when you're at the keyboard or with `--wait <sec>`; otherwise exit 4 with the approval id: run `passport wait <id>`, then the command again. While it waits, the approval link prints at once and, on a terminal, one live line counts down (`Waiting for Erin · 1:32 left`); piped, it prints the waiting line and `Open in Passport: <url>`. Ctrl-C exits 4: `The request is still open. Keep waiting, then run the command again.` and `Run: passport wait <id>`. An approval is used once. Blocked or declined: exit 5. A decline answers the same command for ten minutes, said with who and when: `Declined 2 minutes ago by Erin: Not during the freeze.` and `Run with --ask-again to request again.`; `--ask-again` opens a new request. No key, or it stopped working: exit 3 (`No Railway key in Passport yet.` with `Run: passport keys add railway`, or `Your Railway key in Passport stopped working. Update it in Apps.`). When this computer still has the Railway CLI's own sign-in, the no-key line is `No Railway key in Passport yet, but this computer has one.` with `Run: passport keys move railway` instead (read here; Passport never sees this computer's files). Offline: exit 1, nothing runs, and exec never uses a key on this computer instead. A team that requires the guard refuses a Production write through exec for an agent whose computer hasn't reported its guard On in 48 hours: exit 5 with `Passport gives Production access only to agents with the guard on…` and the fix. Reads and other environments run as usual.
367
- - In Claude Code, the guard rewrites a plain vendor command whose key is in Passport to `passport exec` (PreToolUse `updatedInput` with allow; a block stays a deny). When the rules ask, or someone is at the keyboard, the rewrite adds `--wait 120`, so the agent holds while the person approves: "Approve it on your phone or in Passport." Codex and Cursor get no rewrite: use `passport exec` there.
368
- - Cloud agents (Agents → Cloud agents) run exec and MCP with their agent token in `PASSPORT_AGENT_KEY` and `PASSPORT_ENDPOINT`: the owner's rules decide, the owner's keys are used, and approvals go to the owner.
369
- - Backups: for `gh issue close`, `gh pr close`, `gh api -X DELETE` of a branch, `vercel env rm`, `vercel rollback`, and `vercel promote`, exec also sends the ids Passport needs to take a backup first (repo and number or branch; the linked Vercel project and variable name from `.vercel/project.json`), never a value. After the run it prints `Backup taken. Undo within 7 days: passport undo <action-id>`, or `No backup: <reason>` for a delete it couldn't back up.
260
+ - Nothing waits for a person: anything but an allow is refused at once with Passport's words (exit 5). `--wait` is accepted and ignored. For a vendor CLI that is a basic platform, exec asks `POST /api/cp/decide/cli` first.
261
+ - In Claude Code, the guard rewrites a plain vendor command whose key is in Passport to `passport exec` (PreToolUse `updatedInput` with allow; a block stays a deny). In a chain, every other part must only read.
262
+ - Cloud agents (Agents → Cloud agents) run exec and MCP with their agent token in `PASSPORT_AGENT_KEY` and `PASSPORT_ENDPOINT`: the owner's rules decide and the owner's keys are used.
370
263
 
371
264
  ### git through Passport
372
265
 
@@ -403,21 +296,6 @@ passport kube-credential --cluster eks:111122223333:us-east-1:acme-prod
403
296
  - `setup` prints the `kubectl config set-credentials` and `set-context` lines for the context's EKS cluster; it never writes the kubeconfig.
404
297
  - 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.
405
298
 
406
- ### Undo
407
-
408
- ```sh
409
- passport undo act_123
410
- passport undo --last --yes
411
- passport undo --local
412
- passport undo --local <id> --yes
413
- ```
414
-
415
- - `--local` lists the backups the guard kept on this computer in the last 7 days (`bridge/src/localBackups.ts`): `rm` of project or home paths moved to a per-project trash (Claude Code: the guard rewrites the command to `passport hook trash`), work `git reset --hard`/`clean`/`checkout --`/`restore` threw away (a commit through a temporary index under `refs/passport/backups/<id>`), dropped stashes, and refs `git branch -d`/`tag -d`/`update-ref -d`/`push --delete`/`push --force` moved, and the manifest of a named `kubectl delete <kind> <name>…` (`kubectl get -o json` right before it runs, 2.5 s at most, cluster-set fields removed; namespaces, volumes, claims, resource definitions, and pods aren't backed up: `src/kubeBackup.ts`). With an id (8+ characters) it shows what comes back, asks, and puts it back (a manifest with `kubectl apply`); anything there now is replaced only after its own question (left as it is without a terminal). Exit 0 when everything is back, 1 when some of it was left. The audit row of such a command carries `backup: "taken"` and the backup's id, so the row in Passport says **Undo on** this computer with the exact command.
416
- - **Send to** this computer in Passport queues a restore here. The next time you run `passport` in a terminal (or `passport undo --local`), it shows what comes back and asks; nothing is put back without that yes, never from the hook, a script, or `--yes`. Passport's row then says what happened.
417
-
418
- - Shows what comes back and what won't, how old the backup is, and how long undo stays available, then asks `Undo it? [y/N]` (and which option, when there are several). Without a terminal it prints the preview and `passport undo <id> --yes`; `--option <id>` picks an option.
419
- - Passport decides an undo from the CLI like a write in that environment. Asks first: exit 4 with the approval id; run `passport wait <id>`, then the undo again. Blocked or declined: exit 5. Done: exit 0, with each step (`✓`/`✗`). Partly done or failed: exit 1. Expired, already undone, or otherwise unavailable: exit 5 with the reason. No backup: exit 6. Needs a member profile.
420
-
421
299
  ### Persistent sessions
422
300
 
423
301
  ```sh
@@ -539,33 +417,28 @@ Questions follow one convention (`src/cliAsk.ts`), only on a terminal: `[Y/n]` f
539
417
 
540
418
  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.
541
419
 
542
- | Command | JSON value |
543
- | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
544
- | `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}` |
545
- | `profiles` | `{profiles:[{name,active,client?}],active?}` |
546
- | `use` | `{profile,active:true}` |
547
- | `logout` | `{profile,removed,revoked,shimsRemoved?}` |
548
- | `status` | `{workspace,member,endpoint,auth,profile?,client,mcps,autopilot?:{presets,floors,floorReason?,rules?,exceptions?,cache:{version,fetchedAt,ageMs}},next?,computer,keys?,keysOnThisComputer?,folder,cli:{version},signedInAs?,shims?:[{vendor,command,state}]}` |
549
- | `wait` | `{approvalId,status:"approved",scope?,message}`; declined, expired, and still-waiting are errors with `approvalId` |
550
- | `rules` | `{command,decision,cause?,explanation?,environment?,environmentAssumed?,actionClass?,source}` |
551
- | `sessions` | `{view,groups:[{key,kind,label,apps,running,production,unplaced,items:[{key,title,project,branch,pull,agents,sessions,sessionIds,startedAt,lastActivityAt,activeMs,running,waiting,shape,reasons,severity,link}],routine:{count,sessions,actions,reads,items}\|null}],totals,complete,nextCursor}` (`--project <name>` alone adds `project`); `--production-changes`: `{view,sinceTs,untilTs,total,unplaced,apps:[{appKey,appName,count,lastTs,targets:[{target,tool,actionClass,count,failed,firstTs,lastTs}]}]}`; `<id>`: `{view,session,outcome,approvals,timeline,nextCursor}` |
552
- | `changes` | `{view,environment,sinceTs,untilTs,total,unplaced,complete,apps:[{vendor,appName,changes:[{id,ts,person,agent,agentName,appKey,vendor,appName,command,target,actionClass,result,approved,sessionId,project,branch,pull,undo}]}]}` |
553
- | `undo` | `{actionId,status,message,steps:[{label,ok,detail?}],option,undoActionId?}`; without `--yes` off a terminal, `{actionId,status:"preview",preview,next}`; pending, blocked, and declined are errors |
554
- | `doctor` | `{version,ok,auth,profile?,profileCount,endpointOrigin?,server?,checks}`, also on failure |
555
- | `ready` | `{ready,version,ok,auth,profile?,profileCount,endpointOrigin?,server?,checks}` |
556
- | `search` | Gateway payload with `results` or `catalog`, and `note` |
557
- | `describe` | Tool definition (`tool`, `parameters`) plus `name`/`inputSchema` aliases |
558
- | `run` | Full governed MCP tool result, including `structuredContent` |
559
- | `connect` | Gateway payload with `connections` and optional `connectAllUrl` |
560
- | `resources`, `prompts` | MCP list, read, or get result |
561
- | `discover` | `{snapshot,report,compliant}` (the old name of `scan`'s inventory step, for one release) |
562
- | `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 |
563
- | `session` | NDJSON `{id?,ok,exitCode,result?}` or `{id?,ok:false,error,cause,exitCode,...}` |
564
- | `access` | `keygen`: algorithm, paths, public JWK; `actions`: `{actions}`; `run`/`cancel`: `{run}`; `invoke`: governed result; `status`: `{receipt}` |
565
- | `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`. |
566
- | `completion` | `{shell,script}` |
567
- | `help` | `{command,help}` |
568
- | `version` | `{version,profileCount,profileSelected,selectionSource,next,endpoint?,profile?}` |
420
+ | Command | JSON value |
421
+ | ---------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
422
+ | `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}` |
423
+ | `profiles` | `{profiles:[{name,active,client?}],active?}` |
424
+ | `use` | `{profile,active:true}` |
425
+ | `logout` | `{profile,removed,revoked,shimsRemoved?}` |
426
+ | `status` | `{workspace,member,endpoint,auth,profile?,client,mcps,guard?:{agents,repaired?},next?,computer,keys?,keysOnThisComputer?,cli:{version},signedInAs?,shims?:[{vendor,command,state}]}` |
427
+ | `doctor` | `{version,ok,auth,profile?,profileCount,endpointOrigin?,server?,checks}`, also on failure |
428
+ | `ready` | `{ready,version,ok,auth,profile?,profileCount,endpointOrigin?,server?,checks}` |
429
+ | `search` | Gateway payload with `results` or `catalog`, and `note` |
430
+ | `describe` | Tool definition (`tool`, `parameters`) plus `name`/`inputSchema` aliases |
431
+ | `run` | Full governed MCP tool result, including `structuredContent` |
432
+ | `connect` | Gateway payload with `connections` and optional `connectAllUrl` |
433
+ | `resources`, `prompts` | MCP list, read, or get result |
434
+ | `discover` | `{snapshot,report,compliant}` (the old name of `scan`'s inventory step, for one release) |
435
+ | `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 |
436
+ | `session` | NDJSON `{id?,ok,exitCode,result?}` or `{id?,ok:false,error,cause,exitCode,...}` |
437
+ | `access` | `keygen`: algorithm, paths, public JWK; `actions`: `{actions}`; `run`/`cancel`: `{run}`; `invoke`: governed result; `status`: `{receipt}` |
438
+ | `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`. |
439
+ | `completion` | `{shell,script}` |
440
+ | `help` | `{command,help}` |
441
+ | `version` | `{version,profileCount,profileSelected,selectionSource,next,endpoint?,profile?}` |
569
442
 
570
443
  Errors: `{"error":"...","cause":"blocked","exitCode":5,"app":"github"}`, optionally with `approvalId`, `hint`, `profiles`, `next` (`argv` plus description), `remediation`, `retry`, `requiredInput`, or `connectUrl`.
571
444
 
@@ -575,8 +448,8 @@ Errors: `{"error":"...","cause":"blocked","exitCode":5,"app":"github"}`, optiona
575
448
  | 1 | Network, timeout, server, or unsupported-content error. When Passport can't be reached: `Passport couldn't be reached at <host>. Check your connection and try again.` |
576
449
  | 2 | Missing, expired, or revoked authentication |
577
450
  | 3 | App needs member sign-in |
578
- | 4 | Approval pending (including `wait` still waiting at its timeout) |
579
- | 5 | Policy, guardrail, selection, or approval denial (including a declined or expired approval in `wait`) |
451
+ | 4 | Approval pending |
452
+ | 5 | Policy, guardrail, selection, or approval denial |
580
453
  | 6 | Usage mistake: an unknown command, option, tool, or app (with the closest match when there is one) |
581
454
 
582
455
  ## MCP stdio bridge
package/dist/cliArgs.d.ts CHANGED
@@ -1,7 +1,8 @@
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", "wait", "rules", "actions", "tasks", "changes", "env", "where", "sync", "exec", "kube-credential", "git-credential", "undo", "keys", "setup", "session", "access", "update", "completion", "help", "version"];
1
+ export declare const COMMANDS: readonly ["init", "login", "logout", "profiles", "use", "status", "doctor", "ready", "search", "describe", "run", "connect", "connections", "resources", "prompts", "discover", "scan", "hook", "exec", "kube-credential", "git-credential", "keys", "setup", "session", "access", "update", "completion", "help", "version"];
2
2
  export type Command = (typeof COMMANDS)[number];
3
3
  /** Old names that still run for one release, left out of help, completion,
4
- * and suggestions. `discover` is part of `scan` now. */
4
+ * and suggestions. `discover` is part of `scan` now; `setup --org` is
5
+ * `init --org`. */
5
6
  export declare const HIDDEN_COMMANDS: readonly Command[];
6
7
  /** Every command help, completion, and suggestions name. */
7
8
  export declare const VISIBLE_COMMANDS: readonly Command[];