@inkeep/agents-core 0.48.1 → 0.48.3

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.
@@ -0,0 +1,40 @@
1
+ import { getLogger } from "./logger.js";
2
+
3
+ //#region src/utils/wait-until.ts
4
+ const logger = getLogger("wait-until");
5
+ let _importPromise;
6
+ /**
7
+ * Lazy-load and cache Vercel's `waitUntil` function.
8
+ *
9
+ * - On Vercel (`process.env.VERCEL` set): dynamically imports `@vercel/functions`
10
+ * and returns `waitUntil`, which extends the serverless function lifetime
11
+ * past the HTTP response so background work can complete.
12
+ * - Outside Vercel: returns `undefined`. Callers should let the promise
13
+ * execute naturally via the Node.js event loop (fire-and-forget with
14
+ * error handling).
15
+ * - Import failure: logs a warning and returns `undefined` (graceful degradation).
16
+ * - Result is cached after first call (lazy singleton). Concurrent callers
17
+ * share the same import promise to avoid duplicate imports.
18
+ */
19
+ async function getWaitUntil() {
20
+ if (_importPromise) return _importPromise;
21
+ _importPromise = (async () => {
22
+ if (!process.env.VERCEL) return void 0;
23
+ try {
24
+ return (await import("@vercel/functions")).waitUntil;
25
+ } catch (e) {
26
+ logger.warn({ error: e }, "Failed to import @vercel/functions, waitUntil unavailable");
27
+ return;
28
+ }
29
+ })();
30
+ return _importPromise;
31
+ }
32
+ /**
33
+ * Reset internal cache. Exposed only for testing.
34
+ */
35
+ function _resetWaitUntilCache() {
36
+ _importPromise = void 0;
37
+ }
38
+
39
+ //#endregion
40
+ export { _resetWaitUntilCache, getWaitUntil };
@@ -32,8 +32,8 @@ declare const BranchNameParamsSchema: z.ZodObject<{
32
32
  }, z.core.$strip>;
33
33
  declare const ResolvedRefSchema: z.ZodObject<{
34
34
  type: z.ZodEnum<{
35
- tag: "tag";
36
35
  commit: "commit";
36
+ tag: "tag";
37
37
  branch: "branch";
38
38
  }>;
39
39
  name: z.ZodString;
@@ -1,10 +1,10 @@
1
1
  import { z } from "@hono/zod-openapi";
2
- import * as drizzle_zod0 from "drizzle-zod";
2
+ import * as drizzle_zod361 from "drizzle-zod";
3
3
  import { AnySQLiteTable } from "drizzle-orm/sqlite-core";
4
4
 
5
5
  //#region src/validation/drizzle-schema-helpers.d.ts
6
- declare function createSelectSchemaWithModifiers<T extends AnySQLiteTable>(table: T, overrides?: Partial<Record<keyof T['_']['columns'], (schema: z.ZodTypeAny) => z.ZodTypeAny>>): drizzle_zod0.BuildSchema<"select", T["_"]["columns"], drizzle_zod0.BuildRefine<T["_"]["columns"], undefined>, undefined>;
7
- declare function createInsertSchemaWithModifiers<T extends AnySQLiteTable>(table: T, overrides?: Partial<Record<keyof T['_']['columns'], (schema: z.ZodTypeAny) => z.ZodTypeAny>>): drizzle_zod0.BuildSchema<"insert", T["_"]["columns"], drizzle_zod0.BuildRefine<Pick<T["_"]["columns"], keyof T["$inferInsert"]>, undefined>, undefined>;
6
+ declare function createSelectSchemaWithModifiers<T extends AnySQLiteTable>(table: T, overrides?: Partial<Record<keyof T['_']['columns'], (schema: z.ZodTypeAny) => z.ZodTypeAny>>): drizzle_zod361.BuildSchema<"select", T["_"]["columns"], drizzle_zod361.BuildRefine<T["_"]["columns"], undefined>, undefined>;
7
+ declare function createInsertSchemaWithModifiers<T extends AnySQLiteTable>(table: T, overrides?: Partial<Record<keyof T['_']['columns'], (schema: z.ZodTypeAny) => z.ZodTypeAny>>): drizzle_zod361.BuildSchema<"insert", T["_"]["columns"], drizzle_zod361.BuildRefine<Pick<T["_"]["columns"], keyof T["$inferInsert"]>, undefined>, undefined>;
8
8
  declare const createSelectSchema: typeof createSelectSchemaWithModifiers;
9
9
  declare const createInsertSchema: typeof createInsertSchemaWithModifiers;
10
10
  /**