Skip to content

effect

@fungi.computer/app-release


@fungi.computer/app-release / effect

AppReleaseCoreFailure = AppReleaseImmutableConflictError | AppReleaseOwnerAppAbsentError | AppReleaseSurfaceOwnerAppAbsentError | AppReleaseStoreUnavailableError | AppReleaseReleaseAbsentError | AppReleaseArtifactUnavailableError | AppReleaseArtifactMissingError | AppReleaseArtifactDigestMismatchError | AppReleaseArtifactInvalidSnapshotError | AppReleaseCommandInputError | AppReleaseInvalidStoreResultError | AppReleaseTransitionIdempotencyConflictError | AppReleaseTransitionOwnershipConflictError | AppReleaseTransitionReleaseAbsentError | AppReleaseTransitionReleaseRevokedError | AppReleaseTransitionReleaseUnverifiedError | AppReleaseTransitionArtifactIncompatibleError | AppReleaseTransitionSurfaceAbsentError | AppReleaseTransitionIdUnavailableError | AppReleasePublicWebsiteNotFoundError | AppReleasePublicWebsiteUnavailableError

Closed domain failures that the core maps from store outcomes.


AppReleaseCore = object

Effect-native core for the narrow App and immutable Release catalog facts.

createApp(app): Effect<App, AppReleaseCoreFailure>>

Create or observe one Global App through the owned store port.

App

Effect<App, AppReleaseCoreFailure>

createRelease(release): Effect<Release, AppReleaseCoreFailure>>

Create or observe one immutable Release through the owned store port.

Release

Effect<Release, AppReleaseCoreFailure>

verifyReleaseArtifact(releaseId): Effect<VerifiedArtifactRead, AppReleaseCoreFailure>>

Verify the immutable artifact bound to one Release.

ReleaseId

Effect<VerifiedArtifactRead, AppReleaseCoreFailure>

resolveEligibleReleaseArtifact(releaseId): Effect<VerifiedArtifactRead & object, AppReleaseCoreFailure>>

Read and recheck one eligible snapshot before each authorized use.

ReleaseId

Effect<VerifiedArtifactRead & object, AppReleaseCoreFailure>

resolveEligibleApp(releaseId): Effect<ResolvedApp, AppReleaseCoreFailure>>

Resolve UI and backend together, checking eligibility around all child reads.

ReleaseId

Effect<ResolvedApp, AppReleaseCoreFailure>

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

Resolve verified App metadata without reading any artifact body.

ReleaseId

Effect<Readonly<{ release: Release; digest: Sha256Digest; description: VerifiedAppDescription; }>, AppReleaseCoreFailure>

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

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

StableRoute

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

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

Resolve one previously selected Release’s current metadata authority.

StableRoute

ReleaseId

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

resolvePublicAssetBuild(stableRoute): Effect<PublicAssetBuildRepresentation, AppReleaseCoreFailure>>

Resolve a multi-file root through existing Surface selection and eligibility.

StableRoute

Effect<PublicAssetBuildRepresentation, AppReleaseCoreFailure>

createPublicSurface(surface): Effect<PublicSurface, AppReleaseCoreFailure>>

Create or observe one App-owned anonymous public Surface.

PublicSurface

Effect<PublicSurface, AppReleaseCoreFailure>

transition(request): Effect<TransitionReceipt, AppReleaseCoreFailure>>

Apply one owner-issued transition with an idempotent terminal receipt.

ReleaseTransition

Effect<TransitionReceipt, AppReleaseCoreFailure>

resolveEligibleSurfaceRelease(stableRoute): Effect<Readonly<{ appId: Release["appId"]; releaseId: Release["releaseId"]; stableRoute: StableRoute; artifactDigest: Sha256Digest; mediaType: "application/vnd.fungi.app+json"; }>, AppReleasePublicWebsiteNotFoundError | AppReleasePublicWebsiteUnavailableError>>

Resolve the current eligible Surface Release without reading artifact bytes.

StableRoute

Effect<Readonly<{ appId: Release["appId"]; releaseId: Release["releaseId"]; stableRoute: StableRoute; artifactDigest: Sha256Digest; mediaType: "application/vnd.fungi.app+json"; }>, AppReleasePublicWebsiteNotFoundError | AppReleasePublicWebsiteUnavailableError>

