@hachej/boring-core 0.1.70 → 0.1.72

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.
@@ -1,6 +1,6 @@
1
1
  import * as react from 'react';
2
2
  import { Component, ReactNode, ErrorInfo } from 'react';
3
- import { R as RuntimeConfig, g as CapabilitiesResponse, d as WorkspaceMember, U as User, c as Workspace, M as MemberRole, S as SessionState } from '../types-DVgeIw1d.js';
3
+ import { R as RuntimeConfig, a as CapabilitiesResponse, W as WorkspaceMember, U as User, b as Workspace, M as MemberRole, S as SessionState } from '../types-DDnayJjI.js';
4
4
  export { b as CompanyAdminLabels, c as CompanyAdminProvider, d as CompanyAdminProviderProps, e as CompanyAdminStatus, f as CoreFront, C as CoreFrontAuthPagesOverride, a as CoreFrontCompanyAdminOptions, g as CoreFrontProps, L as LoadCompanyAdminStatus, R as RenderCompanyAdminContent, u as useCompanyAdminStatus } from '../CoreFront-DB1OfNJU.js';
5
5
  import * as _tanstack_react_query from '@tanstack/react-query';
6
6
  import * as better_auth_react from 'better-auth/react';
@@ -1,18 +1,9 @@
1
- import { C as CoreConfig, R as RuntimeConfig } from './types-DVgeIw1d.js';
2
1
  import { FastifyPluginAsync } from 'fastify';
3
2
  import { Auth } from 'better-auth';
4
- import { W as WorkspaceStore, D as Database } from './connection-D9s7Td0I.js';
3
+ import { C as CoreConfig, R as RuntimeConfig } from './types-DDnayJjI.js';
4
+ import { W as WorkspaceStore, D as Database } from './types-Dm11Zm56.js';
5
5
  import { T as TelemetrySink } from './telemetry-DR18MeI0.js';
6
6
 
