@substrat-run/kernel 0.220.0 → 0.222.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/adopt-major.d.ts +150 -0
- package/dist/adopt-major.d.ts.map +1 -0
- package/dist/adopt-major.js +150 -0
- package/dist/adopt-major.js.map +1 -0
- package/dist/app-environments.d.ts +173 -3
- package/dist/app-environments.d.ts.map +1 -1
- package/dist/app-environments.js +334 -5
- package/dist/app-environments.js.map +1 -1
- package/dist/broker-counts.d.ts +8 -30
- package/dist/broker-counts.d.ts.map +1 -1
- package/dist/broker-counts.js +41 -6
- package/dist/broker-counts.js.map +1 -1
- package/dist/broker-shadow.d.ts +3 -0
- package/dist/broker-shadow.d.ts.map +1 -1
- package/dist/broker-shadow.js +1 -0
- package/dist/broker-shadow.js.map +1 -1
- package/dist/broker-telemetry.d.ts +11 -0
- package/dist/broker-telemetry.d.ts.map +1 -1
- package/dist/broker-telemetry.js +5 -0
- package/dist/broker-telemetry.js.map +1 -1
- package/dist/carried-copy.d.ts.map +1 -1
- package/dist/carried-copy.js +5 -0
- package/dist/carried-copy.js.map +1 -1
- package/dist/credential-bound-fetch.d.ts +73 -0
- package/dist/credential-bound-fetch.d.ts.map +1 -0
- package/dist/credential-bound-fetch.js +241 -0
- package/dist/credential-bound-fetch.js.map +1 -0
- package/dist/delivery-broker.d.ts +24 -5
- package/dist/delivery-broker.d.ts.map +1 -1
- package/dist/delivery-broker.js +30 -7
- package/dist/delivery-broker.js.map +1 -1
- package/dist/delivery-contract.d.ts +29 -3
- package/dist/delivery-contract.d.ts.map +1 -1
- package/dist/delivery-contract.js +85 -1
- package/dist/delivery-contract.js.map +1 -1
- package/dist/dependent-erasure.d.ts +106 -0
- package/dist/dependent-erasure.d.ts.map +1 -0
- package/dist/dependent-erasure.js +150 -0
- package/dist/dependent-erasure.js.map +1 -0
- package/dist/directory-lake-keep.d.ts.map +1 -1
- package/dist/directory-lake-keep.js +7 -0
- package/dist/directory-lake-keep.js.map +1 -1
- package/dist/home-scope.d.ts +87 -0
- package/dist/home-scope.d.ts.map +1 -0
- package/dist/home-scope.js +110 -0
- package/dist/home-scope.js.map +1 -0
- package/dist/index.d.ts +19 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -6
- package/dist/index.js.map +1 -1
- package/dist/module-operations.d.ts +9 -0
- package/dist/module-operations.d.ts.map +1 -1
- package/dist/module-operations.js +22 -0
- package/dist/module-operations.js.map +1 -1
- package/dist/owned-reaps.d.ts +73 -0
- package/dist/owned-reaps.d.ts.map +1 -0
- package/dist/owned-reaps.js +71 -0
- package/dist/owned-reaps.js.map +1 -0
- package/dist/permission-checker.d.ts.map +1 -1
- package/dist/permission-checker.js +4 -2
- package/dist/permission-checker.js.map +1 -1
- package/dist/platform-sweep.d.ts +14 -1
- package/dist/platform-sweep.d.ts.map +1 -1
- package/dist/platform-sweep.js +117 -59
- package/dist/platform-sweep.js.map +1 -1
- package/dist/relay-intents.d.ts +38 -0
- package/dist/relay-intents.d.ts.map +1 -0
- package/dist/relay-intents.js +45 -0
- package/dist/relay-intents.js.map +1 -0
- package/dist/release-within-major.d.ts +54 -2
- package/dist/release-within-major.d.ts.map +1 -1
- package/dist/release-within-major.js +80 -6
- package/dist/release-within-major.js.map +1 -1
- package/dist/reserved-roles.d.ts +6 -1
- package/dist/reserved-roles.d.ts.map +1 -1
- package/dist/reserved-roles.js.map +1 -1
- package/dist/schedule-due.d.ts +88 -0
- package/dist/schedule-due.d.ts.map +1 -0
- package/dist/schedule-due.js +116 -0
- package/dist/schedule-due.js.map +1 -0
- package/dist/schedule-state.d.ts +1 -1
- package/dist/schedule-state.d.ts.map +1 -1
- package/dist/schedule-state.js +6 -0
- package/dist/schedule-state.js.map +1 -1
- package/dist/scope-copy-ledger.d.ts +5 -0
- package/dist/scope-copy-ledger.d.ts.map +1 -1
- package/dist/scope-copy-ledger.js +8 -0
- package/dist/scope-copy-ledger.js.map +1 -1
- package/dist/scope-copy.d.ts.map +1 -1
- package/dist/scope-copy.js +7 -1
- package/dist/scope-copy.js.map +1 -1
- package/dist/scope-host.d.ts +234 -3
- package/dist/scope-host.d.ts.map +1 -1
- package/dist/scope-host.js.map +1 -1
- package/dist/scope-store.d.ts +30 -6
- package/dist/scope-store.d.ts.map +1 -1
- package/dist/scope-store.js +30 -1
- package/dist/scope-store.js.map +1 -1
- package/dist/scope-types.d.ts +122 -3
- package/dist/scope-types.d.ts.map +1 -1
- package/dist/scope-types.js +172 -2
- package/dist/scope-types.js.map +1 -1
- package/dist/store-proof.d.ts +45 -0
- package/dist/store-proof.d.ts.map +1 -0
- package/dist/store-proof.js +97 -0
- package/dist/store-proof.js.map +1 -0
- package/package.json +2 -2
|
@@ -45,6 +45,11 @@ export declare const PENDING_COPY_KEEP_ALIVE_SQL = "\n UPDATE scopes SET expire
|
|
|
45
45
|
export declare const pendingCopyKeepAliveParams: (expiresAt: string | null, tenantId: string, scopeId: string, status: string, expectedExpiresAt: string | null, moveId: string, now: string) => (string | null)[];
|
|
46
46
|
/** Pending entries whose lease ran out before `?` (or that never had one), oldest first, `LIMIT ?`. */
|
|
47
47
|
export declare const COPY_EXPIRED_SQL = "\n SELECT tenant_id, scope_id, script_ref, move_id FROM scope_script_copies\n WHERE state = 'pending' AND (lease_until IS NULL OR lease_until <= ?)\n ORDER BY lease_until, tenant_id, scope_id, script_ref, move_id LIMIT ?";
|
|
48
|
+
/**
|
|
49
|
+
* K-69 (#3650): `COPY_EXPIRED_SQL` for one tenant, for the tenant's own alarm, so a tenant's claim
|
|
50
|
+
* never takes another tenant's entries. Params: now, tenantId, limit.
|
|
51
|
+
*/
|
|
52
|
+
export declare const COPY_EXPIRED_FOR_TENANT_SQL = "\n SELECT tenant_id, scope_id, script_ref, move_id FROM scope_script_copies\n WHERE state = 'pending' AND (lease_until IS NULL OR lease_until <= ?) AND tenant_id = ?\n ORDER BY lease_until, tenant_id, scope_id, script_ref, move_id LIMIT ?";
|
|
48
53
|
/** Claim one expired entry, re-checked in the write. Params: owner, leaseUntil, the key, now. */
|
|
49
54
|
export declare const COPY_CLAIM_SQL = "\n UPDATE scope_script_copies SET lease_owner = ?, lease_until = ?\n WHERE tenant_id = ? AND scope_id = ? AND script_ref = ? AND move_id = ?\n AND state = 'pending' AND (lease_until IS NULL OR lease_until <= ?)";
|
|
50
55
|
/** The move id every backfilled entry carries (#1722), which names it as one in a listing. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scope-copy-ledger.d.ts","sourceRoot":"","sources":["../src/scope-copy-ledger.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAElF;;;;;;;;;;;;;;;;;GAiBG;AAEH,8FAA8F;AAC9F,eAAO,MAAM,wBAAwB,4cAM0B,CAAC;AAEhE,eAAO,MAAM,kBAAkB,YAAa,yBAAyB,OAAO,MAAM,KAAG,MAAM,EACpD,CAAC;AAExC;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,kWAM2C,CAAC;AAE9E,eAAO,MAAM,qBAAqB,YACvB,yBAAyB,YAAY,MAAM,WAAW,MAAM,OAAO,MAAM,KACjF,CAAC,MAAM,GAAG,IAAI,CAAC,EAGjB,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,mgBAOiC,CAAC;AAElE,eAAO,MAAM,mBAAmB,aACpB,MAAM,WAAW,MAAM,UAAU,MAAM,cAAc,MAAM,OAAO,MAAM,KACjF,MAAM,EAAkD,CAAC;AAE5D,kGAAkG;AAClG,eAAO,MAAM,2BAA2B,kmBAIR,CAAC;AAEjC,eAAO,MAAM,0BAA0B,cAAe,MAAM,GAAG,IAAI,YAAY,MAAM,WAAW,MAAM,UAC5F,MAAM,qBAAqB,MAAM,GAAG,IAAI,UAAU,MAAM,OAAO,MAAM,KAAG,CAAC,MAAM,GAAG,IAAI,CAAC,EACjB,CAAC;AAEjF,uGAAuG;AACvG,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,OAAO,MAAM,KAAG,OAA2C,CAAC;AAE1H,6EAA6E;AAC7E,eAAO,MAAM,yBAAyB,iFAAiF,CAAC;AAExH,6CAA6C;AAC7C,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AAED,wFAAwF;AACxF,eAAO,MAAM,yBAAyB,6FACsD,CAAC;AAE7F,eAAO,MAAM,iBAAiB,MAAO,kBAAkB,KAAG,eAUxD,CAAC"}
|
|
@@ -73,6 +73,14 @@ export const COPY_EXPIRED_SQL = `
|
|
|
73
73
|
SELECT tenant_id, scope_id, script_ref, move_id FROM scope_script_copies
|
|
74
74
|
WHERE state = 'pending' AND (lease_until IS NULL OR lease_until <= ?)
|
|
75
75
|
ORDER BY lease_until, tenant_id, scope_id, script_ref, move_id LIMIT ?`;
|
|
76
|
+
/**
|
|
77
|
+
* K-69 (#3650): `COPY_EXPIRED_SQL` for one tenant, for the tenant's own alarm, so a tenant's claim
|
|
78
|
+
* never takes another tenant's entries. Params: now, tenantId, limit.
|
|
79
|
+
*/
|
|
80
|
+
export const COPY_EXPIRED_FOR_TENANT_SQL = `
|
|
81
|
+
SELECT tenant_id, scope_id, script_ref, move_id FROM scope_script_copies
|
|
82
|
+
WHERE state = 'pending' AND (lease_until IS NULL OR lease_until <= ?) AND tenant_id = ?
|
|
83
|
+
ORDER BY lease_until, tenant_id, scope_id, script_ref, move_id LIMIT ?`;
|
|
76
84
|
/** Claim one expired entry, re-checked in the write. Params: owner, leaseUntil, the key, now. */
|
|
77
85
|
export const COPY_CLAIM_SQL = `
|
|
78
86
|
UPDATE scope_script_copies SET lease_owner = ?, lease_until = ?
|
|
@@ -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,MAAM,CAAC,MAAM,qBAAqB,GAAG;;;;;;6EAMwC,CAAC;AAE9E,MAAM,CAAC,MAAM,qBAAqB,GAAG,CACnC,OAAkC,EAAE,QAAgB,EAAE,OAAe,EAAE,GAAW,EAC/D,EAAE,CAAC;IACtB,OAAO,CAAC,MAAM,EAAE,OAAO,CAAC,YAAY,EAAE,SAAS,IAAI,IAAI,EAAE,OAAO,CAAC,YAAY,EAAE,QAAQ,IAAI,IAAI;IAC/F,GAAG,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,MAAM;CACvC,CAAC;AAEF;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;;;;;;;iEAO8B,CAAC;AAElE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,QAAgB,EAAE,OAAe,EAAE,MAAc,EAAE,UAAkB,EAAE,GAAW,EACxE,EAAE,CAAC,CAAC,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,CAAC,CAAC;AAE5D,kGAAkG;AAClG,MAAM,CAAC,MAAM,2BAA2B,GAAG;;;;MAIrC,wBAAwB,EAAE,CAAC;AAEjC,MAAM,CAAC,MAAM,0BAA0B,GAAG,CA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AiF;AACjF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,KAAuB,EAAE,GAAW,EAAW,EAAE,CAAC,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,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":"AAKA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAGpD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,eAAO,MAAM,UAAU,gBAAiB,MAAM,GAAG,SAAS,iBAAiB,MAAM,GAAG,SA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'./capability.js';
|
|
2
2
|
import { DOWNLOAD_LINK_TABLE_NAMES } from './download-link.js';
|
|
3
|
+
import { STORE_PROOF_TABLE_NAMES } from './store-proof.js';
|
|
3
4
|
import { UPLOAD_LINK_TABLE_NAMES } from './upload-link.js';
|
|
4
5
|
import { clearSettledEmailIn, pendingEmailIds } from './email-intent.js';
|
|
5
6
|
/**
|
|
@@ -36,11 +37,16 @@ import { clearSettledEmailIn, pendingEmailIds } from './email-intent.js';
|
|
|
36
37
|
* consumer's position, so a copy's cursor acknowledges nothing at the source either.
|
|
37
38
|
*/
|
|
38
39
|
export const isCopyLoad = (destScopeId, sourceScopeId) => destScopeId === undefined || sourceScopeId !== destScopeId;
|
|
39
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* The capability tables — and the upload- and download-link tables, bearer links of the same kind,
|
|
42
|
+
* and the store proofs (#2996), bearer proofs of one store call — as `capabilitiesForLoad` matches a
|
|
43
|
+
* dump's (lowercased) names.
|
|
44
|
+
*/
|
|
40
45
|
const CAPABILITY_TABLES = new Set([
|
|
41
46
|
...CAPABILITY_TABLE_NAMES,
|
|
42
47
|
...UPLOAD_LINK_TABLE_NAMES,
|
|
43
48
|
...DOWNLOAD_LINK_TABLE_NAMES,
|
|
49
|
+
...STORE_PROOF_TABLE_NAMES,
|
|
44
50
|
]);
|
|
45
51
|
/**
|
|
46
52
|
* A dump's tables as a load into `destScopeId` takes them: **capability rows never cross a scope
|
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;AACzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,mBAAmB,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,CAAC,CAAC;IACrE,OAAO,SAAS,CAAC;AACnB,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,uFAAuF,CAAC;AAEnH;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAC9B,oHAAoH,CAAC"}
|
package/dist/scope-host.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ import type { VerticalScopeStore } from './vertical-scope-stores.js';
|
|
|
9
9
|
import type { DeploymentWireAuthFilter, DeploymentWireAuthInput, WireWalkAudit } from './deployment-wire-auth.js';
|
|
10
10
|
import type { StoreDriverApprovalRecord, StoreDriverHoldMode, StoreDriverRebuildFailure, StoreDriverRebuildRecord, StoreDriverReleaseRecord, StoreDriverRevokeWalkRecord, StoreDriverRolloutAction, StoreDriverRolloutRecord, StoreDriverRolloutState, StoreDriverRolloutTarget, StoreDriverState } from './store-driver-releases.js';
|
|
11
11
|
import type { SubjectRedactionCounts } from './subject-redaction.js';
|
|
12
|
-
import type { OnBehalfOf, ExportReadInput, ExportedBatch, ImportBatch, ImportedEvent, ImportResult, ImportState, ImportCursorMove, ImportCursorMoved, AdminAction, BecomeCapabilityInput, CapabilityExchange, CapabilityExchangeOptions, CapabilityFilter, CapabilityId, CapabilityPage, MintedCapability, ListPage, ConnectLink, ConnectLinkConsume, ConnectLinkFilter, ConnectLinkKey, ConsumeConnectLinkInput, MintConnectLinkInput, Connection, ConnectionFilter, ConnectionId, ConnectionGrant, ConnectionRevoke, ConnectionGrantRecord, ConnectionSecret, CreateConnectionInput, OpenConnection, ProjectedConnectionGrant, ProjectedConnectionKey, AccessLogEntry, DelegatedReadRecord, OwnerTransferAudit, MemberChangeAudit, PeerBindingAudit, ConnectionBindingAudit, CopyMarkAudit, OrphanSweepAudit, DeliveryRedriveAudit, BrokerDeadLetterAudit, BindHostnameInput, AdminLogEntry, OpsFailureEntry, PlatformRequestDrainTotalsEntry, SweepRunEntry, SweepRunKind, SweepRunOutcome, ModelUsageEntry, ModelUsageSummary, MarkupRow, MarkupRowInput, CapabilityGrant, CreateTenantInput, Decision, Instant, DomainEvent, DomainEventInput, PlatformRequestInput, PlatformRequestId, PlatformRequestEntry, PlatformRequestFilter, PlatformRequestStatus, PlatformRequestFailure, PlatformOutcomeEvent, EntitlementGrant, EntitlementGrantInput, EntitlementView, MeterReading, MeterDay, MeterDayTake, StaleScope, StaleScopeTake, VerticalOwnerPeriod, ScopeStorageSample, StorageGauge, RequestDay, RequestRollupDay, CostDay, EntityRef, IdentityLink, IdentityPool, Jurisdiction, ModuleId, ModuleManifest, ScheduleSpec, SystemGrant, PeerGrantsStatusEntry, SystemGrantsStatusEntry, SystemSwitchRecord, SystemSwitch, SystemSwitchResult, PeerCoverage, PeerSwitch, PeerSwitchResult, VerticalCaller, VerticalResolution, PeerBinding, AppEnvironment, PeerInstanceResolution, CreateOrgInput, Node, Org, OrgId, OrgMembership, PermissionKey, PlatformActorId, ChannelName, ExportBreak, ChannelHistoryEntry, DnsRecord, HostnameBinding, HostnameStatus, PromotionAcknowledgement, BindAcknowledgement, PublishVersionInput, RegisterVerticalInput, VerticalServingState, DeploymentWireAuth, RouteTarget, DirectoryDump, DirectoryCopyByReference, DirectoryDumpPage, ScopeDumpTable, IdentityMembership, PrincipalId, ResolvedIdentity, RoleAssignment, RoleDefinition, QueryScopeInput, ReadScopeTableInput, Scope, ScopeDump, ScopeDumpInput, SubjectShredReceipt, SubjectReadPage, SubjectReadRequest, SubjectAccessReceipt, 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, NotedTransition, VerticalTraceSampling } from '@substrat-run/contracts';
|
|
12
|
+
import type { OnBehalfOf, ExportReadInput, ExportedBatch, ImportBatch, ImportedEvent, ImportResult, ImportState, ImportCursorMove, ImportCursorMoved, AdminAction, BecomeCapabilityInput, CapabilityExchange, CapabilityExchangeOptions, CapabilityFilter, CapabilityId, CapabilityPage, MintedCapability, ListPage, ConnectLink, ConnectLinkConsume, ConnectLinkFilter, ConnectLinkKey, ConsumeConnectLinkInput, MintConnectLinkInput, Connection, ConnectionFilter, ConnectionId, ConnectionGrant, ConnectionRevoke, ConnectionGrantRecord, ConnectionSecret, CreateConnectionInput, OpenConnection, ProjectedConnectionGrant, ProjectedConnectionKey, AccessLogEntry, DelegatedReadRecord, OwnerTransferAudit, MemberChangeAudit, PeerBindingAudit, ConnectionBindingAudit, CopyMarkAudit, OrphanSweepAudit, DeliveryRedriveAudit, BrokerDeadLetterAudit, BindHostnameInput, AdminLogEntry, OpsFailureEntry, PlatformRequestDrainTotalsEntry, SweepRunEntry, SweepRunKind, SweepRunOutcome, ModelUsageEntry, ModelUsageSummary, MarkupRow, MarkupRowInput, CapabilityGrant, CreateTenantInput, Decision, Instant, DomainEvent, DomainEventInput, PlatformRequestInput, PlatformRequestId, PlatformRequestEntry, PlatformRequestFilter, PlatformRequestStatus, PlatformRequestFailure, PlatformOutcomeEvent, EntitlementGrant, EntitlementGrantInput, EntitlementView, MeterReading, MeterDay, MeterDayTake, StaleScope, StaleScopeTake, VerticalOwnerPeriod, ScopeStorageSample, StorageGauge, RequestDay, RequestRollupDay, CostDay, EntityRef, IdentityLink, IdentityPool, Jurisdiction, ModuleId, ModuleManifest, ScheduleSpec, SystemGrant, PeerGrantsStatusEntry, SystemGrantsStatusEntry, SystemSwitchRecord, SystemSwitch, SystemSwitchResult, PeerCoverage, PeerSwitch, PeerSwitchResult, VerticalCaller, VerticalResolution, PeerBinding, AppEnvironment, EnvironmentServing, EnvironmentServeAcknowledgement, EnvironmentEffects, ConnectionReach, PeerInstanceResolution, CreateOrgInput, Node, Org, OrgId, OrgMembership, PermissionKey, PlatformActorId, ChannelName, ExportBreak, ChannelHistoryEntry, DnsRecord, HostnameBinding, HostnameStatus, PromotionAcknowledgement, BindAcknowledgement, PublishVersionInput, RegisterVerticalInput, VerticalServingState, DeploymentWireAuth, RouteTarget, DirectoryDump, DirectoryCopyByReference, DirectoryDumpPage, ScopeDumpTable, IdentityMembership, PrincipalId, ResolvedIdentity, RoleAssignment, RoleDefinition, QueryScopeInput, ReadScopeTableInput, Scope, ScopeDump, ScopeDumpInput, SubjectShredReceipt, DependentErasure, OwedDependentErasure, SubjectReadPage, SubjectReadRequest, SubjectAccessReceipt, 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, NotedTransition, VerticalTraceSampling, StoreProof } from '@substrat-run/contracts';
|
|
13
13
|
import type { ConnectionUseOutcome } from './connector-calls.js';
|
|
14
14
|
import type { ScopeDelegation } from './delegation-ceiling.js';
|
|
15
15
|
import type { ByteBody } from './byte-stream.js';
|
|
@@ -505,6 +505,26 @@ export interface OperationContext {
|
|
|
505
505
|
* type that declares neither.
|
|
506
506
|
*/
|
|
507
507
|
entityState(entity: EntityRef): EntityStateName | null;
|
|
508
|
+
/**
|
|
509
|
+
* Mint the proof a scope-store call needs (#2996, K-64). A module operation does not call its
|
|
510
|
+
* store inside its transaction: it checks the permission key the vertical declared for
|
|
511
|
+
* `operation` on `binding` (`definePermissions({ stores })`) and records a proof, and host code
|
|
512
|
+
* makes the call with it through `getScopeStore(...).invoke(operation, input, proof)`, between two
|
|
513
|
+
* transactions. A second operation records the result.
|
|
514
|
+
*
|
|
515
|
+
* - **Checks the declared key** as the caller, scope-wide; a denial throws `PermissionDenied`, and
|
|
516
|
+
* a store operation with no declared key is refused `forbidden`, since nothing could prove it.
|
|
517
|
+
* - **Transactional.** The proof is a row in the scope's spine. A rollback takes it, so a proof
|
|
518
|
+
* from an operation that failed redeems nothing.
|
|
519
|
+
* - **Narrow and short.** Good for one call of `operation` on `binding` in this scope, by this
|
|
520
|
+
* principal's stub, within a minute; spent by that call whatever the store answers.
|
|
521
|
+
* - **A principal's operation only.** A consumer (whose checks allow unconditionally), a
|
|
522
|
+
* capability session, a peer, a system actor and a read-only impersonation are refused.
|
|
523
|
+
*
|
|
524
|
+
* Return the proof in the operation's output so the host code that called it can make the call.
|
|
525
|
+
* The secret is withheld from the invocation's idempotency record, as every kernel secret is.
|
|
526
|
+
*/
|
|
527
|
+
storeProof(binding: string, operation: string): Promise<StoreProof>;
|
|
508
528
|
/**
|
|
509
529
|
* One page of the TRASH of a declared entity (#119) — `ctx.page` over the trashed rows,
|
|
510
530
|
* with the declared trash key checked on EACH row inside the kernel, so a handler cannot
|
|
@@ -667,6 +687,26 @@ export interface OperationContext {
|
|
|
667
687
|
* `onEmitted`). Names only: a note whose type or states are not shaped like names is dropped.
|
|
668
688
|
*/
|
|
669
689
|
noteTransition(transition: NotedTransition): void;
|
|
690
|
+
/**
|
|
691
|
+
* #3540 (K-69): the schedule `operation`, declared `due: 'event'`, is due no later than `at`.
|
|
692
|
+
* The operation that creates the work a schedule acts on calls this in the same transaction, so
|
|
693
|
+
* the date rolls back with the work; and the schedule's own operation calls it for the earliest
|
|
694
|
+
* work its run left, since every run clears the date first.
|
|
695
|
+
*
|
|
696
|
+
* ```ts
|
|
697
|
+
* ctx.scheduleDue?.('absence/expire-stale', `${dayAfter(startDate)}T00:00:00.000Z`);
|
|
698
|
+
* ```
|
|
699
|
+
*
|
|
700
|
+
* It only ever moves a date earlier, and it does nothing until the schedule has run once under
|
|
701
|
+
* this form: its cadence decides until then, and that first run writes what it found. Making a
|
|
702
|
+
* schedule due grants nothing: it runs as its own module's system principal, with its declared
|
|
703
|
+
* input, and `ctx.check` is still its only gate. Refused for an operation that is not a
|
|
704
|
+
* due-by-event schedule a registered module declares (`schedule-due.ts`).
|
|
705
|
+
*
|
|
706
|
+
* Optional, so an engine can call it on a host older than it: absent there, the schedule runs on
|
|
707
|
+
* its cadence, which is what it did before. Call it as `ctx.scheduleDue?.(…)`.
|
|
708
|
+
*/
|
|
709
|
+
scheduleDue?(operation: string, at: Instant): void;
|
|
670
710
|
}
|
|
671
711
|
export type OperationHandler<I = unknown, O = unknown> = (ctx: OperationContext, input: I) => O | Promise<O>;
|
|
672
712
|
/**
|
|
@@ -870,6 +910,23 @@ export interface ScopeStub {
|
|
|
870
910
|
* around an operation can react to what the operation did without the module
|
|
871
911
|
* carrying a new surface.
|
|
872
912
|
*/
|
|
913
|
+
/**
|
|
914
|
+
* Who calls through `ScopeHost.getChildScope` (#2995): the calling scope, which the host holds to be
|
|
915
|
+
* the child's parent, and the actor the call acts for. These are the facts K-66's second envelope
|
|
916
|
+
* carries on the hosted path as the calling scope and the actor.
|
|
917
|
+
*/
|
|
918
|
+
export interface ChildScopeCaller {
|
|
919
|
+
/** The calling scope. A host refuses a child whose recorded parent is any other scope. */
|
|
920
|
+
readonly parentScopeId: ScopeId;
|
|
921
|
+
/**
|
|
922
|
+
* The person the call acts for, as the parent's own door named them. The app acting as itself,
|
|
923
|
+
* which K-64 allows where the child admits it, is not built: nothing yet says what a child admits.
|
|
924
|
+
*/
|
|
925
|
+
readonly actor: {
|
|
926
|
+
readonly kind: 'person';
|
|
927
|
+
readonly principal: PrincipalId;
|
|
928
|
+
};
|
|
929
|
+
}
|
|
873
930
|
/** `getScope`'s options: the person's door is the only one an address may arrive through. */
|
|
874
931
|
export interface PersonScopeOptions extends ScopeStubOptions {
|
|
875
932
|
/**
|
|
@@ -1329,6 +1386,21 @@ export interface ScheduleTick {
|
|
|
1329
1386
|
* is what keeps an older coordinator from leaving them to an alarm nothing would answer.
|
|
1330
1387
|
*/
|
|
1331
1388
|
alarmRunsPurges?: true;
|
|
1389
|
+
/**
|
|
1390
|
+
* #3540: the call comes from the scope's OWN alarm, which found work due by event: its purges
|
|
1391
|
+
* (as `purgeAlarm`) and its `due: 'event'` schedules whose date has come (`readScheduleDue`). A
|
|
1392
|
+
* cadence schedule is left to the pass. A host older than the field reads it as an ordinary pass,
|
|
1393
|
+
* which is why a coordinator sends it only through `runScopeDue`, which an older scope never asks.
|
|
1394
|
+
*/
|
|
1395
|
+
dueAlarm?: true;
|
|
1396
|
+
/**
|
|
1397
|
+
* #3540: the caller can take a scope alarm's `runScopeDue` call, so a `due: 'event'` schedule
|
|
1398
|
+
* that has run under that form may be left to the scope's alarm: the scope arms it and the pass
|
|
1399
|
+
* runs nothing. Absent, the pass runs it on its cadence, as it always did, which is what keeps an
|
|
1400
|
+
* older coordinator from leaving it to an alarm nothing would answer. Separate from
|
|
1401
|
+
* `alarmRunsPurges`, which a coordinator that cannot take that call already sends.
|
|
1402
|
+
*/
|
|
1403
|
+
alarmRunsDue?: true;
|
|
1332
1404
|
}
|
|
1333
1405
|
/**
|
|
1334
1406
|
* The host's clock (#812) — what `ctx.now()` reads.
|
|
@@ -2202,10 +2274,21 @@ export interface HostAdmin {
|
|
|
2202
2274
|
* (the control-plane API's in-place serve). A new major of a listed app is refused without it,
|
|
2203
2275
|
* and for an incoming version with no archive script (`deploymentRef` null), which no serve can
|
|
2204
2276
|
* put on a script of its own.
|
|
2277
|
+
*
|
|
2278
|
+
* **`earlierMajor` (K-65, #3539) releases the version into that earlier major instead**, on the
|
|
2279
|
+
* script it is served from (`earlierMajorReleaseTarget`: prod only, a caller that `servesMajors`,
|
|
2280
|
+
* an archive script, an earlier major still served, a version labelled in it). Every gate above is
|
|
2281
|
+
* judged against the version that major's script runs, in place of the channel's: the K-65
|
|
2282
|
+
* ranking within the major, the #2178 strand gate over the installs on that script, the scope
|
|
2283
|
+
* types they hold, the review binding, both checkpoints and the export breaks. The channel does
|
|
2284
|
+
* not move and no timeline row is written: what moves is the earlier major's serving record, after
|
|
2285
|
+
* the caller's upload (`setVerticalServing`'s `earlierMajor`). The audited `promoteVersion` row
|
|
2286
|
+
* names the major, and lands only while that major's script still runs the version judged.
|
|
2205
2287
|
*/
|
|
2206
2288
|
promoteVersion(actor: PlatformActorId, verticalSlug: string, channel: ChannelName, versionId: string, acknowledge?: PromotionAcknowledgement, options?: {
|
|
2207
2289
|
unlistedOnly?: boolean;
|
|
2208
2290
|
servesMajors?: boolean;
|
|
2291
|
+
earlierMajor?: number;
|
|
2209
2292
|
}): Promise<void>;
|
|
2210
2293
|
/**
|
|
2211
2294
|
* Which installed consumers promoting `versionId` to `channel` would break (#1705 PR 3): the
|
|
@@ -2338,9 +2421,19 @@ export interface HostAdmin {
|
|
|
2338
2421
|
* needs `expected` to be that state, non-null, on another ref; anything else is refused
|
|
2339
2422
|
* (`precondition_failed`) and writes nothing. No install moves: every scope on the earlier
|
|
2340
2423
|
* script stays there and runs what it ran, so the #2178 strand gate has nobody to judge.
|
|
2424
|
+
*
|
|
2425
|
+
* `earlierMajor` (K-65, #3539) records a release into that earlier major instead, served on its
|
|
2426
|
+
* own script: `state` is what that script now runs, and `expected` (required) what it ran, the
|
|
2427
|
+
* base the upload diffed its migration from. Only that major's entry of `earlierMajors` moves;
|
|
2428
|
+
* the current major's serving state is untouched. Its installs run the new version from this
|
|
2429
|
+
* moment, so it is judged as an in-place serve is, over them alone: the #2178 strand gate and the
|
|
2430
|
+
* scope types they hold. A compare-and-set (`releasedEarlierMajorJson`): refused
|
|
2431
|
+
* (`precondition_failed`) when the entry runs another version, class set or tag than `expected`,
|
|
2432
|
+
* or is served from another script than `state.ref`. Not combined with `supersede`.
|
|
2341
2433
|
*/
|
|
2342
2434
|
setVerticalServing(actor: PlatformActorId, verticalSlug: string, state: VerticalServingState, expected?: VerticalServingState | null, opts?: {
|
|
2343
2435
|
supersede?: SupersedeMajor;
|
|
2436
|
+
earlierMajor?: number;
|
|
2344
2437
|
}): Promise<void>;
|
|
2345
2438
|
/**
|
|
2346
2439
|
* The pushed DeployManifest (JSON) of one version — what a serve rebuilds upload
|
|
@@ -2482,12 +2575,14 @@ export interface HostAdmin {
|
|
|
2482
2575
|
* or a sweep that did), leasing each to `owner` until `leaseUntil`. An entry whose lease is
|
|
2483
2576
|
* live is never returned, so a move still in flight keeps it; and a move whose lease ran out
|
|
2484
2577
|
* can no longer confirm (`confirmMove`), so the claimant cannot lose a race to it.
|
|
2578
|
+
* K-69 (#3650): `tenantId` claims only that tenant's entries, for the tenant's own alarm.
|
|
2485
2579
|
*/
|
|
2486
2580
|
claimExpiredScopeScriptCopies(actor: PlatformActorId, input: {
|
|
2487
2581
|
now: string;
|
|
2488
2582
|
leaseUntil: string;
|
|
2489
2583
|
owner: string;
|
|
2490
2584
|
limit: number;
|
|
2585
|
+
tenantId?: TenantId;
|
|
2491
2586
|
}): Promise<ScopeScriptCopy[]>;
|
|
2492
2587
|
/** Reserve a scope for script cleanup only when no copy move is in flight. The claim is a
|
|
2493
2588
|
* column on the directory row, not a ledger entry: it refuses new moves and the conditional
|
|
@@ -2509,9 +2604,12 @@ export interface HostAdmin {
|
|
|
2509
2604
|
* The scope must be archived, in the same read as the write, so an unarchive that got in first wins and
|
|
2510
2605
|
* no store is fenced: `conflict`. `whileTenantDeleting` holds the tenant the same way. Asked again on a
|
|
2511
2606
|
* scope already marked it answers as before, whatever its status, for a reap's retry.
|
|
2607
|
+
* Automatic reap cutoffs also check the current archive or deletion date in the same write.
|
|
2512
2608
|
*/
|
|
2513
2609
|
markScopeStoresFenced(actor: PlatformActorId, tenantId: TenantId, scopeId: ScopeId, opts?: {
|
|
2514
2610
|
whileTenantDeleting?: boolean;
|
|
2611
|
+
archivedBy?: string;
|
|
2612
|
+
deletingBy?: string;
|
|
2515
2613
|
}): Promise<void>;
|
|
2516
2614
|
/** When `markScopeStoresFenced` was asked for this scope, or null: never, or no such scope. */
|
|
2517
2615
|
scopeStoresFencedAt(actor: PlatformActorId, tenantId: TenantId, scopeId: ScopeId): Promise<string | null>;
|
|
@@ -2709,6 +2807,14 @@ export interface HostAdmin {
|
|
|
2709
2807
|
changed: boolean;
|
|
2710
2808
|
previous: ScopeId | null;
|
|
2711
2809
|
}>;
|
|
2810
|
+
/**
|
|
2811
|
+
* The home scope of (tenant, app, environment), or null when there is none. Production (the
|
|
2812
|
+
* default) answers the app's earliest live install in the tenant: primary, parentless and of type
|
|
2813
|
+
* `home`, earliest by when it was provisioned, so a tenant with several installs finds the same one
|
|
2814
|
+
* every time. A named environment answers the preview it is a name over, when that is of type
|
|
2815
|
+
* `home`. Nothing is stored for it. Recorded as an admin read.
|
|
2816
|
+
*/
|
|
2817
|
+
homeScopeOf(actor: PlatformActorId, tenantId: TenantId, vertical: string, environment?: string): Promise<ScopeId | null>;
|
|
2712
2818
|
/**
|
|
2713
2819
|
* The app's environments in the tenant: production first, always (the tenant's installs, never
|
|
2714
2820
|
* stored, so an app that runs today reads as production with no step), then each named one, a
|
|
@@ -2728,7 +2834,11 @@ export interface HostAdmin {
|
|
|
2728
2834
|
environment: AppEnvironment;
|
|
2729
2835
|
created: boolean;
|
|
2730
2836
|
}>;
|
|
2731
|
-
/**
|
|
2837
|
+
/**
|
|
2838
|
+
* Take the name off; the preview stays. `prod` is refused. Audited when a row went. #3530 step 4:
|
|
2839
|
+
* refused (`conflict`) while the environment serves from a script of its own and its preview still
|
|
2840
|
+
* lives, since the preview's data is on that script: the preview is reaped first.
|
|
2841
|
+
*/
|
|
2732
2842
|
removeEnvironment(actor: PlatformActorId, input: {
|
|
2733
2843
|
tenantId: TenantId;
|
|
2734
2844
|
vertical: string;
|
|
@@ -2736,6 +2846,65 @@ export interface HostAdmin {
|
|
|
2736
2846
|
}): Promise<{
|
|
2737
2847
|
removed: boolean;
|
|
2738
2848
|
}>;
|
|
2849
|
+
/**
|
|
2850
|
+
* Record what an environment's own serving script runs (#3530 step 4), after an upload onto it
|
|
2851
|
+
* landed: compare-and-set on `expected` (the record the upload diffed from, null for the first
|
|
2852
|
+
* serve), refused with `precondition_failed` when the row moved since. `not_found` for a name that
|
|
2853
|
+
* is no environment; `conflict` for another script than the one it serves from. Audited.
|
|
2854
|
+
*
|
|
2855
|
+
* #3638 (D-83): refused (`conflict`, reason `environment_checkpoint`) when `next.versionId` changes
|
|
2856
|
+
* the permission digest or the migration digest against the version the environment serves (its own
|
|
2857
|
+
* script's, or before its first serve its preview's bound version) and `acknowledge` does not
|
|
2858
|
+
* acknowledge that change. Only this argument counts: a promote's acknowledgement, or one given to
|
|
2859
|
+
* another environment's serve, never does. The audit row records `acknowledged`, per environment.
|
|
2860
|
+
*/
|
|
2861
|
+
setEnvironmentServing(actor: PlatformActorId, input: {
|
|
2862
|
+
tenantId: TenantId;
|
|
2863
|
+
vertical: string;
|
|
2864
|
+
name: string;
|
|
2865
|
+
}, next: EnvironmentServing, expected: EnvironmentServing | null,
|
|
2866
|
+
/** The serve lease's claim: when given, the record lands only while that claim still holds it. */
|
|
2867
|
+
claim?: string,
|
|
2868
|
+
/** #3638: the checkpoints this serve acknowledges, in this environment alone. */
|
|
2869
|
+
acknowledge?: EnvironmentServeAcknowledgement): Promise<void>;
|
|
2870
|
+
/**
|
|
2871
|
+
* Take an environment's serve lease for `leaseMs` (#3530 step 4), so its serves run one at a time:
|
|
2872
|
+
* upload, record and bind. False while another live claim holds it; a lapsed one is taken over and
|
|
2873
|
+
* `claim`'s own is renewed. `not_found` for a name that is no environment. Not audited: it moves
|
|
2874
|
+
* nothing a reader sees, and the serve it guards is.
|
|
2875
|
+
*/
|
|
2876
|
+
claimEnvironmentServe(actor: PlatformActorId, input: {
|
|
2877
|
+
tenantId: TenantId;
|
|
2878
|
+
vertical: string;
|
|
2879
|
+
name: string;
|
|
2880
|
+
}, claim: string, leaseMs: number): Promise<boolean>;
|
|
2881
|
+
/** Give an environment's serve lease back, if `claim` still holds it. */
|
|
2882
|
+
releaseEnvironmentServe(actor: PlatformActorId, input: {
|
|
2883
|
+
tenantId: TenantId;
|
|
2884
|
+
vertical: string;
|
|
2885
|
+
name: string;
|
|
2886
|
+
}, claim: string): Promise<void>;
|
|
2887
|
+
/**
|
|
2888
|
+
* Give a named environment connections of its own, or take that back (#3530 step 6): a choice a
|
|
2889
|
+
* person makes per environment. `prod` and a name that is no environment are `not_found`. Audited
|
|
2890
|
+
* when it changed; `changed: false` writes nothing. Taking it back moves no connection.
|
|
2891
|
+
*/
|
|
2892
|
+
setEnvironmentEffects(actor: PlatformActorId, input: {
|
|
2893
|
+
tenantId: TenantId;
|
|
2894
|
+
vertical: string;
|
|
2895
|
+
name: string;
|
|
2896
|
+
}, effects: EnvironmentEffects): Promise<{
|
|
2897
|
+
changed: boolean;
|
|
2898
|
+
before: EnvironmentEffects;
|
|
2899
|
+
}>;
|
|
2900
|
+
/**
|
|
2901
|
+
* Which connections the scope's outside effects may go through (#3530 step 6, kernel
|
|
2902
|
+
* `connectionReachIn`): `all` for an install, `own` for the scope of a named environment given
|
|
2903
|
+
* connections of its own, `none` for everything else, a scope not on record or of another tenant
|
|
2904
|
+
* included. The rule every connection door asks. Not recorded as an access: it is the door's own
|
|
2905
|
+
* read, as `getScopeRecord` is.
|
|
2906
|
+
*/
|
|
2907
|
+
connectionReach(actor: PlatformActorId, tenantId: TenantId, scopeId: ScopeId): Promise<ConnectionReach>;
|
|
2739
2908
|
/**
|
|
2740
2909
|
* Persist a tenant. Idempotent on the id — re-creating an existing tenant is a
|
|
2741
2910
|
* no-op, not an error (control-plane.md §4.1). `status` starts `active` and
|
|
@@ -2776,7 +2945,9 @@ export interface HostAdmin {
|
|
|
2776
2945
|
* then calls this to clear the directory. Idempotent: re-running after a partial
|
|
2777
2946
|
* failure converges (the DELETEs and the status flip are all set-to-empty).
|
|
2778
2947
|
*/
|
|
2779
|
-
reapTenant(actor: PlatformActorId, tenantId: TenantId
|
|
2948
|
+
reapTenant(actor: PlatformActorId, tenantId: TenantId, opts?: {
|
|
2949
|
+
deletingBy?: string;
|
|
2950
|
+
}): Promise<void>;
|
|
2780
2951
|
/**
|
|
2781
2952
|
* The tenant registry — the directory's inventory (control-plane.md §4.5 console
|
|
2782
2953
|
* item 1). Ordered by tenant id (ULID = chronological); the cursor is a tenant id.
|
|
@@ -3515,6 +3686,26 @@ export interface HostAdmin {
|
|
|
3515
3686
|
}>;
|
|
3516
3687
|
/** Monotone directory fence against a carry from before subject erasure. */
|
|
3517
3688
|
scopeErasureEpoch(actor: PlatformActorId, tenantId: TenantId, scopeId: ScopeId): Promise<number>;
|
|
3689
|
+
/**
|
|
3690
|
+
* K-63 (#3624): keep what an erasure did at the apps that take their people from the erased
|
|
3691
|
+
* person's master, in one transaction. An `erased` outcome settles the dependent (its ledger row
|
|
3692
|
+
* goes); an `outstanding` one is owed (its row is kept, with its attempts, its last error, and
|
|
3693
|
+
* when it is next due, from `nextDependentErasureAt`). Writes one `eraseAtDependents` admin row
|
|
3694
|
+
* with the outcomes as `after`. Optional so a host without the ledger still compiles; the
|
|
3695
|
+
* platform refuses to report dependents it cannot keep (`reachDependents`).
|
|
3696
|
+
*/
|
|
3697
|
+
recordDependentErasures?(actor: PlatformActorId, tenantId: TenantId, subjectId: string, outcomes: readonly DependentErasure[]): Promise<void>;
|
|
3698
|
+
/**
|
|
3699
|
+
* K-63 (#3624): hold each dependent as owed an erasure, due now with no attempts, BEFORE the
|
|
3700
|
+
* master's erasure runs. A dependent already owed keeps its attempts and next try. Not audited:
|
|
3701
|
+
* the outcomes `recordDependentErasures` writes are, and this row is only the obligation.
|
|
3702
|
+
*/
|
|
3703
|
+
holdDependentErasures?(actor: PlatformActorId, tenantId: TenantId, subjectId: string, dependents: readonly {
|
|
3704
|
+
vertical: string;
|
|
3705
|
+
scopeId: ScopeId;
|
|
3706
|
+
}[]): Promise<void>;
|
|
3707
|
+
/** K-63 (#3624): the owed dependent erasures due at `now`, oldest due first, at most `limit`. */
|
|
3708
|
+
dueDependentErasures?(actor: PlatformActorId, now: string, limit: number): Promise<OwedDependentErasure[]>;
|
|
3518
3709
|
/** Finish an orchestrated erasure only after every script holding a copy has redacted it.
|
|
3519
3710
|
* The copy count fences a move that was recorded after the coordinator listed scripts;
|
|
3520
3711
|
* ledger rows are append-only, so a changed count means that inventory is stale. */
|
|
@@ -4367,6 +4558,15 @@ export interface ProvisionScopeInput {
|
|
|
4367
4558
|
* type is refused (`conflict`), and one naming none keeps the recorded type.
|
|
4368
4559
|
*/
|
|
4369
4560
|
scopeType?: string;
|
|
4561
|
+
/**
|
|
4562
|
+
* #2995 (K-64): the scope this one is a CHILD of, in the same tenant and app. Written by the
|
|
4563
|
+
* `provision-child` drain alone, with the scope the intent was drained from, and never from a
|
|
4564
|
+
* request body: no route carries it. The host refuses a link its declaration does not allow
|
|
4565
|
+
* (`childScopeRefusal`) before anything is written, and the link is fixed once written
|
|
4566
|
+
* (`provisionedParent`): a re-provision restates it or names none. A host that cannot keep the
|
|
4567
|
+
* link refuses the field rather than provisioning a scope without it.
|
|
4568
|
+
*/
|
|
4569
|
+
parentScopeId?: ScopeId;
|
|
4370
4570
|
/**
|
|
4371
4571
|
* Where `vertical` came from, which decides what it is held to. `'input'` (the default): a
|
|
4372
4572
|
* caller named it, and it must be a `verticalSlug`. `'copy'`: it is the stored vertical of a
|
|
@@ -4376,6 +4576,14 @@ export interface ProvisionScopeInput {
|
|
|
4376
4576
|
* no request body carries it.
|
|
4377
4577
|
*/
|
|
4378
4578
|
verticalSource?: 'input' | 'copy';
|
|
4579
|
+
/**
|
|
4580
|
+
* #3625 (K-64): this provision installs the app for the tenant, and so claims its home scope in
|
|
4581
|
+
* production. Set by the doors that install an app (the dashboard's, a manager's `provision-tenant`).
|
|
4582
|
+
* Refused (`conflict`), in the directory write's own unit, while the app has a live home scope in the
|
|
4583
|
+
* tenant (`secondHomeRefusal`). A provision without it is judged as before, so a sibling, a copy and
|
|
4584
|
+
* the scopes platform code and suites make are untouched.
|
|
4585
|
+
*/
|
|
4586
|
+
install?: boolean;
|
|
4379
4587
|
storageShape?: StorageShape;
|
|
4380
4588
|
jurisdiction?: Jurisdiction;
|
|
4381
4589
|
/**
|
|
@@ -4622,6 +4830,8 @@ export interface ScopeFilter extends ListPage {
|
|
|
4622
4830
|
/** One status or any of several — the console's All / Suspended / Archived tabs. */
|
|
4623
4831
|
status?: ScopeStatus | ScopeStatus[];
|
|
4624
4832
|
vertical?: string;
|
|
4833
|
+
/** #2995: the children of this scope only. A reap path lists those to reap before their parent. */
|
|
4834
|
+
parentScopeId?: ScopeId;
|
|
4625
4835
|
}
|
|
4626
4836
|
/**
|
|
4627
4837
|
* A directory row that does not read as a `Scope`. Its ids as stored and the names of the
|
|
@@ -5366,6 +5576,27 @@ export interface ScopeHost {
|
|
|
5366
5576
|
* provisioned for the scope's vertical, exactly like `attachments`.
|
|
5367
5577
|
*/
|
|
5368
5578
|
getCapabilityAttachments?(sessionToken: string, tenantId: TenantId, scopeId: ScopeId): Promise<ScopeAttachments>;
|
|
5579
|
+
/**
|
|
5580
|
+
* A person's stub on a CHILD scope, minted for host code of its parent (#2995, K-64): the door a
|
|
5581
|
+
* parent's app calls a child through, between two of its own transactions. No operation reaches a
|
|
5582
|
+
* child: there is no `ctx.scope(id).invoke()`. An ordered exchange commits the parent's intent
|
|
5583
|
+
* first, host code calls through this door, and a second operation in the parent records the
|
|
5584
|
+
* outcome; the two invocations share a request id, never a transaction.
|
|
5585
|
+
*
|
|
5586
|
+
* What it checks, before anything runs: the (tenant, child) pair as every door does; that the
|
|
5587
|
+
* caller's scope is the child's own parent (`childDoorRefusal`: a sibling, another scope's child or
|
|
5588
|
+
* another tenant's scope is `not_found`); that the child's type accepts `parent`; that the parent
|
|
5589
|
+
* is active; and then the child's lifecycle gates, as `getScope` applies them.
|
|
5590
|
+
*
|
|
5591
|
+
* What it grants: nothing. The stub acts as `caller.actor`'s person, and every check in the child
|
|
5592
|
+
* is that person's own grants in the child, under the child's own permissions. The parent holds
|
|
5593
|
+
* no standing access to its child, so a person who holds a role at the parent and none at the
|
|
5594
|
+
* child is refused there like anyone else.
|
|
5595
|
+
*
|
|
5596
|
+
* OPTIONAL: a host that does not keep parent links (the Durable Object host, until #2995's hosted
|
|
5597
|
+
* half lands) does not have it, and a caller feature-detects it.
|
|
5598
|
+
*/
|
|
5599
|
+
getChildScope?(caller: ChildScopeCaller, tenantId: TenantId, scopeId: ScopeId, options?: PersonScopeOptions): Promise<ScopeStub>;
|
|
5369
5600
|
/**
|
|
5370
5601
|
* A scope stub whose authority is ANOTHER VERTICAL of the same tenant (#1706) — the sixth door,
|
|
5371
5602
|
* beside the principal, connection, system, impersonation and capability ones, and a door
|