@brickkit/core 0.14.0 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2210,6 +2210,37 @@ interface WireError {
2210
2210
  }
2211
2211
  /** Event names starting with `$` are reserved for control messages. */
2212
2212
  declare const isControlEvent: (event: string) => boolean;
2213
+ /** The person `dashboard.auth.authorize` let in. */
2214
+ interface DashboardUser {
2215
+ id: string;
2216
+ name?: string;
2217
+ }
2218
+ /**
2219
+ * Who a request came from, when it reached the app through the dashboard's
2220
+ * `/app/*` proxy. `user` is missing when the dashboard let the request in
2221
+ * without one: by token, by `authorize` returning `true`, or with no `auth`.
2222
+ */
2223
+ interface DashboardIdentity {
2224
+ user?: DashboardUser;
2225
+ }
2226
+ /** The header the dashboard's `/app/*` proxy signs the identity into. */
2227
+ declare const DASHBOARD_IDENTITY_HEADER = "x-brick-dashboard";
2228
+ /** How `brick dev` hands the signing key to the app's process. */
2229
+ declare const DASHBOARD_KEY_ENV = "BRICK_DASHBOARD_KEY";
2230
+ /**
2231
+ * The key the dashboard signs identities with: random per process, or the one
2232
+ * `brick dev` or the Vite plugin handed the app.
2233
+ */
2234
+ declare function dashboardKey(): string;
2235
+ /** The header value for an identity: `<base64url(json)>.<hmac>`. */
2236
+ declare function signDashboardIdentity(identity: DashboardIdentity, now?: number): string;
2237
+ /**
2238
+ * The dashboard user a request came from, for an endpoint: the person
2239
+ * `dashboard.auth.authorize` let in, when the request arrived through the
2240
+ * dashboard's `/app/*` proxy. Undefined for any other request, and for one the
2241
+ * dashboard let in by token. Actions read it as `ctx.dashboard?.user`.
2242
+ */
2243
+ declare function dashboardUser(request: Request): DashboardUser | undefined;
2213
2244
  /** How many outbox rows are in each state. */
2214
2245
  type OutboxCounts = Record<OutboxStatus, number>;
2215
2246
  /**
@@ -2669,6 +2700,11 @@ interface BaseContext<TDb = any> {
2669
2700
  tenantId?: string;
2670
2701
  services?: Record<string, any>;
2671
2702
  metadata?: Record<string, unknown>;
2703
+ /**
2704
+ * Set when the request came through the dashboard's `/app/*` proxy, signed
2705
+ * by the dashboard: `user` is who `dashboard.auth.authorize` let in.
2706
+ */
2707
+ dashboard?: DashboardIdentity;
2672
2708
  }
2673
2709
  /**
2674
2710
  * Default fallback service context for untyped or simple services.
@@ -2772,6 +2808,12 @@ interface BaseActionConfig<TInputSchema extends TSchema | undefined = undefined,
2772
2808
  tags?: string[];
2773
2809
  }
2774
2810
  interface ActionConfigWithAuthorize<TInputSchema extends TSchema | undefined = undefined, TOutputSchema extends TSchema | undefined = undefined, TErrors extends Record<string, ActionErrorDefinition> = Record<string, ActionErrorDefinition>, TContext extends ActionContext = ActionContext> extends BaseActionConfig<TInputSchema, TOutputSchema, TErrors> {
2811
+ /**
2812
+ * `true` refuses (401) any HTTP call that did not come through the
2813
+ * dashboard's `/app/*` proxy, so only the dashboard's pages can reach it.
2814
+ * `ctx.dashboard` is then set.
2815
+ */
2816
+ dashboard?: boolean;
2775
2817
  authorize: (params: {
2776
2818
  user?: TContext extends {
2777
2819
  user: infer U;
@@ -2786,6 +2828,12 @@ interface ActionConfigWithAuthorize<TInputSchema extends TSchema | undefined = u
2786
2828
  }) => Promise<TOutputSchema extends TSchema ? Static<TOutputSchema> : any> | (TOutputSchema extends TSchema ? Static<TOutputSchema> : any);
2787
2829
  }
