passport-bridge 0.13.1 → 0.13.2
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.
- package/README.md +6 -6
- package/dist/cli.js +2 -2
- package/dist/cliInit.js +4 -4
- package/dist/cliOutput.js +2 -2
- package/dist/cliScan.d.ts +1 -1
- package/dist/cliScan.js +4 -4
- package/dist/cliSupport.d.ts +4 -0
- package/dist/cliSupport.js +6 -0
- package/dist/initInstall.js +2 -2
- package/dist/initState.d.ts +1 -1
- package/dist/initUi.js +1 -1
- package/dist/nodeVersion.d.ts +2 -2
- package/dist/nodeVersion.js +2 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -4
package/README.md
CHANGED
|
@@ -13,14 +13,14 @@ Member profiles get the same tool access, agent selection, guardrails, approvals
|
|
|
13
13
|
npm install --global passport-bridge
|
|
14
14
|
```
|
|
15
15
|
|
|
16
|
-
Requires Node.js 22.23.2 or newer. `npx passport-bridge scan` and `npx passport-bridge init` need no install and run on Node.js 20 or newer; `scan` also needs no account. The CLI makes no background registry request, telemetry, or self-update; check with `npm view passport-bridge version` and upgrade with `npm install --global passport-bridge@latest`.
|
|
16
|
+
Requires Node.js 22.23.2 or newer. `npx passport-bridge@latest scan` and `npx passport-bridge@latest init` need no install and run on Node.js 20 or newer; `scan` also needs no account. `@latest` keeps an older global install from running instead. The CLI makes no background registry request, telemetry, or self-update; check with `npm view passport-bridge version` and upgrade with `npm install --global passport-bridge@latest`.
|
|
17
17
|
|
|
18
18
|
## Quick start
|
|
19
19
|
|
|
20
20
|
New here? One command sets everything up:
|
|
21
21
|
|
|
22
22
|
```sh
|
|
23
|
-
npx passport-bridge init
|
|
23
|
+
npx passport-bridge@latest init
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
It scans for keys your agents can reach, signs you in (or up), connects the apps it found, adds Passport to your agents, turns on the guard, and makes destructive actions ask first. See [Set up with init](#set-up-with-init).
|
|
@@ -108,7 +108,7 @@ Human mode prints text content. Binary content needs `--out <file>` or `--json`.
|
|
|
108
108
|
### Key scan
|
|
109
109
|
|
|
110
110
|
```sh
|
|
111
|
-
npx passport-bridge scan
|
|
111
|
+
npx passport-bridge@latest scan # or: passport scan
|
|
112
112
|
passport scan --path ../api --verbose
|
|
113
113
|
passport scan --check # CI and pre-commit: files only, exit 5 on a high or medium key
|
|
114
114
|
```
|
|
@@ -118,9 +118,9 @@ Reads agent MCP configs (Claude Desktop, Claude Code, Cursor, VS Code, Codex), C
|
|
|
118
118
|
### Set up with init
|
|
119
119
|
|
|
120
120
|
```sh
|
|
121
|
-
npx passport-bridge init # or: passport init
|
|
122
|
-
npx passport-bridge init --yes # accept every default; needed without a terminal
|
|
123
|
-
npx passport-bridge init --yes --json # one summary object with each step's status
|
|
121
|
+
npx passport-bridge@latest init # or: passport init
|
|
122
|
+
npx passport-bridge@latest init --yes # accept every default; needed without a terminal
|
|
123
|
+
npx passport-bridge@latest init --yes --json # one summary object with each step's status
|
|
124
124
|
```
|
|
125
125
|
|
|
126
126
|
Six steps, each reusing the command that owns it:
|
package/dist/cli.js
CHANGED
|
@@ -27,8 +27,8 @@ function arg(flag, fallback = "") {
|
|
|
27
27
|
const i = process.argv.indexOf(flag);
|
|
28
28
|
return i >= 0 && process.argv[i + 1] ? process.argv[i + 1] : fallback;
|
|
29
29
|
}
|
|
30
|
-
/** `npx passport-bridge scan` and `npx passport-bridge init` run
|
|
31
|
-
* CLI's own implementation, so both bins behave identically. */
|
|
30
|
+
/** `npx passport-bridge@latest scan` and `npx passport-bridge@latest init` run
|
|
31
|
+
* the `passport` CLI's own implementation, so both bins behave identically. */
|
|
32
32
|
const PASSPORT_ONE_LINERS = new Set(["scan", "init"]);
|
|
33
33
|
async function passportOneLiner() {
|
|
34
34
|
const problem = oneLinerNodeProblem();
|
package/dist/cliInit.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `passport init` / `npx passport-bridge init`: from "my agents hold my
|
|
3
|
-
* to "my agents use Passport" in one command.
|
|
2
|
+
* `passport init` / `npx passport-bridge@latest init`: from "my agents hold my
|
|
3
|
+
* keys" to "my agents use Passport" in one command.
|
|
4
4
|
*
|
|
5
5
|
* Scan → Sign in → Apps → Agents → Guard → Safety
|
|
6
6
|
*
|
|
@@ -15,7 +15,7 @@ import { managePayload } from "./cliConnect.js";
|
|
|
15
15
|
import { login } from "./cliLogin.js";
|
|
16
16
|
import { asFailure } from "./cliOutput.js";
|
|
17
17
|
import { renderScan } from "./cliScan.js";
|
|
18
|
-
import { cloudOrigin, endpoint, failure } from "./cliSupport.js";
|
|
18
|
+
import { cloudOrigin, endpoint, failure, selfCommand } from "./cliSupport.js";
|
|
19
19
|
import { isCliProfile, readActiveProfile, readCreds, setActiveProfile } from "./credentials.js";
|
|
20
20
|
import { AGENT_NAMES } from "./initAgents.js";
|
|
21
21
|
import { appsStep } from "./initAppsStep.js";
|
|
@@ -68,7 +68,7 @@ export class Init {
|
|
|
68
68
|
this.env = runtime.env;
|
|
69
69
|
this.platform = deps.platform ?? process.platform;
|
|
70
70
|
this.home = deps.home ?? homedir();
|
|
71
|
-
this.self = runtime
|
|
71
|
+
this.self = selfCommand(runtime);
|
|
72
72
|
this.shouldOpen = !bool(args, "no-open") && !this.env.PASSPORT_NO_OPEN && !headless(this.env, this.platform);
|
|
73
73
|
this.screen = new InitScreen(terminal, this.yes);
|
|
74
74
|
const forward = () => this.controller.abort(new InitPaused());
|
package/dist/cliOutput.js
CHANGED
|
@@ -4,7 +4,7 @@ import { CliFailure, sanitize } from "./cliSupport.js";
|
|
|
4
4
|
import { VERSION } from "./version.js";
|
|
5
5
|
function helpText(verb) {
|
|
6
6
|
const details = {
|
|
7
|
-
init: 'passport init [--yes] [--no-open] [--cloud <origin>] [--skip-apps] [--skip-agents] [--skip-guard] [--verbose] [--json]\nnpx passport-bridge init [same options]\nSets up Passport in one pass: scans for keys your agents can reach, signs you in (or up), connects the apps it found, adds Passport to your agents, turns on the guard for shell commands, and makes destructive actions ask first. Each step asks first and can be skipped. Run it again any time: finished steps are left as they are.\n --yes accept every default without asking (needed without a terminal)\n --no-open print links instead of opening a browser\n --cloud <url> a self-hosted Passport\n --skip-apps, --skip-agents, --skip-guard leave that step out\n --verbose show the full scan\n --json with --yes: one JSON summary with each step\'s status\nUndo: passport hook uninstall --client <agent> --apply, then remove the "passport" entry from each agent.',
|
|
7
|
+
init: 'passport init [--yes] [--no-open] [--cloud <origin>] [--skip-apps] [--skip-agents] [--skip-guard] [--verbose] [--json]\nnpx passport-bridge@latest init [same options]\nSets up Passport in one pass: scans for keys your agents can reach, signs you in (or up), connects the apps it found, adds Passport to your agents, turns on the guard for shell commands, and makes destructive actions ask first. Each step asks first and can be skipped. Run it again any time: finished steps are left as they are.\n --yes accept every default without asking (needed without a terminal)\n --no-open print links instead of opening a browser\n --cloud <url> a self-hosted Passport\n --skip-apps, --skip-agents, --skip-guard leave that step out\n --verbose show the full scan\n --json with --yes: one JSON summary with each step\'s status\nUndo: passport hook uninstall --client <agent> --apply, then remove the "passport" entry from each agent.',
|
|
8
8
|
login: "passport login [--workspace <id>] [--cloud <origin>] [--client <id>] [--profile <name>] [--no-open]\nSigns in, stores a cli-surface rotating credential, and makes that profile active. Without --workspace, login reuses the workspace and cloud of the saved profile it refreshes, or the one workspace all saved profiles share; it never chooses between several. With no saved workspace, it opens the browser to sign in or sign up and pick or create a workspace. Passport Cloud is the default; self-hosted servers take --cloud.",
|
|
9
9
|
logout: "passport logout [--profile <name>]\nRevokes the rotating credential and always removes the local profile.",
|
|
10
10
|
profiles: "passport profiles\nLists saved profiles and marks the active profile. Works offline.",
|
|
@@ -18,7 +18,7 @@ function helpText(verb) {
|
|
|
18
18
|
connect: "passport connect [app...] [--alias <name>] [--open] [--wait <sec>]\nShows member-bound connection links and can wait for sign-in to finish. JSON is the manage_connections payload.",
|
|
19
19
|
resources: "passport resources [uri] [--out <file>]\nLists or reads workspace MCP resources. Binary content requires --out or --json.",
|
|
20
20
|
prompts: "passport prompts [name] [--set key=value] [--out <file>]\nLists or gets workspace MCP prompts. Binary content requires --out or --json.",
|
|
21
|
-
scan: "passport scan [--path <folder>] [--verbose] [--check] [--json]\nnpx passport-bridge scan [same options]\nFinds keys your agents can reach: agent configs, CLI sign-ins, your shell\nenvironment, and this project's .env files. Runs locally with no account.\nNothing leaves this machine, and no part of a key is ever printed.\n --path <folder> scan this project instead of the current folder\n --verbose show every place a key was found and files it couldn't read\n --check files only, no shell environment; exit 5 on a high or\n medium key (CI, pre-commit)\n --json one JSON document: {version,findings,agents,unreadable,checked}",
|
|
21
|
+
scan: "passport scan [--path <folder>] [--verbose] [--check] [--json]\nnpx passport-bridge@latest scan [same options]\nFinds keys your agents can reach: agent configs, CLI sign-ins, your shell\nenvironment, and this project's .env files. Runs locally with no account.\nNothing leaves this machine, and no part of a key is ever printed.\n --path <folder> scan this project instead of the current folder\n --verbose show every place a key was found and files it couldn't read\n --check files only, no shell environment; exit 5 on a high or\n medium key (CI, pre-commit)\n --json one JSON document: {version,findings,agents,unreadable,checked}",
|
|
22
22
|
discover: "passport discover\nScans supported local MCP configuration, submits privacy-minimized inventory, and exits 5 when a managed policy reports a violation.",
|
|
23
23
|
hook: "passport hook install [--client claude-code|codex|cursor] [--guard] [--apply]\npassport hook uninstall [--client claude-code|codex|cursor] [--guard] [--apply]\npassport hook status\nThe audit hook runs after each shell command an agent runs and records the vendor, a coarse verb, and a risk class in Activity. With --guard, Passport also checks each command before it runs: it asks before destructive commands it recognizes, or blocks them when your safety settings say so. It never allows anything your agent would otherwise ask about. Neither hook sends the command line, its output, your folder path, or your environment. It can't see inside scripts, aliases, or make targets. Changes are previewed unless --apply is supplied. uninstall --guard removes only the guard.",
|
|
24
24
|
setup: "passport setup list\npassport setup installed\npassport setup install <setup-id> <workflow-key> --client <codex|claude-code> [--apply]\npassport setup remove <skill-name> [--apply]\npassport setup rollback <skill-name> [--apply]\nLists assigned workflows and safely manages their local skill files. Changes are previewed unless --apply is supplied. Personal edits are preserved. Installed inventory, removal, and rollback work offline.",
|
package/dist/cliScan.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export type ScanContext = {
|
|
|
15
15
|
platform: NodeJS.Platform;
|
|
16
16
|
nodeVersion: string;
|
|
17
17
|
};
|
|
18
|
-
/** `passport scan` / `npx passport-bridge scan`. Local only: no account, no network. */
|
|
18
|
+
/** `passport scan` / `npx passport-bridge@latest scan`. Local only: no account, no network. */
|
|
19
19
|
export declare function scan(args: ParsedArgs, runtime: Runtime, context?: ScanContext): Promise<CommandResult>;
|
|
20
20
|
export declare function colorEnabled(runtime: Pick<Runtime, "stdout" | "env">): boolean;
|
|
21
21
|
export declare function renderScan(result: ScanResult, options: ScanRenderOptions): string;
|
package/dist/cliScan.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { statSync } from "node:fs";
|
|
2
2
|
import { resolve } from "node:path";
|
|
3
3
|
import { COMMANDS, bool, value } from "./cliArgs.js";
|
|
4
|
-
import { failure } from "./cliSupport.js";
|
|
4
|
+
import { failure, selfCommand } from "./cliSupport.js";
|
|
5
5
|
import { oneLinerNodeProblem } from "./nodeVersion.js";
|
|
6
6
|
import { runScan } from "./scan.js";
|
|
7
7
|
const CHECKED = {
|
|
@@ -13,7 +13,7 @@ const CHECKED = {
|
|
|
13
13
|
const INDENT = " ";
|
|
14
14
|
/** The scan's closing pitch names `init` only once that command ships. */
|
|
15
15
|
const INIT_AVAILABLE = COMMANDS.includes("init");
|
|
16
|
-
/** `passport scan` / `npx passport-bridge scan`. Local only: no account, no network. */
|
|
16
|
+
/** `passport scan` / `npx passport-bridge@latest scan`. Local only: no account, no network. */
|
|
17
17
|
export async function scan(args, runtime, context = {
|
|
18
18
|
cwd: process.cwd(),
|
|
19
19
|
initAvailable: INIT_AVAILABLE,
|
|
@@ -24,7 +24,7 @@ export async function scan(args, runtime, context = {
|
|
|
24
24
|
const nodeProblem = oneLinerNodeProblem(context.nodeVersion);
|
|
25
25
|
if (nodeProblem)
|
|
26
26
|
return failure(nodeProblem, 1, "unsupported_node");
|
|
27
|
-
const self = runtime
|
|
27
|
+
const self = selfCommand(runtime);
|
|
28
28
|
const root = scanRoot(value(args, "path"), cwd, `${self} scan`);
|
|
29
29
|
let result;
|
|
30
30
|
try {
|
|
@@ -47,7 +47,7 @@ export async function scan(args, runtime, context = {
|
|
|
47
47
|
// Last line of defense: nothing that reaches stdout may hold a fragment of a key.
|
|
48
48
|
if (result.leaks(human) || result.leaks(JSON.stringify(report))) {
|
|
49
49
|
return failure("Passport scan stopped before printing: a result looked like part of a key.", 1, "scan_leak_guard", {
|
|
50
|
-
hint: "Nothing was shown or sent. Please report this
|
|
50
|
+
hint: "Nothing was shown or sent. Please report this to hello@passportmcp.com."
|
|
51
51
|
});
|
|
52
52
|
}
|
|
53
53
|
const serious = report.findings.some((finding) => finding.severity !== "low");
|
package/dist/cliSupport.d.ts
CHANGED
|
@@ -18,6 +18,10 @@ export type Runtime = {
|
|
|
18
18
|
/** Which bin the person typed. `passport-bridge` delegates the one-liners here. */
|
|
19
19
|
invokedAs?: "passport" | "passport-bridge";
|
|
20
20
|
};
|
|
21
|
+
/** How a person runs a one-liner again. Through `passport-bridge` it is the npx
|
|
22
|
+
* form pinned to @latest, so an older global install can't shadow it. */
|
|
23
|
+
export declare const BRIDGE_ONE_LINER = "npx passport-bridge@latest";
|
|
24
|
+
export declare function selfCommand(runtime: Pick<Runtime, "invokedAs">): string;
|
|
21
25
|
export type CliNextAction = {
|
|
22
26
|
argv: string[];
|
|
23
27
|
description: string;
|
package/dist/cliSupport.js
CHANGED
|
@@ -4,6 +4,12 @@ import { assertProfileName, isCliProfile, readActiveProfile, readCreds, setActiv
|
|
|
4
4
|
import { readBoundedJson } from "./boundedResponse.js";
|
|
5
5
|
export { readBoundedJson } from "./boundedResponse.js";
|
|
6
6
|
export const DEFAULT_TIMEOUT_MS = 30_000;
|
|
7
|
+
/** How a person runs a one-liner again. Through `passport-bridge` it is the npx
|
|
8
|
+
* form pinned to @latest, so an older global install can't shadow it. */
|
|
9
|
+
export const BRIDGE_ONE_LINER = "npx passport-bridge@latest";
|
|
10
|
+
export function selfCommand(runtime) {
|
|
11
|
+
return runtime.invokedAs === "passport-bridge" ? BRIDGE_ONE_LINER : "passport";
|
|
12
|
+
}
|
|
7
13
|
export class CliFailure extends Error {
|
|
8
14
|
exitCode;
|
|
9
15
|
cause;
|
package/dist/initInstall.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The stable command `passport init` points hooks at.
|
|
3
3
|
*
|
|
4
|
-
* `npx passport-bridge init` runs from npm's cache, which npm may clear at
|
|
5
|
-
* time. A hook that points there breaks silently. So init copies the running
|
|
4
|
+
* `npx passport-bridge@latest init` runs from npm's cache, which npm may clear at
|
|
5
|
+
* any time. A hook that points there breaks silently. So init copies the running
|
|
6
6
|
* package once into `$PASSPORT_HOME/cli/<version>/` (with its dependencies) and
|
|
7
7
|
* registers `"<node>" "<that copy>/dist/passport.js"`, both absolute, so hooks
|
|
8
8
|
* do not depend on the agent's PATH. A global `passport` from npm
|
package/dist/initState.d.ts
CHANGED
|
@@ -91,7 +91,7 @@ export interface InitSession {
|
|
|
91
91
|
readonly env: Env;
|
|
92
92
|
readonly platform: NodeJS.Platform;
|
|
93
93
|
readonly home: string;
|
|
94
|
-
/** How the person runs init again: `passport` or `npx passport-bridge`. */
|
|
94
|
+
/** How the person runs init again: `passport` or `npx passport-bridge@latest`. */
|
|
95
95
|
readonly self: string;
|
|
96
96
|
readonly shouldOpen: boolean;
|
|
97
97
|
readonly signal: AbortSignal;
|
package/dist/initUi.js
CHANGED
|
@@ -117,7 +117,7 @@ export function visibleLength(text) {
|
|
|
117
117
|
export function wrapText(text, width) {
|
|
118
118
|
// A command a person may copy never breaks across lines.
|
|
119
119
|
const KEEP = "\u0000";
|
|
120
|
-
const kept = text.replace(/\b(?:npx passport-bridge
|
|
120
|
+
const kept = text.replace(/\b(?:npx passport-bridge(?:@latest)?|passport) (?:init|use|login|connect|status|logout)\b/g, (command) => command.replace(/ /g, KEEP));
|
|
121
121
|
const lines = [];
|
|
122
122
|
let current = "";
|
|
123
123
|
for (const word of kept.split(" ")) {
|
package/dist/nodeVersion.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The one-liners (`npx passport-bridge scan`, `npx passport-bridge
|
|
3
|
-
* on whatever Node a developer has. They need Node 20; older versions get one
|
|
2
|
+
* The one-liners (`npx passport-bridge@latest scan`, `npx passport-bridge@latest
|
|
3
|
+
* init`) run on whatever Node a developer has. They need Node 20; older versions get one
|
|
4
4
|
* clear line instead of a crash.
|
|
5
5
|
*/
|
|
6
6
|
export declare const ONE_LINER_MIN_NODE = 20;
|
package/dist/nodeVersion.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The one-liners (`npx passport-bridge scan`, `npx passport-bridge
|
|
3
|
-
* on whatever Node a developer has. They need Node 20; older versions get one
|
|
2
|
+
* The one-liners (`npx passport-bridge@latest scan`, `npx passport-bridge@latest
|
|
3
|
+
* init`) run on whatever Node a developer has. They need Node 20; older versions get one
|
|
4
4
|
* clear line instead of a crash.
|
|
5
5
|
*/
|
|
6
6
|
export const ONE_LINER_MIN_NODE = 20;
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "0.13.
|
|
1
|
+
export declare const VERSION = "0.13.2";
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Keep in lockstep with bridge/package.json.
|
|
2
|
-
export const VERSION = "0.13.
|
|
2
|
+
export const VERSION = "0.13.2";
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "passport-bridge",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.2",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "passport-bridge",
|
|
9
|
-
"version": "0.13.
|
|
9
|
+
"version": "0.13.2",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@modelcontextprotocol/sdk": "1.30.0"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "passport-bridge",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.2",
|
|
4
4
|
"description": "Passport CLI for governed terminal and CI agents, plus the local stdio-to-cloud MCP bridge.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -8,9 +8,6 @@
|
|
|
8
8
|
"url": "git+https://github.com/rsyed94/mcp-passport.git",
|
|
9
9
|
"directory": "bridge"
|
|
10
10
|
},
|
|
11
|
-
"bugs": {
|
|
12
|
-
"url": "https://github.com/rsyed94/passport-releases/issues"
|
|
13
|
-
},
|
|
14
11
|
"homepage": "https://passportmcp.com/connect/cli",
|
|
15
12
|
"keywords": [
|
|
16
13
|
"mcp",
|