passport-bridge 0.41.0 → 0.44.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.
- package/README.md +16 -56
- package/dist/callingAgent.d.ts +64 -0
- package/dist/callingAgent.js +163 -0
- package/dist/cliExec.d.ts +13 -29
- package/dist/cliExec.js +71 -173
- package/dist/cliGitCredential.d.ts +2 -1
- package/dist/cliGitCredential.js +28 -4
- package/dist/cliGuardHealth.js +2 -0
- package/dist/cliHook.d.ts +4 -1
- package/dist/cliHook.js +12 -5
- package/dist/cliHookDecide.js +4 -13
- package/dist/cliHookRewrite.d.ts +3 -2
- package/dist/cliHookRewrite.js +10 -6
- package/dist/cliKeys.js +10 -9
- package/dist/cliKeysBack.d.ts +3 -5
- package/dist/cliKeysBack.js +6 -23
- package/dist/cliKeysShim.d.ts +4 -1
- package/dist/cliKeysShim.js +9 -1
- package/dist/cliKubeCredential.d.ts +6 -1
- package/dist/cliKubeCredential.js +10 -0
- package/dist/cliOutput.js +14 -23
- package/dist/cliScan.js +3 -4
- package/dist/cliStatus.js +1 -3
- package/dist/cliSupport.js +7 -10
- package/dist/commandRepair.d.ts +1 -1
- package/dist/commandRepair.js +1 -1
- package/dist/completion.js +4 -4
- package/dist/connectorKit/manifests/github.generated.d.ts +1 -1
- package/dist/connectorKit/manifests/github.generated.js +13 -7
- package/dist/connectorKit/manifests/githubHooks.generated.js +1 -1
- package/dist/connectorKit/manifests/railway.generated.js +8 -8
- package/dist/connectorKit/manifests/supabase.generated.js +1 -1
- package/dist/connectorKit/manifests/supabaseCatalog.generated.js +4 -4
- package/dist/controlPlane.generated.d.ts +40 -13
- package/dist/controlPlane.generated.js +18 -23
- package/dist/controlPlaneBasic.generated.d.ts +2 -5
- package/dist/controlPlaneBasic.generated.js +2 -7
- package/dist/controlPlaneExec.js +1 -3
- package/dist/controlPlaneGithub.generated.d.ts +1 -1
- package/dist/controlPlaneGithub.generated.js +1 -1
- package/dist/controlPlaneGithubCatalog.generated.d.ts +2 -2
- package/dist/controlPlaneGithubCatalog.generated.js +1 -1
- package/dist/controlPlaneGithubCli.generated.d.ts +1 -2
- package/dist/controlPlaneGithubCli.generated.js +2 -3
- package/dist/controlPlaneGuard.d.ts +2 -2
- package/dist/controlPlaneGuard.js +2 -2
- package/dist/controlPlaneModel.generated.d.ts +2 -1
- package/dist/controlPlaneModel.generated.js +10 -2
- package/dist/controlPlaneSupabase.js +1 -1
- package/dist/execGit.d.ts +14 -10
- package/dist/execGit.js +33 -19
- package/dist/execVendors.js +3 -6
- package/dist/initKeysStep.js +15 -0
- package/dist/initPlan.d.ts +1 -1
- package/dist/initPlan.js +14 -3
- package/dist/initState.d.ts +2 -1
- package/dist/keysHere.js +3 -2
- package/dist/keysInV1.d.ts +9 -0
- package/dist/keysInV1.js +48 -0
- package/dist/keysLocal.js +4 -0
- package/dist/keysV1Cleanup.d.ts +3 -0
- package/dist/keysV1Cleanup.js +37 -0
- package/dist/offInV1.d.ts +26 -0
- package/dist/offInV1.js +28 -0
- package/dist/pluginPin.d.ts +1 -1
- package/dist/pluginPin.js +1 -1
- package/dist/statusKeys.d.ts +2 -2
- package/dist/statusKeys.js +3 -8
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/cliKeysBack.d.ts
CHANGED
|
@@ -37,16 +37,14 @@ export type DailyCheck = {
|
|
|
37
37
|
kept: Record<string, number>;
|
|
38
38
|
};
|
|
39
39
|
/**
|
|
40
|
-
* Look at every key `keys move` removed.
|
|
41
|
-
*
|
|
42
|
-
* (and that isn't kept here on purpose) is removed again, the same way
|
|
43
|
-
* `keys move` removes it. Reads a handful of small files.
|
|
40
|
+
* Look at every key `keys move` removed and report which are here again. Since v1 nothing is ever removed: Passport
|
|
41
|
+
* keeps no keys, so a CLI signed in on its own computer is expected. Reads a handful of small files.
|
|
44
42
|
*/
|
|
45
43
|
export declare function dailyKeysCheck(context: {
|
|
46
44
|
env: NodeJS.ProcessEnv;
|
|
47
45
|
home?: string;
|
|
48
46
|
platform?: NodeJS.Platform;
|
|
49
|
-
}, profile: string | undefined,
|
|
47
|
+
}, profile: string | undefined, _runner?: RemovalRunner): Promise<DailyCheck>;
|
|
50
48
|
/**
|
|
51
49
|
* The daily check: tell Passport what is here (counts only), which moved
|
|
52
50
|
* keys came back, which are gone again, and which Passport removed itself.
|
package/dist/cliKeysBack.js
CHANGED
|
@@ -71,38 +71,21 @@ export function rememberMovedKey(key, now = Date.now()) {
|
|
|
71
71
|
}
|
|
72
72
|
}
|
|
73
73
|
/**
|
|
74
|
-
* Look at every key `keys move` removed.
|
|
75
|
-
*
|
|
76
|
-
* (and that isn't kept here on purpose) is removed again, the same way
|
|
77
|
-
* `keys move` removes it. Reads a handful of small files.
|
|
74
|
+
* Look at every key `keys move` removed and report which are here again. Since v1 nothing is ever removed: Passport
|
|
75
|
+
* keeps no keys, so a CLI signed in on its own computer is expected. Reads a handful of small files.
|
|
78
76
|
*/
|
|
79
|
-
export async function dailyKeysCheck(context, profile,
|
|
80
|
-
const { findLocalKeys
|
|
77
|
+
export async function dailyKeysCheck(context, profile, _runner) {
|
|
78
|
+
const { findLocalKeys } = await import("./keysLocal.js");
|
|
81
79
|
const { readKeysChoices } = await import("./keysKept.js");
|
|
82
|
-
const { readExecVendors } = await import("./execMarker.js");
|
|
83
80
|
const { localCounts } = await import("./keysReport.js");
|
|
84
81
|
const { npmKeys } = await import("./keysHere.js");
|
|
85
82
|
const local = { ...context, home: context.home ?? (context.env.HOME || homedir()) };
|
|
86
83
|
const choices = readKeysChoices(profile);
|
|
87
|
-
const working = profile ? readExecVendors(profile) : new Set();
|
|
88
84
|
const entries = readMovedKeys();
|
|
89
85
|
const checked = [...new Set(entries.map((entry) => entry.vendor))];
|
|
90
|
-
|
|
91
|
-
const
|
|
86
|
+
// Off in v1 (decided 2026-11-16): a key that came back is only reported, never removed, whatever was answered.
|
|
87
|
+
const found = findLocalKeys(local);
|
|
92
88
|
const autoRemoved = new Set();
|
|
93
|
-
if (choices.signedOut?.on) {
|
|
94
|
-
for (const key of returned) {
|
|
95
|
-
if (choices.kept[key.vendor] || !working.has(key.vendor))
|
|
96
|
-
continue;
|
|
97
|
-
const removed = await removeLocalCopy(key, local, runner);
|
|
98
|
-
if (removed.localCopy !== "removed")
|
|
99
|
-
continue;
|
|
100
|
-
rememberMovedKey(key);
|
|
101
|
-
autoRemoved.add(key.vendor);
|
|
102
|
-
}
|
|
103
|
-
if (autoRemoved.size)
|
|
104
|
-
found = findLocalKeys(local);
|
|
105
|
-
}
|
|
106
89
|
const still = new Set(found
|
|
107
90
|
.filter((key) => entries.some((entry) => entry.vendor === key.vendor && entry.location === key.location))
|
|
108
91
|
.map((key) => key.vendor));
|
package/dist/cliKeysShim.d.ts
CHANGED
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `passport keys shim`, and the offer after `keys move`: the commands that
|
|
3
3
|
* keep a moved CLI working when it's typed (`execShims.ts` writes them).
|
|
4
|
+
* Off in v1 (offInV1.ts): adding one prints one line; listing and --remove
|
|
5
|
+
* stay so old shims can be cleaned up.
|
|
4
6
|
*/
|
|
5
7
|
import { type ParsedArgs } from "./cliArgs.js";
|
|
6
8
|
import { type CommandResult, type Runtime } from "./cliSupport.js";
|
|
7
9
|
import { type ShimInfo } from "./execShims.js";
|
|
8
10
|
import { type ExecVendor } from "./execVendors.js";
|
|
11
|
+
import { type CredentialsSwitch } from "./offInV1.js";
|
|
9
12
|
/** What the shim commands take from `keys`' dependencies (tests). */
|
|
10
|
-
export type ShimDependencies = {
|
|
13
|
+
export type ShimDependencies = CredentialsSwitch & {
|
|
11
14
|
platform?: NodeJS.Platform;
|
|
12
15
|
/** What a shim runs to reach Passport. */
|
|
13
16
|
passportCommand?: string[];
|
package/dist/cliKeysShim.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `passport keys shim`, and the offer after `keys move`: the commands that
|
|
3
3
|
* keep a moved CLI working when it's typed (`execShims.ts` writes them).
|
|
4
|
+
* Off in v1 (offInV1.ts): adding one prints one line; listing and --remove
|
|
5
|
+
* stay so old shims can be cleaned up.
|
|
4
6
|
*/
|
|
5
7
|
import { bool } from "./cliArgs.js";
|
|
6
8
|
import { failure } from "./cliSupport.js";
|
|
@@ -8,6 +10,7 @@ import { readExecVendors } from "./execMarker.js";
|
|
|
8
10
|
import { findVendorBinary, installShims, listShims, removeShims, shimBinaries, shimPathAdvice } from "./execShims.js";
|
|
9
11
|
import { EXEC_VENDOR_NAMES, execVendorOf } from "./execVendors.js";
|
|
10
12
|
import { listOf } from "./initUi.js";
|
|
13
|
+
import { issuesCredentials, KEYS_OFF, offResult } from "./offInV1.js";
|
|
11
14
|
import { pathLines } from "./pathLines.js";
|
|
12
15
|
import { table } from "./term.js";
|
|
13
16
|
/** A shim as JSON: no home-folder paths beyond Passport's own. */
|
|
@@ -32,7 +35,9 @@ export async function shim(args, runtime, deps, profile) {
|
|
|
32
35
|
const advice = shimPathAdvice(shims, runtime.env, platform);
|
|
33
36
|
const lines = shims.length
|
|
34
37
|
? table(shims.map((entry) => [entry.binary, SHIM_STATE_WORDS[entry.state]]), Number.POSITIVE_INFINITY)
|
|
35
|
-
:
|
|
38
|
+
: issuesCredentials(deps)
|
|
39
|
+
? ["No shims yet. To keep typing a CLI whose key Passport holds, add one.", "Run: passport keys shim <cli>"]
|
|
40
|
+
: ["No Passport shims on this computer."];
|
|
36
41
|
if (advice)
|
|
37
42
|
lines.push(...pathLines(advice));
|
|
38
43
|
return { json: { shims: shims.map(shimJson), ...(advice ? { pathLine: advice } : {}) }, human: lines.join("\n") };
|
|
@@ -49,6 +54,9 @@ export async function shim(args, runtime, deps, profile) {
|
|
|
49
54
|
: "No Passport shim to remove."
|
|
50
55
|
};
|
|
51
56
|
}
|
|
57
|
+
// Off in v1: a shim ran a CLI with the key Passport held. Listing and --remove stay, to clean old ones up.
|
|
58
|
+
if (!issuesCredentials(deps))
|
|
59
|
+
return offResult("keys shim", KEYS_OFF);
|
|
52
60
|
const vendor = execVendorOf(target);
|
|
53
61
|
if (!vendor)
|
|
54
62
|
return failure(`passport keys shim works for ${SHIM_USAGE}.`, 6, "usage");
|
|
@@ -16,10 +16,15 @@
|
|
|
16
16
|
*
|
|
17
17
|
* `passport kube-credential setup` prints the kubectl config lines that point
|
|
18
18
|
* a context at this plugin. It never writes the kubeconfig.
|
|
19
|
+
*
|
|
20
|
+
* Off in v1 (offInV1.ts): Passport issues no cluster tokens. Every form of
|
|
21
|
+
* the command prints one line on stderr and exits 1, with no request; the
|
|
22
|
+
* code above is switched off, not deleted.
|
|
19
23
|
*/
|
|
20
24
|
import { type ParsedArgs } from "./cliArgs.js";
|
|
21
25
|
import { type CommandResult, type Runtime } from "./cliSupport.js";
|
|
22
26
|
import { type LinkFs } from "./envLinkFs.js";
|
|
27
|
+
import { type CredentialsSwitch } from "./offInV1.js";
|
|
23
28
|
export declare const KUBE_CREDENTIAL_PATH = "/api/my/kube/credential";
|
|
24
29
|
export declare const KUBE_EXEC_API_VERSION = "client.authentication.k8s.io/v1beta1";
|
|
25
30
|
/** Use a cached token only with at least this long left. */
|
|
@@ -33,7 +38,7 @@ type Binding = {
|
|
|
33
38
|
endpoint: string;
|
|
34
39
|
refresh: string;
|
|
35
40
|
};
|
|
36
|
-
export type KubeCredentialDependencies = {
|
|
41
|
+
export type KubeCredentialDependencies = CredentialsSwitch & {
|
|
37
42
|
/** The authenticated call (tests); the default is the hook's cached-access path. */
|
|
38
43
|
api?: ApiCall;
|
|
39
44
|
now?: () => number;
|
|
@@ -16,6 +16,10 @@
|
|
|
16
16
|
*
|
|
17
17
|
* `passport kube-credential setup` prints the kubectl config lines that point
|
|
18
18
|
* a context at this plugin. It never writes the kubeconfig.
|
|
19
|
+
*
|
|
20
|
+
* Off in v1 (offInV1.ts): Passport issues no cluster tokens. Every form of
|
|
21
|
+
* the command prints one line on stderr and exits 1, with no request; the
|
|
22
|
+
* code above is switched off, not deleted.
|
|
19
23
|
*/
|
|
20
24
|
import { lstatSync } from "node:fs";
|
|
21
25
|
import { homedir } from "node:os";
|
|
@@ -27,6 +31,7 @@ import { failure, readBoundedJson, resolveCliAuth, safeApiError, sanitize, timeo
|
|
|
27
31
|
import { credentialDir, enforceOwner, writePrivateAtomic } from "./credentialStorage.js";
|
|
28
32
|
import { NODE_LINK_FS } from "./envLinkFs.js";
|
|
29
33
|
import { kubeconfigFiles, readKubeconfig } from "./kubeconfig.js";
|
|
34
|
+
import { issuesCredentials, KUBE_OFF, offLine } from "./offInV1.js";
|
|
30
35
|
export const KUBE_CREDENTIAL_PATH = "/api/my/kube/credential";
|
|
31
36
|
export const KUBE_EXEC_API_VERSION = "client.authentication.k8s.io/v1beta1";
|
|
32
37
|
const API_VERSIONS = new Set([KUBE_EXEC_API_VERSION, "client.authentication.k8s.io/v1"]);
|
|
@@ -272,6 +277,11 @@ function setup(args, runtime, deps) {
|
|
|
272
277
|
/* ---------------------------------- entry ---------------------------------- */
|
|
273
278
|
export async function kubeCredential(args, runtime, deps = {}) {
|
|
274
279
|
const [sub] = args.positionals;
|
|
280
|
+
// Off in v1: kubectl needs a credential or a clear failure, so one line on stderr and exit 1. No request.
|
|
281
|
+
if (!issuesCredentials(deps)) {
|
|
282
|
+
runtime.stderr.write(`${offLine("kube-credential", KUBE_OFF)}\n`);
|
|
283
|
+
return { json: null, silent: true, exitCode: 1 };
|
|
284
|
+
}
|
|
275
285
|
if (sub === "setup")
|
|
276
286
|
return setup(args, runtime, deps);
|
|
277
287
|
if (sub !== undefined) {
|
package/dist/cliOutput.js
CHANGED
|
@@ -20,7 +20,7 @@ const EXAMPLES = {
|
|
|
20
20
|
help: [
|
|
21
21
|
["passport init", "Set up Passport for your agents"],
|
|
22
22
|
["passport status", "Your setup on one screen"],
|
|
23
|
-
["passport exec -- railway up", "Run a CLI
|
|
23
|
+
["passport exec -- railway up", "Run a CLI after Passport decides"],
|
|
24
24
|
["passport help <command>", "Every option for one command"]
|
|
25
25
|
],
|
|
26
26
|
init: [
|
|
@@ -41,19 +41,10 @@ const EXAMPLES = {
|
|
|
41
41
|
["passport exec -- railway up", "Run it after your rules decide"],
|
|
42
42
|
["passport exec --verbose -- gh pr merge 42", "Also say which key was issued"]
|
|
43
43
|
],
|
|
44
|
-
"git-credential": [
|
|
45
|
-
["passport git-credential setup", "Send git pushes to github.com through Passport"],
|
|
46
|
-
["passport git-credential setup --remove", "Go back to your own GitHub sign-in"]
|
|
47
|
-
],
|
|
48
|
-
"kube-credential": [
|
|
49
|
-
["passport kube-credential setup", "The kubectl lines for your current context"],
|
|
50
|
-
["passport kube-credential setup --context prod", "The same, for another context"]
|
|
51
|
-
],
|
|
44
|
+
"git-credential": [["passport git-credential setup --remove", "Take Passport out of git's config"]],
|
|
52
45
|
keys: [
|
|
53
|
-
["passport keys", "
|
|
54
|
-
["passport keys
|
|
55
|
-
["passport keys add vercel", "Store a key you paste"],
|
|
56
|
-
["passport keys rotate railway", "Replace the Railway key with a new one"]
|
|
46
|
+
["passport keys", "The CLI keys on this computer"],
|
|
47
|
+
["passport keys shim --remove all", "Remove Passport's old shims"]
|
|
57
48
|
],
|
|
58
49
|
scan: [
|
|
59
50
|
["passport scan", "Keys your agents can reach from this folder"],
|
|
@@ -117,8 +108,8 @@ const HELP_GROUPS = [
|
|
|
117
108
|
[
|
|
118
109
|
"Daily",
|
|
119
110
|
[
|
|
120
|
-
["keys", "
|
|
121
|
-
["exec", "Run a vendor CLI
|
|
111
|
+
["keys", "List the CLI keys on this computer"],
|
|
112
|
+
["exec", "Run a vendor CLI after Passport decides"],
|
|
122
113
|
["hook", "Record the CLIs your agents run, and decide before they run"],
|
|
123
114
|
["connections", "Your connections: what's connected and what needs you"],
|
|
124
115
|
["connect", "Sign in to your apps"],
|
|
@@ -144,8 +135,8 @@ const HELP_GROUPS = [
|
|
|
144
135
|
[
|
|
145
136
|
["resources", "List or read MCP resources"],
|
|
146
137
|
["prompts", "List or get MCP prompts"],
|
|
147
|
-
["kube-credential", "
|
|
148
|
-
["git-credential", "
|
|
138
|
+
["kube-credential", "Off in v1: Passport issues no cluster tokens"],
|
|
139
|
+
["git-credential", "Off in v1: git uses your own sign-in"],
|
|
149
140
|
["completion", "Generate bash, zsh, or fish completion"],
|
|
150
141
|
["session", "Reuse one authenticated MCP session for NDJSON commands"],
|
|
151
142
|
["access", "Use the signed managed access gateway"],
|
|
@@ -167,19 +158,19 @@ export function commandGroups(all) {
|
|
|
167
158
|
function helpText(verb, all = false) {
|
|
168
159
|
const details = {
|
|
169
160
|
// copy-style-allow double-space: help columns line up
|
|
170
|
-
init: "passport init [--yes] [--dry-run] [--move-keys] [--no-open] [--cloud <origin>] [--skip-apps] [--skip-agents] [--skip-guard] [--verbose] [--json]\nnpx passport-bridge@latest init [same options]\nnpx passport-bridge@latest init --org <pek_key> --yes [--agents <list>] [--cloud <origin>]\nsudo npx passport-bridge@latest init --org <pek_key> --yes --lock [--strict] [--agents <list>]\nSets up Passport in one pass: scans for keys your agents can reach, signs you in (or up), then shows one plan before changing anything: the apps it connects, the agents it adds Passport to, the guard for shell commands, every file it edits (each backed up first), and what stays as it is. One question applies it; n goes step by step. Run it again any time: finished steps are left as they are, and with nothing to change it asks nothing.\n --yes use the recommended setup without asking (needed without a terminal); never waits for app sign-ins; CLI keys stay on this computer\n --dry-run show the plan and change nothing\n --move-keys
|
|
161
|
+
init: "passport init [--yes] [--dry-run] [--move-keys] [--no-open] [--cloud <origin>] [--skip-apps] [--skip-agents] [--skip-guard] [--verbose] [--json]\nnpx passport-bridge@latest init [same options]\nnpx passport-bridge@latest init --org <pek_key> --yes [--agents <list>] [--cloud <origin>]\nsudo npx passport-bridge@latest init --org <pek_key> --yes --lock [--strict] [--agents <list>]\nSets up Passport in one pass: scans for keys your agents can reach, signs you in (or up), then shows one plan before changing anything: the apps it connects, the agents it adds Passport to, the guard for shell commands, every file it edits (each backed up first), and what stays as it is. One question applies it; n goes step by step. Run it again any time: finished steps are left as they are, and with nothing to change it asks nothing.\n --yes use the recommended setup without asking (needed without a terminal); never waits for app sign-ins; CLI keys stay on this computer\n --dry-run show the plan and change nothing\n --move-keys off in v1: accepted, moves nothing\n --no-open print links instead of opening a browser\n --cloud <url> a self-hosted Passport\n --skip-apps leave out connecting apps\n --skip-agents leave out adding Passport to agents\n --skip-guard leave out the guard\n --verbose show the full scan\n --json with --yes: one JSON summary with each step's status and the plan; without --yes: the plan only\nFor your company (MDM and scripts), --org sets up every agent on this computer without asking anything or signing in: a stable copy of the CLI, Passport in each detected agent at your company's one URL, and the guard and audit hooks. People sign in later from each agent. It prints one line per agent, exits 0 even when no agents are found, and repairs anything that drifted when run again.\n --org <key> your enrollment key (pek_…)\n --agents <list> only these: claude-code, codex, cursor, vscode, claude (--lock: the first three)\n --lock run as root: put the guard in each agent's managed settings, where people can't turn it off. Without administrator rights it writes nothing and prints what to deploy through MDM\n --strict with --lock: allow only managed hooks, and block commands when the guard can't run\nTo undo it, remove the guard, then the \"passport\" entry from each agent.\nRun: passport hook uninstall --agent <agent> --apply",
|
|
171
162
|
login:
|
|
172
163
|
// copy-style-allow double-space: help columns line up
|
|
173
164
|
"passport login [--workspace <id>] [--cloud <origin>] [--agent <id>] [--profile <name>] [--no-open] [--switch] [--verbose]\npassport login --complete <id>\nSigns in through the browser with a short code, stores a rotating sign-in for the CLI, and makes that profile active. Check the code in the browser matches the one in your terminal before you approve. 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, the browser signs you in or up and you pick or create a workspace. Passport Cloud is the default; self-hosted servers take --cloud.\n Already signed in: login says as whom and asks Switch? [y/N]. --switch skips the question and lets the browser pick again.\n Without a terminal, or with --json: two steps. Login prints {verification_url, code, next_step} and exits; after the code is approved, run next_step (passport login --complete <id>) to finish.\n --verbose also show the profile name and where the sign-in is saved",
|
|
174
165
|
logout: "passport logout [--profile <name>]\nRevokes the rotating sign-in and always removes the local profile.",
|
|
175
166
|
profiles: "passport profiles\nLists saved profiles and marks the active profile. Works offline.",
|
|
176
167
|
use: "passport use <name>\nSelects a saved profile as the default for subsequent commands. Works offline.",
|
|
177
|
-
status: "passport status\nStart here. Shows you, your workspace, and this computer; each agent's guard and its fix; apps;
|
|
168
|
+
status: "passport status\nStart here. Shows you, your workspace, and this computer; each agent's guard and its fix; apps; the CLI keys found on this computer; and the CLI version. It sends Passport how many keys each app has here; never a key or a file. When a command fails, passport doctor checks why.\nJSON: {workspace,member,endpoint,auth,profile?,client,mcps:[{app,name,status,toolCount}],guard?:{agents,repaired?},computer,keys?,localKeys?:[{vendor,name,label,location,fingerprint?,holdable,kept,step}],cli}",
|
|
178
169
|
// copy-style-allow double-space: help columns line up
|
|
179
|
-
exec: "passport exec
|
|
180
|
-
"git-credential": "passport git-credential setup
|
|
181
|
-
"kube-credential": "passport kube-credential
|
|
182
|
-
keys: "passport keys [list]\npassport keys
|
|
170
|
+
exec: "passport exec -- <cli> [args…]\nRuns railway, gh, vercel, wrangler, supabase, stripe, aws, neonctl, flyctl, gcloud, firebase, az, or azd after your rules decide (git too: each push is decided as the guard decides it). The CLI runs with your own sign-in and this shell's environment: Passport issues no key (v1). The output and exit code pass through unchanged.\n Blocked, or Passport couldn't decide in time: exit 5 with the reason, at once.\n Offline: nothing runs (exit 1).\n Refuses shells, env, and subcommands that would run another program.",
|
|
171
|
+
"git-credential": "passport git-credential setup --remove\npassport git-credential get|store|erase (git runs these)\nOff in v1: Passport issues no git tokens, and git uses your own sign-in. If git still runs Passport's helper, get passes the request to the helpers git used before setup (else answers nothing, so git asks as usual), and setup changes nothing. The guard still decides each git push.\n--remove takes out exactly what setup added.",
|
|
172
|
+
"kube-credential": "passport kube-credential\nOff in v1: Passport issues no cluster tokens. It prints one line on stderr and exits 1, so kubectl stops with a clear error. Point the kubectl context at your own credentials.",
|
|
173
|
+
keys: "passport keys [list]\npassport keys shim [--remove <cli|all>]\nLists the CLI keys found on this computer (Railway, GitHub CLI, Vercel, Wrangler, Supabase, Stripe, AWS, gcloud, Firebase, npm, and keys in Claude Code's settings). They stay: in v1 Passport holds no keys, and your CLIs keep their own sign-ins. Nothing is read from or sent to Passport.\nshim: lists the commands Passport wrote in its folder (~/.passport/cli/bin) to run a CLI through passport exec; --remove <cli|all> takes them out.\nOff in v1: keys move, add, rotate, keep and signed-out, and adding a shim, print one line and change nothing.",
|
|
183
174
|
doctor: "passport doctor [--profile <name>]\nWhen a command fails: checks Node, how your sign-in is stored, the server, your sign-in, and that this CLI and the server match, with the fix for each. For your whole setup (guard, apps, keys), run passport status; in scripts and CI, passport ready. Not signed in: exit 2.\nJSON: {ok,auth,profile?,profileCount,endpointOrigin?,server?,checks}",
|
|
184
175
|
ready: "passport ready [--profile <name>]\nThe same checks as doctor, for scripts and CI: is this CLI ready to use? Check the exit code: 0 is ready. Not signed in: exit 2.\nJSON: {ready,ok,auth,profile?,profileCount,endpointOrigin?,server?,checks}",
|
|
185
176
|
search: "passport search [query…] [--app <key>]\nFinds tools you can run that match the words. With no words, lists every tool you can run, by app.\nJSON: the search result, with a note on how to narrow it.",
|
package/dist/cliScan.js
CHANGED
|
@@ -218,10 +218,9 @@ export function keysLines(keys, verbose) {
|
|
|
218
218
|
const names = (list) => sentenceList([...new Set(list.map(where))]);
|
|
219
219
|
const move = keys.filter((key) => !key.kept && key.vendor !== "npm");
|
|
220
220
|
const kept = keys.filter((key) => key.kept);
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
lines.push(`
|
|
224
|
-
}
|
|
221
|
+
// Off in v1 (offInV1.ts): Passport holds no keys, so these stay.
|
|
222
|
+
if (move.length)
|
|
223
|
+
lines.push(`CLI keys on this computer, which stay: ${names(move)}.`);
|
|
225
224
|
if (kept.length)
|
|
226
225
|
lines.push(`Kept on this computer on purpose: ${names(kept)}.`);
|
|
227
226
|
for (const key of keys.filter((entry) => entry.vendor === "npm")) {
|
package/dist/cliStatus.js
CHANGED
|
@@ -209,13 +209,11 @@ function keysRow(view, term) {
|
|
|
209
209
|
return {
|
|
210
210
|
mark: ok ? "done" : "warn",
|
|
211
211
|
name: key.name,
|
|
212
|
-
detail: ok ? keyUse(key.lastUsedAt, view.now) : key.status.replace(/_/g, " ")
|
|
213
|
-
...(ok ? {} : { note: `Run: passport keys move ${key.vendor}` })
|
|
212
|
+
detail: ok ? keyUse(key.lastUsedAt, view.now) : key.status.replace(/_/g, " ")
|
|
214
213
|
};
|
|
215
214
|
}));
|
|
216
215
|
if (keys.onThisComputer.length) {
|
|
217
216
|
lines.push(...wrap(`Still on this computer: ${listOf(keys.onThisComputer)}.`, valueWidth(term)));
|
|
218
|
-
lines.push("Run: passport keys move");
|
|
219
217
|
}
|
|
220
218
|
return { label: "Keys", lines };
|
|
221
219
|
}
|
package/dist/cliSupport.js
CHANGED
|
@@ -2,6 +2,7 @@ import { spawn } from "node:child_process";
|
|
|
2
2
|
import { value } from "./cliArgs.js";
|
|
3
3
|
import { assertProfileName, isCliProfile, readActiveProfile, readCreds, setActiveProfile } from "./credentials.js";
|
|
4
4
|
import { readBoundedJson } from "./boundedResponse.js";
|
|
5
|
+
import { agentFromEnv } from "./callingAgent.js";
|
|
5
6
|
export { readBoundedJson } from "./boundedResponse.js";
|
|
6
7
|
export const DEFAULT_TIMEOUT_MS = 30_000;
|
|
7
8
|
/** How a person runs a one-liner again. Through `passport-bridge` it is the npx
|
|
@@ -213,17 +214,13 @@ export function callerFrom(args, env) {
|
|
|
213
214
|
}
|
|
214
215
|
return normalized;
|
|
215
216
|
}
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
if (Object.hasOwn(env, "OPENCODE") || keys.some((key) => key.startsWith("OPENCODE_")))
|
|
217
|
+
// The agent's own markers, each checked against its docs (`callingAgent.ts`).
|
|
218
|
+
const marked = agentFromEnv(env);
|
|
219
|
+
if (marked)
|
|
220
|
+
return marked;
|
|
221
|
+
// OpenCode names the gateway caller only (it documents no marker; Passport records it as an unknown agent).
|
|
222
|
+
if (Object.hasOwn(env, "OPENCODE") || Object.keys(env).some((key) => key.startsWith("OPENCODE_")))
|
|
222
223
|
return "opencode";
|
|
223
|
-
if (Object.hasOwn(env, "CURSOR_TRACE_ID") || keys.some((key) => key.startsWith("CURSOR_")))
|
|
224
|
-
return "cursor";
|
|
225
|
-
if (Object.hasOwn(env, "GEMINI_CLI"))
|
|
226
|
-
return "gemini";
|
|
227
224
|
return undefined;
|
|
228
225
|
}
|
|
229
226
|
export function sanitize(message) {
|
package/dist/commandRepair.d.ts
CHANGED
|
@@ -9,5 +9,5 @@ export type CommandRepairDeps = {
|
|
|
9
9
|
};
|
|
10
10
|
export declare const LAUNCHER_REPAIRED = "Updated Passport's launcher to this version: git's helper and your shims had been running an older Passport.";
|
|
11
11
|
export declare const HELPER_REPAIRED = "Pointed git's helper for github.com at this Passport, so fetches and pushes work again.";
|
|
12
|
-
export declare const HELPER_BROKEN = "git's helper for github.com runs a Passport that doesn't answer, so github.com fetches and pushes fail.
|
|
12
|
+
export declare const HELPER_BROKEN = "git's helper for github.com runs a Passport that doesn't answer, so github.com fetches and pushes fail. To take it out, run passport git-credential setup --remove.";
|
|
13
13
|
export declare function repairPassportCommand(env: Env, deps?: CommandRepairDeps): string[];
|
package/dist/commandRepair.js
CHANGED
|
@@ -24,7 +24,7 @@ import { compareVersions, launcherCurrent } from "./launcherHealth.js";
|
|
|
24
24
|
import { VERSION } from "./version.js";
|
|
25
25
|
export const LAUNCHER_REPAIRED = "Updated Passport's launcher to this version: git's helper and your shims had been running an older Passport.";
|
|
26
26
|
export const HELPER_REPAIRED = "Pointed git's helper for github.com at this Passport, so fetches and pushes work again.";
|
|
27
|
-
export const HELPER_BROKEN = "git's helper for github.com runs a Passport that doesn't answer, so github.com fetches and pushes fail.
|
|
27
|
+
export const HELPER_BROKEN = "git's helper for github.com runs a Passport that doesn't answer, so github.com fetches and pushes fail. To take it out, run passport git-credential setup --remove.";
|
|
28
28
|
export function repairPassportCommand(env, deps = {}) {
|
|
29
29
|
const lines = [];
|
|
30
30
|
try {
|
package/dist/completion.js
CHANGED
|
@@ -18,10 +18,10 @@ const DESCRIPTIONS = {
|
|
|
18
18
|
scan: "Find the keys and MCP servers your agents can reach",
|
|
19
19
|
discover: "Now part of scan",
|
|
20
20
|
hook: "Record the CLIs your agents run, and decide before they run",
|
|
21
|
-
exec: "Run a vendor CLI
|
|
22
|
-
"kube-credential": "
|
|
23
|
-
"git-credential": "
|
|
24
|
-
keys: "
|
|
21
|
+
exec: "Run a vendor CLI after Passport decides",
|
|
22
|
+
"kube-credential": "Off in v1: Passport issues no cluster tokens",
|
|
23
|
+
"git-credential": "Off in v1: git uses your own sign-in",
|
|
24
|
+
keys: "List the CLI keys on this computer",
|
|
25
25
|
session: "Reuse one authenticated session for NDJSON commands",
|
|
26
26
|
access: "Use the signed managed access gateway",
|
|
27
27
|
update: "Update the Passport CLI to the version Passport names",
|
|
@@ -8,7 +8,7 @@ import type { ResourceTypeDef } from "../../controlPlane.generated.js";
|
|
|
8
8
|
* can name are listed (the webhook's are Level 2).
|
|
9
9
|
*
|
|
10
10
|
* A target's key is today's canonical exact target (`githubTarget`: JSON of the named fields), so a decision
|
|
11
|
-
* the kit makes
|
|
11
|
+
* the kit makes records the same digest. Branch nodes, lower-cased names and git refspecs
|
|
12
12
|
* are the hooks' (`githubHooks.ts`).
|
|
13
13
|
*/
|
|
14
14
|
export declare const GITHUB_TYPES: readonly ResourceTypeDef[];
|
|
@@ -9,7 +9,7 @@ import { GITHUB_CAPTURE } from "./githubCapture.generated.js";
|
|
|
9
9
|
* can name are listed (the webhook's are Level 2).
|
|
10
10
|
*
|
|
11
11
|
* A target's key is today's canonical exact target (`githubTarget`: JSON of the named fields), so a decision
|
|
12
|
-
* the kit makes
|
|
12
|
+
* the kit makes records the same digest. Branch nodes, lower-cased names and git refspecs
|
|
13
13
|
* are the hooks' (`githubHooks.ts`).
|
|
14
14
|
*/
|
|
15
15
|
export const GITHUB_TYPES = [
|
|
@@ -31,12 +31,12 @@ export const GITHUB_ACTIONS = [
|
|
|
31
31
|
{ key: "github.repo.tag", kind: "change", appliesTo: "repo", label: "Push a tag", icon: "Tag" },
|
|
32
32
|
{
|
|
33
33
|
key: "github.repo.collaborator",
|
|
34
|
-
kind: "
|
|
34
|
+
kind: "create",
|
|
35
35
|
appliesTo: "repo",
|
|
36
36
|
label: "Add or change a collaborator",
|
|
37
37
|
icon: "UserPlus"
|
|
38
38
|
},
|
|
39
|
-
{ key: "github.repo.public", kind: "
|
|
39
|
+
{ key: "github.repo.public", kind: "change", appliesTo: "repo", label: "Make the repository public", icon: "Eye" },
|
|
40
40
|
{ key: "github.repo.delete", kind: "delete", appliesTo: "repo", label: "Delete the repository", icon: "Trash2" },
|
|
41
41
|
{ key: "github.branch.push", kind: "change", appliesTo: "branch", label: "Push commits", icon: "GitCommit" },
|
|
42
42
|
{
|
|
@@ -49,13 +49,19 @@ export const GITHUB_ACTIONS = [
|
|
|
49
49
|
{ key: "github.branch.delete", kind: "delete", appliesTo: "branch", label: "Delete the branch", icon: "Trash2" },
|
|
50
50
|
{
|
|
51
51
|
key: "github.branch.protection",
|
|
52
|
-
kind: "
|
|
52
|
+
kind: "delete",
|
|
53
53
|
appliesTo: "branch",
|
|
54
54
|
label: "Change or remove branch protection",
|
|
55
55
|
icon: "Shield"
|
|
56
56
|
},
|
|
57
|
-
{ key: "github.org.invite", kind: "
|
|
58
|
-
{
|
|
57
|
+
{ key: "github.org.invite", kind: "create", appliesTo: "org", label: "Invite a member", icon: "UserPlus" },
|
|
58
|
+
{
|
|
59
|
+
key: "github.secret.change",
|
|
60
|
+
kind: "change",
|
|
61
|
+
appliesTo: "secrets",
|
|
62
|
+
label: "Create or change a secret",
|
|
63
|
+
icon: "Key"
|
|
64
|
+
},
|
|
59
65
|
// Anything the manifest can't name fails closed; in the server catalog since E3 (2026-11-16).
|
|
60
66
|
{ key: "github.unclassified", kind: "delete", appliesTo: "repo", label: "Unclassified action", icon: "CircleHelp" }
|
|
61
67
|
];
|
|
@@ -64,7 +70,7 @@ export const GITHUB = {
|
|
|
64
70
|
platform: "github",
|
|
65
71
|
label: "GitHub",
|
|
66
72
|
// 1: the shadow run's first manifest (2026-11-14), node ids as today's classifier names them.
|
|
67
|
-
version:
|
|
73
|
+
version: 3,
|
|
68
74
|
plans: ["free", "team", "enterprise"],
|
|
69
75
|
identity: "member",
|
|
70
76
|
services: [
|
|
@@ -394,7 +394,7 @@ export function githubHooks(m, branches) {
|
|
|
394
394
|
if (found === null)
|
|
395
395
|
return "unclassified";
|
|
396
396
|
const list = Array.isArray(found) ? found : [found];
|
|
397
|
-
// A body that can't be read names no exact target
|
|
397
|
+
// A body that can't be read names no exact target.
|
|
398
398
|
return opaque ? list.map(({ target: _t, ...rest }) => rest) : list;
|
|
399
399
|
},
|
|
400
400
|
gitPush: (n, _p, context) => gitPush(n, context, branches),
|
|
@@ -41,11 +41,11 @@ export const RAILWAY_NODES = {
|
|
|
41
41
|
};
|
|
42
42
|
/** The catalog's keys and kinds; a key the catalog folded into another keeps that one's kind. */
|
|
43
43
|
const ACTIONS = [
|
|
44
|
-
["railway.workspace.member", "
|
|
45
|
-
["railway.workspace.token", "
|
|
44
|
+
["railway.workspace.member", "create", "workspace", "Invite or change a member", "Users"],
|
|
45
|
+
["railway.workspace.token", "create", "workspace", "Create a token", "Key"],
|
|
46
46
|
["railway.workspace.limit", "change", "workspace", "Change the usage limit", "Gauge"],
|
|
47
|
-
["railway.project.member", "
|
|
48
|
-
["railway.project.token", "
|
|
47
|
+
["railway.project.member", "create", "project", "Add or change a member", "Users"],
|
|
48
|
+
["railway.project.token", "create", "project", "Create a project token", "Key"],
|
|
49
49
|
["railway.project.change", "change", "project", "Other change", "Pencil"],
|
|
50
50
|
["railway.project.delete", "change", "project", "Delete project", "Trash2"],
|
|
51
51
|
["railway.project.webhook", "change", "project", "Add a webhook", "Webhook"],
|
|
@@ -58,11 +58,11 @@ const ACTIONS = [
|
|
|
58
58
|
["railway.service.delete", "delete", "service", "Delete service", "Trash2"],
|
|
59
59
|
["railway.service.variables", "change", "service", "Change variables", "Variable"],
|
|
60
60
|
["railway.service.variable.delete", "delete", "service", "Delete a variable", "Variable"],
|
|
61
|
-
["railway.service.secrets", "
|
|
61
|
+
["railway.service.secrets", "read", "service", "Read variable values", "Variable"],
|
|
62
62
|
["railway.service.shell", "change", "service", "Open a shell", "Terminal"],
|
|
63
|
-
["railway.service.domain", "
|
|
63
|
+
["railway.service.domain", "create", "service", "Add a domain", "Globe"],
|
|
64
64
|
["railway.service.domain.delete", "delete", "service", "Remove a domain", "Globe"],
|
|
65
|
-
["railway.service.tcp", "
|
|
65
|
+
["railway.service.tcp", "create", "service", "Add a TCP Proxy", "Network"],
|
|
66
66
|
["railway.service.tcp.delete", "delete", "service", "Remove a TCP Proxy", "Network"],
|
|
67
67
|
["railway.service.scale", "change", "service", "Change scale", "Gauge"],
|
|
68
68
|
["railway.volume.delete", "delete", "volume", "Delete volume and its data", "Trash2"],
|
|
@@ -85,7 +85,7 @@ export const RAILWAY = {
|
|
|
85
85
|
platform: "railway",
|
|
86
86
|
label: "Railway",
|
|
87
87
|
// 1: the shadow run's first manifest (2026-11-14), node ids as today's classifier names them.
|
|
88
|
-
version:
|
|
88
|
+
version: 2,
|
|
89
89
|
plans: ["hobby", "pro", "enterprise"],
|
|
90
90
|
identity: "member",
|
|
91
91
|
services: [
|
|
@@ -15,7 +15,7 @@ export const SUPABASE = {
|
|
|
15
15
|
// 2: schema 2 (fail closed, Unclassified, reads with evidence). 3: SQL code, policy and drop-object
|
|
16
16
|
// Actions after the round 2 review. 4: the 9 governed actions (2026-11-13); declared inputs. Node ids
|
|
17
17
|
// unchanged.
|
|
18
|
-
version:
|
|
18
|
+
version: 5,
|
|
19
19
|
plans: ["free", "pro", "team", "enterprise"],
|
|
20
20
|
identity: "member",
|
|
21
21
|
services: [
|
|
@@ -12,11 +12,11 @@ export const SUPABASE_ACTIONS = [
|
|
|
12
12
|
a("supabase.branch.merge", "change", "branch", "Merge into production", "GitMerge"),
|
|
13
13
|
// Supabase publishes no API for invitations; the org members feed reports them (Auth's own invite
|
|
14
14
|
// endpoint is on the project's URL, outside the Management API sources).
|
|
15
|
-
a("supabase.auth.invite", "
|
|
16
|
-
a("supabase.auth.sso", "
|
|
17
|
-
a("supabase.storage.public", "
|
|
15
|
+
a("supabase.auth.invite", "create", "organization", "Invite users", "Mail"),
|
|
16
|
+
a("supabase.auth.sso", "delete", "auth", "Change sign-in providers", "Fingerprint"),
|
|
17
|
+
a("supabase.storage.public", "change", "bucket", "Make a bucket public", "Globe"),
|
|
18
18
|
a("supabase.function.deploy", "change", "function", "Deploy a function", "Rocket"),
|
|
19
|
-
a("supabase.database.grant", "
|
|
19
|
+
a("supabase.database.grant", "change", "database", "Grant database privileges", "KeyRound"),
|
|
20
20
|
a("supabase.project.delete", "delete", "project", "Pause or delete the project", "Trash2"),
|
|
21
21
|
// Every other write. Kind change (allowed by default, still recorded): a write that only creates or
|
|
22
22
|
// modifies. Everything else (deletes, settings, keys, code that runs later, access) is Unclassified.
|