resolveEligibleSurfaceReleases(stableRoutes): Effect<readonly Either<Readonly<{ appId: Release["appId"]; releaseId: Release["releaseId"]; stableRoute: StableRoute; artifactDigest: Sha256Digest; mediaType: "application/vnd.fungi.app+json"; }>, AppReleasePublicWebsiteNotFoundError | AppReleasePublicWebsiteUnavailableError>>[], AppReleasePublicWebsiteNotFoundError | AppReleasePublicWebsiteUnavailableError>>

Read up to 100 current Surface selections in one atomic metadata batch. Each entry reports its eligibility; failure of the read fails the Effect.

readonly StableRoute[]

Effect<readonly Either<Readonly<{ appId: Release["appId"]; releaseId: Release["releaseId"]; stableRoute: StableRoute; artifactDigest: Sha256Digest; mediaType: "application/vnd.fungi.app+json"; }>, AppReleasePublicWebsiteNotFoundError | AppReleasePublicWebsiteUnavailableError>[], AppReleasePublicWebsiteNotFoundError | AppReleasePublicWebsiteUnavailableError>

resolveEligibleSurfaceVersion(stableRoute, releaseId): Effect<Readonly<{ appId: Release["appId"]; releaseId: Release["releaseId"]; stableRoute: StableRoute; artifactDigest: Sha256Digest; mediaType: "application/vnd.fungi.app+json"; }>, AppReleasePublicWebsiteNotFoundError | AppReleasePublicWebsiteUnavailableError>>

Resolve one eligible Release previously selected on this Surface.

StableRoute

ReleaseId

Effect<Readonly<{ appId: Release["appId"]; releaseId: Release["releaseId"]; stableRoute: StableRoute; artifactDigest: Sha256Digest; mediaType: "application/vnd.fungi.app+json"; }>, AppReleasePublicWebsiteNotFoundError | AppReleasePublicWebsiteUnavailableError>

resolvePublicSurface(stableRoute): Effect<PublicSurface, AppReleasePublicWebsiteNotFoundError | AppReleasePublicWebsiteUnavailableError>>

Resolve one stable route’s immutable Surface owner without selecting a Release.

StableRoute

Effect<PublicSurface, AppReleasePublicWebsiteNotFoundError | AppReleasePublicWebsiteUnavailableError>

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

Resolve the current eligible immutable website representation.

StableRoute

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

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

Resolve a pinned eligible immutable website representation.

StableRoute

ReleaseId

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

resolvePublicAssetBuildVersion(stableRoute, releaseId): Effect<PublicAssetBuildRepresentation, AppReleasePublicWebsiteNotFoundError | AppReleasePublicWebsiteUnavailableError>>

Resolve a pinned asset-build root through Surface authority.

StableRoute

ReleaseId

Effect<PublicAssetBuildRepresentation, AppReleasePublicWebsiteNotFoundError | AppReleasePublicWebsiteUnavailableError>


AppReleaseArtifactReaderUnavailable = object

Closed infrastructure failure at the hostile artifact-reader boundary.

readonly kind: "unavailable"


AppReleaseArtifactReader = object

Effect-native artifact reader port.

A reader result is hostile until the App Release core decodes it through its canonical schema. This port owns the only direct unknown success value.

read(input): Effect<unknown, AppReleaseArtifactReaderUnavailable>>

Resolve one stored artifact reference for its expected immutable digest.

ArtifactRef

Sha256Digest

{ version: string; byteLength: number; }

Native version and size of a child named by a verified App root.

string

number

ArtifactVerificationIntent

Publication additionally verifies every object named by an asset manifest.

Effect<unknown, AppReleaseArtifactReaderUnavailable>


AppReleaseStorePortFailure = AppReleaseStoreFailure | { kind: "invalid-store-result"; }

Closed failures emitted by the owned Effect Store port.

The invalid-result sentinel lets the outer Promise adapter fail closed when a foreign fulfilled value is not one of the catalog’s durable outcomes.


AppReleaseStore = object

Canonical Effect-owned persistence port for the narrow App/Release catalog.

Implementations own atomicity; the catalog owns the interpretation of these explicit outcomes. This port intentionally has no generic query or mutation escape hatch.

readonly optional readReleaseLifecycle?: (releaseId) => Effect.Effect<ReleaseLifecycle, AppReleaseStorePortFailure>>

Read the Release facts relevant to transition eligibility.

ReleaseId

Effect.Effect<ReleaseLifecycle, AppReleaseStorePortFailure>

readonly optional recordReleaseVerification?: (input) => Effect.Effect<{ kind: "recorded"; }, AppReleaseStorePortFailure>>

