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.
- package/dist/cliArgs.d.ts +1 -1
- package/dist/cliArgs.js +3 -0
- package/dist/cliConnect.d.ts +3 -1
- package/dist/cliConnect.js +58 -6
- package/dist/cliConnections.d.ts +3 -3
- package/dist/cliConnections.js +13 -5
- package/dist/cliExec.js +1 -5
- package/dist/cliGuardHealth.js +2 -1
- package/dist/cliHook.js +5 -1
- package/dist/cliHookAfter.js +2 -2
- package/dist/cliHookNotices.d.ts +7 -0
- package/dist/cliHookNotices.js +14 -0
- package/dist/cliMain.js +33 -3
- package/dist/cliOutput.js +4 -6
- package/dist/cliRequest.d.ts +65 -0
- package/dist/cliRequest.js +135 -0
- package/dist/cliScan.js +1 -1
- package/dist/cliSession.d.ts +0 -1
- package/dist/cliSession.js +0 -2
- package/dist/cliStatus.d.ts +4 -2
- package/dist/cliStatus.js +21 -4
- package/dist/cliSupport.d.ts +0 -8
- package/dist/completion.js +1 -0
- package/dist/connectorKit/engine.generated.d.ts +2 -2
- package/dist/connectorKit/engine.generated.js +23 -3
- package/dist/connectorKit/manifest.generated.d.ts +1 -1
- package/dist/connectorKit/manifests/github.generated.js +26 -3
- package/dist/connectorKit/manifests/githubCapture.generated.js +41 -10
- package/dist/connectorKit/manifests/githubHooks.generated.js +21 -1
- package/dist/connectorKit/manifests/githubReads.generated.d.ts +2 -0
- package/dist/connectorKit/manifests/githubReads.generated.js +30 -5
- package/dist/connectorKit/manifests/railway.generated.js +3 -3
- package/dist/connectorKit/manifests/supabase.generated.js +1 -1
- package/dist/connectorKit/manifests/supabaseCatalog.generated.js +3 -3
- package/dist/controlPlane.generated.d.ts +16 -15
- package/dist/controlPlane.generated.js +12 -17
- package/dist/controlPlaneGithub.generated.d.ts +2 -2
- package/dist/controlPlaneGithub.generated.js +12 -2
- package/dist/controlPlaneGithubApi.generated.d.ts +2 -0
- package/dist/controlPlaneGithubApi.generated.js +56 -1
- package/dist/controlPlaneGithubCatalog.generated.d.ts +9 -3
- package/dist/controlPlaneGithubCatalog.generated.js +19 -13
- package/dist/controlPlaneGithubCli.generated.d.ts +2 -0
- package/dist/controlPlaneGithubCli.generated.js +65 -12
- package/dist/controlPlaneGuard.js +2 -0
- package/dist/controlPlanePeople.generated.d.ts +117 -0
- package/dist/controlPlanePeople.generated.js +6 -0
- package/dist/controlPlaneSupabase.js +3 -1
- package/dist/controlPlaneUnnamed.generated.d.ts +58 -0
- package/dist/controlPlaneUnnamed.generated.js +225 -0
- package/dist/cpCli.js +5 -1
- package/dist/initAppsStep.d.ts +1 -1
- package/dist/initAppsStep.js +7 -5
- package/dist/initOutro.js +13 -10
- package/dist/initState.d.ts +3 -2
- package/dist/initState.js +7 -18
- package/dist/localNotices.d.ts +22 -0
- package/dist/localNotices.js +100 -0
- package/dist/pluginPin.d.ts +1 -1
- package/dist/pluginPin.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/webLinks.d.ts +23 -6
- package/dist/webLinks.js +21 -22
- package/npm-shrinkwrap.json +8 -8
- package/package.json +1 -1
- package/dist/cliApprovalLink.d.ts +0 -5
- 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
|
-
* #
|
|
6
|
-
* #
|
|
7
|
-
* #cp/
|
|
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
|
-
*
|
|
11
|
-
*
|
|
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
|
-
|
|
14
|
-
export const
|
|
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
|
-
|
|
17
|
-
|
|
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
|
-
|
|
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))
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "passport-bridge",
|
|
3
|
-
"version": "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.
|
|
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.
|
|
367
|
-
"resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-2.1.
|
|
368
|
-
"integrity": "sha512-
|
|
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.
|
|
1002
|
-
"resolved": "https://registry.npmjs.org/hono/-/hono-4.13.
|
|
1003
|
-
"integrity": "sha512-
|
|
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,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;
|
package/dist/cliApprovalLink.js
DELETED
|
@@ -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
|
-
}
|