pack
Import
Section titled “Import”import * as api from "@fungi.computer/oyster/pack";Exports
Section titled “Exports”| Kind | Export | Description |
|---|---|---|
| class | InstallationObservationError | Observer failure supplies no installation outcome and never cancels its owner. |
| type alias | PackOptions | One committed repository and its canonical App build recipe. |
| type alias | PackedRelease | A packed Release on disk. |
| function | packRelease() | Build an exact local Git commit with the canonical compiler and artifact writer. |
| function | installFromSource() | Capture an Artifacts Git commit, build its Release, upload it to an Oyster, and
install it, or switch an existing installation to it
(installRelease). waitMs starts with the upload/observation
phase after packing; a supplied caller signal retains its original lifetime
through that phase. |
| function | installRelease() | Upload a packed Release to an Oyster and install it. The host installs a new
installation (201) or switches an existing one to this Release (200), keeping
its state. Uploads precede admission; this helper then waits for the correlated
terminal owner receipt, not merely the HTTP acknowledgement. Uploads and
observation share the caller signal or explicit waitMs; absent either, the
installer owns a twenty-minute default. Expiry does not cancel admitted work and
is reported as an unconfirmed observation, not refusal. |
| function | publishSource() | Project one exact first-party commit’s editable source, git push it to an
Oyster’s own template for that App, and claim the pushed head, so APPS.fork
and Computer builds can later read it. The operator owner key authenticates
both; it reaches Git only through its config environment and no provider
credential ever leaves the Oyster. Answers the claim response:
{ kind: "recorded" | "existing", receipt } on success. |
InstallationObservationErrorclass
Section titled “InstallationObservationError”Observer failure supplies no installation outcome and never cancels its owner.
Extends
Section titled “Extends”Error
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new InstallationObservationError(requestId, options?): InstallationObservationError;Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
requestId |
string |
options? |
ErrorOptions |
Returns
Section titled “Returns”Overrides
Section titled “Overrides”Error.constructor;Properties
Section titled “Properties”requestId
Section titled “requestId”readonly requestId: string;PackOptionstype alias
Section titled “PackOptions”type PackOptions = Readonly<{ appId: string; releaseId?: string; sourceDirectory: string; sourceRevision: string; recipe: AppPublisherCoreConfigInput["recipe"]; packageStoreDirectory?: string; outDirectory: string;}>;One committed repository and its canonical App build recipe.
PackedReleasetype alias
Section titled “PackedRelease”type PackedRelease = Readonly<{ release: Release; artifacts: readonly Readonly<{ artifactRef: ArtifactRef; path: string; }>[];}>;A packed Release on disk.
packRelease()function
Section titled “packRelease()”function packRelease(options): Promise< Readonly<{ release: Release; artifacts: readonly Readonly<{ artifactRef: ArtifactRef; path: string; }>[]; }>>;Build an exact local Git commit with the canonical compiler and artifact writer.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options |
PackOptions |
Returns
Section titled “Returns”Promise<Readonly<{ release: Release; artifacts: readonly
Readonly<{ artifactRef: ArtifactRef; path: string; }>[]; }>>
installFromSource()function
Section titled “installFromSource()”function installFromSource(input): Promise<Response>;Capture an Artifacts Git commit, build its Release, upload it to an Oyster, and
install it, or switch an existing installation to it
(installRelease). waitMs starts with the upload/observation
phase after packing; a supplied caller signal retains its original lifetime
through that phase.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
input |
Readonly<{ appId: string; releaseId?: string; recipe: { kind?: "bundled-html" | "source-html"; entry: string; assets?: { maxManifestBytes: number; maxObjects: number; maxObjectBytes: number; maxTotalBytes: number; }; assetBase?: string; backend: | { entry?: string; runtime: { kind: "durable-facet"; stateSchema: number; }; compatibilityDate: string; exportName: string; } | null; maxOutputBytes: number; }; source: Readonly<{ remote: string; token: string; sourceRevision: string; }>; packageStoreDirectory?: string; url: string; key: string; installationId: string; }> & Readonly<{ waitMs?: number; signal?: AbortSignal; }> |
Returns
Section titled “Returns”Promise<Response>
installRelease()function
Section titled “installRelease()”function installRelease(input): Promise<Response>;Upload a packed Release to an Oyster and install it. The host installs a new
installation (201) or switches an existing one to this Release (200), keeping
its state. Uploads precede admission; this helper then waits for the correlated
terminal owner receipt, not merely the HTTP acknowledgement. Uploads and
observation share the caller signal or explicit waitMs; absent either, the
installer owns a twenty-minute default. Expiry does not cancel admitted work and
is reported as an unconfirmed observation, not refusal.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
input |
Readonly<{ directory: string; url: string; key: string; installationId?: string; onAdmitted?: (operation) => void; }> & Readonly<{ waitMs?: number; signal?: AbortSignal; }> |
Returns
Section titled “Returns”Promise<Response>
publishSource()function
Section titled “publishSource()”function publishSource(input): Promise<Response>;Project one exact first-party commit’s editable source, git push it to an
Oyster’s own template for that App, and claim the pushed head, so APPS.fork
and Computer builds can later read it. The operator owner key authenticates
both; it reaches Git only through its config environment and no provider
credential ever leaves the Oyster. Answers the claim response:
{ kind: "recorded" | "existing", receipt } on success.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
input |
Readonly<{ appId: string; entry: string; repositoryPath: string; sourceRevision: string; recipe: PackOptions["recipe"]; url: string; key: string; }> |
Returns
Section titled “Returns”Promise<Response>