Retain a verified artifact fact after core validation succeeds.

ReleaseId

Sha256Digest

"application/vnd.fungi.app+json"

VerifiedAppDescription

Effect.Effect<{ kind: "recorded"; }, AppReleaseStorePortFailure>

readonly optional readTransition?: (request) => Effect.Effect<TransitionLookup, AppReleaseStorePortFailure>>

Read a receipt or idempotency conflict before transition policy.

ReleaseTransition

Effect.Effect<TransitionLookup, AppReleaseStorePortFailure>

readonly optional persistTransition?: (request, receipt) => Effect.Effect<TransitionPersistence, AppReleaseStorePortFailure>>

Atomically persist a policy-approved transition and receipt.

ReleaseTransition

TransitionReceipt

Effect.Effect<TransitionPersistence, AppReleaseStorePortFailure>

readApp(appId): Effect<AppRead, AppReleaseStorePortFailure>>

Look up exactly one Global App.

AppId

Effect<AppRead, AppReleaseStorePortFailure>

createAppIfAbsent(app): Effect<AppCreate, AppReleaseStorePortFailure>>

Atomically create or observe exactly one Global App.

App

Effect<AppCreate, AppReleaseStorePortFailure>

readRelease(releaseId): Effect<ReleaseRead, AppReleaseStorePortFailure>>

Look up exactly one immutable Release.

ReleaseId

Effect<ReleaseRead, AppReleaseStorePortFailure>

createReleaseIfAbsent(release): Effect<ReleaseCreate, AppReleaseStorePortFailure>>

Atomically create or observe exactly one immutable Release.

Release

Effect<ReleaseCreate, AppReleaseStorePortFailure>

readPublicSurface(publicSurfaceId): Effect<PublicSurfaceRead, AppReleaseStorePortFailure>>

Look up exactly one App-owned anonymous public Surface.

PublicSurfaceId

Effect<PublicSurfaceRead, AppReleaseStorePortFailure>

createPublicSurfaceIfAbsent(surface): Effect<PublicSurfaceCreate, AppReleaseStorePortFailure>>

Atomically create or observe one App-owned anonymous public Surface.

PublicSurface

Effect<PublicSurfaceCreate, AppReleaseStorePortFailure>

const appIdSchema: refine<string & object, Schema<string, string, never>>>>

Canonical Effect Schema for one Global App identifier.


const releaseIdSchema: refine<string & object, Schema<string, string, never>>>>

Canonical Effect Schema for one immutable Release identifier.


const publicSurfaceIdSchema: refine<string & object, Schema<string, string, never>>>>

Canonical Effect Schema for one anonymous public-Surface identifier.


const artifactRefSchema: refine<string & object, Schema<string, string, never>>>>

Canonical Effect Schema for one bounded artifact reference.


const idempotencyKeySchema: refine<string & object, Schema<string, string, never>>>>

Canonical Effect Schema for one caller-provided idempotency key.


const sourceRevisionSchema: refine<string & object, Schema<string, string, never>>>>

Canonical Effect Schema for one pinned lowercase Git source revision.


const sha256DigestSchema: refine<string & object, Schema<string, string, never>>>>

Canonical Effect Schema for one lowercase SHA-256 digest.


const stableRouteSchema: refine<string & object, Schema<string, string, never>>>>

Canonical Effect Schema for one canonical local stable route.


const appSchema: Struct<{ appId: refine<string & object, Schema<string, string, never>>>>; }>

Canonical Effect Schema for a Global App record.


const artifactProvenanceSchema: Struct<{ sourceRevision: refine<string & object, Schema<string, string, never>>>>; sourceTreeDigest: refine<string & object, Schema<string, string, never>>>>; buildRecipeDigest: refine<string & object, Schema<string, string, never>>>>; }>

Canonical Effect Schema for immutable source and build provenance.


const releaseArtifactSchema: Struct<{ artifactRef: refine<string & object, Schema<string, string, never>>>>; artifactDigest: refine<string & object, Schema<string, string, never>>>>; provenance: Struct<{ sourceRevision: refine<string & object, Schema<string, string, never>>>>; sourceTreeDigest: refine<string & object, Schema<string, string, never>>>>; buildRecipeDigest: refine<string & object, Schema<string, string, never>>>>; }>; }>

Canonical Effect Schema for immutable artifact identity and provenance.


