Skip to content

index

@fungi.computer/app-release


@fungi.computer/app-release / index

Fixed, non-leaking input failure for one public parser boundary.

  • Error

new AppReleaseInputError(parserName): AppReleaseInputError

AppReleaseParserName

AppReleaseInputError

Error.constructor

readonly parserName: AppReleaseParserName


Fixed non-leaking input failure for one public catalog command.

  • Error

new AppReleaseCommandInputError(commandName): AppReleaseCommandInputError

AppReleaseCommandName

AppReleaseCommandInputError

Error.constructor

readonly commandName: AppReleaseCommandName


Fixed non-leaking failure when a foreign Store success is structurally invalid.

  • Error

new AppReleaseInvalidStoreResultError(): AppReleaseInvalidStoreResultError

AppReleaseInvalidStoreResultError

Error.constructor


Fixed conflict when one Release ID receives changed immutable input.

  • Error

new AppReleaseImmutableConflictError(): AppReleaseImmutableConflictError

AppReleaseImmutableConflictError

Error.constructor


Fixed failure when a new Release references an App that does not exist.

  • Error

new AppReleaseOwnerAppAbsentError(appId): AppReleaseOwnerAppAbsentError

AppId

AppReleaseOwnerAppAbsentError

Error.constructor

readonly appId: AppId


Fixed failure when a new public Surface references an App that does not exist.

  • Error

new AppReleaseSurfaceOwnerAppAbsentError(appId): AppReleaseSurfaceOwnerAppAbsentError

AppId

AppReleaseSurfaceOwnerAppAbsentError

Error.constructor

readonly appId: AppId


Fixed non-leaking failure when the injected App Release store is unavailable.

  • Error

new AppReleaseStoreUnavailableError(): AppReleaseStoreUnavailableError

AppReleaseStoreUnavailableError

Error.constructor


Fixed failure when artifact verification names no stored Release.

  • Error

new AppReleaseReleaseAbsentError(): AppReleaseReleaseAbsentError

AppReleaseReleaseAbsentError

Error.constructor


Fixed non-leaking failure when the injected artifact reader is unavailable.

  • Error

new AppReleaseArtifactUnavailableError(): AppReleaseArtifactUnavailableError

AppReleaseArtifactUnavailableError

Error.constructor


Fixed failure when the requested artifact cannot be found.

  • Error

new AppReleaseArtifactMissingError(): AppReleaseArtifactMissingError

AppReleaseArtifactMissingError

Error.constructor


Fixed failure when resolved artifact bytes do not match the expected digest.

  • Error

new AppReleaseArtifactDigestMismatchError(): AppReleaseArtifactDigestMismatchError

AppReleaseArtifactDigestMismatchError

Error.constructor


Fixed failure when a hostile artifact read cannot form a valid snapshot.

  • Error

new AppReleaseArtifactInvalidSnapshotError(): AppReleaseArtifactInvalidSnapshotError

AppReleaseArtifactInvalidSnapshotError

Error.constructor


Error thrown when a catalog operation is not implemented in this slice.

  • Error

new AppReleaseUnimplementedError(): AppReleaseUnimplementedError

AppReleaseUnimplementedError

Error.constructor


Fixed failure when a transition names no stored Release.

  • Error

new AppReleaseTransitionReleaseAbsentError(): AppReleaseTransitionReleaseAbsentError

AppReleaseTransitionReleaseAbsentError

Error.constructor


AppReleaseTransitionReleaseUnverifiedError

Section titled “AppReleaseTransitionReleaseUnverifiedError”

Fixed failure when promotion or rollback names an unverified Release.

  • Error

new AppReleaseTransitionReleaseUnverifiedError(): AppReleaseTransitionReleaseUnverifiedError

AppReleaseTransitionReleaseUnverifiedError

Error.constructor


AppReleaseTransitionArtifactIncompatibleError

Section titled “AppReleaseTransitionArtifactIncompatibleError”

Fixed failure when a website selection names a non-HTML artifact.

  • Error

new AppReleaseTransitionArtifactIncompatibleError(): AppReleaseTransitionArtifactIncompatibleError

AppReleaseTransitionArtifactIncompatibleError

Error.constructor


Fixed failure when promotion or rollback names a revoked Release.

  • Error