2788
2830
  interface ActionConfigWithoutAuthorize<TInputSchema extends TSchema | undefined = undefined, TOutputSchema extends TSchema | undefined = undefined, TErrors extends Record<string, ActionErrorDefinition> = Record<string, ActionErrorDefinition>, TContext extends ActionContext = ActionContext> extends BaseActionConfig<TInputSchema, TOutputSchema, TErrors> {
2831
+ /**
2832
+ * `true` refuses (401) any HTTP call that did not come through the
2833
+ * dashboard's `/app/*` proxy, so only the dashboard's pages can reach it.
2834
+ * `ctx.dashboard` is then set.
2835
+ */
2836
+ dashboard?: boolean;
2789
2837
  authorize?: undefined;
2790
2838
  execute: (params: {
2791
2839
  input: TInputSchema extends TSchema ? Static<TInputSchema> : any;
@@ -3147,5 +3195,5 @@ interface ProxyOptions {
3147
3195
  from?: string;
3148
3196
  context?: Partial<ActionContext>;
3149
3197
  }
3150
- export { BrickSocketError as $, EventsOptions as $n, PluginRouteRegistrar as $t, Resource as A, PluginSetupContext as An, defineDatabase as At, ServiceSchema as B, resolveSecrets as Bn, foreignKey as Bt, ErrorDetails as C, PluginFactory as Cn, useDeps as Cr, WireError as Ct, NarrowAuthorizedContext as D, PluginLifecycleContext as Dn, EnvInput as Dt, Logger as E, PluginInstance as En, DatabaseHandle as Et, ResourceConfig as F, defineSecret as Fn, BrickSQLiteDatabase as Ft, ToolConfigWithoutAuthorize as G, getHostHooks as Gn, sqliteTable$1 as Gt, Tool as H, HostHooks as Hn, integer$1 as Ht, ResourceIdentity as I, envSource as In, BunSQLiteDatabase$1 as It, ValidationErrorItem as J, EventDelivery as Jn, ContextOf as Jt, ToolOptions as K, CrudEventPayload as Kn, text$1 as Kt, ResourceTypeOptions as L, listSecrets as Ln, SQLiteDatabaseConfig as Lt, ResourceActionConfig as M, SecretOptions as Mn, PostgresDatabase as Mt, ResourceActionInput as N, SecretRef as Nn, PostgresDatabaseConfig as Nt, PreparationContribution as O, PluginManifest as On, PostgresDefinition as Ot, ResourceChild as P, SecretSource as Pn, createPostgresDatabase as Pt, BrickSocketConnectOptions as Q, EventWorkflow as Qn, PluginRouteMethod as Qt, Service as R, overrideSecret as Rn, blob as Rt, ErrorBuilder as S, PluginContext as Sn, port as Sr, StandardErrorCode as St, InferTableRow as T, PluginInstallOptions as Tn, DatabaseDefinition as Tt, ToolAnnotations as U, PluginHookArgs as Un, primaryKey as Ut, StandardErrorMap as V, PluginTableBuilders as Vn, index$1 as Vt, ToolConfigWithAuthorize as W, PluginHooks as Wn, real$1 as Wt, BrickSocketClient as X, EventListener as Xn, PLUGIN_KIND as Xt, BrickClientSocket as Y, EventEnvelope as Yn, InstalledPlugin as Yt, BrickSocketConfig as Z, EventRecorder as Zn, PluginEndpointContext as Zt, CommandDecision as _, OutboxTable as _n, crudEventSource as _r, stopAllEvents as _t, ActionConfigWithoutAuthorize as a, ResourcePluginTypes as an, WorkflowsOptions as ar, BrickSocketStatus as at, DefaultServiceContext as b, outboxTable as bn, Port as br, OutboxCounts as bt, ActionExecutionError as c, ActionAccessInfo as cn, ScheduleRun as cr, SocketEmitArgs as ct, BaseActionConfig as d, PostgresScheduleTable as dn, defineSchedule as dr, SocketPayloads as dt, PluginRouteScope as en, EventsWorld as er, BrickSocketHandle as et, BaseContext as f, SQLiteScheduleTable as fn, CrudEventOperation as fr, SocketReplay as ft, CommandConfig as g, OutboxStatus as gn, crudEventName as gr, ScheduleControl as gt, CommandChildren as h, scheduleTable as hn, EventRefs as hr, EventsHub as ht, ActionConfigWithAuthorize as i, ResourcePluginContext as in, WorkflowEvent as ir, BrickSocketSender as it, ResourceActionAccess as j, definePlugin as jn, isDatabaseHandle as jt, ProxyOptions as k, PluginServiceContext as kn, SQLiteDefinition as kt, ActionSchema as l, ResourceActionInfo as ln, ScheduleWorkflow as lr, SocketEmitOptions as lt, Command as m, ScheduleTable as mn, EventRef as mr, EventsDefinition as mt, ActionAccessPolicy as n, ResourcePlugin as nn, RetryDecision as nr, BrickSocketReconnectOptions as nt, ActionContext as o, ServicePlugin as on, Schedule as or, SocketBroker as ot, ChildChanges as p, ScheduleRunRecord as pn, EventCatalog as pr, SocketSchemas as pt, ValidationError as q, DispatchOptions as qn, uniqueIndex as qt, ActionConfig as r, ResourcePluginAPI as rn, ServiceEvents as rr, BrickSocketSchema as rt, ActionErrorDefinition as s, ServicePluginContext as sn, ScheduleConfig as sr, SocketBrokerMessage as st, Action as t, PluginRoutes as tn, ListenerFailure as tr, BrickSocketHandlerError as tt, ArchitectureSchema as u, ServicePort as un, ScheduleWorkflowRun as ur, SocketEventArgs as ut, CommandErrors as v, PostgresOutboxTable as vn, isCrudEvent as vr, ScheduleState as vt, InferTableInsert as w, PluginInfo as wn, HttpMethod as wr, isControlEvent as wt, DuplicateNameError as x, PluginAppContext as xn, Ports as xr, STANDARD_ERRORS as xt, CommandRow as y, SQLiteOutboxTable as yn, DepsOf as yr, Dispatcher as yt, ServiceOptions as z, resetSecrets as zn, createSQLiteDatabase as zt };
3198
+ export { BrickSocketError as $, CrudEventPayload as $n, text$1 as $t, Resource as A, PluginFactory as An, useDeps as Ar, WireError as At, ServiceSchema as B, SecretRef as Bn, PostgresDatabaseConfig as Bt, ErrorDetails as C, OutboxStatus as Cn, crudEventName as Cr, DashboardIdentity as Ct, NarrowAuthorizedContext as D, outboxTable as Dn, Port as Dr, signDashboardIdentity as Dt, Logger as E, SQLiteOutboxTable as En, DepsOf as Er, dashboardUser as Et, ResourceConfig as F, PluginManifest as Fn, PostgresDefinition as Ft, ToolConfigWithoutAuthorize as G, overrideSecret as Gn, blob as Gt, Tool as H, defineSecret as Hn, BrickSQLiteDatabase as Ht, ResourceIdentity as I, PluginServiceContext as In, SQLiteDefinition as It, ValidationErrorItem as J, PluginTableBuilders as Jn, index$1 as Jt, ToolOptions as K, resetSecrets as Kn, createSQLiteDatabase as Kt, ResourceTypeOptions as L, PluginSetupContext as Ln, defineDatabase as Lt, ResourceActionConfig as M, PluginInstallOptions as Mn, DatabaseDefinition as Mt, ResourceActionInput as N, PluginInstance as Nn, DatabaseHandle as Nt, PreparationContribution as O, PluginAppContext as On, Ports as Or, STANDARD_ERRORS as Ot, ResourceChild as P, PluginLifecycleContext as Pn, EnvInput as Pt, BrickSocketConnectOptions as Q, getHostHooks as Qn, sqliteTable$1 as Qt, Service as R, definePlugin as Rn, isDatabaseHandle as Rt, ErrorBuilder as S, scheduleTable as Sn, EventRefs as Sr, DASHBOARD_KEY_ENV as St, InferTableRow as T, PostgresOutboxTable as Tn, isCrudEvent as Tr, dashboardKey as Tt, ToolAnnotations as U, envSource as Un, BunSQLiteDatabase$1 as Ut, StandardErrorMap as V, SecretSource as Vn, createPostgresDatabase as Vt, ToolConfigWithAuthorize as W, listSecrets as Wn, SQLiteDatabaseConfig as Wt, BrickSocketClient as X, PluginHookArgs as Xn, primaryKey as Xt, BrickClientSocket as Y, HostHooks as Yn, integer$1 as Yt, BrickSocketConfig as Z, PluginHooks as Zn, real$1 as Zt, CommandDecision as _, ServicePort as _n, ScheduleWorkflowRun as _r, stopAllEvents as _t, ActionConfigWithoutAuthorize as a, PluginRouteMethod as an, EventWorkflow as ar, BrickSocketStatus as at, DefaultServiceContext as b, ScheduleRunRecord as bn, EventCatalog as br, OutboxCounts as bt, ActionExecutionError as c, PluginRoutes as cn, ListenerFailure as cr, SocketEmitArgs as ct, BaseActionConfig as d, ResourcePluginContext as dn, WorkflowEvent as dr, SocketPayloads as dt, uniqueIndex as en, DispatchOptions as er, BrickSocketHandle as et, BaseContext as f, ResourcePluginTypes as fn, WorkflowsOptions as fr, SocketReplay as ft, CommandConfig as g, ResourceActionInfo as gn, ScheduleWorkflow as gr, ScheduleControl as gt, CommandChildren as h, ActionAccessInfo as hn, ScheduleRun as hr, EventsHub as ht, ActionConfigWithAuthorize as i, PluginEndpointContext as in, EventRecorder as ir, BrickSocketSender as it, ResourceActionAccess as j, PluginInfo as jn, HttpMethod as jr, isControlEvent as jt, ProxyOptions as k, PluginContext as kn, port as kr, StandardErrorCode as kt, ActionSchema as l, ResourcePlugin as ln, RetryDecision as lr, SocketEmitOptions as lt, Command as m, ServicePluginContext as mn, ScheduleConfig as mr, EventsDefinition as mt, ActionAccessPolicy as n, InstalledPlugin as nn, EventEnvelope as nr, BrickSocketReconnectOptions as nt, ActionContext as o, PluginRouteRegistrar as on, EventsOptions as or, SocketBroker as ot, ChildChanges as p, ServicePlugin as pn, Schedule as pr, SocketSchemas as pt, ValidationError as q, resolveSecrets as qn, foreignKey as qt, ActionConfig as r, PLUGIN_KIND as rn, EventListener as rr, BrickSocketSchema as rt, ActionErrorDefinition as s, PluginRouteScope as sn, EventsWorld as sr, SocketBrokerMessage as st, Action as t, ContextOf as tn, EventDelivery as tr, BrickSocketHandlerError as tt, ArchitectureSchema as u, ResourcePluginAPI as un, ServiceEvents as ur, SocketEventArgs as ut, CommandErrors as v, PostgresScheduleTable as vn, defineSchedule as vr, ScheduleState as vt, InferTableInsert as w, OutboxTable as wn, crudEventSource as wr, DashboardUser as wt, DuplicateNameError as x, ScheduleTable as xn, EventRef as xr, DASHBOARD_IDENTITY_HEADER as xt, CommandRow as y, SQLiteScheduleTable as yn, CrudEventOperation as yr, Dispatcher as yt, ServiceOptions as z, SecretOptions as zn, PostgresDatabase as zt };
3151
3199
  //# sourceMappingURL=types.d.ts.map
package/dist/client.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { $ as BrickSocketError, Q as BrickSocketConnectOptions, X as BrickSocketClient, Y as BrickClientSocket, at as BrickSocketStatus, it as BrickSocketSender, nt as BrickSocketReconnectOptions, tt as BrickSocketHandlerError, ut as SocketEventArgs, wt as isControlEvent, xt as STANDARD_ERRORS } from "./chunks/types.js";
1
+ import { $ as BrickSocketError, Ot as STANDARD_ERRORS, Q as BrickSocketConnectOptions, X as BrickSocketClient, Y as BrickClientSocket, at as BrickSocketStatus, it as BrickSocketSender, jt as isControlEvent, nt as BrickSocketReconnectOptions, tt as BrickSocketHandlerError, ut as SocketEventArgs } from "./chunks/types.js";
2
2
  import { a as BrickClientOptions, c as BrickTransportError, d as InferActionInput, f as InferActionOutput, g as ATTR, h as isBrickTransportError, i as BrickClientAction, l as InferActionErrorCodes, m as isBrickServerError, n as BrickCallOptions, o as BrickServerError, p as createBrickClient, r as BrickClient, s as BrickServices, t as BrickActionCaller, u as InferActionFailure, v as SPAN, y as kebabCase } from "./chunks/client.js";
3
3
  export { ATTR, BrickActionCaller, BrickCallOptions, BrickClient, BrickClientAction, BrickClientOptions, type BrickClientSocket, BrickServerError, BrickServices, type BrickSocketClient, type BrickSocketConnectOptions, BrickSocketError, type BrickSocketHandlerError, type BrickSocketReconnectOptions, type BrickSocketSender, type BrickSocketStatus, BrickTransportError, InferActionErrorCodes, InferActionFailure, InferActionInput, InferActionOutput, SPAN, STANDARD_ERRORS, type SocketEventArgs, createBrickClient, isBrickServerError, isBrickTransportError, isControlEvent, kebabCase };
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { $n as EventsOptions, $t as PluginRouteRegistrar, A as Resource, An as PluginSetupContext, At as defineDatabase, B as ServiceSchema, Bn as resolveSecrets, Bt as foreignKey, C as ErrorDetails, Cn as PluginFactory, Cr as useDeps, Ct as WireError, D as NarrowAuthorizedContext, Dn as PluginLifecycleContext, Dt as EnvInput, E as Logger, En as PluginInstance, Et as DatabaseHandle, F as ResourceConfig, Fn as defineSecret, Ft as BrickSQLiteDatabase, G as ToolConfigWithoutAuthorize, Gn as getHostHooks, Gt as sqliteTable, H as Tool, Hn as HostHooks, Ht as integer, I as ResourceIdentity, In as envSource, It as BunSQLiteDatabase, J as ValidationErrorItem, Jn as EventDelivery, Jt as ContextOf, K as ToolOptions, Kn as CrudEventPayload, Kt as text, L as ResourceTypeOptions, Ln as listSecrets, Lt as SQLiteDatabaseConfig, M as ResourceActionConfig, Mn as SecretOptions, Mt as PostgresDatabase, N as ResourceActionInput, Nn as SecretRef, Nt as PostgresDatabaseConfig, O as PreparationContribution, On as PluginManifest, Ot as PostgresDefinition, P as ResourceChild, Pn as SecretSource, Pt as createPostgresDatabase, Qn as EventWorkflow, Qt as PluginRouteMethod, R as Service, Rn as overrideSecret, Rt as blob, S as ErrorBuilder, Sn as PluginContext, Sr as port, T as InferTableRow, Tn as PluginInstallOptions, Tt as DatabaseDefinition, U as ToolAnnotations, Un as PluginHookArgs, Ut as primaryKey, V as StandardErrorMap, Vn as PluginTableBuilders, Vt as index, W as ToolConfigWithAuthorize, Wn as PluginHooks, Wt as real, Xn as EventListener, Xt as PLUGIN_KIND, Y as BrickClientSocket, Yn as EventEnvelope, Yt as InstalledPlugin, Z as BrickSocketConfig, Zn as EventRecorder, Zt as PluginEndpointContext, _ as CommandDecision, _n as OutboxTable, _r as crudEventSource, _t as stopAllEvents, a as ActionConfigWithoutAuthorize, an as ResourcePluginTypes, ar as WorkflowsOptions, b as DefaultServiceContext, bn as outboxTable, br as Port, bt as OutboxCounts, c as ActionExecutionError, cn as ActionAccessInfo, cr as ScheduleRun, ct as SocketEmitArgs, d as BaseActionConfig, dn as PostgresScheduleTable, dr as defineSchedule, dt as SocketPayloads, en as PluginRouteScope, er as EventsWorld, et as BrickSocketHandle, f as BaseContext, fn as SQLiteScheduleTable, fr as CrudEventOperation, ft as SocketReplay, g as CommandConfig, gn as OutboxStatus, gr as crudEventName, gt as ScheduleControl, h as CommandChildren, hn as scheduleTable, hr as EventRefs, ht as EventsHub, i as ActionConfigWithAuthorize, in as ResourcePluginContext, ir as WorkflowEvent, it as BrickSocketSender, j as ResourceActionAccess, jn as definePlugin, jt as isDatabaseHandle, k as ProxyOptions, kn as PluginServiceContext, kt as SQLiteDefinition, l as ActionSchema, ln as ResourceActionInfo, lr as ScheduleWorkflow, lt as SocketEmitOptions, m as Command, mn as ScheduleTable, mr as EventRef, mt as EventsDefinition, n as ActionAccessPolicy, nn as ResourcePlugin, nr as RetryDecision, o as ActionContext, on as ServicePlugin, or as Schedule, ot as SocketBroker, p as ChildChanges, pn as ScheduleRunRecord, pr as EventCatalog, pt as SocketSchemas, q as ValidationError, qn as DispatchOptions, qt as uniqueIndex, r as ActionConfig, rn as ResourcePluginAPI, rr as ServiceEvents, rt as BrickSocketSchema, s as ActionErrorDefinition, sn as ServicePluginContext, sr as ScheduleConfig, st as SocketBrokerMessage, t as Action, tn as PluginRoutes, tr as ListenerFailure, u as ArchitectureSchema, ur as ScheduleWorkflowRun, ut as SocketEventArgs, v as CommandErrors, vn as PostgresOutboxTable, vr as isCrudEvent, vt as ScheduleState, w as InferTableInsert, wn as PluginInfo, wr as HttpMethod, x as DuplicateNameError, xn as PluginAppContext, xr as Ports, y as CommandRow, yn as SQLiteOutboxTable, yr as DepsOf, yt as Dispatcher, z as ServiceOptions, zn as resetSecrets, zt as createSQLiteDatabase } from "./chunks/types.js";
1
+ import { $n as CrudEventPayload, $t as text, A as Resource, An as PluginFactory, Ar as useDeps, At as WireError, B as ServiceSchema, Bn as SecretRef, Bt as PostgresDatabaseConfig, C as ErrorDetails, Cn as OutboxStatus, Cr as crudEventName, Ct as DashboardIdentity, D as NarrowAuthorizedContext, Dn as outboxTable, Dr as Port, Dt as signDashboardIdentity, E as Logger, En as SQLiteOutboxTable, Er as DepsOf, Et as dashboardUser, F as ResourceConfig, Fn as PluginManifest, Ft as PostgresDefinition, G as ToolConfigWithoutAuthorize, Gn as overrideSecret, Gt as blob, H as Tool, Hn as defineSecret, Ht as BrickSQLiteDatabase, I as ResourceIdentity, In as PluginServiceContext, It as SQLiteDefinition, J as ValidationErrorItem, Jn as PluginTableBuilders, Jt as index, K as ToolOptions, Kn as resetSecrets, Kt as createSQLiteDatabase, L as ResourceTypeOptions, Ln as PluginSetupContext, Lt as defineDatabase, M as ResourceActionConfig, Mn as PluginInstallOptions, Mt as DatabaseDefinition, N as ResourceActionInput, Nn as PluginInstance, Nt as DatabaseHandle, O as PreparationContribution, On as PluginAppContext, Or as Ports, P as ResourceChild, Pn as PluginLifecycleContext, Pt as EnvInput, Qn as getHostHooks, Qt as sqliteTable, R as Service, Rn as definePlugin, Rt as isDatabaseHandle, S as ErrorBuilder, Sn as scheduleTable, Sr as EventRefs, St as DASHBOARD_KEY_ENV, T as InferTableRow, Tn as PostgresOutboxTable, Tr as isCrudEvent, Tt as dashboardKey, U as ToolAnnotations, Un as envSource, Ut as BunSQLiteDatabase, V as StandardErrorMap, Vn as SecretSource, Vt as createPostgresDatabase, W as ToolConfigWithAuthorize, Wn as listSecrets, Wt as SQLiteDatabaseConfig, Xn as PluginHookArgs, Xt as primaryKey, Y as BrickClientSocket, Yn as HostHooks, Yt as integer, Z as BrickSocketConfig, Zn as PluginHooks, Zt as real, _ as CommandDecision, _r as ScheduleWorkflowRun, _t as stopAllEvents, a as ActionConfigWithoutAuthorize, an as PluginRouteMethod, ar as EventWorkflow, b as DefaultServiceContext, bn as ScheduleRunRecord, br as EventCatalog, bt as OutboxCounts, c as ActionExecutionError, cn as PluginRoutes, cr as ListenerFailure, ct as SocketEmitArgs, d as BaseActionConfig, dn as ResourcePluginContext, dr as WorkflowEvent, dt as SocketPayloads, en as uniqueIndex, er as DispatchOptions, et as BrickSocketHandle, f as BaseContext, fn as ResourcePluginTypes, fr as WorkflowsOptions, ft as SocketReplay, g as CommandConfig, gn as ResourceActionInfo, gr as ScheduleWorkflow, gt as ScheduleControl, h as CommandChildren, hn as ActionAccessInfo, hr as ScheduleRun, ht as EventsHub, i as ActionConfigWithAuthorize, in as PluginEndpointContext, ir as EventRecorder, it as BrickSocketSender, j as ResourceActionAccess, jn as PluginInfo, jr as HttpMethod, k as ProxyOptions, kn as PluginContext, kr as port, l as ActionSchema, ln as ResourcePlugin, lr as RetryDecision, lt as SocketEmitOptions, m as Command, mn as ServicePluginContext, mr as ScheduleConfig, mt as EventsDefinition, n as ActionAccessPolicy, nn as InstalledPlugin, nr as EventEnvelope, o as ActionContext, on as PluginRouteRegistrar, or as EventsOptions, ot as SocketBroker, p as ChildChanges, pn as ServicePlugin, pr as Schedule, pt as SocketSchemas, q as ValidationError, qn as resolveSecrets, qt as foreignKey, r as ActionConfig, rn as PLUGIN_KIND, rr as EventListener, rt as BrickSocketSchema, s as ActionErrorDefinition, sn as PluginRouteScope, sr as EventsWorld, st as SocketBrokerMessage, t as Action, tn as ContextOf, tr as EventDelivery, u as ArchitectureSchema, un as ResourcePluginAPI, ur as ServiceEvents, ut as SocketEventArgs, v as CommandErrors, vn as PostgresScheduleTable, vr as defineSchedule, vt as ScheduleState, w as InferTableInsert, wn as OutboxTable, wr as crudEventSource, wt as DashboardUser, x as DuplicateNameError, xn as ScheduleTable, xr as EventRef, xt as DASHBOARD_IDENTITY_HEADER, y as CommandRow, yn as SQLiteScheduleTable, yr as CrudEventOperation, yt as Dispatcher, z as ServiceOptions, zn as SecretOptions, zt as PostgresDatabase } from "./chunks/types.js";
2
2
  import { A as scalarDocsHTML, C as ApiDocument, D as ReferenceOptions, E as ReferenceDocument, M as RouteIR, N as RouteMethod, O as referencePlugin, S as DashboardOptions, T as OpenApiDocument, _ as EndpointContext, a as RequestLoggingOptions, b as EndpointMethod, c as CompiledRoute, d as loadCompiledBrickApp, f as CompiledHandler, g as BrickApp, h as deny, i as CorsOrigin, j as BrickIR, k as registerReferenceRoute, l as bindCompiledApplication, m as HandlerFactory, n as brick, o as requestLoggingPlugin, p as CompiledRoutePlan, r as CorsOptions, s as CompiledApplication, t as CreateServerOptions, u as compileBrickApplication, v as EndpointDefinition, w as DocumentationOptions, x as DashboardAuth, y as EndpointLogger } from "./chunks/server.js";
3
3
  import { _ as GLOBAL_SYMBOL, a as BrickClientOptions, c as BrickTransportError, d as InferActionInput, f as InferActionOutput, g as ATTR, h as isBrickTransportError, i as BrickClientAction, l as InferActionErrorCodes, m as isBrickServerError, n as BrickCallOptions, o as BrickServerError, p as createBrickClient, r as BrickClient, s as BrickServices, t as BrickActionCaller, u as InferActionFailure, v as SPAN, y as kebabCase } from "./chunks/client.js";
4
4
  import { StepErrorBuilder, defineError, stepErrors, stepFailure } from "./workflow.js";
5
5
  import { SpanKind } from "@opentelemetry/api";
6
- import { Static, TSchema, TSchema as TSchema$1, Type } from "@sinclair/typebox";
6
+ import { SchemaOptions, Static, TArray, TSchema, TSchema as TSchema$1, TUnsafe } from "@sinclair/typebox";
7
7
  import "@sinclair/typebox/compiler";
8
8
  import { Column, Table, Table as Table$1, and, asc, desc, eq, getTableColumns, getTableName, gt, gte, ilike, inArray, is, isNotNull, isNull, like, lt, lte, ne, not, notInArray, or, relations, sql } from "drizzle-orm";
9
9
  /**
@@ -298,7 +298,7 @@ export declare function defineService<TDb = BunSQLiteDatabase<Record<string, unk
298
298
  deps: DepsOf<TPorts>;
299
299
  }, TEvents> & NamedService<TName>;
300
300
  /** Keep validators browser-safe and reject schemas whose behavior cannot cross JSON. */
301
- export declare function serializeSocketSchema(schema: TSchema$1): unknown;
301
+ export declare function serializeSocketSchema(schema: TSchema$1, path?: string): unknown;
302
302
  interface RedisBrokerOptions {
303
303
  /** Defaults to `REDIS_URL`, then `redis://localhost:6379`. */
304
304
  url?: string;
@@ -655,6 +655,29 @@ export declare function getGlobalRegistry(): ServiceRegistry;
655
655
  * services again in each case; an application never needs it.
656
656
  */
657
657
  export declare function resetGlobalRegistry(): void;
658
+ /**
659
+ * Any JSON value: null, boolean, number, string, or an array or object of
660
+ * JSON values.
661
+ */
662
+ declare function Json(options?: SchemaOptions): import("@sinclair/typebox").TRecursive<import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TNull, import("@sinclair/typebox").TBoolean, import("@sinclair/typebox").TNumber, import("@sinclair/typebox").TString, TArray<import("@sinclair/typebox").TThis>, import("@sinclair/typebox").TRecord<import("@sinclair/typebox").TString, import("@sinclair/typebox").TThis>]>>;
663
+ interface FileOptions {
664
+ /** The largest file accepted, in bytes. Also caps the request body before it is read. */
665
+ maxSize?: number;
666
+ description?: string;
667
+ }
668
+ /** A file from a `multipart/form-data` body: a `File` (a `Blob`), at most `maxSize` bytes. */
669
+ declare function File(options?: FileOptions): TUnsafe<File>;
670
+ /** Several files under one form field. */
671
+ declare function Files(options?: FileOptions & {
672
+ minItems?: number;
673
+ maxItems?: number;
674
+ }): TArray<TUnsafe<File>>;
675
+ /** TypeBox's `Type` plus Brick's `Json`, `File` and `Files`. */
676
+ export declare const Type: import("@sinclair/typebox").JavaScriptTypeBuilder & {
677
+ Json: typeof Json;
678
+ File: typeof File;
679
+ Files: typeof Files;
680
+ };
658
681
  /**
659
682
  * Check a value against a schema, the way actions check their input and output.
660
683
  *
@@ -762,5 +785,5 @@ export declare function createMcpHandler(options: McpHandlerOptions): (request:
762
785
  interface ErrorEnvelope extends WireError {
763
786
  requestId: string;
764
787
  }
765
- export { ATTR, Action, type ActionAccessInfo, ActionAccessPolicy, ActionConfig, ActionConfigWithAuthorize, ActionConfigWithoutAuthorize, ActionContext, ActionErrorDefinition, ActionExecutionError, type ActionRoute, ActionSchema, type ApiDocument, ArchitectureSchema, BaseActionConfig, BaseContext, type BrickActionCaller, type BrickApp, type BrickCallOptions, type BrickClient, type BrickClientAction, type BrickClientOptions, type BrickIR, BrickSQLiteDatabase, BrickServerError, type BrickServices, type BrickSocketConfig, type BrickSocketHandle, type BrickSocketSchema, type BrickSocketSender, BrickTransportError, type BunSQLiteDatabase, ChildChanges, Command, CommandChildren, CommandConfig, CommandDecision, CommandErrors, CommandRow, type CompiledApplication, type CompiledHandler, type CompiledRoute, type CompiledRoutePlan, type CorsOptions, type CorsOrigin, type CreateServerOptions, type CrudEventOperation, type CrudEventPayload, type DashboardAuth, type DashboardOptions, DatabaseDefinition, DatabaseHandle, DefaultServiceContext, type DepsOf, type DispatchOptions, Dispatcher, type DocumentationOptions, DuplicateNameError, type EndpointContext, type EndpointDefinition, type EndpointLogger, type EndpointMethod, EnvInput, ErrorBuilder, ErrorDetails, type ErrorEnvelope, type EventCatalog, type EventDelivery, type EventEnvelope, type EventListener, type EventRecorder, type EventRef, type EventRefs, type EventWorkflow, type EventsDefinition, type EventsHub, type EventsOptions, type EventsWorld, GLOBAL_SYMBOL, type HandlerFactory, type HostHooks, type HttpMethod, type InferActionErrorCodes, type InferActionFailure, type InferActionInput, type InferActionOutput, InferTableInsert, InferTableRow, type InstalledPlugin, type ListenerFailure, Logger, type McpHandlerOptions, type McpRegistry, type McpRegistryOptions, type McpToolDefinition, NarrowAuthorizedContext, type OpenApiDocument, type OpenApiGeneratorOptions, type OutboxCounts, type OutboxStatus, type OutboxTable, type PluginAppContext, type PluginContext, type PluginEndpointContext, type PluginFactory, type PluginHookArgs, type PluginHooks, type PluginInfo, type PluginInstallOptions, type PluginInstance, type PluginLifecycleContext, type PluginManifest, type PluginRouteMethod, type PluginRouteRegistrar, type PluginRouteScope, type PluginRoutes, type PluginServiceContext, type PluginSetupContext, type PluginTableBuilders, type Port, type Ports, PostgresDatabase, PostgresDatabaseConfig, PostgresDefinition, type PostgresOutboxTable, type PostgresScheduleTable, PreparationContribution, ProxyOptions, type RedisBrokerOptions, type ReferenceDocument, type ReferenceOptions, type RequestLoggingOptions, Resource, ResourceActionAccess, ResourceActionConfig, type ResourceActionInfo, ResourceActionInput, ResourceChild, ResourceConfig, ResourceIdentity, type ResourcePlugin, type ResourcePluginAPI, type ResourcePluginContext, type ResourcePluginTypes, ResourceTypeOptions, type RetryDecision, type RouteIR, type RouteMethod, SPAN, SQLiteDatabaseConfig, SQLiteDefinition, type SQLiteOutboxTable, type SQLiteScheduleTable, type Schedule, type ScheduleConfig, type ScheduleControl, type ScheduleRun, type ScheduleRunRecord, type ScheduleState, type ScheduleTable, type ScheduleWorkflow, type ScheduleWorkflowRun, type SecretOptions, SecretRef, type SecretSource, Service, type ServiceActionCaller, type ServiceClient, type ServiceEvents, ServiceOptions, type ServicePlugin, type ServicePluginContext, type ServiceRegistry, ServiceSchema, type SocketBroker, type SocketBrokerMessage, type SocketEmitArgs, type SocketEmitOptions, type SocketEventArgs, type SocketPayloads, type SocketReplay, type SocketSchemas, StandardErrorMap, type Static, type StepErrorBuilder, type TSchema, type Table, Tool, ToolAnnotations, ToolConfigWithAuthorize, ToolConfigWithoutAuthorize, ToolOptions, Type, Type as t, type UntypedServiceClient, ValidationError, ValidationErrorItem, type WorkflowEvent, type WorkflowsOptions, and, asc, bindCompiledApplication, blob, brick, compileBrickApplication, createBrickClient, createPostgresDatabase, createSQLiteDatabase, crudEventName, crudEventSource, defineDatabase, defineError, definePlugin, defineSchedule, defineSecret, deny, desc, envSource, eq, foreignKey, getHostHooks, getTableColumns, getTableName, gt, gte, ilike, inArray, index, integer, is, isBrickServerError, isBrickTransportError, isCrudEvent, isDatabaseHandle, isNotNull, isNull, kebabCase, like, listSecrets, loadCompiledBrickApp, lt, lte, ne, not, notInArray, or, outboxTable, overrideSecret, port, primaryKey, real, referencePlugin, registerReferenceRoute, relations, requestLoggingPlugin, resetSecrets, resolveSecrets, scalarDocsHTML, scheduleTable, sql, sqliteTable, stepErrors, stepFailure, stopAllEvents, text, uniqueIndex, useDeps };
788
+ export { ATTR, Action, type ActionAccessInfo, ActionAccessPolicy, ActionConfig, ActionConfigWithAuthorize, ActionConfigWithoutAuthorize, ActionContext, ActionErrorDefinition, ActionExecutionError, type ActionRoute, ActionSchema, type ApiDocument, ArchitectureSchema, BaseActionConfig, BaseContext, type BrickActionCaller, type BrickApp, type BrickCallOptions, type BrickClient, type BrickClientAction, type BrickClientOptions, type BrickIR, BrickSQLiteDatabase, BrickServerError, type BrickServices, type BrickSocketConfig, type BrickSocketHandle, type BrickSocketSchema, type BrickSocketSender, BrickTransportError, type BunSQLiteDatabase, ChildChanges, Command, CommandChildren, CommandConfig, CommandDecision, CommandErrors, CommandRow, type CompiledApplication, type CompiledHandler, type CompiledRoute, type CompiledRoutePlan, type CorsOptions, type CorsOrigin, type CreateServerOptions, type CrudEventOperation, type CrudEventPayload, DASHBOARD_IDENTITY_HEADER, DASHBOARD_KEY_ENV, type DashboardAuth, type DashboardIdentity, type DashboardOptions, type DashboardUser, DatabaseDefinition, DatabaseHandle, DefaultServiceContext, type DepsOf, type DispatchOptions, Dispatcher, type DocumentationOptions, DuplicateNameError, type EndpointContext, type EndpointDefinition, type EndpointLogger, type EndpointMethod, EnvInput, ErrorBuilder, ErrorDetails, type ErrorEnvelope, type EventCatalog, type EventDelivery, type EventEnvelope, type EventListener, type EventRecorder, type EventRef, type EventRefs, type EventWorkflow, type EventsDefinition, type EventsHub, type EventsOptions, type EventsWorld, GLOBAL_SYMBOL, type HandlerFactory, type HostHooks, type HttpMethod, type InferActionErrorCodes, type InferActionFailure, type InferActionInput, type InferActionOutput, InferTableInsert, InferTableRow, type InstalledPlugin, type ListenerFailure, Logger, type McpHandlerOptions, type McpRegistry, type McpRegistryOptions, type McpToolDefinition, NarrowAuthorizedContext, type OpenApiDocument, type OpenApiGeneratorOptions, type OutboxCounts, type OutboxStatus, type OutboxTable, type PluginAppContext, type PluginContext, type PluginEndpointContext, type PluginFactory, type PluginHookArgs, type PluginHooks, type PluginInfo, type PluginInstallOptions, type PluginInstance, type PluginLifecycleContext, type PluginManifest, type PluginRouteMethod, type PluginRouteRegistrar, type PluginRouteScope, type PluginRoutes, type PluginServiceContext, type PluginSetupContext, type PluginTableBuilders, type Port, type Ports, PostgresDatabase, PostgresDatabaseConfig, PostgresDefinition, type PostgresOutboxTable, type PostgresScheduleTable, PreparationContribution, ProxyOptions, type RedisBrokerOptions, type ReferenceDocument, type ReferenceOptions, type RequestLoggingOptions, Resource, ResourceActionAccess, ResourceActionConfig, type ResourceActionInfo, ResourceActionInput, ResourceChild, ResourceConfig, ResourceIdentity, type ResourcePlugin, type ResourcePluginAPI, type ResourcePluginContext, type ResourcePluginTypes, ResourceTypeOptions, type RetryDecision, type RouteIR, type RouteMethod, SPAN, SQLiteDatabaseConfig, SQLiteDefinition, type SQLiteOutboxTable, type SQLiteScheduleTable, type Schedule, type ScheduleConfig, type ScheduleControl, type ScheduleRun, type ScheduleRunRecord, type ScheduleState, type ScheduleTable, type ScheduleWorkflow, type ScheduleWorkflowRun, type SecretOptions, SecretRef, type SecretSource, Service, type ServiceActionCaller, type ServiceClient, type ServiceEvents, ServiceOptions, type ServicePlugin, type ServicePluginContext, type ServiceRegistry, ServiceSchema, type SocketBroker, type SocketBrokerMessage, type SocketEmitArgs, type SocketEmitOptions, type SocketEventArgs, type SocketPayloads, type SocketReplay, type SocketSchemas, StandardErrorMap, type Static, type StepErrorBuilder, type TSchema, type Table, Tool, ToolAnnotations, ToolConfigWithAuthorize, ToolConfigWithoutAuthorize, ToolOptions, Type as t, type UntypedServiceClient, ValidationError, ValidationErrorItem, type WorkflowEvent, type WorkflowsOptions, and, asc, bindCompiledApplication, blob, brick, compileBrickApplication, createBrickClient, createPostgresDatabase, createSQLiteDatabase, crudEventName, crudEventSource, dashboardKey, dashboardUser, defineDatabase, defineError, definePlugin, defineSchedule, defineSecret, deny, desc, envSource, eq, foreignKey, getHostHooks, getTableColumns, getTableName, gt, gte, ilike, inArray, index, integer, is, isBrickServerError, isBrickTransportError, isCrudEvent, isDatabaseHandle, isNotNull, isNull, kebabCase, like, listSecrets, loadCompiledBrickApp, lt, lte, ne, not, notInArray, or, outboxTable, overrideSecret, port, primaryKey, real, referencePlugin, registerReferenceRoute, relations, requestLoggingPlugin, resetSecrets, resolveSecrets, scalarDocsHTML, scheduleTable, signDashboardIdentity, sql, sqliteTable, stepErrors, stepFailure, stopAllEvents, text, uniqueIndex, useDeps };
766
789
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as segmentClaimant, A as WORKFLOW_BUNDLE, B as requireBrickApp, C as getActionAccess, D as bindCompiledApplication, E as resetGlobalRegistry, F as crudEventName, G as port, H as claimName, I as crudEventSource, J as defineServicePlugin, K as useDeps, L as eventRefs, M as defineListener, N as checkEvent, O as compileBrickApplication, P as checkPayload, Q as isInstallingPlugin, R as isCrudEvent, S as generateOpenApiSpec, T as getGlobalRegistry, U as definitionSite, V as createActionHandler, W as INTERNALS, X as hasPlugin, Y as getPluginEndpoints, Z as installPlugin, _ as envSource, a as defineSchedule, at as deny, b as resetSecrets, c as runInTransaction, ct as Type, d as referencePlugin, dt as traceRoute, et as validateName, f as registerReferenceRoute, ft as withCallSpan, g as defineSecret, h as SecretRef, i as stopAllEvents, it as errorsOf, j as resolveWorkflowPaths, k as loadCompiledBrickApp, l as isOutboxTable, lt as t, m as requestLoggingPlugin, mt as PLUGIN_KIND, n as defineServiceSocket, nt as buildErrorHelpers, o as Dispatcher, ot as baseContext, p as scalarDocsHTML, pt as PLUGIN_COMMIT, q as defineResourcePlugin, r as recordingServices, rt as defineAction, s as onTransactionCommit, st as pickContextEnvelope, t as brick, tt as portOf, u as outboxTable, ut as validateWithSchema, v as listSecrets, w as setActionAccess, x as resolveSecrets, y as overrideSecret, z as isBrickApp } from "./chunks/server.js";
1
+ import { $ as segmentClaimant, A as WORKFLOW_BUNDLE, B as requireBrickApp, C as getActionAccess, D as bindCompiledApplication, E as resetGlobalRegistry, F as crudEventName, G as port, H as claimName, I as crudEventSource, J as defineServicePlugin, K as useDeps, L as eventRefs, M as defineListener, N as checkEvent, O as compileBrickApplication, P as checkPayload, Q as isInstallingPlugin, R as isCrudEvent, S as generateOpenApiSpec, T as getGlobalRegistry, U as definitionSite, V as createActionHandler, W as INTERNALS, X as hasPlugin, Y as getPluginEndpoints, Z as installPlugin, _ as envSource, _t as withCallSpan, a as defineSchedule, at as deny, b as resetSecrets, c as runInTransaction, ct as DASHBOARD_IDENTITY_HEADER, d as referencePlugin, dt as dashboardUser, et as validateName, f as registerReferenceRoute, ft as signDashboardIdentity, g as defineSecret, gt as traceRoute, h as SecretRef, ht as validateWithSchema, i as stopAllEvents, it as errorsOf, j as resolveWorkflowPaths, k as loadCompiledBrickApp, l as isOutboxTable, lt as DASHBOARD_KEY_ENV, m as requestLoggingPlugin, mt as fileFields, n as defineServiceSocket, nt as buildErrorHelpers, o as Dispatcher, ot as baseContext, p as scalarDocsHTML, pt as Type, q as defineResourcePlugin, r as recordingServices, rt as defineAction, s as onTransactionCommit, st as pickContextEnvelope, t as brick, tt as portOf, u as outboxTable, ut as dashboardKey, v as listSecrets, vt as PLUGIN_COMMIT, w as setActionAccess, x as resolveSecrets, y as overrideSecret, yt as PLUGIN_KIND, z as isBrickApp } from "./chunks/server.js";
2
2
  import { G as DuplicateNameError, H as GLOBAL_SYMBOL, K as ValidationError, S as actionMeta, U as SPAN, V as ATTR, W as ActionExecutionError, a as isBrickTransportError, d as getActionRoute, f as getPluginActionRoute, i as isBrickServerError, j as compareSocketSeq, l as actionOwners, n as BrickTransportError, r as createBrickClient, s as serializeSocketSchema, t as BrickServerError, x as kebabCase } from "./chunks/client.js";
3
3
  import { defineError, stepErrors, stepFailure } from "./workflow.js";
4
4
  import { createRequire } from "node:module";
@@ -373,6 +373,7 @@ function checkOptions(plugin, schema, input) {
373
373
  // src/tool.ts
374
374
  function defineTool(config) {
375
375
  if (config.input && config.input.type !== "object") throw new Error(`Tool '${config.name}' input must be an object schema`);
376
+ if (fileFields(config.input).length) throw new Error(`Tool '${config.name}' input has file fields; MCP carries JSON only, so take uploads in an action`);
376
377
  const tool = defineAction(config);
377
378
  Object.defineProperty(tool, "kind", { value: "tool" });
378
379
  return tool;
@@ -1385,6 +1386,7 @@ async function resolveServiceContext(service, callCtx, pluginDeps) {
1385
1386
  requestId: callCtx?.requestId,
1386
1387
  services: callCtx?.services,
1387
1388
  metadata: callCtx?.metadata,
1389
+ dashboard: callCtx?.dashboard,
1388
1390
  deps: service.deps ?? (callCtx?.[RESOLVED_SYMBOL] ? void 0 : callCtx?.deps)
1389
1391
  });
1390
1392
  const fullBaseCtx = {
@@ -1863,6 +1865,6 @@ function createMcpHandler(options) {
1863
1865
  }
1864
1866
  };
1865
1867
  }
1866
- export { ATTR, ActionExecutionError, BrickServerError, BrickTransportError, Dispatcher, DuplicateNameError, GLOBAL_SYMBOL, SPAN, SecretRef, Table, Type, UnknownToolError, ValidationError, WORKFLOW_BUNDLE, actionOwners, and, asc, attachDatabase, bindCompiledApplication, blob, brick, buildErrorHelpers, buildFtsMatchQuery, columnValue, compileBrickApplication, createActionHandler, createBrickClient, createMcpHandler, createMcpRegistry, createPostgresDatabase, createSQLiteDatabase, crudEventName, crudEventSource, defineAction, defineDatabase, defineError, defineListener, definePlugin, defineResource, defineResourcePlugin, defineSchedule, defineSecret, defineService, defineServicePlugin, defineTool, deny, desc, drizzleSchema, emitEvent, ensureResourceIndexes, ensureSQLiteFts, envSource, eq, errorsOf, foreignKey, generateOpenApiSpec, generateSQLiteIndexDdl, generateSQLiteTableDdl, getActionAccess, getActionRoute, getGlobalRegistry, getHostHooks, getPluginActionRoute, getPluginEndpoints, getTableColumns, getTableName, gt, gte, idSchema, ilike, inArray, index, integer, is, isBrickApp, isBrickServerError, isBrickTransportError, isCrudEvent, isDatabaseHandle, isNotNull, isNull, isTool, kebabCase, like, listSecrets, loadCompiledBrickApp, loadRecord, lt, lte, migrateDatabase, ne, not, notInArray, onTransactionCommit, or, outboxTable, overrideSecret, port, primaryKey, real, redisBroker, referencePlugin, registerReferenceRoute, relations, requestLoggingPlugin, requireBrickApp, resetGlobalRegistry, resetSecrets, resolveSecrets, resolveWorkflowPaths, runInTransaction, scalarDocsHTML, scheduleTable, serializeSocketSchema, setActionAccess, sql, sqliteTable, stepErrors, stepFailure, stopAllEvents, syncSchema, t, text, traceRoute, uniqueIndex, useDeps, useService, validateWithSchema };
1868
+ export { ATTR, ActionExecutionError, BrickServerError, BrickTransportError, DASHBOARD_IDENTITY_HEADER, DASHBOARD_KEY_ENV, Dispatcher, DuplicateNameError, GLOBAL_SYMBOL, SPAN, SecretRef, Table, Type, Type as t, UnknownToolError, ValidationError, WORKFLOW_BUNDLE, actionOwners, and, asc, attachDatabase, bindCompiledApplication, blob, brick, buildErrorHelpers, buildFtsMatchQuery, columnValue, compileBrickApplication, createActionHandler, createBrickClient, createMcpHandler, createMcpRegistry, createPostgresDatabase, createSQLiteDatabase, crudEventName, crudEventSource, dashboardKey, dashboardUser, defineAction, defineDatabase, defineError, defineListener, definePlugin, defineResource, defineResourcePlugin, defineSchedule, defineSecret, defineService, defineServicePlugin, defineTool, deny, desc, drizzleSchema, emitEvent, ensureResourceIndexes, ensureSQLiteFts, envSource, eq, errorsOf, foreignKey, generateOpenApiSpec, generateSQLiteIndexDdl, generateSQLiteTableDdl, getActionAccess, getActionRoute, getGlobalRegistry, getHostHooks, getPluginActionRoute, getPluginEndpoints, getTableColumns, getTableName, gt, gte, idSchema, ilike, inArray, index, integer, is, isBrickApp, isBrickServerError, isBrickTransportError, isCrudEvent, isDatabaseHandle, isNotNull, isNull, isTool, kebabCase, like, listSecrets, loadCompiledBrickApp, loadRecord, lt, lte, migrateDatabase, ne, not, notInArray, onTransactionCommit, or, outboxTable, overrideSecret, port, primaryKey, real, redisBroker, referencePlugin, registerReferenceRoute, relations, requestLoggingPlugin, requireBrickApp, resetGlobalRegistry, resetSecrets, resolveSecrets, resolveWorkflowPaths, runInTransaction, scalarDocsHTML, scheduleTable, serializeSocketSchema, setActionAccess, signDashboardIdentity, sql, sqliteTable, stepErrors, stepFailure, stopAllEvents, syncSchema, text, traceRoute, uniqueIndex, useDeps, useService, validateWithSchema };
1867
1869
 
1868
1870
  //# sourceMappingURL=index.js.map