const releaseSchema: Struct<{ releaseId: refine<string & object, Schema<string, string, never>>>>; appId: refine<string & object, Schema<string, string, never>>>>; artifact: Struct<{ artifactRef: refine<string & object, Schema<string, string, never>>>>; artifactDigest: refine<string & object, Schema<string, string, never>>>>; provenance: Struct<{ sourceRevision: refine<string & object, Schema<string, string, never>>>>; sourceTreeDigest: refine<string & object, Schema<string, string, never>>>>; buildRecipeDigest: refine<string & object, Schema<string, string, never>>>>; }>; }>; }>

Canonical Effect Schema for one immutable App Release.


const publicSurfaceSchema: Struct<{ publicSurfaceId: refine<string & object, Schema<string, string, never>>>>; appId: refine<string & object, Schema<string, string, never>>>>; stableRoute: refine<string & object, Schema<string, string, never>>>>; }>

Canonical Effect Schema for one App-owned anonymous public Surface.


const verifiedArtifactReadSchema: Struct<{ kind: Literal<["verified"]>; digest: refine<string & object, Schema<string, string, never>>>>; mediaType: Literal<["text/html; charset=utf-8", "application/vnd.fungi.app-backend+json", "application/vnd.fungi.app-assets+json", "application/vnd.fungi.app+json"]>; bytes: refine<object & ImmutableArtifactBytes, Schema<{ byteLength: number; copy: Function; }, { byteLength: number; copy: Function; }, never>>>>; byteLength: typeof Number$; }>

Canonical Effect Schema for a verified immutable artifact snapshot.


const artifactReadResultSchema: Union<[Struct<{ kind: Literal<["verified"]>; digest: refine<string & object, Schema<string, string, never>>>>; mediaType: Literal<["text/html; charset=utf-8", "application/vnd.fungi.app-backend+json", "application/vnd.fungi.app-assets+json", "application/vnd.fungi.app+json"]>; bytes: refine<object & ImmutableArtifactBytes, Schema<{ byteLength: number; copy: Function; }, { byteLength: number; copy: Function; }, never>>>>; byteLength: typeof Number$; }>, Struct<{ kind: Literal<["unavailable"]>; }>, Struct<{ kind: Literal<["missing"]>; }>, Struct<{ kind: Literal<["digest-mismatch"]>; actualDigest: refine<string & object, Schema<string, string, never>>>>; }>]>

Canonical Effect Schema for the complete hostile artifact-reader result.


const appReadSchema: Union<[Struct<{ kind: Literal<["found"]>; app: Struct<{ appId: refine<string & object, Schema<string, string, never>>>>; }>; }>, Struct<{ kind: Literal<["absent"]>; }>]>

Canonical Effect Schema for one explicit App lookup result.


const appCreateSchema: Union<[Struct<{ kind: Literal<["created"]>; app: Struct<{ appId: refine<string & object, Schema<string, string, never>>>>; }>; }>, Struct<{ kind: Literal<["existing"]>; app: Struct<{ appId: refine<string & object, Schema<string, string, never>>>>; }>; }>]>

Canonical Effect Schema for one explicit App create-or-observe result.


const releaseReadSchema: Union<[Struct<{ kind: Literal<["found"]>; release: Struct<{ releaseId: refine<string & object, Schema<string, string, never>>>>; appId: refine<string & object, Schema<string, string, never>>>>; artifact: Struct<{ artifactRef: refine<string & object, Schema<string, string, never>>>>; artifactDigest: refine<string & object, Schema<string, string, never>>>>; provenance: Struct<{ sourceRevision: refine<…, …>; sourceTreeDigest: refine<…, …>; buildRecipeDigest: refine<…, …>; }>; }>; }>; }>, Struct<{ kind: Literal<["absent"]>; }>]>

Canonical Effect Schema for one explicit Release lookup result.


const releaseCreateSchema: Union<[Struct<{ kind: Literal<["created"]>; release: Struct<{ releaseId: refine<string & object, Schema<string, string, never>>>>; appId: refine<string & object, Schema<string, string, never>>>>; artifact: Struct<{ artifactRef: refine<string & object, Schema<string, string, never>>>>; artifactDigest: refine<string & object, Schema<string, string, never>>>>; provenance: Struct<{ sourceRevision: refine<…, …>; sourceTreeDigest: refine<…, …>; buildRecipeDigest: refine<…, …>; }>; }>; }>; }>, Struct<{ kind: Literal<["existing"]>; release: Struct<{ releaseId: refine<string & object, Schema<string, string, never>>>>; appId: refine<string & object, Schema<string, string, never>>>>; artifact: Struct<{ artifactRef: refine<string & object, Schema<string, string, never>>>>; artifactDigest: refine<string & object, Schema<string, string, never>>>>; provenance: Struct<{ sourceRevision: refine<…, …>; sourceTreeDigest: refine<…, …>; buildRecipeDigest: refine<…, …>; }>; }>; }>; }>]>

