@substrat-run/adapter-sqlite 0.153.0 → 0.155.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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { type UploadLinkView, type BlobStoreHandle, type ImportBatch, type ImportResult, type Coverage, type PeerCoverage, type VerticalCaller, type BoundedBecomeMint, type BoundedBecomeRevoke, type BoundedUnbind, type BecomeLinkState, type PrincipalBecomeCapabilityInput, type CapabilityExchange, type CapabilityId, type ConnectionId, type ModuleId, type DomainEvent, type PlatformRequestId, type PlatformRequestEntry, type PlatformRequestFilter, type ProjectedConnectionGrant, type EntityRef, type PermissionKey, type PlatformActorId, type OnBehalfOf, type PrincipalId, type ScopeDumpInput, type ScopeId, type ImpersonationSessionId, type TenantId, type TenantStoreHandle } from '@substrat-run/contracts';
2
- import { type ModuleLogSink, type InvocationLineSink, type FreshnessReport, type FreshnessRegistration, type BlobStoreProvisionInput, type ScopeAttachments, type TenantBlobStore, type ExecutorDeadLetter, type ExecutorDrainReport, type MigrateScopeOutcome, type MigrationFrontier, type ExecutorHandler, type ExecutorRetryPolicy, type ScopeRoleHolder, type ConnectorHandler, type ConnectorOptions, type Clock, type FetchLike, type SecretBox, type HostAdmin, type ModuleRegistration, type OperationHandler, type PermissionChecker, type ProvisionScopeInput, type ScheduleRegistration, type ScheduleRunReport, type ScopeHost, type ScopeStub, type ScopeStubOptions, type TenantRelationalStore, type TenantStoreProvisionInput, type AttachmentExtractor, type AttachmentTextBounds, type OrphanSweepReport, type OrphanSweepRequest, type JobDriveReport, type JobHandler, type JobRun, type JobRunFilter, type StartJobRunInput, type ConnectorCallRecorder, type StoreStub, type ScopeStoreStubOptions, type ScopeStoreHostOptions, type StoreErasureReplay } from '@substrat-run/kernel';
1
+ import { type UploadLinkView, type BlobStoreHandle, type ManifestConnectionLandings, type ImportBatch, type ImportResult, type Coverage, type PeerCoverage, type VerticalCaller, type BoundedBecomeMint, type BoundedBecomeRevoke, type BoundedUnbind, type BecomeLinkState, type PrincipalBecomeCapabilityInput, type CapabilityExchange, type CapabilityId, type ConnectionId, type ModuleId, type DomainEvent, type PlatformRequestId, type PlatformRequestEntry, type PlatformRequestFilter, type ProjectedConnectionGrant, type EntityRef, type PermissionKey, type PlatformActorId, type OnBehalfOf, type PrincipalId, type ScopeDumpInput, type ScopeId, type ImpersonationSessionId, type TenantId, type TenantStoreHandle } from '@substrat-run/contracts';
2
+ import { type ModuleLogSink, type InvocationLineSink, type FreshnessReport, type FreshnessRegistration, type BlobStoreProvisionInput, type ScopeAttachments, type TenantBlobStore, type ExecutorDeadLetter, type ExecutorDrainReport, type MigrateScopeOutcome, type MigrationFrontier, type ExecutorHandler, type ExecutorRetryPolicy, type ScopeRoleHolder, type DeclaredPermissions, type ConnectorHandler, type ConnectorOptions, type Clock, type FetchLike, type SecretBox, type HostAdmin, type ModuleRegistration, type OperationHandler, type PermissionChecker, type ProvisionScopeInput, type ScheduleRegistration, type ScheduleRunReport, type ScopeHost, type ScopeStub, type ScopeStubOptions, type TenantRelationalStore, type TenantStoreProvisionInput, type AttachmentExtractor, type AttachmentTextBounds, type OrphanSweepReport, type OrphanSweepRequest, type JobDriveReport, type JobHandler, type JobRun, type JobRunFilter, type StartJobRunInput, type ConnectorCallRecorder, type StoreStub, type ScopeStoreStubOptions, type ScopeStoreHostOptions, type StoreErasureReplay } from '@substrat-run/kernel';
3
3
  import { type PlatformRequestSettle } from '@substrat-run/kernel';
4
4
  import { type RedeemedUploadLink, type UploadLinkRedeemInput } from '@substrat-run/kernel';
5
5
  export { scopeStoreRunnersFor } from './scope-store-runners.js';
@@ -126,6 +126,13 @@ export interface SqliteScopeHostOptions {
126
126
  * matches (`migrationSetDivergence`). Omitted, nothing is compared.
127
127
  */
128
128
  migrationsDigest?: string;
129
+ /**
130
+ * The vertical's declared permission surface (#2430): its `definePermissions(...)` value, the one
131
+ * `substrat push` and `lint:permissions` read. Given, `registerModule` refuses a module its
132
+ * `modules` leaves out, since nothing that module declares would be judged by either. Omitted,
133
+ * nothing is compared (a test fixture, a host with no declared surface).
134
+ */
135
+ permissions?: DeclaredPermissions;
129
136
  }
130
137
  /**
131
138
  * The scope spine a fresh scope gets, for a tool that replays a vertical's migrations outside a
@@ -177,6 +184,10 @@ export declare class SqliteScopeHost implements ScopeHost {
177
184
  private readonly tenantStoreDbs;
178
185
  private readonly operations;
179
186
  private readonly modules;
187
+ /** #2430: what a registered module declares `holder: 'system'` — the role doors' refusal reads it. */
188
+ private readonly reservedKeys;
189
+ /** #2430: the declared permission surface `registerModule` holds each module to, when given. */
190
+ private readonly permissions;
180
191
  /** #1705: what this deployment exports to other verticals and imports from them. */
181
192
  private readonly crossVertical;
182
193
  /** operation name → guards declared before it, in registration order (K-17). */
