// ─── Method authoring ──────────────────────────────────────────────────── export type { MethodParams, MethodResult, AuthForPolicy, DomainKernel, GraphApi, Kernel, KernelForAuth, RemoteAuthorizeContext, RemoteContext, RemoteHandler, MethodImpl, ClassMethodsImpl, InterfaceMethodsImpl, SchemaMethodsImpl, } from './method/index.js' export { remoteMethod, remoteClassMethods, remoteInterfaceMethods } from './method/index.js' // ─── Domain configuration (astrale.config.ts) ──────────────────────────── // The author-facing way to declare a standalone domain + how it deploys. The // runtime-domain COMPILER (`defineRemoteDomain`) is internal machinery — reach // it via the `@astrale-os/sdk/domain` subpath when hand-rolling a worker, or // (preferred) use `domainWorkerEntry` from `@astrale-os/sdk/server`. export { defineDomain, deploy, defineAdapter } from './config/index.js' export type { DefineDomainConfig, DomainDefinition, DomainManifest, DeployConfig, AdapterSpec, DeployCtx, DeployResult, DomainAdapter, DomainInfo, WatchCtx, WatchHandle, } from './config/index.js' // ─── Install graph (advanced) ──────────────────────────────────────────── export { buildInstallGraph, buildInstallGraphHash } from './domain/index.js' // ─── Graph patching (advanced) ──────────────────────────────────────── // Author-facing patch types, re-exported from kernel-core (the single source). // Build a `Patch` and feed it straight to `ctx.kernel.mutate(patch)` (it implements // `PatchData`); the graph sugar itself lives in `@astrale-os/kernel-client/graph`, // flattened onto `ctx.kernel`, and `function.mutate` validates every patch kernel-side // against kernel-core's `patchDataSchema` — no client-side re-validation needed. export { AbsolutePath, Patch, Path } from '@astrale-os/kernel-core' export { ClassPath } from '@astrale-os/kernel-core/domain' export type { EdgeCreate, EdgeDelete, EdgeMatcher, EdgeUpdate, NodeCreate, NodeDelete, NodeUpdate, PatchData, } from '@astrale-os/kernel-core' // ─── Declarative resource helpers ──────────────────────────────────────── // Author Views (iframe-mountable) and RemoteFunctions (standalone callables) // at the domain definition site. Each `defineView` / `defineRemoteFunction` // entry is auto-materialized by `defineRemoteDomain` into a graph node (a // `View`, or the canonical kernel `Function` for standalone callables) under // the reserved views / functions folder, keyed by its map slug; the same // entry's `render` / `execute` (+ auth hooks) is mounted as a worker route by // `createRemoteServer`. export { defineView, defineRemoteFunction } from './define/index.js' export type { ViewDef, ViewRenderContext, RemoteFunctionAuthorizeContext, RemoteFunctionDef, RemoteFunctionContext, } from './define/index.js' // ─── Durable-shaped steps ──────────────────────────────────────────────── export type { Step } from './step/index.js' // ─── Invocation capabilities ───────────────────────────────────────────── export type { Defer, DeferredTask, Sleep } from '@astrale-os/kernel-server' // ─── Server ────────────────────────────────────────────────────────────── // `createRemoteServer` dynamically imports `@hono/node-server` via `./server/start`. // Exporting the server surface from the barrel poisons browser bundlers // (Vite/esbuild) that traverse every re-export and try to bundle the dynamic // chunk — which fails on Node built-ins. Consumers that need the server // runtime import from '@astrale-os/sdk/server' directly. // ─── Deploy ────────────────────────────────────────────────────────────── // `deployCheck` uses Node-only modules (`node:path`, `node:child_process`) at // module load time. Exporting it from the barrel poisons browser bundlers // (Vite/esbuild) that transitively load every re-export. Consumers that need it // import from './deploy' directly. export { MetaSchema } from './deploy/meta.js' export type { Meta } from './deploy/meta.js' // ─── Service-hosted Functions ─────────────────────────────────────────── export { SERVICE_FUNCTIONS_PATH, ServiceFunctionDiscoveryRequestSchema, ServiceFunctionDiscoveryResponseSchema, ServiceFunctionManifestEntrySchema, ServiceFunctionManifestSchema, hashServiceFunctionManifest, signServiceFunctionManifest, verifyServiceFunctionManifest, } from './service/index.js' export type { ServiceFunctionDiscoveryRequest, ServiceFunctionDiscoveryResponse, ServiceFunctionManifest, ServiceFunctionManifestEntry, } from './service/index.js' // ─── Route binding (re-exported from kernel-api for consumer convenience) ─ export type { AuthPolicy, RouteBinding, FunctionBinding, CredentialSource, SingleCredentialSource, HttpMethod, RouteBody, OutputMode, } from '@astrale-os/kernel-api/routed' // ─── Auth ──────────────────────────────────────────────────────────────── export type { RemoteIdentityConfig, AuthenticateResult } from './auth/index.js' export type { DomainAuthority, FunctionContextApi, FunctionCredentialOptions, FunctionKernelOptions, MintIssuedParams, } from './auth/index.js' export { authenticateRequest, buildComposedGrant, makeFunctionContext, signCredential, } from './auth/index.js' export { AuthMissingError, AuthInvalidError } from './auth/index.js' export { assertPerm, requireOwnership, READ, EDIT, USE, SHARE, ALL } from './auth/index.js' export type { AuthContext, Attestation, Authenticated, Delegation, IdentityId, IssuerId, } from '@astrale-os/kernel-core' export { selfGrant } from '@astrale-os/kernel-core' // ─── Dispatch (escape hatch for custom integrations) ───────────────────── export { SdkDispatcher, type SdkDispatcherConfig } from './dispatch/index.js' export { AuthorizationDeniedError, MethodNotFoundError, SdkValidationError, SdkResultValidationError, } from './dispatch/index.js' export type { SelfResult, TypedSelf } from './dispatch/index.js'