passport-bridge 0.16.14 → 0.17.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 CHANGED
@@ -5,7 +5,7 @@ This package installs two binaries that reach a Passport workspace through its g
5
5
  - `passport`: CLI for terminal agents, scripts, and CI.
6
6
  - `passport-bridge`: stdio bridge for agents that launch a local MCP server, so the agent config holds no long-lived token.
7
7
 
8
- Member profiles get the same tool access, agent selection, guardrails, approvals, and activity logging as native agents. Agent keys keep their pass, selection, guardrails, and audit trail but never raise a member approval prompt.
8
+ Member profiles get the same tool access, agent selection, guardrails, approvals, and activity logging as native agents. Agent tokens keep their pass, selection, guardrails, and audit trail but never raise a member approval prompt.
9
9
 
10
10
  ## Install
11
11
 
@@ -100,7 +100,7 @@ passport connect github --wait 120
100
100
 
101
101
  - An approval-required call exits 4 with its approval ID. `--wait <s>` retries only after a definite `approval_pending` response.
102
102
  - The CLI never retries after a network failure or timeout, since the outcome is unknown.
103
- - `connect` with no app names uses one aggregate link when several apps need sign-in. Agent keys get guidance but cannot create sign-in links.
103
+ - `connect` with no app names uses one aggregate link when several apps need sign-in. Agent tokens get guidance but cannot create sign-in links.
104
104
 
105
105
  ### Resources and prompts
106
106
 
@@ -286,7 +286,7 @@ passport actions sync # propose this repository's .passport/actions.toml
286
286
  - `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`, `setup --org`, every rules refresh, and `passport sync`; `hook uninstall`, `sync --remove`, and signing out of the last profile take the entries out.
287
287
  - `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 added 0.3 s 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 Cursor, and Codex commands Passport synced, counted only when the agent would have prompted) and which agents' allowlists are synced. Under the presets, one line per exception that lets something run your presets would ask about, in the web's words: `! 1 exception: deletes run in Production without asking, even without a backup.` Counts are appended locally (`$PASSPORT_HOME/answered/`) and sent in batches at most every five minutes as `answered: {batch, count}` on `POST /api/my/cli-activity`.
288
288
  - `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`. A change, 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.
289
- - `rules test`, `sessions`, `actions`, and `sync` need a member profile. `wait` also works for a cloud agent's key, on the approval its own `passport exec` opened.
289
+ - `rules test`, `sessions`, `actions`, and `sync` need a member profile. `wait` also works for a cloud agent's agent token, on the approval its own `passport exec` opened.
290
290
 
291
291
  ### Keys and passport exec
292
292
 
@@ -308,7 +308,7 @@ passport keys shim # the CLIs that run through Passport when you type
308
308
  - `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`).
309
309
  - 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. Add a Railway key in Passport → Apps.`, 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 exec for an agent whose computer hasn't reported its guard On in 48 hours: exit 5 with `Blocked by Passport: guard required…` and the fix.
310
310
  - 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.
311
- - Cloud agents (Agents → Cloud agents) run exec and MCP with `PASSPORT_AGENT_KEY` and `PASSPORT_ENDPOINT`: the owner's rules decide, the owner's keys are used, and approvals go to the owner.
311
+ - 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.
312
312
  - 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.
313
313
 
314
314
  ### Undo
@@ -377,7 +377,7 @@ passport ready --json
377
377
  passport search "deployment status" --json
378
378
  ```
379
379
 
380
- `PASSPORT_ENDPOINT` is Passport's one URL (`https://<host>/mcp`, where the agent key's own prefix says which workspace) or a workspace's own (`https://<host>/w/<workspace>/mcp`). Set both variables together. Environment auth overrides stored profiles, persists nothing, and cannot be combined with `--profile` or `login`/`logout`. Agent keys skip member approval prompts; use a member profile for work that must pause for a human.
380
+ `PASSPORT_ENDPOINT` is Passport's one URL (`https://<host>/mcp`, where the agent token's own prefix says which workspace) or a workspace's own (`https://<host>/w/<workspace>/mcp`). Set both variables together. Environment auth overrides stored profiles, persists nothing, and cannot be combined with `--profile` or `login`/`logout`. Agent tokens skip member approval prompts; use a member profile for work that must pause for a human.
381
381
 
382
382
  ## Managed access
383
383
 
@@ -21,6 +21,7 @@ import { readBoundedJson } from "./boundedResponse.js";
21
21
  import { value } from "./cliArgs.js";
22
22
  import { memberApi } from "./cliClient.js";
23
23
  import { localMachine, NODE_FS } from "./cliHookLocal.js";
