passport-bridge 0.43.0 → 0.45.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/cliExec.js +1 -1
- package/dist/connectorKit/engine.generated.d.ts +1 -1
- package/dist/connectorKit/engine.generated.js +1 -1
- package/dist/connectorKit/manifests/github.generated.d.ts +1 -1
- package/dist/connectorKit/manifests/github.generated.js +1 -1
- package/dist/connectorKit/manifests/githubHooks.generated.js +1 -1
- package/dist/connectorKit/manifests/supabaseApi.generated.js +1 -1
- package/dist/connectorKit/manifests/supabaseCapture.generated.js +1 -1
- package/dist/connectorKit/manifests/supabaseCatalog.generated.d.ts +1 -1
- package/dist/connectorKit/manifests/supabaseCatalog.generated.js +1 -1
- package/dist/controlPlane.generated.d.ts +10 -7
- package/dist/controlPlane.generated.js +4 -6
- package/dist/controlPlaneBasic.generated.d.ts +5 -8
- package/dist/controlPlaneBasic.generated.js +5 -10
- 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/controlPlaneSupabase.js +1 -1
- 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/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/dist/cliExec.js
CHANGED
|
@@ -317,7 +317,7 @@ async function basicDecision(api, profile, prepared, runtime, args) {
|
|
|
317
317
|
return;
|
|
318
318
|
const { askCliVerb } = await import("./controlPlaneCli.js");
|
|
319
319
|
const session = value(args, "session");
|
|
320
|
-
// Authorize decides it again
|
|
320
|
+
// Authorize decides it again; `exec` tells the server this ask comes first.
|
|
321
321
|
const extra = { exec: true, ...(session ? { sessionId: session } : {}) };
|
|
322
322
|
const answer = await askCliVerb(api, vendor, verb, extra, runtime.signal);
|
|
323
323
|
if (answer.kind === "block")
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* names. Summaries are templates filled with safe names only.
|
|
6
6
|
*
|
|
7
7
|
* Fails closed. These all become the manifest's Unclassified Action (kind
|
|
8
|
-
* delete,
|
|
8
|
+
* delete, so a Delete Block blocks it): a command, tool or route the manifest doesn't
|
|
9
9
|
* name; a flag the vendor's spec doesn't list; a boolean the CLI framework
|
|
10
10
|
* wouldn't accept; a value flag with no value; an argument no rule names; a
|
|
11
11
|
* known operation whose conditions no rule matches; a SQL rule with no SQL; a
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* names. Summaries are templates filled with safe names only.
|
|
7
7
|
*
|
|
8
8
|
* Fails closed. These all become the manifest's Unclassified Action (kind
|
|
9
|
-
* delete,
|
|
9
|
+
* delete, so a Delete Block blocks it): a command, tool or route the manifest doesn't
|
|
10
10
|
* name; a flag the vendor's spec doesn't list; a boolean the CLI framework
|
|
11
11
|
* wouldn't accept; a value flag with no value; an argument no rule names; a
|
|
12
12
|
* known operation whose conditions no rule matches; a SQL rule with no SQL; a
|
|
@@ -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 = [
|
|
@@ -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),
|
|
@@ -495,7 +495,7 @@ export const SUPABASE_API_RULES = [
|
|
|
495
495
|
summary: "Read auth settings of project {ref}, including provider secrets"
|
|
496
496
|
},
|
|
497
497
|
// Round 3 review: only the provider fields are sign-in providers; every other auth setting (site URL,
|
|
498
|
-
// SMTP, JWT expiry, rate limits...) is
|
|
498
|
+
// SMTP, JWT expiry, rate limits...) is kind Delete (a Delete Block blocks it).
|
|
499
499
|
{
|
|
500
500
|
match: "PATCH /v1/projects/{ref}/config/auth",
|
|
501
501
|
when: { "*": { keys: PROVIDER_FIELDS } },
|
|
@@ -290,7 +290,7 @@ export const SUPABASE_CAPTURE = {
|
|
|
290
290
|
drop_database: "supabase.unclassified",
|
|
291
291
|
drop_schema: "supabase.unclassified",
|
|
292
292
|
drop_table: "supabase.table.drop",
|
|
293
|
-
// Round 3 review: a table emptied keeps its own words ("Empty a table"),
|
|
293
|
+
// Round 3 review: a table emptied keeps its own words ("Empty a table"), kind Delete.
|
|
294
294
|
truncate: "supabase.unclassified",
|
|
295
295
|
delete_all: "supabase.unclassified",
|
|
296
296
|
rls_off: "supabase.unclassified",
|
|
@@ -3,7 +3,7 @@ import type { ManifestAction, NodeSpec } from "../manifest.generated.js";
|
|
|
3
3
|
export declare const SUPABASE_ACTIONS: readonly ManifestAction[];
|
|
4
4
|
export declare const SUPABASE_TYPES: readonly ResourceTypeDef[];
|
|
5
5
|
export declare const SUPABASE_NODES: Readonly<Record<string, NodeSpec>>;
|
|
6
|
-
/** A deploy that turns off the JWT check: the function answers anyone (
|
|
6
|
+
/** A deploy that turns off the JWT check: the function answers anyone (kind Delete). */
|
|
7
7
|
export declare const AFFECTS_FN_JWT_OFF: {
|
|
8
8
|
readonly action: "supabase.unclassified";
|
|
9
9
|
readonly on: "function";
|
|
@@ -62,7 +62,7 @@ export const SUPABASE_NODES = {
|
|
|
62
62
|
storage: { key: "{ref}", name: "Storage", parent: underProject },
|
|
63
63
|
bucket: { key: "{ref}/{bucket}", name: "{bucket}", parent: { type: "storage" } }
|
|
64
64
|
};
|
|
65
|
-
/** A deploy that turns off the JWT check: the function answers anyone (
|
|
65
|
+
/** A deploy that turns off the JWT check: the function answers anyone (kind Delete). */
|
|
66
66
|
export const AFFECTS_FN_JWT_OFF = {
|
|
67
67
|
action: "supabase.unclassified",
|
|
68
68
|
on: "function",
|
|
@@ -73,11 +73,11 @@ export type ActionDef = {
|
|
|
73
73
|
appliesTo: string;
|
|
74
74
|
/** Sentence case, verb first: "Delete the branch". */
|
|
75
75
|
label: string;
|
|
76
|
-
/**
|
|
76
|
+
/** The exact target an event records beyond the node when the request names it ("collaborator"); absent: the node. */
|
|
77
77
|
exactTarget?: string;
|
|
78
78
|
/** A lucide-react icon name matching the platform's own iconography ("Trash2"). */
|
|
79
79
|
icon?: string;
|
|
80
|
-
/** Can't be undone (`cli.local.*`):
|
|
80
|
+
/** Can't be undone (`cli.local.*`): a label for the UI; rules decide it like any action (2026-11-16). */
|
|
81
81
|
irreversible?: true;
|
|
82
82
|
/** The platform sources that report it, and whether they name who did it (visibility levels). */
|
|
83
83
|
seenBy?: ReadonlyArray<{
|
|
@@ -215,7 +215,7 @@ export type ControlRule = {
|
|
|
215
215
|
/** Optional note shown beside the rule. */
|
|
216
216
|
note?: string;
|
|
217
217
|
};
|
|
218
|
-
/**
|
|
218
|
+
/** No rule, no block (2026-11-16): every kind is allowed until an admin adds a Block. */
|
|
219
219
|
export declare const DEFAULT_KIND_DECISION: Readonly<Record<Kind, Decision>>;
|
|
220
220
|
export type Resolution = {
|
|
221
221
|
decision: Decision;
|
|
@@ -229,7 +229,7 @@ export type Resolution = {
|
|
|
229
229
|
/**
|
|
230
230
|
* The one resolution order, used by every enforcement point and every view: walk from the node up to its platform; at
|
|
231
231
|
* each level an action rule beats a kind rule; the nearest level wins; then workspace action rule, workspace kind
|
|
232
|
-
* rule, then the
|
|
232
|
+
* rule, then the default (Allow). An irreversible action follows the same order ("truly allow all", 2026-11-16). Pure.
|
|
233
233
|
*/
|
|
234
234
|
export declare function resolveRule(path: readonly string[], action: Pick<ActionDef, "key" | "kind" | "irreversible">, rules: readonly ControlRule[]): Resolution;
|
|
235
235
|
/**
|
|
@@ -302,7 +302,7 @@ export type ActionEvent = {
|
|
|
302
302
|
/** An event Passport decided and the platform later confirmed share one id; this records the confirmation. */
|
|
303
303
|
confirmedAt?: number;
|
|
304
304
|
/** When the action's target is an argument (a collaborator, a secret, a tag): its keyed hash, never the
|
|
305
|
-
* target itself.
|
|
305
|
+
* target itself. */
|
|
306
306
|
targetHash?: string;
|
|
307
307
|
/** What it touched beneath the node (section 6): a Variable, a domain, a branch. Names only. */
|
|
308
308
|
target?: ActionTarget;
|
|
@@ -405,14 +405,17 @@ export type Coverage = {
|
|
|
405
405
|
};
|
|
406
406
|
/** Deprecated: counts `through` as recorded, credential-defined on servers before 2026-11-13. Use `managedCoverageOf`. */
|
|
407
407
|
export declare function coverageOf(events: readonly (Pick<ActionEvent, "through"> & Partial<Pick<ActionEvent, "outcome">>)[], observed: boolean): Coverage;
|
|
408
|
+
/** A block's decision as stored; "once" (Allow once, removed 2026-11-16) is history, read back so old rows render. */
|
|
408
409
|
export type BlockDecision = "keep" | "once" | "always";
|
|
410
|
+
/** What an admin can decide on a block now: Keep blocked or Always allow. */
|
|
411
|
+
export type BlockChoice = Exclude<BlockDecision, "once">;
|
|
409
412
|
export type PendingBlock = {
|
|
410
413
|
/** The blocked event's id. */
|
|
411
414
|
eventId: string;
|
|
412
415
|
decidedAt?: number;
|
|
413
416
|
decidedBy?: string;
|
|
414
417
|
decision?: BlockDecision;
|
|
415
|
-
/**
|
|
418
|
+
/** History: an old "once" decision's pass expiry. Never honored since 2026-11-16. */
|
|
416
419
|
passExpiresAt?: number;
|
|
417
420
|
/** For "always": the rule it created. */
|
|
418
421
|
ruleId?: string;
|
|
@@ -492,7 +495,7 @@ export type CpRuleRow = {
|
|
|
492
495
|
* would have blocked in the last 7 days. Absent once enforcing. */
|
|
493
496
|
wouldBlock?: number;
|
|
494
497
|
};
|
|
495
|
-
/** An event as the API returns it: whether
|
|
498
|
+
/** An event as the API returns it: whether it names an exact target, never the hash itself. */
|
|
496
499
|
export type CpEvent = Omit<ActionEvent, "targetHash"> & {
|
|
497
500
|
hasTarget: boolean;
|
|
498
501
|
};
|
|
@@ -64,9 +64,9 @@ export function mostSevere(found, kindOf) {
|
|
|
64
64
|
};
|
|
65
65
|
return [...found].sort((a, b) => rank(a) - rank(b))[0];
|
|
66
66
|
}
|
|
67
|
-
/**
|
|
67
|
+
/** No rule, no block (2026-11-16): every kind is allowed until an admin adds a Block. */
|
|
68
68
|
export const DEFAULT_KIND_DECISION = {
|
|
69
|
-
delete: "
|
|
69
|
+
delete: "allow",
|
|
70
70
|
change: "allow",
|
|
71
71
|
create: "allow",
|
|
72
72
|
read: "allow"
|
|
@@ -74,7 +74,7 @@ export const DEFAULT_KIND_DECISION = {
|
|
|
74
74
|
/**
|
|
75
75
|
* The one resolution order, used by every enforcement point and every view: walk from the node up to its platform; at
|
|
76
76
|
* each level an action rule beats a kind rule; the nearest level wins; then workspace action rule, workspace kind
|
|
77
|
-
* rule, then the
|
|
77
|
+
* rule, then the default (Allow). An irreversible action follows the same order ("truly allow all", 2026-11-16). Pure.
|
|
78
78
|
*/
|
|
79
79
|
export function resolveRule(path /* node id first, platform last */, action, rules) {
|
|
80
80
|
const at = (target, key) => rules.find((rule) => ("workspace" in rule.target
|
|
@@ -87,15 +87,13 @@ export function resolveRule(path /* node id first, platform last */, action, rul
|
|
|
87
87
|
const byAction = at({ nodeId: id }, { action: action.key });
|
|
88
88
|
if (byAction)
|
|
89
89
|
return { decision: byAction.decision, ruleId: byAction.id, at: id, by: "action" };
|
|
90
|
-
const byKind =
|
|
90
|
+
const byKind = at({ nodeId: id }, { kind: action.kind });
|
|
91
91
|
if (byKind)
|
|
92
92
|
return { decision: byKind.decision, ruleId: byKind.id, at: id, by: "kind" };
|
|
93
93
|
}
|
|
94
94
|
const wsAction = at({ workspace: true }, { action: action.key });
|
|
95
95
|
if (wsAction)
|
|
96
96
|
return { decision: wsAction.decision, ruleId: wsAction.id, at: "workspace", by: "action" };
|
|
97
|
-
if (action.irreversible)
|
|
98
|
-
return { decision: "block", ruleId: null, at: "default", by: "action" };
|
|
99
97
|
const wsKind = at({ workspace: true }, { kind: action.kind });
|
|
100
98
|
if (wsKind)
|
|
101
99
|
return { decision: wsKind.decision, ruleId: wsKind.id, at: "workspace", by: "kind" };
|
|
@@ -13,12 +13,12 @@ import type { ActionDef, BasicPlatform } from "./controlPlane.generated.js";
|
|
|
13
13
|
* Kinds come only from what Passport already reads about a tool (`server/src/riskClass.ts`): a read is not
|
|
14
14
|
* consequential, a destructive tool is Delete, a write named for making something (`create_customer`,
|
|
15
15
|
* `issues.create`, `domains add`) is Create, any other write is Change. Rules work as everywhere else
|
|
16
|
-
* (`resolveRule`): a tool rule, then a kind rule on the platform, then the workspace, then the
|
|
16
|
+
* (`resolveRule`): a tool rule, then a kind rule on the platform, then the workspace, then the default (Allow).
|
|
17
17
|
*
|
|
18
|
-
* This computer (`cli:local`)
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
18
|
+
* This computer (`cli:local`): commands that can't be undone on the computer an agent runs on (deleting the home
|
|
19
|
+
* folder, the disk, system files or the project folder; recursive permission changes there), one action per class
|
|
20
|
+
* (`LOCAL_IRREVERSIBLE_VERBS`), kind Delete, labelled `irreversible`. Since 2026-11-16 ("truly allow all") they follow
|
|
21
|
+
* the same rules as every action: allowed with no rule, blocked by a Delete Block or an action Block.
|
|
22
22
|
*/
|
|
23
23
|
export declare const BASIC_KINDS: readonly ["delete", "change", "create", "read"];
|
|
24
24
|
export type BasicKind = (typeof BASIC_KINDS)[number];
|
|
@@ -47,9 +47,6 @@ export type LocalIrreversibleVerb = keyof typeof LOCAL_IRREVERSIBLE_VERBS;
|
|
|
47
47
|
* No check: naming files is no governed action. */
|
|
48
48
|
export declare function localSteer(verb: LocalIrreversibleVerb): NonNullable<ActionDef["steer"]>;
|
|
49
49
|
export declare function isLocalIrreversibleVerb(verb: string): verb is LocalIrreversibleVerb;
|
|
50
|
-
/** Why one of these doesn't run, in the words the agent reads after "Blocked by Passport:" and an admin reads when
|
|
51
|
-
* Allow once is refused for one. */
|
|
52
|
-
export declare function irreversibleRefusal(label: string): string;
|
|
53
50
|
export declare function isBasicSlug(value: string): boolean;
|
|
54
51
|
/** Which kind of basic platform a key names: "app" or "cli"; null for a connector platform (or anything else). Lets
|
|
55
52
|
* code branch on basic platforms first, so switches over `ConnectorPlatform` stay exhaustive. */
|
|
@@ -12,12 +12,12 @@
|
|
|
12
12
|
* Kinds come only from what Passport already reads about a tool (`server/src/riskClass.ts`): a read is not
|
|
13
13
|
* consequential, a destructive tool is Delete, a write named for making something (`create_customer`,
|
|
14
14
|
* `issues.create`, `domains add`) is Create, any other write is Change. Rules work as everywhere else
|
|
15
|
-
* (`resolveRule`): a tool rule, then a kind rule on the platform, then the workspace, then the
|
|
15
|
+
* (`resolveRule`): a tool rule, then a kind rule on the platform, then the workspace, then the default (Allow).
|
|
16
16
|
*
|
|
17
|
-
* This computer (`cli:local`)
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
17
|
+
* This computer (`cli:local`): commands that can't be undone on the computer an agent runs on (deleting the home
|
|
18
|
+
* folder, the disk, system files or the project folder; recursive permission changes there), one action per class
|
|
19
|
+
* (`LOCAL_IRREVERSIBLE_VERBS`), kind Delete, labelled `irreversible`. Since 2026-11-16 ("truly allow all") they follow
|
|
20
|
+
* the same rules as every action: allowed with no rule, blocked by a Delete Block or an action Block.
|
|
21
21
|
*/
|
|
22
22
|
export const BASIC_KINDS = ["delete", "change", "create", "read"];
|
|
23
23
|
/** App keys and CLI vendors are slugs: letters, digits, "-" and "_" (never "." or ":"). */
|
|
@@ -53,11 +53,6 @@ export function localSteer(verb) {
|
|
|
53
53
|
export function isLocalIrreversibleVerb(verb) {
|
|
54
54
|
return Object.prototype.hasOwnProperty.call(LOCAL_IRREVERSIBLE_VERBS, verb);
|
|
55
55
|
}
|
|
56
|
-
/** Why one of these doesn't run, in the words the agent reads after "Blocked by Passport:" and an admin reads when
|
|
57
|
-
* Allow once is refused for one. */
|
|
58
|
-
export function irreversibleRefusal(label) {
|
|
59
|
-
return `"${label}" can't be undone, so it runs only once an admin allows this kind of command. An admin can Always allow it on every computer in Passport › Blocked.`;
|
|
60
|
-
}
|
|
61
56
|
export function isBasicSlug(value) {
|
|
62
57
|
return SLUG.test(value);
|
|
63
58
|
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* Summaries are fixed templates filled with names and numbers only: never a
|
|
9
9
|
* secret's value, a commit message, a body or an email address.
|
|
10
10
|
*
|
|
11
|
-
* `target` is
|
|
11
|
+
* `target` is the exact target an event records (hashed) when the action's
|
|
12
12
|
* target is an argument rather than the node (a collaborator's login and
|
|
13
13
|
* permission, a secret's name, a release tag): a canonical string the server
|
|
14
14
|
* turns into a keyed hash. It is never stored, logged or shown; only the
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* Summaries are fixed templates filled with names and numbers only: never a
|
|
10
10
|
* secret's value, a commit message, a body or an email address.
|
|
11
11
|
*
|
|
12
|
-
* `target` is
|
|
12
|
+
* `target` is the exact target an event records (hashed) when the action's
|
|
13
13
|
* target is an argument rather than the node (a collaborator's login and
|
|
14
14
|
* permission, a secret's name, a release tag): a canonical string the server
|
|
15
15
|
* turns into a keyed hash. It is never stored, logged or shown; only the
|
|
@@ -56,7 +56,7 @@ export type GithubClassification = {
|
|
|
56
56
|
nodeId: string;
|
|
57
57
|
actionKey: string;
|
|
58
58
|
summary: string;
|
|
59
|
-
/**
|
|
59
|
+
/** The exact target beyond the node and action (stored only as a keyed hash); absent when the node is all of it. */
|
|
60
60
|
target?: string;
|
|
61
61
|
};
|
|
62
62
|
export type GithubRepo = {
|
|
@@ -77,7 +77,7 @@ export declare const withTarget: (found: GithubClassification, target: string |
|
|
|
77
77
|
export declare function withoutTarget(found: GithubClassification): GithubClassification;
|
|
78
78
|
export declare const onRepo: (r: Repo, actionKey: string, summary: string, target?: string) => GithubClassification;
|
|
79
79
|
/** Fails closed: a `gh` command Passport can't name, a Delete on its repository (on Repositories when none is
|
|
80
|
-
* known). No target
|
|
80
|
+
* known). No target narrower than the node. */
|
|
81
81
|
export declare const unclassifiedGh: (r: Repo | null) => GithubClassification;
|
|
82
82
|
/** The branch's own node, its most specific pattern node, or the repository when no node matches. */
|
|
83
83
|
export declare function branchTarget(r: Repo, branch: string, context: BranchContext): string;
|
|
@@ -130,7 +130,7 @@ export function withoutTarget(found) {
|
|
|
130
130
|
}
|
|
131
131
|
export const onRepo = (r, actionKey, summary, target) => withTarget({ nodeId: repoNode(r.owner, r.repo), actionKey, summary }, target);
|
|
132
132
|
/** Fails closed: a `gh` command Passport can't name, a Delete on its repository (on Repositories when none is
|
|
133
|
-
* known). No target
|
|
133
|
+
* known). No target narrower than the node. */
|
|
134
134
|
export const unclassifiedGh = (r) => r
|
|
135
135
|
? {
|
|
136
136
|
nodeId: repoNode(r.owner, r.repo),
|
|
@@ -55,8 +55,7 @@ export type Unnamed = {
|
|
|
55
55
|
* The worst a push to branches it doesn't name can do, on the repository
|
|
56
56
|
* node: force-push and delete, decided together (blocked when either is).
|
|
57
57
|
* For `git push --all`, `--mirror`, `:` (matching branches), a pattern, or a
|
|
58
|
-
* destination that can't be resolved. No target: there is no exact branch
|
|
59
|
-
* tie an "Allow once" to.
|
|
58
|
+
* destination that can't be resolved. No target: there is no exact branch.
|
|
60
59
|
*/
|
|
61
60
|
export declare function worstCasePush(r: GithubRepo, why: string): GithubClassification[];
|
|
62
61
|
/**
|
|
@@ -112,7 +112,7 @@ export function ghApi(parsed, args, context) {
|
|
|
112
112
|
// With --input the body comes from a file (any -f fields go to the query string): unknown here.
|
|
113
113
|
const opaque = hasFlag(parsed, "--input");
|
|
114
114
|
const found = classifyApi(method, path, opaque ? OPAQUE_BODY : body, context);
|
|
115
|
-
// Fail closed:
|
|
115
|
+
// Fail closed: a body that can't be read names no exact target.
|
|
116
116
|
if (found)
|
|
117
117
|
return opaque ? withoutTarget(found) : found;
|
|
118
118
|
// Named nothing: a read isn't decided; any write is Passport's Unclassified action on its repository. A GraphQL
|
|
@@ -187,8 +187,7 @@ export const resolveHead = (word, currentBranch) => word === "HEAD" || word ===
|
|
|
187
187
|
* The worst a push to branches it doesn't name can do, on the repository
|
|
188
188
|
* node: force-push and delete, decided together (blocked when either is).
|
|
189
189
|
* For `git push --all`, `--mirror`, `:` (matching branches), a pattern, or a
|
|
190
|
-
* destination that can't be resolved. No target: there is no exact branch
|
|
191
|
-
* tie an "Allow once" to.
|
|
190
|
+
* destination that can't be resolved. No target: there is no exact branch.
|
|
192
191
|
*/
|
|
193
192
|
export function worstCasePush(r, why) {
|
|
194
193
|
return [
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
*
|
|
17
17
|
* Only the classification leaves this computer: the node, the catalog action
|
|
18
18
|
* and the classifier's fixed summary, plus the SHA-256 digest of the target
|
|
19
|
-
* when the command names one (a collaborator, a secret, a tag),
|
|
20
|
-
*
|
|
19
|
+
* when the command names one (a collaborator, a secret, a tag), kept on the
|
|
20
|
+
* event only as a keyed hash. Never the command line,
|
|
21
21
|
* never the target itself.
|
|
22
22
|
*/
|
|
23
23
|
import { type GithubClassification } from "./controlPlaneGithub.generated.js";
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
*
|
|
17
17
|
* Only the classification leaves this computer: the node, the catalog action
|
|
18
18
|
* and the classifier's fixed summary, plus the SHA-256 digest of the target
|
|
19
|
-
* when the command names one (a collaborator, a secret, a tag),
|
|
20
|
-
*
|
|
19
|
+
* when the command names one (a collaborator, a secret, a tag), kept on the
|
|
20
|
+
* event only as a keyed hash. Never the command line,
|
|
21
21
|
* never the target itself.
|
|
22
22
|
*/
|
|
23
23
|
import { createHash } from "node:crypto";
|
|
@@ -184,7 +184,7 @@ export function supabaseProjectRef(argv, where) {
|
|
|
184
184
|
const ref = flagged.at(-1) ?? refOf(found);
|
|
185
185
|
return ref && /^[a-z0-9]{20}$/.test(ref) ? ref : undefined;
|
|
186
186
|
}
|
|
187
|
-
/** The exact target's digest, when the first action has one (a table):
|
|
187
|
+
/** The exact target's digest, when the first action has one (a table): the event records only its keyed hash. */
|
|
188
188
|
function exactDigest(first) {
|
|
189
189
|
const exact = SUPABASE.actions.find((action) => action.key === first.actionKey)?.exactTarget;
|
|
190
190
|
return exact && first.target?.type === exact ? targetDigest(first.target.key) : undefined;
|
package/dist/pluginPin.d.ts
CHANGED
package/dist/pluginPin.js
CHANGED
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.45.0";
|
package/dist/version.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Keep in lockstep with bridge/package.json.
|
|
2
|
-
export const VERSION = "0.
|
|
2
|
+
export const VERSION = "0.45.0";
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "passport-bridge",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.45.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.45.0",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
12
|
"@modelcontextprotocol/sdk": "1.32.1"
|