new AppReleaseTransitionReleaseRevokedError(): AppReleaseTransitionReleaseRevokedError

AppReleaseTransitionReleaseRevokedError

Error.constructor


Fixed failure when a transition names no stored public Surface.

  • Error

new AppReleaseTransitionSurfaceAbsentError(): AppReleaseTransitionSurfaceAbsentError

AppReleaseTransitionSurfaceAbsentError

Error.constructor


AppReleaseTransitionOwnershipConflictError

Section titled “AppReleaseTransitionOwnershipConflictError”

Fixed failure when a Release is owned by another App than its Surface.

  • Error

new AppReleaseTransitionOwnershipConflictError(): AppReleaseTransitionOwnershipConflictError

AppReleaseTransitionOwnershipConflictError

Error.constructor


AppReleaseTransitionIdempotencyConflictError

Section titled “AppReleaseTransitionIdempotencyConflictError”

Fixed failure when an idempotency key is reused for changed material input.

  • Error

new AppReleaseTransitionIdempotencyConflictError(): AppReleaseTransitionIdempotencyConflictError

AppReleaseTransitionIdempotencyConflictError

Error.constructor


Fixed, non-leaking failure when Cairn cannot issue a transition identity.

  • Error

new AppReleaseTransitionIdUnavailableError(): AppReleaseTransitionIdUnavailableError

AppReleaseTransitionIdUnavailableError

Error.constructor


Fixed non-leaking failure for malformed, absent, or unselected routes.

  • Error

new AppReleasePublicWebsiteNotFoundError(): AppReleasePublicWebsiteNotFoundError

AppReleasePublicWebsiteNotFoundError

Error.constructor


Fixed non-leaking failure when public delivery cannot be proven safe.

  • Error

new AppReleasePublicWebsiteUnavailableError(): AppReleasePublicWebsiteUnavailableError

AppReleasePublicWebsiteUnavailableError

Error.constructor

AppId = string & object

Opaque Global App identifier.

readonly appReleaseKind: "AppId"


ReleaseId = string & object

Opaque immutable Release identifier.

readonly appReleaseKind: "ReleaseId"


PublicSurfaceId = string & object

Opaque anonymous public-Surface identifier.

readonly appReleaseKind: "PublicSurfaceId"


ArtifactRef = string & object

Opaque, bounded artifact locator for an injected reader.

readonly appReleaseKind: "ArtifactRef"


IdempotencyKey = string & object

Caller-provided idempotency key for one control-plane operation.

readonly appReleaseKind: "IdempotencyKey"


SourceRevision = string & object

Pinned lowercase Git source revision.

readonly appReleaseKind: "SourceRevision"


Sha256Digest = string & object

Lowercase SHA-256 digest with its sha256: prefix.

readonly appReleaseKind: "Sha256Digest"


StableRoute = string & object

Canonical, local origin-relative stable route for a public Surface.

readonly appReleaseKind: "StableRoute"


AppTransitionId = CairnId<"app-release", "transition", 1>>

Cairn-issued opaque identity for one owner-issued App transition.


ImmutableArtifactBytes = object

Immutable artifact bytes exposed only through fresh copies.

readonly byteLength: number

The immutable snapshot’s bounded byte length.

copy(): Uint8Array

Return an independently mutable copy of the immutable snapshot.

Uint8Array


ArtifactProvenance = object

Source and build facts permanently bound to a Release artifact.

readonly sourceRevision: SourceRevision

Pinned source revision from which the artifact was built.

readonly sourceTreeDigest: Sha256Digest

Digest of the source tree used for the build.

readonly buildRecipeDigest: Sha256Digest

Digest of the deterministic build recipe.


ReleaseArtifact = object

Immutable artifact identity and provenance bound to a Release.

readonly artifactRef: ArtifactRef

Opaque reference resolved only by the injected reader.

readonly artifactDigest: Sha256Digest

Digest expected from the resolved artifact bytes.

readonly provenance: ArtifactProvenance

Write-once source and build provenance.


App = object

Global App record owned by the catalog.

readonly appId: AppId

Opaque App identity.


Release = object

Immutable App Release record.

readonly releaseId: ReleaseId

Opaque immutable Release identity.

readonly appId: AppId

App that owns this Release.

readonly artifact: ReleaseArtifact

Immutable artifact identity and provenance.


PublicSurface = object

