passport-bridge 0.45.0 → 0.46.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/dist/cliArgs.d.ts +1 -1
  2. package/dist/cliArgs.js +3 -0
  3. package/dist/cliConnect.d.ts +3 -1
  4. package/dist/cliConnect.js +58 -6
  5. package/dist/cliConnections.d.ts +3 -3
  6. package/dist/cliConnections.js +13 -5
  7. package/dist/cliExec.js +1 -5
  8. package/dist/cliGuardHealth.js +2 -1
  9. package/dist/cliHook.js +5 -1
  10. package/dist/cliHookAfter.js +2 -2
  11. package/dist/cliHookNotices.d.ts +7 -0
  12. package/dist/cliHookNotices.js +14 -0
  13. package/dist/cliMain.js +33 -3
  14. package/dist/cliOutput.js +4 -6
  15. package/dist/cliRequest.d.ts +65 -0
  16. package/dist/cliRequest.js +135 -0
  17. package/dist/cliScan.js +1 -1
  18. package/dist/cliSession.d.ts +0 -1
  19. package/dist/cliSession.js +0 -2
  20. package/dist/cliStatus.d.ts +4 -2
  21. package/dist/cliStatus.js +21 -4
  22. package/dist/cliSupport.d.ts +0 -8
  23. package/dist/completion.js +1 -0
  24. package/dist/connectorKit/engine.generated.d.ts +2 -2
  25. package/dist/connectorKit/engine.generated.js +23 -3
  26. package/dist/connectorKit/manifest.generated.d.ts +1 -1
  27. package/dist/connectorKit/manifests/github.generated.js +26 -3
  28. package/dist/connectorKit/manifests/githubCapture.generated.js +41 -10
  29. package/dist/connectorKit/manifests/githubHooks.generated.js +21 -1
  30. package/dist/connectorKit/manifests/githubReads.generated.d.ts +2 -0
  31. package/dist/connectorKit/manifests/githubReads.generated.js +30 -5
  32. package/dist/connectorKit/manifests/railway.generated.js +3 -3
  33. package/dist/connectorKit/manifests/supabase.generated.js +1 -1
  34. package/dist/connectorKit/manifests/supabaseCatalog.generated.js +3 -3
  35. package/dist/controlPlane.generated.d.ts +16 -15
  36. package/dist/controlPlane.generated.js +12 -17
  37. package/dist/controlPlaneGithub.generated.d.ts +2 -2
  38. package/dist/controlPlaneGithub.generated.js +12 -2
  39. package/dist/controlPlaneGithubApi.generated.d.ts +2 -0
  40. package/dist/controlPlaneGithubApi.generated.js +56 -1
  41. package/dist/controlPlaneGithubCatalog.generated.d.ts +9 -3
  42. package/dist/controlPlaneGithubCatalog.generated.js +19 -13
  43. package/dist/controlPlaneGithubCli.generated.d.ts +2 -0
  44. package/dist/controlPlaneGithubCli.generated.js +65 -12
  45. package/dist/controlPlaneGuard.js +2 -0
  46. package/dist/controlPlanePeople.generated.d.ts +117 -0
  47. package/dist/controlPlanePeople.generated.js +6 -0
  48. package/dist/controlPlaneSupabase.js +3 -1
  49. package/dist/controlPlaneUnnamed.generated.d.ts +58 -0
  50. package/dist/controlPlaneUnnamed.generated.js +225 -0
  51. package/dist/cpCli.js +5 -1
  52. package/dist/initAppsStep.d.ts +1 -1
  53. package/dist/initAppsStep.js +7 -5
  54. package/dist/initOutro.js +13 -10
  55. package/dist/initState.d.ts +3 -2
  56. package/dist/initState.js +7 -18
  57. package/dist/localNotices.d.ts +22 -0
  58. package/dist/localNotices.js +100 -0
  59. package/dist/pluginPin.d.ts +1 -1
  60. package/dist/pluginPin.js +1 -1
  61. package/dist/version.d.ts +1 -1
  62. package/dist/version.js +1 -1
  63. package/dist/webLinks.d.ts +23 -6
  64. package/dist/webLinks.js +21 -22
  65. package/npm-shrinkwrap.json +8 -8
  66. package/package.json +1 -1
  67. package/dist/cliApprovalLink.d.ts +0 -5
  68. package/dist/cliApprovalLink.js +0 -21
package/dist/webLinks.js CHANGED
@@ -1,20 +1,29 @@
1
1
  /**
2
2
  * Links into the Passport web app for things the CLI names. The web app is
3
- * served from the same origin as the profile's endpoint, and routes by hash:
3
+ * served from the same origin as the profile's endpoint, and routes by hash.
4
+ * A member's own pages (docs/design/v21/member.md):
4
5
  *
5
- * #cp/activity what agents did
6
- * #cp/rules Allow and Block rules
7
- * #cp/connections your apps and connections
8
- * #cp/blocked where an admin answers a block
6
+ * #p My activity: what your agents did, and your apps
7
+ * #p?app=<key> My activity with one app highlighted under Your apps
8
+ * #cp/rules Allow and Block rules (an admin's page)
9
9
  *
10
- * Each returns null when the origin or id is unusable, so callers print a link
11
- * only when they know exactly what it points at.
10
+ * A block's message carries the person's Why blocked link itself
11
+ * (`<origin>/b/<eventId>`), so the CLI prints no link of its own for it.
12
+ * Each returns null when the origin or page is unusable, so callers print a
13
+ * link only when they know exactly what it points at.
12
14
  */