24
+ import { CLASS_LABEL } from "./cliAutopilotPolicy.js";
24
25
  import { lookupOpaqueId, normalizeRemote, originUrl, remoteFingerprint, sha256 } from "./cliScriptRead.js";
25
26
  import { linesDigestInput, makeLines, packageLines, parseRepoActions } from "./cliScriptText.js";
26
27
  import { unknownSubcommand } from "./cliSuggest.js";
@@ -30,9 +31,9 @@ const ENVIRONMENTS = new Set(["production", "staging", "development"]);
30
31
  const CLASSES = new Set(["read", "change", "delete", "irreversible"]);
31
32
  const RUNNERS = new Set(["make", "npm", "pnpm", "yarn"]);
32
33
  const ENV_WORD = { production: "Production", staging: "Staging", development: "Development" };
33
- /** An action class in sentence case, as `rules test` and the web say it: "Change". */
34
+ /** An action class in the word `rules test` and the web use: "Change". */
34
35
  function classWord(actionClass) {
35
- return actionClass ? `${actionClass.charAt(0).toUpperCase()}${actionClass.slice(1)}` : "";
36
+ return actionClass && CLASSES.has(actionClass) ? CLASS_LABEL[actionClass] : "";
36
37
  }
37
38
  function api(args, runtime, deps) {
38
39
  if (deps.api)
@@ -10,7 +10,7 @@
10
10
  */
11
11
  import { guardStatus } from "./cliStatusGuard.js";
12
12
  import { value } from "./cliArgs.js";
13
- import { OTHER_APPS, causeSentence, PRESET_ROWS, rowLabel } from "./cliAutopilotPolicy.js";
13
+ import { CLASS_LABEL, OTHER_APPS, causeSentence, PRESET_ROWS, rowLabel } from "./cliAutopilotPolicy.js";
14
14
  import { classifyLine, localMachine } from "./cliHookLocal.js";
15
15
  import { ENV_KINDS, isEnvKind } from "./cliHookEnvironment.js";
16
16
  import { decideGuard, guardLabel } from "./cliHookGuard.js";
@@ -30,12 +30,6 @@ import { api, text } from "./cliMemberCall.js";
30
30
  // ---- passport rules test ----------------------------------------------------
31
31
  const DECISION_WORDS = { allow: "Runs", ask: "Asks first", block: "Blocked" };
32
32
  const DECISION_MARKS = { allow: "done", ask: "warn", block: "fail" };
33
- const CLASS_WORDS = {
34
- read: "Read",
35
- change: "Change",
36
- delete: "Delete",
37
- irreversible: "Irreversible"
38
- };
39
33
  function ageText(ms) {
40
34
  const minutes = Math.round(ms / 60_000);
41
35
  if (minutes < 1)
@@ -66,7 +60,7 @@ function ruleTestLines(term, label, result, source) {
66
60
  label,
67
61
  ` ${mark(term, DECISION_MARKS[result.decision])} ${explanation}`,
68
62
  ...(environment ? [` Environment: ${environment}`] : []),
69
- ...(result.actionClass ? [` Class: ${CLASS_WORDS[result.actionClass]}`] : []),
63
+ ...(result.actionClass ? [` Class: ${CLASS_LABEL[result.actionClass]}`] : []),
70
64
  ...indented(source)
71
65
  ];
72
66
  }
@@ -23,6 +23,18 @@ export type Cause = {
23
23
  id?: string;
24
24
  label: string;
25
25
  };
26
+ /**
27
+ * Checked copies of the class words in shared/autopilotContract.ts
28
+ * (cliAutopilotPolicy.test.ts compares them): one class, one word, on every
29
+ * surface. `CLASS_LABEL` names it ("Delete"), `CLASS_EFFECT` says what it does
30
+ * to an environment ("deletes from Production"), `CLASS_EFFECT_OTHER` without one
31
+ * ("deletes data").
32
+ */
33
+ export declare const CLASS_LABEL: Readonly<Record<ActionClass, string>>;
34
+ export declare const CLASS_EFFECT: Readonly<Record<ActionClass, string>>;
35
+ export declare const CLASS_EFFECT_OTHER: Readonly<Record<ActionClass, string>>;
36
+ export declare const CLASS_OF_RISK: Readonly<Record<"read" | "write" | "destructive", ActionClass>>;
37
+ export declare function riskOfClass(actionClass: ActionClass): "read" | "write" | "destructive";
26
38
  /**
27
39
  * Checked copies of `ruleParts` and `causeSentence` in shared/collabContract.ts
28
40
  * (the CLI can't import shared/; cliAutopilot.test.ts compares them):
@@ -14,6 +14,39 @@
14
14
  import { ENV_LABEL } from "./cliHookEnvironment.js";
15
15
  export const PRESETS = ["careful", "balanced", "handsoff"];
16
16
  export const ACTION_CLASSES = ["read", "change", "delete", "irreversible"];
17
+ /**
18
+ * Checked copies of the class words in shared/autopilotContract.ts
19
+ * (cliAutopilotPolicy.test.ts compares them): one class, one word, on every
20
+ * surface. `CLASS_LABEL` names it ("Delete"), `CLASS_EFFECT` says what it does
21
+ * to an environment ("deletes from Production"), `CLASS_EFFECT_OTHER` without one
22
+ * ("deletes data").
23
+ */
24
+ export const CLASS_LABEL = {
25
+ read: "Read",
26
+ change: "Change",
27
+ delete: "Delete",
28
+ irreversible: "Irreversible"
29
+ };
30
+ export const CLASS_EFFECT = {
31
+ read: "reads",
32
+ change: "changes",
33
+ delete: "deletes from",
34
+ irreversible: "can't be undone in"
35
+ };
36
+ export const CLASS_EFFECT_OTHER = {
37
+ read: "reads data",
38
+ change: "makes a change",
39
+ delete: "deletes data",
40
+ irreversible: "can't be undone"
41
+ };
42
+ export const CLASS_OF_RISK = {
43
+ read: "read",
44
+ write: "change",
45
+ destructive: "delete"
46
+ };
47
+ export function riskOfClass(actionClass) {
48
+ return actionClass === "read" ? "read" : actionClass === "change" ? "write" : "destructive";
49
+ }
17
50
  /**
18
51
  * Checked copies of `ruleParts` and `causeSentence` in shared/collabContract.ts
19
52
  * (the CLI can't import shared/; cliAutopilot.test.ts compares them):
@@ -20,7 +20,7 @@ export function managePayload(result) {
20
20
  }
21
21
  function assertConnectionCanStart(auth, needSignin, urls, human, shouldOpen, shouldAct) {
22
22
  if (auth.kind === "agent-key" && needSignin.length && shouldAct) {
23
- return failure("Agent-key authentication cannot create a person's sign-in link.", 3, "member_profile_required", {
23
+ return failure("Agent-token authentication cannot create a person's sign-in link.", 3, "member_profile_required", {
24
24
  app: needSignin.length === 1 ? String(needSignin[0].app ?? "") || undefined : undefined,
25
25
  hint: "Use an interactive member profile, delegate the agent to a member, or configure a company-managed connection.",
26
26
  remediation: {
@@ -6,3 +6,7 @@
6
6
  * conventional MCP vocabulary. Keep all server-provided fields intact.
7
7
  */
8
8
  export declare function describedToolPayload(exact: Record<string, unknown>, fallbackName: string): Record<string, unknown>;
9
+ /** A search hit's class in the word every surface uses: Read, Change, Delete,
10
+ * or Irreversible. A server older than the class sent only `readonly`; a tool
11
+ * it didn't call read-only reads as a change. */
12
+ export declare function toolClassWord(hit: Record<string, unknown>): string;
@@ -1,3 +1,4 @@
1
+ import { ACTION_CLASSES, CLASS_LABEL } from "./cliAutopilotPolicy.js";
1
2
  /**
2
3
  * Normalize a search result for the CLI's describe contract.
3
4
  *
@@ -16,3 +17,13 @@ export function describedToolPayload(exact, fallbackName) {
16
17
  inputSchema: parameters
17
18
  };
18
19
  }
20
+ /** A search hit's class in the word every surface uses: Read, Change, Delete,
21
+ * or Irreversible. A server older than the class sent only `readonly`; a tool
22
+ * it didn't call read-only reads as a change. */
23
+ export function toolClassWord(hit) {
24
+ const sent = hit.actionClass;
25
+ if (typeof sent === "string" && ACTION_CLASSES.includes(sent)) {
26
+ return CLASS_LABEL[sent];
27
+ }
28
+ return CLASS_LABEL[hit.readonly === true ? "read" : "change"];
29
+ }
@@ -13,7 +13,7 @@
13
13
  * With a v1 policy (an older server) or none at all, the guard keeps its old
14
14
  * shape: ask or deny, never allow.
15
15
  */
16
- import { causeSentence, decideAction, decisionRank, envLabel } from "./cliAutopilotPolicy.js";
16
+ import { CLASS_EFFECT, CLASS_EFFECT_OTHER, CLASS_OF_RISK as CLASS_OF_HOOK_RISK, causeSentence, decideAction, decisionRank, envLabel } from "./cliAutopilotPolicy.js";
17
17
  import { reportedEnvironment } from "./cliHookEnvironment.js";
18
18
  import { placementOf, resolveTarget, targetNote } from "./envResolve.js";
19
19
  import { NODE_LINK_FS } from "./envLinkFs.js";
@@ -52,7 +52,7 @@ const OPAQUE_SHELL = /[<>`$\\\n]|\$\(/;
52
52
  /** Built in, whatever the server sends: these can't be taken back. */
53
53
  const BUILT_IN_IRREVERSIBLE = { gh: ["repo delete"] };
54
54
  /** Classes the guard decides; anything else (http, api, sql, local) is no decision. */
55
- const CLASS_OF_RISK = { read: "read", write: "change", destructive: "delete" };
55
+ const CLASS_OF_RISK = CLASS_OF_HOOK_RISK;
56
56
  /** `fly` and `flyctl` share one map; the server may key either spelling. */
57
57
  function vendorKeys(vendor) {
58
58
  const spec = Object.hasOwn(VENDORS, vendor) ? VENDORS[vendor] : undefined;
@@ -329,12 +329,6 @@ export function decideGuard(findings, policy, command = "", complete, machine) {
329
329
  return decideV1(findings, policy);
330
330
  }
331
331
  // ---- What the agent shows ---------------------------------------------------
332
- const EFFECT = {
333
- read: (env) => `reads ${env}`,
334
- change: (env) => `changes ${env}`,
335
- delete: (env) => `deletes from ${env}`,
336
- irreversible: (env) => `can't be undone in ${env}`
337
- };
338
332
  /** How the environment was found: a short aside after the effect
339
333
  * (" (linked in this folder)") or a sentence at the end (" Environment
340
334
  * unknown, treated as Production."). */
@@ -395,13 +389,13 @@ export function askMessage(decision) {
395
389
  }
396
390
  if (decision.cause && decision.environment && decision.actionClass) {
397
391
  const branch = decision.deciding?.pushEnvironment === "production" ? " (the default branch)" : "";
398
- const effect = `${EFFECT[decision.actionClass](envLabel(decision.environment))}${branch}`;
392
+ const effect = `${CLASS_EFFECT[decision.actionClass]} ${envLabel(decision.environment)}${branch}`;
399
393
  const because = decision.cause.kind === "preset" ? "" : ` ${decision.cause.label}.`;
400
394
  const notes = sourceNotes(decision);
401
395
  return `Passport: ${decision.label} ${effect}${notes.aside}.${because}${notes.sentence} Approve to run it.`;
402
396
  }
403
397
  return decision.destructive
404
- ? `Passport: ${decision.label} is destructive. Run it only if you meant to.`
398
+ ? `Passport: ${decision.label} ${CLASS_EFFECT_OTHER.delete}. Run it only if you meant to.`
405
399
  : `Passport: your Autopilot rules ask before ${decision.label}. Run it only if you meant to.`;
406
400
  }
