effect
@fungi.computer/app-release / effect
effect
Section titled “effect”Type Aliases
Section titled “Type Aliases”AppReleaseCoreFailure
Section titled “AppReleaseCoreFailure”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
Section titled “AppReleaseCore”AppReleaseCore =
object
Effect-native core for the narrow App and immutable Release catalog facts.
Methods
Section titled “Methods”createApp()
Section titled “createApp()”createApp(
app):Effect<App,AppReleaseCoreFailure>>
Create or observe one Global App through the owned store port.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Effect<App,
AppReleaseCoreFailure>
createRelease()
Section titled “createRelease()”createRelease(
release):Effect<Release,AppReleaseCoreFailure>>
Create or observe one immutable Release through the owned store port.
Parameters
Section titled “Parameters”release
Section titled “release”Returns
Section titled “Returns”Effect<Release,
AppReleaseCoreFailure>
verifyReleaseArtifact()
Section titled “verifyReleaseArtifact()”verifyReleaseArtifact(
releaseId):Effect<VerifiedArtifactRead,AppReleaseCoreFailure>>
Verify the immutable artifact bound to one Release.
Parameters
Section titled “Parameters”releaseId
Section titled “releaseId”Returns
Section titled “Returns”Effect<VerifiedArtifactRead,
AppReleaseCoreFailure>
resolveEligibleReleaseArtifact()
Section titled “resolveEligibleReleaseArtifact()”resolveEligibleReleaseArtifact(
releaseId):Effect<VerifiedArtifactRead&object,AppReleaseCoreFailure>>
Read and recheck one eligible snapshot before each authorized use.
Parameters
Section titled “Parameters”releaseId
Section titled “releaseId”Returns
Section titled “Returns”Effect<VerifiedArtifactRead & object,
AppReleaseCoreFailure>
resolveEligibleApp()
Section titled “resolveEligibleApp()”resolveEligibleApp(
releaseId):Effect<ResolvedApp,AppReleaseCoreFailure>>
Resolve UI and backend together, checking eligibility around all child reads.
Parameters
Section titled “Parameters”releaseId
Section titled “releaseId”Returns
Section titled “Returns”Effect<ResolvedApp,
AppReleaseCoreFailure>
resolveEligibleAppMetadata()
Section titled “resolveEligibleAppMetadata()”resolveEligibleAppMetadata(
releaseId):Effect<Readonly<{release:Release;digest:Sha256Digest;description:VerifiedAppDescription; }>,AppReleaseCoreFailure>>
Resolve verified App metadata without reading any artifact body.
Parameters
Section titled “Parameters”releaseId
Section titled “releaseId”Returns
Section titled “Returns”Effect<Readonly<{ release: Release; digest:
Sha256Digest; description:
VerifiedAppDescription; }>,
AppReleaseCoreFailure>
resolvePublicSurfaceAuthority()
Section titled “resolvePublicSurfaceAuthority()”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.
Parameters
Section titled “Parameters”stableRoute
Section titled “stableRoute”Returns
Section titled “Returns”Effect<Readonly<{ currentReleaseId: ReleaseId;
sequence: number; app: App; release:
Release; surface:
PublicSurface; digest:
Sha256Digest; revocation:
ReleaseRevocation; description:
VerifiedAppDescription; }>,
AppReleaseCoreFailure>
resolvePublicSurfaceAuthorityVersion()
Section titled “resolvePublicSurfaceAuthorityVersion()”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.
Parameters
Section titled “Parameters”stableRoute
Section titled “stableRoute”releaseId
Section titled “releaseId”Returns
Section titled “Returns”Effect<Readonly<{ currentReleaseId: ReleaseId;
sequence: number; app: App; release:
Release; surface:
PublicSurface; digest:
Sha256Digest; revocation:
ReleaseRevocation; description:
VerifiedAppDescription; }>,
AppReleaseCoreFailure>
resolvePublicAssetBuild()
Section titled “resolvePublicAssetBuild()”resolvePublicAssetBuild(
stableRoute):Effect<PublicAssetBuildRepresentation,AppReleaseCoreFailure>>
Resolve a multi-file root through existing Surface selection and eligibility.
Parameters
Section titled “Parameters”stableRoute
Section titled “stableRoute”Returns
Section titled “Returns”Effect<PublicAssetBuildRepresentation,
AppReleaseCoreFailure>
createPublicSurface()
Section titled “createPublicSurface()”createPublicSurface(
surface):Effect<PublicSurface,AppReleaseCoreFailure>>
Create or observe one App-owned anonymous public Surface.
Parameters
Section titled “Parameters”surface
Section titled “surface”Returns
Section titled “Returns”Effect<PublicSurface,
AppReleaseCoreFailure>
transition()
Section titled “transition()”transition(
request):Effect<TransitionReceipt,AppReleaseCoreFailure>>
Apply one owner-issued transition with an idempotent terminal receipt.
Parameters
Section titled “Parameters”request
Section titled “request”Returns
Section titled “Returns”Effect<TransitionReceipt,
AppReleaseCoreFailure>
resolveEligibleSurfaceRelease()
Section titled “resolveEligibleSurfaceRelease()”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.
Parameters
Section titled “Parameters”stableRoute
Section titled “stableRoute”Returns
Section titled “Returns”Effect<Readonly<{ appId: Release["appId"];
releaseId: Release["releaseId"]; stableRoute:
StableRoute; artifactDigest:
Sha256Digest; mediaType:
"application/vnd.fungi.app+json"; }>,
AppReleasePublicWebsiteNotFoundError
|
AppReleasePublicWebsiteUnavailableError>
resolveEligibleSurfaceReleases()
Section titled “resolveEligibleSurfaceReleases()”resolveEligibleSurfaceReleases(
stableRoutes):Effect<readonlyEither<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.
Parameters
Section titled “Parameters”stableRoutes
Section titled “stableRoutes”readonly StableRoute[]
Returns
Section titled “Returns”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()
Section titled “resolveEligibleSurfaceVersion()”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.
Parameters
Section titled “Parameters”stableRoute
Section titled “stableRoute”releaseId
Section titled “releaseId”Returns
Section titled “Returns”Effect<Readonly<{ appId: Release["appId"];
releaseId: Release["releaseId"]; stableRoute:
StableRoute; artifactDigest:
Sha256Digest; mediaType:
"application/vnd.fungi.app+json"; }>,
AppReleasePublicWebsiteNotFoundError
|
AppReleasePublicWebsiteUnavailableError>
resolvePublicSurface()
Section titled “resolvePublicSurface()”resolvePublicSurface(
stableRoute):Effect<PublicSurface,AppReleasePublicWebsiteNotFoundError|AppReleasePublicWebsiteUnavailableError>>
Resolve one stable route’s immutable Surface owner without selecting a Release.
Parameters
Section titled “Parameters”stableRoute
Section titled “stableRoute”Returns
Section titled “Returns”Effect<PublicSurface,
AppReleasePublicWebsiteNotFoundError
|
AppReleasePublicWebsiteUnavailableError>
resolvePublicWebsite()
Section titled “resolvePublicWebsite()”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.
Parameters
Section titled “Parameters”stableRoute
Section titled “stableRoute”Returns
Section titled “Returns”Effect<Readonly<{ releaseId: ReleaseId;
digest: Sha256Digest; mediaType:
"text/html; charset=utf-8"; byteLength: number; bytes:
ImmutableArtifactBytes; }>,
AppReleasePublicWebsiteNotFoundError
|
AppReleasePublicWebsiteUnavailableError>
resolvePublicWebsiteVersion()
Section titled “resolvePublicWebsiteVersion()”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.
Parameters
Section titled “Parameters”stableRoute
Section titled “stableRoute”releaseId
Section titled “releaseId”Returns
Section titled “Returns”Effect<Readonly<{ releaseId: ReleaseId;
digest: Sha256Digest; mediaType:
"text/html; charset=utf-8"; byteLength: number; bytes:
ImmutableArtifactBytes; }>,
AppReleasePublicWebsiteNotFoundError
|
AppReleasePublicWebsiteUnavailableError>
resolvePublicAssetBuildVersion()
Section titled “resolvePublicAssetBuildVersion()”resolvePublicAssetBuildVersion(
stableRoute,releaseId):Effect<PublicAssetBuildRepresentation,AppReleasePublicWebsiteNotFoundError|AppReleasePublicWebsiteUnavailableError>>
Resolve a pinned asset-build root through Surface authority.
Parameters
Section titled “Parameters”stableRoute
Section titled “stableRoute”releaseId
Section titled “releaseId”Returns
Section titled “Returns”Effect<PublicAssetBuildRepresentation,
AppReleasePublicWebsiteNotFoundError
|
AppReleasePublicWebsiteUnavailableError>
AppReleaseArtifactReaderUnavailable
Section titled “AppReleaseArtifactReaderUnavailable”AppReleaseArtifactReaderUnavailable =
object
Closed infrastructure failure at the hostile artifact-reader boundary.
Properties
Section titled “Properties”
readonlykind:"unavailable"
AppReleaseArtifactReader
Section titled “AppReleaseArtifactReader”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.
Methods
Section titled “Methods”read()
Section titled “read()”read(
input):Effect<unknown,AppReleaseArtifactReaderUnavailable>>
Resolve one stored artifact reference for its expected immutable digest.
Parameters
Section titled “Parameters”artifactRef
Section titled “artifactRef”expectedDigest
Section titled “expectedDigest”expectedObject?
Section titled “expectedObject?”{ version: string; byteLength: number; }
Native version and size of a child named by a verified App root.
expectedObject.version
Section titled “expectedObject.version”string
expectedObject.byteLength
Section titled “expectedObject.byteLength”number
verification?
Section titled “verification?”Publication additionally verifies every object named by an asset manifest.
Returns
Section titled “Returns”Effect<unknown,
AppReleaseArtifactReaderUnavailable>
AppReleaseStorePortFailure
Section titled “AppReleaseStorePortFailure”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
Section titled “AppReleaseStore”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.
Properties
Section titled “Properties”readReleaseLifecycle?
Section titled “readReleaseLifecycle?”
readonlyoptionalreadReleaseLifecycle?: (releaseId) =>Effect.Effect<ReleaseLifecycle,AppReleaseStorePortFailure>>
Read the Release facts relevant to transition eligibility.
Parameters
Section titled “Parameters”releaseId
Section titled “releaseId”Returns
Section titled “Returns”Effect.Effect<ReleaseLifecycle,
AppReleaseStorePortFailure>
recordReleaseVerification?
Section titled “recordReleaseVerification?”
readonlyoptionalrecordReleaseVerification?: (input) =>Effect.Effect<{kind:"recorded"; },AppReleaseStorePortFailure>>
Retain a verified artifact fact after core validation succeeds.
Parameters
Section titled “Parameters”releaseId
Section titled “releaseId”digest
Section titled “digest”mediaType
Section titled “mediaType”"application/vnd.fungi.app+json"
description
Section titled “description”Returns
Section titled “Returns”Effect.Effect<{ kind: "recorded"; },
AppReleaseStorePortFailure>
readTransition?
Section titled “readTransition?”
readonlyoptionalreadTransition?: (request) =>Effect.Effect<TransitionLookup,AppReleaseStorePortFailure>>
Read a receipt or idempotency conflict before transition policy.
Parameters
Section titled “Parameters”request
Section titled “request”Returns
Section titled “Returns”Effect.Effect<TransitionLookup,
AppReleaseStorePortFailure>
persistTransition?
Section titled “persistTransition?”
readonlyoptionalpersistTransition?: (request,receipt) =>Effect.Effect<TransitionPersistence,AppReleaseStorePortFailure>>
Atomically persist a policy-approved transition and receipt.
Parameters
Section titled “Parameters”request
Section titled “request”receipt
Section titled “receipt”Returns
Section titled “Returns”Effect.Effect<TransitionPersistence,
AppReleaseStorePortFailure>
Methods
Section titled “Methods”readApp()
Section titled “readApp()”readApp(
appId):Effect<AppRead,AppReleaseStorePortFailure>>
Look up exactly one Global App.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Effect<AppRead,
AppReleaseStorePortFailure>
createAppIfAbsent()
Section titled “createAppIfAbsent()”createAppIfAbsent(
app):Effect<AppCreate,AppReleaseStorePortFailure>>
Atomically create or observe exactly one Global App.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”Effect<AppCreate,
AppReleaseStorePortFailure>
readRelease()
Section titled “readRelease()”readRelease(
releaseId):Effect<ReleaseRead,AppReleaseStorePortFailure>>
Look up exactly one immutable Release.
Parameters
Section titled “Parameters”releaseId
Section titled “releaseId”Returns
Section titled “Returns”Effect<ReleaseRead,
AppReleaseStorePortFailure>
createReleaseIfAbsent()
Section titled “createReleaseIfAbsent()”createReleaseIfAbsent(
release):Effect<ReleaseCreate,AppReleaseStorePortFailure>>
Atomically create or observe exactly one immutable Release.
Parameters
Section titled “Parameters”release
Section titled “release”Returns
Section titled “Returns”Effect<ReleaseCreate,
AppReleaseStorePortFailure>
readPublicSurface()
Section titled “readPublicSurface()”readPublicSurface(
publicSurfaceId):Effect<PublicSurfaceRead,AppReleaseStorePortFailure>>
Look up exactly one App-owned anonymous public Surface.
Parameters
Section titled “Parameters”publicSurfaceId
Section titled “publicSurfaceId”Returns
Section titled “Returns”Effect<PublicSurfaceRead,
AppReleaseStorePortFailure>
createPublicSurfaceIfAbsent()
Section titled “createPublicSurfaceIfAbsent()”createPublicSurfaceIfAbsent(
surface):Effect<PublicSurfaceCreate,AppReleaseStorePortFailure>>
Atomically create or observe one App-owned anonymous public Surface.
Parameters
Section titled “Parameters”surface
Section titled “surface”Returns
Section titled “Returns”Effect<PublicSurfaceCreate,
AppReleaseStorePortFailure>
Variables
Section titled “Variables”appIdSchema
Section titled “appIdSchema”
constappIdSchema:refine<string&object,Schema<string,string,never>>>>
Canonical Effect Schema for one Global App identifier.
releaseIdSchema
Section titled “releaseIdSchema”
constreleaseIdSchema:refine<string&object,Schema<string,string,never>>>>
Canonical Effect Schema for one immutable Release identifier.
publicSurfaceIdSchema
Section titled “publicSurfaceIdSchema”
constpublicSurfaceIdSchema:refine<string&object,Schema<string,string,never>>>>
Canonical Effect Schema for one anonymous public-Surface identifier.
artifactRefSchema
Section titled “artifactRefSchema”
constartifactRefSchema:refine<string&object,Schema<string,string,never>>>>
Canonical Effect Schema for one bounded artifact reference.
idempotencyKeySchema
Section titled “idempotencyKeySchema”
constidempotencyKeySchema:refine<string&object,Schema<string,string,never>>>>
Canonical Effect Schema for one caller-provided idempotency key.
sourceRevisionSchema
Section titled “sourceRevisionSchema”
constsourceRevisionSchema:refine<string&object,Schema<string,string,never>>>>
Canonical Effect Schema for one pinned lowercase Git source revision.
sha256DigestSchema
Section titled “sha256DigestSchema”
constsha256DigestSchema:refine<string&object,Schema<string,string,never>>>>
Canonical Effect Schema for one lowercase SHA-256 digest.
stableRouteSchema
Section titled “stableRouteSchema”
conststableRouteSchema:refine<string&object,Schema<string,string,never>>>>
Canonical Effect Schema for one canonical local stable route.
appSchema
Section titled “appSchema”
constappSchema:Struct<{appId:refine<string&object,Schema<string,string,never>>>>; }>
Canonical Effect Schema for a Global App record.
artifactProvenanceSchema
Section titled “artifactProvenanceSchema”
constartifactProvenanceSchema: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.
releaseArtifactSchema
Section titled “releaseArtifactSchema”
constreleaseArtifactSchema: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.
releaseSchema
Section titled “releaseSchema”
constreleaseSchema: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.
publicSurfaceSchema
Section titled “publicSurfaceSchema”
constpublicSurfaceSchema: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.
verifiedArtifactReadSchema
Section titled “verifiedArtifactReadSchema”
constverifiedArtifactReadSchema: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: typeofNumber$; }>
Canonical Effect Schema for a verified immutable artifact snapshot.
artifactReadResultSchema
Section titled “artifactReadResultSchema”
constartifactReadResultSchema: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: typeofNumber$; }>,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.
appReadSchema
Section titled “appReadSchema”
constappReadSchema: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.
appCreateSchema
Section titled “appCreateSchema”
constappCreateSchema: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.
releaseReadSchema
Section titled “releaseReadSchema”
constreleaseReadSchema: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.
releaseCreateSchema
Section titled “releaseCreateSchema”
constreleaseCreateSchema: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.
publicSurfaceReadSchema
Section titled “publicSurfaceReadSchema”
constpublicSurfaceReadSchema: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.
publicSurfaceCreateSchema
Section titled “publicSurfaceCreateSchema”
constpublicSurfaceCreateSchema: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.
appTransitionIdSchema
Section titled “appTransitionIdSchema”
constappTransitionIdSchema:declare<AppTransitionId,AppTransitionId, readonly [],never>>
The sole Effect Schema wrapper around Cairn’s transition codec parser.
appReleaseStoreFailureSchema
Section titled “appReleaseStoreFailureSchema”
constappReleaseStoreFailureSchema:Struct<{kind:Literal<["unavailable"]>; }>
Canonical Effect Schema for a closed App Release store infrastructure failure.
appReadStoreResultSchema
Section titled “appReadStoreResultSchema”
constappReadStoreResultSchema: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.
appCreateStoreResultSchema
Section titled “appCreateStoreResultSchema”
constappCreateStoreResultSchema: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.
releaseReadStoreResultSchema
Section titled “releaseReadStoreResultSchema”
constreleaseReadStoreResultSchema: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.
releaseCreateStoreResultSchema
Section titled “releaseCreateStoreResultSchema”
constreleaseCreateStoreResultSchema: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.
publicSurfaceReadStoreResultSchema
Section titled “publicSurfaceReadStoreResultSchema”
constpublicSurfaceReadStoreResultSchema: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.
publicSurfaceCreateStoreResultSchema
Section titled “publicSurfaceCreateStoreResultSchema”
constpublicSurfaceCreateStoreResultSchema: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.
decodeAppId
Section titled “decodeAppId”
constdecodeAppId: (u,overrideOptions?) =>Either<string&object,ParseError>>
Decode one Global App identifier through its canonical closed Effect Schema.
Parameters
Section titled “Parameters”unknown
overrideOptions?
Section titled “overrideOptions?”ParseOptions
Returns
Section titled “Returns”Either<string & object, ParseError>
decodeReleaseId
Section titled “decodeReleaseId”
constdecodeReleaseId: (u,overrideOptions?) =>Either<string&object,ParseError>>
Decode one immutable Release identifier through its canonical closed Effect Schema.
Parameters
Section titled “Parameters”unknown
overrideOptions?
Section titled “overrideOptions?”ParseOptions
Returns
Section titled “Returns”Either<string & object, ParseError>
decodePublicSurfaceId
Section titled “decodePublicSurfaceId”
constdecodePublicSurfaceId: (u,overrideOptions?) =>Either<string&object,ParseError>>
Decode one public-Surface identifier through its canonical closed Effect Schema.
Parameters
Section titled “Parameters”unknown
overrideOptions?
Section titled “overrideOptions?”ParseOptions
Returns
Section titled “Returns”Either<string & object, ParseError>
decodeArtifactRef
Section titled “decodeArtifactRef”
constdecodeArtifactRef: (u,overrideOptions?) =>Either<string&object,ParseError>>
Decode one bounded artifact reference through its canonical closed Effect Schema.
Parameters
Section titled “Parameters”unknown
overrideOptions?
Section titled “overrideOptions?”ParseOptions
Returns
Section titled “Returns”Either<string & object, ParseError>
decodeIdempotencyKey
Section titled “decodeIdempotencyKey”
constdecodeIdempotencyKey: (u,overrideOptions?) =>Either<string&object,ParseError>>
Decode one idempotency key through its canonical closed Effect Schema.
Parameters
Section titled “Parameters”unknown
overrideOptions?
Section titled “overrideOptions?”ParseOptions
Returns
Section titled “Returns”Either<string & object, ParseError>
decodeSourceRevision
Section titled “decodeSourceRevision”
constdecodeSourceRevision: (u,overrideOptions?) =>Either<string&object,ParseError>>
Decode one pinned source revision through its canonical closed Effect Schema.
Parameters
Section titled “Parameters”unknown
overrideOptions?
Section titled “overrideOptions?”ParseOptions
Returns
Section titled “Returns”Either<string & object, ParseError>
decodeSha256Digest
Section titled “decodeSha256Digest”
constdecodeSha256Digest: (u,overrideOptions?) =>Either<string&object,ParseError>>
Decode one SHA-256 digest through its canonical closed Effect Schema.
Parameters
Section titled “Parameters”unknown
overrideOptions?
Section titled “overrideOptions?”ParseOptions
Returns
Section titled “Returns”Either<string & object, ParseError>
decodeStableRoute
Section titled “decodeStableRoute”
constdecodeStableRoute: (u,overrideOptions?) =>Either<string&object,ParseError>>
Decode one local stable route through its canonical closed Effect Schema.
Parameters
Section titled “Parameters”unknown
overrideOptions?
Section titled “overrideOptions?”ParseOptions
Returns
Section titled “Returns”Either<string & object, ParseError>
decodeAppTransitionId
Section titled “decodeAppTransitionId”
constdecodeAppTransitionId: (u,overrideOptions?) =>Either<AppTransitionId,ParseError>>
Decode a Cairn-issued App transition identity through its sole wrapper.
Parameters
Section titled “Parameters”unknown
overrideOptions?
Section titled “overrideOptions?”ParseOptions
Returns
Section titled “Returns”Either<AppTransitionId, ParseError>
decodeArtifactReadResult
Section titled “decodeArtifactReadResult”
constdecodeArtifactReadResult: (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.
Parameters
Section titled “Parameters”unknown
overrideOptions?
Section titled “overrideOptions?”ParseOptions
Returns
Section titled “Returns”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>
decodeApp
Section titled “decodeApp”
constdecodeApp: (u,overrideOptions?) =>Either<{appId:string&object; },ParseError>>
Decode a hostile App record through its canonical closed schema.
Parameters
Section titled “Parameters”unknown
overrideOptions?
Section titled “overrideOptions?”ParseOptions
Returns
Section titled “Returns”Either<{ appId: string & object; }, ParseError>
decodeRelease
Section titled “decodeRelease”
constdecodeRelease: (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.
Parameters
Section titled “Parameters”unknown
overrideOptions?
Section titled “overrideOptions?”ParseOptions
Returns
Section titled “Returns”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>
decodePublicSurface
Section titled “decodePublicSurface”
constdecodePublicSurface: (u,overrideOptions?) =>Either<{publicSurfaceId:string&object;appId:string&object;stableRoute:string&object; },ParseError>>
Decode a hostile public Surface through its canonical closed schema.
Parameters
Section titled “Parameters”unknown
overrideOptions?
Section titled “overrideOptions?”ParseOptions
Returns
Section titled “Returns”Either<{ publicSurfaceId: string & object; appId: string &
object; stableRoute: string & object; }, ParseError>
decodeAppReadStoreResult
Section titled “decodeAppReadStoreResult”
constdecodeAppReadStoreResult: (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.
Parameters
Section titled “Parameters”unknown
overrideOptions?
Section titled “overrideOptions?”ParseOptions
Returns
Section titled “Returns”Either<{ kind: "success"; value: { kind: "found"; app: {
appId: string & object; }; } | { kind: "absent"; }; } | {
kind: "failure"; failure: { kind: "unavailable"; }; },
ParseError>
decodeAppCreateStoreResult
Section titled “decodeAppCreateStoreResult”
constdecodeAppCreateStoreResult: (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.
Parameters
Section titled “Parameters”unknown
overrideOptions?
Section titled “overrideOptions?”ParseOptions
Returns
Section titled “Returns”Either<{ kind: "success"; value: { kind: "created"; app: {
appId: string & object; }; } | { kind: "existing"; app: {
appId: string & object; }; }; } | { kind: "failure"; failure:
{ kind: "unavailable"; }; }, ParseError>
decodeReleaseReadStoreResult
Section titled “decodeReleaseReadStoreResult”
constdecodeReleaseReadStoreResult: (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.
Parameters
Section titled “Parameters”unknown
overrideOptions?
Section titled “overrideOptions?”ParseOptions
Returns
Section titled “Returns”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>
decodeReleaseCreateStoreResult
Section titled “decodeReleaseCreateStoreResult”
constdecodeReleaseCreateStoreResult: (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.
Parameters
Section titled “Parameters”unknown
overrideOptions?
Section titled “overrideOptions?”ParseOptions
Returns
Section titled “Returns”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>
decodePublicSurfaceReadStoreResult
Section titled “decodePublicSurfaceReadStoreResult”
constdecodePublicSurfaceReadStoreResult: (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.
Parameters
Section titled “Parameters”unknown
overrideOptions?
Section titled “overrideOptions?”ParseOptions
Returns
Section titled “Returns”Either<{ kind: "success"; value: { kind: "found"; surface: {
publicSurfaceId: string & object; appId: string & object;
stableRoute: string & object; }; } | { kind: "absent"; }; } |
{ kind: "failure"; failure: { kind: "unavailable"; }; },
ParseError>
decodePublicSurfaceCreateStoreResult
Section titled “decodePublicSurfaceCreateStoreResult”
constdecodePublicSurfaceCreateStoreResult: (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.
Parameters
Section titled “Parameters”unknown
overrideOptions?
Section titled “overrideOptions?”ParseOptions
Returns
Section titled “Returns”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>
Functions
Section titled “Functions”createAppReleaseCore()
Section titled “createAppReleaseCore()”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.
Parameters
Section titled “Parameters”options
Section titled “options”artifactReader
Section titled “artifactReader”artifactPolicy?
Section titled “artifactPolicy?”Readonly<{ maxBytes: number; maxManifestBytes?: number; }>
Returns
Section titled “Returns”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.
Returns
Section titled “Returns”adaptPromiseAppReleaseStore()
Section titled “adaptPromiseAppReleaseStore()”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.
Parameters
Section titled “Parameters”projection
Section titled “projection”Returns
Section titled “Returns”adaptPromiseArtifactReader()
Section titled “adaptPromiseArtifactReader()”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.