跳到主要内容

bolt/artifact

bolt/artifact

此内容目前仅提供英文版。

导入自 @norbital-ai/bolt/artifact

@norbital-ai/bolt/artifact: a host's reader of built artifacts (read.ts).

read

Artifact type

type Artifact = {
    dir: string;
    artifact: ArtifactJson;
    manifest: EngineManifest;
    migrations: MigrationBundle;
    guest: GuestProgram;
    client: string;
    pages: Readonly<Record<string, {
        readonly program: GuestProgram;
        readonly entry: string;
        readonly css: readonly string[];
    }>>;
};

A release read_artifact verified and decoded: its descriptor, manifest, migrations and loaded guest programs.

成员

名称类型说明
dirstring
artifactArtifactJson
manifestEngineManifest
migrationsMigrationBundle
guestGuestProgram
clientstring
pagesReadonly<Record<string, { readonly program: GuestProgram; readonly entry: string; readonly css: readonly string[]; }>>

源码: packages/bolt/src/engine/artifact/read.ts:67

ArtifactJson const

const ArtifactJson: Schema.Struct<{ readonly format: Schema.Literal<1>; readonly contract: Schema.String; readonly host_api: Schema.Number; readonly handle: Schema.String; readonly name: Schema.String; readonly schema: Schema.String; readonly client: Schema.Struct<{ readonly entry: Schema.String; readonly css: Schema.$Array<Schema.String>; readonly immutable: Schema.optionalKey<Schema.$Array<Schema.String>>; readonly public_routes: Schema.optionalKey<Schema.$Array<Schema.String>>; readonly has_embeds: Schema.optionalKey<Schema.Boolean>; }>; readonly pages: Schema.$Record<Schema.String, Schema.Struct<{ readonly e…

Schema of a release's artifact.json: its contract, handle, schema fingerprint, entries and recorded digests.

源码: packages/bolt/src/engine/artifact/read.ts:25

CONTRACT const

const CONTRACT: string

This engine's contract digest, recorded in each artifact.json it builds. The engine refuses any other contract.

源码: packages/bolt/src/engine/artifact/read.ts:102

activation_requirements function

function activation_requirements(m: EngineManifest): { files: true; mail: true; secrets: boolean; issues: readonly string[]; }

Facilities and declaration refusals a host checks before activating the verified artifact.

参数

名称类型说明
mEngineManifest
  • exposures: Schema.$Record<Schema.String, Schema.Struct<{ readonly outputs: Schema.StructWithRest<Schema.Struct<{ readonly default: Schema.$Record<Schema.String, Schema.Struct<{ readonly fields: Schema.Union<readonly [Schema.Literal<"all">, Schema.$Array<Schema.String>]>; }>>; }>, readonly [Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Struct<{ readonly fields: Schema.Union<readonly [Sch…
  • policies: Schema.$Record<Schema.String, Schema.Struct<{ readonly description: Schema.String; readonly grants: Schema.$Record<Schema.String, Schema.Struct<{ readonly outputs: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{ readonly scopes: Schema.optionalKey<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>>; readonly history:…
  • agent: Schema.Struct<{ readonly internal: Schema.optionalKey<Schema.String>; readonly external: Schema.optionalKey<Schema.String>; readonly skills: Schema.$Record<Schema.String, Schema.Struct<{ readonly text: Schema.String; readonly digest: Schema.String; readonly files: Schema.$Array<Schema.String>; }>>; }>
  • integrations: Schema.$Record<Schema.String, Schema.Struct<{ readonly test: Schema.optionalKey<Schema.Literal<true>>; readonly description: Schema.String; readonly driver: Schema.Union<readonly [Schema.Literals<("email" | "http" | "calendar" | "chat" | "sqlserver")[]>, Schema.Struct<{ readonly read: Schema.Literals<readonly ["cursor", "deliveries", "items"]>; readonly request: Schema.optionalKey<Schema.Literals…
  • models: Schema.$Record<Schema.String, Schema.Struct<{ readonly fields: Schema.$Record<Schema.String, Schema.Codec<import("@norbital-ai/ui").Kind, import("@norbital-ai/ui").Kind, never, never>>; readonly key: Schema.optionalKey<Schema.$Array<Schema.String>>; readonly unique: Schema.optionalKey<Schema.$Array<Schema.Struct<{ readonly fields: Schema.$Array<Schema.String>; readonly where: Schema.optionalKey<S…
  • relationships: Schema.$Record<Schema.String, Schema.Struct<{ readonly to: Schema.Union<readonly [Schema.String, Schema.$Array<Schema.String>]>; readonly inverse: Schema.optionalKey<Schema.String>; readonly optional: Schema.optionalKey<Schema.Literal<true>>; readonly default: Schema.optionalKey<Schema.Struct<{ readonly var: Schema.Literals<readonly ["actor.id", "actor.party"]>; }>>; readonly on_delete: Schema.op…
  • automations: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{ readonly mode: Schema.optionalKey<Schema.Literal<"job">>; readonly on: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{ readonly cron: Schema.String; readonly tz: Schema.optionalKey<Schema.String>; readonly rest: Schema.optionalKey<Schema.TemplateLiteral<readonly [Schema.BigInt, Schema.Literals<readonly ["…
  • needs: Schema.$Array<Schema.Literals<readonly ["sms", "phone", "push", "challenge", "system1", "system2", "embed", "webhooks", "outbound"]>>

    What the bundle needs from its host (Facilities, @norbital-ai/host-api), recorded at build.

  • workspace: Schema.Struct<{ readonly theme: Schema.optionalKey<Schema.Struct<{ readonly palette: Schema.optionalKey<Schema.Literals<readonly ["warm", "neutral", "crisp"]>>; readonly accent: Schema.optionalKey<Schema.String>; readonly radius: Schema.optionalKey<Schema.Literals<readonly ["sharp", "default", "soft"]>>; readonly light: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>; readonly da…
  • mcp: Schema.$Record<Schema.String, Schema.Struct<{ readonly description: Schema.String; readonly url: Schema.String; readonly auth: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{ readonly bearer: Schema.String; }>, Schema.Struct<{ readonly oauth: Schema.Struct<{ readonly client_id: Schema.String; readonly client_secret: Schema.optionalKey<Schema.String>; readonly scopes: Schema.optionalKey<…
  • apps: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{ readonly shell: Schema.optionalKey<Schema.Never>; readonly policies: Schema.optionalKey<Schema.Never>; readonly audience: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["members", "external", "all"]>, Schema.Struct<{ readonly public: Schema.NonEmptyArray<Schema.String>; readonly challenge: Schema.optionalKey…
  • custom_fields: Schema.$Record<Schema.String, Schema.Struct<{ readonly description: Schema.String; readonly shape: Schema.Codec<import("@norbital-ai/ui").Kind, import("@norbital-ai/ui").Kind, never, never>; readonly label: Schema.optionalKey<Schema.String>; readonly search: Schema.optionalKey<Schema.Literal<true>>; readonly check: Schema.optionalKey<Schema.Literal<true>>; }>>
  • groups?: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{ readonly title: Schema.String; readonly description: Schema.optionalKey<Schema.String>; readonly icon: Schema.String; readonly default_child: Schema.String; }>>>
  • messages?: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>

源码: packages/bolt/src/engine/artifact/read.ts:515

artifact_hash function

function artifact_hash(dir: string, body: Omit<{ readonly format: 1; readonly contract: string; readonly host_api: number; readonly handle: string; readonly name: string; readonly schema: string; readonly client: { readonly entry: string; readonly css: readonly string[]; readonly immutable?: readonly string[]; readonly public_routes?: readonly string[]; readonly has_embeds?: boolean; }; readonly pages: { readonly [x: string]: { readonly entry: string; readonly css: readonly string[]; readonly server: { readonly file: string; readonly sha256: string; }; }; }; readonly hashes: { readonly manifest: string; readonly guest: string; readonly client: string; readonly server: string; }; readonly hash: string; }, "hash">): Effect.Effect<string, import("effect/PlatformError").PlatformError, FileSystem.FileSystem | Path.Path>

An artifact's hash: sha256 over its descriptor body and the tree hashes of its assets, skills, workspace source and migrations.

参数

名称类型说明
dirstring
bodyOmit<{ readonly format: 1; readonly contract: string; readonly host_api: number; readonly handle: string; readonly name: string; readonly schema: string; readonly client: { readonly entry: string; readonly css: readonly string[]; readonly immutable?: readonly string[]; readonly public_routes?: readonly string[]; readonly has_embeds?: boolean; }; readonly pages: { readonly [x: string]: { readonly …
  • format: 1
  • pages: { readonly [x: string]: { readonly entry: string; readonly css: readonly string[]; readonly server: { readonly file: string; readonly sha256: string; }; }; }
  • schema: string
  • handle: string
  • name: string
  • client: { readonly entry: string; readonly css: readonly string[]; readonly immutable?: readonly string[]; readonly public_routes?: readonly string[]; readonly has_embeds?: boolean; }
  • contract: string
  • host_api: number
  • hashes: { readonly manifest: string; readonly guest: string; readonly client: string; readonly server: string; }

源码: packages/bolt/src/engine/artifact/read.ts:116

asset_path function

function asset_path(v: unknown): string | undefined

A seed row's file value names a pack asset as { asset: '<path under assets/>' } (or an array of them).

参数

名称类型说明
vunknown

源码: packages/bolt/src/engine/artifact/read.ts:357

page_route_key function

function page_route_key(m: EngineManifest, name: string): string

The artifact key for a page in an app, including apps with the kiosk shell.

参数

名称类型说明
mEngineManifest
  • exposures: Schema.$Record<Schema.String, Schema.Struct<{ readonly outputs: Schema.StructWithRest<Schema.Struct<{ readonly default: Schema.$Record<Schema.String, Schema.Struct<{ readonly fields: Schema.Union<readonly [Schema.Literal<"all">, Schema.$Array<Schema.String>]>; }>>; }>, readonly [Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Struct<{ readonly fields: Schema.Union<readonly [Sch…
  • policies: Schema.$Record<Schema.String, Schema.Struct<{ readonly description: Schema.String; readonly grants: Schema.$Record<Schema.String, Schema.Struct<{ readonly outputs: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{ readonly scopes: Schema.optionalKey<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>>; readonly history:…
  • agent: Schema.Struct<{ readonly internal: Schema.optionalKey<Schema.String>; readonly external: Schema.optionalKey<Schema.String>; readonly skills: Schema.$Record<Schema.String, Schema.Struct<{ readonly text: Schema.String; readonly digest: Schema.String; readonly files: Schema.$Array<Schema.String>; }>>; }>
  • integrations: Schema.$Record<Schema.String, Schema.Struct<{ readonly test: Schema.optionalKey<Schema.Literal<true>>; readonly description: Schema.String; readonly driver: Schema.Union<readonly [Schema.Literals<("email" | "http" | "calendar" | "chat" | "sqlserver")[]>, Schema.Struct<{ readonly read: Schema.Literals<readonly ["cursor", "deliveries", "items"]>; readonly request: Schema.optionalKey<Schema.Literals…
  • models: Schema.$Record<Schema.String, Schema.Struct<{ readonly fields: Schema.$Record<Schema.String, Schema.Codec<import("@norbital-ai/ui").Kind, import("@norbital-ai/ui").Kind, never, never>>; readonly key: Schema.optionalKey<Schema.$Array<Schema.String>>; readonly unique: Schema.optionalKey<Schema.$Array<Schema.Struct<{ readonly fields: Schema.$Array<Schema.String>; readonly where: Schema.optionalKey<S…
  • relationships: Schema.$Record<Schema.String, Schema.Struct<{ readonly to: Schema.Union<readonly [Schema.String, Schema.$Array<Schema.String>]>; readonly inverse: Schema.optionalKey<Schema.String>; readonly optional: Schema.optionalKey<Schema.Literal<true>>; readonly default: Schema.optionalKey<Schema.Struct<{ readonly var: Schema.Literals<readonly ["actor.id", "actor.party"]>; }>>; readonly on_delete: Schema.op…
  • automations: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{ readonly mode: Schema.optionalKey<Schema.Literal<"job">>; readonly on: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{ readonly cron: Schema.String; readonly tz: Schema.optionalKey<Schema.String>; readonly rest: Schema.optionalKey<Schema.TemplateLiteral<readonly [Schema.BigInt, Schema.Literals<readonly ["…
  • needs: Schema.$Array<Schema.Literals<readonly ["sms", "phone", "push", "challenge", "system1", "system2", "embed", "webhooks", "outbound"]>>

    What the bundle needs from its host (Facilities, @norbital-ai/host-api), recorded at build.

  • workspace: Schema.Struct<{ readonly theme: Schema.optionalKey<Schema.Struct<{ readonly palette: Schema.optionalKey<Schema.Literals<readonly ["warm", "neutral", "crisp"]>>; readonly accent: Schema.optionalKey<Schema.String>; readonly radius: Schema.optionalKey<Schema.Literals<readonly ["sharp", "default", "soft"]>>; readonly light: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>; readonly da…
  • mcp: Schema.$Record<Schema.String, Schema.Struct<{ readonly description: Schema.String; readonly url: Schema.String; readonly auth: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{ readonly bearer: Schema.String; }>, Schema.Struct<{ readonly oauth: Schema.Struct<{ readonly client_id: Schema.String; readonly client_secret: Schema.optionalKey<Schema.String>; readonly scopes: Schema.optionalKey<…
  • apps: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{ readonly shell: Schema.optionalKey<Schema.Never>; readonly policies: Schema.optionalKey<Schema.Never>; readonly audience: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["members", "external", "all"]>, Schema.Struct<{ readonly public: Schema.NonEmptyArray<Schema.String>; readonly challenge: Schema.optionalKey…
  • custom_fields: Schema.$Record<Schema.String, Schema.Struct<{ readonly description: Schema.String; readonly shape: Schema.Codec<import("@norbital-ai/ui").Kind, import("@norbital-ai/ui").Kind, never, never>; readonly label: Schema.optionalKey<Schema.String>; readonly search: Schema.optionalKey<Schema.Literal<true>>; readonly check: Schema.optionalKey<Schema.Literal<true>>; }>>
  • groups?: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{ readonly title: Schema.String; readonly description: Schema.optionalKey<Schema.String>; readonly icon: Schema.String; readonly default_child: Schema.String; }>>>
  • messages?: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>
namestring

源码: packages/bolt/src/engine/artifact/read.ts:83

public_page_keys function

function public_page_keys(m: EngineManifest): readonly string[]

Portal chrome does not decide SSR. Only apps for audiences other than members have public bundles.

参数

名称类型说明
mEngineManifest
  • exposures: Schema.$Record<Schema.String, Schema.Struct<{ readonly outputs: Schema.StructWithRest<Schema.Struct<{ readonly default: Schema.$Record<Schema.String, Schema.Struct<{ readonly fields: Schema.Union<readonly [Schema.Literal<"all">, Schema.$Array<Schema.String>]>; }>>; }>, readonly [Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Struct<{ readonly fields: Schema.Union<readonly [Sch…
  • policies: Schema.$Record<Schema.String, Schema.Struct<{ readonly description: Schema.String; readonly grants: Schema.$Record<Schema.String, Schema.Struct<{ readonly outputs: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{ readonly scopes: Schema.optionalKey<Schema.$Record<Schema.String, Schema.$Record<Schema.String, Schema.Codec<Schema.Json, Schema.Json, never, never>>>>; readonly history:…
  • agent: Schema.Struct<{ readonly internal: Schema.optionalKey<Schema.String>; readonly external: Schema.optionalKey<Schema.String>; readonly skills: Schema.$Record<Schema.String, Schema.Struct<{ readonly text: Schema.String; readonly digest: Schema.String; readonly files: Schema.$Array<Schema.String>; }>>; }>
  • integrations: Schema.$Record<Schema.String, Schema.Struct<{ readonly test: Schema.optionalKey<Schema.Literal<true>>; readonly description: Schema.String; readonly driver: Schema.Union<readonly [Schema.Literals<("email" | "http" | "calendar" | "chat" | "sqlserver")[]>, Schema.Struct<{ readonly read: Schema.Literals<readonly ["cursor", "deliveries", "items"]>; readonly request: Schema.optionalKey<Schema.Literals…
  • models: Schema.$Record<Schema.String, Schema.Struct<{ readonly fields: Schema.$Record<Schema.String, Schema.Codec<import("@norbital-ai/ui").Kind, import("@norbital-ai/ui").Kind, never, never>>; readonly key: Schema.optionalKey<Schema.$Array<Schema.String>>; readonly unique: Schema.optionalKey<Schema.$Array<Schema.Struct<{ readonly fields: Schema.$Array<Schema.String>; readonly where: Schema.optionalKey<S…
  • relationships: Schema.$Record<Schema.String, Schema.Struct<{ readonly to: Schema.Union<readonly [Schema.String, Schema.$Array<Schema.String>]>; readonly inverse: Schema.optionalKey<Schema.String>; readonly optional: Schema.optionalKey<Schema.Literal<true>>; readonly default: Schema.optionalKey<Schema.Struct<{ readonly var: Schema.Literals<readonly ["actor.id", "actor.party"]>; }>>; readonly on_delete: Schema.op…
  • automations: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{ readonly mode: Schema.optionalKey<Schema.Literal<"job">>; readonly on: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{ readonly cron: Schema.String; readonly tz: Schema.optionalKey<Schema.String>; readonly rest: Schema.optionalKey<Schema.TemplateLiteral<readonly [Schema.BigInt, Schema.Literals<readonly ["…
  • needs: Schema.$Array<Schema.Literals<readonly ["sms", "phone", "push", "challenge", "system1", "system2", "embed", "webhooks", "outbound"]>>

    What the bundle needs from its host (Facilities, @norbital-ai/host-api), recorded at build.

  • workspace: Schema.Struct<{ readonly theme: Schema.optionalKey<Schema.Struct<{ readonly palette: Schema.optionalKey<Schema.Literals<readonly ["warm", "neutral", "crisp"]>>; readonly accent: Schema.optionalKey<Schema.String>; readonly radius: Schema.optionalKey<Schema.Literals<readonly ["sharp", "default", "soft"]>>; readonly light: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>; readonly da…
  • mcp: Schema.$Record<Schema.String, Schema.Struct<{ readonly description: Schema.String; readonly url: Schema.String; readonly auth: Schema.optionalKey<Schema.Union<readonly [Schema.Struct<{ readonly bearer: Schema.String; }>, Schema.Struct<{ readonly oauth: Schema.Struct<{ readonly client_id: Schema.String; readonly client_secret: Schema.optionalKey<Schema.String>; readonly scopes: Schema.optionalKey<…
  • apps: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Struct<{ readonly shell: Schema.optionalKey<Schema.Never>; readonly policies: Schema.optionalKey<Schema.Never>; readonly audience: Schema.optionalKey<Schema.Union<readonly [Schema.Literals<readonly ["members", "external", "all"]>, Schema.Struct<{ readonly public: Schema.NonEmptyArray<Schema.String>; readonly challenge: Schema.optionalKey…
  • custom_fields: Schema.$Record<Schema.String, Schema.Struct<{ readonly description: Schema.String; readonly shape: Schema.Codec<import("@norbital-ai/ui").Kind, import("@norbital-ai/ui").Kind, never, never>; readonly label: Schema.optionalKey<Schema.String>; readonly search: Schema.optionalKey<Schema.Literal<true>>; readonly check: Schema.optionalKey<Schema.Literal<true>>; }>>
  • groups?: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Struct<{ readonly title: Schema.String; readonly description: Schema.optionalKey<Schema.String>; readonly icon: Schema.String; readonly default_child: Schema.String; }>>>
  • messages?: Schema.optionalKey<Schema.$Record<Schema.String, Schema.String>>

源码: packages/bolt/src/engine/artifact/read.ts:87

read_artifact function

function read_artifact(dir: string, digests?: "all" | "executed" | undefined): Effect.Effect<{ dir: string; artifact: { readonly format: 1; readonly contract: string; readonly host_api: number; readonly handle: string; readonly name: string; readonly schema: string; readonly client: { readonly entry: string; readonly css: readonly string[]; readonly immutable?: readonly string[]; readonly public_routes?: readonly string[]; readonly has_embeds?: boolean; }; readonly pages: { readonly [x: string]: { readonly entry: string; readonly css: readonly string[]; readonly server: { readonly file: string; readonly sha256: string; }; }; }; readonly hashes: { readonly manifest: string; readonly guest: string; readonly client: string; readonly server: string; }; readonly hash: string; }; manifest: { readonly agent: { readonly skills: { readonly [x: string]: { readonly text: string; readonly digest: string; readonly files: readonly string[]; }; }; readonly internal?: string; readonly external?: string; }; readonly workspace: { readonly tz: string; readonly locale: string; readonly agent?: { readonly triage?: false; }; readonly apps?: readonly string[]; readonly currency?: string; readonly secrets?: { readonly [x: string]: { readonly label: string; readonly description?: string; }; }; readonly signup?: { readonly via: readonly ("email" | "phone")[]; readonly policies: readonly string[]; readonly party?: { readonly model: string; readonly match: { readonly email?: string; readonly phone?: string; }; }; readonly challenge?: true; }; readonly theme?: { readonly accent?: string; readonly radius?: "default" | "sharp" | "soft"; readonly palette?: "warm" | "neutral" | "crisp"; readonly light?: { readonly [x: string]: string; }; readonly dark?: { readonly [x: string]: string; }; }; readonly languages?: readonly string[]; readonly landing?: { readonly app: string; readonly single_app?: true; }; readonly navigation_visibility?: { readonly field: string; readonly model: string; readonly output: string; readonly apps?: { readonly [x: string]: readonly string[]; }; readonly pages?: { readonly [x: string]: readonly string[]; }; }; readonly ai?: { readonly embeddings?: readonly string[]; }; readonly convert?: { readonly to: readonly ("html" | "pdf" | "docx" | "pptx" | "odt" | "epub")[]; }; readonly csp?: { readonly connect?: readonly string[]; }; readonly memberships?: { readonly model: string; readonly bundles?: { readonly assignments: string; readonly levels: string; }; }; readonly limits?: { readonly [x: string]: { readonly [x: string]: string | { readonly rate: string; readonly per: "sender" | "actor" | "ip" | "subject"; } | readonly (string | { readonly rate: string; readonly per: "sender" | "actor" | "ip" | "subject"; })[]; }; }; }; readonly models: { readonly [x: string]: { readonly fields: { readonly [x: string]: import("@norbital-ai/ui").Kind; }; readonly description: string; readonly check?: { readonly [x: string]: { readonly [x: string]: Schema.Json; }; }; readonly unique?: readonly { readonly fields: readonly string[]; readonly name?: string; readonly where?: { readonly [x: string]: Schema.Json; }; readonly import_key?: true; }[]; readonly key?: readonly string[]; readonly messages?: { readonly [x: string]: string; }; readonly icon?: string; readonly search?: { readonly text: readonly string[]; readonly indexes?: { readonly [x: string]: { readonly input: { readonly [x: string]: import("@norbital-ai/ui").Kind; }; readonly description: string; readonly dim: number; readonly metric: "l2" | "cosine" | "ip"; readonly field?: string; readonly candidates?: 7 | 1 | 2 | 4 | 3 | 5 | 6 | 8 | 9 | 12 | 10 | 11 | 13 | 14 | 15 | 16; readonly rerank?: true; }; }; readonly semantic?: { readonly fields: readonly string[]; readonly model: string; readonly dim: number; }; }; readonly was?: string; readonly indexes?: readonly { readonly on: readonly (string | { readonly lower: string; })[]; readonly unique?: true; readonly where?: { readonly [x: string]: Schema.Json; }; }[]; readonly locks?: { readonly [x: string]: { readonly where: { readonly [x: string]: Schema.Json; }; readonly except?: readonly string[]; }; }; readonly no_overlap?: readonly { readonly key: readonly string[]; readonly period: string; readonly name?: string; readonly where?: { readonly [x: string]: Schema.Json; }; }[]; readonly computed?: { readonly [x: string]: { readonly kind: "text" | "bool" | "int" | "decimal" | "money" | "date" | "instant"; readonly expr: import("@norbital-ai/store").Expr; readonly scale?: number; }; }; readonly table?: { readonly primary: "text" | "uuid" | "identity" | { readonly field: string; }; readonly identity?: string; }; readonly record_label?: string; }; }; readonly apps: { readonly [x: string]: { readonly title: string; readonly description: string; readonly icon: string; readonly pages: { readonly [x: string]: { readonly title: string; readonly icon?: string; readonly section?: string; readonly portal?: true; }; }; readonly policies?: never; readonly shell?: never; readonly audience?: "external" | "all" | "members" | { readonly public: readonly [string, ...string[]]; readonly challenge?: true; }; readonly banner?: string; readonly embed?: readonly `https://${string}`[]; readonly requires?: readonly ("location" | "location:background" | "notifications" | "camera")[]; } | { readonly title: string; readonly description: string; readonly icon: string; readonly policies: readonly [string, ...string[]]; readonly pages: { readonly [x: string]: { readonly title: string; readonly icon?: string; readonly section?: string; readonly portal?: true; }; }; readonly shell: "kiosk"; readonly audience?: "external" | "all" | "members"; readonly banner?: string; readonly embed?: readonly `https://${string}`[]; readonly requires?: readonly ("location" | "location:background" | "notifications" | "camera")[]; } | { readonly title: string; readonly description: string; readonly icon: string; readonly pages: { readonly [x: string]: { readonly title: string; readonly icon?: string; readonly section?: string; readonly portal?: true; }; }; readonly shell: "kiosk"; readonly audience: { readonly public: readonly [string, ...string[]]; readonly challenge?: true; }; readonly policies?: never; readonly banner?: string; readonly embed?: readonly `https://${string}`[]; readonly requires?: readonly ("location" | "location:background" | "notifications" | "camera")[]; }; }; readonly automations: { readonly [x: string]: { readonly description: string; readonly policies: readonly [string, ...string[]]; readonly agent?: "confirm" | "never"; readonly input?: { readonly [x: string]: import("@norbital-ai/ui").Kind | { readonly kind: "rows"; readonly of: string; readonly optional?: true; }; }; readonly output?: import("@norbital-ai/store/kind").OutputKind; readonly mode?: "job"; readonly on?: readonly ({ readonly cron: string; readonly tz?: string; readonly rest?: `${bigint}min` | `${bigint}s` | `${bigint}h` | `${bigint}d`; } | { readonly model: string; readonly verbs: readonly ["create" | "update" | "delete", ...("create" | "update" | "delete")[]]; })[]; readonly retry?: { readonly attempts: 7 | 2 | 4 | 3 | 5 | 6 | 8; readonly backoff?: `${bigint}min` | `${bigint}s` | `${bigint}h` | `${bigint}d`; }; readonly concurrency?: { readonly max: 7 | 1 | 2 | 4 | 3 | 5 | 26 | 6 | 8 | 9 | 12 | 10 | 11 | 13 | 14 | 15 | 16 | 21 | 22 | 17 | 18 | 19 | 20 | 35 | 25 | 23 | 24 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64; }; } | { readonly mode: "call"; readonly description: string; readonly policies: readonly [string, ...string[]]; readonly agent?: "confirm" | "never"; readonly input?: { readonly [x: string]: import("@norbital-ai/ui").Kind | { readonly kind: "rows"; readonly of: string; readonly optional?: true; }; }; readonly output?: import("@norbital-ai/store/kind").OutputKind; readonly on?: never; readonly retry?: never; readonly concurrency?: never; }; }; readonly policies: { readonly [x: string]: { readonly description: string; readonly grants: { readonly [x: string]: { readonly create?: { readonly verdict?: true; readonly columns?: { readonly [x: string]: readonly string[]; }; }; readonly update?: { readonly moves?: "all" | { readonly [x: string]: readonly string[]; }; readonly verdict?: true; readonly columns?: { readonly [x: string]: readonly string[]; }; }; readonly delete?: { readonly verdict?: true; }; readonly outputs?: { readonly [x: string]: { readonly history?: true; readonly scopes?: { readonly [x: string]: { readonly [x: string]: Schema.Json; }; }; }; }; }; }; readonly capabilities?: { readonly apps?: readonly string[]; readonly automations?: readonly string[]; readonly mcp?: readonly string[]; readonly syncs?: readonly string[]; readonly tools?: readonly string[]; }; }; }; readonly mcp: { readonly [x: string]: { readonly url: string; readonly description: string; readonly auth?: { readonly bearer: string; } | { readonly oauth: { readonly client_id: string; readonly scopes?: readonly string[]; readonly client_secret?: string; }; }; readonly tools?: readonly string[]; }; }; readonly exposures: { readonly [x: string]: { readonly outputs: { readonly [x: string]: { readonly [x: string]: { readonly fields: "all" | readonly string[]; }; }; readonly default: { readonly [x: string]: { readonly fields: "all" | readonly string[]; }; }; }; readonly create?: { readonly columns: { readonly [x: string]: readonly string[]; }; readonly effect?: true; readonly filled?: { readonly [x: string]: readonly string[]; }; readonly transform?: true; }; readonly update?: { readonly columns: { readonly [x: string]: readonly string[]; }; readonly effect?: true; readonly transform?: true; }; readonly delete?: { readonly effect?: true; readonly transform?: true; }; readonly syncs?: { readonly [x: string]: { readonly with: string; readonly schema?: { readonly [x: string]: import("@norbital-ai/ui").Kind; }; readonly read?: true; readonly context?: { readonly [x: string]: import("@norbital-ai/ui").Kind; }; readonly parser?: readonly (string | { readonly type: string; readonly extensions: readonly string[]; })[]; readonly every?: string; readonly partitions?: string; readonly policies?: readonly string[]; readonly write?: true; }; }; }; }; readonly custom_fields: { readonly [x: string]: { readonly description: string; readonly shape: import("@norbital-ai/ui").Kind; readonly check?: true; readonly label?: string; readonly search?: true; }; }; readonly integrations: { readonly [x: string]: { readonly description: string; readonly driver: "email" | "http" | "calendar" | "chat" | "sqlserver" | { readonly name: string; readonly read: "cursor" | "deliveries" | "items"; readonly conversation?: { readonly kind: "email" | "chat"; readonly handle: "email" | "phone" | "telegram" | "slack" | "discord" | null; readonly address?: string; }; readonly call?: "http"; readonly personal?: true; readonly oauth?: true; readonly items?: "calendar"; readonly request?: "http" | "database"; readonly credential?: true; }; readonly webhook?: { readonly verify: { readonly scheme: string; readonly secret: string; }; readonly policies?: readonly [string, ...string[]]; readonly handle?: true; }; readonly oauth?: { readonly secret: string; readonly client: string; readonly authorize?: string; readonly token?: string; readonly scopes?: readonly string[]; }; readonly http?: { readonly base_url: string; readonly auth?: { readonly bearer: string; } | { readonly header: { readonly name: string; readonly value: string; }; } | { readonly basic: { readonly user: string; readonly password: string; }; }; readonly allow?: { readonly methods: readonly ["GET" | "HEAD" | "POST" | "PUT" | "PATCH" | "DELETE", ...("GET" | "HEAD" | "POST" | "PUT" | "PATCH" | "DELETE")[]]; readonly paths: readonly [string, ...string[]]; }; readonly lend?: true; }; readonly credential?: { readonly [x: string]: import("@norbital-ai/ui").Kind; }; readonly configuration?: { readonly [x: string]: import("@norbital-ai/ui").Kind; }; readonly rate?: string; readonly test?: true; }; }; readonly needs: readonly ("phone" | "sms" | "challenge" | "embed" | "push" | "system1" | "system2" | "webhooks" | "outbound")[]; readonly relationships: { readonly [x: string]: { readonly to: string | readonly string[]; readonly optional?: true; readonly where?: { readonly [x: string]: Schema.Json; }; readonly default?: { readonly var: "actor.id" | "actor.party"; }; readonly inverse?: string; readonly on_delete?: "restrict" | "cascade" | "set_null"; readonly owned?: true; }; }; readonly messages?: { readonly [x: string]: string; }; readonly groups?: { readonly [x: string]: { readonly title: string; readonly icon: string; readonly default_child: string; readonly description?: string; }; }; }; migrations: { files: import("@norbital-ai/store").MigrationFile[]; squashes: import("@norbital-ai/store").MigrationFile[]; snapshotText: string; snapshot: { readonly tables: { readonly [x: string]: { readonly fields: { readonly [x: string]: import("@norbital-ai/ui").Kind; }; readonly check?: { readonly [x: string]: object | { readonly where: object; readonly message: string; }; }; readonly unique?: readonly { readonly fields: readonly string[]; readonly name?: string; readonly where?: object; readonly import_key?: true; }[]; readonly key?: "text" | "uuid" | "identity" | readonly [string, ...string[]]; readonly index?: readonly (string | readonly string[])[]; readonly search?: { readonly text: readonly string[]; readonly indexes?: { readonly [x: string]: { readonly dim: number; readonly metric: "l2" | "cosine" | "ip"; readonly field?: string; readonly input?: { readonly [x: string]: import("@norbital-ai/ui").Kind; }; readonly description?: string; readonly candidates?: number; readonly rerank?: true; }; }; readonly semantic?: { readonly fields: readonly string[]; readonly model: string; readonly dim: number; }; }; readonly was?: string; readonly indexes?: readonly { readonly on: readonly (string | { readonly lower: string; } | { readonly expr: import("@norbital-ai/store").Expr; })[]; readonly unique?: true; readonly where?: object; }[]; readonly locks?: { readonly [x: string]: { readonly where: object; readonly except?: readonly string[]; }; }; readonly no_overlap?: readonly { readonly key: readonly string[]; readonly period: string; readonly name?: string; readonly where?: object; }[]; readonly computed?: { readonly [x: string]: { readonly kind: "text" | "bool" | "int" | "decimal" | "money" | "date" | "instant"; readonly expr: import("@norbital-ai/store").Expr; readonly scale?: number; }; }; readonly identity?: string; readonly record_label?: string; readonly paths?: readonly ({ readonly field: string; readonly path: readonly string[]; } | { readonly field: string; readonly gin: true; })[]; readonly audit?: true; readonly natural?: readonly string[]; readonly through?: { readonly [x: string]: { readonly table: string; readonly from: string; readonly to: string; }; }; }; }; readonly tz: string; readonly currency: string | null; }; lock: { readonly files: { readonly [x: string]: string; }; readonly snapshot: string; readonly squashes?: readonly { readonly file: string; readonly checksum: string; readonly archive: string; readonly replaces: readonly { readonly name: string; readonly checksum: string; }[]; readonly proof: string; }[]; readonly physical?: { readonly [x: string]: string; }; }; physical: Readonly<Record<string, readonly string[]>>; }; guest: GuestProgram; client: string; pages: Record<string, { program: GuestProgram; entry: string; css: readonly string[]; }>; }, BoltError | ManifestInvalid | import("effect/PlatformError").PlatformError, FileSystem.FileSystem | Path.Path>

Activation's reading of an artifact: refuses a contract this engine does not implement, an artifact.json or manifest.json that does not decode (ManifestInvalid), a manifest whose schema is not the one recorded, and any file whose digest is not the recorded one — the manifest, the guest, the client tree, and through hash the assets, skills and workspace source.

参数

名称类型说明
dirstring
digests?"all" | "executed" | undefined

源码: packages/bolt/src/engine/artifact/read.ts:149

tree function

function tree(dir: string): Effect.Effect<string[], import("effect/PlatformError").PlatformError, FileSystem.FileSystem | Path.Path>

Sorted /-separated relative paths of every file under dir; empty when dir does not exist.

参数

名称类型说明
dirstring

源码: packages/bolt/src/engine/artifact/read.ts:105