Anonymous website Surface and its explicit App owner.

readonly publicSurfaceId: PublicSurfaceId

Opaque public-Surface identity.

readonly appId: AppId

App that owns this Surface.

readonly stableRoute: StableRoute

Canonical local route locator for this Surface.


ArtifactMediaType = "text/html; charset=utf-8" | "application/vnd.fungi.app-backend+json" | "application/vnd.fungi.app-assets+json" | "application/vnd.fungi.app+json"

Supported immutable artifact representation formats.


VerifiedAppArtifactReference = Readonly<{ artifactRef: ArtifactRef; digest: Sha256Digest; mediaType: Exclude<ArtifactMediaType, "application/vnd.fungi.app+json">>; version: string; byteLength: number; }>

One immutable child reference retained after App publication verification.


DurableBackend = Readonly<{ runtime: Readonly<{ kind: "durable-facet"; stateSchema: number; }>; compatibilityDate: string; exportName: string; code: string; }>

Executable descriptor decoded from one verified backend child artifact.


VerifiedBackendProfile = Omit<DurableBackend, "code">>

Backend facts needed for admission, with executable code deliberately absent.


VerifiedAppDescription = Readonly<{ format: "fungi-app-v1"; ui: VerifiedAppArtifactReference | null; backend: Readonly<{ artifact: VerifiedAppArtifactReference; profile: VerifiedBackendProfile; }> | null; }>

Normalized immutable App description persisted by the verification owner.


ResolvedAppMetadata = Readonly<{ release: Release; digest: Sha256Digest; description: VerifiedAppDescription; }>

Verified metadata returned without reading any artifact body.


PublicSurfaceAuthority = Readonly<{ currentReleaseId: ReleaseId; sequence: number; app: App; release: Release; surface: PublicSurface; digest: Sha256Digest; revocation: ReleaseRevocation; description: VerifiedAppDescription; }>

Current metadata-only authority for one selected public Surface.


VerifiedArtifactRead = object

Successful, verified artifact read.

readonly kind: "verified"

Discriminant for a verified immutable representation snapshot.

readonly digest: Sha256Digest

Computed digest matching the requested digest.

readonly mediaType: ArtifactMediaType

Explicit artifact formats; an asset root is never interpreted as HTML or backend code.

readonly bytes: ImmutableArtifactBytes

Immutable representation byte snapshot.

readonly byteLength: number

Byte length matching the immutable snapshot.


AppUi = Omit<VerifiedArtifactRead, "kind" | "mediaType"> > & object

Verified UI representation; selection authority remains with its host.

readonly mediaType: "text/html; charset=utf-8" | "application/vnd.fungi.app-assets+json"


AppDescription = Readonly<{ ui: AppUi | null; backend: Readonly<{ digest: Sha256Digest; descriptor: DurableBackend; }> | null; }>

Normalized immutable code description shared by Surface and facet consumers.


ResolvedApp = AppDescription & Readonly<{ release: Release; digest: Sha256Digest; }>

One eligible Release with all declared executable parts resolved.


ArtifactReadResult = VerifiedArtifactRead | { kind: "unavailable"; } | { kind: "missing"; } | { kind: "digest-mismatch"; actualDigest: Sha256Digest; }

Closed result union returned by an injected artifact reader.


ArtifactVerificationIntent = "publication"

Names the owner-controlled verification work requested for one read.


ArtifactReader = object

Storage-neutral port that resolves an opaque reference and verifies bytes.

read(input): Promise<ArtifactReadResult>>

Resolve and verify exactly one expected immutable artifact.

ArtifactRef

Opaque artifact reference; never a storage capability.

Sha256Digest

Digest that the resolved bytes must match.

{ version: string; byteLength: number; }

Child reference pins the native object version as well as its content.

string

number

ArtifactVerificationIntent

Publication asks the reader to verify every object named by an asset manifest. Omitted for ordinary delivery, which verifies one requested object at the asset handler boundary.

Promise<ArtifactReadResult>


AppReleaseStoreFailure = object

Closed infrastructure failure projected by an App Release store.

readonly kind: "unavailable"


AppReleaseStoreSuccess<Value> > = object

Closed successful outcome for one App Release store operation.

Value

readonly kind: "success"

readonly value: Value


AppReleaseStoreOperationFailure = object