Canonical Effect Schema for one explicit Release create-or-observe result.


const publicSurfaceReadSchema: Union<[Struct<{ kind: Literal<["found"]>; surface: Struct<{ publicSurfaceId: refine<string & object, Schema<string, string, never>>>>; appId: refine<string & object, Schema<string, string, never>>>>; stableRoute: refine<string & object, Schema<string, string, never>>>>; }>; }>, Struct<{ kind: Literal<["absent"]>; }>]>

Canonical Effect Schema for one explicit public-Surface lookup result.


const publicSurfaceCreateSchema: Union<[Struct<{ kind: Literal<["created"]>; surface: Struct<{ publicSurfaceId: refine<string & object, Schema<string, string, never>>>>; appId: refine<string & object, Schema<string, string, never>>>>; stableRoute: refine<string & object, Schema<string, string, never>>>>; }>; }>, Struct<{ kind: Literal<["existing"]>; surface: Struct<{ publicSurfaceId: refine<string & object, Schema<string, string, never>>>>; appId: refine<string & object, Schema<string, string, never>>>>; stableRoute: refine<string & object, Schema<string, string, never>>>>; }>; }>]>

Canonical Effect Schema for one public-Surface create-or-observe result.


const appTransitionIdSchema: declare<AppTransitionId, AppTransitionId, readonly [], never>>

The sole Effect Schema wrapper around Cairn’s transition codec parser.


const appReleaseStoreFailureSchema: Struct<{ kind: Literal<["unavailable"]>; }>

Canonical Effect Schema for a closed App Release store infrastructure failure.


const appReadStoreResultSchema: Union<[Struct<{ kind: Literal<["success"]>; value: Schema<{ kind: "found"; app: { appId: string & object; }; } | { kind: "absent"; }, { kind: "found"; app: { appId: string; }; } | { kind: "absent"; }, never>>; }>, Struct<{ kind: Literal<["failure"]>; failure: Struct<{ kind: Literal<["unavailable"]>; }>; }>]>

Canonical Effect Schema for a closed App-read store result envelope.


const appCreateStoreResultSchema: Union<[Struct<{ kind: Literal<["success"]>; value: Schema<{ kind: "created"; app: { appId: string & object; }; } | { kind: "existing"; app: { appId: string & object; }; }, { kind: "created"; app: { appId: string; }; } | { kind: "existing"; app: { appId: string; }; }, never>>; }>, Struct<{ kind: Literal<["failure"]>; failure: Struct<{ kind: Literal<["unavailable"]>; }>; }>]>

Canonical Effect Schema for a closed App-create store result envelope.


const releaseReadStoreResultSchema: Union<[Struct<{ kind: Literal<["success"]>; value: Schema<{ kind: "found"; release: { releaseId: string & object; appId: string & object; artifact: { artifactRef: string & object; artifactDigest: string & object; provenance: { sourceRevision: … & …; sourceTreeDigest: … & …; buildRecipeDigest: … & …; }; }; }; } | { kind: "absent"; }, { release: { releaseId: string; appId: string; artifact: { artifactRef: string; artifactDigest: string; provenance: { sourceRevision: string; sourceTreeDigest: string; buildRecipeDigest: string; }; }; }; kind: "found"; } | { kind: "absent"; }, never>>; }>, Struct<{ kind: Literal<["failure"]>; failure: Struct<{ kind: Literal<["unavailable"]>; }>; }>]>

Canonical Effect Schema for a closed Release-read store result envelope.