13
- const ID = /^[A-Za-z0-9_.:~-]{1,128}$/;
14
- export const ACTIVITY_LINK = "#cp/activity";
15
+ /** How long a connect or connections link lasts (the server's default; docs/design/v21/member.md, link lifetimes). */
16
+ export const LINK_MINUTES = 15;
17
+ /** The line under a connect link. */
18
+ export const CONNECT_LINK_LIFETIME = `Link expires in ${LINK_MINUTES} minutes.`;
19
+ /** My activity. */
20
+ export const MY_ACTIVITY_LINK = "#p";
15
21
  export const RULES_LINK = "#cp/rules";
16
- /** Apps: your connections page. */
17
- export const APPS_LINK = "#cp/connections";
22
+ const APP_KEY = /^[a-z0-9][a-z0-9._-]{0,63}$/;
23
+ /** My activity with `app` highlighted under Your apps (just My activity for a key that isn't one). */
24
+ export function myAppLink(app) {
25
+ return APP_KEY.test(app) ? `${MY_ACTIVITY_LINK}?app=${encodeURIComponent(app)}` : MY_ACTIVITY_LINK;
26
+ }
18
27
  /** `https://passportmcp.com` from an endpoint or origin, or null. */
19
28
  export function webOrigin(endpointOrOrigin) {
20
29
  if (!endpointOrOrigin)
@@ -27,17 +36,7 @@ export function webOrigin(endpointOrOrigin) {
27
36
  return null;
28
37
  }
29
38
  }
30
- function usable(id) {
31
- return typeof id === "string" && ID.test(id);
32
- }
33
- /** Where a block is answered: Blocked, in Passport. */
34
- export function approvalLink(origin, approvalId, _workspaceId) {
35
- const base = webOrigin(origin);
36
- if (!base || !usable(approvalId))
37
- return null;
38
- return `${base}/#cp/blocked`;
39
- }
40
- /** A page the server named by its hash (`#cp/connections`), or null. */
39
+ /** A page the server named by its hash (`#p`), or null. */
41
40
  export function hashLink(origin, hash) {
42
41
  const base = webOrigin(origin);
43
42
  if (!base || typeof hash !== "string" || !/^#[A-Za-z0-9_.~%/?=&-]{1,200}$/.test(hash))
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "passport-bridge",
3
- "version": "0.45.0",
3
+ "version": "0.46.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "passport-bridge",
9
- "version": "0.45.0",
9
+ "version": "0.46.0",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
12
  "@modelcontextprotocol/sdk": "1.32.1"
@@ -363,9 +363,9 @@
363
363
  }
364
364
  },
365
365
  "node_modules/@hono/node-server": {
366
- "version": "2.1.5",
367
- "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-2.1.5.tgz",
368
- "integrity": "sha512-MgP/I06GdvsilDspMk/qmRzpk8LOUStP6jFAbSRi40W09DhoyUn+Mj7eyKICPqeYKybOjVFLVIAQzvu1bfIa7Q==",
366
+ "version": "2.1.6",
367
+ "resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-2.1.6.tgz",
368
+ "integrity": "sha512-p/KH9MnfNcsm3sR6x4lNgm5j+QN4Et8srKredl9DZfXiyZ1UQ3aQ2YVpFLbqktYN5JI+DB+VZFKM2PqE5hLKjQ==",
369
369
  "license": "MIT",
370
370
  "engines": {
371
371
  "node": ">=20"
@@ -998,9 +998,9 @@
998
998
  }
999
999
  },
1000
1000
  "node_modules/hono": {
1001
- "version": "4.13.7",
1002
- "resolved": "https://registry.npmjs.org/hono/-/hono-4.13.7.tgz",
1003
- "integrity": "sha512-c8/gF9ac8Y78/agExVocyLevgR+JlpNB444Py0FSX8pJoPdYUfUzRcXtYEYGwt6l19qIlVZPN5Mfsw9jFShmQQ==",
1001
+ "version": "4.13.16",
1002
+ "resolved": "https://registry.npmjs.org/hono/-/hono-4.13.16.tgz",
1003
+ "integrity": "sha512-AOLOEhvrV+iH92xXCnFr/5+3KjPKcI3xP63XJtX5spAnkznPdHijlIsUTpi7/9EhWqrTCekw5c5zh1K+YsVw7A==",
1004
1004
  "license": "MIT",
1005
1005
  "engines": {
1006
1006
  "node": ">=16.9.0"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "passport-bridge",
3
- "version": "0.45.0",
3
+ "version": "0.46.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": {
@@ -1,5 +0,0 @@
1
- import type { ParsedArgs } from "./cliArgs.js";
2
- import { type CliFailure, type Env } from "./cliSupport.js";
3
- /** A failure that names an approval also names where to answer it. Returns
4
- * the same failure, so the CLI's catch can link it in one step. */
5
- export declare function linkApproval(error: CliFailure, args: ParsedArgs | undefined, env: Env): CliFailure;
@@ -1,21 +0,0 @@
1
- import { resolveCliAuth } from "./cliSupport.js";
2
- import { workspaceOfToken } from "./tokenWorkspace.js";
3
- import { approvalLink } from "./webLinks.js";
4
- /** A failure that names an approval also names where to answer it. Returns
5
- * the same failure, so the CLI's catch can link it in one step. */
6
- export function linkApproval(error, args, env) {
7
- const id = error.details.approvalId;
8
- if (!args || !id || error.details.approvalUrl || error.cause === "unknown_approval")
9
- return error;
10
- try {
11
- const auth = resolveCliAuth(args, env);
12
- const workspace = auth.kind === "profile" ? workspaceOfToken(auth.refreshToken) : "";
13
- const url = approvalLink(auth.endpoint, id, workspace || undefined);
14
- if (url)
15
- error.details.approvalUrl = url;
16
- }
17
- catch {
18
- // No profile to read the origin from: the approval id alone still works.
19
- }
20
- return error;
21
- }