Closed failed outcome for one App Release store operation.

readonly kind: "failure"

readonly failure: AppReleaseStoreFailure


AppReleaseStoreResult<Value> > = AppReleaseStoreSuccess<Value> > | AppReleaseStoreOperationFailure

Closed envelope returned by every App Release store operation.

Value


AppRead = { kind: "found"; app: App; } | { kind: "absent"; }

Explicit result of looking up one Global App.


AppCreate = { kind: "created"; app: App; } | { kind: "existing"; app: App; }

Explicit result of atomically creating or observing one Global App.


ReleaseRead = { kind: "found"; release: Release; } | { kind: "absent"; }

Explicit result of looking up one immutable Release.


ReleaseCreate = { kind: "created"; release: Release; } | { kind: "existing"; release: Release; }

Explicit result of atomically creating or observing one immutable Release.


PublicSurfaceRead = { kind: "found"; surface: PublicSurface; } | { kind: "absent"; }

Explicit result of looking up one App-owned anonymous public Surface.


PublicSurfaceCreate = { kind: "created"; surface: PublicSurface; } | { kind: "existing"; surface: PublicSurface; }

Explicit result of atomically creating or observing one public Surface.


ReleaseVerification = { kind: "verified"; digest: Sha256Digest; mediaType: "application/vnd.fungi.app+json"; description: VerifiedAppDescription; } | { kind: "unverified"; }

Verification fact retained after a valid immutable artifact snapshot.


ReleaseRevocation = { kind: "active"; } | { kind: "revoked"; }

Revocation fact retained independently from immutable Release bytes.


ReleaseLifecycle = { kind: "found"; release: Release; verification: ReleaseVerification; revocation: ReleaseRevocation; } | { kind: "absent"; }

Durable Release facts observed by transition policy.


PublicSurfaceLifecycle = { kind: "found"; surface: PublicSurface; selection: { kind: "none"; } | { kind: "selected"; releaseId: ReleaseId; }; } | { kind: "absent"; }

Durable public-Surface selection fact observed by transition policy.


PublicWebsiteRepresentation = Readonly<{ releaseId: ReleaseId; digest: Sha256Digest; mediaType: "text/html; charset=utf-8"; byteLength: number; bytes: ImmutableArtifactBytes; }>

Safe immutable website bytes selected by the current Surface authority.


PublicAssetBuildRepresentation = Omit<PublicWebsiteRepresentation, "mediaType"> > & object

Verified root manifest selected by the existing public Surface owner.

readonly mediaType: "application/vnd.fungi.app-assets+json"


TransitionLookup = { kind: "absent"; } | { kind: "found"; receipt: TransitionReceipt; } | { kind: "conflict"; }

Result of looking up an operation-scoped idempotency key.


TransitionPersistence = { kind: "created"; receipt: TransitionReceipt; } | { kind: "existing"; receipt: TransitionReceipt; } | { kind: "conflict"; } | { kind: "identity-collision"; } | { kind: "lifecycle-conflict"; }

Result of atomically recording one transition and its receipt.


PromiseAppReleaseStore = object

Effect-free projection of the App Release store boundary.

readonly optional readReleaseLifecycle?: (releaseId) => Promise<AppReleaseStoreResult<ReleaseLifecycle>>>>

Read immutable Release facts needed by owner-issued transitions.

ReleaseId

Promise<AppReleaseStoreResult<ReleaseLifecycle>>

readonly optional recordReleaseVerification?: (input) => Promise<AppReleaseStoreResult<{ kind: "recorded"; }>>

Atomically retain that one Release artifact was successfully verified.

ReleaseId

Sha256Digest

"application/vnd.fungi.app+json"

VerifiedAppDescription

Promise<AppReleaseStoreResult<{ kind: "recorded"; }>>

readonly optional readTransition?: (request) => Promise<AppReleaseStoreResult<TransitionLookup>>>>

Read one operation-scoped transition receipt before policy checks.

ReleaseTransition

Promise<AppReleaseStoreResult<TransitionLookup>>

readonly optional persistTransition?: (request, receipt) => Promise<AppReleaseStoreResult<TransitionPersistence>>>>

Atomically persist a validated transition and its terminal receipt.

ReleaseTransition

TransitionReceipt

Promise<AppReleaseStoreResult<TransitionPersistence>>