const releaseCreateStoreResultSchema: Union<[Struct<{ kind: Literal<["success"]>; value: Schema<{ kind: "created"; release: { releaseId: string & object; appId: string & object; artifact: { artifactRef: string & object; artifactDigest: string & object; provenance: { sourceRevision: … & …; sourceTreeDigest: … & …; buildRecipeDigest: … & …; }; }; }; } | { kind: "existing"; release: { releaseId: string & object; appId: string & object; artifact: { artifactRef: string & object; artifactDigest: string & object; provenance: { sourceRevision: … & …; sourceTreeDigest: … & …; buildRecipeDigest: … & …; }; }; }; }, { release: { releaseId: string; appId: string; artifact: { artifactRef: string; artifactDigest: string; provenance: { sourceRevision: string; sourceTreeDigest: string; buildRecipeDigest: string; }; }; }; kind: "created"; } | { release: { releaseId: string; appId: string; artifact: { artifactRef: string; artifactDigest: string; provenance: { sourceRevision: string; sourceTreeDigest: string; buildRecipeDigest: string; }; }; }; kind: "existing"; }, never>>; }>, Struct<{ kind: Literal<["failure"]>; failure: Struct<{ kind: Literal<["unavailable"]>; }>; }>]>

Canonical Effect Schema for a closed Release-create store result envelope.


const publicSurfaceReadStoreResultSchema: Union<[Struct<{ kind: Literal<["success"]>; value: Schema<{ kind: "found"; surface: { publicSurfaceId: string & object; appId: string & object; stableRoute: string & object; }; } | { kind: "absent"; }, { kind: "found"; surface: { appId: string; publicSurfaceId: string; stableRoute: string; }; } | { kind: "absent"; }, never>>; }>, Struct<{ kind: Literal<["failure"]>; failure: Struct<{ kind: Literal<["unavailable"]>; }>; }>]>

Canonical Effect Schema for a closed public-Surface-read store result envelope.


const publicSurfaceCreateStoreResultSchema: Union<[Struct<{ kind: Literal<["success"]>; value: Schema<{ kind: "created"; surface: { publicSurfaceId: string & object; appId: string & object; stableRoute: string & object; }; } | { kind: "existing"; surface: { publicSurfaceId: string & object; appId: string & object; stableRoute: string & object; }; }, { kind: "created"; surface: { appId: string; publicSurfaceId: string; stableRoute: string; }; } | { kind: "existing"; surface: { appId: string; publicSurfaceId: string; stableRoute: string; }; }, never>>; }>, Struct<{ kind: Literal<["failure"]>; failure: Struct<{ kind: Literal<["unavailable"]>; }>; }>]>

Canonical Effect Schema for a closed public-Surface-create store result envelope.


const decodeAppId: (u, overrideOptions?) => Either<string & object, ParseError>>

Decode one Global App identifier through its canonical closed Effect Schema.

unknown

ParseOptions

Either<string & object, ParseError>


const decodeReleaseId: (u, overrideOptions?) => Either<string & object, ParseError>>

Decode one immutable Release identifier through its canonical closed Effect Schema.

unknown

ParseOptions

Either<string & object, ParseError>


const decodePublicSurfaceId: (u, overrideOptions?) => Either<string & object, ParseError>>

Decode one public-Surface identifier through its canonical closed Effect Schema.

unknown

ParseOptions

Either<string & object, ParseError>


const decodeArtifactRef: (u, overrideOptions?) => Either<string & object, ParseError>>

Decode one bounded artifact reference through its canonical closed Effect Schema.

unknown

ParseOptions

Either<string & object, ParseError>


const decodeIdempotencyKey: (u, overrideOptions?) => Either<string & object, ParseError>>

Decode one idempotency key through its canonical closed Effect Schema.

unknown

ParseOptions

Either<string & object, ParseError>


const decodeSourceRevision: (u, overrideOptions?) => Either<string & object, ParseError>>

Decode one pinned source revision through its canonical closed Effect Schema.

unknown

ParseOptions

Either<string & object, ParseError>


const decodeSha256Digest: (u, overrideOptions?) => Either<string & object, ParseError>>

Decode one SHA-256 digest through its canonical closed Effect Schema.

unknown

ParseOptions

Either<string & object, ParseError>


const decodeStableRoute: (u, overrideOptions?) => Either<string & object, ParseError>>

Decode one local stable route through its canonical closed Effect Schema.

unknown

ParseOptions

Either<string & object, ParseError>


const decodeAppTransitionId: (u, overrideOptions?) => Either<AppTransitionId, ParseError>>

Decode a Cairn-issued App transition identity through its sole wrapper.

unknown

ParseOptions

Either<AppTransitionId, ParseError>