@@ -545,6 +556,8 @@ export declare class SqliteScopeHost implements ScopeHost {
545
556
  private provisionedVersionsOf;
546
557
  /** What one version of `slug` imports, from the registry; `not_found` for a version it does not know. */
547
558
  private versionImports;
559
+ /** #2316: what one version of `slug` declares about connection landings; `not_found` for a version it does not know. */
560
+ versionConnectionLandings(slug: string, versionId: string): Promise<ManifestConnectionLandings>;
548
561
  /** #1705 PR 3: the promote gate's question, over two stored versions (`exportBreaksOf`). */
549
562
  private exportBreaksBetween;
550
563
  /**
@@ -649,6 +662,14 @@ export declare class SqliteScopeHost implements ScopeHost {
649
662
  unbindEntityHolderBounded(tenantId: TenantId, scopeId: ScopeId, caller: PrincipalId, entity: EntityRef): Promise<BoundedUnbind>;
650
663
  /** What a principal holds at this scope, for a `become` exchange (#1686); absent with a checker that cannot say. */
651
664
  private holdingsAt;
665
+ /**
666
+ * #2430: refuse conferring `roleKey` through `door` when the tenant's role carries a key a module
667
+ * registered here reserves (`reservedRoleRefusal`). A role the tenant does not define is left to
668
+ * the door's own answer for it.
669
+ */
670
+ private refuseReservedRole;
671
+ /** #2430: refuse a raw grant of a key a module registered here reserves (`reservedGrantRefusal`). */
672
+ private refuseReservedGrant;
652
673
  /** The caller's bound per role at the scope, `null` for a role this tenant does not define (#1150). */
653
674
  private roleBound;
654
675
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAoBL,KAAK,cAAc,EACnB,KAAK,eAAe,EAepB,KAAK,WAAW,EAEhB,KAAK,YAAY,EAwBjB,KAAK,QAAQ,EACb,KAAK,YAAY,EAIjB,KAAK,cAAc,EA4CnB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,8BAA8B,EAGnC,KAAK,kBAAkB,EAEvB,KAAK,YAAY,EAMjB,KAAK,YAAY,EAOjB,KAAK,QAAQ,EAeb,KAAK,WAAW,EAIhB,KAAK,iBAAiB,EACtB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAM1B,KAAK,wBAAwB,EAE7B,KAAK,SAAS,EASd,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,WAAW,EAgBhB,KAAK,cAAc,EAEnB,KAAK,OAAO,EAeZ,KAAK,sBAAsB,EAG3B,KAAK,QAAQ,EAGb,KAAK,iBAAiB,EAyBvB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EA8EL,KAAK,aAAa,EAKlB,KAAK,kBAAkB,EAwDvB,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAc1B,KAAK,uBAAuB,EAG5B,KAAK,gBAAgB,EACrB,KAAK,eAAe,EAEpB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,eAAe,EAEpB,KAAK,mBAAmB,EAuCxB,KAAK,eAAe,EAiJpB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,KAAK,EACV,KAAK,SAAS,EACd,KAAK,SAAS,EAEd,KAAK,SAAS,EAEd,KAAK,kBAAkB,EAEv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;;OAKG;IACH,OAAO,CAAC,MAAM;IAuBd;;;OAGG;IACH,OAAO,CAAC,YAAY;IAUpB;;;;;;;OAOG;IACH,OAAO,CAAC,kBAAkB;IA8G1B,OAAO,CAAC,OAAO;CAsChB"}
package/dist/index.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { existsSync, mkdirSync, readdirSync, readFileSync, realpathSync, rmSync, writeFileSync } from 'node:fs';
2
2
  import { dirname, join } from 'node:path';
3
3
  import Database from 'better-sqlite3';
4
- import { accessLogEntry, adminLogEntry, delegatedReadParams, operationSeriesCount, opsFailureEntry, opsFailureFingerprint, issueEntry, FRESHNESS_HEARTBEAT_MINUTES, sweepRunEntry, modelUsageEntry, ATTACHMENT_ADDED, ATTACHMENT_REMOVED, attachmentRecord, createTenantInput, domainEvent, domainEventInput, exportReadInput, importBatch, importCursorMove, exportsOfManifestJson, assertNoBindingShapeBreak, importsOfManifestJson, entitlementGrant, entitlementGrantInput, eventId, meterReading, platformRequestInput, platformRequestId, MAX_PENDING_PLATFORM_REQUESTS, identityLink, identityPool, instant, isSubstratError, connection, capabilityGrant, connectionGrant, connectionGrantRecord, connectionSecret, systemGrant, systemSwitch, systemSwitchRecord, peerSwitch, verticalCaller, verticalSlug as verticalSlugOf, subjectRef, requestFingerprint, createConnectionInput, connectLinkFilter, connectLinkKey, consumeConnectLinkInput, mintConnectLinkInput, projectedConnectionGrant, projectedConnectionKey, moduleManifest, createOrgInput, promotionAcknowledgement, bindAcknowledgement, bindHostnameInput, channelHistoryEntry, hostnameBinding, publishVersionInput, AUTO_ADMISSION_NOTE, routeTarget, ROUTE_SCOPE_HOSTNAMES_MAX, registerVerticalInput, vertical as verticalSchema, verticalChannel, verticalVersion, objectRef, entityObjectRef, assertModuleEmittableType, assertKernelAuthoredType, grantRefFromProof, org as orgSchema, orgMembership, principalId, resolvedIdentity, identityMembership, roleDefinition, scope as scopeSchema, tenant as tenantSchema, tenantRole, principalBecomeCapabilityInput, subjectShredReceipt, SCOPE_TABLE_PAGE_DEFAULT, SCOPE_TABLE_PAGE_MAX, SCOPE_QUERY_ROW_MAX, verticalServingState, callsOfManifestJson, outboundOfManifestJson, listLimitOf, pageOf, countedPageOf, SCOPE_GATE_REASONS, substratError, assertReplayableDump, delegatedReadRecord, ownerTransferAudit, memberChangeAudit, peerBindingAudit, connectionBindingAudit, copyMarkAudit, orphanSweepAudit, redrainEventsInput, REDRAIN_BATCH, errorCodeOf, } from '@substrat-run/contracts';
5
- import { actorOf, asPrincipal, assertAllowed, assertNoSecret, assertPermissionKey, CAPABILITY_DDL, UPLOAD_LINK_DDL, createAttachmentVerbs, inspectUploadLink, redeemUploadLinkInTransaction, redeemOrReplayUploadLink, COPY_ORIGIN_DDL, ENTITY_STATE_MOVES_DDL, CAPABILITY_EXCHANGE_OPERATION, CAPABILITY_BECOME_MINT_OPERATION, becomeMintCheck, mintBecomeCapabilityAsPrincipal, revokeBecomeCapabilityAsPrincipal, readBecomeLinkStates, ENTITY_UNBIND_OPERATION, allowedFor, unbindEntityHolderBounded, capabilityAttachmentWriteRefused, capabilityTokenHash, createCapabilityVerbs, createEntityEdgeVerbs, createEntityStateVerbs, createTrashedReads, CONTINUATION_POSITION_CAP, visibleContinuation, searchStateWhere, uncheckedView, addStatePlans, addUpdatedStampPlans, watchUpdatedStamps, entityStateMigrations, assertNoCallerPurge, isUnreachableParent, heldPurgePass, purgeDueOf, purgeHeldBy, lifecycleRefusal, purgeOnlyKeysOf, purgeReportOf, purgeStillDue, refuseTrashedTarget, assertBoundOperations, checkHeldOperationsOf, countChecks, noteUncheckedCompletion, registerTrashTargets, runPurgePass, withheldKeysFor, statefulTablesOf, afterMigration, afterRuntimeDdl, derivesAnything, repairDerivedObjects, StateColumnLost, exchangeCapability as exchangeCapabilitySecret, guardSecrets, mintBecomeCapability, plausibleSessionToken, readCapabilityPage, redactSecrets, redactSecretText, moduleLog, consoleLogSink, asyncInvocationId, asyncLinePass, consoleInvocationLineSink, resolveCapabilitySession, revokeCapabilityAsPlatform, assertReadOnlyQuery, attachmentBlobKey, attachmentSha256, entitlementDenial, requiredEntitlementFor, foldMeterReading, guardSpine, guardSqlLimits, DO_SQL_LIMITS, tooManyResultColumns, tooManyTableColumns, parseValidationRecords, resolveScopeRecord, ulid, ISSUE_RETENTION_DAYS, telemetryRetentionStatements, FINDINGS_DDL, SCOPE_STORAGE_DDL, forgetScopeStorage, listScopeStorageAttemptRows, listScopeStorageRows, listScopeStoreStorageRows, pruneScopeStorageRows, recordScopeStorageRows, CONNECT_LINKS_DDL, consumeConnectLinkRow, insertConnectLink, listConnectLinks as listConnectLinkRows, readConnectLink, restoreConnectLinkRow, revokeConnectLinkRow, createFindingRule, findingOfOpsFailure, findingOfSweepRun, pruneFindings, listFindingRules, listFindings, observeFinding, revokeFindingRule, setFindingStatus, assertRowLimit, assertRowOffset, OPS_FAILURE_RETENTION_DAYS, SWEEP_RUN_RETENTION_DAYS, SWEEP_RUNS_INTENT_INDEX, sweepRunsIntentHasKind, MODEL_USAGE_RETENTION_DAYS, foldModelUsage, backoffAt, platformRequestHistoryQuery, platformRequestOf, PLATFORM_REQUEST_COLUMNS, PLATFORM_REQUEST_REDACTION_SQL, platformRequestRedactionParams, platformRequestRedactionQuery, intentPayloadCarriesSubject, redactSubjectJobRuns, eraseSubjectFromModules, moduleRowsErased, moduleErasurePlan, redactSubjectScopeText, redactSubjectDirectoryText, ISSUE_EXEMPLAR_OWNER_BACKFILL_SQL, issueExemplarOwner, JOB_RUN_PATCH_SQL, JOB_RUN_CLAIM_SQL, JOB_RUN_RENEW_SQL, JOB_RUN_BEGIN_SQL, JOB_RUN_MISS_SQL, JOB_RUN_MISS_SETTLE_SQL, admissionMissOutcome, JOB_STEP_RECORD_SQL, JOB_LEASE_EXPIRED_NOTE, assertLeaseMs, DELIVERY_ERROR_REDACTION_SQL, REDACTED_DELIVERY_NOTE, seatScopeTuple, applyScopeRoleChange, changeScopeRole, revokeScopeRoles, scopeRoleHolders, admitPeer, boundToPeerDeclarations, peerCallerAt, collectPeers, peerSeats, resolveVerticalInstanceFrom, resolvePeerInstanceFrom, peerVerticalSpellings, samePeerVertical, peerGrantsStatus, systemGrantsStatus, systemScheduleState, systemSwitchedOff, systemSwitchedOffMessage, tenantSystemSwitchedOffMessage, PEER_SWITCHES_DDL, PEER_BINDINGS_DDL, SWITCH_OWED_DDL, SWITCH_FENCES_DDL, TABLE_OWNERS_DDL, assertMigrationLeavesLedgerAlone, recordOwnershipSteps, runMigrationStatements, executableSqlStatements, blankSqlComments, recordWriteSuperseded, switchFencesOf, switchSupersededMessage, SWITCH_KINDS, SYSTEM_SWITCHES_DDL, forgetSwitchesOf, listSystemSwitchRecords, moveSwitch, reassertActionOf, reassertEntry, reassertOffRow, recordSwitchedOff, recordSwitchedOn, restoreSwitchRecord, scopesSwitchedOffFor, switchActionOf, switchAuditSubject, recordAuditOutcome, auditedCapabilityRevoke, auditWarningOf, switchNotFoundMessage, switchRecordsOf, switchedOffOf, switchesBackfillSqlOf, switchesTableExists, tenantHeldOf, tenantHoldsGrant, inUnitMovesToAudit, staleCarryRevertRow, staleCarryReverts, withRecorded, VERSION_MIGRATIONS_DDL, VERTICAL_SCOPE_STORES_DDL, forgetVerticalScopeStores, indexVersionScopeStores, driverDeclarationsOf, verticalScopeStoresOf, STORE_DRIVER_RELEASES_DDL, legacyStoreDriverConflict, legacyStoreDriverRenames, beginStoreDriverRolloutIn, finishStoreDriverRolloutIn, holdStoreDriverIn, advanceStoreDriverRebuildIn, claimStoreDriverRebuildIn, storeDriverRebuildIn, recordStoreDriverReleaseIn, releaseStoreDriverHoldIn, storeDriverReleaseIn, storeDriverStateIn, storeDriverRolloutPendingIn, storeDriverRolloutWalkedIn, splitManifestMigrations, splitVersionMigrationsBatch, versionMigrationsOf, deriveVersionMigrationDigest, publishedMigrationDigest, migrationChangeRefusal, writeVersionMigrations, denialListQuery, refusalListQuery, mapRefusalRow, denialSummaryQuery, denialTotalsQuery, DENIAL_WINDOW_QUERY, mapDenialRow, mapDenialSummaryBuckets, IMPERSONATION_COLUMNS, IMPERSONATION_DDL, ImpersonationRefused, assertImpersonationWrites, assertModuleEnqueueableKind, assertSessionUsable, impersonationByIdQuery, impersonationListQuery, impersonationRowValues, impersonationStampOf, mapImpersonationRow, newImpersonationSession, resolveRetryPolicy, executorOutcomeOf, isDeliveryRefusal, refusalJournalText, membershipFencesBackfillSql, MEMBERSHIP_FENCES_DDL, membershipFencesTableExists, MEMBERSHIP_FENCE_SINCE_SQL, RAISE_MEMBERSHIP_FENCE_SQL, memberAddedAudit, orgChangeBound, tenantCoverage, isSecretBoxConfigured, unconfiguredSecretBox, createSubjectKeys, generateSealingKeyPair, noSealingKeyMessage, openSealed, sealTo, ConnectionSealingKeyUnavailableError, PermissionDenied, createAtomic, NotSearchable, NotListable, listIndexMigrations, listIndexPlans, listQuery, cursorOf, moduleMigrations, MIGRATION_DIGEST_FENCE_DDL, MIGRATION_DIGEST_MARK_LEGACY, assertJournalDumpCoherent, assertMigrationSql, migrationDivergence, migrationFailedError, migrationSetDivergence, migrationSteps, planMigrations, isSearchIndexTable, searchIndexMigrations, searchIndexPlans, searchLimit, searchMatchExpression, searchQuery, ATTACHMENT_TEXT_DDL, ATTACHMENT_CONDEMNED_DDL, ATTACHMENT_SWEEP_LICENCE_DDL, ATTACHMENT_SWEEP_LICENCE_TABLE, clearOrphanSweepLicence, condemnLicensedOrphanAttachments, consumeOrphanSweepLicence, licensedOrphanIds, recordOrphanSweepLicence, refuseUnlicensedOrphanSweep, fenceAttachmentSweep, refuseCondemnedAttachment, refuseCondemnedInDump, rowlessAttachmentIds, sweepOrphanAttachments, missingAttachmentStore, SETTLED_COPY_STATES, unsettledCopyRefusal, assertAttachmentExtractors, resolveAttachmentTextBounds, assertJobRegistrable, attachmentRecordOfRow, attachmentTextJob, enqueueAttachmentText, ATTACHMENT_TEXT_BACKFILL_JOB, ATTACHMENT_TEXT_JOB, kernelJobFor, queueAttachmentTextBackfill, startAttachmentTextBackfill, attachmentTextBackfillJob, reconcileAttachmentText, recordAttachmentText, searchAttachments, entityVersionQuery, entityVersionOf, assertIfMatch, OUTBOX_ENTITY_INDEX, SCHEDULE_STATE_DDL, SCHEDULE_STATE_REBUILD, scheduleStateHasKind, VERTICAL_EVENTS_DDL, EXPORT_HOPS_SQL, emptyImportResult, IMPORT_CURSORS_SQL, IMPORT_CURSOR_OF_SQL, OUTBOX_MARK_SQL, emittedSinceQuery, emittedReportOf, EMITTED_REPORT_CAP, exportedSinceQuery, IMPORT_CURSOR_ADVANCE_SQL, IMPORT_RECORD_SQL, moveImportCursor, importCursorSourceOf, exportBreaksOf, exportBreakRefusal, assertPromoteReviewCurrent, promoteRaceRefusal, rebindRaceRefusal, SERVES_NOW_CONDITION, SERVES_NOW_PREDICATE, servesNowParams, bindExportBreaksOf, bindExportBreakRefusal, scopeMoveOf, runningVersionOf, isPrimaryScope, PROVISIONED_VERSIONS_SQL, installsReconciledOf, strandJudgmentsOf, provisionedVersionsParams, boundShapesColumn, boundShapesOfColumn, installReconciled, CrossVerticalRegistry, exportReadPlan, exportReadQuery, planExportBatch, withheldNote, JOB_RUN_DDL, JOB_RUN_DUE_AT, jobRunListLimit, jobRunOf, runDueJobRuns, startJobRun, IDEMPOTENCY_DDL, REFUSALS_TABLE_DDL, REFUSALS_INDEX, refusalInsert, refusalOf, markGuardRefusal, REFUSALS_REBUILD, refusalsAdmitGuards, assertIdempotencyKey, idempotencyLookupQuery, idempotencyPruneStatement, idempotencyRecordStatement, idempotencyOptedOutMessage, replayFor, globalFetch, createUlid, facetEvents, readHistory, walkEventCause, walkEventEffects, assertRedrainWindow, readInvocation, readDeadLetters, readLifecycleFlow, readOperationSeries, domainEventOf, readUndrainedOutbox, undrainedEventsOf, connectorCallRecord, noopConnectorCallRecorder, recordConnectorCall, settleConnectionUse, unknownRoleError, callReservedStoreOperation, callScopeStore, observeStoreCall, replayStoreErasures, scopeStoreLifecycleOf, scopeStoreRunnersOf, } from '@substrat-run/kernel';
4
+ import { accessLogEntry, adminLogEntry, delegatedReadParams, operationSeriesCount, opsFailureEntry, opsFailureFingerprint, issueEntry, FRESHNESS_HEARTBEAT_MINUTES, sweepRunEntry, modelUsageEntry, ATTACHMENT_ADDED, ATTACHMENT_REMOVED, attachmentRecord, createTenantInput, domainEvent, domainEventInput, exportReadInput, importBatch, importCursorMove, exportsOfManifestJson, assertNoBindingShapeBreak, importsOfManifestJson, connectionLandingsOfManifestJson, entitlementGrant, entitlementGrantInput, eventId, meterReading, platformRequestInput, platformRequestId, MAX_PENDING_PLATFORM_REQUESTS, identityLink, identityPool, instant, isSubstratError, connection, capabilityGrant, connectionGrant, connectionGrantRecord, connectionSecret, systemGrant, systemSwitch, systemSwitchRecord, peerSwitch, verticalCaller, verticalSlug as verticalSlugOf, subjectRef, requestFingerprint, createConnectionInput, connectLinkFilter, connectLinkKey, consumeConnectLinkInput, mintConnectLinkInput, projectedConnectionGrant, projectedConnectionKey, moduleManifest, createOrgInput, promotionAcknowledgement, bindAcknowledgement, bindHostnameInput, channelHistoryEntry, hostnameBinding, publishVersionInput, AUTO_ADMISSION_NOTE, routeTarget, ROUTE_SCOPE_HOSTNAMES_MAX, registerVerticalInput, vertical as verticalSchema, verticalChannel, verticalVersion, objectRef, entityObjectRef, assertModuleEmittableType, assertKernelAuthoredType, grantRefFromProof, org as orgSchema, orgMembership, principalId, resolvedIdentity, identityMembership, roleDefinition, scope as scopeSchema, tenant as tenantSchema, tenantRole, principalBecomeCapabilityInput, subjectShredReceipt, SCOPE_TABLE_PAGE_DEFAULT, SCOPE_TABLE_PAGE_MAX, SCOPE_QUERY_ROW_MAX, verticalServingState, callsOfManifestJson, outboundOfManifestJson, listLimitOf, pageOf, countedPageOf, SCOPE_GATE_REASONS, substratError, assertReplayableDump, delegatedReadRecord, ownerTransferAudit, memberChangeAudit, peerBindingAudit, connectionBindingAudit, copyMarkAudit, orphanSweepAudit, redrainEventsInput, REDRAIN_BATCH, errorCodeOf, } from '@substrat-run/contracts';
5
+ import { actorOf, asPrincipal, assertAllowed, assertNoSecret, assertPermissionKey, CAPABILITY_DDL, UPLOAD_LINK_DDL, createAttachmentVerbs, inspectUploadLink, redeemUploadLinkInTransaction, redeemOrReplayUploadLink, COPY_ORIGIN_DDL, ENTITY_STATE_MOVES_DDL, CAPABILITY_EXCHANGE_OPERATION, CAPABILITY_BECOME_MINT_OPERATION, becomeMintCheck, mintBecomeCapabilityAsPrincipal, revokeBecomeCapabilityAsPrincipal, readBecomeLinkStates, ENTITY_UNBIND_OPERATION, allowedFor, unbindEntityHolderBounded, capabilityAttachmentWriteRefused, capabilityTokenHash, createCapabilityVerbs, createEntityEdgeVerbs, createEntityStateVerbs, createTrashedReads, CONTINUATION_POSITION_CAP, visibleContinuation, searchStateWhere, uncheckedView, addStatePlans, addUpdatedStampPlans, watchUpdatedStamps, entityStateMigrations, assertNoCallerPurge, isUnreachableParent, heldPurgePass, purgeDueOf, purgeHeldBy, lifecycleRefusal, purgeOnlyKeysOf, purgeReportOf, purgeStillDue, refuseTrashedTarget, assertBoundOperations, checkHeldOperationsOf, countChecks, noteUncheckedCompletion, registerTrashTargets, runPurgePass, withheldKeysFor, statefulTablesOf, afterMigration, afterRuntimeDdl, derivesAnything, repairDerivedObjects, StateColumnLost, exchangeCapability as exchangeCapabilitySecret, guardSecrets, mintBecomeCapability, plausibleSessionToken, readCapabilityPage, redactSecrets, redactSecretText, moduleLog, consoleLogSink, asyncInvocationId, asyncLinePass, consoleInvocationLineSink, resolveCapabilitySession, revokeCapabilityAsPlatform, assertReadOnlyQuery, attachmentBlobKey, attachmentSha256, entitlementDenial, requiredEntitlementFor, foldMeterReading, guardSpine, guardSqlLimits, DO_SQL_LIMITS, tooManyResultColumns, tooManyTableColumns, parseValidationRecords, resolveScopeRecord, ulid, ISSUE_RETENTION_DAYS, telemetryRetentionStatements, FINDINGS_DDL, SCOPE_STORAGE_DDL, forgetScopeStorage, listScopeStorageAttemptRows, listScopeStorageRows, listScopeStoreStorageRows, pruneScopeStorageRows, recordScopeStorageRows, CONNECT_LINKS_DDL, consumeConnectLinkRow, insertConnectLink, listConnectLinks as listConnectLinkRows, readConnectLink, restoreConnectLinkRow, revokeConnectLinkRow, createFindingRule, findingOfOpsFailure, findingOfSweepRun, pruneFindings, listFindingRules, listFindings, observeFinding, revokeFindingRule, setFindingStatus, assertRowLimit, assertRowOffset, OPS_FAILURE_RETENTION_DAYS, SWEEP_RUN_RETENTION_DAYS, SWEEP_RUNS_INTENT_INDEX, sweepRunsIntentHasKind, MODEL_USAGE_RETENTION_DAYS, foldModelUsage, backoffAt, platformRequestHistoryQuery, platformRequestOf, PLATFORM_REQUEST_COLUMNS, PLATFORM_REQUEST_REDACTION_SQL, platformRequestRedactionParams, platformRequestRedactionQuery, intentPayloadCarriesSubject, redactSubjectJobRuns, eraseSubjectFromModules, moduleRowsErased, moduleErasurePlan, redactSubjectScopeText, redactSubjectDirectoryText, ISSUE_EXEMPLAR_OWNER_BACKFILL_SQL, issueExemplarOwner, JOB_RUN_PATCH_SQL, JOB_RUN_CLAIM_SQL, JOB_RUN_RENEW_SQL, JOB_RUN_BEGIN_SQL, JOB_RUN_MISS_SQL, JOB_RUN_MISS_SETTLE_SQL, admissionMissOutcome, JOB_STEP_RECORD_SQL, JOB_LEASE_EXPIRED_NOTE, assertLeaseMs, DELIVERY_ERROR_REDACTION_SQL, REDACTED_DELIVERY_NOTE, seatScopeTuple, applyScopeRoleChange, changeScopeRole, revokeScopeRoles, scopeRoleHolders, assertModuleDeclared, noteReservedKeys, reservedGrantRefusal, reservedRoleRefusal, reservedShapeRefusal, admitPeer, boundToPeerDeclarations, peerCallerAt, collectPeers, peerSeats, resolveVerticalInstanceFrom, resolvePeerInstanceFrom, peerVerticalSpellings, samePeerVertical, peerGrantsStatus, systemGrantsStatus, systemScheduleState, systemSwitchedOff, systemSwitchedOffMessage, tenantSystemSwitchedOffMessage, PEER_SWITCHES_DDL, PEER_BINDINGS_DDL, SWITCH_OWED_DDL, SWITCH_FENCES_DDL, TABLE_OWNERS_DDL, assertMigrationLeavesLedgerAlone, recordOwnershipSteps, runMigrationStatements, executableSqlStatements, blankSqlComments, recordWriteSuperseded, switchFencesOf, switchSupersededMessage, SWITCH_KINDS, SYSTEM_SWITCHES_DDL, forgetSwitchesOf, listSystemSwitchRecords, moveSwitch, reassertActionOf, reassertEntry, reassertOffRow, recordSwitchedOff, recordSwitchedOn, restoreSwitchRecord, scopesSwitchedOffFor, switchActionOf, switchAuditSubject, recordAuditOutcome, auditedCapabilityRevoke, auditWarningOf, switchNotFoundMessage, switchRecordsOf, switchedOffOf, switchesBackfillSqlOf, switchesTableExists, tenantHeldOf, tenantHoldsGrant, inUnitMovesToAudit, staleCarryRevertRow, staleCarryReverts, withRecorded, VERSION_MIGRATIONS_DDL, VERTICAL_SCOPE_STORES_DDL, forgetVerticalScopeStores, indexVersionScopeStores, driverDeclarationsOf, verticalScopeStoresOf, STORE_DRIVER_RELEASES_DDL, legacyStoreDriverConflict, legacyStoreDriverRenames, beginStoreDriverRolloutIn, finishStoreDriverRolloutIn, holdStoreDriverIn, advanceStoreDriverRebuildIn, claimStoreDriverRebuildIn, storeDriverRebuildIn, recordStoreDriverReleaseIn, releaseStoreDriverHoldIn, storeDriverReleaseIn, storeDriverStateIn, storeDriverRolloutPendingIn, storeDriverRolloutWalkedIn, splitManifestMigrations, splitVersionMigrationsBatch, versionMigrationsOf, deriveVersionMigrationDigest, publishedMigrationDigest, migrationChangeRefusal, writeVersionMigrations, denialListQuery, refusalListQuery, mapRefusalRow, denialSummaryQuery, denialTotalsQuery, DENIAL_WINDOW_QUERY, mapDenialRow, mapDenialSummaryBuckets, IMPERSONATION_COLUMNS, IMPERSONATION_DDL, ImpersonationRefused, assertImpersonationWrites, assertModuleEnqueueableKind, assertSessionUsable, impersonationByIdQuery, impersonationListQuery, impersonationRowValues, impersonationStampOf, mapImpersonationRow, newImpersonationSession, resolveRetryPolicy, executorOutcomeOf, isDeliveryRefusal, refusalJournalText, membershipFencesBackfillSql, MEMBERSHIP_FENCES_DDL, membershipFencesTableExists, MEMBERSHIP_FENCE_SINCE_SQL, RAISE_MEMBERSHIP_FENCE_SQL, memberAddedAudit, orgChangeBound, tenantCoverage, isSecretBoxConfigured, unconfiguredSecretBox, createSubjectKeys, generateSealingKeyPair, noSealingKeyMessage, openSealed, sealTo, ConnectionSealingKeyUnavailableError, PermissionDenied, createAtomic, NotSearchable, NotListable, listIndexMigrations, listIndexPlans, listQuery, cursorOf, moduleMigrations, MIGRATION_DIGEST_FENCE_DDL, MIGRATION_DIGEST_MARK_LEGACY, assertJournalDumpCoherent, assertMigrationSql, migrationDivergence, migrationFailedError, migrationSetDivergence, migrationSteps, planMigrations, isSearchIndexTable, searchIndexMigrations, searchIndexPlans, searchLimit, searchMatchExpression, searchQuery, ATTACHMENT_TEXT_DDL, ATTACHMENT_CONDEMNED_DDL, ATTACHMENT_SWEEP_LICENCE_DDL, ATTACHMENT_SWEEP_LICENCE_TABLE, clearOrphanSweepLicence, condemnLicensedOrphanAttachments, consumeOrphanSweepLicence, licensedOrphanIds, recordOrphanSweepLicence, refuseUnlicensedOrphanSweep, fenceAttachmentSweep, refuseCondemnedAttachment, refuseCondemnedInDump, rowlessAttachmentIds, sweepOrphanAttachments, missingAttachmentStore, SETTLED_COPY_STATES, unsettledCopyRefusal, assertAttachmentExtractors, resolveAttachmentTextBounds, assertJobRegistrable, attachmentRecordOfRow, attachmentTextJob, enqueueAttachmentText, ATTACHMENT_TEXT_BACKFILL_JOB, ATTACHMENT_TEXT_JOB, kernelJobFor, queueAttachmentTextBackfill, startAttachmentTextBackfill, attachmentTextBackfillJob, reconcileAttachmentText, recordAttachmentText, searchAttachments, entityVersionQuery, entityVersionOf, assertIfMatch, OUTBOX_ENTITY_INDEX, SCHEDULE_STATE_DDL, SCHEDULE_STATE_REBUILD, scheduleStateHasKind, VERTICAL_EVENTS_DDL, EXPORT_HOPS_SQL, emptyImportResult, IMPORT_CURSORS_SQL, IMPORT_CURSOR_OF_SQL, OUTBOX_MARK_SQL, emittedSinceQuery, emittedReportOf, EMITTED_REPORT_CAP, exportedSinceQuery, IMPORT_CURSOR_ADVANCE_SQL, IMPORT_RECORD_SQL, moveImportCursor, importCursorSourceOf, exportBreaksOf, exportBreakRefusal, assertPromoteReviewCurrent, promoteRaceRefusal, rebindRaceRefusal, SERVES_NOW_CONDITION, SERVES_NOW_PREDICATE, servesNowParams, bindExportBreaksOf, bindExportBreakRefusal, scopeMoveOf, runningVersionOf, isPrimaryScope, PROVISIONED_VERSIONS_SQL, installsReconciledOf, strandJudgmentsOf, provisionedVersionsParams, boundShapesColumn, boundShapesOfColumn, installReconciled, CrossVerticalRegistry, exportReadPlan, exportReadQuery, planExportBatch, withheldNote, JOB_RUN_DDL, JOB_RUN_DUE_AT, jobRunListLimit, jobRunOf, runDueJobRuns, startJobRun, IDEMPOTENCY_DDL, REFUSALS_TABLE_DDL, REFUSALS_INDEX, refusalInsert, refusalOf, markGuardRefusal, REFUSALS_REBUILD, refusalsAdmitGuards, assertIdempotencyKey, idempotencyLookupQuery, idempotencyPruneStatement, idempotencyRecordStatement, idempotencyOptedOutMessage, replayFor, globalFetch, createUlid, facetEvents, readHistory, walkEventCause, walkEventEffects, assertRedrainWindow, readInvocation, readDeadLetters, readLifecycleFlow, readOperationSeries, domainEventOf, readUndrainedOutbox, undrainedEventsOf, connectorCallRecord, noopConnectorCallRecorder, recordConnectorCall, settleConnectionUse, unknownRoleError, callReservedStoreOperation, callScopeStore, observeStoreCall, replayStoreErasures, scopeStoreLifecycleOf, scopeStoreRunnersOf, } from '@substrat-run/kernel';
6
6
  import { attributedView, delegatedRevokeSql, writeExplicitTupleIn, grantEntityShapeIn, shapeTopUpBatch, topUpEntityGrantShapes, settlePlatformRequestIn, } from '@substrat-run/kernel';
7
7
  import { ADMIN_LOG_INDEXES_SQL, SETTLE_INTENT_SQL, SETTLE_OUTCOME_SQL, settleOutcomeParamsOf, readAuditedOperations, unknownOutcomeOf, } from '@substrat-run/kernel';
8
8
  import { INERT_SCOPE_REASON, isPrimaryScopeRow, normalizeUploadMediaType } from '@substrat-run/kernel';
@@ -629,6 +629,10 @@ export class SqliteScopeHost {
629
629
  tenantStoreDbs = new Map();
630
630
  operations = new Map();
631
631
  modules = new Map();
632
+ /** #2430: what a registered module declares `holder: 'system'` — the role doors' refusal reads it. */
633
+ reservedKeys = new Set();
634
+ /** #2430: the declared permission surface `registerModule` holds each module to, when given. */
635
+ permissions;
632
636
  /** #1705: what this deployment exports to other verticals and imports from them. */
633
637
  crossVertical = new CrossVerticalRegistry();
634
638
  /** operation name → guards declared before it, in registration order (K-17). */
@@ -742,6 +746,10 @@ export class SqliteScopeHost {
742
746
  this.clock = options.clock ?? (() => instant.parse(new Date().toISOString()));
743
747
  this.versionId = options.versionId ?? null;
744
748
  this.migrationsDigest = options.migrationsDigest;
749
+ this.permissions = options.permissions;
750
+ // #2430: what the declared surface reserves holds here too, whatever is registered under its ids.
751
+ for (const m of options.permissions?.modules ?? [])
752
+ noteReservedKeys(this.reservedKeys, m.manifest);
745
753
  this.scopeStoreVertical = options.scopeStores?.vertical;
746
754
  this.scopeStoreRunners = scopeStoreRunnersOf(options.scopeStores);
747
755
  this.scopeStoreLifecycle = scopeStoreLifecycleOf(this.scopeStoreRunners);
@@ -1626,6 +1634,7 @@ export class SqliteScopeHost {
1626
1634
  if (this.modules.has(manifest.id)) {
1627
1635
  throw new Error(`module already registered: ${manifest.id}`);
1628
1636
  }
1637
+ assertModuleDeclared(this.permissions, manifest.id); // #2430
1629
1638
  // #1835: the operations are the binder's own value, or the maps beside the handlers are a
1630
1639
  // copy nothing bound to them.
1631
1640
  assertBoundOperations(manifest.id, registration.operations);
@@ -1733,6 +1742,7 @@ export class SqliteScopeHost {
1733
1742
  peers: manifest.peers ?? [],
1734
1743
  purgeOnlyKeys: purgeOnlyKeysOf(manifest.schedules ?? []),
1735
1744
  });
1745
+ noteReservedKeys(this.reservedKeys, manifest);
1736
1746
  if (erasure)
1737
1747
  this.erasurePlans.push(erasure);
1738
1748
  for (const rel of manifest.entityRelations ?? []) {
@@ -3430,6 +3440,13 @@ export class SqliteScopeHost {
3430
3440
  throw substratError('not_found', `unknown version ${versionId} for vertical '${slug}'`);
3431
3441
  return importsOfManifestJson(manifest);
3432
3442
  }
3443
+ /** #2316: what one version of `slug` declares about connection landings; `not_found` for a version it does not know. */
3444
+ async versionConnectionLandings(slug, versionId) {
3445
+ const manifest = this.manifestJsonOf(versionId, slug);
3446
+ if (manifest === undefined)
3447
+ throw substratError('not_found', `unknown version ${versionId} for vertical '${slug}'`);
3448
+ return connectionLandingsOfManifestJson(manifest);
3449
+ }
3433
3450
  /** #1705 PR 3: the promote gate's question, over two stored versions (`exportBreaksOf`). */
3434
3451
  exportBreaksBetween(actor, producer, outgoingId, incomingId) {
3435
3452
  return exportBreaksOf({
@@ -3621,13 +3638,19 @@ export class SqliteScopeHost {
3621
3638
  async canAssign(tenantId, scopeId, principal, roleKey) {
3622
3639
  const rt = await this.openActiveScope(tenantId, scopeId);
3623
3640
  const subject = asPrincipal(principalId.parse(principal));
3624
- return rt.actor.enqueue(() => this.assignmentBound(subject, tenantId, scopeId, roleKey));
3641
+ return rt.actor.enqueue(() => {
3642
+ // #2430: the answer a person's door would give — a role carrying a reserved key is refused.
3643
+ this.refuseReservedRole(tenantId, roleKey, 'person');
3644
+ return this.assignmentBound(subject, tenantId, scopeId, roleKey);
3645
+ });
3625
3646
  }
3626
3647
  async assignScopeRoleBounded(tenantId, scopeId, caller, assignee, roleKey) {
3627
3648
  const rt = await this.openActiveScope(tenantId, scopeId);
3628
3649
  const subject = asPrincipal(principalId.parse(caller));
3629
3650
  const target = principalId.parse(assignee);
3630
3651
  return rt.actor.turn(async () => {
3652
+ // #2430: read in the same serialized task as the bound and the grant.
3653
+ this.refuseReservedRole(tenantId, roleKey, 'person');
3631
3654
  const bound = await this.assignmentBound(subject, tenantId, scopeId, roleKey);
3632
3655
  if (bound.covered)
3633
3656
  applyScopeRoleChange(switchSqlOf(rt.db), scopeId, target, { revoke: [], grant: roleKey }, this.clock());
@@ -3642,7 +3665,12 @@ export class SqliteScopeHost {
3642
3665
  async changeScopeRoleBounded(tenantId, scopeId, caller, principal, from, to) {
3643
3666
  const rt = await this.openActiveScope(tenantId, scopeId);
3644
3667
  const target = principalId.parse(principal);
3645
- const answer = await rt.actor.turn(() => changeScopeRole(switchSqlOf(rt.db), scopeId, target, from, to, this.clock(), this.roleBound(caller, tenantId, scopeId), (run) => rt.db.transaction(run)()));
3668
+ const answer = await rt.actor.turn(() => {
3669
+ // #2430: the role moved TO is conferred by a person; the one moved from is only taken back.
3670
+ // Read in the same serialized task as the bound and the write.
3671
+ this.refuseReservedRole(tenantId, to, 'person');
3672
+ return changeScopeRole(switchSqlOf(rt.db), scopeId, target, from, to, this.clock(), this.roleBound(caller, tenantId, scopeId), (run) => rt.db.transaction(run)());
3673
+ });
3646
3674
  if (answer === 'not-held')
3647
3675
  throw substratError('conflict', `${target} does not hold '${from}' at this scope`);
3648
3676
  if (answer === 'unknown-to')
@@ -3745,6 +3773,23 @@ export class SqliteScopeHost {
3745
3773
  const checker = this.checker;
3746
3774
  return checker.holdings ? (principal) => checker.holdings(asPrincipal(principal), { tenantId, scopeId }) : undefined;
3747
3775
  }
3776
+ /**
3777
+ * #2430: refuse conferring `roleKey` through `door` when the tenant's role carries a key a module
3778
+ * registered here reserves (`reservedRoleRefusal`). A role the tenant does not define is left to
3779
+ * the door's own answer for it.
3780
+ */
3781
+ refuseReservedRole(tenantId, roleKey, door) {
3782
+ const role = this.roles.get(`${tenantId}/${roleKey}`);
3783
+ const refusal = role ? reservedRoleRefusal(role, this.reservedKeys, door) : null;
3784
+ if (refusal)
3785
+ throw substratError('forbidden', refusal);
3786
+ }
3787
+ /** #2430: refuse a raw grant of a key a module registered here reserves (`reservedGrantRefusal`). */
3788
+ refuseReservedGrant(permissions) {
3789
+ const refusal = reservedGrantRefusal(permissions, this.reservedKeys);
3790
+ if (refusal)
3791
+ throw substratError('forbidden', refusal);
3792
+ }
3748
3793
  /** The caller's bound per role at the scope, `null` for a role this tenant does not define (#1150). */
3749
3794
  roleBound(caller, tenantId, scopeId) {
3750
3795
  const subject = asPrincipal(principalId.parse(caller));
@@ -3969,8 +4014,8 @@ export class SqliteScopeHost {
3969
4014
  if (schedule.purge) {
3970
4015
  // #119: a purge horizon's schedule runs its operation once per due entity, never once.
3971
4016
  // #2192: under the run's own id, so the purges and their deliveries join this run's line.
3972
- // #2431: what the purges enqueue is not counted (`ScheduleRunReport.platformRequests`).
3973
- const pass = await this.runPurgeSweep(moduleId, tenantId, scopeId, schedule.operation, invocationId);
4017
+ // #2431: each purge is an invoke, and reports what it enqueued through `counted` like any other.
4018
+ const pass = await this.runPurgeSweep(moduleId, tenantId, scopeId, schedule.operation, invocationId, counted);
3974
4019
  stillDue = purgeStillDue(pass);
3975
4020
  const outcome = purgeReportOf(schedule.operation, schedule.purge.entityType, pass);
3976
4021
  report.errors.push(...outcome.errors);
@@ -4045,7 +4090,9 @@ export class SqliteScopeHost {
4045
4090
  */
4046
4091
  async runPurgeSweep(moduleId, tenantId, scopeId, operation,
4047
4092
  /** #2192: the schedule run this pass belongs to; every purge in it runs under that id. */
4048
- runInvocationId) {
4093
+ runInvocationId,
4094
+ /** #2431: how each purge reports the platform requests it enqueued. */
4095
+ counted) {
4049
4096
  const entityType = this.modules
4050
4097
  .get(moduleId)
4051
4098
  ?.schedules.find((s) => s.operation === operation && s.purge)?.purge?.entityType;
@@ -4070,7 +4117,7 @@ export class SqliteScopeHost {
4070
4117
  });
4071
4118
  if ('held' in due)
4072
4119
  return heldPurgePass(due.held);
4073
- const stub = await this.openSystemScope(moduleId, tenantId, scopeId, true);
4120
+ const stub = await this.openSystemScope(moduleId, tenantId, scopeId, true, counted);
4074
4121
  return runPurgePass(operation, due, async (entityId) => {
4075
4122
  await stub.invoke(operation, { [due.idFrom]: entityId }, { invocationId: runInvocationId });
4076
4123
  }, (write) => rt.actor.turn(() => write(spineSql(rt.db))));
@@ -6238,6 +6285,8 @@ export class SqliteScopeHost {
6238
6285
  }));
6239
6286
  },
6240
6287
  assignRole: async (actor, assignment) => {
6288
+ // #2430: the platform's door — a role mixing reserved and other keys is refused (K-55).
6289
+ this.refuseReservedRole(assignment.node.tenantId, assignment.roleKey, 'platform');
6241
6290
  const subject = `principal:${assignment.principalId}`;
6242
6291
  if (assignment.node.scopeId) {
6243
6292
  const scopeNode = assignment.node.scopeId;
@@ -6274,12 +6323,14 @@ export class SqliteScopeHost {
6274
6323
  // trust: the parse is where an `expiresAt` carrying a UTC offset is normalised
6275
6324
  // to Z text (#963), and liveness here is a lexicographic `expires_at > ?`.
6276
6325
  const grant = capabilityGrant.parse(raw);
6326
+ this.refuseReservedGrant([grant.permission]); // #2430
6277
6327
  await onNode(grant.node, () => writeGrant(`principal:${grant.principalId}`, grant.permission, grant.node, grant.entity, grant.expiresAt));
6278
6328
  this.recordAdmin(actor, 'grant', { tenantId: grant.node.tenantId, scopeId: grant.node.scopeId }, null, grant);
6279
6329
  },
6280
6330
  grantEntityShape: async (actor, grant) => {
6281
6331
  const { tenantId, scopeId } = grant.node;
6282
6332
  this.assertScope(tenantId, scopeId);
6333
+ this.refuseReservedGrant(grant.permissions); // #2430
6283
6334
  const rt = this.runtime(tenantId, scopeId);
6284
6335
  // One unit on the scope actor (#1678): the marker and its keys land together or not at all.
6285
6336
  await rt.actor.turn(() => rt.db.transaction(() => grantEntityShapeIn(switchSqlOf(rt.db), grant.principalId, grant.entity, grant.permissions))());
@@ -6289,6 +6340,10 @@ export class SqliteScopeHost {
6289
6340
  const limit = shapeTopUpBatch(opts?.batch);
6290
6341
  const { tenantId, scopeId } = node;
6291
6342
  this.assertScope(tenantId, scopeId);
6343
+ // #2430: before any pass, so a refused registry tops nobody up and records no binding.
6344
+ const reserved = reservedShapeRefusal(shapes, this.reservedKeys);
6345
+ if (reserved)
6346
+ throw substratError('forbidden', reserved);
6292
6347
  const rt = this.runtime(tenantId, scopeId);
6293
6348
  let toppedUp = 0;
6294
6349
  let retired = 0;
@@ -6346,6 +6401,10 @@ export class SqliteScopeHost {
6346
6401
  }
6347
6402
  return conn;
6348
6403
  };
6404
+ // #2430: a connection acts for the external provider holding its token, so it is never
6405
+ // given a key reserved to a system principal — refused before the tuple and the directory
6406
+ // row, so a refused grant is gathered by no later provision. A grant recorded before stays.
6407
+ this.refuseReservedGrant([grant.permission]);
6349
6408
  // Once BEFORE the turn, so a refused grant never opens (and so creates) the scope's
6350
6409
  // file; then again inside it, with the tuple and the directory row, in ONE body on
6351
6410
  // the scope actor (#1678) — so the tuple cannot roll back with a stranger's
@@ -6498,6 +6557,7 @@ export class SqliteScopeHost {
6498
6557
  // Checked once before the turn, so a refusal opens no scope file; then again with
6499
6558
  // the write in one body, on the scope actor when the node is a scope (#1678).
6500
6559
  requireOrg(node.tenantId, orgId);
6560
+ this.refuseReservedGrant([permission]); // #2430: an org's members are people
6501
6561
  await onNode(node, () => {
6502
6562
  requireOrg(node.tenantId, orgId);
6503
6563
  writeGrant(`org:${orgId}`, permission, node, entity);
@@ -7827,6 +7887,10 @@ export class SqliteScopeHost {
7827
7887
  const role = directoryReader.getRole(tenantId, roleKey);
7828
7888
  if (!role)
7829
7889
  return { applied: false, unknownRole: roleKey };
7890
+ // #2430: an add is a person conferring a role on a person (a removal only takes one back).
7891
+ const reserved = change.op === 'add' ? reservedRoleRefusal(role, this.reservedKeys, 'person') : null;
7892
+ if (reserved)
7893
+ return { applied: false, reserved };
7830
7894
  const bound = tenantCoverage(directoryReader, tenantId, boundedBy, role.permissions);
7831
7895
  if (!bound.covered)
7832
7896
  return { applied: false, missing: bound.missing };
@@ -10172,7 +10236,11 @@ export class SqliteScopeHost {
10172
10236
  return decision;
10173
10237
  }
10174
10238
  : decideCheck;
10175
- const runCanAssign = (roleKey) => this.assignmentBound(subject, rt.tenantId, rt.scopeId, roleKey);
10239
+ // #2430: the answer a person's door would give — a role carrying a reserved key is refused.
10240
+ const runCanAssign = async (roleKey) => {
10241
+ this.refuseReservedRole(rt.tenantId, roleKey, 'person');
10242
+ return this.assignmentBound(subject, rt.tenantId, rt.scopeId, roleKey);
10243
+ };
10176
10244
  // ctx.emit's writer, and the kernel's own events' (#1864): one path to the outbox, with the
10177
10245
  // reserved-type refusal applied to module code only. Never handed to module code as-is.
10178
10246
  const writeEvent = (event, author) => {
@@ -10377,6 +10445,8 @@ export class SqliteScopeHost {
10377
10445
  grant: async (principal, permission, entity) => {
10378
10446
  assertImpersonationWrites(impersonation, 'ctx.grant');
10379
10447
  entityObjectRef(entity, 'ctx.grant'); // #1856: a tuple the walk can read back
10448
+ // #2430: whoever the caller is — a system actor passes guardrail 2 by construction.
10449
+ this.refuseReservedGrant([permission]);
10380
10450
  const held = await runCheck(permission, entity);
10381
10451
  if (!held.allowed) {
10382
10452
  throw new PermissionDenied(`cannot grant '${permission}' on ${entity.entityType}:${entity.entityId} — ` +