7
- interface LoadConfigOptions {
8
- tomlPath?: string;
9
- env?: Record<string, string | undefined>;
10
- allowMissingSecrets?: boolean;
11
- }
12
- declare function loadConfig(options?: LoadConfigOptions): Promise<CoreConfig>;
13
- declare function validateConfig(raw: unknown): CoreConfig;
14
- declare function buildRuntimeConfigPayload(config: CoreConfig): RuntimeConfig;
15
-
16
7
  declare function validatePasswordStrength(password: string): {
17
8
  valid: boolean;
18
9
  message?: string;
@@ -38,4 +29,13 @@ declare module 'fastify' {
38
29
  }
39
30
  declare const authHook: FastifyPluginAsync<AuthHookOptions>;
40
31
 
32
+ interface LoadConfigOptions {
33
+ tomlPath?: string;
34
+ env?: Record<string, string | undefined>;
35
+ allowMissingSecrets?: boolean;
36
+ }
37
+ declare function loadConfig(options?: LoadConfigOptions): Promise<CoreConfig>;
38
+ declare function validateConfig(raw: unknown): CoreConfig;
39
+ declare function buildRuntimeConfigPayload(config: CoreConfig): RuntimeConfig;
40
+
41
41
  export { type AuthHookOptions as A, type BetterAuthInstance as B, type CreateAuthOptions as C, type LoadConfigOptions as L, authHook as a, buildRuntimeConfigPayload as b, createAuth as c, validatePasswordStrength as d, loadConfig as l, validateConfig as v };
@@ -1,7 +1,7 @@
1
- import { U as UserStore, W as WorkspaceStore } from '../../connection-D9s7Td0I.js';
2
- export { D as Database, d as createDatabase } from '../../connection-D9s7Td0I.js';
3
- export { F as FinishReservationInput, G as GrantOnceInput, I as InsufficientCreditError, M as MeteringBalance, a as ModelBudgetExceededError, P as PostgresMeteringStore, b as PostgresModelBudgetStore, R as RecordUsageInput, c as RecordUsageResult, d as ReservationFinalStatus, e as ReserveInput, f as ReserveResult, g as RunMigrationsOptions, r as runMigrations } from '../../PostgresModelBudgetStore-CFbEEdQL.js';
4
- import { U as User, c as Workspace, E as ERROR_CODES, M as MemberRole, d as WorkspaceMember, e as WorkspaceInvite, f as WorkspaceRuntime, W as WorkspaceRuntimeResourceSelector, a as WorkspaceRuntimeResource, b as WorkspaceRuntimeResourceInput } from '../../types-DVgeIw1d.js';
1
+ import { U as UserStore, W as WorkspaceStore } from '../../types-Dm11Zm56.js';
2
+ export { D as Database, c as createDatabase } from '../../types-Dm11Zm56.js';
3
+ export { B as BudgetReservationAdmission, a as BudgetReservationAdmissionInput, b as BudgetReservationScope, F as FinishBudgetReservationInput, c as FinishReservationInput, G as GrantOnceInput, I as InsufficientCreditError, M as MeteringBalance, d as ModelBudgetExceededError, P as PostgresBudgetReservationStore, e as PostgresMeteringStore, f as PostgresModelBudgetStore, R as RecordUsageInput, g as RecordUsageResult, h as ReservationFinalStatus, i as ReserveBudgetInput, j as ReserveBudgetResult, k as ReserveInput, l as ReserveResult, m as RunMigrationsOptions, U as UserBudgetExceededError, r as runMigrations } from '../../PostgresModelBudgetStore-DWwh7ElQ.js';
4
+ import { U as User, b as Workspace, E as ERROR_CODES, M as MemberRole, W as WorkspaceMember, c as WorkspaceInvite, d as WorkspaceRuntime, e as WorkspaceRuntimeResourceSelector, f as WorkspaceRuntimeResource, g as WorkspaceRuntimeResourceInput } from '../../types-DDnayJjI.js';
5
5
  import { PostgresJsDatabase } from 'drizzle-orm/postgres-js';
6
6
  import 'postgres';
7
7
 
@@ -3,13 +3,15 @@ import {
3
3
  LocalUserStore,
4
4
  LocalWorkspaceStore,
5
5
  ModelBudgetExceededError,
6
+ PostgresBudgetReservationStore,
6
7
  PostgresMeteringStore,
7
8
  PostgresModelBudgetStore,
8
9
  PostgresUserStore,
9
10
  PostgresWorkspaceStore,
11
+ UserBudgetExceededError,
10
12
  createDatabase,
11
13
  runMigrations
12
- } from "../../chunk-EFM5IWTK.js";
14
+ } from "../../chunk-JBEKMYST.js";
13
15
  import "../../chunk-QZGYKLXB.js";
14
16
  import "../../chunk-MLKGABMK.js";
