@substrat-run/adapter-sqlite 0.147.0 → 0.148.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 +11 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +162 -25
- package/dist/index.js.map +1 -1
- package/dist/scope-store-runners.d.ts +15 -0
- package/dist/scope-store-runners.d.ts.map +1 -0
- package/dist/scope-store-runners.js +24 -0
- package/dist/scope-store-runners.js.map +1 -0
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
import { 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';
|
|
1
|
+
import { type AttachmentRecord, 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
2
|
import { type ModuleLogSink, type InvocationLineSink, type FreshnessReport, type FreshnessRegistration, type BlobStoreProvisionInput, type ScopeAttachments, 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 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
|
+
import { type UploadLinkRedeemInput } from '@substrat-run/kernel';
|
|
5
|
+
export { scopeStoreRunnersFor } from './scope-store-runners.js';
|
|
4
6
|
/**
|
|
5
7
|
* A fault in the database itself (full, corrupt, I/O), as opposed to one statement failing.
|
|
6
8
|
* The #1764 backfill logs and opens past a failed batch, but never past one of these.
|
|
@@ -180,6 +182,8 @@ export declare class SqliteScopeHost implements ScopeHost {
|
|
|
180
182
|
private readonly erasurePlans;
|
|
181
183
|
/** entityType → the declared attachment gate (#473): read key + write key (default: read). */
|
|
182
184
|
private readonly attachmentTargets;
|
|
185
|
+
/** entityType → the `uploadLinks` policy its `attachmentTargets` entry declares; absent = no links. */
|
|
186
|
+
private readonly uploadLinkPolicies;
|
|
183
187
|
/** operation name → who binds it: the owning module, its entitlementKey and its declared
|
|
184
188
|
* schedules — the §4.3 gate's input, resolved per invoke by `requiredEntitlementFor` (#1654). */
|
|
185
189
|
private readonly operationEntitlement;
|
|
@@ -345,6 +349,10 @@ export declare class SqliteScopeHost implements ScopeHost {
|
|
|
345
349
|
* ATTACHMENTS (the convention the deploy vocabulary documents). */
|
|
346
350
|
private attachmentStore;
|
|
347
351
|
attachments(principal: PrincipalId, tenantId: TenantId, scopeId: ScopeId): Promise<ScopeAttachments>;
|
|
352
|
+
/** The declared write key and link policy of an attachment target — what `ctx.attachments` mints against. */
|
|
353
|
+
private uploadTargetOf;
|
|
354
|
+
inspectUploadLink(tenantId: TenantId, scopeId: ScopeId, secret: string): Promise<UploadLinkView>;
|
|
355
|
+
redeemUploadLink(tenantId: TenantId, scopeId: ScopeId, secret: string, input: UploadLinkRedeemInput): Promise<AttachmentRecord>;
|
|
348
356
|
getSystemAttachments(moduleId: ModuleId, tenantId: TenantId, scopeId: ScopeId): Promise<Pick<ScopeAttachments, 'open'>>;
|
|
349
357
|
/**
|
|
350
358
|
* The attachment surface (#473) — `attachmentTargets` consumed at last. Metadata facts
|
|
@@ -383,6 +391,8 @@ export declare class SqliteScopeHost implements ScopeHost {
|
|
|
383
391
|
private readScopeStoreSizes;
|
|
384
392
|
/** The vertical whose stores this scope has on this host, or nothing when it has none. */
|
|
385
393
|
private storeVerticalOf;
|
|
394
|
+
/** The erasure claim (`SUBJECT_ERASURE_CLAIM_SQL`); a scope that moved refuses with the key kept. */
|
|
395
|
+
private claimSubjectErasure;
|
|
386
396
|
/**
|
|
387
397
|
* `substrat.erase` on each declared binding. A store error throws, so the caller
|
|
388
398
|
* can leave the subject key untouched. Fail closed (#2242): an empty answer means
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAmBL,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,EA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B;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,CAAC,iBAAiB;IAIzB;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,iBAAiB;IA0BzB;;;;;;;OAOG;IACH,OAAO,CAAC,4BAA4B;IA4BpC;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,yBAAyB;IAWjC,OAAO,CAAC,sBAAsB;IA+I9B,OAAO,CAAC,SAAS;IAejB;;;;OAIG;IACH,qGAAqG;IACrG,OAAO,CAAC,eAAe;IASvB,OAAO,CAAC,gBAAgB;IA+iBxB,oGAAoG;IACpG,OAAO,CAAC,YAAY;IAIpB;;;;;;OAMG;YACW,aAAa;YAqBb,sBAAsB;IAoFpC;;;;;;;;;OASG;IACH,OAAO,CAAC,oBAAoB;IAyB5B;;;;;OAKG;IACH;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,oBAAoB;IAU5B;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,oBAAoB;IAa5B,OAAO,CAAC,UAAU;IAKlB;;;;;;;;;;;;;;;OAeG;IACH,OAAO,CAAC,cAAc;IAKtB;;;;;OAKG;IACH,OAAO,CAAC,MAAM;IAuBd;;;OAGG;IACH,OAAO,CAAC,YAAY;IAUpB;;;;;;;OAOG;IACH,OAAO,CAAC,kBAAkB;IA2G1B,OAAO,CAAC,OAAO;CAsChB"}
|
package/dist/index.js
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
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, copyMarkAudit, redrainEventsInput, REDRAIN_BATCH, } from '@substrat-run/contracts';
|
|
5
|
-
import { actorOf, asPrincipal, assertAllowed, assertNoSecret, assertPermissionKey, CAPABILITY_DDL, 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, 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, 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, splitManifestMigrations, splitVersionMigrationsBatch, versionMigrationsOf, 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, migrationSteps, planMigrations, isSearchIndexTable, searchIndexMigrations, searchIndexPlans, searchLimit, searchMatchExpression, searchQuery, ATTACHMENT_TEXT_DDL, 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, 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, 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, redrainEventsInput, REDRAIN_BATCH, } from '@substrat-run/contracts';
|
|
5
|
+
import { actorOf, asPrincipal, assertAllowed, assertNoSecret, assertPermissionKey, CAPABILITY_DDL, UPLOAD_LINK_DDL, createAttachmentVerbs, inspectUploadLink, redeemUploadLinkInTransaction, 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, 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, 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, kindDeclarationsOf, verticalScopeStoresOf, STORE_KIND_RELEASES_DDL, beginStoreKindRolloutIn, finishStoreKindRolloutIn, holdStoreKindIn, recordStoreKindReleaseIn, releaseStoreKindHoldIn, storeKindReleaseIn, storeKindStateIn, splitManifestMigrations, splitVersionMigrationsBatch, versionMigrationsOf, 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, migrationSteps, planMigrations, isSearchIndexTable, searchIndexMigrations, searchIndexPlans, searchLimit, searchMatchExpression, searchQuery, ATTACHMENT_TEXT_DDL, 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, 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
|
-
import { INERT_SCOPE_REASON, isPrimaryScopeRow } from '@substrat-run/kernel';
|
|
9
|
-
import { COPY_BACKFILL_SCOPE_SQL, COPY_BACKFILL_SQL, COPY_BACKFILL_SUPERSEDE_SQL, COPY_CLAIM_SQL, COPY_EXPIRED_SQL, copyBackfillParams, copyBackfillRefusal, COPY_MOVE_CONFIRM_SQL, COPY_MOVE_LIVE_PREDICATE, SCOPE_COPY_LEASE_MS, SCOPE_SCRIPT_COPY_COLUMNS, copyMoveConfirmParams, copyMoveLiveParams, scopeScriptCopyOf, } from '@substrat-run/kernel';
|
|
8
|
+
import { INERT_SCOPE_REASON, isPrimaryScopeRow, UPLOAD_LINK_WRONG_TARGET } from '@substrat-run/kernel';
|
|
9
|
+
import { COPY_BACKFILL_SCOPE_SQL, COPY_BACKFILL_SQL, COPY_BACKFILL_SUPERSEDE_SQL, COPY_CLAIM_SQL, COPY_EXPIRED_SQL, copyBackfillParams, copyBackfillRefusal, SUBJECT_ERASURE_CLAIM_SQL, subjectErasureClaimParams, COPY_MOVE_CONFIRM_SQL, COPY_MOVE_LIVE_PREDICATE, SCOPE_COPY_LEASE_MS, SCOPE_SCRIPT_COPY_COLUMNS, copyMoveConfirmParams, copyMoveLiveParams, scopeScriptCopyOf, } from '@substrat-run/kernel';
|
|
10
10
|
import { GRANT_CHILDREN_INDEX_DDL, SHAPE_MARKER_INDEX_DDL, grantedEntitiesForContext } from '@substrat-run/kernel';
|
|
11
11
|
import { LEGACY_SCOPE_ROWS_BACKFILL, assertSpineTablesBuilt, capabilitiesForLoad, dumpRowsInsert, isSpineTable, loadDirectoryDump, repointScopeGrants, settleCopiedWork, emittedHere, spineColumnAdditions } from '@substrat-run/kernel';
|
|
12
12
|
import { ScopeActor } from './actor.js';
|
|
13
13
|
import { createTupleChecker, directoryTenantReader } from './checker.js';
|
|
14
|
+
export { scopeStoreRunnersFor } from './scope-store-runners.js';
|
|
14
15
|
/**
|
|
15
16
|
* A fault in the database itself (full, corrupt, I/O), as opposed to one statement failing.
|
|
16
17
|
* The #1764 backfill logs and opens past a failed batch, but never past one of these.
|
|
@@ -213,6 +214,9 @@ const KERNEL_DDL = `
|
|
|
213
214
|
-- an exchange trades that secret for. Spine (kernel-written), shared with the DO adapter
|
|
214
215
|
-- from @substrat-run/kernel so the two cannot part company; the column comments are there.
|
|
215
216
|
${CAPABILITY_DDL}
|
|
217
|
+
-- Upload links: a short-lived, single-use URL that lets a caller with no session upload ONE
|
|
218
|
+
-- file to ONE entity. Spine (kernel-written), shared with the DO adapter from the kernel.
|
|
219
|
+
${UPLOAD_LINK_DDL}
|
|
216
220
|
-- #1686: where a copied scope's data came from, and the event id its own events start above.
|
|
217
221
|
-- Shared with the other adapter from @substrat-run/kernel; the column comments are there.
|
|
218
222
|
${COPY_ORIGIN_DDL}
|
|
@@ -637,6 +641,8 @@ export class SqliteScopeHost {
|
|
|
637
641
|
erasurePlans = [];
|
|
638
642
|
/** entityType → the declared attachment gate (#473): read key + write key (default: read). */
|
|
639
643
|
attachmentTargets = new Map();
|
|
644
|
+
/** entityType → the `uploadLinks` policy its `attachmentTargets` entry declares; absent = no links. */
|
|
645
|
+
uploadLinkPolicies = new Map();
|
|
640
646
|
/** operation name → who binds it: the owning module, its entitlementKey and its declared
|
|
641
647
|
* schedules — the §4.3 gate's input, resolved per invoke by `requiredEntitlementFor` (#1654). */
|
|
642
648
|
operationEntitlement = new Map();
|
|
@@ -936,6 +942,8 @@ export class SqliteScopeHost {
|
|
|
936
942
|
created_at TEXT NOT NULL,
|
|
937
943
|
PRIMARY KEY (tenant_id, vertical, binding)
|
|
938
944
|
);
|
|
945
|
+
-- A store kind's stored releases, rollouts and holds (D-63, #2300).
|
|
946
|
+
${STORE_KIND_RELEASES_DDL}
|
|
939
947
|
-- The vertical + version registry (#31). A scope binds to a VERSION, so
|
|
940
948
|
-- dev/staging/prod are the same vertical pinned differently, and a preview
|
|
941
949
|
-- deployment is a version nothing has been promoted to yet.
|
|
@@ -1006,6 +1014,7 @@ export class SqliteScopeHost {
|
|
|
1006
1014
|
UNIQUE (vertical_slug, version)
|
|
1007
1015
|
);
|
|
1008
1016
|
${VERSION_MIGRATIONS_DDL}
|
|
1017
|
+
${VERTICAL_SCOPE_STORES_DDL}
|
|
1009
1018
|
-- Channels (#31 step 2): a named pointer per vertical. Promotion moves it,
|
|
1010
1019
|
-- and promotion is where the migration and permission diffs fire — the
|
|
1011
1020
|
-- moment a change reaches anyone, rather than the moment it was typed.
|
|
@@ -1707,6 +1716,13 @@ export class SqliteScopeHost {
|
|
|
1707
1716
|
`(${existing.read}/${existing.write}) vs (${gate.read}/${gate.write})`);
|
|
1708
1717
|
}
|
|
1709
1718
|
this.attachmentTargets.set(target.entityType, gate);
|
|
1719
|
+
if (target.uploadLinks) {
|
|
1720
|
+
const known = this.uploadLinkPolicies.get(target.entityType);
|
|
1721
|
+
if (known && JSON.stringify(known) !== JSON.stringify(target.uploadLinks)) {
|
|
1722
|
+
throw new Error(`conflicting uploadLinks policies for attachment target '${target.entityType}'`);
|
|
1723
|
+
}
|
|
1724
|
+
this.uploadLinkPolicies.set(target.entityType, target.uploadLinks);
|
|
1725
|
+
}
|
|
1710
1726
|
}
|
|
1711
1727
|
// WITHDRAWAL (K-17): suppress another module's default binding. Order
|
|
1712
1728
|
// independent — a manifest may withdraw an operation whose module has not
|
|
@@ -2124,6 +2140,40 @@ export class SqliteScopeHost {
|
|
|
2124
2140
|
const store = this.attachmentStore(tenantId, scopeRow?.vertical ?? null);
|
|
2125
2141
|
return this.buildAttachments(rt, asPrincipal(principal), store);
|
|
2126
2142
|
}
|
|
2143
|
+
/** The declared write key and link policy of an attachment target — what `ctx.attachments` mints against. */
|
|
2144
|
+
uploadTargetOf(entityType) {
|
|
2145
|
+
const gate = this.attachmentTargets.get(entityType);
|
|
2146
|
+
if (!gate)
|
|
2147
|
+
return undefined;
|
|
2148
|
+
const uploadLinks = this.uploadLinkPolicies.get(entityType);
|
|
2149
|
+
return uploadLinks ? { write: gate.write, uploadLinks } : { write: gate.write };
|
|
2150
|
+
}
|
|
2151
|
+
async inspectUploadLink(tenantId, scopeId, secret) {
|
|
2152
|
+
const rt = await this.openActiveScope(tenantId, scopeId);
|
|
2153
|
+
return rt.actor.enqueue(async () => (await inspectUploadLink({ sql: spineSql(rt.db), now: this.clock() }, secret)).view);
|
|
2154
|
+
}
|
|
2155
|
+
async redeemUploadLink(tenantId, scopeId, secret, input) {
|
|
2156
|
+
const rt = await this.openActiveScope(tenantId, scopeId);
|
|
2157
|
+
const { view, mintedBy } = await rt.actor.enqueue(() => inspectUploadLink({ sql: spineSql(rt.db), now: this.clock() }, secret));
|
|
2158
|
+
if (view.entity.entityType !== input.entity.entityType || view.entity.entityId !== input.entity.entityId) {
|
|
2159
|
+
throw substratError('not_found', 'This upload link is not valid for that target.', {
|
|
2160
|
+
reason: UPLOAD_LINK_WRONG_TARGET,
|
|
2161
|
+
});
|
|
2162
|
+
}
|
|
2163
|
+
// The write is made AS the minter: the same gates `attachments()` puts in front of a person.
|
|
2164
|
+
await this.getScope(mintedBy, tenantId, scopeId);
|
|
2165
|
+
const scopeRow = this.directory
|
|
2166
|
+
.prepare('SELECT vertical FROM scopes WHERE scope_id = ?')
|
|
2167
|
+
.get(scopeId);
|
|
2168
|
+
const files = this.buildAttachments(rt, asPrincipal(mintedBy), this.attachmentStore(tenantId, scopeRow?.vertical ?? null), { uploadLinkSecret: secret });
|
|
2169
|
+
return files.upload({
|
|
2170
|
+
entity: view.entity,
|
|
2171
|
+
filename: view.filename ?? input.filename,
|
|
2172
|
+
contentType: input.contentType,
|
|
2173
|
+
visibility: view.visibility,
|
|
2174
|
+
body: input.body,
|
|
2175
|
+
});
|
|
2176
|
+
}
|
|
2127
2177
|
async getSystemAttachments(moduleId, tenantId, scopeId) {
|
|
2128
2178
|
// The same registered-module and lifecycle gate as a system invoke. The
|
|
2129
2179
|
// attachment surface checks the target's read key as system:<moduleId>.
|
|
@@ -2188,8 +2238,17 @@ export class SqliteScopeHost {
|
|
|
2188
2238
|
}
|
|
2189
2239
|
// #1525: null, for the reason the denial two lines up records null — this task
|
|
2190
2240
|
// is the attachment RPC's own and no invoke set an id on the runtime.
|
|
2191
|
-
|
|
2192
|
-
|
|
2241
|
+
// The write has COMMITTED, so a failed drain must not reach the caller as a refusal:
|
|
2242
|
+
// `upload` deletes the bytes on a refusal, which would leave this row without them
|
|
2243
|
+
// (and a redeemed link spent) (#2311). An undelivered event has no delivery row, so
|
|
2244
|
+
// the next drain in this scope delivers it.
|
|
2245
|
+
try {
|
|
2246
|
+
await this.dispatch(rt, null);
|
|
2247
|
+
await this.dispatchExecutors(rt, null);
|
|
2248
|
+
}
|
|
2249
|
+
catch (err) {
|
|
2250
|
+
console.error('substrat: consumer drain failed after an attachment committed', err);
|
|
2251
|
+
}
|
|
2193
2252
|
return result;
|
|
2194
2253
|
});
|
|
2195
2254
|
/**
|
|
@@ -2248,9 +2307,9 @@ export class SqliteScopeHost {
|
|
|
2248
2307
|
createdBy: creator.id,
|
|
2249
2308
|
createdAt: new Date().toISOString(),
|
|
2250
2309
|
});
|
|
2251
|
-
// Bytes first, row second: a crash between the two leaves an orphaned object
|
|
2252
|
-
//
|
|
2253
|
-
//
|
|
2310
|
+
// Bytes first, row second: a crash between the two leaves an orphaned object that no
|
|
2311
|
+
// row points at (#2314). A refused check compensates the object away below; a drain
|
|
2312
|
+
// fault after the commit is not a refusal (`serialized` keeps it from becoming one).
|
|
2254
2313
|
await store.put(key, input.body, { contentType: input.contentType });
|
|
2255
2314
|
try {
|
|
2256
2315
|
return await guarded('attachments.upload', async (ctx) => {
|
|
@@ -2271,6 +2330,11 @@ export class SqliteScopeHost {
|
|
|
2271
2330
|
// #1575: queue its text extraction in the same transaction — a `pending` row
|
|
2272
2331
|
// and a job run. Nothing is extracted here, so nothing here can fail the upload.
|
|
2273
2332
|
enqueueAttachmentText(spineSql(rt.db), record.id, ulid(), this.clock());
|
|
2333
|
+
// An upload-link redemption spends its link HERE, in the same transaction as the
|
|
2334
|
+
// row it produced: a refusal anywhere above or below rolls the spend back.
|
|
2335
|
+
if (opts.uploadLinkSecret !== undefined) {
|
|
2336
|
+
await redeemUploadLinkInTransaction({ sql: spineSql(rt.db), now: this.clock(), emit: (event) => kernelEmit(ctx, event) }, opts.uploadLinkSecret, record);
|
|
2337
|
+
}
|
|
2274
2338
|
return record;
|
|
2275
2339
|
});
|
|
2276
2340
|
}
|
|
@@ -2733,6 +2797,13 @@ export class SqliteScopeHost {
|
|
|
2733
2797
|
return undefined;
|
|
2734
2798
|
return vertical;
|
|
2735
2799
|
}
|
|
2800
|
+
/** The erasure claim (`SUBJECT_ERASURE_CLAIM_SQL`); a scope that moved refuses with the key kept. */
|
|
2801
|
+
claimSubjectErasure(tenantId, scopeId, fence) {
|
|
2802
|
+
const claimed = this.directory.prepare(SUBJECT_ERASURE_CLAIM_SQL).run(...subjectErasureClaimParams(tenantId, scopeId, fence));
|
|
2803
|
+
if (claimed.changes === 0) {
|
|
2804
|
+
throw substratError('precondition_failed', 'scope route or copy inventory changed during subject erasure; retry after it settles');
|
|
2805
|
+
}
|
|
2806
|
+
}
|
|
2736
2807
|
/**
|
|
2737
2808
|
* `substrat.erase` on each declared binding. A store error throws, so the caller
|
|
2738
2809
|
* can leave the subject key untouched. Fail closed (#2242): an empty answer means
|
|
@@ -6331,14 +6402,16 @@ export class SqliteScopeHost {
|
|
|
6331
6402
|
}
|
|
6332
6403
|
this.recordAdmin(actor, 'setHostnameIssuance', { tenantId: row.tenant_id, scopeId: row.scope_id }, { status: row.status }, { status: fields.status, note: fields.note ?? null });
|
|
6333
6404
|
},
|
|
6334
|
-
unbindHostname: async (actor, raw) => {
|
|
6405
|
+
unbindHostname: async (actor, raw, owner) => {
|
|
6335
6406
|
const hostname = raw.toLowerCase(); // DNS is case-insensitive; the map is normalized
|
|
6407
|
+
// One statement: the row it removes is the row it audits, and an owner is judged by the
|
|
6408
|
+
// delete itself, so a name rebound to another scope in between is left alone (#2285).
|
|
6336
6409
|
const row = this.directory
|
|
6337
|
-
.prepare(
|
|
6338
|
-
|
|
6410
|
+
.prepare(`DELETE FROM hostnames WHERE hostname = ?${owner ? ' AND tenant_id = ? AND scope_id = ?' : ''}
|
|
6411
|
+
RETURNING tenant_id, scope_id, status`)
|
|
6412
|
+
.get(hostname, ...(owner ? [owner.tenantId, owner.scopeId] : []));
|
|
6339
6413
|
if (!row)
|
|
6340
6414
|
return; // idempotent, and a no-op is not audited
|
|
6341
|
-
this.directory.prepare('DELETE FROM hostnames WHERE hostname = ?').run(hostname);
|
|
6342
6415
|
this.recordAdmin(actor, 'unbindHostname', { tenantId: row.tenant_id, scopeId: row.scope_id }, { hostname, status: row.status }, null);
|
|
6343
6416
|
},
|
|
6344
6417
|
listHostnames: async (actor, filter) => {
|
|
@@ -6574,6 +6647,8 @@ export class SqliteScopeHost {
|
|
|
6574
6647
|
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 1, ?)`)
|
|
6575
6648
|
.run(audited.id, audited.verticalSlug, audited.version, audited.manifestDigest, audited.permissionDigest, audited.migrationDigest, audited.deploymentRef, selfAdmits ? 'admitted' : 'pending', selfAdmits ? AUTO_ADMISSION_NOTE : null, split.manifestJson, origin ? JSON.stringify(origin) : null, split.migrations?.length ?? null, new Date().toISOString());
|
|
6576
6649
|
writeVersionMigrations(switchSqlOf(this.directory), audited.id, split.migrations);
|
|
6650
|
+
// #2286: the version's scope-store bindings, refusing one re-kinded, in the insert's transaction.
|
|
6651
|
+
indexVersionScopeStores(switchSqlOf(this.directory), audited.verticalSlug, audited.id, split.manifestJson);
|
|
6577
6652
|
})();
|
|
6578
6653
|
this.recordAdmin(actor, 'publishVersion', { tenantId: null }, null, {
|
|
6579
6654
|
...audited,
|
|
@@ -6581,6 +6656,12 @@ export class SqliteScopeHost {
|
|
|
6581
6656
|
admission: selfAdmits ? 'admitted' : 'pending',
|
|
6582
6657
|
});
|
|
6583
6658
|
},
|
|
6659
|
+
verticalScopeStores: async (actor, verticalSlug) => {
|
|
6660
|
+
// One transaction: versions not indexed yet are indexed by the read (#2286).
|
|
6661
|
+
const stores = this.directory.transaction(() => verticalScopeStoresOf(switchSqlOf(this.directory), verticalSlug))();
|
|
6662
|
+
this.recordAccess(actor, 'verticalScopeStores', {}, { verticalSlug }, stores.length);
|
|
6663
|
+
return stores;
|
|
6664
|
+
},
|
|
6584
6665
|
listVersions: async (actor, verticalSlug, page) => {
|
|
6585
6666
|
const where = ['vertical_slug = ?'];
|
|
6586
6667
|
const params = [verticalSlug];
|
|
@@ -6684,6 +6765,7 @@ export class SqliteScopeHost {
|
|
|
6684
6765
|
.prepare(`DELETE FROM vertical_version_migrations
|
|
6685
6766
|
WHERE version_id IN (SELECT id FROM vertical_versions WHERE vertical_slug = ?)`)
|
|
6686
6767
|
.run(slug);
|
|
6768
|
+
forgetVerticalScopeStores(switchSqlOf(this.directory), slug);
|
|
6687
6769
|
this.directory.prepare('DELETE FROM vertical_versions WHERE vertical_slug = ?').run(slug);
|
|
6688
6770
|
this.directory.prepare('DELETE FROM verticals WHERE slug = ?').run(slug);
|
|
6689
6771
|
this.recordAdmin(actor, 'deleteVertical', { tenantId: null }, { slug, source: existing.source, ownerTenant: existing.ownerTenant }, null);
|
|
@@ -7700,6 +7782,48 @@ export class SqliteScopeHost {
|
|
|
7700
7782
|
createdAt: r.created_at,
|
|
7701
7783
|
}));
|
|
7702
7784
|
},
|
|
7785
|
+
// -- store-kind releases, rollouts and holds (D-63, #2300) -------------------
|
|
7786
|
+
// The state is kernel code over the directory (store-kind-releases.ts), shared with the
|
|
7787
|
+
// Cloudflare control plane; each call is one transaction. A hold's expiry is judged against
|
|
7788
|
+
// this host's clock, so a test can let a lease lapse without waiting.
|
|
7789
|
+
recordStoreKindRelease: async (actor, input) => {
|
|
7790
|
+
const at = this.clock();
|
|
7791
|
+
const { record, created } = this.directory.transaction(() => recordStoreKindReleaseIn(switchSqlOf(this.directory), { ...input, actor, at }))();
|
|
7792
|
+
if (created)
|
|
7793
|
+
this.recordAdmin(actor, 'uploadStoreKindRelease', { tenantId: null }, null, record, at);
|
|
7794
|
+
return record;
|
|
7795
|
+
},
|
|
7796
|
+
getStoreKindRelease: async (actor, kind, sha256) => {
|
|
7797
|
+
const record = storeKindReleaseIn(switchSqlOf(this.directory), kind, sha256);
|
|
7798
|
+
this.recordAccess(actor, 'getStoreKindRelease', { tenantId: null }, { kind, sha256 }, record ? 1 : 0);
|
|
7799
|
+
return record;
|
|
7800
|
+
},
|
|
7801
|
+
storeKindState: async (actor, kind) => {
|
|
7802
|
+
const state = storeKindStateIn(switchSqlOf(this.directory), kind, Date.parse(this.clock()));
|
|
7803
|
+
this.recordAccess(actor, 'storeKindState', { tenantId: null }, { kind }, state.rollouts.length);
|
|
7804
|
+
return state;
|
|
7805
|
+
},
|
|
7806
|
+
storeKindDeclarations: async (actor, kind) => {
|
|
7807
|
+
const declared = this.directory.transaction(() => kindDeclarationsOf(switchSqlOf(this.directory), kind))();
|
|
7808
|
+
this.recordAccess(actor, 'storeKindDeclarations', { tenantId: null }, { kind }, declared.verticals.length);
|
|
7809
|
+
return declared;
|
|
7810
|
+
},
|
|
7811
|
+
holdStoreKind: async (_actor, input) => this.directory.transaction(() => holdStoreKindIn(switchSqlOf(this.directory), { ...input, nowMs: Date.parse(this.clock()) }))(),
|
|
7812
|
+
releaseStoreKindHold: async (_actor, input) => {
|
|
7813
|
+
releaseStoreKindHoldIn(switchSqlOf(this.directory), input);
|
|
7814
|
+
},
|
|
7815
|
+
beginStoreKindRollout: async (actor, input) => {
|
|
7816
|
+
const at = this.clock();
|
|
7817
|
+
const row = this.directory.transaction(() => beginStoreKindRolloutIn(switchSqlOf(this.directory), { ...input, actor, at, nowMs: Date.parse(at) }))();
|
|
7818
|
+
this.recordAdmin(actor, input.action === 'rollback' ? 'rollBackStoreKind' : 'rollOutStoreKind', { tenantId: null }, null, row, at);
|
|
7819
|
+
return row;
|
|
7820
|
+
},
|
|
7821
|
+
finishStoreKindRollout: async (actor, input) => {
|
|
7822
|
+
const at = this.clock();
|
|
7823
|
+
const row = this.directory.transaction(() => finishStoreKindRolloutIn(switchSqlOf(this.directory), { ...input, at, nowMs: Date.parse(at) }))();
|
|
7824
|
+
this.recordAdmin(actor, row.action === 'rollback' ? 'rollBackStoreKind' : 'rollOutStoreKind', { tenantId: null }, null, row, at);
|
|
7825
|
+
return row;
|
|
7826
|
+
},
|
|
7703
7827
|
getScopeRecord: async (actor, tenantId, scopeId) => {
|
|
7704
7828
|
const r = this.directory.prepare('SELECT * FROM scopes WHERE scope_id = ?').get(scopeId);
|
|
7705
7829
|
// Cross-check the pair (K-3): a scope that exists under a DIFFERENT tenant
|
|
@@ -8021,13 +8145,17 @@ export class SqliteScopeHost {
|
|
|
8021
8145
|
this.recordAccess(actor, 'listShreddedSubjects', { tenantId, scopeId }, null, subjects.length);
|
|
8022
8146
|
return { subjects, nextCursor };
|
|
8023
8147
|
},
|
|
8024
|
-
shredSubject: async (actor, tenantId, scopeId, subjectId, stamp, storeErasures) => {
|
|
8148
|
+
shredSubject: async (actor, tenantId, scopeId, subjectId, fence, stamp, storeErasures) => {
|
|
8025
8149
|
this.assertScope(tenantId, scopeId);
|
|
8026
8150
|
const before = stamp ?? {
|
|
8027
8151
|
erasureEpoch: this.directory.prepare(COPY_BACKFILL_SCOPE_SQL).get(tenantId, scopeId)
|
|
8028
8152
|
?.erasure_epoch ?? 0,
|
|
8029
8153
|
path: 'direct',
|
|
8030
8154
|
};
|
|
8155
|
+
// #2285: a direct shred with a fence claims what it read, as the finalize does; the epoch
|
|
8156
|
+
// it records is the one its claim compared.
|
|
8157
|
+
if (fence)
|
|
8158
|
+
before.erasureEpoch = fence.epoch;
|
|
8031
8159
|
// Redact the live spine FIRST. Both halves are idempotent and a crash between them
|
|
8032
8160
|
// converges on retry, so the order is decided by which half-done state harms the
|
|
8033
8161
|
// person: dying after this leaves ciphertext in a backup that no key opens; dying
|
|
@@ -8101,6 +8229,8 @@ export class SqliteScopeHost {
|
|
|
8101
8229
|
// An orchestrated caller passes the serving script's result and this host does
|
|
8102
8230
|
// not erase again.
|
|
8103
8231
|
const erasures = storeErasures ?? (await this.eraseScopeStores(tenantId, scopeId, subjectId));
|
|
8232
|
+
if (fence)
|
|
8233
|
+
this.claimSubjectErasure(tenantId, scopeId, fence);
|
|
8104
8234
|
const { existed } = await this.subjectKeysFor(tenantId, scopeId).destroy(subjectId, at);
|
|
8105
8235
|
const receipt = subjectShredReceipt.parse({
|
|
8106
8236
|
subjectId,
|
|
@@ -8132,20 +8262,11 @@ export class SqliteScopeHost {
|
|
|
8132
8262
|
finalizeSubjectShred: async (actor, tenantId, scopeId, subjectId, redactions, expected, storeErasures) => {
|
|
8133
8263
|
if (redactions.length === 0)
|
|
8134
8264
|
throw substratError('conflict', 'subject erasure has no confirmed scope redaction');
|
|
8135
|
-
|
|
8136
|
-
WHERE tenant_id = ? AND scope_id = ? AND vertical_version_id IS ?
|
|
8137
|
-
AND serving_ref IS ? AND COALESCE(erasure_epoch, 0) = ?
|
|
8138
|
-
AND NOT EXISTS (SELECT 1 FROM scope_script_copies AS copy
|
|
8139
|
-
WHERE copy.tenant_id = scopes.tenant_id AND copy.scope_id = scopes.scope_id
|
|
8140
|
-
AND copy.state = 'pending')
|
|
8141
|
-
AND (SELECT COUNT(*) FROM scope_script_copies AS copy
|
|
8142
|
-
WHERE copy.tenant_id = scopes.tenant_id AND copy.scope_id = scopes.scope_id) = ?`).run(tenantId, scopeId, expected.versionId, expected.servingRef, expected.epoch, expected.copyCount);
|
|
8143
|
-
if (claimed.changes === 0)
|
|
8144
|
-
throw substratError('precondition_failed', 'scope route or copy inventory changed during subject erasure; retry after it settles');
|
|
8265
|
+
this.claimSubjectErasure(tenantId, scopeId, expected);
|
|
8145
8266
|
// The pure adapter has one co-located scope store. Its existing atomic shred is
|
|
8146
8267
|
// the final local redaction and key destruction, after remote copies confirmed.
|
|
8147
8268
|
const shred = this.admin.shredSubject;
|
|
8148
|
-
return shred(actor, tenantId, scopeId, subjectId, { erasureEpoch: expected.epoch, path: 'orchestrated' }, storeErasures);
|
|
8269
|
+
return shred(actor, tenantId, scopeId, subjectId, undefined, { erasureEpoch: expected.epoch, path: 'orchestrated' }, storeErasures);
|
|
8149
8270
|
},
|
|
8150
8271
|
// -- impersonation (K-42, #868) ----------------------------------------
|
|
8151
8272
|
beginImpersonation: async (actor, input) => {
|
|
@@ -8781,6 +8902,10 @@ export class SqliteScopeHost {
|
|
|
8781
8902
|
const { tenantId, scopeId, ...after } = memberChangeAudit.parse(entry);
|
|
8782
8903
|
this.recordAdmin(actor, 'manageScopeMember', { tenantId, scopeId }, null, after);
|
|
8783
8904
|
},
|
|
8905
|
+
recordConnectionBindingChange: async (actor, entry) => {
|
|
8906
|
+
const { tenantId, scopeId, ...after } = connectionBindingAudit.parse(entry);
|
|
8907
|
+
this.recordAdmin(actor, 'bindConnectionScope', { tenantId, scopeId }, null, after);
|
|
8908
|
+
},
|
|
8784
8909
|
recordPeerBindingChange: async (actor, entry) => {
|
|
8785
8910
|
const { tenantId, scopeId, ...after } = peerBindingAudit.parse(entry);
|
|
8786
8911
|
this.recordAdmin(actor, 'setPeerBinding', { tenantId, scopeId }, null, after);
|
|
@@ -9947,6 +10072,18 @@ export class SqliteScopeHost {
|
|
|
9947
10072
|
assertWrites: (verb) => assertImpersonationWrites(impersonation, verb),
|
|
9948
10073
|
minted,
|
|
9949
10074
|
}),
|
|
10075
|
+
// Upload links: mint / revoke / list, written once in the kernel — the same four things
|
|
10076
|
+
// `capabilities` is handed, and the same consumer-is-system-actor rule.
|
|
10077
|
+
attachments: createAttachmentVerbs({
|
|
10078
|
+
sql: spineSql(rt.db),
|
|
10079
|
+
subject: overrideActor ? { kind: 'system', id: overrideActor.system } : subject,
|
|
10080
|
+
now: at,
|
|
10081
|
+
check: runCheck,
|
|
10082
|
+
emit: (event) => writeEvent(event, 'kernel'),
|
|
10083
|
+
assertWrites: (verb) => assertImpersonationWrites(impersonation, verb),
|
|
10084
|
+
minted,
|
|
10085
|
+
targetOf: (entityType) => this.uploadTargetOf(entityType),
|
|
10086
|
+
}),
|
|
9950
10087
|
// K-16 / #1864: link and relink, written once in the kernel over the raw spine seam.
|
|
9951
10088
|
...createEntityEdgeVerbs({
|
|
9952
10089
|
sql: spineSql(rt.db),
|