const decodeArtifactReadResult: (u, overrideOptions?) => Effect<{ kind: "verified"; digest: string & object; mediaType: "text/html; charset=utf-8" | "application/vnd.fungi.app-backend+json" | "application/vnd.fungi.app-assets+json" | "application/vnd.fungi.app+json"; bytes: object & ImmutableArtifactBytes; byteLength: number; } | { kind: "unavailable"; } | { kind: "missing"; } | { kind: "digest-mismatch"; actualDigest: string & object; }, ParseError, never>>

Decode a hostile artifact-reader result through its canonical closed schema.

unknown

ParseOptions

Effect<{ kind: "verified"; digest: string & object; mediaType: "text/html; charset=utf-8" | "application/vnd.fungi.app-backend+json" | "application/vnd.fungi.app-assets+json" | "application/vnd.fungi.app+json"; bytes: object & ImmutableArtifactBytes; byteLength: number; } | { kind: "unavailable"; } | { kind: "missing"; } | { kind: "digest-mismatch"; actualDigest: string & object; }, ParseError, never>


const decodeApp: (u, overrideOptions?) => Either<{ appId: string & object; }, ParseError>>

Decode a hostile App record through its canonical closed schema.

unknown

ParseOptions

Either<{ appId: string & object; }, ParseError>


const decodeRelease: (u, overrideOptions?) => Either<{ releaseId: string & object; appId: string & object; artifact: { artifactRef: string & object; artifactDigest: string & object; provenance: { sourceRevision: string & object; sourceTreeDigest: string & object; buildRecipeDigest: string & object; }; }; }, ParseError>>

Decode a hostile Release record through its canonical closed schema.

unknown

ParseOptions

Either<{ releaseId: string & object; appId: string & object; artifact: { artifactRef: string & object; artifactDigest: string & object; provenance: { sourceRevision: string & object; sourceTreeDigest: string & object; buildRecipeDigest: string & object; }; }; }, ParseError>


const decodePublicSurface: (u, overrideOptions?) => Either<{ publicSurfaceId: string & object; appId: string & object; stableRoute: string & object; }, ParseError>>

Decode a hostile public Surface through its canonical closed schema.

unknown

ParseOptions

Either<{ publicSurfaceId: string & object; appId: string & object; stableRoute: string & object; }, ParseError>


const decodeAppReadStoreResult: (u, overrideOptions?) => Either<{ kind: "success"; value: { kind: "found"; app: { appId: string & object; }; } | { kind: "absent"; }; } | { kind: "failure"; failure: { kind: "unavailable"; }; }, ParseError>>

Decode a hostile App-read store result through its canonical closed schema.

unknown

ParseOptions

Either<{ kind: "success"; value: { kind: "found"; app: { appId: string & object; }; } | { kind: "absent"; }; } | { kind: "failure"; failure: { kind: "unavailable"; }; }, ParseError>


const decodeAppCreateStoreResult: (u, overrideOptions?) => Either<{ kind: "success"; value: { kind: "created"; app: { appId: string & object; }; } | { kind: "existing"; app: { appId: string & object; }; }; } | { kind: "failure"; failure: { kind: "unavailable"; }; }, ParseError>>

Decode a hostile App-create store result through its canonical closed schema.

unknown

ParseOptions

Either<{ kind: "success"; value: { kind: "created"; app: { appId: string & object; }; } | { kind: "existing"; app: { appId: string & object; }; }; } | { kind: "failure"; failure: { kind: "unavailable"; }; }, ParseError>


const decodeReleaseReadStoreResult: (u, overrideOptions?) => Either<{ kind: "success"; value: { kind: "found"; release: { releaseId: string & object; appId: string & object; artifact: { artifactRef: string & object; artifactDigest: string & object; provenance: { sourceRevision: string & object; sourceTreeDigest: string & object; buildRecipeDigest: string & object; }; }; }; } | { kind: "absent"; }; } | { kind: "failure"; failure: { kind: "unavailable"; }; }, ParseError>>

Decode a hostile Release-read store result through its canonical closed schema.

unknown

ParseOptions

Either<{ kind: "success"; value: { kind: "found"; release: { releaseId: string & object; appId: string & object; artifact: { artifactRef: string & object; artifactDigest: string & object; provenance: { sourceRevision: string & object; sourceTreeDigest: string & object; buildRecipeDigest: string & object; }; }; }; } | { kind: "absent"; }; } | { kind: "failure"; failure: { kind: "unavailable"; }; }, ParseError>