readApp(appId): Promise<AppReleaseStoreResult<AppRead>>>>

Look up one App by its opaque identifier.

AppId

Promise<AppReleaseStoreResult<AppRead>>

createAppIfAbsent(app): Promise<AppReleaseStoreResult<AppCreate>>>>

Create an App if absent, or return the immutable existing record.

App

Promise<AppReleaseStoreResult<AppCreate>>

readRelease(releaseId): Promise<AppReleaseStoreResult<ReleaseRead>>>>

Look up one immutable Release by its opaque identifier.

ReleaseId

Promise<AppReleaseStoreResult<ReleaseRead>>

createReleaseIfAbsent(release): Promise<AppReleaseStoreResult<ReleaseCreate>>>>

Create a Release if absent, or return the immutable existing record.

Release

Promise<AppReleaseStoreResult<ReleaseCreate>>

readPublicSurface(publicSurfaceId): Promise<AppReleaseStoreResult<PublicSurfaceRead>>>>

Look up one public Surface by its opaque identifier.

PublicSurfaceId

Promise<AppReleaseStoreResult<PublicSurfaceRead>>

createPublicSurfaceIfAbsent(surface): Promise<AppReleaseStoreResult<PublicSurfaceCreate>>>>

Create a public Surface if absent, or return the immutable existing record.

PublicSurface

Promise<AppReleaseStoreResult<PublicSurfaceCreate>>


ReleaseTransition = { kind: "promotion"; publicSurfaceId: PublicSurfaceId; releaseId: ReleaseId; idempotencyKey: IdempotencyKey; } | { kind: "rollback"; publicSurfaceId: PublicSurfaceId; releaseId: ReleaseId; idempotencyKey: IdempotencyKey; } | { kind: "revocation"; releaseId: ReleaseId; idempotencyKey: IdempotencyKey; }

Owner-issued transition request.


TransitionReceipt = object

Terminal receipt for an owner-issued transition.

readonly transition: ReleaseTransition

readonly transitionId: AppTransitionId


AppReleaseCatalogOptions = object

Inputs for the catalog factory.

readonly artifactReader: ArtifactReader

readonly store: PromiseAppReleaseStore

readonly optional artifactPolicy?: object

readonly maxBytes: number

readonly optional maxManifestBytes?: number


AppReleaseCatalog = object

Public App Release catalog and public-website resolution seam.

createApp(app): Promise<App>>

Create an App once and return the canonical stored record.

App

Promise<App>

createRelease(release): Promise<Release>>

Create a Release once and return the canonical stored record.

Release

Promise<Release>

verifyReleaseArtifact(releaseId): Promise<VerifiedArtifactRead>>

Resolve and verify the immutable artifact bound to a Release.

ReleaseId

Promise<VerifiedArtifactRead>

resolveEligibleReleaseArtifact(releaseId): Promise<VerifiedArtifactRead & object>>

Read one verified, active Release snapshot and recheck its lifecycle. The caller owns selection authorization and must resolve before each use.

ReleaseId

Promise<VerifiedArtifactRead & object>

resolveEligibleApp(releaseId): Promise<ResolvedApp>>

Resolve the UI and backend bound by one eligible immutable Release.

ReleaseId

Promise<ResolvedApp>

resolveEligibleAppMetadata(releaseId): Promise<Readonly<{ release: Release; digest: Sha256Digest; description: VerifiedAppDescription; }>>

Resolve verified App metadata without reading any artifact body.

ReleaseId

Promise<Readonly<{ release: Release; digest: Sha256Digest; description: VerifiedAppDescription; }>>

resolvePublicSurfaceAuthority(stableRoute): Promise<Readonly<{ currentReleaseId: ReleaseId; sequence: number; app: App; release: Release; surface: PublicSurface; digest: Sha256Digest; revocation: ReleaseRevocation; description: VerifiedAppDescription; }>>

Resolve one selected Surface’s current metadata authority without bodies.

StableRoute

Promise<Readonly<{ currentReleaseId: ReleaseId; sequence: number; app: App; release: Release; surface: PublicSurface; digest: Sha256Digest; revocation: ReleaseRevocation; description: VerifiedAppDescription; }>>

