@brickkit/core 0.6.1 → 0.7.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.
- package/README.md +179 -72
- package/dist/chunks/client.d.ts +902 -0
- package/dist/chunks/client.d.ts.map +1 -0
- package/dist/chunks/effect.d.ts +574 -0
- package/dist/chunks/effect.d.ts.map +1 -0
- package/dist/chunks/effect.js +2912 -0
- package/dist/chunks/effect.js.map +1 -0
- package/dist/chunks/types.js +46 -0
- package/dist/chunks/types.js.map +1 -0
- package/dist/client.d.ts +2 -0
- package/dist/client.js +205 -0
- package/dist/client.js.map +1 -0
- package/dist/effect.d.ts +3 -0
- package/dist/effect.js +1 -0
- package/dist/index.d.ts +3 -347
- package/dist/index.js +53 -367
- package/dist/index.js.map +1 -1
- package/dist/pg.d.ts +4 -4
- package/dist/pg.d.ts.map +1 -1
- package/dist/pg.js +2 -2
- package/package.json +13 -10
- package/dist/chunks/errors.d.ts +0 -162
- package/dist/chunks/errors.d.ts.map +0 -1
- package/dist/chunks/errors.js +0 -177
- package/dist/chunks/errors.js.map +0 -1
- package/dist/chunks/rolldown-runtime.js +0 -13
- package/dist/contracts.d.ts +0 -2
- package/dist/contracts.js +0 -1
- package/dist/index.d.ts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","names":["BunSQLiteDatabase","_$__plugin0.ResourcePluginAPI","BunSQLiteDatabase"],"sources":["../../src/plugin.ts","../../src/db/sqlite.ts","../../src/secrets.ts","../../src/db/postgres.ts","../../src/db/define.ts","../../src/types.ts","../../src/client.ts"],"mappings":";;;;;;;;KAcY;KACA;KACA,aAAa,UAAU,mBAAmB,4BAElD,SAAS;EAAyB;EAAe,QAAQ;;KAExD,UAAU,KACb,UAAU,cAAc,SAAS,KAAK,YAAY,KAAK;UAExC,sBACf,UAAU,gBAAgB;EAE1B,QAAQ;EACR,OAAO;EACP;EACA,SAAS;EACT,SAAS;EACT;IAAO;IA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UzB,sBACd,eACC,OAAO;iBAIM,mBAAmB,eAAe,OAAO;;KAK7C,iBAAiB,KAC3B,UAAU,wBAAwB,eAC9B,IACA;EACI;IAAU,cAAc,UAAU;;IAEpC,OAAO,KACP;EACI,QAAQ;IAAU,cAAc;IAAG;;IAErC,IACA;EAAY,IAAI,cAAc,GAAG;IAC/B,IACA,YAAW;EAAU,cAAc;EAAG;aACpC;;KAIF,kBAAkB,KAC5B,UAAU,6BAA6B,UACnC,IACA,eAAc,gBAAgB,cAAc,MAC1C,IACA;EAAY,QAAQ,cAAc,cAAc;IAC9C;;KAIE,sBAAsB,KAChC,UAAU,kCAAkC,KACxC,cAAc,aACd;EACI;IAAU,eAAe;;IAE3B,UAAU,eAAe,yBACvB,cAAc;;;;;;;;;;;;;KAgBZ,mBAAmB,KAAK;EAClC,MACI,sBAAsB;;;;;;KAchB,kBAAkB,uBACV,iBAAiB,MAE7B,QAAQ,iBAAiB,IACzB,UAAU,qBACP,QAAQ,kBAAkB,OAE7B,OAAO,iBAAiB,IACxB,UAAU,qBACP,QAAQ,kBAAkB;;KAGzB,YAAY,KAAK,UACzB,mCACA,6BACA,kBAAkB,KAClB,eAAc,uBACZ,kBAAkB,KAClB,sBACK,WAAW,IAAI,YAAY,EAAE,SAChC;;;;;;iBAiSQ,kBAAkB,aAAa,qBAC7C,SAAS;EAAuB,UAAU;IACzC,YAAY;iBACC,kBAAkB,aAAa,qBAC7C,SAAS,qBACR,YAAY"}
|
|
@@ -0,0 +1,574 @@
|
|
|
1
|
+
import { $ as ToolConfigWithoutAuthorize, A as ErrorBuilder, B as Resource, E as BaseContext, Et as SQLiteDatabaseConfig, H as ResourceIdentity, Ht as ResourcePlugin, I as PreparationContribution, K as ServiceOptions, Kt as ServicePlugin, L as ProxyOptions, Lt as PluginEndpointContext, N as LifecycleOptions, O as CompiledRoutePlan, P as Logger, Q as ToolConfigWithAuthorize, S as ActionExecutionError, Tt as BunSQLiteDatabase, U as ResourceTypeOptions, V as ResourceConfig, W as Service, Wt as ResourcePluginContext, X as Tool, Z as ToolAnnotations, b as ActionContext, dt as PostgresDatabase, et as ToolOptions, ft as PostgresDatabaseConfig, g as ActionAccessPolicy, gt as SecretSource, h as Action, it as DatabaseHandle, nt as ValidationErrorItem, q as ServiceSchema, qt as ServicePluginContext, tt as ValidationError, v as ActionConfigWithAuthorize, w as ArchitectureSchema, x as ActionErrorDefinition, y as ActionConfigWithoutAuthorize, zt as PluginRouteRegistrar } from "./client.js";
|
|
2
|
+
import { Effect, Layer, ManagedRuntime } from "effect";
|
|
3
|
+
import { Static as Static$1, TSchema, TSchema as TSchema$1, Type } from "@sinclair/typebox";
|
|
4
|
+
import { TypeCheck } from "@sinclair/typebox/compiler";
|
|
5
|
+
import { Elysia } from "elysia";
|
|
6
|
+
import { Table as Table$1, and, asc, desc, eq, getTableColumns as getTableColumns$1, getTableName as getTableName$1, gt, gte, ilike, inArray, is, isNotNull, isNull, like, lt, lte, ne, not, notInArray, or, relations, sql as sql$1 } from "drizzle-orm";
|
|
7
|
+
//#region src/effect-service.d.ts
|
|
8
|
+
type EffectRegistration<C extends BaseContext<any>, R> = {
|
|
9
|
+
<I extends TSchema | undefined = undefined, O extends TSchema | undefined = undefined, Errors extends Record<string, ActionErrorDefinition> = Record<string, ActionErrorDefinition>, E = never, Q = never>(config: EffectActionConfigWithAuthorize<I, O, Errors, C, E, Q>): EffectAction<I, O, Errors, C, E, R | Q>;
|
|
10
|
+
<I extends TSchema | undefined = undefined, O extends TSchema | undefined = undefined, Errors extends Record<string, ActionErrorDefinition> = Record<string, ActionErrorDefinition>, E = never, Q = never>(config: EffectActionConfigWithoutAuthorize<I, O, Errors, C, E, Q>): EffectAction<I, O, Errors, C, E, R | Q>;
|
|
11
|
+
(action: EffectAction<any, any, any, C, any, any>): EffectService<any, any, R>;
|
|
12
|
+
};
|
|
13
|
+
type EffectToolRegistration<C extends BaseContext<any>, R> = {
|
|
14
|
+
<I extends TSchema | undefined = undefined, O extends TSchema | undefined = undefined, Errors extends Record<string, ActionErrorDefinition> = Record<string, ActionErrorDefinition>, E = never, Q = never>(config: EffectActionConfigWithAuthorize<I, O, Errors, C, E, Q> & ToolOptions): EffectTool<I, O, Errors, C, E, R | Q>;
|
|
15
|
+
<I extends TSchema | undefined = undefined, O extends TSchema | undefined = undefined, Errors extends Record<string, ActionErrorDefinition> = Record<string, ActionErrorDefinition>, E = never, Q = never>(config: EffectActionConfigWithoutAuthorize<I, O, Errors, C, E, Q> & ToolOptions): EffectTool<I, O, Errors, C, E, R | Q>;
|
|
16
|
+
(action: EffectTool<any, any, any, C, any, any>): EffectService<any, any, R>;
|
|
17
|
+
};
|
|
18
|
+
type EffectServiceOptions<C extends Record<string, any>, D, R = never> = Omit<ServiceOptions<C, D>, "context" | "lifecycle"> & {
|
|
19
|
+
context?: (base: BaseContext<D>) => Effect.Effect<C, unknown, R>;
|
|
20
|
+
lifecycle?: {
|
|
21
|
+
onInit?: (ctx: Parameters<NonNullable<LifecycleOptions["onInit"]>>[0]) => Effect.Effect<void, unknown, R>;
|
|
22
|
+
onDestroy?: () => Effect.Effect<void, unknown, R>;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
type EffectService<D = BunSQLiteDatabase<Record<string, unknown>>, C extends Record<string, any> = Record<string, any>, R = never> = Omit<Service<D, C>, "action" | "tool" | "resolveContext" | "resource"> & {
|
|
26
|
+
action: EffectRegistration<BaseContext<D> & C, R> & Service<D, C>["action"];
|
|
27
|
+
tool: EffectToolRegistration<BaseContext<D> & C, R> & Service<D, C>["tool"];
|
|
28
|
+
resolveContext: Service<D, C>["resolveContext"];
|
|
29
|
+
resolveContextEffect(ctx?: Partial<BaseContext<D> & C>): Effect.Effect<BaseContext<D> & C, unknown, R>;
|
|
30
|
+
resource<TTable = any, const TOptions extends ResourceTypeOptions = ResourceTypeOptions>(config: ResourceConfig<TTable, BaseContext<D> & C> & TOptions & Record<Exclude<keyof TOptions, keyof ResourceConfig>, never>): Resource<TTable, BaseContext<D> & C, ResourceIdentity<TTable, TOptions>>;
|
|
31
|
+
};
|
|
32
|
+
/** Native authoring shares the same registration host and metadata as Promise services. */
|
|
33
|
+
declare function defineEffectService<D = BunSQLiteDatabase<Record<string, unknown>>, C extends Record<string, any> = Record<string, any>, R = never>(name: string, options?: EffectServiceOptions<C, D, R>): EffectService<D, C, R>;
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/resource.d.ts
|
|
36
|
+
/** Declares a plugin host without registering actions or changing the schema. */
|
|
37
|
+
declare function defineResource<TTable = any, TCtx extends ActionContext = ActionContext, const O extends ResourceTypeOptions = ResourceTypeOptions>(service: Service<any, any>, config: ResourceConfig<TTable, TCtx> & O): Resource<TTable, TCtx, ResourceIdentity<TTable, O>>;
|
|
38
|
+
//#endregion
|
|
39
|
+
//#region src/effect-plugin.d.ts
|
|
40
|
+
type RouteOptions = Pick<Parameters<PluginRouteRegistrar["action"]>[0], "path" | "method" | "scope">;
|
|
41
|
+
interface EffectPluginRouteRegistrar<C extends ActionContext = ActionContext> {
|
|
42
|
+
action<I extends TSchema | undefined = undefined, O extends TSchema | undefined = undefined, Errors extends Record<string, ActionErrorDefinition> = Record<string, ActionErrorDefinition>, E = never, R = never>(config: EffectActionConfigWithAuthorize<I, O, Errors, C, E, R> & RouteOptions): EffectAction<I, O, Errors, C, E, R>;
|
|
43
|
+
action<I extends TSchema | undefined = undefined, O extends TSchema | undefined = undefined, Errors extends Record<string, ActionErrorDefinition> = Record<string, ActionErrorDefinition>, E = never, R = never>(config: EffectActionConfigWithoutAuthorize<I, O, Errors, C, E, R> & RouteOptions): EffectAction<I, O, Errors, C, E, R>;
|
|
44
|
+
endpoint(config: Omit<Parameters<PluginRouteRegistrar<C>["endpoint"]>[0], "handler"> & {
|
|
45
|
+
handler: (context: PluginEndpointContext<C>) => Effect.Effect<unknown, unknown, any>;
|
|
46
|
+
}): void;
|
|
47
|
+
}
|
|
48
|
+
type EffectServicePluginContext<S extends Service<any, any>> = Omit<ServicePluginContext<S>, "routes"> & {
|
|
49
|
+
routes: EffectPluginRouteRegistrar<ServicePluginContext<S>["routes"] extends PluginRouteRegistrar<infer C, any> ? C : never>;
|
|
50
|
+
};
|
|
51
|
+
type EffectResourcePluginContext<S extends Service<any, any>, R extends Resource<any, any, any>> = Omit<ResourcePluginContext<S, R>, "routes"> & {
|
|
52
|
+
routes: EffectPluginRouteRegistrar<ResourcePluginContext<S, R>["routes"] extends PluginRouteRegistrar<infer C, any> ? C : never>;
|
|
53
|
+
};
|
|
54
|
+
declare function defineEffectServicePlugin<S extends Service<any, any> = Service<any, any>, A = unknown>(definition: Pick<ServicePlugin<S, A>, "name" | "routes"> & {
|
|
55
|
+
setup: (context: EffectServicePluginContext<S>) => A & (A extends PromiseLike<unknown> ? never : unknown);
|
|
56
|
+
}): ServicePlugin<S, A>;
|
|
57
|
+
declare function defineEffectResourcePlugin<S extends Service<any, any> = Service<any, any>, R extends Resource<any, any, any> = Resource<any, any, any>, A extends object = object>(definition: Pick<ResourcePlugin<S, R, A>, "name" | "routes"> & {
|
|
58
|
+
setup: (context: EffectResourcePluginContext<S, R>) => A & (A extends PromiseLike<unknown> ? never : unknown);
|
|
59
|
+
}): ResourcePlugin<S, R, A>;
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region src/compiler/ir.d.ts
|
|
62
|
+
type RouteMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
63
|
+
interface RouteIR {
|
|
64
|
+
readonly method: RouteMethod;
|
|
65
|
+
readonly path: string;
|
|
66
|
+
readonly service: string;
|
|
67
|
+
readonly action: string;
|
|
68
|
+
readonly kind: "action";
|
|
69
|
+
readonly input: boolean;
|
|
70
|
+
readonly output: boolean;
|
|
71
|
+
readonly context: boolean;
|
|
72
|
+
readonly authorize: boolean;
|
|
73
|
+
readonly inputPrecedence: readonly ("query" | "params" | "body")[];
|
|
74
|
+
readonly coercions: readonly {
|
|
75
|
+
readonly key: string;
|
|
76
|
+
readonly type: "number" | "boolean";
|
|
77
|
+
}[];
|
|
78
|
+
/** JSON projection for inspection and stale-artifact detection, not runtime validation. */
|
|
79
|
+
readonly inputSchema?: unknown;
|
|
80
|
+
readonly outputSchema?: unknown;
|
|
81
|
+
}
|
|
82
|
+
interface BrickIR {
|
|
83
|
+
readonly version: 1;
|
|
84
|
+
readonly target: "bun-elysia";
|
|
85
|
+
readonly prefix: string;
|
|
86
|
+
readonly services: readonly string[];
|
|
87
|
+
readonly routes: readonly RouteIR[];
|
|
88
|
+
readonly preparations: readonly {
|
|
89
|
+
service: string;
|
|
90
|
+
name: string;
|
|
91
|
+
metadata: unknown;
|
|
92
|
+
}[];
|
|
93
|
+
readonly diagnostics: readonly string[];
|
|
94
|
+
}
|
|
95
|
+
//#endregion
|
|
96
|
+
//#region src/endpoints.d.ts
|
|
97
|
+
type EndpointMethod = "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
|
|
98
|
+
/** Logger subset handed to endpoint handlers (mirrors action context loggers). */
|
|
99
|
+
interface EndpointLogger {
|
|
100
|
+
info: (...args: any[]) => void;
|
|
101
|
+
warn: (...args: any[]) => void;
|
|
102
|
+
error: (...args: any[]) => void;
|
|
103
|
+
debug: (...args: any[]) => void;
|
|
104
|
+
}
|
|
105
|
+
/** Context for raw endpoint handlers: Elysia route fields + Brick extras. */
|
|
106
|
+
interface EndpointContext {
|
|
107
|
+
params: Record<string, string>;
|
|
108
|
+
query: Record<string, string | undefined>;
|
|
109
|
+
body: unknown;
|
|
110
|
+
headers: Record<string, string>;
|
|
111
|
+
request: Request;
|
|
112
|
+
/** Elysia response setter (status/headers). Mutate like in `app.get`. */
|
|
113
|
+
set: {
|
|
114
|
+
status?: number;
|
|
115
|
+
headers: Record<string, string>;
|
|
116
|
+
};
|
|
117
|
+
/** Drizzle db from `service` (or first service with one); `undefined` when none. */
|
|
118
|
+
db: any;
|
|
119
|
+
logger: EndpointLogger;
|
|
120
|
+
traceId: string;
|
|
121
|
+
requestId: string;
|
|
122
|
+
}
|
|
123
|
+
interface EndpointDefinition {
|
|
124
|
+
method: EndpointMethod;
|
|
125
|
+
/** Elysia-style path, e.g. `/p/:slug`. */
|
|
126
|
+
path: string;
|
|
127
|
+
handler: (ctx: EndpointContext) => unknown | Promise<unknown>;
|
|
128
|
+
/** Db source: instance or registered service name. Defaults to first service with a db. */
|
|
129
|
+
service?: Service<any, any> | string;
|
|
130
|
+
/** Explicit database handle, independent of a service. */
|
|
131
|
+
database?: DatabaseHandle<unknown>;
|
|
132
|
+
summary?: string;
|
|
133
|
+
description?: string;
|
|
134
|
+
tags?: string[];
|
|
135
|
+
}
|
|
136
|
+
/** Resolve the db for an endpoint: explicit service first, else first service holding one. */
|
|
137
|
+
declare function resolveEndpointDb(service: Service<any, any> | string | undefined, services: Service<any, any>[]): any;
|
|
138
|
+
/** Wrap a raw handler with trace ids, logger, db, and mesh-consistent error mapping. */
|
|
139
|
+
declare function createEndpointHandler(def: EndpointDefinition, services: Service<any, any>[]): (elysiaCtx: any) => Promise<unknown>;
|
|
140
|
+
/** `/p/:slug` → `/p/{slug}` for OpenAPI. */
|
|
141
|
+
declare function toOpenApiPath(elysiaPath: string): string;
|
|
142
|
+
/** OpenAPI `paths` fragment for declared endpoints (raw HTML included). */
|
|
143
|
+
declare function endpointPaths(defs: EndpointDefinition[]): Record<string, any>;
|
|
144
|
+
/** The app object returned by `brick`: Elysia plus `endpoint()`. */
|
|
145
|
+
type BrickApp = Elysia<any, any, any, any, any, any, any> & {
|
|
146
|
+
/** Service definitions and prefix selected when this app was constructed. */
|
|
147
|
+
readonly definition: {
|
|
148
|
+
readonly routes: readonly RouteIR[];
|
|
149
|
+
readonly services: readonly Service<any, any>[];
|
|
150
|
+
readonly prefix: string;
|
|
151
|
+
};
|
|
152
|
+
/** Register a raw endpoint (outside the JSON action mesh). */
|
|
153
|
+
endpoint(def: EndpointDefinition): void;
|
|
154
|
+
/** All endpoints registered via `endpoint()` (declaration order). */
|
|
155
|
+
listEndpoints(): EndpointDefinition[];
|
|
156
|
+
};
|
|
157
|
+
//#endregion
|
|
158
|
+
//#region src/action-handler.d.ts
|
|
159
|
+
declare function compileRoutePlan(service: Service, action: Action, routePath: string, method?: string): CompiledRoutePlan;
|
|
160
|
+
declare function executeCompiledRoute(plan: CompiledRoutePlan, elysiaCtx: any): Promise<any>;
|
|
161
|
+
declare function createActionHandler(service: Service, action: Action, routePath: string, method?: string): (elysiaCtx: any) => Promise<any>;
|
|
162
|
+
//#endregion
|
|
163
|
+
//#region src/app-entry.d.ts
|
|
164
|
+
declare function isBrickApp(app: unknown): app is BrickApp;
|
|
165
|
+
declare function requireBrickApp(app: unknown): BrickApp;
|
|
166
|
+
//#endregion
|
|
167
|
+
//#region src/request-logger.d.ts
|
|
168
|
+
interface RequestLoggingOptions {
|
|
169
|
+
enabled?: boolean;
|
|
170
|
+
logger?: (msg: string) => void;
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Elysia plugin that logs each request as `METHOD path → status (elapsedms)`.
|
|
174
|
+
* Timing is tracked per-Request via a WeakMap. The onError hook only logs and
|
|
175
|
+
* returns undefined so existing error mapping is preserved. Logging only —
|
|
176
|
+
* no CORS headers are set here.
|
|
177
|
+
*
|
|
178
|
+
* Hooks are registered with the "global" scope so they propagate to the
|
|
179
|
+
* parent app when mounted via `app.use(...)` — Elysia scopes plain instance
|
|
180
|
+
* hooks to the plugin's own routes. Timing is captured in beforeHandle
|
|
181
|
+
* because request hooks are not propagated from a
|
|
182
|
+
* used instance. Unmatched routes (no beforeHandle) fall back to Date.now().
|
|
183
|
+
*/
|
|
184
|
+
declare function requestLoggingPlugin(opts?: RequestLoggingOptions): Elysia;
|
|
185
|
+
//#endregion
|
|
186
|
+
//#region src/docs.d.ts
|
|
187
|
+
interface ReferenceOptions {
|
|
188
|
+
path?: string;
|
|
189
|
+
title?: string;
|
|
190
|
+
specUrl?: string;
|
|
191
|
+
}
|
|
192
|
+
/** Renders the Scalar API reference page for the given OpenAPI URL. */
|
|
193
|
+
declare function scalarDocsHTML(specUrl: string, title: string): string;
|
|
194
|
+
/** Standalone Elysia plugin serving GET <path> with the Scalar HTML page. */
|
|
195
|
+
declare function referencePlugin(opts?: ReferenceOptions): Elysia;
|
|
196
|
+
/** Mounts the Scalar reference route onto an existing app. */
|
|
197
|
+
declare function registerReferenceRoute(app: Elysia, opts?: ReferenceOptions): Elysia;
|
|
198
|
+
/** Renders the Swagger UI page. */
|
|
199
|
+
declare function swaggerDocsHTML(specUrl: string, title: string): string;
|
|
200
|
+
//#endregion
|
|
201
|
+
//#region src/compiler/emit.d.ts
|
|
202
|
+
/** Emits framework code only. User callbacks remain closures bound separately. */
|
|
203
|
+
declare function emitHandlerFactory(route: RouteIR): string;
|
|
204
|
+
//#endregion
|
|
205
|
+
//#region src/db/index.d.ts
|
|
206
|
+
interface DatabaseConfig<TSchema extends Record<string, unknown> = Record<string, unknown>> extends Omit<SQLiteDatabaseConfig<TSchema>, "client">, Omit<PostgresDatabaseConfig<TSchema>, "client"> {
|
|
207
|
+
client?: SQLiteDatabaseConfig<TSchema>["client"] | PostgresDatabaseConfig<TSchema>["client"];
|
|
208
|
+
/** Database engine. Default: 'sqlite' */
|
|
209
|
+
engine?: "sqlite" | "postgres" | "clickhouse";
|
|
210
|
+
/** Optional service name associated with this database */
|
|
211
|
+
name?: string;
|
|
212
|
+
}
|
|
213
|
+
type BrickDatabase<TSchema extends Record<string, unknown> = Record<string, unknown>> = BunSQLiteDatabase<TSchema> | PostgresDatabase<TSchema>;
|
|
214
|
+
/**
|
|
215
|
+
* Creates a database instance based on the provided configuration.
|
|
216
|
+
* Zero-config: calling `createDatabase()` returns an ultra-fast Bun-native SQLite
|
|
217
|
+
* database in `:memory:` mode wrapped with Drizzle ORM.
|
|
218
|
+
*/
|
|
219
|
+
declare function createDatabase<TSchema extends Record<string, unknown> = Record<string, unknown>>(config?: DatabaseConfig<TSchema>): BunSQLiteDatabase<TSchema> | PostgresDatabase<TSchema>;
|
|
220
|
+
/** Attach a defined database. Schema changes remain the caller's responsibility. */
|
|
221
|
+
declare function attachDatabase<TDb>(service: Service<TDb, any>, database: DatabaseHandle<TDb>): TDb;
|
|
222
|
+
/**
|
|
223
|
+
* Generates an idempotent SQLite CREATE TABLE IF NOT EXISTS definition
|
|
224
|
+
* directly from a Drizzle table schema.
|
|
225
|
+
*/
|
|
226
|
+
declare function generateSQLiteTableDdl(table: any): string;
|
|
227
|
+
/**
|
|
228
|
+
* Generates idempotent secondary index DDL for a Drizzle table.
|
|
229
|
+
* Covers owner scoping, sort columns, and exact-match filters.
|
|
230
|
+
* UNIQUE columns already carry an implicit index — skipped here.
|
|
231
|
+
* FTS/trigram indexes are handled separately by the search layer.
|
|
232
|
+
*/
|
|
233
|
+
declare function generateSQLiteIndexDdl(table: any, opts?: {
|
|
234
|
+
ownerField?: string;
|
|
235
|
+
sortFields?: string[];
|
|
236
|
+
}): string[];
|
|
237
|
+
/**
|
|
238
|
+
* Ensures secondary indexes exist for a resource table.
|
|
239
|
+
* SQLite: B-tree indexes for owner scope + sort + composite hot path.
|
|
240
|
+
* Postgres: same B-trees plus pg_trgm GIN indexes for substring search.
|
|
241
|
+
* Best-effort: failures warn and continue (e.g. read-only replicas).
|
|
242
|
+
*/
|
|
243
|
+
declare function ensureResourceIndexes(db: any, table: any, opts?: {
|
|
244
|
+
ownerField?: string;
|
|
245
|
+
sortFields?: string[];
|
|
246
|
+
searchFields?: string[];
|
|
247
|
+
}): void;
|
|
248
|
+
/**
|
|
249
|
+
* Creates the FTS5 sidecar table + sync triggers + backfills existing rows.
|
|
250
|
+
* Idempotent; safe to call on every resource registration.
|
|
251
|
+
* No-op on Postgres (relies on pg_trgm instead) and when searchCols is empty.
|
|
252
|
+
*/
|
|
253
|
+
declare function ensureSQLiteFts(db: any, table: any, searchCols: string[]): void;
|
|
254
|
+
/**
|
|
255
|
+
* Builds an FTS5 MATCH condition for a resource search term.
|
|
256
|
+
* Returns null when the term has no usable tokens or FTS errors.
|
|
257
|
+
* Caller falls back to LIKE in that case.
|
|
258
|
+
*/
|
|
259
|
+
declare function buildFtsMatchQuery(search: string): string | null;
|
|
260
|
+
/**
|
|
261
|
+
* Explicit SQLite development/test schema preparation helper.
|
|
262
|
+
* Never called by services, resources, auth, or server startup.
|
|
263
|
+
* Not a migration runner; PostgreSQL schema management is caller-owned.
|
|
264
|
+
*/
|
|
265
|
+
declare function syncSchema(tablesOrService: Map<string, any> | any[] | Record<string, any> | Service, dbInstance?: any): Promise<void> | void;
|
|
266
|
+
//#endregion
|
|
267
|
+
//#region src/service.d.ts
|
|
268
|
+
declare class ServiceImpl<TDb = BunSQLiteDatabase<Record<string, unknown>>, TServiceContext extends Record<string, any> = Record<string, any>> implements Service<TDb, TServiceContext> {
|
|
269
|
+
readonly name: string;
|
|
270
|
+
readonly options: ServiceOptions<TServiceContext, TDb>;
|
|
271
|
+
readonly actions: Map<string, Action<any, any, any, any>>;
|
|
272
|
+
readonly tools: Map<string, Tool<any, any, any, any>>;
|
|
273
|
+
readonly tables: Map<string, any>;
|
|
274
|
+
readonly resources: Map<string, Resource<any, BaseContext<TDb> & TServiceContext, {}>>;
|
|
275
|
+
readonly preparations: Map<string, PreparationContribution>;
|
|
276
|
+
private database?;
|
|
277
|
+
private _isBuilt;
|
|
278
|
+
constructor(name: string, options?: ServiceOptions<TServiceContext, TDb>);
|
|
279
|
+
use<A>(plugin: ServicePlugin<this, A>): A;
|
|
280
|
+
get db(): TDb | undefined;
|
|
281
|
+
get isBuilt(): boolean;
|
|
282
|
+
/**
|
|
283
|
+
* Closes declarations after plugins have registered their actions and preparations.
|
|
284
|
+
*/
|
|
285
|
+
build(): this;
|
|
286
|
+
contributePreparation(contribution: PreparationContribution): void;
|
|
287
|
+
listPreparations(): PreparationContribution[];
|
|
288
|
+
prepareContributions(): void;
|
|
289
|
+
registerTable(table: any): this;
|
|
290
|
+
resource: <TTable = any, const TOptions extends ResourceTypeOptions = ResourceTypeOptions>(config: ResourceConfig<TTable, BaseContext<TDb> & TServiceContext> & TOptions & Record<Exclude<keyof TOptions, keyof ResourceConfig>, never>) => Resource<TTable, BaseContext<TDb> & TServiceContext, ResourceIdentity<TTable, TOptions>>;
|
|
291
|
+
getResource(name: string): Resource<any, BaseContext<TDb> & TServiceContext> | undefined;
|
|
292
|
+
listResources(): Resource<any, BaseContext<TDb> & TServiceContext>[];
|
|
293
|
+
action<TIn extends TSchema | undefined = undefined, TOut extends TSchema | undefined = undefined, TErr extends Record<string, ActionErrorDefinition> = Record<string, ActionErrorDefinition>>(action: Action<TIn, TOut, TErr, BaseContext<TDb> & TServiceContext>): this;
|
|
294
|
+
action<TIn extends TSchema | undefined = undefined, TOut extends TSchema | undefined = undefined, TErr extends Record<string, ActionErrorDefinition> = Record<string, ActionErrorDefinition>>(config: ActionConfigWithAuthorize<TIn, TOut, TErr, BaseContext<TDb> & TServiceContext>): Action<TIn, TOut, TErr, BaseContext<TDb> & TServiceContext>;
|
|
295
|
+
action<TIn extends TSchema | undefined = undefined, TOut extends TSchema | undefined = undefined, TErr extends Record<string, ActionErrorDefinition> = Record<string, ActionErrorDefinition>>(config: ActionConfigWithoutAuthorize<TIn, TOut, TErr, BaseContext<TDb> & TServiceContext>): Action<TIn, TOut, TErr, BaseContext<TDb> & TServiceContext>;
|
|
296
|
+
tool<TIn extends TSchema | undefined = undefined, TOut extends TSchema | undefined = undefined, TErr extends Record<string, ActionErrorDefinition> = Record<string, ActionErrorDefinition>>(action: Tool<TIn, TOut, TErr, BaseContext<TDb> & TServiceContext>): this;
|
|
297
|
+
tool<TIn extends TSchema | undefined = undefined, TOut extends TSchema | undefined = undefined, TErr extends Record<string, ActionErrorDefinition> = Record<string, ActionErrorDefinition>>(config: ToolConfigWithAuthorize<TIn, TOut, TErr, BaseContext<TDb> & TServiceContext>): Tool<TIn, TOut, TErr, BaseContext<TDb> & TServiceContext>;
|
|
298
|
+
tool<TIn extends TSchema | undefined = undefined, TOut extends TSchema | undefined = undefined, TErr extends Record<string, ActionErrorDefinition> = Record<string, ActionErrorDefinition>>(config: ToolConfigWithoutAuthorize<TIn, TOut, TErr, BaseContext<TDb> & TServiceContext>): Tool<TIn, TOut, TErr, BaseContext<TDb> & TServiceContext>;
|
|
299
|
+
getTool(name: string): Tool<any, any, any, any> | undefined;
|
|
300
|
+
listTools(): Tool<any, any, any, any>[];
|
|
301
|
+
getAction(name: string): Action<any, any, any, any> | undefined;
|
|
302
|
+
listActions(): Action<any, any, any, any>[];
|
|
303
|
+
getDb(): TDb | undefined;
|
|
304
|
+
setDb(database: DatabaseHandle<TDb>): void;
|
|
305
|
+
getDatabaseHandle(): DatabaseHandle<TDb> | undefined;
|
|
306
|
+
/**
|
|
307
|
+
* Resolves the complete service execution context once per incoming request.
|
|
308
|
+
* Merges framework BaseContext with the service's custom context hook.
|
|
309
|
+
* Always rebuilds context for this service to prevent caller context from overriding.
|
|
310
|
+
*/
|
|
311
|
+
resolveContext(callCtx?: Partial<BaseContext<TDb> & TServiceContext>): Promise<BaseContext<TDb> & TServiceContext>;
|
|
312
|
+
resolveContextEffect(callCtx?: Partial<BaseContext<TDb> & TServiceContext>): Effect.Effect<BaseContext<TDb> & TServiceContext, unknown, any>;
|
|
313
|
+
introspect(): ServiceSchema;
|
|
314
|
+
}
|
|
315
|
+
declare function defineService<TDb = BunSQLiteDatabase<Record<string, unknown>>, TServiceContext extends Record<string, any> = Record<string, any>>(name: string, options?: ServiceOptions<TServiceContext, TDb>): Service<TDb, TServiceContext>;
|
|
316
|
+
//#endregion
|
|
317
|
+
//#region src/access.d.ts
|
|
318
|
+
interface ActionAccessInfo {
|
|
319
|
+
hasAuthorize: boolean;
|
|
320
|
+
hasScope: boolean;
|
|
321
|
+
policy: ActionAccessPolicy;
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* Cross-copy access metadata protocol. CRUD enforces its access policy
|
|
325
|
+
* inside `execute`, so `config.authorize` is absent and introspection
|
|
326
|
+
* can't see it. The plugin stamps each action under this process-global
|
|
327
|
+
* symbol; introspection and OpenAPI read it back. Uses `Symbol.for` so
|
|
328
|
+
* the binding survives a second copy of core (bundler SSR, Vitest),
|
|
329
|
+
* same as the plugin action-binding key.
|
|
330
|
+
*/
|
|
331
|
+
declare const ACTION_ACCESS_KEY: unique symbol;
|
|
332
|
+
declare function setActionAccess(action: object, info: ActionAccessInfo): void;
|
|
333
|
+
declare function getActionAccess(action: Action | object): ActionAccessInfo;
|
|
334
|
+
//#endregion
|
|
335
|
+
//#region src/action.d.ts
|
|
336
|
+
declare function buildErrorHelpers<TErrors extends Record<string, ActionErrorDefinition>>(errorsDef?: TErrors): ErrorBuilder<TErrors>;
|
|
337
|
+
declare function defineAction<TInputSchema extends TSchema | undefined = undefined, TOutputSchema extends TSchema | undefined = undefined, TErrors extends Record<string, ActionErrorDefinition> = Record<string, ActionErrorDefinition>, TContext extends ActionContext = ActionContext>(config: ActionConfigWithAuthorize<TInputSchema, TOutputSchema, TErrors, TContext>): Action<TInputSchema, TOutputSchema, TErrors, TContext>;
|
|
338
|
+
declare function defineAction<TInputSchema extends TSchema | undefined = undefined, TOutputSchema extends TSchema | undefined = undefined, TErrors extends Record<string, ActionErrorDefinition> = Record<string, ActionErrorDefinition>, TContext extends ActionContext = ActionContext>(config: ActionConfigWithoutAuthorize<TInputSchema, TOutputSchema, TErrors, TContext>): Action<TInputSchema, TOutputSchema, TErrors, TContext>;
|
|
339
|
+
//#endregion
|
|
340
|
+
//#region src/rpc.d.ts
|
|
341
|
+
declare function createServiceProxy<T extends Record<string, any>>(serviceName: string, options?: ProxyOptions): T;
|
|
342
|
+
//#endregion
|
|
343
|
+
//#region src/registry.d.ts
|
|
344
|
+
interface ArchitectureApplication {
|
|
345
|
+
services: readonly Service[];
|
|
346
|
+
routes: readonly RouteIR[];
|
|
347
|
+
}
|
|
348
|
+
declare class ServiceRegistry {
|
|
349
|
+
private _revision;
|
|
350
|
+
/** Definition revision for invalidating serialized architecture snapshots. */
|
|
351
|
+
get revision(): number;
|
|
352
|
+
touch(): void;
|
|
353
|
+
private services;
|
|
354
|
+
private routes;
|
|
355
|
+
/** Remember the actual registered routes for subsequent registry exports. */
|
|
356
|
+
setApplicationRoutes(application: ArchitectureApplication): void;
|
|
357
|
+
register(service: Service): void;
|
|
358
|
+
get(name: string): Service | undefined;
|
|
359
|
+
has(name: string): boolean;
|
|
360
|
+
list(): Service[];
|
|
361
|
+
clear(): void;
|
|
362
|
+
exportArchitecture(application?: ArchitectureApplication): ArchitectureSchema;
|
|
363
|
+
}
|
|
364
|
+
declare function getGlobalRegistry(): ServiceRegistry;
|
|
365
|
+
declare function resetGlobalRegistry(): void;
|
|
366
|
+
//#endregion
|
|
367
|
+
//#region src/typebox.d.ts
|
|
368
|
+
declare function getCompiledCheck<T extends TSchema$1>(schema: T): TypeCheck<T>;
|
|
369
|
+
declare function validateWithSchema<T extends TSchema$1>(schema: T | undefined, value: unknown): {
|
|
370
|
+
success: true;
|
|
371
|
+
data: Static$1<T>;
|
|
372
|
+
} | {
|
|
373
|
+
success: false;
|
|
374
|
+
errors: ValidationErrorItem[];
|
|
375
|
+
};
|
|
376
|
+
//#endregion
|
|
377
|
+
//#region src/openapi.d.ts
|
|
378
|
+
interface OpenApiGeneratorOptions {
|
|
379
|
+
title?: string;
|
|
380
|
+
version?: string;
|
|
381
|
+
description?: string;
|
|
382
|
+
prefix?: string;
|
|
383
|
+
services?: Service<any, any>[];
|
|
384
|
+
registry?: ServiceRegistry;
|
|
385
|
+
}
|
|
386
|
+
declare function generateOpenApiSpec(options?: OpenApiGeneratorOptions): Record<string, any>;
|
|
387
|
+
//#endregion
|
|
388
|
+
//#region src/tool.d.ts
|
|
389
|
+
declare function defineTool<TInputSchema extends TSchema | undefined = undefined, TOutputSchema extends TSchema | undefined = undefined, TErrors extends Record<string, ActionErrorDefinition> = Record<string, ActionErrorDefinition>, TContext extends ActionContext = ActionContext>(config: ToolConfigWithAuthorize<TInputSchema, TOutputSchema, TErrors, TContext>): Tool<TInputSchema, TOutputSchema, TErrors, TContext>;
|
|
390
|
+
declare function defineTool<TInputSchema extends TSchema | undefined = undefined, TOutputSchema extends TSchema | undefined = undefined, TErrors extends Record<string, ActionErrorDefinition> = Record<string, ActionErrorDefinition>, TContext extends ActionContext = ActionContext>(config: ToolConfigWithoutAuthorize<TInputSchema, TOutputSchema, TErrors, TContext>): Tool<TInputSchema, TOutputSchema, TErrors, TContext>;
|
|
391
|
+
declare function isTool(value: unknown): value is Tool<any, any, any, any>;
|
|
392
|
+
//#endregion
|
|
393
|
+
//#region src/mcp.d.ts
|
|
394
|
+
interface McpToolDefinition {
|
|
395
|
+
name: string;
|
|
396
|
+
title?: string;
|
|
397
|
+
description: string;
|
|
398
|
+
inputSchema: unknown;
|
|
399
|
+
annotations: ToolAnnotations;
|
|
400
|
+
}
|
|
401
|
+
interface McpRegistryOptions {
|
|
402
|
+
services?: readonly Pick<Service<any, any>, "listTools">[];
|
|
403
|
+
tools?: readonly Tool<any, any, any, any>[];
|
|
404
|
+
}
|
|
405
|
+
interface McpRegistry {
|
|
406
|
+
listTools(): McpToolDefinition[];
|
|
407
|
+
callTool(name: string, args?: Record<string, unknown>, ctx?: Partial<ActionContext>): Promise<unknown>;
|
|
408
|
+
}
|
|
409
|
+
declare class UnknownToolError extends Error {
|
|
410
|
+
constructor(name: string);
|
|
411
|
+
}
|
|
412
|
+
/** Collect only explicitly defined tools, without exposing ordinary actions. */
|
|
413
|
+
declare function createMcpRegistry(options: McpRegistryOptions): McpRegistry;
|
|
414
|
+
interface McpHandlerOptions {
|
|
415
|
+
registry: McpRegistry;
|
|
416
|
+
serverInfo: {
|
|
417
|
+
name: string;
|
|
418
|
+
version: string;
|
|
419
|
+
title?: string;
|
|
420
|
+
};
|
|
421
|
+
/** Versions supported by this transport, newest first. */
|
|
422
|
+
protocolVersions?: readonly string[];
|
|
423
|
+
}
|
|
424
|
+
/** Stateless MCP JSON-RPC POST handler. Wrap with the app's authentication. */
|
|
425
|
+
declare function createMcpHandler(options: McpHandlerOptions): (request: Request, ctx?: Partial<ActionContext>) => Promise<Response>;
|
|
426
|
+
//#endregion
|
|
427
|
+
//#region src/error-response.d.ts
|
|
428
|
+
interface ErrorEnvelope {
|
|
429
|
+
name: string;
|
|
430
|
+
code: string;
|
|
431
|
+
message: string;
|
|
432
|
+
status: number;
|
|
433
|
+
requestId: string;
|
|
434
|
+
details?: unknown;
|
|
435
|
+
errors?: ValidationError["errors"];
|
|
436
|
+
}
|
|
437
|
+
type ErrorContext = {
|
|
438
|
+
logger: Pick<Logger, "error">;
|
|
439
|
+
requestId: string;
|
|
440
|
+
};
|
|
441
|
+
declare function toErrorResponse(err: unknown, context: ErrorContext): ErrorEnvelope;
|
|
442
|
+
//#endregion
|
|
443
|
+
//#region src/compiler/runtime.d.ts
|
|
444
|
+
type CompiledHandler = (context: any) => unknown | Promise<unknown>;
|
|
445
|
+
type HandlerFactory = (binding: CompiledRoutePlan, runtime: typeof compilerRuntime) => CompiledHandler;
|
|
446
|
+
/** Retains Brick's existing source precedence and treatment of empty bodies. */
|
|
447
|
+
declare function mergeInput(first: any, second: any, third: any): any;
|
|
448
|
+
declare function checkDepth(value: unknown, action: string): void;
|
|
449
|
+
declare function validate(check: NonNullable<CompiledRoutePlan["inputChecker"]>, value: unknown, action: string, stage: "input" | "output"): void;
|
|
450
|
+
declare function mapError(err: unknown, set: any, options: {
|
|
451
|
+
logger: Logger;
|
|
452
|
+
requestId: string;
|
|
453
|
+
}): ErrorEnvelope;
|
|
454
|
+
declare const compilerRuntime: Readonly<{
|
|
455
|
+
emptyServices: Readonly<{}>;
|
|
456
|
+
defaultRequest: Request;
|
|
457
|
+
nextSequence: () => string;
|
|
458
|
+
mergeInput: typeof mergeInput;
|
|
459
|
+
checkDepth: typeof checkDepth;
|
|
460
|
+
validate: typeof validate;
|
|
461
|
+
mapError: typeof mapError;
|
|
462
|
+
isThenable: (value: any) => boolean;
|
|
463
|
+
deny: (action: string, user: unknown) => never;
|
|
464
|
+
}>;
|
|
465
|
+
//#endregion
|
|
466
|
+
//#region src/compiler.d.ts
|
|
467
|
+
type ApplicationBinder = (services: Service<any, any>[]) => CompiledApplication;
|
|
468
|
+
/** Build artifact bootstrap: bind generated handlers while evaluating the original app. */
|
|
469
|
+
declare function loadCompiledBrickApp(load: () => Promise<{
|
|
470
|
+
default: unknown;
|
|
471
|
+
}>, ir: BrickIR, bind: ApplicationBinder): Promise<BrickApp>;
|
|
472
|
+
interface CompiledRoute {
|
|
473
|
+
readonly ir: RouteIR;
|
|
474
|
+
readonly handler: CompiledHandler;
|
|
475
|
+
}
|
|
476
|
+
interface CompiledApplication {
|
|
477
|
+
readonly ir: BrickIR;
|
|
478
|
+
readonly routes: readonly CompiledRoute[];
|
|
479
|
+
}
|
|
480
|
+
/** Startup compiler: analyzes once, then binds live callbacks. */
|
|
481
|
+
declare function compileBrickApplication(options: {
|
|
482
|
+
services: Service<any, any>[];
|
|
483
|
+
prefix?: string;
|
|
484
|
+
mode?: "specialized" | "generic";
|
|
485
|
+
}): CompiledApplication;
|
|
486
|
+
/** Build artifact binder: consumes emitted functions, with no runtime handler code generation. */
|
|
487
|
+
declare function bindCompiledApplication(ir: BrickIR, services: Service<any, any>[], factories: readonly HandlerFactory[]): CompiledApplication;
|
|
488
|
+
//#endregion
|
|
489
|
+
//#region src/server.d.ts
|
|
490
|
+
interface CreateServerOptions {
|
|
491
|
+
port?: number;
|
|
492
|
+
/** Generate specialized handlers once at startup (default true). */
|
|
493
|
+
compiler?: boolean;
|
|
494
|
+
/** Ahead-of-time handlers already bound to the supplied services. */
|
|
495
|
+
compilation?: CompiledApplication;
|
|
496
|
+
services?: Service<any, any>[];
|
|
497
|
+
prefix?: string;
|
|
498
|
+
title?: string;
|
|
499
|
+
version?: string;
|
|
500
|
+
description?: string;
|
|
501
|
+
docs?: boolean;
|
|
502
|
+
openApiPath?: string;
|
|
503
|
+
docsPath?: string;
|
|
504
|
+
swaggerPath?: string;
|
|
505
|
+
requestLogging?: boolean | RequestLoggingOptions;
|
|
506
|
+
reference?: boolean | ReferenceOptions;
|
|
507
|
+
secrets?: {
|
|
508
|
+
source?: SecretSource;
|
|
509
|
+
validate?: boolean;
|
|
510
|
+
};
|
|
511
|
+
/** Raw endpoints (outside the JSON action mesh), mounted at startup. */
|
|
512
|
+
endpoints?: EndpointDefinition[];
|
|
513
|
+
}
|
|
514
|
+
declare function brick(options?: CreateServerOptions): BrickApp;
|
|
515
|
+
//#endregion
|
|
516
|
+
//#region src/effect-server.d.ts
|
|
517
|
+
type EffectEndpointDefinition<R = never> = Omit<EndpointDefinition, "handler"> & {
|
|
518
|
+
handler: (ctx: EndpointContext) => Effect.Effect<unknown, unknown, R>;
|
|
519
|
+
};
|
|
520
|
+
type EffectServerOptions<R = never, E = never> = Omit<CreateServerOptions, "endpoints"> & {
|
|
521
|
+
layer?: Layer.Layer<R, E>;
|
|
522
|
+
endpoints?: EffectEndpointDefinition<R>[];
|
|
523
|
+
};
|
|
524
|
+
type EffectBrickApp = BrickApp & {
|
|
525
|
+
endpoint(definition: EffectEndpointDefinition<any>): void;
|
|
526
|
+
initialize(): Promise<void>;
|
|
527
|
+
dispose(): Promise<void>;
|
|
528
|
+
initializeEffect: Effect.Effect<void, unknown>;
|
|
529
|
+
disposeEffect: Effect.Effect<void, unknown>;
|
|
530
|
+
handleEffect(request: Request): Effect.Effect<Response, unknown>;
|
|
531
|
+
listenEffect(port: number): Effect.Effect<EffectBrickApp, unknown>;
|
|
532
|
+
};
|
|
533
|
+
/** One runtime owns the dependency layer across every service and transport. */
|
|
534
|
+
declare function effectBrick<R = never, E = never>(options?: EffectServerOptions<R, E>): EffectBrickApp;
|
|
535
|
+
//#endregion
|
|
536
|
+
//#region src/effect-runtime.d.ts
|
|
537
|
+
/** The HTTP and Promise boundary preserves original failures and shares the app runtime. */
|
|
538
|
+
declare function runEffectPromise<A, E, R>(effect: Effect.Effect<A, E, R>, owner?: object, signal?: AbortSignal): Promise<A>;
|
|
539
|
+
//#endregion
|
|
540
|
+
//#region src/effect-rpc.d.ts
|
|
541
|
+
type NativeProxy<T, R> = { [K in keyof T]: T[K] extends ((...args: infer A) => infer O) ? (...args: A) => O extends Effect.Effect<any, any, any> ? O : Effect.Effect<Awaited<O>, unknown, R> : never; };
|
|
542
|
+
/** Local dispatch stays in the caller's Effect environment and scope. */
|
|
543
|
+
declare function createEffectServiceProxy<T extends Record<string, any>, R = never>(serviceName: string, options?: ProxyOptions): NativeProxy<T, R>;
|
|
544
|
+
interface EffectMcpRegistry<R = never> extends McpRegistry {
|
|
545
|
+
callToolEffect(name: string, args?: Record<string, unknown>, ctx?: Partial<ActionContext>): Effect.Effect<unknown, unknown, R>;
|
|
546
|
+
}
|
|
547
|
+
/** Native tool calls compose directly; the existing MCP Promise interface remains available. */
|
|
548
|
+
declare function createEffectMcpRegistry<R = never>(options: McpRegistryOptions): EffectMcpRegistry<R>;
|
|
549
|
+
//#endregion
|
|
550
|
+
//#region src/effect.d.ts
|
|
551
|
+
type NativeConfig<C extends {
|
|
552
|
+
execute: (...args: any[]) => any;
|
|
553
|
+
}, E, R> = Omit<C, "execute" | "authorize"> & {
|
|
554
|
+
execute: (params: Parameters<C["execute"]>[0]) => Effect.Effect<Awaited<ReturnType<C["execute"]>>, E, R>;
|
|
555
|
+
};
|
|
556
|
+
type EffectActionConfigWithAuthorize<I extends TSchema | undefined, O extends TSchema | undefined, Errors extends Record<string, ActionErrorDefinition>, C extends ActionContext, E = never, R = never> = NativeConfig<ActionConfigWithAuthorize<I, O, Errors, C>, E, R> & {
|
|
557
|
+
authorize: (params: Parameters<ActionConfigWithAuthorize<I, O, Errors, C>["authorize"]>[0]) => Effect.Effect<boolean, E, R> | boolean | Promise<boolean>;
|
|
558
|
+
};
|
|
559
|
+
type EffectActionConfigWithoutAuthorize<I extends TSchema | undefined, O extends TSchema | undefined, Errors extends Record<string, ActionErrorDefinition>, C extends ActionContext, E = never, R = never> = NativeConfig<ActionConfigWithoutAuthorize<I, O, Errors, C>, E, R> & {
|
|
560
|
+
authorize?: undefined;
|
|
561
|
+
};
|
|
562
|
+
type EffectAction<I extends TSchema | undefined, O extends TSchema | undefined, Errors extends Record<string, ActionErrorDefinition>, C extends ActionContext, E = never, R = never> = Action<I, O, Errors, C> & {
|
|
563
|
+
executeEffect: (params: Parameters<Action<I, O, Errors, C>["execute"]>[0]) => Effect.Effect<Awaited<ReturnType<Action<I, O, Errors, C>["execute"]>>, E | ActionExecutionError | ValidationError | Error, R>;
|
|
564
|
+
};
|
|
565
|
+
type EffectTool<I extends TSchema | undefined, O extends TSchema | undefined, Errors extends Record<string, ActionErrorDefinition>, C extends ActionContext, E = never, R = never> = EffectAction<I, O, Errors, C, E, R> & Tool<I, O, Errors, C>;
|
|
566
|
+
/** Normalize native callbacks once; compiled and interpreted transports share them. */
|
|
567
|
+
declare function adaptEffectActionConfig(config: any, owner?: object): any;
|
|
568
|
+
declare function defineEffectAction<I extends TSchema | undefined = undefined, O extends TSchema | undefined = undefined, Errors extends Record<string, ActionErrorDefinition> = Record<string, ActionErrorDefinition>, C extends ActionContext = ActionContext, E = never, R = never>(config: EffectActionConfigWithAuthorize<I, O, Errors, C, E, R>): EffectAction<I, O, Errors, C, E, R>;
|
|
569
|
+
declare function defineEffectAction<I extends TSchema | undefined = undefined, O extends TSchema | undefined = undefined, Errors extends Record<string, ActionErrorDefinition> = Record<string, ActionErrorDefinition>, C extends ActionContext = ActionContext, E = never, R = never>(config: EffectActionConfigWithoutAuthorize<I, O, Errors, C, E, R>): EffectAction<I, O, Errors, C, E, R>;
|
|
570
|
+
declare function defineEffectTool<I extends TSchema | undefined = undefined, O extends TSchema | undefined = undefined, Errors extends Record<string, ActionErrorDefinition> = Record<string, ActionErrorDefinition>, C extends ActionContext = ActionContext, E = never, R = never>(config: EffectActionConfigWithAuthorize<I, O, Errors, C, E, R> & ToolOptions): EffectTool<I, O, Errors, C, E, R>;
|
|
571
|
+
declare function defineEffectTool<I extends TSchema | undefined = undefined, O extends TSchema | undefined = undefined, Errors extends Record<string, ActionErrorDefinition> = Record<string, ActionErrorDefinition>, C extends ActionContext = ActionContext, E = never, R = never>(config: EffectActionConfigWithoutAuthorize<I, O, Errors, C, E, R> & ToolOptions): EffectTool<I, O, Errors, C, E, R>;
|
|
572
|
+
//#endregion
|
|
573
|
+
export { ServiceImpl as $, endpointPaths as $t, McpToolDefinition as A, or as At, Type as B, RequestLoggingOptions as Bt, HandlerFactory as C, isNull as Ct, McpHandlerOptions as D, ne as Dt, toErrorResponse as E, lte as Et, isTool as F, ReferenceOptions as Ft, resetGlobalRegistry as G, createActionHandler as Gt, validateWithSchema as H, isBrickApp as Ht, OpenApiGeneratorOptions as I, referencePlugin as It, defineAction as J, EndpointContext as Jt, createServiceProxy as K, executeCompiledRoute as Kt, generateOpenApiSpec as L, registerReferenceRoute as Lt, createMcpHandler as M, sql$1 as Mt, createMcpRegistry as N, syncSchema as Nt, McpRegistry as O, not as Ot, defineTool as P, emitHandlerFactory as Pt, setActionAccess as Q, createEndpointHandler as Qt, Static$1 as R, scalarDocsHTML as Rt, CompiledHandler as S, isNotNull as St, ErrorEnvelope as T, lt as Tt, ServiceRegistry as U, requireBrickApp as Ut, getCompiledCheck as V, requestLoggingPlugin as Vt, getGlobalRegistry as W, compileRoutePlan as Wt, ActionAccessInfo as X, EndpointLogger as Xt, ACTION_ACCESS_KEY as Y, EndpointDefinition as Yt, getActionAccess as Z, EndpointMethod as Zt, CompiledApplication as _, gt as _t, adaptEffectActionConfig as a, defineEffectResourcePlugin as an, asc as at, compileBrickApplication as b, inArray as bt, EffectMcpRegistry as c, EffectService as cn, createDatabase as ct, runEffectPromise as d, ensureSQLiteFts as dt, resolveEndpointDb as en, defineService as et, EffectBrickApp as f, eq as ft, brick as g, getTableName$1 as gt, CreateServerOptions as h, getTableColumns$1 as ht, EffectTool as i, RouteMethod as in, and as it, UnknownToolError as j, relations as jt, McpRegistryOptions as k, notInArray as kt, createEffectMcpRegistry as l, EffectServiceOptions as ln, desc as lt, effectBrick as m, generateSQLiteTableDdl as mt, EffectActionConfigWithAuthorize as n, BrickIR as nn, DatabaseConfig as nt, defineEffectAction as o, defineEffectServicePlugin as on, attachDatabase as ot, EffectServerOptions as p, generateSQLiteIndexDdl as pt, buildErrorHelpers as q, BrickApp as qt, EffectActionConfigWithoutAuthorize as r, RouteIR as rn, Table$1 as rt, defineEffectTool as s, defineResource as sn, buildFtsMatchQuery as st, EffectAction as t, toOpenApiPath as tn, BrickDatabase as tt, createEffectServiceProxy as u, defineEffectService as un, ensureResourceIndexes as ut, CompiledRoute as v, gte as vt, compilerRuntime as w, like as wt, loadCompiledBrickApp as x, is as xt, bindCompiledApplication as y, ilike as yt, TSchema$1 as z, swaggerDocsHTML as zt };
|
|
574
|
+
//# sourceMappingURL=effect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"effect.d.ts","names":["TSchema","Static","_$__0.ErrorEnvelope","_$__endpoints0.BrickApp"],"sources":["../../src/effect-service.ts","../../src/resource.ts","../../src/effect-plugin.ts","../../src/compiler/ir.ts","../../src/endpoints.ts","../../src/action-handler.ts","../../src/app-entry.ts","../../src/request-logger.ts","../../src/docs.ts","../../src/compiler/emit.ts","../../src/db/index.ts","../../src/service.ts","../../src/access.ts","../../src/action.ts","../../src/rpc.ts","../../src/registry.ts","../../src/typebox.ts","../../src/openapi.ts","../../src/tool.ts","../../src/mcp.ts","../../src/error-response.ts","../../src/compiler/runtime.ts","../../src/compiler.ts","../../src/server.ts","../../src/effect-server.ts","../../src/effect-runtime.ts","../../src/effect-rpc.ts","../../src/effect.ts"],"mappings":";;;;;;;KA4BK,mBAAmB,UAAU,kBAAkB;GAEhD,UAAU,iCACV,UAAU,iCACV,eAAe,eAAe,yBAAyB,eAErD,wBAEF,WACA,WAEA,QAAQ,gCAAgC,GAAG,GAAG,QAAQ,GAAG,GAAG,KAC3D,aAAa,GAAG,GAAG,QAAQ,GAAG,GAAG,IAAI;GAEtC,UAAU,iCACV,UAAU,iCACV,eAAe,eAAe,yBAAyB,eAErD,wBAEF,WACA,WAEA,QAAQ,m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