15
17
  export {
@@ -17,10 +19,12 @@ export {
17
19
  LocalUserStore,
18
20
  LocalWorkspaceStore,
19
21
  ModelBudgetExceededError,
22
+ PostgresBudgetReservationStore,
20
23
  PostgresMeteringStore,
21
24
  PostgresModelBudgetStore,
22
25
  PostgresUserStore,
23
26
  PostgresWorkspaceStore,
27
+ UserBudgetExceededError,
24
28
  createDatabase,
25
29
  runMigrations
26
30
  };
@@ -1,21 +1,69 @@
1
- import { L as LoadConfigOptions } from '../authHook-BUSGTx_o.js';
2
- export { A as AuthHookOptions, B as BetterAuthInstance, C as CreateAuthOptions, a as authHook, b as buildRuntimeConfigPayload, c as createAuth, l as loadConfig, v as validateConfig, d as validatePasswordStrength } from '../authHook-BUSGTx_o.js';
1
+ import { L as LoadConfigOptions } from '../loadConfig-C3iHuZNw.js';
2
+ export { A as AuthHookOptions, B as BetterAuthInstance, C as CreateAuthOptions, a as authHook, b as buildRuntimeConfigPayload, c as createAuth, l as loadConfig, v as validateConfig, d as validatePasswordStrength } from '../loadConfig-C3iHuZNw.js';
3
3
  import { z } from 'zod';
4
- import { C as CoreConfig, M as MemberRole, W as WorkspaceRuntimeResourceSelector, a as WorkspaceRuntimeResource, b as WorkspaceRuntimeResourceInput } from '../types-DVgeIw1d.js';
4
+ import { C as CoreConfig, M as MemberRole, e as WorkspaceRuntimeResourceSelector, f as WorkspaceRuntimeResource, g as WorkspaceRuntimeResourceInput } from '../types-DDnayJjI.js';
5
5
  import * as fastify from 'fastify';
6
- import { FastifyInstance, FastifyPluginAsync, preHandlerHookHandler, FastifyRequest, FastifyReply } from 'fastify';
6
+ import { preHandlerHookHandler, FastifyInstance, FastifyPluginAsync, FastifyRequest, FastifyReply } from 'fastify';
7
7
  import * as http from 'http';
8
8
  import { IncomingMessage } from 'node:http';
9
- import { C as CreateCoreAppOptions, D as Database, U as UserStore, W as WorkspaceStore, a as WorkspaceProvisioner } from '../connection-D9s7Td0I.js';
10
- export { A as AuthProvider, b as CapabilitiesContributor, P as ProvisionContext, c as ProvisionResult, d as createDatabase } from '../connection-D9s7Td0I.js';
9
+ import { W as WorkspaceStore, C as CreateCoreAppOptions, D as Database, U as UserStore, a as WorkspaceProvisioner } from '../types-Dm11Zm56.js';
10
+ export { A as AuthProvider, b as CapabilitiesContributor, P as ProvisionContext, d as ProvisionResult, c as createDatabase } from '../types-Dm11Zm56.js';
11
11
  import postgres from 'postgres';
12
- import { P as PostgresMeteringStore, C as CreditLedgerEntry } from '../PostgresModelBudgetStore-CFbEEdQL.js';
13
- export { F as FinishReservationInput, G as GrantOnceInput, I as InsufficientCreditError, M as MeteringBalance, a as ModelBudgetExceededError, b as PostgresModelBudgetStore, R as RecordUsageInput, c as RecordUsageResult, d as ReservationFinalStatus, e as ReserveInput, f as ReserveResult, r as runMigrations } from '../PostgresModelBudgetStore-CFbEEdQL.js';
12
+ import { e as PostgresMeteringStore, C as CreditLedgerEntry } from '../PostgresModelBudgetStore-DWwh7ElQ.js';
13
+ export { B as BudgetReservationAdmission, a as BudgetReservationAdmissionInput, b as BudgetReservationScope, F as FinishBudgetReservationInput, c as FinishReservationInput, G as GrantOnceInput, I as InsufficientCreditError, M as MeteringBalance, d as ModelBudgetExceededError, P as PostgresBudgetReservationStore, f as PostgresModelBudgetStore, R as RecordUsageInput, g as RecordUsageResult, h as ReservationFinalStatus, i as ReserveBudgetInput, j as ReserveBudgetResult, k as ReserveInput, l as ReserveResult, U as UserBudgetExceededError, r as runMigrations } from '../PostgresModelBudgetStore-DWwh7ElQ.js';
14
14
  import { T as TelemetrySink } from '../telemetry-DR18MeI0.js';
15
15
  import { AgentMeteringSink } from '@hachej/boring-agent/server';
16
16
  import 'better-auth';
17
17
  import 'drizzle-orm/postgres-js';
18
18
 
19
+ interface RenderedEmail {
20
+ to: string;
21
+ subject: string;
22
+ html: string;
23
+ text: string;
24
+ }
25
+ interface MailTransport {
26
+ send(email: RenderedEmail): Promise<{
27
+ id: string;
28
+ }>;
29
+ }
30
+ declare class MailDeliveryError extends Error {
31
+ readonly statusCode?: number;
32
+ constructor(message: string, statusCode?: number);
33
+ }
34
+ type Env = 'production' | 'development' | 'test';
35
+ declare function createMailTransport(url: string, from: string, env?: Env): MailTransport;
36
+
37
+ interface PostSignupUser {
38
+ id: string;
39
+ email: string;
40
+ name: string;
41
+ [key: string]: unknown;
42
+ }
43
+ interface PostSignupHookDeps {
44
+ config: CoreConfig;
45
+ workspaceStore: WorkspaceStore;
46
+ transport: MailTransport | null;
47
+ logger?: {
48
+ warn: (obj: Record<string, unknown>, msg: string) => void;
49
+ };
50
+ }
51
+ declare function createPostSignupHook(deps: PostSignupHookDeps): (user: PostSignupUser & Record<string, unknown>, rawCtx: unknown) => Promise<void>;
52
+
53
+ declare function requireWorkspaceMember(minimumRole?: MemberRole): preHandlerHookHandler;
54
+
55
+ declare function createCoreApp(config: CoreConfig, options?: CreateCoreAppOptions): Promise<FastifyInstance<http.Server<typeof IncomingMessage, typeof http.ServerResponse>, IncomingMessage, http.ServerResponse<IncomingMessage>, fastify.FastifyBaseLogger, fastify.FastifyTypeProviderDefault>>;
56
+
57
+ interface RoutesOptions {
58
+ sql?: postgres.Sql;
59
+ db?: Database;
60
+ userStore: UserStore;
61
+ workspaceStore?: WorkspaceStore;
62
+ }
63
+ declare const registerRoutes: FastifyPluginAsync<RoutesOptions>;
64
+
65
+ declare function withUserSettingsWriteLock<T>(userId: string, appId: string, fn: () => Promise<T>): Promise<T>;
66
+
19
67
  declare const coreConfigSchema: z.ZodObject<{
20
68
  appId: z.ZodString;
21
69
  appName: z.ZodString;
@@ -275,36 +323,6 @@ declare const coreConfigSchema: z.ZodObject<{
275
323
 
276
324
  declare function safeRedirect(url: string, config: CoreConfig): string;
277
325
 
278
- declare function createCoreApp(config: CoreConfig, options?: CreateCoreAppOptions): Promise<FastifyInstance<http.Server<typeof IncomingMessage, typeof http.ServerResponse>, IncomingMessage, http.ServerResponse<IncomingMessage>, fastify.FastifyBaseLogger, fastify.FastifyTypeProviderDefault>>;
279
-
280
- interface RoutesOptions {
281
- sql?: postgres.Sql;
282
- db?: Database;
283
- userStore: UserStore;
284
- workspaceStore?: WorkspaceStore;
285
- }
286
- declare const registerRoutes: FastifyPluginAsync<RoutesOptions>;
287
-
288
- declare function withUserSettingsWriteLock<T>(userId: string, appId: string, fn: () => Promise<T>): Promise<T>;
289
-
290
- interface RenderedEmail {
291
- to: string;
292
- subject: string;
293
- html: string;
294
- text: string;
295
- }
296
- interface MailTransport {
297
- send(email: RenderedEmail): Promise<{
298
- id: string;
299
- }>;
300
- }
301
- declare class MailDeliveryError extends Error {
302
- readonly statusCode?: number;
303
- constructor(message: string, statusCode?: number);
304
- }
305
- type Env = 'production' | 'development' | 'test';
306
- declare function createMailTransport(url: string, from: string, env?: Env): MailTransport;
307
-
308
326
  interface VerifyEmailData {
309
327
  to: string;
310
328
  verifyUrl: string;
@@ -349,24 +367,6 @@ interface RunCoreMigrationsFromEnvOptions {
349
367
  }
350
368
  declare function runCoreMigrationsFromEnv(options?: RunCoreMigrationsFromEnvOptions): Promise<void>;
351
369
 
352
- interface PostSignupUser {
353
- id: string;
354
- email: string;
355
- name: string;
356
- [key: string]: unknown;
357
- }
358
- interface PostSignupHookDeps {
359
- config: CoreConfig;
360
- workspaceStore: WorkspaceStore;
361
- transport: MailTransport | null;
362
- logger?: {
363
- warn: (obj: Record<string, unknown>, msg: string) => void;
364
- };
365
- }
366
- declare function createPostSignupHook(deps: PostSignupHookDeps): (user: PostSignupUser & Record<string, unknown>, rawCtx: unknown) => Promise<void>;
367
-
368
- declare function requireWorkspaceMember(minimumRole?: MemberRole): preHandlerHookHandler;
369
-
370
370
  declare const registerWorkspaceRoutes: FastifyPluginAsync;
371
371
 
372
372
  declare const registerMemberRoutes: FastifyPluginAsync;
@@ -25,15 +25,17 @@ import {
25
25
  validateConfig,
26
26
  validatePasswordStrength,
27
27
  withUserSettingsWriteLock
28
- } from "../chunk-CIRY3ZLU.js";
28
+ } from "../chunk-DSENO5O4.js";
29
29
  import {
30
30
  InsufficientCreditError,
31
31
  ModelBudgetExceededError,
32
+ PostgresBudgetReservationStore,
32
33
  PostgresMeteringStore,
33
34
  PostgresModelBudgetStore,
35
+ UserBudgetExceededError,
34
36
  createDatabase,
35
37
  runMigrations
36
- } from "../chunk-EFM5IWTK.js";
38
+ } from "../chunk-JBEKMYST.js";
37
39
  import {
38
40
  noopTelemetry,
39
41
  safeCapture
@@ -1598,9 +1600,11 @@ export {
1598
1600
  InsufficientCreditError,
1599
1601
  MailDeliveryError,
1600
1602
  ModelBudgetExceededError,
1603
+ PostgresBudgetReservationStore,
1601
1604
  PostgresMeteringStore,
1602
1605
  PostgresModelBudgetStore,
1603
1606
  SIGNUP_GRANT_REASON,
1607
+ UserBudgetExceededError,
1604
1608
  WorkspaceRuntimeSandboxHandleStore,
1605
1609
  authHook,
1606
1610
  buildCheckoutRequestBody,
@@ -1,5 +1,5 @@
1
- import { U as User, C as CoreConfig, R as RuntimeConfig } from '../types-DVgeIw1d.js';
2
- export { g as CapabilitiesResponse, h as ConfigFetchError, i as ConfigValidationError, j as CoreCapabilities, E as ERROR_CODES, k as ErrorCode, H as HttpError, J as JsonValue, M as MemberRole, l as RateLimitEndpointOverride, m as SessionPayload, S as SessionState, c as Workspace, e as WorkspaceInvite, d as WorkspaceMember, f as WorkspaceRuntime } from '../types-DVgeIw1d.js';
1
+ import { U as User, C as CoreConfig, R as RuntimeConfig } from '../types-DDnayJjI.js';
2
+ export { a as CapabilitiesResponse, h as ConfigFetchError, i as ConfigValidationError, j as CoreCapabilities, E as ERROR_CODES, k as ErrorCode, H as HttpError, J as JsonValue, M as MemberRole, l as RateLimitEndpointOverride, m as SessionPayload, S as SessionState, b as Workspace, c as WorkspaceInvite, W as WorkspaceMember, d as WorkspaceRuntime } from '../types-DDnayJjI.js';
3
3
  export { a as TelemetryEvent, T as TelemetrySink, n as noopTelemetry, s as safeCapture } from '../telemetry-DR18MeI0.js';
4
4
 
5
5
  declare function isCoreEmailVerificationEnabled(config: Pick<CoreConfig, 'auth'>): boolean;
@@ -277,4 +277,4 @@ type CapabilitiesResponse = {
277
277
  [contributorName: string]: JsonValue | CoreCapabilities | undefined;
278
278
  };
279
279
 
280
- export { type CoreConfig as C, ERROR_CODES as E, HttpError as H, type JsonValue as J, type MemberRole as M, type RuntimeConfig as R, type SessionState as S, type User as U, type WorkspaceRuntimeResourceSelector as W, type WorkspaceRuntimeResource as a, type WorkspaceRuntimeResourceInput as b, type Workspace as c, type WorkspaceMember as d, type WorkspaceInvite as e, type WorkspaceRuntime as f, type CapabilitiesResponse as g, ConfigFetchError as h, ConfigValidationError as i, type CoreCapabilities as j, type ErrorCode as k, type RateLimitEndpointOverride as l, type SessionPayload as m };
280
+ export { type CoreConfig as C, ERROR_CODES as E, HttpError as H, type JsonValue as J, type MemberRole as M, type RuntimeConfig as R, type SessionState as S, type User as U, type WorkspaceMember as W, type CapabilitiesResponse as a, type Workspace as b, type WorkspaceInvite as c, type WorkspaceRuntime as d, type WorkspaceRuntimeResourceSelector as e, type WorkspaceRuntimeResource as f, type WorkspaceRuntimeResourceInput as g, ConfigFetchError as h, ConfigValidationError as i, type CoreCapabilities as j, type ErrorCode as k, type RateLimitEndpointOverride as l, type SessionPayload as m };
@@ -1,6 +1,12 @@
1
- import { C as CoreConfig, c as Workspace, E as ERROR_CODES, M as MemberRole, d as WorkspaceMember, U as User, e as WorkspaceInvite, f as WorkspaceRuntime, W as WorkspaceRuntimeResourceSelector, a as WorkspaceRuntimeResource, b as WorkspaceRuntimeResourceInput, g as CapabilitiesResponse } from './types-DVgeIw1d.js';
2
1
  import { drizzle } from 'drizzle-orm/postgres-js';
3
2
  import postgres from 'postgres';
3
+ import { C as CoreConfig, b as Workspace, E as ERROR_CODES, M as MemberRole, W as WorkspaceMember, U as User, c as WorkspaceInvite, d as WorkspaceRuntime, e as WorkspaceRuntimeResourceSelector, f as WorkspaceRuntimeResource, g as WorkspaceRuntimeResourceInput, a as CapabilitiesResponse } from './types-DDnayJjI.js';
4
+
5
+ type Database = ReturnType<typeof drizzle>;
6
+ declare function createDatabase(config: CoreConfig): {
7
+ db: Database;
8
+ sql: postgres.Sql;
9
+ };
4
10
 
5
11
  interface WorkspaceProvisioner {
6
12
  provision(ctx: ProvisionContext): Promise<ProvisionResult>;
@@ -156,10 +162,4 @@ declare module 'fastify' {
156
162
  }
157
163
  }
158
164
 
159
- type Database = ReturnType<typeof drizzle>;
160
- declare function createDatabase(config: CoreConfig): {
161
- db: Database;
162
- sql: postgres.Sql;
163
- };
164
-
165
- export { type AuthProvider as A, type CreateCoreAppOptions as C, type Database as D, type ProvisionContext as P, type UserStore as U, type WorkspaceStore as W, type WorkspaceProvisioner as a, type CapabilitiesContributor as b, type ProvisionResult as c, createDatabase as d };
165
+ export { type AuthProvider as A, type CreateCoreAppOptions as C, type Database as D, type ProvisionContext as P, type UserStore as U, type WorkspaceStore as W, type WorkspaceProvisioner as a, type CapabilitiesContributor as b, createDatabase as c, type ProvisionResult as d };
@@ -0,0 +1,15 @@
1
+ ALTER TABLE "boring_model_budget_reservations" RENAME TO "boring_budget_reservations";--> statement-breakpoint
2
+ ALTER TABLE "boring_budget_reservations" RENAME CONSTRAINT "boring_model_budget_reservations_amount_check" TO "boring_budget_reservations_amount_check";--> statement-breakpoint
3
+ ALTER TABLE "boring_budget_reservations" RENAME CONSTRAINT "boring_model_budget_reservations_status_check" TO "boring_budget_reservations_status_check";--> statement-breakpoint
4
+ ALTER TABLE "boring_budget_reservations" ADD COLUMN "scope" text DEFAULT 'model' NOT NULL;--> statement-breakpoint
5
+ ALTER TABLE "boring_budget_reservations" ALTER COLUMN "provider" DROP NOT NULL;--> statement-breakpoint
6
+ ALTER TABLE "boring_budget_reservations" ALTER COLUMN "model" DROP NOT NULL;--> statement-breakpoint
7
+ ALTER TABLE "boring_budget_reservations" ADD CONSTRAINT "boring_budget_reservations_scope_check" CHECK ("scope" IN ('model', 'user'));--> statement-breakpoint
8
+ ALTER TABLE "boring_budget_reservations" ADD CONSTRAINT "boring_budget_reservations_scope_shape_check" CHECK (("scope" = 'model' AND "provider" IS NOT NULL AND length(btrim("provider")) > 0 AND "model" IS NOT NULL AND length(btrim("model")) > 0) OR ("scope" = 'user' AND "provider" IS NULL AND "model" IS NULL));--> statement-breakpoint
9
+ DROP INDEX IF EXISTS "boring_model_budget_reservations_active_user_run_idx";--> statement-breakpoint
10
+ DROP INDEX IF EXISTS "boring_model_budget_reservations_budget_idx";--> statement-breakpoint
11
+ DROP INDEX IF EXISTS "boring_model_budget_reservations_stale_idx";--> statement-breakpoint
12
+ CREATE UNIQUE INDEX "boring_budget_reservations_active_user_run_idx" ON "boring_budget_reservations" USING btree ("scope","user_id","run_id") WHERE "boring_budget_reservations"."status" = 'active';--> statement-breakpoint
13
+ CREATE INDEX "boring_budget_reservations_budget_idx" ON "boring_budget_reservations" USING btree ("scope","user_id","provider","model","period","status");--> statement-breakpoint
14
+ CREATE INDEX "boring_budget_reservations_user_budget_idx" ON "boring_budget_reservations" USING btree ("scope","user_id","period","status");--> statement-breakpoint
15
+ CREATE INDEX "boring_budget_reservations_stale_idx" ON "boring_budget_reservations" USING btree ("status","expires_at");
@@ -120,6 +120,13 @@
120
120
  "when": 1783123200000,
121
121
  "tag": "0016_workspace_managed_by",
122
122
  "breakpoints": true
123
+ },
124
+ {
125
+ "idx": 17,
126
+ "version": "7",
127
+ "when": 1783497600000,
128
+ "tag": "0017_user_budget_reservations",
129
+ "breakpoints": true
123
130
  }
124
131
  ]
125
132
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hachej/boring-core",
3
- "version": "0.1.70",
3
+ "version": "0.1.72",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "description": "Foundation package for boring-ui-v2 apps: DB, auth, config, HTTP app factory, and frontend app shell.",
@@ -55,7 +55,7 @@
55
55
  "dependencies": {
56
56
  "@fastify/cors": "^11.0.0",
57
57
  "@fastify/helmet": "^13.0.1",
58
- "@fastify/rate-limit": "^11.0.0",
58
+ "@fastify/rate-limit": "^11.1.0",
59
59
  "@hookform/resolvers": "^5.4.0",
60
60
  "@react-email/components": "^1.0.12",
61
61
  "@react-email/render": "^2.0.9",
@@ -63,14 +63,14 @@
63
63
  "@zxcvbn-ts/core": "^4.1.2",
64
64
  "@zxcvbn-ts/language-common": "^4.1.2",
65
65
  "@zxcvbn-ts/language-en": "^4.1.1",
66
- "better-auth": "^1.6.22",
66
+ "better-auth": "^1.6.23",
67
67
  "close-with-grace": "^2.2.0",
68
68
  "drizzle-orm": "^0.45.2",
69
69
  "fastify": "^5.9.0",
70
70
  "fastify-plugin": "^6.0.0",
71
71
  "isomorphic-dompurify": "^3.18.0",
72
72
  "lucide-react": "^1.21.0",
73
- "nodemailer": "^9.0.1",
73
+ "nodemailer": "^9.0.3",
74
74
  "pino": "^10.3.1",
75
75
  "postgres": "^3.4.9",
76
76
  "posthog-node": "^5.38.5",
@@ -79,9 +79,9 @@
79
79
  "react-router-dom": "^7.18.0",
80
80
  "smol-toml": "^1.7.0",
81
81
  "zod": "^3.25.76",
82
- "@hachej/boring-agent": "0.1.70",
83
- "@hachej/boring-workspace": "0.1.70",
84
- "@hachej/boring-ui-kit": "0.1.70"
82
+ "@hachej/boring-agent": "0.1.72",
83
+ "@hachej/boring-ui-kit": "0.1.72",
84
+ "@hachej/boring-workspace": "0.1.72"
85
85
  },
86
86
  "devDependencies": {
87
87
  "@testing-library/jest-dom": "^6.9.1",