407
401
  export function denyMessage(decision, owner) {
package/dist/cliLogout.js CHANGED
@@ -10,7 +10,7 @@ import { listOf } from "./initUi.js";
10
10
  import { paint, say, termOf } from "./term.js";
11
11
  export async function logout(args, runtime) {
12
12
  if (runtime.env.PASSPORT_AGENT_KEY || runtime.env.PASSPORT_ENDPOINT) {
13
- return failure("Agent-key authentication is not stored locally and cannot be logged out. Unset the environment variables instead.", 6, "usage");
13
+ return failure("Agent-token authentication is not stored locally and cannot be logged out. Unset the environment variables instead.", 6, "usage");
14
14
  }
15
15
  // Nothing saved here: signing out is already done.
16
16
  if (!Object.keys(readCreds()).length && value(args, "profile") === undefined) {
package/dist/cliMain.js CHANGED
@@ -8,7 +8,7 @@ import { VERSION } from "./version.js";
8
8
  import { login } from "./cliLogin.js";
9
9
  import { asFailure, emitFailure, emitResult } from "./cliOutput.js";
10
10
  import { completionResult, profilesResult, useProfileResult, versionResult } from "./cliOffline.js";
11
- import { describedToolPayload } from "./cliDescribe.js";
11
+ import { describedToolPayload, toolClassWord } from "./cliDescribe.js";
12
12
  import { connect } from "./cliConnect.js";
13
13
  import { firstText, hasNonText, payloadOf, refusalOf, requireSuccess } from "./cliResult.js";
14
14
  import { callerFrom, endpoint, failure, firstSentence, holdForCommand, passportOrigin, readBoundedJson, resolveCliAuth, safeApiError, sanitize, sleep, timeoutMs } from "./cliSupport.js";
@@ -128,7 +128,7 @@ async function search(args, runtime) {
128
128
  const results = Array.isArray(payload.results) ? payload.results : [];
129
129
  // Each tool's name on its own line, what it does under it.
130
130
  for (const hit of results) {
131
- lines.push(String(hit.tool ?? ""), ` ${hit.readonly ? "Read-only" : "Can change things"} · ${firstSentence(String(hit.description ?? ""))}`);
131
+ lines.push(String(hit.tool ?? ""), ` ${toolClassWord(hit)} · ${firstSentence(String(hit.description ?? ""))}`);
132
132
  }
133
133
  if (!results.length && !note)
134
134
  lines.push("No matching tools.");
@@ -177,7 +177,7 @@ async function describe(args, runtime) {
177
177
  const schema = described.parameters ?? {};
178
178
  const human = [
179
179
  String(described.tool),
180
- `${described.readonly ? "Read-only" : "Can change things"}`,
180
+ toolClassWord(described),
181
181
  String(described.description ?? ""),
182
182
  "Parameters:",
183
183
  JSON.stringify(schema, null, 2)
@@ -201,7 +201,7 @@ async function run(args, runtime) {
201
201
  break;
202
202
  }
203
203
  if (refusal.cause === "needs_connect" && auth.kind === "agent-key") {
204
- return failure("This agent key cannot create a person's sign-in link.", 3, "member_profile_required", {
204
+ return failure("This agent token cannot create a person's sign-in link.", 3, "member_profile_required", {
205
205
  app: refusal.details.app,
206
206
  hint: "Use an interactive member profile, delegate the agent to a member, or configure a company-managed connection.",
207
207
  remediation: {
@@ -5,7 +5,7 @@ export function api(args, runtime, deps, waitMs = 0, agentKeyOk = false) {
5
5
  return deps.api;
6
6
  const auth = resolveCliAuth(args, runtime.env);
7
7
  if (auth.kind !== "profile" && !agentKeyOk) {
8
- return failure("This needs a member profile. Agent keys have no person to ask.", 6, "member_profile_required", {
8
+ return failure("This needs a member profile. Agent tokens have no person to ask.", 6, "member_profile_required", {
9
9
  hint: "Run: passport login"
10
10
  });
11
11
  }
@@ -118,7 +118,7 @@ export function versionResult(args, env) {
118
118
  }
119
119
  const selected = profile ?? null;
120
120
  const next = agentMode
121
- ? [{ argv: ["passport", "status"], description: "Check the agent-key connection and visible connections." }]
121
+ ? [{ argv: ["passport", "status"], description: "Check the agent-token connection and visible connections." }]
122
122
  : profile
123
123
  ? [{ argv: ["passport", "status"], description: "Check the selected profile and visible connections." }]
124
124
  : profileCount > 1
@@ -147,7 +147,7 @@ export function versionResult(args, env) {
147
147
  `Profiles: ${profileCount}`,
148
148
  ...(resolvedEndpoint ? [`Endpoint: ${resolvedEndpoint}`] : []),
149
149
  ...(agentMode
150
- ? ["Signed in with an agent key", "Run: passport status"]
150
+ ? ["Signed in with an agent token", "Run: passport status"]
151
151
  : profile
152
152
  ? [
153
153
  `Profile: ${profileLabel(termFor(undefined, env), profile, `, ${selection.source}`)}`,
package/dist/cliOutput.js CHANGED
@@ -12,7 +12,7 @@ export const EXIT_CODES = [
12
12
  [2, "Sign in, or pick a profile: the sign-in is missing, expired, or revoked"],
13
13
  [3, "An app needs you to sign in, or Passport has no working key for it"],
14
14
  [4, "Waiting for approval; the approval id is included"],
15
- [5, "Blocked, declined, or expired: your rules, a guardrail, or a person said no"],
15
+ [5, "Blocked, declined, or expired: a rule, a data check, or a person said no"],
16
16
  [6, "Usage mistake: an unknown command, option, tool, or app"]
17
17
  ];
18
18
  /** Each help page leads with these, after its usage line. */
@@ -22,7 +22,7 @@
22
22
  */
23
23
  import { localOpaqueSalt, opaqueIdOf } from "./cliOpaqueId.js";
24
24
  export { localOpaqueSalt, opaqueIdOf };
25
- import type { ActionClass, ActionEnv } from "./cliAutopilotPolicy.js";
25
+ import { type ActionClass, type ActionEnv } from "./cliAutopilotPolicy.js";
26
26
  import type { CliFinding } from "./cliHookClassify.js";
27
27
  export declare const SCRIPT_MAX_BYTES: number;
28
28
  export declare const SCRIPT_MAX_FILES = 20;
@@ -25,6 +25,7 @@ import { localOpaqueSalt, opaqueIdOf } from "./cliOpaqueId.js";
25
25
  export { localOpaqueSalt, opaqueIdOf };
26
26
  import { readFileSync } from "node:fs";
27
27
  import { join, posix } from "node:path";
28
+ import { riskOfClass } from "./cliAutopilotPolicy.js";
28
29
  import { credentialDir, writePrivateAtomic } from "./credentialStorage.js";
29
30
  import { linesDigestInput, makeLines, packageLines, parseRepoActions, shellLines } from "./cliScriptText.js";
30
31
  export const SCRIPT_MAX_BYTES = 256 * 1024;
@@ -389,7 +390,6 @@ function nextFolder(target, cwd, fs) {
389
390
  const next = target.startsWith("/") ? posix.normalize(target) : posix.join(cwd, target);
390
391
  return fs.isDirectory?.(next) ? next : null;
391
392
  }
392
- const RISK_OF_CLASS = { read: "read", change: "write", delete: "destructive", irreversible: "destructive" };
393
393
  const REPO_ENVIRONMENTS = new Set(["production", "staging", "development"]);
394
394
  const REPO_CLASSES = new Set(["read", "change", "delete", "irreversible"]);
395
395
  /** What the repository's `.passport/actions.toml` says, once per run. */
@@ -425,7 +425,7 @@ export function projectFinding(action, label) {
425
425
  return {
426
426
  vendor: "project",
427
427
  verb: label,
428
- risk: RISK_OF_CLASS[action.actionClass],
428
+ risk: riskOfClass(action.actionClass),
429
429
  confidence: "high",
430
430
  via: [],
431
431
  project: {
@@ -126,7 +126,7 @@ function trimBlank(lines) {
126
126
  * needs a person to decide, so it is a conflict.
127
127
  */
128
128
  export function mergeCodexRequirements(existing, strict, platform) {
129
- const fix = "Merge Passport's lines by hand from the Rollout page, then run this again.";
129
+ const fix = "Merge Passport's lines by hand from Agents › Rollout in Passport, then run this again.";
130
130
  const kept = [];
131
131
  let inside = false;
132
132
  for (const line of existing.split(/\r?\n/)) {
package/dist/cliStatus.js CHANGED
@@ -111,7 +111,7 @@ function markedTable(term, rows) {
111
111
  function youRows(view, term) {
112
112
  const host = hostOf(view.auth.endpoint);
113
113
  const who = view.auth.kind === "agent-key"
114
- ? `An agent key in ${view.workspace.name}`
114
+ ? `An agent token in ${view.workspace.name}`
115
115
  : `${view.signedInAs && view.signedInAs !== view.member.email ? `${view.signedInAs} (${view.member.email})` : view.member.email} in ${view.workspace.name}`;
116
116
  return [
117
117
  { label: "You", lines: wrap(`${who}${host ? ` (${host})` : ""}`, valueWidth(term)) },
package/dist/doctor.js CHANGED
@@ -32,7 +32,7 @@ function inspectStore(checks, agentMode) {
32
32
  const missing = error.code === "ENOENT";
33
33
  check(checks, "credential_store", agentMode && missing ? "skip" : "fail", missing
34
34
  ? agentMode
35
- ? "No local credential store is needed in agent-key mode."
35
+ ? "No local credential store is needed in agent-token mode."
36
36
  : NO_SIGN_IN
37
37
  : "The credential store could not be inspected.", missing && !agentMode ? SIGN_IN : undefined);
38
38
  return { profiles: empty, count: 0 };
@@ -172,7 +172,7 @@ export async function runDoctor(options) {
172
172
  const agentMode = hasAgentKey && hasAgentEndpoint;
173
173
  const store = agentMode
174
174
  ? (() => {
175
- check(checks, "credential_store", "skip", "Local profiles are not inspected in agent-key mode.");
175
+ check(checks, "credential_store", "skip", "Local profiles are not inspected in agent-token mode.");
176
176
  return { profiles: Object.create(null), count: 0 };
177
177
  })()
178
178
  : inspectStore(checks, false);
@@ -180,11 +180,11 @@ export async function runDoctor(options) {
180
180
  let auth;
181
181
  let selectedProfile;
182
182
  if (hasAgentKey !== hasAgentEndpoint) {
183
- check(checks, "auth_config", "fail", "Agent-key configuration is incomplete.", "Set both PASSPORT_AGENT_KEY and PASSPORT_ENDPOINT, or unset both.");
183
+ check(checks, "auth_config", "fail", "Agent-token configuration is incomplete.", "Set both PASSPORT_AGENT_KEY and PASSPORT_ENDPOINT, or unset both.");
184
184
  }
185
185
  else if (agentMode) {
186
186
  if (options.profile !== undefined) {
187
- check(checks, "auth_config", "fail", "--profile cannot be combined with agent-key environment authentication.", "Remove --profile or unset the agent-key variables.");
187
+ check(checks, "auth_config", "fail", "--profile cannot be combined with agent-token environment authentication.", "Remove --profile or unset the agent-token variables.");
188
188
  }
189
189
  else {
190
190
  try {
@@ -256,11 +256,11 @@ export async function runDoctor(options) {
256
256
  catch (error) {
257
257
  check(checks, "authentication", "fail", `Authenticated MCP handshake failed: ${errorText(error, options.redactError)}`, auth.kind === "profile"
258
258
  ? "Sign in again, then try this once more.\nRun: passport login"
259
- : "Verify PASSPORT_AGENT_KEY and its workspace access.");
259
+ : "Check the agent token in PASSPORT_AGENT_KEY and its workspace access.");
260
260
  check(checks, "server_protocol", "skip", "CLI protocol checks could not run because the authenticated handshake failed.");
261
261
  }
262
262
  if (gateway) {
263
- check(checks, "authentication", "pass", `Passport accepted ${auth.kind === "profile" ? `the sign-in for ${auth.profile}` : "the agent key"}.`);
263
+ check(checks, "authentication", "pass", `Passport accepted ${auth.kind === "profile" ? `the sign-in for ${auth.profile}` : "the agent token"}.`);
264
264
  try {
265
265
  const protocol = await gateway.protocolDiagnostics();
266
266
  const safeServer = protocol.server
@@ -64,7 +64,8 @@ export type SafetyPlan = {
64
64
  };
65
65
  export declare function detectSafety(s: InitSession): Promise<SafetyPlan>;
66
66
  export declare function applySafety(s: InitSession, plan: SafetyPlan, mode: "apply" | "ask" | "skip"): Promise<void>;
67
- /** "Destructive actions in Stripe and GitHub ask first (set by your workspace)". */
67
+ /** "Deletes in Stripe and GitHub ask first (set by your workspace)". Irreversible
68
+ * actions always ask, so the class word a person sees here is Delete. */
68
69
  export declare function safetyLine(plan: Extract<SafetyPlan, {
69
70
  kind: "ok";
70
71
  }>): string;
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * `passport init`, the steps that change this computer and the member's
3
3
  * settings: add Passport to each agent, turn on the hook guard, and (on an
4
- * older server without Autopilot) make destructive actions ask first. Each
4
+ * older server without Autopilot) make deletes ask first. Each
5
5
  * has a `detect…` that reads what's there for the plan, and an `apply…` that
6
6
  * changes it once the person agreed.
7
7
  */
@@ -403,7 +403,7 @@ export async function applySafety(s, plan, mode) {
403
403
  if (profile === "off") {
404
404
  // Off may be a choice the person made on the web, so it changes only on a yes.
405
405
  const yes = mode === "apply" ||
406
- (mode === "ask" && (await s.screen.confirm(`Ask before destructive actions ${plan.where}?`, s.signal, "Rules")));
406
+ (mode === "ask" && (await s.screen.confirm(`Ask before deletes ${plan.where}?`, s.signal, "Rules")));
407
407
  if (!yes) {
408
408
  if (mode === "ask")
409
409
  s.screen.result("skip", "Left off. Turn it on any time in Rules.", "Rules");
@@ -426,7 +426,7 @@ export async function applySafety(s, plan, mode) {
426
426
  floor = state.floor === "ask" || state.floor === "block" ? state.floor : undefined;
427
427
  changed = true;
428
428
  s.summary.changed = true;
429
- s.screen.result("done", `Destructive actions ${plan.where} ${profile === "block" ? "are blocked" : "ask first"}`, "Rules");
429
+ s.screen.result("done", `Deletes ${plan.where} ${profile === "block" ? "are blocked" : "ask first"}`, "Rules");
430
430
  }
431
431
  s.record("safety", changed ? "done" : "already_set_up", { profile, ...(floor ? { floor } : {}) });
432
432
  // The hook guard reads a local copy of these rules; bring it up to date.
@@ -435,10 +435,11 @@ export async function applySafety(s, plan, mode) {
435
435
  api: (path, init) => s.api(path, init)
436
436
  });
437
437
  }
438
- /** "Destructive actions in Stripe and GitHub ask first (set by your workspace)". */
438
+ /** "Deletes in Stripe and GitHub ask first (set by your workspace)". Irreversible
439
+ * actions always ask, so the class word a person sees here is Delete. */
439
440
  export function safetyLine(plan) {
440
441
  const verb = plan.profile === "block" ? "are blocked" : "ask first";
441
442
  const suffix = plan.floor && plan.floor === plan.profile ? " (set by your workspace)" : "";
442
- return `Destructive actions ${plan.where} ${verb}${suffix}`;
443
+ return `Deletes ${plan.where} ${verb}${suffix}`;
443
444
  }
444
445
  export { coveredByPlugin };
package/dist/initOutro.js CHANGED
@@ -94,7 +94,7 @@ export function outro(s) {
94
94
  if (s.autopilotSummary && steps.autopilot?.status === "done")
95
95
  items.push(done(s.autopilotSummary));
96
96
  if (steps.safety?.status === "done")
97
- items.push(done("Destructive actions ask first"));
97
+ items.push(done("Deletes ask first"));
98
98
  items.push(...keyItems(movedVendors(s.summary)).rotate, ...agentFollowUps(s));
99
99
  s.summary.next.push({ argv: ["passport", "status"], description: "Check your workspace and app connections." });
100
100
  const lines = items.flatMap((item) => wrap(s.screen.text(item.text), s.terminal.width, ` ${s.screen.symbol(item.mark)} `, " "));
package/dist/initPlan.js CHANGED
@@ -137,7 +137,7 @@ function planAutopilot(b, autopilot) {
137
137
  else if (safety.kind === "failed")
138
138
  b.you("rules", safety.message);
139
139
  else if (safety.profile === "off")
140
- b.will("rules", `Ask before destructive actions ${safety.where}`);
140
+ b.will("rules", `Ask before deletes ${safety.where}`);
141
141
  else
142
142
  b.already("rules", safetyLine(safety));
143
143
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Locked hooks: Passport's guard and audit hooks in each agent's managed
3
3
  * (system) settings, where a person can't turn them off. Pure and secretless,
4
- * shared by the web's Rollout page and `passport setup --org --lock`.
4
+ * shared by the web's Agents › Rollout tab and `passport setup --org --lock`.
5
5
  *
6
6
  * A checked copy of shared/lockedHooks.ts: the bridge never imports shared/
7
7
  * in shipped code, and lockedHooks.test.ts proves the two say the same thing.
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Locked hooks: Passport's guard and audit hooks in each agent's managed
3
3
  * (system) settings, where a person can't turn them off. Pure and secretless,
4
- * shared by the web's Rollout page and `passport setup --org --lock`.
4
+ * shared by the web's Agents › Rollout tab and `passport setup --org --lock`.
5
5
  *
6
6
  * A checked copy of shared/lockedHooks.ts: the bridge never imports shared/
7
7
  * in shipped code, and lockedHooks.test.ts proves the two say the same thing.
@@ -4,4 +4,4 @@
4
4
  * the version, then runs `npm run set-version -- <version>` in the plugin repo
5
5
  * and pushes (docs/RELEASING.md). `pluginPin.test.ts` fails when it drifts.
6
6
  */
7
- export declare const PLUGIN_PIN = "0.16.14";
7
+ export declare const PLUGIN_PIN = "0.17.0";
package/dist/pluginPin.js CHANGED
@@ -4,4 +4,4 @@
4
4
  * the version, then runs `npm run set-version -- <version>` in the plugin repo
5
5
  * and pushes (docs/RELEASING.md). `pluginPin.test.ts` fails when it drifts.
6
6
  */
7
- export const PLUGIN_PIN = "0.16.14";
7
+ export const PLUGIN_PIN = "0.17.0";
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const VERSION = "0.16.14";
1
+ export declare const VERSION = "0.17.0";
package/dist/version.js CHANGED
@@ -1,2 +1,2 @@
1
1
  // Keep in lockstep with bridge/package.json.
2
- export const VERSION = "0.16.14";
2
+ export const VERSION = "0.17.0";
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "passport-bridge",
3
- "version": "0.16.14",
3
+ "version": "0.17.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "passport-bridge",
9
- "version": "0.16.14",
9
+ "version": "0.17.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@modelcontextprotocol/sdk": "1.32.1"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "passport-bridge",
3
- "version": "0.16.14",
3
+ "version": "0.17.0",
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": {