const decodeReleaseCreateStoreResult: (u, overrideOptions?) => Either<{ kind: "success"; value: { kind: "created"; release: { releaseId: string & object; appId: string & object; artifact: { artifactRef: string & object; artifactDigest: string & object; provenance: { sourceRevision: string & object; sourceTreeDigest: string & object; buildRecipeDigest: string & object; }; }; }; } | { kind: "existing"; release: { releaseId: string & object; appId: string & object; artifact: { artifactRef: string & object; artifactDigest: string & object; provenance: { sourceRevision: string & object; sourceTreeDigest: string & object; buildRecipeDigest: string & object; }; }; }; }; } | { kind: "failure"; failure: { kind: "unavailable"; }; }, ParseError>>

Decode a hostile Release-create store result through its canonical closed schema.

unknown

ParseOptions

Either<{ kind: "success"; value: { kind: "created"; release: { releaseId: string & object; appId: string & object; artifact: { artifactRef: string & object; artifactDigest: string & object; provenance: { sourceRevision: string & object; sourceTreeDigest: string & object; buildRecipeDigest: string & object; }; }; }; } | { kind: "existing"; release: { releaseId: string & object; appId: string & object; artifact: { artifactRef: string & object; artifactDigest: string & object; provenance: { sourceRevision: string & object; sourceTreeDigest: string & object; buildRecipeDigest: string & object; }; }; }; }; } | { kind: "failure"; failure: { kind: "unavailable"; }; }, ParseError>


const decodePublicSurfaceReadStoreResult: (u, overrideOptions?) => Either<{ kind: "success"; value: { kind: "found"; surface: { publicSurfaceId: string & object; appId: string & object; stableRoute: string & object; }; } | { kind: "absent"; }; } | { kind: "failure"; failure: { kind: "unavailable"; }; }, ParseError>>

Decode a hostile public-Surface-read store result through its canonical closed schema.

unknown

ParseOptions

Either<{ kind: "success"; value: { kind: "found"; surface: { publicSurfaceId: string & object; appId: string & object; stableRoute: string & object; }; } | { kind: "absent"; }; } | { kind: "failure"; failure: { kind: "unavailable"; }; }, ParseError>


const decodePublicSurfaceCreateStoreResult: (u, overrideOptions?) => Either<{ kind: "success"; value: { kind: "created"; surface: { publicSurfaceId: string & object; appId: string & object; stableRoute: string & object; }; } | { kind: "existing"; surface: { publicSurfaceId: string & object; appId: string & object; stableRoute: string & object; }; }; } | { kind: "failure"; failure: { kind: "unavailable"; }; }, ParseError>>

Decode a hostile public-Surface-create store result through its canonical closed schema.

unknown

ParseOptions

Either<{ kind: "success"; value: { kind: "created"; surface: { publicSurfaceId: string & object; appId: string & object; stableRoute: string & object; }; } | { kind: "existing"; surface: { publicSurfaceId: string & object; appId: string & object; stableRoute: string & object; }; }; } | { kind: "failure"; failure: { kind: "unavailable"; }; }, ParseError>

createAppReleaseCore(options): AppReleaseCore

Compose the Effect-native App Release core.

A Release is first compared with its existing immutable record. Only an absent Release requires an owner App lookup and an atomic create-or-observe. Every closed store failure is mapped at this boundary.

AppReleaseStore

AppReleaseArtifactReader

Readonly<{ maxBytes: number; maxManifestBytes?: number; }>

AppReleaseCore


createDeterministicMemoryAppReleaseStore()

Section titled “createDeterministicMemoryAppReleaseStore()”

createDeterministicMemoryAppReleaseStore(): PromiseAppReleaseStore

Compose an in-process deterministic store for the narrow App/Release port.

Store methods mutate only the private collections below. Decisions remain in pure helpers, and every returned record is copied, so callers cannot mutate retained state after an atomic create-or-observe operation.

PromiseAppReleaseStore


adaptPromiseAppReleaseStore(projection): AppReleaseStore

Adapt the Promise store projection at the one outer edge.

Rejected Promise work is deliberately collapsed into the closed unavailable store outcome; infrastructure detail never crosses into catalog policy.

PromiseAppReleaseStore

AppReleaseStore


adaptPromiseArtifactReader(projection): AppReleaseArtifactReader

Adapt the Promise artifact-reader projection at the one outer edge.

Successful values remain hostile until the core’s canonical schema decodes them. A rejected Promise is closed to the reader’s unavailable failure.

ArtifactReader

AppReleaseArtifactReader