resolvePublicSurfaceAuthorityVersion(stableRoute, releaseId): Promise<Readonly<{ currentReleaseId: ReleaseId; sequence: number; app: App; release: Release; surface: PublicSurface; digest: Sha256Digest; revocation: ReleaseRevocation; description: VerifiedAppDescription; }>>

Resolve one previously selected Release’s current metadata authority.

StableRoute

ReleaseId

Promise<Readonly<{ currentReleaseId: ReleaseId; sequence: number; app: App; release: Release; surface: PublicSurface; digest: Sha256Digest; revocation: ReleaseRevocation; description: VerifiedAppDescription; }>>

createPublicSurface(surface): Promise<PublicSurface>>

Create a public Surface once and return the canonical stored record.

PublicSurface

Promise<PublicSurface>

transition(request): Promise<TransitionReceipt>>

Apply one owner-issued promotion, rollback, or revocation request.

ReleaseTransition

Promise<TransitionReceipt>

resolvePublicAssetBuild(stableRoute): Promise<PublicAssetBuildRepresentation>>

Resolve an asset-build root through the same current Surface authority.

StableRoute

Promise<PublicAssetBuildRepresentation>

resolvePublicAssetBuildVersion(stableRoute, releaseId): Promise<PublicAssetBuildRepresentation>>

Resolve a pinned asset-build root through Surface authority.

StableRoute

ReleaseId

Promise<PublicAssetBuildRepresentation>

resolvePublicWebsite(stableRoute): Promise<Readonly<{ releaseId: ReleaseId; digest: Sha256Digest; mediaType: "text/html; charset=utf-8"; byteLength: number; bytes: ImmutableArtifactBytes; }>>

Resolve the current eligible immutable website representation.

StableRoute

Promise<Readonly<{ releaseId: ReleaseId; digest: Sha256Digest; mediaType: "text/html; charset=utf-8"; byteLength: number; bytes: ImmutableArtifactBytes; }>>

resolvePublicWebsiteVersion(stableRoute, releaseId): Promise<Readonly<{ releaseId: ReleaseId; digest: Sha256Digest; mediaType: "text/html; charset=utf-8"; byteLength: number; bytes: ImmutableArtifactBytes; }>>

Resolve a pinned eligible immutable website representation.

StableRoute

ReleaseId

Promise<Readonly<{ releaseId: ReleaseId; digest: Sha256Digest; mediaType: "text/html; charset=utf-8"; byteLength: number; bytes: ImmutableArtifactBytes; }>>


AppReleaseParserName = "AppId" | "ReleaseId" | "PublicSurfaceId" | "ArtifactRef" | "IdempotencyKey" | "SourceRevision" | "Sha256Digest" | "StableRoute" | "AppTransitionId"

Names the parser boundary that rejected an untrusted value.


AppReleaseCommandName = "createApp" | "createRelease" | "verifyReleaseArtifact" | "resolveEligibleReleaseArtifact" | "resolveEligibleAppMetadata" | "resolvePublicSurfaceAuthority" | "resolvePublicSurfaceAuthorityVersion" | "createPublicSurface" | "transition"

Names a public catalog command whose hostile input was rejected.

const parseAppId: (input) => string & object

Parse an opaque Global App identifier.

unknown

string & object


const parseAppTransitionId: (input) => AppTransitionId

Parse a Cairn-issued App transition identity.

unknown

AppTransitionId


const parseReleaseId: (input) => string & object

Parse an opaque immutable Release identifier.

unknown

string & object


const parsePublicSurfaceId: (input) => string & object

Parse an opaque anonymous public-Surface identifier.

unknown

string & object


const parseArtifactRef: (input) => string & object

Parse an opaque bounded artifact reference.

unknown

string & object


const parseIdempotencyKey: (input) => string & object

Parse a caller-provided idempotency key.

unknown

string & object


const parseSourceRevision: (input) => string & object

Parse a pinned lowercase Git source revision.

unknown

string & object


const parseSha256Digest: (input) => string & object

Parse a lowercase SHA-256 digest.

unknown

string & object


const parseStableRoute: (input) => string & object

Parse a canonical local origin-relative stable route.

unknown

string & object

createAppReleaseCatalog(options): AppReleaseCatalog

Create the App Release catalog.

The default Promise facade adapts each foreign port once before calling the same Effect-native core.

AppReleaseCatalogOptions

AppReleaseCatalog