@substrat-run/kernel 0.146.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/audit-outcome.d.ts +1 -1
- package/dist/audit-outcome.d.ts.map +1 -1
- package/dist/audit-outcome.js +4 -2
- package/dist/audit-outcome.js.map +1 -1
- package/dist/export-break.d.ts +137 -0
- package/dist/export-break.d.ts.map +1 -0
- package/dist/export-break.js +219 -0
- package/dist/export-break.js.map +1 -0
- package/dist/index.d.ts +17 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +11 -5
- package/dist/index.js.map +1 -1
- package/dist/install-receipts.d.ts +116 -0
- package/dist/install-receipts.d.ts.map +1 -0
- package/dist/install-receipts.js +162 -0
- package/dist/install-receipts.js.map +1 -0
- package/dist/invocation-line.d.ts +63 -0
- package/dist/invocation-line.d.ts.map +1 -1
- package/dist/invocation-line.js +44 -0
- package/dist/invocation-line.js.map +1 -1
- package/dist/map-bounded.d.ts +8 -0
- package/dist/map-bounded.d.ts.map +1 -0
- package/dist/map-bounded.js +16 -0
- package/dist/map-bounded.js.map +1 -0
- package/dist/meters.d.ts +5 -0
- package/dist/meters.d.ts.map +1 -1
- package/dist/meters.js +0 -0
- package/dist/meters.js.map +1 -1
- package/dist/peer.js +1 -1
- package/dist/platform-sweep.d.ts +52 -363
- package/dist/platform-sweep.d.ts.map +1 -1
- package/dist/platform-sweep.js +49 -564
- package/dist/platform-sweep.js.map +1 -1
- package/dist/schedule-state.d.ts +91 -0
- package/dist/schedule-state.d.ts.map +1 -0
- package/dist/schedule-state.js +118 -0
- package/dist/schedule-state.js.map +1 -0
- package/dist/scope-copy-ledger.d.ts +29 -0
- package/dist/scope-copy-ledger.d.ts.map +1 -1
- package/dist/scope-copy-ledger.js +23 -0
- package/dist/scope-copy-ledger.js.map +1 -1
- package/dist/scope-copy.d.ts.map +1 -1
- package/dist/scope-copy.js +3 -2
- package/dist/scope-copy.js.map +1 -1
- package/dist/scope-host.d.ts +199 -14
- package/dist/scope-host.d.ts.map +1 -1
- package/dist/scope-host.js.map +1 -1
- package/dist/scope-identity.d.ts +68 -0
- package/dist/scope-identity.d.ts.map +1 -0
- package/dist/scope-identity.js +75 -0
- package/dist/scope-identity.js.map +1 -0
- package/dist/scope-store.d.ts +139 -0
- package/dist/scope-store.d.ts.map +1 -0
- package/dist/scope-store.js +237 -0
- package/dist/scope-store.js.map +1 -0
- package/dist/spine-restore.js +1 -1
- package/dist/sql-limits.d.ts.map +1 -1
- package/dist/sql-limits.js +10 -1
- package/dist/sql-limits.js.map +1 -1
- package/dist/storage-gauge.d.ts +21 -2
- package/dist/storage-gauge.d.ts.map +1 -1
- package/dist/storage-gauge.js +73 -6
- package/dist/storage-gauge.js.map +1 -1
- package/dist/store-kind-releases.d.ts +137 -0
- package/dist/store-kind-releases.d.ts.map +1 -0
- package/dist/store-kind-releases.js +252 -0
- package/dist/store-kind-releases.js.map +1 -0
- package/dist/upload-link.d.ts +89 -0
- package/dist/upload-link.d.ts.map +1 -0
- package/dist/upload-link.js +277 -0
- package/dist/upload-link.js.map +1 -0
- package/dist/vertical-scope-stores.d.ts +43 -0
- package/dist/vertical-scope-stores.d.ts.map +1 -0
- package/dist/vertical-scope-stores.js +195 -0
- package/dist/vertical-scope-stores.js.map +1 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope-copy-ledger.js","sourceRoot":"","sources":["../src/scope-copy-ledger.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;GAiBG;AAEH,8FAA8F;AAC9F,MAAM,CAAC,MAAM,wBAAwB,GAAG;;;;;;+DAMuB,CAAC;AAEhE,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,OAAkC,EAAE,GAAW,EAAY,EAAE,CAC9F,CAAC,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAExC;;;;;;;GAOG;AACH,MAA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AC,QAAQ,CAAC,CAAC;AAE1H,6EAA6E;AAC7E,MAAM,CAAC,MAAM,yBAAyB,GAAG,8EAA8E,CAAC;AAexH,wFAAwF;AACxF,MAAM,CAAC,MAAM,yBAAyB,GACpC,0FAA0F,CAAC;AAE7F,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,CAAqB,EAAmB,EAAE,CAAC,CAAC;IAC5E,QAAQ,EAAE,CAAC,CAAC,SAAqB;IACjC,OAAO,EAAE,CAAC,CAAC,QAAmB;IAC9B,SAAS,EAAE,CAAC,CAAC,UAAU;IACvB,MAAM,EAAE,CAAC,CAAC,OAAO;IACjB,KAAK,EAAE,CAAC,CAAC,KAAiC;IAC1C,SAAS,EAAE,CAAC,CAAC,UAAU;IACvB,QAAQ,EAAE,CAAC,CAAC,QAAQ;IACpB,IAAI,EAAE,CAAC,CAAC,IAAI,KAAK,QAAQ,IAAI,CAAC,CAAC,IAAI,KAAK,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI;IACrE,UAAU,EAAE,CAAC,CAAC,WAAW;CAC1B,CAAC,CAAC"}
|
package/dist/scope-copy.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope-copy.d.ts","sourceRoot":"","sources":["../src/scope-copy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scope-copy.d.ts","sourceRoot":"","sources":["../src/scope-copy.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,UAAU,gBAAiB,MAAM,GAAG,SAAS,iBAAiB,MAAM,GAAG,SAAS,KAAG,OACpC,CAAC;AAK7D;;;;;;;;GAQG;AACH,wBAAgB,mBAAmB,CAAC,CAAC,SAAS;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,SAAS,OAAO,EAAE,CAAA;CAAE,EACtF,MAAM,EAAE,CAAC,EAAE,EACX,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,aAAa,EAAE,MAAM,GAAG,SAAS,GAChC,CAAC,EAAE,CAGL;AAcD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,eAAe,8cAW3B,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,WAAW,sBAAiB,MACqD,CAAC;AAE/F;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,SAAS,EACd,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,aAAa,EAAE,MAAM,GAAG,SAAS,EACjC,GAAG,EAAE,MAAM,GACV,IAAI,CAiDN;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAInE;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,oBAAoB,QAEa,CAAC;AAE/C;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,CAIpE;AAED;;;;;GAKG;AACH,eAAO,MAAM,WAAW,0FAA0F,CAAC"}
|
package/dist/scope-copy.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CAPABILITY_TABLE_NAMES } from './capability.js';
|
|
2
|
+
import { UPLOAD_LINK_TABLE_NAMES } from './upload-link.js';
|
|
2
3
|
/**
|
|
3
4
|
* What a dump leaves behind when it lands in a scope other than the one it was captured from
|
|
4
5
|
* (#1686). One definition for both adapters' loaders, so the DO and the pure host agree.
|
|
@@ -33,8 +34,8 @@ import { CAPABILITY_TABLE_NAMES } from './capability.js';
|
|
|
33
34
|
* consumer's position, so a copy's cursor acknowledges nothing at the source either.
|
|
34
35
|
*/
|
|
35
36
|
export const isCopyLoad = (destScopeId, sourceScopeId) => destScopeId === undefined || sourceScopeId !== destScopeId;
|
|
36
|
-
/** The capability tables, as `capabilitiesForLoad` matches a dump's (lowercased) names. */
|
|
37
|
-
const CAPABILITY_TABLES = new Set(CAPABILITY_TABLE_NAMES);
|
|
37
|
+
/** The capability tables — and the upload-link table, a bearer link of the same kind — as `capabilitiesForLoad` matches a dump's (lowercased) names. */
|
|
38
|
+
const CAPABILITY_TABLES = new Set([...CAPABILITY_TABLE_NAMES, ...UPLOAD_LINK_TABLE_NAMES]);
|
|
38
39
|
/**
|
|
39
40
|
* A dump's tables as a load into `destScopeId` takes them: **capability rows never cross a scope
|
|
40
41
|
* id.** A copy loads both capability tables empty, so a live link share opens the scope it was
|
package/dist/scope-copy.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope-copy.js","sourceRoot":"","sources":["../src/scope-copy.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"scope-copy.js","sourceRoot":"","sources":["../src/scope-copy.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAG3D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,WAA+B,EAAE,aAAiC,EAAW,EAAE,CACxG,WAAW,KAAK,SAAS,IAAI,aAAa,KAAK,WAAW,CAAC;AAE7D,wJAAwJ;AACxJ,MAAM,iBAAiB,GAAwB,IAAI,GAAG,CAAS,CAAC,GAAG,sBAAsB,EAAE,GAAG,uBAAuB,CAAC,CAAC,CAAC;AAExH;;;;;;;;GAQG;AACH,MAAM,UAAU,mBAAmB,CACjC,MAAW,EACX,WAA+B,EAC/B,aAAiC;IAEjC,IAAI,CAAC,UAAU,CAAC,WAAW,EAAE,aAAa,CAAC;QAA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StoreStubOptions, StoreErasureReplay, StoreStub } from './scope-store.js';
|
|
1
2
|
import type { ModuleLog } from './module-log.js';
|
|
2
3
|
import type { BoundOperations } from './module-operations.js';
|
|
3
4
|
import type { DeliveryRefusal } from './delivery-refusal.js';
|
|
4
5
|
import type { ScopeRoleHolder } from './scope-role-admin.js';
|
|
5
|
-
import type { ScopeCopyBackfillResult } from './scope-copy-ledger.js';
|
|
6
|
+
import type { ScopeCopyBackfillResult, SubjectErasureFence } from './scope-copy-ledger.js';
|
|
7
|
+
import type { VerticalScopeStore } from './vertical-scope-stores.js';
|
|
8
|
+
import type { StoreKindHoldMode, StoreKindReleaseRecord, StoreKindRolloutAction, StoreKindRolloutRecord, StoreKindRolloutState, StoreKindState } from './store-kind-releases.js';
|
|
6
9
|
import type { SubjectRedactionCounts } from './subject-redaction.js';
|
|
7
|
-
import type { OnBehalfOf, ExportReadInput, ExportedBatch, ImportBatch, ImportedEvent, ImportResult, ImportState, ImportCursorMove, ImportCursorMoved, AdminAction, BecomeCapabilityInput, CapabilityExchange, CapabilityFilter, CapabilityId, CapabilityPage, MintedCapability, ListPage, ConnectLink, ConnectLinkConsume, ConnectLinkFilter, ConnectLinkKey, ConsumeConnectLinkInput, MintConnectLinkInput, Connection, ConnectionFilter, ConnectionId, ConnectionGrant, ConnectionGrantRecord, ConnectionSecret, CreateConnectionInput, OpenConnection, ProjectedConnectionGrant, ProjectedConnectionKey, AccessLogEntry, DelegatedReadRecord, OwnerTransferAudit, MemberChangeAudit, PeerBindingAudit, CopyMarkAudit, BindHostnameInput, AdminLogEntry, OpsFailureEntry, PlatformRequestDrainTotalsEntry, SweepRunEntry, SweepRunKind, SweepRunOutcome, ModelUsageEntry, ModelUsageSummary, CapabilityGrant, CreateTenantInput, Decision, Instant, DomainEvent, DomainEventInput, PlatformRequestInput, PlatformRequestId, PlatformRequestEntry, PlatformRequestFilter, PlatformRequestStatus, PlatformRequestFailure, PlatformOutcomeEvent, EntitlementGrant, EntitlementGrantInput, EntitlementView, MeterReading, ScopeStorageSample, EntityRef, IdentityLink, IdentityPool, Jurisdiction, ModuleId, ModuleManifest, ScheduleSpec, SystemGrant, PeerGrantsStatusEntry, SystemGrantsStatusEntry, SystemSwitchRecord, SystemSwitch, SystemSwitchResult, PeerCoverage, PeerSwitch, PeerSwitchResult, VerticalCaller, VerticalResolution, PeerBinding, PeerInstanceResolution, CreateOrgInput, Node, Org, OrgId, OrgMembership, PermissionKey, PlatformActorId, ChannelName, ExportBreak, ChannelHistoryEntry, DnsRecord, HostnameBinding, HostnameStatus, PromotionAcknowledgement, BindAcknowledgement, PublishVersionInput, RegisterVerticalInput, VerticalServingState, RouteTarget, DirectoryDump, IdentityMembership, PrincipalId, ResolvedIdentity, RoleAssignment, RoleDefinition, QueryScopeInput, ReadScopeTableInput, Scope, ScopeDump, SubjectShredReceipt, ScopeQueryResult, ScopeId, ScopeStatus, ScopeTable, DenialFilter, DenialSummary, RefusalFilter, RefusalRecord, PermissionDenial, Coverage, BeginImpersonationInput, ImpersonationFilter, ImpersonationSession, ImpersonationSessionId, ScopeTablePage, StorageShape, Tenant, TenantId, TenantRole, TenantStoreHandle, AttachmentRecord, BlobStoreHandle, Visibility, Vertical, VerticalChannel, VerticalVersion, TenantStatus, Page, CountedPage, FreshnessSpec, EntityHistoryInput, EventFacetInput, EventCauseInput, EventEffectsInput, EffectsTree, InvocationEventsInput, InvocationEvents, DeadLettersInput, DeadLetter, LifecycleFlowInput, LifecycleFlowResult, OperationSeriesInput, OperationSeriesResult, CauseChain, EventFacetResult, HistoryEntry, ErrorCode, PlatformRequestFailureOrigin, IssueEntry, IssueStatus, IssueStatusInput, FindingEntry, FindingFilter, FindingRuleEntry, FindingRuleInput, FindingStatusInput, DeclaredMigration, CheckSubject, EntityGrantShape } from '@substrat-run/contracts';
|
|
10
|
+
import type { OnBehalfOf, ExportReadInput, ExportedBatch, ImportBatch, ImportedEvent, ImportResult, ImportState, ImportCursorMove, ImportCursorMoved, AdminAction, BecomeCapabilityInput, CapabilityExchange, CapabilityFilter, CapabilityId, CapabilityPage, MintedCapability, ListPage, ConnectLink, ConnectLinkConsume, ConnectLinkFilter, ConnectLinkKey, ConsumeConnectLinkInput, MintConnectLinkInput, Connection, ConnectionFilter, ConnectionId, ConnectionGrant, ConnectionGrantRecord, ConnectionSecret, CreateConnectionInput, OpenConnection, ProjectedConnectionGrant, ProjectedConnectionKey, AccessLogEntry, DelegatedReadRecord, OwnerTransferAudit, MemberChangeAudit, PeerBindingAudit, ConnectionBindingAudit, CopyMarkAudit, BindHostnameInput, AdminLogEntry, OpsFailureEntry, PlatformRequestDrainTotalsEntry, SweepRunEntry, SweepRunKind, SweepRunOutcome, ModelUsageEntry, ModelUsageSummary, CapabilityGrant, CreateTenantInput, Decision, Instant, DomainEvent, DomainEventInput, PlatformRequestInput, PlatformRequestId, PlatformRequestEntry, PlatformRequestFilter, PlatformRequestStatus, PlatformRequestFailure, PlatformOutcomeEvent, EntitlementGrant, EntitlementGrantInput, EntitlementView, MeterReading, ScopeStorageSample, EntityRef, IdentityLink, IdentityPool, Jurisdiction, ModuleId, ModuleManifest, ScheduleSpec, SystemGrant, PeerGrantsStatusEntry, SystemGrantsStatusEntry, SystemSwitchRecord, SystemSwitch, SystemSwitchResult, PeerCoverage, PeerSwitch, PeerSwitchResult, VerticalCaller, VerticalResolution, PeerBinding, PeerInstanceResolution, CreateOrgInput, Node, Org, OrgId, OrgMembership, PermissionKey, PlatformActorId, ChannelName, ExportBreak, ChannelHistoryEntry, DnsRecord, HostnameBinding, HostnameStatus, PromotionAcknowledgement, BindAcknowledgement, PublishVersionInput, RegisterVerticalInput, VerticalServingState, RouteTarget, DirectoryDump, IdentityMembership, PrincipalId, ResolvedIdentity, RoleAssignment, RoleDefinition, QueryScopeInput, ReadScopeTableInput, Scope, ScopeDump, ScopeDumpInput, SubjectShredReceipt, ScopeQueryResult, ScopeId, ScopeStatus, ScopeTable, DenialFilter, DenialSummary, RefusalFilter, RefusalRecord, PermissionDenial, Coverage, BeginImpersonationInput, ImpersonationFilter, ImpersonationSession, ImpersonationSessionId, ScopeTablePage, StorageShape, Tenant, TenantId, TenantRole, TenantStoreHandle, AttachmentRecord, UploadLinkView, BlobStoreHandle, Visibility, Vertical, VerticalChannel, VerticalVersion, TenantStatus, Page, CountedPage, FreshnessSpec, EntityHistoryInput, EventFacetInput, EventCauseInput, EventEffectsInput, EffectsTree, InvocationEventsInput, InvocationEvents, DeadLettersInput, DeadLetter, LifecycleFlowInput, LifecycleFlowResult, OperationSeriesInput, OperationSeriesResult, CauseChain, EventFacetResult, HistoryEntry, ErrorCode, PlatformRequestFailureOrigin, IssueEntry, IssueStatus, IssueStatusInput, FindingEntry, FindingFilter, FindingRuleEntry, FindingRuleInput, FindingStatusInput, DeclaredMigration, CheckSubject, EntityGrantShape } from '@substrat-run/contracts';
|
|
8
11
|
import type { ConnectionUseOutcome } from './connector-calls.js';
|
|
9
12
|
import type { CapabilityVerbs } from './capability.js';
|
|
13
|
+
import type { AttachmentVerbs } from './upload-link.js';
|
|
10
14
|
import type { AuditedOperationRef, AuditedOperationRow } from './audit-outcome.js';
|
|
11
15
|
import { type EntityStateName } from '@substrat-run/contracts';
|
|
12
16
|
import type { ModelUsageFilter, ModelUsageInput, ModelUsageWindow } from './model-usage.js';
|
|
@@ -80,7 +84,9 @@ export type SqlValue = string | number | bigint | Uint8Array | null;
|
|
|
80
84
|
* - **5** terms in one compound `SELECT` (`UNION`/`UNION ALL`/`INTERSECT`/`EXCEPT`; a
|
|
81
85
|
* subquery or CTE body counts its own; multi-row `VALUES` is not a compound);
|
|
82
86
|
* - **100** bound parameters in one statement (the highest number, `?N` included) — bind a
|
|
83
|
-
* list of unknown length as ONE JSON array and read it with `json_each
|
|
87
|
+
* list of unknown length as ONE JSON array and read it with `json_each`, which is what
|
|
88
|
+
* `inList(values)` from `@substrat-run/contracts` writes for you (#2248):
|
|
89
|
+
* `` ctx.sql.query(`SELECT … WHERE id IN ${ids.sql}`, ids.params) ``;
|
|
84
90
|
* - **100 000 bytes** of statement, UTF-8, the whole string;
|
|
85
91
|
* - **50 bytes** of `LIKE`/`GLOB` pattern, UTF-8 — NOT enforced by an adapter: node's SQLite
|
|
86
92
|
* allows 50 000, and it can only be emulated by a test preload
|
|
@@ -574,6 +580,14 @@ export interface OperationContext {
|
|
|
574
580
|
* like `ctx.grant`.
|
|
575
581
|
*/
|
|
576
582
|
readonly capabilities: CapabilityVerbs;
|
|
583
|
+
/**
|
|
584
|
+
* Attachment verbs an operation may use — today, minting a single-use URL through which a
|
|
585
|
+
* caller with no session uploads ONE file to an entity (`mintUploadUrl`). The bytes
|
|
586
|
+
* themselves never ride an operation: they go to the redemption route, which writes them
|
|
587
|
+
* through `ScopeHost.attachments`' own upload as the principal who minted the link.
|
|
588
|
+
* See {@link AttachmentVerbs}.
|
|
589
|
+
*/
|
|
590
|
+
readonly attachments: AttachmentVerbs;
|
|
577
591
|
/**
|
|
578
592
|
* Run `fn` as a SUB-TRANSACTION of this operation (#770,
|
|
579
593
|
* docs/architecture/sub-transactions.md) — the boundary that makes catching an
|
|
@@ -2055,6 +2069,9 @@ export interface HostAdmin {
|
|
|
2055
2069
|
* permission diffs are the admission gates, and binding a scope is a separate step
|
|
2056
2070
|
* (`bindScopeVersion`), so the two human checkpoints fire where the blast radius is
|
|
2057
2071
|
* rather than where the typing was.
|
|
2072
|
+
*
|
|
2073
|
+
* Refuses (`conflict`) a version that declares a scope-store binding the vertical already
|
|
2074
|
+
* declared as another kind (#2286): see `verticalScopeStores`.
|
|
2058
2075
|
*/
|
|
2059
2076
|
publishVersion(actor: PlatformActorId, input: PublishVersionInput): Promise<void>;
|
|
2060
2077
|
/** Ordered by id (ULID = publish order), `asc` unless `page.order` says otherwise. */
|
|
@@ -2266,6 +2283,16 @@ export interface HostAdmin {
|
|
|
2266
2283
|
* version can be bound per-version but never served in place.
|
|
2267
2284
|
*/
|
|
2268
2285
|
versionManifest(actor: PlatformActorId, verticalSlug: string, versionId: string): Promise<string | null>;
|
|
2286
|
+
/**
|
|
2287
|
+
* Every scope-store binding any version of the vertical has declared, with its kind (#2286,
|
|
2288
|
+
* RFC scope-stores L17): what export, wipe, erasure and the meter reach, so an object under a
|
|
2289
|
+
* binding a later version dropped is still reached. Read by its keys, with no per-version work
|
|
2290
|
+
* once the vertical is indexed. A binding keeps its kind for the life of the vertical:
|
|
2291
|
+
* `publishVersion` refuses a version that re-kinds one, or declares one twice (`conflict`).
|
|
2292
|
+
* Refuses (`unavailable`) when a version's manifest cannot be read, since that version may
|
|
2293
|
+
* declare a store nobody can name. Empty for an unknown vertical.
|
|
2294
|
+
*/
|
|
2295
|
+
verticalScopeStores(actor: PlatformActorId, verticalSlug: string): Promise<VerticalScopeStore[]>;
|
|
2269
2296
|
/**
|
|
2270
2297
|
* One version's SQL migrations (#1764), in the order the host runs them. They are stored
|
|
2271
2298
|
* apart from the manifest, which `versionManifest` returns without them. Null for a version
|
|
@@ -2401,6 +2428,15 @@ export interface HostAdmin {
|
|
|
2401
2428
|
* `/internal/database-size` instead, and this is the co-located fallback. Access-logged.
|
|
2402
2429
|
*/
|
|
2403
2430
|
scopeDatabaseSize(actor: PlatformActorId, tenantId: TenantId, scopeId: ScopeId): Promise<number>;
|
|
2431
|
+
/**
|
|
2432
|
+
* The size of each scope store bound for this scope (#2207). Access-logged like
|
|
2433
|
+
* `scopeDatabaseSize`. An undeclared scope has none, so the list is empty. This is
|
|
2434
|
+
* the co-located reading. A hosted control plane asks the store script directly.
|
|
2435
|
+
*/
|
|
2436
|
+
scopeStoreSizes(actor: PlatformActorId, tenantId: TenantId, scopeId: ScopeId): Promise<{
|
|
2437
|
+
binding: string;
|
|
2438
|
+
bytes: number;
|
|
2439
|
+
}[]>;
|
|
2404
2440
|
/**
|
|
2405
2441
|
* #286's backout: PITR-rewind a scope to a pre-migration bookmark — schema AND
|
|
2406
2442
|
* data, discarding every write since. Audited (destructive by design). The scope
|
|
@@ -2449,8 +2485,15 @@ export interface HostAdmin {
|
|
|
2449
2485
|
* the append-only admin log (K-21 protects tuples, not the route table).
|
|
2450
2486
|
* Idempotent: unbinding an unknown hostname is a silent no-op, not an error —
|
|
2451
2487
|
* so a cleanup pass can re-run over a partial failure.
|
|
2488
|
+
*
|
|
2489
|
+
* `owner` (#2285): remove the binding only while it still names this tenant and scope,
|
|
2490
|
+
* decided by the delete itself. A name rebound to another scope since the caller listed it
|
|
2491
|
+
* is left bound to that scope, and the call is a silent no-op, as for an unknown name.
|
|
2452
2492
|
*/
|
|
2453
|
-
unbindHostname(actor: PlatformActorId, hostname: string
|
|
2493
|
+
unbindHostname(actor: PlatformActorId, hostname: string, owner?: {
|
|
2494
|
+
tenantId: TenantId;
|
|
2495
|
+
scopeId: ScopeId;
|
|
2496
|
+
}): Promise<void>;
|
|
2454
2497
|
/**
|
|
2455
2498
|
* Ordered by hostname; the cursor is a hostname.
|
|
2456
2499
|
*
|
|
@@ -2575,6 +2618,73 @@ export interface HostAdmin {
|
|
|
2575
2618
|
tenantId?: TenantId;
|
|
2576
2619
|
vertical?: string;
|
|
2577
2620
|
}): Promise<BlobStoreRecord[]>;
|
|
2621
|
+
/**
|
|
2622
|
+
* Record that a store kind's release bytes are stored, keyed by their sha256 (D-63, #2300).
|
|
2623
|
+
* Insert-only: the same sha256 again answers the row as it stands, and from another source
|
|
2624
|
+
* commit is refused (`conflict`). Audited `uploadStoreKindRelease` when it writes.
|
|
2625
|
+
*/
|
|
2626
|
+
recordStoreKindRelease(actor: PlatformActorId, input: {
|
|
2627
|
+
kind: string;
|
|
2628
|
+
sha256: string;
|
|
2629
|
+
sourceCommit: string;
|
|
2630
|
+
}): Promise<StoreKindReleaseRecord>;
|
|
2631
|
+
/** One stored release, or undefined. */
|
|
2632
|
+
getStoreKindRelease(actor: PlatformActorId, kind: string, sha256: string): Promise<StoreKindReleaseRecord | undefined>;
|
|
2633
|
+
/**
|
|
2634
|
+
* A kind's current good release, every rollout of it, oldest first, and where a rollback goes.
|
|
2635
|
+
* A `rolling` row whose holder holds the kind no longer reads as `diverged`.
|
|
2636
|
+
*/
|
|
2637
|
+
storeKindState(actor: PlatformActorId, kind: string): Promise<StoreKindState>;
|
|
2638
|
+
/**
|
|
2639
|
+
* Every vertical any version of which declared a store of `kind`, with those bindings: the
|
|
2640
|
+
* scripts a rollout reaches, and in `unreadable` every vertical that cannot say (a manifest that
|
|
2641
|
+
* does not parse, or versions from before the record that re-kinded a binding): the caller that
|
|
2642
|
+
* must reach every script refuses while it is not empty.
|
|
2643
|
+
*/
|
|
2644
|
+
storeKindDeclarations(actor: PlatformActorId, kind: string): Promise<{
|
|
2645
|
+
verticals: {
|
|
2646
|
+
vertical: string;
|
|
2647
|
+
stores: VerticalScopeStore[];
|
|
2648
|
+
}[];
|
|
2649
|
+
unreadable: string[];
|
|
2650
|
+
}>;
|
|
2651
|
+
/**
|
|
2652
|
+
* Take or renew a lease on a kind (#2300): `exclusive` for a rollout or rollback, `shared` for
|
|
2653
|
+
* a push or serve rebuilding a script. False when a live hold of another holder excludes it.
|
|
2654
|
+
* `renew` extends only a hold the holder still holds (a lapsed one answers false, never a fresh
|
|
2655
|
+
* hold), and `rolloutSeq` also needs that rollout to be `rolling` still.
|
|
2656
|
+
*/
|
|
2657
|
+
holdStoreKind(actor: PlatformActorId, input: {
|
|
2658
|
+
kind: string;
|
|
2659
|
+
holder: string;
|
|
2660
|
+
mode: StoreKindHoldMode;
|
|
2661
|
+
ttlMs: number;
|
|
2662
|
+
renew?: boolean;
|
|
2663
|
+
rolloutSeq?: number;
|
|
2664
|
+
}): Promise<boolean>;
|
|
2665
|
+
releaseStoreKindHold(actor: PlatformActorId, input: {
|
|
2666
|
+
kind: string;
|
|
2667
|
+
holder: string;
|
|
2668
|
+
}): Promise<void>;
|
|
2669
|
+
/**
|
|
2670
|
+
* Begin a rollout (or a rollback) of a stored release, as the kind's exclusive holder; refused
|
|
2671
|
+
* (`conflict`) otherwise. A rollback must name `storeKindState`'s `rollbackTarget`. Audited
|
|
2672
|
+
* under `rollOutStoreKind` / `rollBackStoreKind`.
|
|
2673
|
+
*/
|
|
2674
|
+
beginStoreKindRollout(actor: PlatformActorId, input: {
|
|
2675
|
+
kind: string;
|
|
2676
|
+
sha256: string;
|
|
2677
|
+
action: StoreKindRolloutAction;
|
|
2678
|
+
holder: string;
|
|
2679
|
+
}): Promise<StoreKindRolloutRecord>;
|
|
2680
|
+
/** End a rollout as its exclusive holder; a `good` end makes its release current. Audited as its begin. */
|
|
2681
|
+
finishStoreKindRollout(actor: PlatformActorId, input: {
|
|
2682
|
+
kind: string;
|
|
2683
|
+
seq: number;
|
|
2684
|
+
holder: string;
|
|
2685
|
+
state: Exclude<StoreKindRolloutState, 'rolling'>;
|
|
2686
|
+
detail: string | null;
|
|
2687
|
+
}): Promise<StoreKindRolloutRecord>;
|
|
2578
2688
|
/**
|
|
2579
2689
|
* One scope's directory record. Cross-checks the (tenantId, scopeId) pair and
|
|
2580
2690
|
* returns undefined on a mismatch rather than another tenant's scope (K-3) —
|
|
@@ -3003,19 +3113,41 @@ export interface HostAdmin {
|
|
|
3003
3113
|
* vertical's own table, copies already handed to a customer, and the PITR window (see
|
|
3004
3114
|
* kernel-design.md's answer to open question 17). A mechanism whose limits are
|
|
3005
3115
|
* undocumented gets oversold by someone who was not in the room.
|
|
3116
|
+
*
|
|
3117
|
+
* A scope store is reached, by `substrat.erase`, after the scope-side redaction and
|
|
3118
|
+
* before the key is destroyed. A store that answers with an error throws, and the key
|
|
3119
|
+
* stays, so a retry converges. The receipt's `storeErasures` names each binding.
|
|
3120
|
+
*
|
|
3121
|
+
* `fence` (#2285): the scope state the caller read before it erased the platform's stores. Given,
|
|
3122
|
+
* the shred takes the same claim `finalizeSubjectShred` takes, just before the key goes, and
|
|
3123
|
+
* refuses (`precondition_failed`) with the key kept when the scope moved. Omitted, nothing is
|
|
3124
|
+
* claimed: the caller reached no store outside this host.
|
|
3125
|
+
*/
|
|
3126
|
+
shredSubject(actor: PlatformActorId, tenantId: TenantId, scopeId: ScopeId, subjectId: string, fence?: SubjectErasureFence): Promise<SubjectShredReceipt>;
|
|
3127
|
+
/**
|
|
3128
|
+
* Subjects whose key row is tombstoned (`shredded_at` set), in subject-id order.
|
|
3129
|
+
* A page is at most 100. `cursor` is the last id the caller already has.
|
|
3006
3130
|
*/
|
|
3007
|
-
|
|
3131
|
+
listShreddedSubjects(actor: PlatformActorId, tenantId: TenantId, scopeId: ScopeId, cursor?: string): Promise<{
|
|
3132
|
+
subjects: string[];
|
|
3133
|
+
nextCursor: string | null;
|
|
3134
|
+
}>;
|
|
3008
3135
|
/** Monotone directory fence against a carry from before subject erasure. */
|
|
3009
3136
|
scopeErasureEpoch(actor: PlatformActorId, tenantId: TenantId, scopeId: ScopeId): Promise<number>;
|
|
3010
3137
|
/** Finish an orchestrated erasure only after every script holding a copy has redacted it.
|
|
3011
3138
|
* The copy count fences a move that was recorded after the coordinator listed scripts;
|
|
3012
3139
|
* ledger rows are append-only, so a changed count means that inventory is stale. */
|
|
3013
|
-
finalizeSubjectShred(actor: PlatformActorId, tenantId: TenantId, scopeId: ScopeId, subjectId: string, redactions: readonly SubjectRedactionCounts[], expected:
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3140
|
+
finalizeSubjectShred(actor: PlatformActorId, tenantId: TenantId, scopeId: ScopeId, subjectId: string, redactions: readonly SubjectRedactionCounts[], expected: SubjectErasureFence,
|
|
3141
|
+
/**
|
|
3142
|
+
* What the serving script's stores erased (#2068). The coordinator calls
|
|
3143
|
+
* `substrat.erase` once — store objects are per vertical, not per script copy —
|
|
3144
|
+
* and passes the result. Omitted means this host erases its own stores, which
|
|
3145
|
+
* is the pure adapter's co-located shred.
|
|
3146
|
+
*/
|
|
3147
|
+
storeErasures?: readonly {
|
|
3148
|
+
binding: string;
|
|
3149
|
+
erased: number;
|
|
3150
|
+
}[]): Promise<SubjectShredReceipt>;
|
|
3019
3151
|
/**
|
|
3020
3152
|
* Open a session that acts as `input.principal`, and record it.
|
|
3021
3153
|
*
|
|
@@ -3540,6 +3672,7 @@ export interface HostAdmin {
|
|
|
3540
3672
|
*/
|
|
3541
3673
|
recordMemberChange(actor: PlatformActorId, entry: MemberChangeAudit): Promise<void>;
|
|
3542
3674
|
/** One intent or outcome of a tenant's peer-instance binding change (#1720). */
|
|
3675
|
+
recordConnectionBindingChange(actor: PlatformActorId, entry: ConnectionBindingAudit): Promise<void>;
|
|
3543
3676
|
recordPeerBindingChange(actor: PlatformActorId, entry: PeerBindingAudit): Promise<void>;
|
|
3544
3677
|
/**
|
|
3545
3678
|
* Close one audited change whose intent has no outcome (#2064): in ONE transaction, read the
|
|
@@ -3829,6 +3962,16 @@ export interface AttachmentUploadInput {
|
|
|
3829
3962
|
visibility: Visibility;
|
|
3830
3963
|
body: Uint8Array;
|
|
3831
3964
|
}
|
|
3965
|
+
/**
|
|
3966
|
+
* Input to `ScopeHost.redeemUploadLink`. No `visibility`: the link carries it, as it carries
|
|
3967
|
+
* the author. `entity` is what the URL named, and must be the link's own.
|
|
3968
|
+
*/
|
|
3969
|
+
export interface UploadLinkRedeemInput {
|
|
3970
|
+
entity: EntityRef;
|
|
3971
|
+
filename: string;
|
|
3972
|
+
contentType: string;
|
|
3973
|
+
body: Uint8Array;
|
|
3974
|
+
}
|
|
3832
3975
|
/** An opened attachment: the metadata fact plus the bytes it witnesses. */
|
|
3833
3976
|
export interface OpenedAttachment {
|
|
3834
3977
|
record: AttachmentRecord;
|
|
@@ -4286,6 +4429,20 @@ export interface ScopeHost {
|
|
|
4286
4429
|
* transaction is rolled back rather than committed.
|
|
4287
4430
|
*/
|
|
4288
4431
|
getImpersonatedScope(session: ImpersonationSessionId, tenantId: TenantId, scopeId: ScopeId, options?: ScopeStubOptions): Promise<ScopeStub>;
|
|
4432
|
+
/**
|
|
4433
|
+
* Mint a stub for one scope store (#2207). A door of its own, beside `getScope`:
|
|
4434
|
+
* `ScopeStubOptions` carries no authority, and a store is not a flag on that bag.
|
|
4435
|
+
*
|
|
4436
|
+
* The host checks the (tenant, scope) pair the way `getScope` does, then builds
|
|
4437
|
+
* the object name itself. `binding` is the declaration. The vertical does not
|
|
4438
|
+
* choose the tenant, the scope, or the vertical slug that go into the name.
|
|
4439
|
+
*
|
|
4440
|
+
* `options` carries no authority (#2245). Each invoke is recorded on the
|
|
4441
|
+
* request now running — binding, operation, outcome, duration, never the input —
|
|
4442
|
+
* with nothing passed by the vertical (RFC §6). `onStoreCall`, when passed, is
|
|
4443
|
+
* heard instead. A call made where no request is current is not logged.
|
|
4444
|
+
*/
|
|
4445
|
+
getScopeStore(principal: PrincipalId, tenantId: TenantId, scopeId: ScopeId, binding: string, options?: ScopeStoreStubOptions): Promise<StoreStub>;
|
|
4289
4446
|
/**
|
|
4290
4447
|
* The entry scope-lifecycle transition (control-plane.md §4.2): idempotent,
|
|
4291
4448
|
* journaled, audited. Requires an existing ACTIVE tenant — a scope with no
|
|
@@ -4344,6 +4501,27 @@ export interface ScopeHost {
|
|
|
4344
4501
|
* extraction job has no reason to mutate attachment metadata or bytes.
|
|
4345
4502
|
*/
|
|
4346
4503
|
getSystemAttachments(moduleId: ModuleId, tenantId: TenantId, scopeId: ScopeId): Promise<Pick<ScopeAttachments, 'open'>>;
|
|
4504
|
+
/**
|
|
4505
|
+
* Look an upload link up WITHOUT spending it, so the route can refuse an oversize body or a
|
|
4506
|
+
* wrong type before it reads a byte. `not_found` for a secret that names nothing (and for
|
|
4507
|
+
* one that cannot be ours); `conflict` with reason `upload_link_gone` for one that is used,
|
|
4508
|
+
* expired or revoked. The mint is `ctx.attachments.mintUploadUrl`.
|
|
4509
|
+
*
|
|
4510
|
+
* Optional, like `getCapabilityAttachments`: a host that has not wired the link table says so
|
|
4511
|
+
* by leaving it out, and `mountUploadLinkRedeem` refuses to mount over one.
|
|
4512
|
+
*/
|
|
4513
|
+
inspectUploadLink?(tenantId: TenantId, scopeId: ScopeId, secret: string): Promise<UploadLinkView>;
|
|
4514
|
+
/**
|
|
4515
|
+
* Redeem an upload link: write the bytes as ONE attachment, AS the principal who minted the
|
|
4516
|
+
* link — the target's `writePermission` is checked as them now, they are the author, and
|
|
4517
|
+
* `attachment.added` is emitted exactly as for any upload. The link is spent in the same
|
|
4518
|
+
* transaction as the attachment row, so a redemption that fails anywhere leaves it unspent;
|
|
4519
|
+
* the size and the type are the LINK's to refuse (`validation_failed`, reasons
|
|
4520
|
+
* `upload_link_too_large` / `upload_link_type_refused`) and a link used by another request
|
|
4521
|
+
* first is `conflict` / `upload_link_gone`. The bytes are written to the blob store before
|
|
4522
|
+
* the row, as an upload's are, and removed again if the row is refused.
|
|
4523
|
+
*/
|
|
4524
|
+
redeemUploadLink?(tenantId: TenantId, scopeId: ScopeId, secret: string, input: UploadLinkRedeemInput): Promise<AttachmentRecord>;
|
|
4347
4525
|
/**
|
|
4348
4526
|
* Provision a NEW scope and load a `ScopeDump` into it — the write side of
|
|
4349
4527
|
* `exportScope` and the fork primitive (docs/architecture/preview-and-snapshots.md §3):
|
|
@@ -4359,7 +4537,7 @@ export interface ScopeHost {
|
|
|
4359
4537
|
* fail-closed tenant gate (the dump's own `tenantId`/`scopeId` are provenance, never
|
|
4360
4538
|
* the authority — `input` says where the copy lands).
|
|
4361
4539
|
*/
|
|
4362
|
-
importScope(actor: PlatformActorId, input: ProvisionScopeInput, dump:
|
|
4540
|
+
importScope(actor: PlatformActorId, input: ProvisionScopeInput, dump: ScopeDumpInput): Promise<void>;
|
|
4363
4541
|
/**
|
|
4364
4542
|
* Load a `ScopeDump` into an EXISTING scope in place — the restore/backout half of
|
|
4365
4543
|
* `exportScope` (preview-and-snapshots.md §8). Same drop-then-replay as a fork: the
|
|
@@ -4374,10 +4552,17 @@ export interface ScopeHost {
|
|
|
4374
4552
|
* `opts.sourceScopeId` (#1869) is a separate hint for the grant re-point ONLY: the scope the
|
|
4375
4553
|
* uploaded file says it came from, when the dump's own `scopeId` was set to something else.
|
|
4376
4554
|
* The dump's `tenantId`/`scopeId` are left exactly as they are for everything else.
|
|
4555
|
+
*
|
|
4556
|
+
* A host with scope stores then re-erases every tombstoned subject (#2207,
|
|
4557
|
+
* `replayStoreErasures`): the target's marks, and the source's (`sourceScopeId`, else the
|
|
4558
|
+
* dump's `scopeId`) when the source is a scope of this tenant on this host. An unknown
|
|
4559
|
+
* source never refuses the restore; the result says `storeErasureSourceUnknown`. With nothing
|
|
4560
|
+
* re-erased and nothing missing (no store here, or no tombstone that applies) it returns
|
|
4561
|
+
* nothing, as a restore always did.
|
|
4377
4562
|
*/
|
|
4378
|
-
restoreScope(actor: PlatformActorId, tenantId: TenantId, scopeId: ScopeId, dump:
|
|
4563
|
+
restoreScope(actor: PlatformActorId, tenantId: TenantId, scopeId: ScopeId, dump: ScopeDumpInput, opts?: {
|
|
4379
4564
|
sourceScopeId?: ScopeId;
|
|
4380
|
-
}): Promise<void>;
|
|
4565
|
+
}): Promise<StoreErasureReplay | void>;
|
|
4381
4566
|
/**
|
|
4382
4567
|
* Snapshot a scope — fork its current data into a new scope and return that scope's
|
|
4383
4568
|
* id. A thin composition of `exportScope` + `importScope` (preview-and-snapshots.md
|