@substrat-run/kernel 0.140.0 → 0.142.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/async-invocation-log.d.ts +1 -1
- package/dist/async-invocation-log.d.ts.map +1 -1
- package/dist/async-invocation-log.js +1 -1
- package/dist/async-invocation-log.js.map +1 -1
- package/dist/capability.d.ts +127 -4
- package/dist/capability.d.ts.map +1 -1
- package/dist/capability.js +279 -20
- package/dist/capability.js.map +1 -1
- package/dist/connector-calls.d.ts +3 -72
- package/dist/connector-calls.d.ts.map +1 -1
- package/dist/connector-calls.js +3 -62
- package/dist/connector-calls.js.map +1 -1
- package/dist/index.d.ts +12 -91
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -58
- package/dist/index.js.map +1 -1
- package/dist/invocation-line.d.ts +211 -0
- package/dist/invocation-line.d.ts.map +1 -0
- package/dist/invocation-line.js +33 -0
- package/dist/invocation-line.js.map +1 -0
- package/dist/meters.d.ts +21 -1
- package/dist/meters.d.ts.map +1 -1
- package/dist/meters.js +0 -0
- package/dist/meters.js.map +1 -1
- package/dist/module-log.d.ts +5 -4
- package/dist/module-log.d.ts.map +1 -1
- package/dist/module-log.js +5 -4
- package/dist/module-log.js.map +1 -1
- package/dist/permission-checker.d.ts +23 -0
- package/dist/permission-checker.d.ts.map +1 -1
- package/dist/permission-checker.js.map +1 -1
- package/dist/permission-eval.d.ts.map +1 -1
- package/dist/permission-eval.js +77 -21
- package/dist/permission-eval.js.map +1 -1
- package/dist/platform-sweep.d.ts +81 -1
- package/dist/platform-sweep.d.ts.map +1 -1
- package/dist/platform-sweep.js +125 -0
- package/dist/platform-sweep.js.map +1 -1
- package/dist/scope-copy-ledger.d.ts +128 -0
- package/dist/scope-copy-ledger.d.ts.map +1 -0
- package/dist/scope-copy-ledger.js +125 -0
- package/dist/scope-copy-ledger.js.map +1 -0
- package/dist/scope-host.d.ts +157 -13
- package/dist/scope-host.d.ts.map +1 -1
- package/dist/scope-host.js +2 -0
- package/dist/scope-host.js.map +1 -1
- package/dist/storage-gauge.d.ts +125 -0
- package/dist/storage-gauge.d.ts.map +1 -0
- package/dist/storage-gauge.js +234 -0
- package/dist/storage-gauge.js.map +1 -0
- package/package.json +12 -4
- package/dist/invocation-log.d.ts +0 -447
- package/dist/invocation-log.d.ts.map +0 -1
- package/dist/invocation-log.js +0 -410
- package/dist/invocation-log.js.map +0 -1
- package/dist/platform-call.d.ts +0 -45
- package/dist/platform-call.d.ts.map +0 -1
- package/dist/platform-call.js +0 -63
- package/dist/platform-call.js.map +0 -1
- package/dist/provider-error.d.ts +0 -38
- package/dist/provider-error.d.ts.map +0 -1
- package/dist/provider-error.js +0 -65
- package/dist/provider-error.js.map +0 -1
- package/dist/routed-node.d.ts +0 -87
- package/dist/routed-node.d.ts.map +0 -1
- package/dist/routed-node.js +0 -67
- package/dist/routed-node.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { InvocationLevel } from '@substrat-run/contracts/invocation-record';
|
|
2
|
-
import { type AsyncInvocationKind, type AsyncOutcome, type InvocationLogLine } from './invocation-
|
|
2
|
+
import { type AsyncInvocationKind, type AsyncOutcome, type InvocationLogLine } from './invocation-line.js';
|
|
3
3
|
import type { EmittedReport } from './scope-host.js';
|
|
4
4
|
/** One unit of async work, as the host saw it end. */
|
|
5
5
|
export interface AsyncUnit {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-invocation-log.d.ts","sourceRoot":"","sources":["../src/async-invocation-log.ts"],"names":[],"mappings":"AAiDA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAEjF,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,iBAAiB,EACvB,MAAM,
|
|
1
|
+
{"version":3,"file":"async-invocation-log.d.ts","sourceRoot":"","sources":["../src/async-invocation-log.ts"],"names":[],"mappings":"AAiDA,OAAO,KAAK,EAAE,eAA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AwE;AACxE,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,CAE3E;AAED,sEAAsE;AACtE,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,SAAS,GAAG,iBAAiB,CAyBtE;AAED,yFAAyF;AACzF,MAAM,WAAW,aAAa;IAC5B,oFAAoF;IACpF,KAAK,CAAC,IAAI,EAAE,SAAS,GAAG,IAAI,CAAC;IAC7B,4FAA4F;IAC5F,GAAG,IAAI,IAAI,CAAC;CACb;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,IAAI,GAAE,kBAA8C,EACpD,GAAG,GAAE,MAA6B,GACjC,aAAa,CA6Cf"}
|
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
*/
|
|
49
49
|
import { errorCodeOf } from '@substrat-run/contracts';
|
|
50
50
|
import { ulid } from './ulid.js';
|
|
51
|
-
import { invocationLine, } from './invocation-
|
|
51
|
+
import { invocationLine, } from './invocation-line.js';
|
|
52
52
|
/** The default sink: one JSON line, as the request line is written. */
|
|
53
53
|
export const consoleInvocationLineSink = (line) => console.log(JSON.stringify(line));
|
|
54
54
|
/** The most unit lines one pass writes before it starts counting instead. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"async-invocation-log.js","sourceRoot":"","sources":["../src/async-invocation-log.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAEtD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EACL,cAAc,GAIf,MAAM,
|
|
1
|
+
{"version":3,"file":"async-invocation-log.js","sourceRoot":"","sources":["../src/async-invocation-log.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+CG;AACH,OAAO,EAAE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AAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM;gBAC/E,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,aAAa,IAAI,QAAQ;gBAChD,SAAS,EAAE,CAAC,CAAC,KAAK,CAAC,SAAS,IAAI,IAAI;gBACpC,KAAK,EAAE,EAAE,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC,EAAE,YAAY,EAAE,CAAC,CAAC,EAAE,EAAE;aACtE,CAAC,CACH,CAAC;QACJ,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/capability.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { type BecomeCapabilityInput, type CapabilityExchange, type CapabilityFilter, type CapabilityId, type CapabilityMintInput, type CapabilityPage, type CapabilityRecord, type CheckSubject, type Decision, type DomainEventInput, type EntityRef, type Instant, type MintedCapability, type Node, type PermissionKey, type PlatformActorId, type PrincipalId } from '@substrat-run/contracts';
|
|
2
|
-
import { PermissionDenied } from './permission-checker.js';
|
|
1
|
+
import { type BecomeCapabilityInput, type BecomeLinkState, type BecomeMintRefusal, type BoundedBecomeRevoke, type CapabilityExchange, type CapabilityFilter, type CapabilityId, type CapabilityMintInput, type CapabilityPage, type CapabilityRecord, type CheckSubject, type Decision, type DomainEventInput, type EntityRef, type Instant, type MintedCapability, type Node, type PermissionKey, type PlatformActorId, type PrincipalBecomeCapabilityInput, type PrincipalId } from '@substrat-run/contracts';
|
|
2
|
+
import { PermissionDenied, type Holdings, type PermissionChecker } from './permission-checker.js';
|
|
3
3
|
import type { ScopedSql, SqlValue } from './scope-host.js';
|
|
4
4
|
/**
|
|
5
5
|
* The two spine tables, kernel-owned so no vertical carries a migration for them. Shared by
|
|
6
6
|
* both adapters' `KERNEL_DDL` (interpolated, like `IDEMPOTENCY_DDL`), so the shape
|
|
7
7
|
* self-host builds and the shape production builds cannot part company.
|
|
8
8
|
*/
|
|
9
|
-
export declare const CAPABILITY_DDL = "\n CREATE TABLE IF NOT EXISTS _substrat_capabilities (\n id TEXT PRIMARY KEY,\n -- #1672: SHA-256 hex of the secret. The secret itself is stored NOWHERE \u2014 it leaves\n -- the kernel once, in the mint's return value, and a lookup is this indexed equality.\n token_hash TEXT NOT NULL UNIQUE,\n -- 'act': the holder acts AS the capability ({ capability } on the spine), bounded by\n -- entity + permissions (+ operations). 'become': exchanging it yields `principal`.\n mode TEXT NOT NULL,\n label TEXT,\n entity_type TEXT,\n entity_id TEXT,\n -- JSON array of permission keys (act). The capability's whole authority: no\n -- `capability:` tuple is ever written, so none can be forged through the tuple table.\n permissions TEXT,\n -- JSON array of operation names, or NULL = any operation the keys allow (act).\n operations TEXT,\n principal TEXT,\n -- JSON capabilityAuthor: a principal id (a module minted it, and its authority is\n -- re-checked on every use) or {\"platform\": \u2026} (HostAdmin minted it).\n minted_by TEXT NOT NULL,\n minted_at TEXT NOT NULL,\n expires_at TEXT,\n -- NULL = unlimited. A use is an EXCHANGE of the secret, never an invocation.\n max_uses INTEGER,\n uses INTEGER NOT NULL DEFAULT 0,\n last_used_at TEXT,\n -- Tombstone, never a delete: a capability that once admitted someone is evidence\n -- of why they were admitted (K-4, K-21).\n revoked_at TEXT,\n revoked_by TEXT\n );\n CREATE INDEX IF NOT EXISTS _substrat_capabilities_entity\n ON _substrat_capabilities (entity_type, entity_id);\n -- #1672: what an exchange hands out instead of the secret \u2014 a session token, of which\n -- again only the hash is kept. Each session acts as its capability until the earlier of\n -- its own expiry and the capability's; the capability is re-read on every invoke, so\n -- revoking it ends every session at once \u2014 a revoke touches only the capability row,\n -- and it is that per-invoke read, not a cascade here, that refuses the next call.\n -- Expired rows are pruned on exchange, at most CAPABILITY_SESSION_PRUNE_BATCH at a time,\n -- on the only path that adds one \u2014 so an exchange's write is bounded however many expired.\n CREATE TABLE IF NOT EXISTS _substrat_capability_sessions (\n token_hash TEXT PRIMARY KEY,\n capability_id TEXT NOT NULL,\n created_at TEXT NOT NULL,\n expires_at TEXT NOT NULL\n );\n CREATE INDEX IF NOT EXISTS _substrat_capability_sessions_expiry\n ON _substrat_capability_sessions (expires_at);\n";
|
|
9
|
+
export declare const CAPABILITY_DDL = "\n CREATE TABLE IF NOT EXISTS _substrat_capabilities (\n id TEXT PRIMARY KEY,\n -- #1672: SHA-256 hex of the secret. The secret itself is stored NOWHERE \u2014 it leaves\n -- the kernel once, in the mint's return value, and a lookup is this indexed equality.\n token_hash TEXT NOT NULL UNIQUE,\n -- 'act': the holder acts AS the capability ({ capability } on the spine), bounded by\n -- entity + permissions (+ operations + attachments). 'become': exchanging it yields `principal`.\n mode TEXT NOT NULL,\n label TEXT,\n entity_type TEXT,\n entity_id TEXT,\n -- JSON array of permission keys (act). The capability's whole authority: no\n -- `capability:` tuple is ever written, so none can be forged through the tuple table.\n permissions TEXT,\n -- JSON array of operation names, or NULL = any operation the keys allow (act).\n operations TEXT,\n -- NULL = no attachment read opt-in; 'read' explicitly allows attachment readers.\n attachments TEXT,\n principal TEXT,\n -- #1686: a principal-minted 'become' only \u2014 the digest of what `principal` held when it was\n -- minted (`holdingsDigest`). The exchange recomputes it, and a link whose principal's\n -- holdings have changed since is revoked rather than exchanged. NULL on every other row.\n target_digest TEXT,\n -- #1686: why the kernel itself revoked it ('holdings-changed'); NULL for any other revoke.\n revoked_reason TEXT,\n -- JSON capabilityAuthor: a principal id (a module minted it, and its authority is\n -- re-checked on every use) or {\"platform\": \u2026} (HostAdmin minted it).\n minted_by TEXT NOT NULL,\n minted_at TEXT NOT NULL,\n expires_at TEXT,\n -- NULL = unlimited. A use is an EXCHANGE of the secret, never an invocation.\n max_uses INTEGER,\n uses INTEGER NOT NULL DEFAULT 0,\n last_used_at TEXT,\n -- Tombstone, never a delete: a capability that once admitted someone is evidence\n -- of why they were admitted (K-4, K-21).\n revoked_at TEXT,\n revoked_by TEXT\n );\n CREATE INDEX IF NOT EXISTS _substrat_capabilities_entity\n ON _substrat_capabilities (entity_type, entity_id);\n -- #1672: what an exchange hands out instead of the secret \u2014 a session token, of which\n -- again only the hash is kept. Each session acts as its capability until the earlier of\n -- its own expiry and the capability's; the capability is re-read on every invoke, so\n -- revoking it ends every session at once \u2014 a revoke touches only the capability row,\n -- and it is that per-invoke read, not a cascade here, that refuses the next call.\n -- Expired rows are pruned on exchange, at most CAPABILITY_SESSION_PRUNE_BATCH at a time,\n -- on the only path that adds one \u2014 so an exchange's write is bounded however many expired.\n CREATE TABLE IF NOT EXISTS _substrat_capability_sessions (\n token_hash TEXT PRIMARY KEY,\n capability_id TEXT NOT NULL,\n created_at TEXT NOT NULL,\n expires_at TEXT NOT NULL\n );\n CREATE INDEX IF NOT EXISTS _substrat_capability_sessions_expiry\n ON _substrat_capability_sessions (expires_at);\n";
|
|
10
10
|
/** The tables `CAPABILITY_DDL` builds — what a copy of a scope leaves behind (`capabilitiesForLoad`, #1686). */
|
|
11
11
|
export declare const CAPABILITY_TABLE_NAMES: readonly ['_substrat_capabilities', '_substrat_capability_sessions'];
|
|
12
12
|
/** One capability row as the spine stores it — snake_case, because that is what both adapters `SELECT`. */
|
|
@@ -18,6 +18,7 @@ export interface CapabilityRow {
|
|
|
18
18
|
entity_id: string | null;
|
|
19
19
|
permissions: string | null;
|
|
20
20
|
operations: string | null;
|
|
21
|
+
attachments: string | null;
|
|
21
22
|
principal: string | null;
|
|
22
23
|
minted_by: string;
|
|
23
24
|
minted_at: string;
|
|
@@ -27,6 +28,10 @@ export interface CapabilityRow {
|
|
|
27
28
|
last_used_at: string | null;
|
|
28
29
|
revoked_at: string | null;
|
|
29
30
|
revoked_by: string | null;
|
|
31
|
+
/** #1686: a principal-minted `become`'s holdings digest at mint; NULL elsewhere. */
|
|
32
|
+
target_digest?: string | null;
|
|
33
|
+
/** #1686: why the kernel itself revoked it; NULL otherwise. */
|
|
34
|
+
revoked_reason?: string | null;
|
|
30
35
|
}
|
|
31
36
|
/** Every column a read returns — everything but `token_hash`, which no reader has a use for. */
|
|
32
37
|
export declare const CAPABILITY_COLUMNS: string;
|
|
@@ -220,6 +225,12 @@ export declare function exchangeCapability(deps: {
|
|
|
220
225
|
sql: ScopedSql;
|
|
221
226
|
now: Instant;
|
|
222
227
|
emit: (capability: CapabilityId, event: DomainEventInput) => void;
|
|
228
|
+
/**
|
|
229
|
+
* What a principal holds now (#1686) — the checker's `holdings` at this scope. A
|
|
230
|
+
* principal-minted `become` is exchanged only while its principal's holdings digest is the
|
|
231
|
+
* one recorded at mint; absent, such a link is refused.
|
|
232
|
+
*/
|
|
233
|
+
holdings?: (principal: PrincipalId) => Promise<Holdings>;
|
|
223
234
|
}, secret: unknown,
|
|
224
235
|
/**
|
|
225
236
|
* The only mode the caller can handle. A secret of the OTHER mode answers `null` without
|
|
@@ -238,8 +249,10 @@ mode?: 'act' | 'become'): Promise<CapabilityExchange | null>;
|
|
|
238
249
|
* remedy — and an operation outside the capability's allowlist as `forbidden`. None of
|
|
239
250
|
* these is a K-35 denial: no permission key was checked, and the denial log records
|
|
240
251
|
* enforced checks. The handler's own checks, once it runs, are.
|
|
252
|
+
* `attachmentRead` is true only at the dedicated attachment reader boundary; ordinary
|
|
253
|
+
* operation resolution leaves the independent attachment field out of its decision.
|
|
241
254
|
*/
|
|
242
|
-
export declare function resolveCapabilitySession(sql: ScopedSql, sessionHash: string, now: Instant, operation: string): CapabilityId;
|
|
255
|
+
export declare function resolveCapabilitySession(sql: ScopedSql, sessionHash: string, now: Instant, operation: string, attachmentRead?: boolean): CapabilityId;
|
|
243
256
|
/**
|
|
244
257
|
* The refusal of an attachment WRITE through a capability (#1686) — an upload or a remove,
|
|
245
258
|
* whatever keys the capability carries. The ONE refusal for it: both adapters' capability
|
|
@@ -278,10 +291,120 @@ export declare const plausibleCapabilitySecret: (secret: unknown) => secret is s
|
|
|
278
291
|
*/
|
|
279
292
|
export declare function checkBecomeInput(raw: BecomeCapabilityInput, now: Instant): BecomeCapabilityInput;
|
|
280
293
|
export declare function mintBecomeCapability(sql: ScopedSql, raw: BecomeCapabilityInput, actor: PlatformActorId, now: Instant): Promise<MintedCapability>;
|
|
294
|
+
/**
|
|
295
|
+
* Where each named `become` link stands (#1686), in the order asked — what a pending-invite list
|
|
296
|
+
* shows beside each invite. A capability the scope does not hold reads as `revoked`, never `open`.
|
|
297
|
+
*
|
|
298
|
+
* A principal-minted link that would otherwise read `open` is judged as its exchange would judge
|
|
299
|
+
* it: its principal's holdings are read now (`holdings`) and compared with the digest taken at
|
|
300
|
+
* mint, and a link whose principal changed since reads `revoked` / `holdings-changed` — before
|
|
301
|
+
* anybody has tried it. Nothing is written on a read: the exchange is what revokes it. One with no
|
|
302
|
+
* digest, or with no `holdings` to judge it by, reads `revoked`, as its exchange refuses it.
|
|
303
|
+
*/
|
|
304
|
+
export declare function readBecomeLinkStates(sql: ScopedSql, ids: readonly string[], now: Instant, holdings?: (principal: PrincipalId) => Promise<Holdings>): Promise<BecomeLinkState[]>;
|
|
305
|
+
/**
|
|
306
|
+
* `becomeLinkStates`' bound on how many links one call names (`BECOME_LINK_STATES_MAX_IDS`):
|
|
307
|
+
* refused over it, never truncated — a caller asks in pages. Its own function so a host whose
|
|
308
|
+
* storage sits across an RPC boundary checks on the near side, where the typed refusal survives.
|
|
309
|
+
*/
|
|
310
|
+
export declare function assertBecomeLinkStateIds(ids: readonly string[]): void;
|
|
311
|
+
/**
|
|
312
|
+
* A canonical digest of what a principal holds (#1686): the role KEYS it holds at the node, as
|
|
313
|
+
* assigned, the permissions granted to it directly at the node, and its entity-narrowed grants —
|
|
314
|
+
* at scope and tenant level, through its orgs — each sorted and deduplicated, so two reads of the
|
|
315
|
+
* same holdings in any order give the same digest. Taken when a principal mints a `become` for it,
|
|
316
|
+
* and again at the exchange: a role assigned or taken away, a grant added or removed, an org joined
|
|
317
|
+
* or left, all change it, and the link dies.
|
|
318
|
+
*
|
|
319
|
+
* Role KEYS, not their expansions, deliberately: a role's definition is the vertical's code,
|
|
320
|
+
* re-projected on a push and reviewed at the permission-diff checkpoint — nothing an inviter
|
|
321
|
+
* controls. Expanding it would revoke every open invite at a role whenever a release adds a key to
|
|
322
|
+
* that role. The price, by design: a REDEFINITION can make the invitee hold more than the minter
|
|
323
|
+
* held when it minted — a release that widens the role widens what the link becomes. That is a
|
|
324
|
+
* change only code or staff make (`defineRole` has no HTTP route), never an inviter.
|
|
325
|
+
*
|
|
326
|
+
* What the digest deliberately does not see, so nobody relies on it as a reach check:
|
|
327
|
+
* - the LEVEL a grant is held at — a key moved between the scope and the tenant node leaves it
|
|
328
|
+
* unchanged, as the mint bound compares the same flattened set (`holdingsOf` merges the levels);
|
|
329
|
+
* - reach that grows under a narrowed grant's entity through `ctx.link` / `ctx.relink` — the
|
|
330
|
+
* minter's coverage of that entity was checked through `check`, whose reach grows the same way;
|
|
331
|
+
* - module authority decided from a principal column (an assignee, an author) rather than a tuple
|
|
332
|
+
* — neither the bound nor the digest sees it.
|
|
333
|
+
* None of these three lets the link yield more than its minter held (a role redefinition can, by
|
|
334
|
+
* design — see above): the identity a link binds is per
|
|
335
|
+
* (scope, sub), so what it becomes is this principal in this scope only. The first two are judged
|
|
336
|
+
* by the same checker, over the same flattened set and the same walk, that bounded the minter;
|
|
337
|
+
* the third is a row the scope itself points at this principal, as it would for any member it
|
|
338
|
+
* names — and a member invite's principal is minted fresh, so no row names it when its link is.
|
|
339
|
+
*/
|
|
340
|
+
export declare function holdingsDigest(held: Holdings): Promise<string>;
|
|
281
341
|
/**
|
|
282
342
|
* The platform's revoke (`HostAdmin.revokeCapability`) — of any capability in the scope,
|
|
283
343
|
* the operator's lever for a leaked link. Returns the row as it stood before, for the admin
|
|
284
344
|
* log, or `undefined` when there is no such capability. Idempotent.
|
|
285
345
|
*/
|
|
286
346
|
export declare function revokeCapabilityAsPlatform(sql: ScopedSql, rawId: string, actor: PlatformActorId, now: Instant): CapabilityRecord | undefined;
|
|
347
|
+
/** The pseudo-operation a principal's `become` mint names on its spine event. */
|
|
348
|
+
export declare const CAPABILITY_BECOME_MINT_OPERATION = "capabilities.mint-become";
|
|
349
|
+
/**
|
|
350
|
+
* May `caller` mint a `become` capability for `target` at `node`? (#1686) Becoming someone
|
|
351
|
+
* acquires everything they hold, so the bound is the assignment bound (K-21) applied to the
|
|
352
|
+
* whole of it: the caller must already hold, at the node, every permission the target holds
|
|
353
|
+
* there, and must be able to exercise every entity-narrowed grant the target holds on that same
|
|
354
|
+
* entity. Anything less mints impersonation upward — a lead inviting a stranger in as the owner.
|
|
355
|
+
*
|
|
356
|
+
* The bound is evaluated at mint, against what the target holds then; the exchange does not
|
|
357
|
+
* re-check the minter. It compares the target's holdings instead: a link whose principal's
|
|
358
|
+
* holdings have changed since the mint is revoked rather than exchanged (`exchangeCapability`). So a target holding nothing at the node is refused outright: its empty set would
|
|
359
|
+
* cover trivially, and the link would yield whatever that principal is granted later. A member
|
|
360
|
+
* invite never meets this — it grants the role before it mints.
|
|
361
|
+
*
|
|
362
|
+
* It is also refused for a target some `become` capability has already been exchanged into in
|
|
363
|
+
* this scope (`target-already-claimed`): a principal-minted `become` is for a seat nobody has
|
|
364
|
+
* taken, never a second key to someone who already exists. Whether a login is bound to the
|
|
365
|
+
* target outside the scope (an identity directory) is not visible here; the one caller today,
|
|
366
|
+
* a member invite, always targets a principal it has just minted.
|
|
367
|
+
*
|
|
368
|
+
* When the mint may go ahead, the target's `holdingsDigest` — what the mint records, and what the
|
|
369
|
+
* exchange compares against. Otherwise the refusal, as the host answers it — a `Coverage` naming
|
|
370
|
+
* what the caller lacks, as `canAssign`'s does, `target-holds-nothing`, or
|
|
371
|
+
* `target-already-claimed`. A checker with
|
|
372
|
+
* no `holdings` cannot say what the target holds, so the bound refuses rather than guess.
|
|
373
|
+
*/
|
|
374
|
+
export declare function becomeMintCheck(deps: {
|
|
375
|
+
sql: ScopedSql;
|
|
376
|
+
checker: Pick<PermissionChecker, 'check' | 'covers' | 'holdings'>;
|
|
377
|
+
}, caller: PrincipalId, target: PrincipalId, node: Node): Promise<BecomeMintRefusal | {
|
|
378
|
+
ok: true;
|
|
379
|
+
targetDigest: string;
|
|
380
|
+
}>;
|
|
381
|
+
/**
|
|
382
|
+
* A principal's `become` mint (#1686) — the write a member invite makes once `becomeMintCheck`
|
|
383
|
+
* has said yes, in the same scope task. Recorded with the principal as its minter, and on the
|
|
384
|
+
* spine as `capability.become-minted` through `emit`, whose actor the host stamps as `minter`.
|
|
385
|
+
* No expiry unless one is given, as an invite has never had one; the use limit is required.
|
|
386
|
+
*/
|
|
387
|
+
export declare function mintBecomeCapabilityAsPrincipal(deps: {
|
|
388
|
+
sql: ScopedSql;
|
|
389
|
+
now: Instant;
|
|
390
|
+
emit: (event: DomainEventInput) => void;
|
|
391
|
+
}, minter: PrincipalId, raw: PrincipalBecomeCapabilityInput,
|
|
392
|
+
/** `becomeMintCheck`'s answer: the target's holdings now, which the exchange compares against. */
|
|
393
|
+
targetDigest: string): Promise<MintedCapability>;
|
|
394
|
+
/**
|
|
395
|
+
* Revoke a `become` capability a PRINCIPAL minted (#1686) — what withdrawing a member invite
|
|
396
|
+
* does to its link, recorded with `by` as the revoker. Only such a row: a platform-minted one
|
|
397
|
+
* (an owner claim link) is the platform's to revoke, and an `act` one is `ctx.capabilities`'.
|
|
398
|
+
*
|
|
399
|
+
* Bounded here, not only by the caller: `by` must be the link's minter, or hold everything its
|
|
400
|
+
* principal holds now — whoever could have minted it, as a module's revoke of an `act` link is
|
|
401
|
+
* open to whoever could have minted that. A refusal writes nothing. `revoked` is true when this
|
|
402
|
+
* call revoked it; false when it was already revoked or is not such a row.
|
|
403
|
+
*/
|
|
404
|
+
export declare function revokeBecomeCapabilityAsPrincipal(deps: {
|
|
405
|
+
sql: ScopedSql;
|
|
406
|
+
checker: Pick<PermissionChecker, 'check' | 'covers' | 'holdings'>;
|
|
407
|
+
node: Node;
|
|
408
|
+
now: Instant;
|
|
409
|
+
}, rawId: string, by: PrincipalId): Promise<BoundedBecomeRevoke>;
|
|
287
410
|
//# sourceMappingURL=capability.d.ts.map
|
package/dist/capability.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"capability.d.ts","sourceRoot":"","sources":["../src/capability.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"capability.d.ts","sourceRoot":"","sources":["../src/capability.ts"],"names":[],"mappings":"AAAA,OAAO,EAoBL,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EAIxB,KAAK,kBAAkB,EAEvB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EAExB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EAErB,KAAK,YAAY,EACjB,KAAK,QAAQ,EACb,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,OAAO,EACZ,KAAK,gBAAgB,EACrB,KAAK,IAAI,EACT,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,8BAA8B,EACnC,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,gBAAgB,EAAE,KAAK,QAAQ,EAAE,KAAK,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAClG,OAAO,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AA0C3D;;;;GAIG;AACH,eAAO,MAAM,cAAc,+kGAyD1B,CAAC;AAEF,gHAAgH;AAChH,eAAO,MAAM,sBAAsB,YAAI,wBAAwB,EAAE,+BAA+B,CAAU,CAAC;AAE3G,2GAA2G;AAC3G,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,UAAU,EAAE,MAAM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