Repository navigation
Expand file tree
/
Copy pathindex.ts
More file actions
601 lines (556 loc) · 22.7 KB
/
Copy pathindex.ts
File metadata and controls
601 lines (556 loc) · 22.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
/**
* Security Module
*
* Provides security features for the ObjectStack microkernel:
* - Plugin signature verification
* - Permission and capability enforcement
*
* @module @objectstack/core/security
*/
export {
PluginSignatureVerifier,
type PluginSignatureConfig,
type SignatureVerificationResult,
} from './plugin-signature-verifier.js';
// Canonical Ed25519 artifact-signature contract (ADR-0025 F3), shared
// byte-for-byte with the cloud control plane's package-signing.
export {
SIGNATURE_ALG,
type KeyInput,
type ParsedSignature,
type PublisherVerifyResult,
type PluginArtifactVerifyResult,
generateEd25519KeyPair,
signPayload,
parseSignature,
verifyPayload,
counterSignPayload,
verifyPublisherSignature,
verifyPlatformSignature,
verifyPluginArtifact,
} from './plugin-artifact-signature.js';
// Per-file artifact integrity verification (ADR-0025 §3.2) — pure and
// portable like the signature contract above; consumed by the
// `os plugin publish` preflight and by `os plugin install`, which
// re-verifies at unpack (ADR-0025 §3.5 M1). The cloud control plane stores
// the artifact blob opaquely.
export {
verifyIntegrity,
formatIntegrityViolation,
type IntegrityFile,
type IntegrityViolation,
type IntegrityViolationKind,
type VerifyIntegrityResult,
} from './plugin-artifact-integrity.js';
// [ADR-0025 §3.5 M1] Reading an `.osplugin` (gunzip bounded, then ustar) — one
// reader for `os plugin install` and the runtime's boot-time loader, which
// re-reads the artifact an install kept. The writer stays with `os plugin build`.
export {
MAX_UNPACKED_ARTIFACT_BYTES,
readTar,
readTarGz,
sha256Hex,
type ArchiveFile,
} from './plugin-artifact-archive.js';
// [ADR-0025 §3.5 M1] The verdict the host that verified an installed plugin's
// artifact records against the plugin object, which `PluginLoader` reads: a
// plugin carrying a signature no host verified is refused.
export {
recordPluginArtifactVerdict,
pluginArtifactVerdict,
type PluginArtifactVerdict,
} from './plugin-artifact-verdict.js';
// The outbound HTTP signature scheme (`X-Objectstack-Signature`) — one
// definition shared by the messaging outbox and the flow `http` node's inline
// arm, which cannot import each other; `@objectstack/service-messaging`
// re-exports both names unchanged. Its timestamped form and the receiver's
// verifier for both forms live beside it (`@objectstack/trigger-api`'s
// inbound hook verifies through `verifyHttpSignature`).
export {
HTTP_SIGNATURE_HEADER,
HTTP_SIGNATURE_TOLERANCE_SECONDS,
signHttpBody,
signHttpBodyAt,
verifyHttpSignature,
type HttpSignatureVerdict,
} from './http-signature.js';
// [#12699 / ADR-0131 D7] The ONE fail-closed reader of the mounted `org-scoping`
// service's per-deployment keys — shared by the engine's schema registry
// (`platformGlobalObjects`: no organization column on a declared object) and
// plugin-security (`suppressUnboundedOrgAdminGrant`).
export {
readDeploymentOrgScopingEntitlement,
type DeploymentOrgScopingEntitlementReading,
type RefusedEntitlementKey,
} from './deployment-org-scoping-entitlement.js';
// [ADR-0131 D8] The ONE tenant read predicate — the Layer 0 verdict that
// plugin-security projects onto its `where` wall and the engine projects onto
// the driver's native scope (`DriverOptions.tenantId` / `tenantIds`).
export {
computeTenantLayer0Verdict,
type TenantLayer0Input,
} from './tenant-layer0-verdict.js';
// `PluginConfigValidator` / `createPluginConfigValidator` were RETIRED here on
// 2026-08-27 (#11982, ADR-0049 enforce-or-remove; recorded in ADR-0025 §3.7).
// The kernel never received a plugin's config to validate — factories close
// over it — so the class had zero live callers; plugins parse their own
// config at their own seam instead.
export {
PluginPermissionEnforcer,
SecurePluginContext,
createPluginPermissionEnforcer,
buildPermissionsFromGrants,
type PluginPermissions,
type PermissionCheckResult,
} from './plugin-permission-enforcer.js';
// Advanced security components (Phase 2)
export {
PluginPermissionManager,
type PermissionGrant,
type PermissionCheckResult as PluginPermissionCheckResult,
} from './permission-manager.js';
export {
PluginSandboxRuntime,
type SandboxContext,
type ResourceUsage,
} from './sandbox-runtime.js';
// `./security-scanner.js` was RETIRED in commit cc00df2f7 (ADR-0049 enforce-or-remove).
// `PluginSecurityScanner` and its two companion types (`ScanTarget`,
// `SecurityIssue`) shipped on this barrel and on `@objectstack/core`'s root
// barrel with zero constructors anywhere in this repo, in objectui at the
// pinned sha, or in any runtime, CLI or plugin-loader path -- the only one
// ever written stood in `packages/core/examples/phase2-integration.ts`, a
// demonstration. Four of its five scan methods could not return an issue at
// all, and the fifth read a vulnerability database whose
// only writer (`addVulnerability`) had zero callers -- so a `scan()` answered
// `status: 'passed'` for every plugin ever handed to it, including a malicious
// one. Plugin security scanning is NOT a platform capability; there is no
// replacement export. Repairing it -- a real vulnerability scanner -- is a
// feature with a design surface, and was refused rather than deferred.
export {
API_KEY_PREFIX,
hashApiKey,
generateApiKey,
extractApiKey,
parseScopes,
isExpired,
resolveApiKeyPrincipal,
resolveApiKeyAdmission,
effectiveTenancyPosture,
// [#23367, ruling A] The API-key lifecycle policy: its defaults, the source
// binding every face passes, and the branded refusal a face relays.
API_KEY_DEFAULT_EXPIRY_DAYS,
API_KEY_MAX_EXPIRY_DAYS,
API_KEY_INACTIVITY_DAYS,
API_KEY_LEGACY_GRACE_DAYS,
API_KEY_LAST_USED_STAMP_INTERVAL_MS,
API_KEY_EXPIRED_CODE,
API_KEY_INACTIVE_CODE,
API_KEY_REVOKED_CODE,
API_KEY_LIFECYCLE_REFUSAL_STATUS,
apiKeyLifecyclePolicySourceOf,
ApiKeyLifecycleRefusalError,
isApiKeyLifecycleRefusalError,
type ApiKeyLifecyclePolicySource,
type ApiKeyLifecycleCode,
type ApiKeyLifecycleRefusal,
type GeneratedApiKey,
type ApiKeyPrincipal,
type ApiKeyAdmission,
type ApiKeyRefusalReason,
type TenancyPostureSource,
} from './api-key.js';
// The one "does this user's ban hold" predicate: the key-admission seam and
// plugin-auth's session-shaped refusals all ask it.
export { isUserBanInForce, USER_BAN_FIELDS, type UserBanFields } from './user-ban.js';
// [#16013] The ONE try/catch CLASSIFICATION every admission seam performs on
// the `tenancy` read that feeds `effectiveTenancyPosture` above -- branded
// "never registered" stays quiet, every other rejection is the ADR-0112 outage
// (#13906 decision 1 option A). The RESOLUTION deliberately stays at each seam:
// how the service is reached, and why a missing async accessor stays quiet
// there, are per-seam facts a shared owner would have to erase or flag.
export {
classifyAdmissionTenancyPosture,
type TenancyServiceResolver,
} from './admission-tenancy-posture.js';
// [ruling record 6227928430, letter A] The ONE request-to-ExecutionContext
// composition the platform's doors call: the session read, the posture
// classification above, `resolveAuthzContext`, the localization, the ADR-0069
// gate and the assembly below, with the anonymous entry and the gate decided
// once and every door's intentional difference a named parameter.
export {
resolveRequestExecutionContext,
type RequestExecutionContextInput,
type RequestAuthService,
type EstablishedRequestSession,
type RequestAdmission,
} from './request-execution-context.js';
// The ONE own-row delete door (`DELETE <route>` removes one row, only the
// caller's own): read as the caller, check the owner column, remove as the
// system attributed to the caller. Each object supplies its door descriptor.
export {
ownRowDeleteCallerResolver,
registerOwnRowDeleteRoute,
removeOwnRow,
type OwnRowDeleteCallerSources,
type OwnRowDeleteDoor,
type OwnRowDeleteEngine,
type OwnRowDeleteRoutesDeps,
type OwnRowDeleteWords,
} from './own-row-delete-routes.js';
// [commit 6a180e42d] The LOUD failure an unreachable permission store raises, and the
// brand predicate a fail-closed `catch` uses to re-raise it instead of
// degrading an outage into a capability denial. Ruled 2026-08-30.
export {
AuthzStoreUnavailableError,
isAuthzStoreUnavailableError,
rethrowAuthzStoreUnavailable,
AUTHZ_STORE_UNAVAILABLE_STATUS,
AUTHZ_STORE_UNAVAILABLE_CODE,
AUTHZ_STORE_UNAVAILABLE_MESSAGE,
} from './authz-store-unavailable.js';
export {
resolveAuthzContext,
resolveUserAuthzGrants,
// [#10348] The ONE id-shaped platform-admin predicate (ADR-0068 D2). Every
// surface that only knows a user id asks this instead of re-reading
// `sys_*_permission_set` — the prohibition resolve-authz-context.ts states.
hasPlatformAdminStanding,
// [#20580] The session arm's membership check (#15409 ruling B), so the
// permission explainer resolves the user it explains through the same one.
vetOrganizationClaim,
// [ADR-0049, ADR-0131 D3, ADR-0126 §4] The one deactivation read of the
// security catalog — the `sys_metadata_activation` ledger, never a catalog
// row's `active` column — shared with the explainer and the security plugin.
readDisabledCatalogNames,
// [ADR-0131 D3/D4, ADR-0095 D3] A position, described as the resolver
// enforces it for a holder: the sets its definition grants in force, and how
// many people hold it in an organization — the position catalog's list reads
// these, never a second copy of the rule.
readPositionGrantsInForce,
countPositionHolders,
// [ADR-0138 D4] The guest entry's organization step, shared with the CRUD
// gate that raises D4's located refusal — one step, two askers.
resolveGuestOrganization,
resolveLocalizationContext,
// [ADR-0131 D3/D5] The Default Organization as the resolver reads it — the
// anchor of `single`-posture platform standing.
readDefaultOrganizationId,
type ResolvedAuthzContext,
type ResolveAuthzInput,
type UserAuthzGrants,
type ResolveUserAuthzGrantsOptions,
type ResolveLocalizationInput,
} from './resolve-authz-context.js';
// [ADR-0131 D3/D5] The ONE definition of the Default Organization (`slug =
// 'default'`, else the only organization), over a read each reader supplies:
// the boot invariant, the bootstrap, the tenancy service, the last-admin guard,
// the promotion and the ownership ceremony name the row the resolver names.
export {
DEFAULT_ORGANIZATION_SLUG,
findDefaultOrganization,
type DefaultOrganizationRead,
type DefaultOrganizationAnswer,
} from './default-organization.js';
// [ADR-0131 D5] The ONE anchor rule for platform standing: which
// `admin_full_access` grant anchors it, with the posture and the Default
// Organization as parameters. The resolver's §6b and plugin-auth's
// last-administrator guard (over the simulated Default Organization) ask it.
export {
organizationAnchorsPlatformStanding,
type PlatformStandingAnchorFacts,
} from './platform-standing-anchor.js';
// [ADR-0131 D8/D9] The ONE organization-reach rule: whose `sys_setting` rows a
// caller may draw on. `SettingsService` and the resolver's localization
// fallback ask it, each with its own posture source and failure policy.
export {
resolveOrganizationReach,
organizationReachAdmits,
organizationReachRowOwner,
organizationIdOf,
UNOWNED_ORGANIZATION_REACH,
type OrganizationReach,
type OrganizationReachFacts,
} from './organization-reach.js';
// [ADR-0131 D9, ADR-0138 D4] The ONE "which organization does a caller with no
// organization of its own act in?" decision. Two askers: the engine's
// system-context insert (`@objectstack/objectql`, which re-exports these same
// bindings) and the guest entry's organization step above.
export {
resolveSystemWriteOrganization,
type SystemWriteOrganizationDecision,
type SystemWriteRefusalReason,
} from './system-write-organization.js';
// [ADR-0138 D4] The located refusal an anonymous request meets where it needs
// an organization the deployment cannot resolve for it — a standard-catalog
// code (`NOT_IMPLEMENTED`), naming the missing site binding (D5).
export {
GuestOrganizationUnresolvedError,
isGuestOrganizationUnresolvedError,
GUEST_ORGANIZATION_UNRESOLVED_CODE,
GUEST_ORGANIZATION_UNRESOLVED_STATUS,
GUEST_ORGANIZATION_UNRESOLVED_MESSAGE,
type GuestOrganizationRefusalReason,
} from './guest-organization.js';
// [#18783] The EFFECTIVE object-permission map — ONE function behind both the
// `/auth/me/permissions` `objects` slot and `ISecurityService.getEffectiveObjectPermissions`
// (the map `current_user.can()` reads). The four folds moved here from
// plugin-hono-server, which re-exports them under the same names.
export {
buildEffectiveObjectPermissions,
// [#28877] The map's disabled-package accessor over an engine registry.
registryObjectPackageDisabled,
// [#30370] The map's external-write-gate accessor over an engine.
engineExternalWriteForbidden,
foldWildcardSuperUser,
clampManagedObjectWrites,
seedSuperUserRestrictedObjects,
annotateEffectiveApiOperations,
type ManagedSchemaLike,
type ApiExposureSchemaLike,
// [Ruling of record 6408558941] The `fields` slot and the one reading of a
// field-permission entry's vote under its row condition (`when`).
buildEffectiveFieldPermissions,
fieldPermissionVote,
// [ADR-0066 ⑧, ruling of record 6573563853] The one super-user predicate
// (row bypass and field vote alike) and the field merge's super-user vote.
holdsSuperuserBypass,
superuserFieldVote,
type FieldConditionVerdict,
type FieldPermissionEntryLike,
type EffectiveFieldPermissionsInputSet,
} from './effective-object-permissions.js';
// Commit f586f1a89 (maintainer ruling 2026-08-08, Option A) — the SINGLE ExecutionContext
// assembly shared by every transport entry point, with the anonymous face as
// two NAMED entries (fail-closed default / explicit guest) instead of drift.
export {
assembleExecutionContext,
assembleExecutionContextOrGuest,
ENTRY_EXECUTION_CONTEXT_FIELDS,
type EntryExecutionContextField,
type ExecutionContextEntryFields,
type ExecutionContextAssemblyInput,
type OAuthTokenProvenance,
type EntryLocalization,
} from './assemble-execution-context.js';
// ADR-0095 D2/D3 — the monotonic posture ladder: derivation from capability
// grants + the rung→injection-rule mapping and its tested invariants.
export {
POSTURE_LADDER,
POSTURE_RANK,
POSTURE_INJECTION_RULE,
derivePosture,
postureVisibleRows,
type PostureEvidence,
type LadderRow,
type LadderPrincipal,
} from './posture-ladder.js';
export {
isAuthGateAllowlisted,
evaluateAuthGate,
normalizeAuthGate,
matchInboundHookRoute,
// [#23287, ruling C′] The posture scope reader and the per-user posture
// computation the API-key admission seam asks.
authGateScope,
userAuthGateSourceOf,
accountScopeAuthGate,
type AuthGate,
type InboundHookRouteMatch,
type UserAuthGateSource,
} from './auth-gate.js';
// Managing API keys is a signed-in-session act on every data door: the one
// rule the runtime dispatcher's and RestServer's per-object gates ask.
export {
apiKeyManagementCredentialRefusal,
API_KEY_MANAGEMENT_READ_OPERATIONS,
API_KEY_MANAGEMENT_SESSION_REQUIRED_MESSAGE,
type ApiKeyManagementCredentialInput,
} from './api-key-management-credential.js';
// #2567 — the single anonymous-deny decision shared by every HTTP seam.
export {
shouldDenyAnonymous,
ANONYMOUS_DENY_BODY,
ANONYMOUS_DENY_STATUS,
ANONYMOUS_DENY_CODE,
ANONYMOUS_DENY_MESSAGE,
type AnonymousDenyInput,
} from './anonymous-deny.js';
// ADR-0091 D1/D2 — grant validity windows, the shared resolution-time predicate.
export { isGrantActive, isGrantExpired, type GrantValidityWindow } from './grant-validity.js';
// ADR-0131 D2–D4 — the ONE by-name read of the security catalog (positions,
// permission sets, capabilities) over the engine registry and the metadata
// service. It says a definition EXISTS under a name, never that it is in
// effect: the activation ledger is the authority for that
// (`readDisabledCatalogNames`, exported with the resolver below).
export {
createSecurityCatalogReader,
bindSecurityCatalogReader,
securityCatalogReaderOf,
type SecurityCatalogType,
type SecurityCatalogSourceName,
type SecurityCatalogRegistry,
type SecurityCatalogMetadataService,
type SecurityCatalogSources,
type SecurityCatalogEntry,
type SecurityCatalogReader,
} from './security-catalog.js';
// ADR-0131 D3/D4/D10 — the junction rows turned into the `permissionSets` each
// position definition carries. Applied by the upgrade ceremony (`os migrate`),
// never at boot.
export {
convertPositionBindingRows,
convertDeactivatedCatalogRows,
type ActivatableCatalogRow,
type CatalogLedgerRow,
type CatalogDeactivationConversion,
type CatalogRowForConversion,
type PositionBindingRow,
type PositionBindingConversionInput,
type PositionBindingFate,
type DanglingPositionBinding,
type PositionBindingConversion,
} from './position-binding-conversion.js';
// ADR-0131 D3/D10 — a Setup-authored catalog row turned into the definition it
// carries, so the upgrade ceremony (`os migrate`) can save it through the
// metadata door. Pure; applied by the ceremony, never at boot.
export {
permissionSetDefinitionFromRow,
type PermissionSetRowForDefinition,
} from './permission-set-row-definition.js';
export {
positionDefinitionFromRow,
type PositionRowForDefinition,
} from './position-row-definition.js';
export {
emailTemplateDefinitionFromRow,
type EmailTemplateRowForDefinition,
} from './email-template-row-definition.js';
// [commit f8eb73601] The measured read surface of the administrator derivation — the
// single source `plugin-auth`'s break-glass standing-key lists correspond to.
export {
ADMIN_STANDING_SURFACE,
ADMIN_STANDING_NON_TABLE_INPUTS,
ADMIN_STANDING_PLATFORM_ENUMERATION,
adminStandingTables,
adminStandingColumns,
type AdminStandingTable,
type AdminStandingNonTableInput,
type AdminStandingPlatformEnumeration,
} from './admin-standing-surface.js';
// [#11663 L2] The DEPLOYMENT-CONFIG anchor for PLATFORM_ADMIN — parse,
// normalization and match predicate for `OS_PLATFORM_OWNER_EMAIL`, consumed by
// `resolve-authz-context.ts` §6b-config. Exported so the sibling legs
// (plugin-auth's break-glass guard, plugin-security's bootstrap, the audit
// surface) ask the SAME question instead of re-implementing the parse — which
// is the whole reason the config read has exactly one home.
//
// [#11663 L5] ⛔ `reportLegacyPlatformAdminGrant` and
// `resetLegacyPlatformAdminGrantReport` are NO LONGER exported — they are gone.
// They carried L4's time-boxed migration notice, and L5 is that window's exit.
export {
PLATFORM_ADMIN_EMAIL_SEPARATOR,
normalizePlatformAdminEmail,
parsePlatformAdminEmails,
resolvePlatformAdminEmails,
resetPlatformAdminEmailMemo,
matchesConfiguredPlatformAdmin,
isConfiguredPlatformAdminEmail,
setPlatformAdminConfigSink,
type PlatformAdminEmailConfig,
type PlatformAdminConfigSink,
} from './platform-admin.js';
// [#7678] ADR-0090 D5/D9 — the audience-binding suggestion `?status=` vocabulary,
// shared by the runtime dispatcher's `/security` domain and the live REST route.
export {
AUDIENCE_BINDING_SUGGESTION_STATUSES,
AUDIENCE_BINDING_SUGGESTION_STATUS_VALUES,
isAudienceBindingSuggestionStatus,
unknownAudienceBindingSuggestionStatusMessage,
type AudienceBindingSuggestionStatus,
} from './audience-binding-suggestion-status.js';
// #7284 — the `__` operation-private-key convention, the CONSUMER half of the
// ExecutionContext lifecycle `assemble-execution-context.ts` opens. One owner
// for the rule three packages had hand-copied (#7141 / #7145 / #7204).
export {
OPERATION_PRIVATE_KEY_PREFIX,
withoutOperationPrivateKeys,
} from './operation-private-keys.js';
// #25653 — the provenance mark a hook's `runAs: 'system'` and an action body's
// elevation carry, so the identity-assignment refusal tells them from platform
// `sudo()` writes. Set by objectql and runtime, read by plugin-security.
export {
APP_AUTOMATION_ELEVATION,
markAppAutomationElevation,
appAutomationElevationOf,
carryAppAutomationElevation,
type AppAutomationElevation,
} from './app-automation-elevation.js';
// #28881 — the mark a flow run's system elevation carries so its record writes
// keep the write-time reference check. Set by service-automation, read by
// objectql.
export {
FLOW_WRITE_REFERENCE_CHECK,
markFlowWriteReferenceCheck,
keepsFlowWriteReferenceCheck,
} from './flow-write-reference-check.js';
// #30205 — a banned user's open work: the per-object counts, the optional bulk
// hand-over (both read and written as the caller), and the ban-in-force
// predicate objectql's write-time reference check refuses a new assignment by.
export {
USER_ASSIGNED_WORK_FIELD_CAP,
USER_WORK_TRANSFER_ROW_CAP,
USER_WORK_FAILURE_SAMPLE,
userAssignedWorkFields,
countUserAssignedWork,
transferUserAssignedWork,
UserWorkTransferRefusal,
type UserAssignedWorkField,
type UserWorkEngine,
type UserAssignedWorkCount,
type UserAssignedWorkSummary,
type UserWorkFailureDescriber,
type UserWorkTransferFailure,
type UserWorkTransferOutcome,
type UserWorkTransferReport,
} from './user-assigned-work.js';
// Ruling of record 6355206139 — the EXTERNAL rung's OWD seam: plugin-security
// stamps whether a held grant's RLS speaks, plugin-sharing floors the OWD.
export {
EXTERNAL_READ_GRANT_KEY,
EXTERNAL_WRITE_GRANT_KEY,
isExternalAudienceContext,
externalGrantSpeaks,
owdForAudience,
} from './external-owd-floor.js';
// The caller-scoped "which of these parent records can the caller read?" probe
// every parent-derived read gate asks (comments, activity, ledger, attachments,
// mail). One owner for the body two packages had hand-copied.
export {
resolveReadableParentIds,
type ReadableParentIdsEngine,
} from './readable-parent-ids.js';
// [#11968] Authorization caching SUBSTRATE, TTL-bounded and invalidated over a
// best-effort cross-node channel — the channel contract and the boot-time
// posture statement (#11633 §3, Fork 2 → B, ruled 2026-08-25). No cache lives
// here and nothing consumes these yet; leg B (#11967) is the first consumer.
// Read the channel module before using either: the TTL is the correctness
// contract, and a missed message is EXPECTED.
export {
AUTHZ_INVALIDATED_CHANNEL,
type AuthzInvalidationReason,
type AuthzInvalidatedPayload,
} from './authz-invalidation-channel.js';
export {
AUTHZ_GRANTS_CACHE_TTL_ENV,
resolveAuthzCachePosture,
readAuthzGrantsCacheTtlMs,
reportAuthzCachePosture,
type AuthzInvalidationBusState,
type AuthzCachePosture,
type AuthzCachePostureInput,
type AuthzCachePostureStatement,
type AuthzGrantsCacheTtlReading,
type AuthzPostureSink,
} from './authz-cache-posture.js';