Skip to content
API reference

build-contract

Import
import * as api from "@fungi.computer/oyster/build-contract";
Kind Export Description
type alias ContentObjectBucket The parts of an R2 bucket a content-object store uses.
type alias CandidateObject One uploaded object, as a manifest names it.
type alias CandidateOutputManifest One build output by reference.
type alias TeamAppCandidateManifest One submitted Team App candidate manifest.
type alias PreparedTeamAppCandidateManifest One Team App candidate manifest with its reserved Release ID.
type alias CandidateObjectMediaType One of candidateObjectMediaTypes.
type alias CandidateUpload One object a build uploads, with the media type it is stored under.
constant workspaceBuildPolicy The pinned workspace build policy: how a captured workspace’s manifests build (package.json#fungi.build). v4 selects App compile roots from runtime imports, not the authoring/host dependencies in its owning manifest. A dependency may name its own package build script, which only an admitted Computer build runs.
constant TEAM_APP_CANDIDATE_MANIFEST_MAX_BYTES The largest candidate manifest request body, in bytes. A manifest names objects; their bytes are uploaded one at a time, never inside it.
constant candidateObjectSchema One content-addressed object a build uploaded before its manifest.
constant candidateOutputManifestSchema A build’s output by reference: the same surfaces as its bytes, sized.
constant teamAppCandidateManifestSchema A submitted Team App candidate: its output’s objects by digest and size, and its provenance, before the Team assigns a stable Release ID.
constant preparedCandidateManifestSchema Publisher persistence input after TeamDO reserves retry-stable identities.
constant preparedCandidateSchema A platform App candidate the trusted operator built and packed itself, with its bytes inline: the operator’s platform publication request only. A Team candidate never carries bytes; it is a manifest.
constant candidateObjectMediaTypes The media type an uploaded object is stored with. A store that reads an HTML document or backend descriptor by its stored type (the Publisher’s) needs it; an asset’s type is its manifest’s, so it is an octet stream.
function contentObjectRef() The store key of one content-addressed object.
function headContentObject() Describe a stored object by its size and the SHA-256 the store verified.
function putContentObject() Stream one object into the store under its digest. The store refuses a body whose SHA-256 differs; an object already stored with the same verified digest and size is kept (write-once: a stored version may be pinned by a Release) and the body is discarded, never stored.
function encodeTeamAppCandidateManifest() Canonical manifest bytes, so a digest is independent of JSON spacing.
function digestTeamAppCandidateManifest() The hex SHA-256 of a manifest’s canonical bytes: its App root’s name.
function candidateObjectMediaType() The stored media type a request names, if it is one an object may carry.
function candidateManifestObjects() Every distinct object a manifest names, each once, in manifest order.
function decodeCandidateBackend() Decode a stored backend descriptor; a manifest’s backend must be one.

ContentObjectBuckettype alias

Section titled “ContentObjectBucket”
Signature
type ContentObjectBucket = Readonly<{
head: Promise<Readonly<{
size: number;
checksums: Readonly<{
sha256?: ArrayBuffer;
}>;
}> | null>;
put: Promise<object | null>;
}>;

The parts of an R2 bucket a content-object store uses.


CandidateObjecttype alias

Section titled “CandidateObject”
Signature
type CandidateObject = Schema.Schema.Type<typeof candidateObjectSchema>;

One uploaded object, as a manifest names it.


CandidateOutputManifesttype alias

Section titled “CandidateOutputManifest”
Signature
type CandidateOutputManifest = Schema.Schema.Type<
typeof candidateOutputManifestSchema
>;

One build output by reference.


TeamAppCandidateManifesttype alias

Section titled “TeamAppCandidateManifest”
Signature
type TeamAppCandidateManifest = Schema.Schema.Type<
typeof teamAppCandidateManifestSchema
>;

One submitted Team App candidate manifest.


PreparedTeamAppCandidateManifesttype alias

Section titled “PreparedTeamAppCandidateManifest”
Signature
type PreparedTeamAppCandidateManifest = Schema.Schema.Type<
typeof preparedCandidateManifestSchema
>;

One Team App candidate manifest with its reserved Release ID.


CandidateObjectMediaTypetype alias

Section titled “CandidateObjectMediaType”
Signature
type CandidateObjectMediaType = (typeof candidateObjectMediaTypes)[number];

One of candidateObjectMediaTypes.


CandidateUploadtype alias

Section titled “CandidateUpload”
Signature
type CandidateUpload = CandidateObject &
Readonly<{
mediaType: CandidateObjectMediaType;
}>;

One object a build uploads, with the media type it is stored under.

workspaceBuildPolicyconstant

Section titled “workspaceBuildPolicy”
Signature
const workspaceBuildPolicy: "package-json-fungi-build-v4" =
"package-json-fungi-build-v4";

The pinned workspace build policy: how a captured workspace’s manifests build (package.json#fungi.build). v4 selects App compile roots from runtime imports, not the authoring/host dependencies in its owning manifest. A dependency may name its own package build script, which only an admitted Computer build runs.

It is part of every workspace HTML recipe’s toolchain, so its digest moves with it, and the Computer build request carries it at the top level, where a builder compiled before it existed refuses the request outright.


TEAM_APP_CANDIDATE_MANIFEST_MAX_BYTESconstant

Section titled “TEAM_APP_CANDIDATE_MANIFEST_MAX_BYTES”
Signature
const TEAM_APP_CANDIDATE_MANIFEST_MAX_BYTES: number;

The largest candidate manifest request body, in bytes. A manifest names objects; their bytes are uploaded one at a time, never inside it.


candidateObjectSchemaconstant

Section titled “candidateObjectSchema”
Signature
const candidateObjectSchema: Struct<{
digest: refine<Sha256Digest, String>;
byteLength: Number;
}>;

One content-addressed object a build uploaded before its manifest.


candidateOutputManifestSchemaconstant

Section titled “candidateOutputManifestSchema”
Signature
const candidateOutputManifestSchema: Union<readonly [Struct<{
declaration: optionalKey<Codec<Readonly<{
api?: Readonly<{
methods: ...;
toolFamily?: ...;
events?: ...;
}>;
displayName?: string;
capabilities: readonly (
| "computer.list"
| "computer.readFile"
| "computer.writeFile"
| "computer.execute"
| "approvals"
| "agent.list"
| "agent.manage"
| "agent.rename"
| "agent.avatar"
| "agent.toolPolicy"
| "agent.read"
| "agent.send"
| "llm.generation"
| "media.generation"
| "games:servers"
| "git.repository"
| "apps.open"
| "apps.call"
| "app.storage"
| "app.events.emit"
| "team.workbenchHost"
| "marketplace.browse"
| "marketplace.purchase"
| "workflow.run"
| "workflow.publish"
| "workflow.arm"
| "world"
| "channels.read"
| "channels.personal.manage")[];
calls?: readonly Readonly<...>[];
guidance?: string;
handlers: readonly "file.open"[];
receives?: readonly "git.push"[];
icon?: string;
roles: readonly ("files" | "dashboard" | "inbox" | "media" | "sessions" | "terminal")[];
storage?: readonly Readonly<...>[];
commands?: readonly Readonly<...>[];
gills?: readonly Readonly<...>[];
backend?: Readonly<{
bindings: ...;
sync?: ...;
}>;
}>, Readonly<{
api?: Readonly<{
methods: ...;
toolFamily?: ...;
events?: ...;
}>;
displayName?: string;
capabilities: readonly (
| "computer.list"
| "computer.readFile"
| "computer.writeFile"
| "computer.execute"
| "approvals"
| "agent.list"
| "agent.manage"
| "agent.rename"
| "agent.avatar"
| "agent.toolPolicy"
| "agent.read"
| "agent.send"
| "llm.generation"
| "media.generation"
| "games:servers"
| "git.repository"
| "apps.open"
| "apps.call"
| "app.storage"
| "app.events.emit"
| "team.workbenchHost"
| "marketplace.browse"
| "marketplace.purchase"
| "workflow.run"
| "workflow.publish"
| "workflow.arm"
| "world"
| "channels.read"
| "channels.personal.manage")[];
calls?: readonly Readonly<...>[];
guidance?: string;
handlers: readonly "file.open"[];
receives?: readonly "git.push"[];
icon?: string;
roles: readonly ("files" | "dashboard" | "inbox" | "media" | "sessions" | "terminal")[];
storage?: readonly Readonly<...>[];
commands?: readonly Readonly<...>[];
gills?: readonly Readonly<...>[];
backend?: Readonly<{
bindings: ...;
sync?: ...;
}>;
}>, never, never>>;
kind: Literal<"ui">;
ui: Union<readonly [Struct<{
mediaType: Literal<"text/html; charset=utf-8">;
content: Struct<{
digest: refine<..., ...>;
byteLength: Number;
kind: Literal<...>;
}>;
}>, Struct<{
mediaType: Literal<"application/vnd.fungi.app-assets+json">;
content: Struct<{
kind: Literal<...>;
base: String;
assets: $Array<...>;
}>;
}>]>;
}>, Struct<{
declaration: optionalKey<Codec<Readonly<{
api?: Readonly<{
methods: ...;
toolFamily?: ...;
events?: ...;
}>;
displayName?: string;
capabilities: readonly (
| "computer.list"
| "computer.readFile"
| "computer.writeFile"
| "computer.execute"
| "approvals"
| "agent.list"
| "agent.manage"
| "agent.rename"
| "agent.avatar"
| "agent.toolPolicy"
| "agent.read"
| "agent.send"
| "llm.generation"
| "media.generation"
| "games:servers"
| "git.repository"
| "apps.open"
| "apps.call"
| "app.storage"
| "app.events.emit"
| "team.workbenchHost"
| "marketplace.browse"
| "marketplace.purchase"
| "workflow.run"
| "workflow.publish"
| "workflow.arm"
| "world"
| "channels.read"
| "channels.personal.manage")[];
calls?: readonly Readonly<...>[];
guidance?: string;
handlers: readonly "file.open"[];
receives?: readonly "git.push"[];
icon?: string;
roles: readonly ("files" | "dashboard" | "inbox" | "media" | "sessions" | "terminal")[];
storage?: readonly Readonly<...>[];
commands?: readonly Readonly<...>[];
gills?: readonly Readonly<...>[];
backend?: Readonly<{
bindings: ...;
sync?: ...;
}>;
}>, Readonly<{
api?: Readonly<{
methods: ...;
toolFamily?: ...;
events?: ...;
}>;
displayName?: string;
capabilities: readonly (
| "computer.list"
| "computer.readFile"
| "computer.writeFile"
| "computer.execute"
| "approvals"
| "agent.list"
| "agent.manage"
| "agent.rename"
| "agent.avatar"
| "agent.toolPolicy"
| "agent.read"
| "agent.send"
| "llm.generation"
| "media.generation"
| "games:servers"
| "git.repository"
| "apps.open"
| "apps.call"
| "app.storage"
| "app.events.emit"
| "team.workbenchHost"
| "marketplace.browse"
| "marketplace.purchase"
| "workflow.run"
| "workflow.publish"
| "workflow.arm"
| "world"
| "channels.read"
| "channels.personal.manage")[];
calls?: readonly Readonly<...>[];
guidance?: string;
handlers: readonly "file.open"[];
receives?: readonly "git.push"[];
icon?: string;
roles: readonly ("files" | "dashboard" | "inbox" | "media" | "sessions" | "terminal")[];
storage?: readonly Readonly<...>[];
commands?: readonly Readonly<...>[];
gills?: readonly Readonly<...>[];
backend?: Readonly<{
bindings: ...;
sync?: ...;
}>;
}>, never, never>>;
kind: Literal<"backend">;
backend: Struct<{
digest: refine<Sha256Digest, String>;
byteLength: Number;
}>;
}>, Struct<{
declaration: optionalKey<Codec<Readonly<{
api?: Readonly<{
methods: ...;
toolFamily?: ...;
events?: ...;
}>;
displayName?: string;
capabilities: readonly (
| "computer.list"
| "computer.readFile"
| "computer.writeFile"
| "computer.execute"
| "approvals"
| "agent.list"
| "agent.manage"
| "agent.rename"
| "agent.avatar"
| "agent.toolPolicy"
| "agent.read"
| "agent.send"
| "llm.generation"
| "media.generation"
| "games:servers"
| "git.repository"
| "apps.open"
| "apps.call"
| "app.storage"
| "app.events.emit"
| "team.workbenchHost"
| "marketplace.browse"
| "marketplace.purchase"
| "workflow.run"
| "workflow.publish"
| "workflow.arm"
| "world"
| "channels.read"
| "channels.personal.manage")[];
calls?: readonly Readonly<...>[];
guidance?: string;
handlers: readonly "file.open"[];
receives?: readonly "git.push"[];
icon?: string;
roles: readonly ("files" | "dashboard" | "inbox" | "media" | "sessions" | "terminal")[];
storage?: readonly Readonly<...>[];
commands?: readonly Readonly<...>[];
gills?: readonly Readonly<...>[];
backend?: Readonly<{
bindings: ...;
sync?: ...;
}>;
}>, Readonly<{
api?: Readonly<{
methods: ...;
toolFamily?: ...;
events?: ...;
}>;
displayName?: string;
capabilities: readonly (
| "computer.list"
| "computer.readFile"
| "computer.writeFile"
| "computer.execute"
| "approvals"
| "agent.list"
| "agent.manage"
| "agent.rename"
| "agent.avatar"
| "agent.toolPolicy"
| "agent.read"
| "agent.send"
| "llm.generation"
| "media.generation"
| "games:servers"
| "git.repository"
| "apps.open"
| "apps.call"
| "app.storage"
| "app.events.emit"
| "team.workbenchHost"
| "marketplace.browse"
| "marketplace.purchase"
| "workflow.run"
| "workflow.publish"
| "workflow.arm"
| "world"
| "channels.read"
| "channels.personal.manage")[];
calls?: readonly Readonly<...>[];
guidance?: string;
handlers: readonly "file.open"[];
receives?: readonly "git.push"[];
icon?: string;
roles: readonly ("files" | "dashboard" | "inbox" | "media" | "sessions" | "terminal")[];
storage?: readonly Readonly<...>[];
commands?: readonly Readonly<...>[];
gills?: readonly Readonly<...>[];
backend?: Readonly<{
bindings: ...;
sync?: ...;
}>;
}>, never, never>>;
kind: Literal<"app">;
ui: Union<readonly [Struct<{
mediaType: Literal<"text/html; charset=utf-8">;
content: Struct<{
digest: refine<..., ...>;
byteLength: Number;
kind: Literal<...>;
}>;
}>, Struct<{
mediaType: Literal<"application/vnd.fungi.app-assets+json">;
content: Struct<{
kind: Literal<...>;
base: String;
assets: $Array<...>;
}>;
}>]>;
backend: Struct<{
digest: refine<Sha256Digest, String>;
byteLength: Number;
}>;
}>]>;

A build’s output by reference: the same surfaces as its bytes, sized.


teamAppCandidateManifestSchemaconstant

Section titled “teamAppCandidateManifestSchema”
Signature
const teamAppCandidateManifestSchema: Struct<{
appId: refine<AppId, String>;
output: Union<readonly [Struct<{
declaration: optionalKey<Codec<Readonly<{
api?: ... | ...;
displayName?: ... | ...;
capabilities: readonly ...[];
calls?: ... | ...;
guidance?: ... | ...;
handlers: readonly ...[];
receives?: ... | ...;
icon?: ... | ...;
roles: readonly ...[];
storage?: ... | ...;
commands?: ... | ...;
gills?: ... | ...;
backend?: ... | ...;
}>, Readonly<{
api?: ... | ...;
displayName?: ... | ...;
capabilities: readonly ...[];
calls?: ... | ...;
guidance?: ... | ...;
handlers: readonly ...[];
receives?: ... | ...;
icon?: ... | ...;
roles: readonly ...[];
storage?: ... | ...;
commands?: ... | ...;
gills?: ... | ...;
backend?: ... | ...;
}>, never, never>>;
kind: Literal<"ui">;
ui: Union<readonly [Struct<{
mediaType: Literal<...>;
content: Struct<...>;
}>, Struct<{
mediaType: Literal<...>;
content: Struct<...>;
}>]>;
}>, Struct<{
declaration: optionalKey<Codec<Readonly<{
api?: ... | ...;
displayName?: ... | ...;
capabilities: readonly ...[];
calls?: ... | ...;
guidance?: ... | ...;
handlers: readonly ...[];
receives?: ... | ...;
icon?: ... | ...;
roles: readonly ...[];
storage?: ... | ...;
commands?: ... | ...;
gills?: ... | ...;
backend?: ... | ...;
}>, Readonly<{
api?: ... | ...;
displayName?: ... | ...;
capabilities: readonly ...[];
calls?: ... | ...;
guidance?: ... | ...;
handlers: readonly ...[];
receives?: ... | ...;
icon?: ... | ...;
roles: readonly ...[];
storage?: ... | ...;
commands?: ... | ...;
gills?: ... | ...;
backend?: ... | ...;
}>, never, never>>;
kind: Literal<"backend">;
backend: Struct<{
digest: refine<Sha256Digest, String>;
byteLength: Number;
}>;
}>, Struct<{
declaration: optionalKey<Codec<Readonly<{
api?: ... | ...;
displayName?: ... | ...;
capabilities: readonly ...[];
calls?: ... | ...;
guidance?: ... | ...;
handlers: readonly ...[];
receives?: ... | ...;
icon?: ... | ...;
roles: readonly ...[];
storage?: ... | ...;
commands?: ... | ...;
gills?: ... | ...;
backend?: ... | ...;
}>, Readonly<{
api?: ... | ...;
displayName?: ... | ...;
capabilities: readonly ...[];
calls?: ... | ...;
guidance?: ... | ...;
handlers: readonly ...[];
receives?: ... | ...;
icon?: ... | ...;
roles: readonly ...[];
storage?: ... | ...;
commands?: ... | ...;
gills?: ... | ...;
backend?: ... | ...;
}>, never, never>>;
kind: Literal<"app">;
ui: Union<readonly [Struct<{
mediaType: Literal<...>;
content: Struct<...>;
}>, Struct<{
mediaType: Literal<...>;
content: Struct<...>;
}>]>;
backend: Struct<{
digest: refine<Sha256Digest, String>;
byteLength: Number;
}>;
}>]>;
provenance: Struct<{
sourceRevision: refine<SourceRevision, String>;
sourceTreeDigest: refine<Sha256Digest, String>;
buildRecipeDigest: refine<Sha256Digest, String>;
}>;
}>;

A submitted Team App candidate: its output’s objects by digest and size, and its provenance, before the Team assigns a stable Release ID.


preparedCandidateManifestSchemaconstant

Section titled “preparedCandidateManifestSchema”
Signature
const preparedCandidateManifestSchema: Struct<{
appId: refine<AppId, String>;
output: Union<readonly [Struct<{
declaration: optionalKey<Codec<Readonly<{
api?: ... | ...;
displayName?: ... | ...;
capabilities: readonly ...[];
calls?: ... | ...;
guidance?: ... | ...;
handlers: readonly ...[];
receives?: ... | ...;
icon?: ... | ...;
roles: readonly ...[];
storage?: ... | ...;
commands?: ... | ...;
gills?: ... | ...;
backend?: ... | ...;
}>, Readonly<{
api?: ... | ...;
displayName?: ... | ...;
capabilities: readonly ...[];
calls?: ... | ...;
guidance?: ... | ...;
handlers: readonly ...[];
receives?: ... | ...;
icon?: ... | ...;
roles: readonly ...[];
storage?: ... | ...;
commands?: ... | ...;
gills?: ... | ...;
backend?: ... | ...;
}>, never, never>>;
kind: Literal<"ui">;
ui: Union<readonly [Struct<{
mediaType: Literal<...>;
content: Struct<...>;
}>, Struct<{
mediaType: Literal<...>;
content: Struct<...>;
}>]>;
}>, Struct<{
declaration: optionalKey<Codec<Readonly<{
api?: ... | ...;
displayName?: ... | ...;
capabilities: readonly ...[];
calls?: ... | ...;
guidance?: ... | ...;
handlers: readonly ...[];
receives?: ... | ...;
icon?: ... | ...;
roles: readonly ...[];
storage?: ... | ...;
commands?: ... | ...;
gills?: ... | ...;
backend?: ... | ...;
}>, Readonly<{
api?: ... | ...;
displayName?: ... | ...;
capabilities: readonly ...[];
calls?: ... | ...;
guidance?: ... | ...;
handlers: readonly ...[];
receives?: ... | ...;
icon?: ... | ...;
roles: readonly ...[];
storage?: ... | ...;
commands?: ... | ...;
gills?: ... | ...;
backend?: ... | ...;
}>, never, never>>;
kind: Literal<"backend">;
backend: Struct<{
digest: refine<Sha256Digest, String>;
byteLength: Number;
}>;
}>, Struct<{
declaration: optionalKey<Codec<Readonly<{
api?: ... | ...;
displayName?: ... | ...;
capabilities: readonly ...[];
calls?: ... | ...;
guidance?: ... | ...;
handlers: readonly ...[];
receives?: ... | ...;
icon?: ... | ...;
roles: readonly ...[];
storage?: ... | ...;
commands?: ... | ...;
gills?: ... | ...;
backend?: ... | ...;
}>, Readonly<{
api?: ... | ...;
displayName?: ... | ...;
capabilities: readonly ...[];
calls?: ... | ...;
guidance?: ... | ...;
handlers: readonly ...[];
receives?: ... | ...;
icon?: ... | ...;
roles: readonly ...[];
storage?: ... | ...;
commands?: ... | ...;
gills?: ... | ...;
backend?: ... | ...;
}>, never, never>>;
kind: Literal<"app">;
ui: Union<readonly [Struct<{
mediaType: Literal<...>;
content: Struct<...>;
}>, Struct<{
mediaType: Literal<...>;
content: Struct<...>;
}>]>;
backend: Struct<{
digest: refine<Sha256Digest, String>;
byteLength: Number;
}>;
}>]>;
provenance: Struct<{
sourceRevision: refine<SourceRevision, String>;
sourceTreeDigest: refine<Sha256Digest, String>;
buildRecipeDigest: refine<Sha256Digest, String>;
}>;
releaseId: refine<ReleaseId, String>;
}>;

Publisher persistence input after TeamDO reserves retry-stable identities.


preparedCandidateSchemaconstant

Section titled “preparedCandidateSchema”
Signature
const preparedCandidateSchema: Struct<{
appId: refine<AppId, String>;
releaseId: refine<ReleaseId, String>;
output: Union<readonly [Struct<{
declaration: optionalKey<Codec<Readonly<{
api?: ... | ...;
displayName?: ... | ...;
capabilities: readonly ...[];
calls?: ... | ...;
guidance?: ... | ...;
handlers: readonly ...[];
receives?: ... | ...;
icon?: ... | ...;
roles: readonly ...[];
storage?: ... | ...;
commands?: ... | ...;
gills?: ... | ...;
backend?: ... | ...;
}>, Readonly<{
api?: ... | ...;
displayName?: ... | ...;
capabilities: readonly ...[];
calls?: ... | ...;
guidance?: ... | ...;
handlers: readonly ...[];
receives?: ... | ...;
icon?: ... | ...;
roles: readonly ...[];
storage?: ... | ...;
commands?: ... | ...;
gills?: ... | ...;
backend?: ... | ...;
}>, never, never>>;
kind: Literal<"ui">;
ui: Union<readonly [Struct<{
mediaType: Literal<...>;
content: Struct<...>;
}>, Struct<{
mediaType: Literal<...>;
content: Struct<...>;
}>]>;
}>, Struct<{
declaration: optionalKey<Codec<Readonly<{
api?: ... | ...;
displayName?: ... | ...;
capabilities: readonly ...[];
calls?: ... | ...;
guidance?: ... | ...;
handlers: readonly ...[];
receives?: ... | ...;
icon?: ... | ...;
roles: readonly ...[];
storage?: ... | ...;
commands?: ... | ...;
gills?: ... | ...;
backend?: ... | ...;
}>, Readonly<{
api?: ... | ...;
displayName?: ... | ...;
capabilities: readonly ...[];
calls?: ... | ...;
guidance?: ... | ...;
handlers: readonly ...[];
receives?: ... | ...;
icon?: ... | ...;
roles: readonly ...[];
storage?: ... | ...;
commands?: ... | ...;
gills?: ... | ...;
backend?: ... | ...;
}>, never, never>>;
kind: Literal<"backend">;
backend: Uint8ArrayFromBase64;
}>, Struct<{
declaration: optionalKey<Codec<Readonly<{
api?: ... | ...;
displayName?: ... | ...;
capabilities: readonly ...[];
calls?: ... | ...;
guidance?: ... | ...;
handlers: readonly ...[];
receives?: ... | ...;
icon?: ... | ...;
roles: readonly ...[];
storage?: ... | ...;
commands?: ... | ...;
gills?: ... | ...;
backend?: ... | ...;
}>, Readonly<{
api?: ... | ...;
displayName?: ... | ...;
capabilities: readonly ...[];
calls?: ... | ...;
guidance?: ... | ...;
handlers: readonly ...[];
receives?: ... | ...;
icon?: ... | ...;
roles: readonly ...[];
storage?: ... | ...;
commands?: ... | ...;
gills?: ... | ...;
backend?: ... | ...;
}>, never, never>>;
kind: Literal<"app">;
ui: Union<readonly [Struct<{
mediaType: Literal<...>;
content: Struct<...>;
}>, Struct<{
mediaType: Literal<...>;
content: Struct<...>;
}>]>;
backend: Uint8ArrayFromBase64;
}>]>;
provenance: Struct<{
sourceRevision: refine<SourceRevision, String>;
sourceTreeDigest: refine<Sha256Digest, String>;
buildRecipeDigest: refine<Sha256Digest, String>;
}>;
}>;

A platform App candidate the trusted operator built and packed itself, with its bytes inline: the operator’s platform publication request only. A Team candidate never carries bytes; it is a manifest.


candidateObjectMediaTypesconstant

Section titled “candidateObjectMediaTypes”
Signature
const candidateObjectMediaTypes: readonly [
"text/html; charset=utf-8",
"application/vnd.fungi.app-backend+json",
"application/octet-stream",
];

The media type an uploaded object is stored with. A store that reads an HTML document or backend descriptor by its stored type (the Publisher’s) needs it; an asset’s type is its manifest’s, so it is an octet stream.

contentObjectRef()function

Section titled “contentObjectRef()”
Signature
function contentObjectRef(digest): ArtifactRef;

The store key of one content-addressed object.

Parameter Type
digest Sha256Digest

ArtifactRef


headContentObject()function

Section titled “headContentObject()”
Signature
function headContentObject(
bucket,
artifactRef,
): Promise<Readonly<{
byteLength: number;
digest: Sha256Digest | null;
}> | null>;

Describe a stored object by its size and the SHA-256 the store verified.

Parameter Type
bucket ContentObjectBucket
artifactRef ArtifactRef

Promise< | Readonly<{ byteLength: number; digest: Sha256Digest | null; }> | null>


putContentObject()function

Section titled “putContentObject()”
Signature
function putContentObject(
bucket,
object,
body,
mediaType,
): Promise<"stored" | "refused">;

Stream one object into the store under its digest. The store refuses a body whose SHA-256 differs; an object already stored with the same verified digest and size is kept (write-once: a stored version may be pinned by a Release) and the body is discarded, never stored.

Parameter Type
bucket ContentObjectBucket
object { digest: Sha256Digest; byteLength: number; }
object.digest Sha256Digest
object.byteLength number
body ReadableStream<Uint8Array<ArrayBufferLike>> | null
mediaType | "text/html; charset=utf-8" | "application/vnd.fungi.app-backend+json" | "application/octet-stream"

Promise<"stored" | "refused">


encodeTeamAppCandidateManifest()function

Section titled “encodeTeamAppCandidateManifest()”
Signature
function encodeTeamAppCandidateManifest(manifest): string;

Canonical manifest bytes, so a digest is independent of JSON spacing.

Parameter Type
manifest { appId: AppId; output: | { declaration?: Readonly<{ api?: Readonly<{ methods: Readonly<Record<…, …>>; toolFamily?: Readonly<…>; events?: Readonly<…>; }>; displayName?: string; capabilities: readonly ( | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "approvals" | "agent.list" | "agent.manage" | "agent.rename" | "agent.avatar" | "agent.toolPolicy" | "agent.read" | "agent.send" | "llm.generation" | "media.generation" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage")[]; calls?: readonly Readonly<{ appId: string; methods: readonly …[]; }>[]; guidance?: string; handlers: readonly "file.open"[]; receives?: readonly "git.push"[]; icon?: string; roles: readonly ("files" | "dashboard" | "inbox" | "media" | "sessions" | "terminal")[]; storage?: readonly Readonly<{ key: string; scopes: readonly …[]; maxBytes: number; }>[]; commands?: readonly Readonly<{ id: string; title: string; category: string; description?: … | …; sigil?: … | …; projections?: … | …; }>[]; gills?: readonly Readonly<{ id: string; source: string; title: string; params?: … | …; watch?: … | …; desktop?: … | …; }>[]; backend?: Readonly<{ bindings: readonly Readonly<…>[]; sync?: Readonly<…>; }>; }>; kind: "ui"; ui: | { mediaType: "text/html; charset=utf-8"; content: { digest: Sha256Digest; byteLength: number; kind: "html"; }; } | { mediaType: "application/vnd.fungi.app-assets+json"; content: { kind: "assets"; base: string; assets: readonly object[]; }; }; } | { declaration?: Readonly<{ api?: Readonly<{ methods: Readonly<Record<…, …>>; toolFamily?: Readonly<…>; events?: Readonly<…>; }>; displayName?: string; capabilities: readonly ( | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "approvals" | "agent.list" | "agent.manage" | "agent.rename" | "agent.avatar" | "agent.toolPolicy" | "agent.read" | "agent.send" | "llm.generation" | "media.generation" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage")[]; calls?: readonly Readonly<{ appId: string; methods: readonly …[]; }>[]; guidance?: string; handlers: readonly "file.open"[]; receives?: readonly "git.push"[]; icon?: string; roles: readonly ("files" | "dashboard" | "inbox" | "media" | "sessions" | "terminal")[]; storage?: readonly Readonly<{ key: string; scopes: readonly …[]; maxBytes: number; }>[]; commands?: readonly Readonly<{ id: string; title: string; category: string; description?: … | …; sigil?: … | …; projections?: … | …; }>[]; gills?: readonly Readonly<{ id: string; source: string; title: string; params?: … | …; watch?: … | …; desktop?: … | …; }>[]; backend?: Readonly<{ bindings: readonly Readonly<…>[]; sync?: Readonly<…>; }>; }>; kind: "backend"; backend: { digest: Sha256Digest; byteLength: number; }; } | { declaration?: Readonly<{ api?: Readonly<{ methods: Readonly<Record<…, …>>; toolFamily?: Readonly<…>; events?: Readonly<…>; }>; displayName?: string; capabilities: readonly ( | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "approvals" | "agent.list" | "agent.manage" | "agent.rename" | "agent.avatar" | "agent.toolPolicy" | "agent.read" | "agent.send" | "llm.generation" | "media.generation" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage")[]; calls?: readonly Readonly<{ appId: string; methods: readonly …[]; }>[]; guidance?: string; handlers: readonly "file.open"[]; receives?: readonly "git.push"[]; icon?: string; roles: readonly ("files" | "dashboard" | "inbox" | "media" | "sessions" | "terminal")[]; storage?: readonly Readonly<{ key: string; scopes: readonly …[]; maxBytes: number; }>[]; commands?: readonly Readonly<{ id: string; title: string; category: string; description?: … | …; sigil?: … | …; projections?: … | …; }>[]; gills?: readonly Readonly<{ id: string; source: string; title: string; params?: … | …; watch?: … | …; desktop?: … | …; }>[]; backend?: Readonly<{ bindings: readonly Readonly<…>[]; sync?: Readonly<…>; }>; }>; kind: "app"; ui: | { mediaType: "text/html; charset=utf-8"; content: { digest: Sha256Digest; byteLength: number; kind: "html"; }; } | { mediaType: "application/vnd.fungi.app-assets+json"; content: { kind: "assets"; base: string; assets: readonly object[]; }; }; backend: { digest: Sha256Digest; byteLength: number; }; }; provenance: { sourceRevision: SourceRevision; sourceTreeDigest: Sha256Digest; buildRecipeDigest: Sha256Digest; }; }
manifest.appId AppId
manifest.output | { declaration?: Readonly<{ api?: Readonly<{ methods: Readonly<Record<…, …>>; toolFamily?: Readonly<…>; events?: Readonly<…>; }>; displayName?: string; capabilities: readonly ( | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "approvals" | "agent.list" | "agent.manage" | "agent.rename" | "agent.avatar" | "agent.toolPolicy" | "agent.read" | "agent.send" | "llm.generation" | "media.generation" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage")[]; calls?: readonly Readonly<{ appId: string; methods: readonly …[]; }>[]; guidance?: string; handlers: readonly "file.open"[]; receives?: readonly "git.push"[]; icon?: string; roles: readonly ("files" | "dashboard" | "inbox" | "media" | "sessions" | "terminal")[]; storage?: readonly Readonly<{ key: string; scopes: readonly …[]; maxBytes: number; }>[]; commands?: readonly Readonly<{ id: string; title: string; category: string; description?: … | …; sigil?: … | …; projections?: … | …; }>[]; gills?: readonly Readonly<{ id: string; source: string; title: string; params?: … | …; watch?: … | …; desktop?: … | …; }>[]; backend?: Readonly<{ bindings: readonly Readonly<…>[]; sync?: Readonly<…>; }>; }>; kind: "ui"; ui: | { mediaType: "text/html; charset=utf-8"; content: { digest: Sha256Digest; byteLength: number; kind: "html"; }; } | { mediaType: "application/vnd.fungi.app-assets+json"; content: { kind: "assets"; base: string; assets: readonly object[]; }; }; } | { declaration?: Readonly<{ api?: Readonly<{ methods: Readonly<Record<…, …>>; toolFamily?: Readonly<…>; events?: Readonly<…>; }>; displayName?: string; capabilities: readonly ( | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "approvals" | "agent.list" | "agent.manage" | "agent.rename" | "agent.avatar" | "agent.toolPolicy" | "agent.read" | "agent.send" | "llm.generation" | "media.generation" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage")[]; calls?: readonly Readonly<{ appId: string; methods: readonly …[]; }>[]; guidance?: string; handlers: readonly "file.open"[]; receives?: readonly "git.push"[]; icon?: string; roles: readonly ("files" | "dashboard" | "inbox" | "media" | "sessions" | "terminal")[]; storage?: readonly Readonly<{ key: string; scopes: readonly …[]; maxBytes: number; }>[]; commands?: readonly Readonly<{ id: string; title: string; category: string; description?: … | …; sigil?: … | …; projections?: … | …; }>[]; gills?: readonly Readonly<{ id: string; source: string; title: string; params?: … | …; watch?: … | …; desktop?: … | …; }>[]; backend?: Readonly<{ bindings: readonly Readonly<…>[]; sync?: Readonly<…>; }>; }>; kind: "backend"; backend: { digest: Sha256Digest; byteLength: number; }; } | { declaration?: Readonly<{ api?: Readonly<{ methods: Readonly<Record<…, …>>; toolFamily?: Readonly<…>; events?: Readonly<…>; }>; displayName?: string; capabilities: readonly ( | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "approvals" | "agent.list" | "agent.manage" | "agent.rename" | "agent.avatar" | "agent.toolPolicy" | "agent.read" | "agent.send" | "llm.generation" | "media.generation" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage")[]; calls?: readonly Readonly<{ appId: string; methods: readonly …[]; }>[]; guidance?: string; handlers: readonly "file.open"[]; receives?: readonly "git.push"[]; icon?: string; roles: readonly ("files" | "dashboard" | "inbox" | "media" | "sessions" | "terminal")[]; storage?: readonly Readonly<{ key: string; scopes: readonly …[]; maxBytes: number; }>[]; commands?: readonly Readonly<{ id: string; title: string; category: string; description?: … | …; sigil?: … | …; projections?: … | …; }>[]; gills?: readonly Readonly<{ id: string; source: string; title: string; params?: … | …; watch?: … | …; desktop?: … | …; }>[]; backend?: Readonly<{ bindings: readonly Readonly<…>[]; sync?: Readonly<…>; }>; }>; kind: "app"; ui: | { mediaType: "text/html; charset=utf-8"; content: { digest: Sha256Digest; byteLength: number; kind: "html"; }; } | { mediaType: "application/vnd.fungi.app-assets+json"; content: { kind: "assets"; base: string; assets: readonly object[]; }; }; backend: { digest: Sha256Digest; byteLength: number; }; }
manifest.provenance { sourceRevision: SourceRevision; sourceTreeDigest: Sha256Digest; buildRecipeDigest: Sha256Digest; }
manifest.provenance.sourceRevision SourceRevision
manifest.provenance.sourceTreeDigest Sha256Digest
manifest.provenance.buildRecipeDigest Sha256Digest

string


digestTeamAppCandidateManifest()function

Section titled “digestTeamAppCandidateManifest()”
Signature
function digestTeamAppCandidateManifest(manifest): Promise<string>;

The hex SHA-256 of a manifest’s canonical bytes: its App root’s name.

Parameter Type
manifest { appId: AppId; output: | { declaration?: Readonly<{ api?: Readonly<{ methods: Readonly<Record<…, …>>; toolFamily?: Readonly<…>; events?: Readonly<…>; }>; displayName?: string; capabilities: readonly ( | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "approvals" | "agent.list" | "agent.manage" | "agent.rename" | "agent.avatar" | "agent.toolPolicy" | "agent.read" | "agent.send" | "llm.generation" | "media.generation" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage")[]; calls?: readonly Readonly<{ appId: string; methods: readonly …[]; }>[]; guidance?: string; handlers: readonly "file.open"[]; receives?: readonly "git.push"[]; icon?: string; roles: readonly ("files" | "dashboard" | "inbox" | "media" | "sessions" | "terminal")[]; storage?: readonly Readonly<{ key: string; scopes: readonly …[]; maxBytes: number; }>[]; commands?: readonly Readonly<{ id: string; title: string; category: string; description?: … | …; sigil?: … | …; projections?: … | …; }>[]; gills?: readonly Readonly<{ id: string; source: string; title: string; params?: … | …; watch?: … | …; desktop?: … | …; }>[]; backend?: Readonly<{ bindings: readonly Readonly<…>[]; sync?: Readonly<…>; }>; }>; kind: "ui"; ui: | { mediaType: "text/html; charset=utf-8"; content: { digest: Sha256Digest; byteLength: number; kind: "html"; }; } | { mediaType: "application/vnd.fungi.app-assets+json"; content: { kind: "assets"; base: string; assets: readonly object[]; }; }; } | { declaration?: Readonly<{ api?: Readonly<{ methods: Readonly<Record<…, …>>; toolFamily?: Readonly<…>; events?: Readonly<…>; }>; displayName?: string; capabilities: readonly ( | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "approvals" | "agent.list" | "agent.manage" | "agent.rename" | "agent.avatar" | "agent.toolPolicy" | "agent.read" | "agent.send" | "llm.generation" | "media.generation" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage")[]; calls?: readonly Readonly<{ appId: string; methods: readonly …[]; }>[]; guidance?: string; handlers: readonly "file.open"[]; receives?: readonly "git.push"[]; icon?: string; roles: readonly ("files" | "dashboard" | "inbox" | "media" | "sessions" | "terminal")[]; storage?: readonly Readonly<{ key: string; scopes: readonly …[]; maxBytes: number; }>[]; commands?: readonly Readonly<{ id: string; title: string; category: string; description?: … | …; sigil?: … | …; projections?: … | …; }>[]; gills?: readonly Readonly<{ id: string; source: string; title: string; params?: … | …; watch?: … | …; desktop?: … | …; }>[]; backend?: Readonly<{ bindings: readonly Readonly<…>[]; sync?: Readonly<…>; }>; }>; kind: "backend"; backend: { digest: Sha256Digest; byteLength: number; }; } | { declaration?: Readonly<{ api?: Readonly<{ methods: Readonly<Record<…, …>>; toolFamily?: Readonly<…>; events?: Readonly<…>; }>; displayName?: string; capabilities: readonly ( | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "approvals" | "agent.list" | "agent.manage" | "agent.rename" | "agent.avatar" | "agent.toolPolicy" | "agent.read" | "agent.send" | "llm.generation" | "media.generation" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage")[]; calls?: readonly Readonly<{ appId: string; methods: readonly …[]; }>[]; guidance?: string; handlers: readonly "file.open"[]; receives?: readonly "git.push"[]; icon?: string; roles: readonly ("files" | "dashboard" | "inbox" | "media" | "sessions" | "terminal")[]; storage?: readonly Readonly<{ key: string; scopes: readonly …[]; maxBytes: number; }>[]; commands?: readonly Readonly<{ id: string; title: string; category: string; description?: … | …; sigil?: … | …; projections?: … | …; }>[]; gills?: readonly Readonly<{ id: string; source: string; title: string; params?: … | …; watch?: … | …; desktop?: … | …; }>[]; backend?: Readonly<{ bindings: readonly Readonly<…>[]; sync?: Readonly<…>; }>; }>; kind: "app"; ui: | { mediaType: "text/html; charset=utf-8"; content: { digest: Sha256Digest; byteLength: number; kind: "html"; }; } | { mediaType: "application/vnd.fungi.app-assets+json"; content: { kind: "assets"; base: string; assets: readonly object[]; }; }; backend: { digest: Sha256Digest; byteLength: number; }; }; provenance: { sourceRevision: SourceRevision; sourceTreeDigest: Sha256Digest; buildRecipeDigest: Sha256Digest; }; }
manifest.appId AppId
manifest.output | { declaration?: Readonly<{ api?: Readonly<{ methods: Readonly<Record<…, …>>; toolFamily?: Readonly<…>; events?: Readonly<…>; }>; displayName?: string; capabilities: readonly ( | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "approvals" | "agent.list" | "agent.manage" | "agent.rename" | "agent.avatar" | "agent.toolPolicy" | "agent.read" | "agent.send" | "llm.generation" | "media.generation" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage")[]; calls?: readonly Readonly<{ appId: string; methods: readonly …[]; }>[]; guidance?: string; handlers: readonly "file.open"[]; receives?: readonly "git.push"[]; icon?: string; roles: readonly ("files" | "dashboard" | "inbox" | "media" | "sessions" | "terminal")[]; storage?: readonly Readonly<{ key: string; scopes: readonly …[]; maxBytes: number; }>[]; commands?: readonly Readonly<{ id: string; title: string; category: string; description?: … | …; sigil?: … | …; projections?: … | …; }>[]; gills?: readonly Readonly<{ id: string; source: string; title: string; params?: … | …; watch?: … | …; desktop?: … | …; }>[]; backend?: Readonly<{ bindings: readonly Readonly<…>[]; sync?: Readonly<…>; }>; }>; kind: "ui"; ui: | { mediaType: "text/html; charset=utf-8"; content: { digest: Sha256Digest; byteLength: number; kind: "html"; }; } | { mediaType: "application/vnd.fungi.app-assets+json"; content: { kind: "assets"; base: string; assets: readonly object[]; }; }; } | { declaration?: Readonly<{ api?: Readonly<{ methods: Readonly<Record<…, …>>; toolFamily?: Readonly<…>; events?: Readonly<…>; }>; displayName?: string; capabilities: readonly ( | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "approvals" | "agent.list" | "agent.manage" | "agent.rename" | "agent.avatar" | "agent.toolPolicy" | "agent.read" | "agent.send" | "llm.generation" | "media.generation" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage")[]; calls?: readonly Readonly<{ appId: string; methods: readonly …[]; }>[]; guidance?: string; handlers: readonly "file.open"[]; receives?: readonly "git.push"[]; icon?: string; roles: readonly ("files" | "dashboard" | "inbox" | "media" | "sessions" | "terminal")[]; storage?: readonly Readonly<{ key: string; scopes: readonly …[]; maxBytes: number; }>[]; commands?: readonly Readonly<{ id: string; title: string; category: string; description?: … | …; sigil?: … | …; projections?: … | …; }>[]; gills?: readonly Readonly<{ id: string; source: string; title: string; params?: … | …; watch?: … | …; desktop?: … | …; }>[]; backend?: Readonly<{ bindings: readonly Readonly<…>[]; sync?: Readonly<…>; }>; }>; kind: "backend"; backend: { digest: Sha256Digest; byteLength: number; }; } | { declaration?: Readonly<{ api?: Readonly<{ methods: Readonly<Record<…, …>>; toolFamily?: Readonly<…>; events?: Readonly<…>; }>; displayName?: string; capabilities: readonly ( | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "approvals" | "agent.list" | "agent.manage" | "agent.rename" | "agent.avatar" | "agent.toolPolicy" | "agent.read" | "agent.send" | "llm.generation" | "media.generation" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage")[]; calls?: readonly Readonly<{ appId: string; methods: readonly …[]; }>[]; guidance?: string; handlers: readonly "file.open"[]; receives?: readonly "git.push"[]; icon?: string; roles: readonly ("files" | "dashboard" | "inbox" | "media" | "sessions" | "terminal")[]; storage?: readonly Readonly<{ key: string; scopes: readonly …[]; maxBytes: number; }>[]; commands?: readonly Readonly<{ id: string; title: string; category: string; description?: … | …; sigil?: … | …; projections?: … | …; }>[]; gills?: readonly Readonly<{ id: string; source: string; title: string; params?: … | …; watch?: … | …; desktop?: … | …; }>[]; backend?: Readonly<{ bindings: readonly Readonly<…>[]; sync?: Readonly<…>; }>; }>; kind: "app"; ui: | { mediaType: "text/html; charset=utf-8"; content: { digest: Sha256Digest; byteLength: number; kind: "html"; }; } | { mediaType: "application/vnd.fungi.app-assets+json"; content: { kind: "assets"; base: string; assets: readonly object[]; }; }; backend: { digest: Sha256Digest; byteLength: number; }; }
manifest.provenance { sourceRevision: SourceRevision; sourceTreeDigest: Sha256Digest; buildRecipeDigest: Sha256Digest; }
manifest.provenance.sourceRevision SourceRevision
manifest.provenance.sourceTreeDigest Sha256Digest
manifest.provenance.buildRecipeDigest Sha256Digest

Promise<string>


candidateObjectMediaType()function

Section titled “candidateObjectMediaType()”
Signature
function candidateObjectMediaType(
value,
):
| "text/html; charset=utf-8"
| "application/vnd.fungi.app-backend+json"
| "application/octet-stream"
| null;

The stored media type a request names, if it is one an object may carry.

Parameter Type
value string | null

| "text/html; charset=utf-8" | "application/vnd.fungi.app-backend+json" | "application/octet-stream" | null


candidateManifestObjects()function

Section titled “candidateManifestObjects()”
Signature
function candidateManifestObjects(output): readonly CandidateUpload[];

Every distinct object a manifest names, each once, in manifest order.

Parameter Type
output | { declaration?: Readonly<{ api?: Readonly<{ methods: Readonly<Record<string, Readonly<…>>>; toolFamily?: Readonly<{ name: …; list: …; call: …; }>; events?: Readonly<Record<…, …>>; }>; displayName?: string; capabilities: readonly ( | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "approvals" | "agent.list" | "agent.manage" | "agent.rename" | "agent.avatar" | "agent.toolPolicy" | "agent.read" | "agent.send" | "llm.generation" | "media.generation" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage")[]; calls?: readonly Readonly<{ appId: string; methods: readonly string[]; }>[]; guidance?: string; handlers: readonly "file.open"[]; receives?: readonly "git.push"[]; icon?: string; roles: readonly ("files" | "dashboard" | "inbox" | "media" | "sessions" | "terminal")[]; storage?: readonly Readonly<{ key: string; scopes: readonly (… | …)[]; maxBytes: number; }>[]; commands?: readonly Readonly<{ id: string; title: string; category: string; description?: string; sigil?: string; projections?: Readonly<…>; }>[]; gills?: readonly Readonly<{ id: string; source: string; title: string; params?: readonly …[]; watch?: AppGillWatch; desktop?: Readonly<…>; }>[]; backend?: Readonly<{ bindings: readonly Readonly<{ name: …; operations: …; }>[]; sync?: Readonly<{ method: …; }>; }>; }>; kind: "ui"; ui: | { mediaType: "text/html; charset=utf-8"; content: { digest: Sha256Digest; byteLength: number; kind: "html"; }; } | { mediaType: "application/vnd.fungi.app-assets+json"; content: { kind: "assets"; base: string; assets: readonly object[]; }; }; } | { declaration?: Readonly<{ api?: Readonly<{ methods: Readonly<Record<string, Readonly<…>>>; toolFamily?: Readonly<{ name: …; list: …; call: …; }>; events?: Readonly<Record<…, …>>; }>; displayName?: string; capabilities: readonly ( | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "approvals" | "agent.list" | "agent.manage" | "agent.rename" | "agent.avatar" | "agent.toolPolicy" | "agent.read" | "agent.send" | "llm.generation" | "media.generation" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage")[]; calls?: readonly Readonly<{ appId: string; methods: readonly string[]; }>[]; guidance?: string; handlers: readonly "file.open"[]; receives?: readonly "git.push"[]; icon?: string; roles: readonly ("files" | "dashboard" | "inbox" | "media" | "sessions" | "terminal")[]; storage?: readonly Readonly<{ key: string; scopes: readonly (… | …)[]; maxBytes: number; }>[]; commands?: readonly Readonly<{ id: string; title: string; category: string; description?: string; sigil?: string; projections?: Readonly<…>; }>[]; gills?: readonly Readonly<{ id: string; source: string; title: string; params?: readonly …[]; watch?: AppGillWatch; desktop?: Readonly<…>; }>[]; backend?: Readonly<{ bindings: readonly Readonly<{ name: …; operations: …; }>[]; sync?: Readonly<{ method: …; }>; }>; }>; kind: "backend"; backend: { digest: Sha256Digest; byteLength: number; }; } | { declaration?: Readonly<{ api?: Readonly<{ methods: Readonly<Record<string, Readonly<…>>>; toolFamily?: Readonly<{ name: …; list: …; call: …; }>; events?: Readonly<Record<…, …>>; }>; displayName?: string; capabilities: readonly ( | "computer.list" | "computer.readFile" | "computer.writeFile" | "computer.execute" | "approvals" | "agent.list" | "agent.manage" | "agent.rename" | "agent.avatar" | "agent.toolPolicy" | "agent.read" | "agent.send" | "llm.generation" | "media.generation" | "games:servers" | "git.repository" | "apps.open" | "apps.call" | "app.storage" | "app.events.emit" | "team.workbenchHost" | "marketplace.browse" | "marketplace.purchase" | "workflow.run" | "workflow.publish" | "workflow.arm" | "world" | "channels.read" | "channels.personal.manage")[]; calls?: readonly Readonly<{ appId: string; methods: readonly string[]; }>[]; guidance?: string; handlers: readonly "file.open"[]; receives?: readonly "git.push"[]; icon?: string; roles: readonly ("files" | "dashboard" | "inbox" | "media" | "sessions" | "terminal")[]; storage?: readonly Readonly<{ key: string; scopes: readonly (… | …)[]; maxBytes: number; }>[]; commands?: readonly Readonly<{ id: string; title: string; category: string; description?: string; sigil?: string; projections?: Readonly<…>; }>[]; gills?: readonly Readonly<{ id: string; source: string; title: string; params?: readonly …[]; watch?: AppGillWatch; desktop?: Readonly<…>; }>[]; backend?: Readonly<{ bindings: readonly Readonly<{ name: …; operations: …; }>[]; sync?: Readonly<{ method: …; }>; }>; }>; kind: "app"; ui: | { mediaType: "text/html; charset=utf-8"; content: { digest: Sha256Digest; byteLength: number; kind: "html"; }; } | { mediaType: "application/vnd.fungi.app-assets+json"; content: { kind: "assets"; base: string; assets: readonly object[]; }; }; backend: { digest: Sha256Digest; byteLength: number; }; }

readonly CandidateUpload[]


decodeCandidateBackend()function

Section titled “decodeCandidateBackend()”
Signature
function decodeCandidateBackend(bytes): object;

Decode a stored backend descriptor; a manifest’s backend must be one.

Parameter Type
bytes Uint8Array

object

Name Type
runtime object
runtime.kind "durable-facet"
runtime.stateSchema number
compatibilityDate string
exportName string
code string

Re-exports pinnedRecipeSchema


Re-exports AppPublisherCoreConfigSchema


Re-exports AppPublisherCoreConfigInput


Re-exports appBackendExportConditions


Re-exports capturedPinnedRecipeSchema


Re-exports PinnedRecipe


Re-exports CapturedSource


Re-exports RawBuildOutput


Re-exports UiBuildOutput


Re-exports BuildExecutorOutput


Re-exports PreparedUiOutput


Re-exports BuildOutput


Re-exports StoredArtifact


Re-exports PreparedCandidate


Re-exports SourceCapture


Re-exports BuildExecutor


Re-exports ArtifactWriter


Re-exports ReleaseCreator


Re-exports AppPublisherOptions


Re-exports AppPublisher


Re-exports AppCandidatePreparer


Re-exports AppPublisherStage


Re-exports AppPublisherError


Re-exports CapturedConfig


Re-exports pinsCurrentToolchain


Re-exports digestPinnedRecipe


Re-exports normalizeAppPublisherRecipe


Re-exports pinnedRecipeObjectBound


Re-exports fitsPinnedRecipe


Re-exports createAppCandidatePreparer


Re-exports createCapturedCandidatePreparer


Re-exports commitPreparedCandidate


Re-exports createAppPublisher