theokit 0.81.0 → 0.83.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 +42 -0
- package/dist/{actions-virtual-module-CA4YEAL3.js → actions-virtual-module-MPSG7MB5.js} +19 -19
- package/dist/{actions-virtual-module-QRTV4NHS.js → actions-virtual-module-TWOP4T6H.js} +2 -2
- package/dist/adapters/agent-mount.js +12 -12
- package/dist/{agent-OM47ZAIN.js → agent-QXJZG6R7.js} +2 -2
- package/dist/{app-typed-client-ZCLFXBEC.js → app-typed-client-BW6M6GM4.js} +21 -21
- package/dist/{app-typed-client-ZCMCBS45.js → app-typed-client-PIJJ6ABV.js} +2 -2
- package/dist/{build-TQAYRHJH.js → build-55ZYADOG.js} +2 -2
- package/dist/{chunk-C5H2JHDW.js → chunk-22WPUW6Q.js} +2 -2
- package/dist/{chunk-C5H2JHDW.js.map → chunk-22WPUW6Q.js.map} +1 -1
- package/dist/{chunk-W55B6BRC.js → chunk-2QOWKVJ6.js} +2 -2
- package/dist/{chunk-2Z3GHQ64.js → chunk-5EZJNG6M.js} +5 -5
- package/dist/{chunk-JUJI3FZM.js → chunk-6NIKAL47.js} +3 -3
- package/dist/{chunk-JUJI3FZM.js.map → chunk-6NIKAL47.js.map} +1 -1
- package/dist/{chunk-APUYC5BE.js → chunk-6QNGLLJX.js} +3 -3
- package/dist/{chunk-TQTEKNOL.js → chunk-AP2E5WHS.js} +1 -5
- package/dist/{chunk-TQTEKNOL.js.map → chunk-AP2E5WHS.js.map} +1 -1
- package/dist/{chunk-MSSUMKFR.js → chunk-BSH3OSJ5.js} +21 -1
- package/dist/chunk-BSH3OSJ5.js.map +1 -0
- package/dist/{chunk-CFJN5JHJ.js → chunk-CIMKVK5O.js} +7 -7
- package/dist/{chunk-YH5CDWLU.js → chunk-CNOCBSTV.js} +22 -1
- package/dist/chunk-CNOCBSTV.js.map +1 -0
- package/dist/{chunk-U3SPBLJF.js → chunk-DIPCJ5VE.js} +1 -5
- package/dist/chunk-DIPCJ5VE.js.map +1 -0
- package/dist/{chunk-JZLNZOEL.js → chunk-F6YBS77T.js} +2 -2
- package/dist/{chunk-KSEPYAMJ.js → chunk-K3MYB4LO.js} +5 -5
- package/dist/{chunk-QKWBT7IY.js → chunk-MDTPLIOU.js} +2 -2
- package/dist/{chunk-ICLIUEST.js → chunk-PH753JOS.js} +34 -10
- package/dist/chunk-PH753JOS.js.map +1 -0
- package/dist/{chunk-QEVTZ3IH.js → chunk-SI2DLU7R.js} +30 -30
- package/dist/{chunk-SHBPXX5E.js → chunk-SI6W733S.js} +3 -3
- package/dist/{chunk-36ZACTF3.js → chunk-TEH6RKDC.js} +7 -15
- package/dist/{chunk-36ZACTF3.js.map → chunk-TEH6RKDC.js.map} +1 -1
- package/dist/{chunk-HWRZUQPE.js → chunk-V3RGGV5P.js} +7 -7
- package/dist/{chunk-LXV5IEBB.js → chunk-WHQN35LA.js} +2 -2
- package/dist/{chunk-AL5JHX7X.js → chunk-YAGGFI7B.js} +61 -13
- package/dist/chunk-YAGGFI7B.js.map +1 -0
- package/dist/{chunk-42TYMRBG.js → chunk-YATQI5XC.js} +46 -32
- package/dist/{chunk-42TYMRBG.js.map → chunk-YATQI5XC.js.map} +1 -1
- package/dist/{chunk-4XZOUS5G.js → chunk-Z7G5F7YF.js} +5 -5
- package/dist/{chunk-7HGZ3CKL.js → chunk-ZSMB75Z2.js} +1 -5
- package/dist/{chunk-7HGZ3CKL.js.map → chunk-ZSMB75Z2.js.map} +1 -1
- package/dist/cli/index.js +6 -6
- package/dist/client/index.js +3 -3
- package/dist/{dev-CDCYJTDM.js → dev-PIB34ZYF.js} +5 -5
- package/dist/{dev-emit-BR6ERY63.js → dev-emit-VCXNCJND.js} +2 -2
- package/dist/{index-BGIX-H9s.d.ts → index-BHUYAnjZ.d.ts} +2 -5
- package/dist/index.js +19 -19
- package/dist/{internal-api-JFA4JI3Z.js → internal-api-EPAFPRDC.js} +31 -31
- package/dist/{internal-api-KQQHFTCG.js → internal-api-SKPCSHTV.js} +2 -2
- package/dist/{job-backend-BRfDfojf.d.ts → job-backend-CPASsVEt.d.ts} +11 -0
- package/dist/{mcp-4OM4QSYT.js → mcp-RFCVZ76T.js} +2 -2
- package/dist/{preview-AAV5CDIH.js → preview-T4BVZIN2.js} +3 -3
- package/dist/server/agent/index.d.ts +7 -2
- package/dist/server/agent/index.js +1 -1
- package/dist/server/auth/index.d.ts +17 -8
- package/dist/server/auth/index.js +5 -3
- package/dist/server/cron/index.js +5 -5
- package/dist/server/http/index.d.ts +2 -2
- package/dist/server/http/index.js +11 -15
- package/dist/server/index.d.ts +8 -15
- package/dist/server/index.js +79 -83
- package/dist/server/index.js.map +1 -1
- package/dist/server/jobs/index.d.ts +28 -3
- package/dist/server/jobs/index.js +10 -8
- package/dist/server/observability/index.d.ts +1 -5
- package/dist/server/observability/index.js +1 -3
- package/dist/server/scan/index.d.ts +1 -3
- package/dist/server/scan/index.js +1 -3
- package/dist/server/storage/index.js +3 -3
- package/dist/server/webhook/index.d.ts +45 -1
- package/dist/server/webhook/index.js +7 -1
- package/dist/{server-boundary-JA3UOKJS.js → server-boundary-5UV5OLUQ.js} +2 -2
- package/dist/{server-boundary-OJ6YIPQT.js → server-boundary-IJTLASGW.js} +19 -19
- package/dist/{start-ZMKPC4TF.js → start-DBGV5FUN.js} +4 -4
- package/dist/testing/index.d.ts +31 -0
- package/dist/testing/index.js +205 -0
- package/dist/testing/index.js.map +1 -0
- package/dist/vite-plugin/index.js +19 -19
- package/dist/{vite-plugin-CK5E4PA5.js → vite-plugin-WW3DFQPT.js} +4 -4
- package/package.json +8 -4
- package/dist/chunk-AL5JHX7X.js.map +0 -1
- package/dist/chunk-ICLIUEST.js.map +0 -1
- package/dist/chunk-MSSUMKFR.js.map +0 -1
- package/dist/chunk-U3SPBLJF.js.map +0 -1
- package/dist/chunk-YH5CDWLU.js.map +0 -1
- /package/dist/{actions-virtual-module-CA4YEAL3.js.map → actions-virtual-module-MPSG7MB5.js.map} +0 -0
- /package/dist/{actions-virtual-module-QRTV4NHS.js.map → actions-virtual-module-TWOP4T6H.js.map} +0 -0
- /package/dist/{agent-OM47ZAIN.js.map → agent-QXJZG6R7.js.map} +0 -0
- /package/dist/{app-typed-client-ZCLFXBEC.js.map → app-typed-client-BW6M6GM4.js.map} +0 -0
- /package/dist/{app-typed-client-ZCMCBS45.js.map → app-typed-client-PIJJ6ABV.js.map} +0 -0
- /package/dist/{build-TQAYRHJH.js.map → build-55ZYADOG.js.map} +0 -0
- /package/dist/{chunk-W55B6BRC.js.map → chunk-2QOWKVJ6.js.map} +0 -0
- /package/dist/{chunk-2Z3GHQ64.js.map → chunk-5EZJNG6M.js.map} +0 -0
- /package/dist/{chunk-APUYC5BE.js.map → chunk-6QNGLLJX.js.map} +0 -0
- /package/dist/{chunk-CFJN5JHJ.js.map → chunk-CIMKVK5O.js.map} +0 -0
- /package/dist/{chunk-JZLNZOEL.js.map → chunk-F6YBS77T.js.map} +0 -0
- /package/dist/{chunk-KSEPYAMJ.js.map → chunk-K3MYB4LO.js.map} +0 -0
- /package/dist/{chunk-QKWBT7IY.js.map → chunk-MDTPLIOU.js.map} +0 -0
- /package/dist/{chunk-QEVTZ3IH.js.map → chunk-SI2DLU7R.js.map} +0 -0
- /package/dist/{chunk-SHBPXX5E.js.map → chunk-SI6W733S.js.map} +0 -0
- /package/dist/{chunk-HWRZUQPE.js.map → chunk-V3RGGV5P.js.map} +0 -0
- /package/dist/{chunk-LXV5IEBB.js.map → chunk-WHQN35LA.js.map} +0 -0
- /package/dist/{chunk-4XZOUS5G.js.map → chunk-Z7G5F7YF.js.map} +0 -0
- /package/dist/{dev-CDCYJTDM.js.map → dev-PIB34ZYF.js.map} +0 -0
- /package/dist/{dev-emit-BR6ERY63.js.map → dev-emit-VCXNCJND.js.map} +0 -0
- /package/dist/{internal-api-JFA4JI3Z.js.map → internal-api-EPAFPRDC.js.map} +0 -0
- /package/dist/{internal-api-KQQHFTCG.js.map → internal-api-SKPCSHTV.js.map} +0 -0
- /package/dist/{mcp-4OM4QSYT.js.map → mcp-RFCVZ76T.js.map} +0 -0
- /package/dist/{preview-AAV5CDIH.js.map → preview-T4BVZIN2.js.map} +0 -0
- /package/dist/{server-boundary-JA3UOKJS.js.map → server-boundary-5UV5OLUQ.js.map} +0 -0
- /package/dist/{server-boundary-OJ6YIPQT.js.map → server-boundary-IJTLASGW.js.map} +0 -0
- /package/dist/{start-ZMKPC4TF.js.map → start-DBGV5FUN.js.map} +0 -0
- /package/dist/{vite-plugin-CK5E4PA5.js.map → vite-plugin-WW3DFQPT.js.map} +0 -0
|
@@ -3,7 +3,7 @@ import './health-route-CYI7z5g3.js';
|
|
|
3
3
|
import { IncomingMessage, ServerResponse } from 'node:http';
|
|
4
4
|
import { P as PluginContext, W as WebOnRequestHook, g as WebPreHandlerHook, h as WebOnResponseHook, i as WebOnErrorHook } from './plugin-types-BUVfUQ0V.js';
|
|
5
5
|
import { P as PluginRunner } from './plugin-runner-BVMOSxvb.js';
|
|
6
|
-
import { J as JobBackend } from './job-backend-
|
|
6
|
+
import { J as JobBackend } from './job-backend-CPASsVEt.js';
|
|
7
7
|
import { S as ServerRouteNode } from './match-DaKsL73w.js';
|
|
8
8
|
import { L as LoadModule } from './module-loader-DCip7NoL.js';
|
|
9
9
|
import { C as CsrfMode, D as DisallowedConfig } from './csrf-Dgot9qSM.js';
|
|
@@ -554,7 +554,6 @@ interface MiddlewareResult {
|
|
|
554
554
|
* path that is not there would turn that into a load error.
|
|
555
555
|
*/
|
|
556
556
|
declare function resolveUserModule(dir: string, base: string): string | undefined;
|
|
557
|
-
declare function _resetMiddlewareCacheForTests(): void;
|
|
558
557
|
/**
|
|
559
558
|
* Run a Web-shaped middleware — the one `middleware()` and `defineMiddleware()` produce (#345).
|
|
560
559
|
*
|
|
@@ -581,8 +580,6 @@ declare function _resetMiddlewareCacheForTests(): void;
|
|
|
581
580
|
declare class MiddlewareNextUnavailableError extends Error {
|
|
582
581
|
constructor();
|
|
583
582
|
}
|
|
584
|
-
/** Test seam: the latch is per-process, and a suite needs to assert the FIRST warning repeatedly. */
|
|
585
|
-
declare function _resetUninvocableWarningsForTests(): void;
|
|
586
583
|
declare function runMiddlewareAndContext(req: IncomingMessage, res: ServerResponse, loadModule: LoadModule, serverDir: string): Promise<MiddlewareResult>;
|
|
587
584
|
/**
|
|
588
585
|
* Run ONLY the application's `server/context.ts` factory and return what it produced.
|
|
@@ -991,4 +988,4 @@ interface OpenApiDocsOptions {
|
|
|
991
988
|
*/
|
|
992
989
|
declare function createOpenApiHandler(opts?: OpenApiDocsOptions): (request: Request) => Response | null;
|
|
993
990
|
|
|
994
|
-
export {
|
|
991
|
+
export { extractTraceIdFromRequest as $, appendCookieToHeaders as A, BATCH_PATH as B, type CookieOptions as C, appendDeleteCookieToHeaders as D, type ExecuteActionOptions as E, FileTooLargeError as F, callProcedure as G, type HandleBatchOptions as H, createCorsHandler as I, createCorsWebHandler as J, createOpenApiHandler as K, createServerContext as L, MAX_ERROR_HTML_BYTES as M, NotFoundError as N, type OpenApiDocsOptions as O, type ParsedBody as P, deleteCookie as Q, type RawRouteInput as R, STRIPPED_HEADERS as S, TRACE_HEADER as T, type UploadedFile as U, envelopeCodeToStatus as V, type W3CTraceContext as W, executeAction as X, executeRoute as Y, executeWebRequest as Z, extractTraceId as _, type BatchExecuteFn as a, extractW3CTraceContext as a0, fromUnknown as a1, getCookie as a2, getCookieFromRequest as a3, handleBatchRequest as a4, handleRequestError as a5, handleWebRequestError as a6, injectModulePreloads as a7, jsonTransformer as a8, loadCustomErrorPages as a9, matchesOrigin as aa, parseCookieHeader as ab, parseRequestBody as ac, parseTraceparent as ad, parseTraceparentContext as ae, resolveTransformer as af, resolveUserModule as ag, runMiddlewareAndContext as ah, sendError as ai, sendJson as aj, serializeCookie as ak, serveStaticFile as al, serverErrorToEnvelope as am, setCookie as an, superjsonTransformer as ao, validateRouteInput as ap, BatchPathConflictError as b, type BatchPayload as c, type BatchRequestItem as d, type BatchResponse as e, type BatchResultItem as f, type BodyParserOptions as g, type CorsConfig as h, type CorsHandler as i, type CorsOrigin as j, type CorsWebHandler as k, type CustomErrorPages as l, type ExecuteRouteContext as m, MiddlewareNextUnavailableError as n, type MiddlewareResult as o, type ProcedureInput as p, ProcedureInputError as q, ProcedureOutputError as r, type RouteInputChannel as s, type RouteInputSchemas as t, type RouteInputValidation as u, type SendErrorInput as v, type SendErrorOptions as w, TRACE_PARENT_HEADER as x, TheoError as y, type TheoTransformer as z };
|
package/dist/index.js
CHANGED
|
@@ -8,34 +8,40 @@ import {
|
|
|
8
8
|
scanRoutes,
|
|
9
9
|
theoConfigSchema,
|
|
10
10
|
theoPlugin
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-SI2DLU7R.js";
|
|
12
12
|
import "./chunk-7NRFZBAL.js";
|
|
13
13
|
import "./chunk-SSYDEKWF.js";
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
14
|
+
import "./chunk-SI6W733S.js";
|
|
15
|
+
import "./chunk-6QNGLLJX.js";
|
|
16
|
+
import "./chunk-Z7G5F7YF.js";
|
|
17
17
|
import "./chunk-OIGJOYX6.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-DIPCJ5VE.js";
|
|
19
|
+
import "./chunk-4Z5XO4O4.js";
|
|
20
|
+
import "./chunk-ZSMB75Z2.js";
|
|
21
|
+
import "./chunk-A6UFN6QQ.js";
|
|
19
22
|
import "./chunk-WSOAN4KN.js";
|
|
20
23
|
import "./chunk-ENSFCKP6.js";
|
|
24
|
+
import "./chunk-DV34VG3N.js";
|
|
21
25
|
import "./chunk-OGLS76RN.js";
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
26
|
+
import "./chunk-V3RGGV5P.js";
|
|
27
|
+
import "./chunk-TEH6RKDC.js";
|
|
28
|
+
import "./chunk-V6Y2SMRG.js";
|
|
24
29
|
import "./chunk-P6OS7652.js";
|
|
25
30
|
import "./chunk-ZDUO4IYN.js";
|
|
26
31
|
import "./chunk-IDWN2OSG.js";
|
|
27
|
-
import "./chunk-
|
|
32
|
+
import "./chunk-AHYOVVJ7.js";
|
|
33
|
+
import "./chunk-SOYOYGWY.js";
|
|
34
|
+
import "./chunk-CNOCBSTV.js";
|
|
35
|
+
import "./chunk-ZWN3AODA.js";
|
|
28
36
|
import "./chunk-NTDN54XO.js";
|
|
29
37
|
import "./chunk-JO462JZM.js";
|
|
30
38
|
import "./chunk-IXXZBZF7.js";
|
|
31
39
|
import "./chunk-AVQU5CQF.js";
|
|
40
|
+
import "./chunk-UMNXCU3K.js";
|
|
41
|
+
import "./chunk-AP2E5WHS.js";
|
|
42
|
+
import "./chunk-CHTAWXC2.js";
|
|
32
43
|
import "./chunk-VSLTKX5L.js";
|
|
33
44
|
import "./chunk-SFGGRC35.js";
|
|
34
|
-
import "./chunk-4Z5XO4O4.js";
|
|
35
|
-
import "./chunk-7HGZ3CKL.js";
|
|
36
|
-
import "./chunk-A6UFN6QQ.js";
|
|
37
|
-
import "./chunk-DV34VG3N.js";
|
|
38
|
-
import "./chunk-V6Y2SMRG.js";
|
|
39
45
|
import "./chunk-ACKBVBUI.js";
|
|
40
46
|
import "./chunk-IZ3TIL6K.js";
|
|
41
47
|
import "./chunk-TRCJHFAX.js";
|
|
@@ -44,12 +50,6 @@ import "./chunk-54BIQFP4.js";
|
|
|
44
50
|
import "./chunk-ZICY2CD7.js";
|
|
45
51
|
import "./chunk-YSJOZEI6.js";
|
|
46
52
|
import "./chunk-Z4PJMZLM.js";
|
|
47
|
-
import "./chunk-UMNXCU3K.js";
|
|
48
|
-
import "./chunk-TQTEKNOL.js";
|
|
49
|
-
import "./chunk-CHTAWXC2.js";
|
|
50
|
-
import "./chunk-AHYOVVJ7.js";
|
|
51
|
-
import "./chunk-SOYOYGWY.js";
|
|
52
|
-
import "./chunk-ZWN3AODA.js";
|
|
53
53
|
import "./chunk-XTHN6JBX.js";
|
|
54
54
|
|
|
55
55
|
// src/config/define-config.ts
|
|
@@ -1,9 +1,24 @@
|
|
|
1
1
|
import {
|
|
2
2
|
dispatchControllerRequest
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SI6W733S.js";
|
|
4
4
|
import {
|
|
5
5
|
mountAgent
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-Z7G5F7YF.js";
|
|
7
|
+
import {
|
|
8
|
+
createViteLoader
|
|
9
|
+
} from "./chunk-4Z5XO4O4.js";
|
|
10
|
+
import {
|
|
11
|
+
ACTION_SCHEMAS_DIR,
|
|
12
|
+
generateManifest,
|
|
13
|
+
matchRoute,
|
|
14
|
+
scanServerActions,
|
|
15
|
+
scanServerActionsEnriched,
|
|
16
|
+
scanServerRoutes,
|
|
17
|
+
scanWebSocketRoutes
|
|
18
|
+
} from "./chunk-ZSMB75Z2.js";
|
|
19
|
+
import {
|
|
20
|
+
scanAgents
|
|
21
|
+
} from "./chunk-A6UFN6QQ.js";
|
|
7
22
|
import {
|
|
8
23
|
CSP_REPORT_PATH,
|
|
9
24
|
CsrfReadinessStore,
|
|
@@ -12,21 +27,26 @@ import {
|
|
|
12
27
|
handleCsrfReadiness
|
|
13
28
|
} from "./chunk-WSOAN4KN.js";
|
|
14
29
|
import "./chunk-ENSFCKP6.js";
|
|
30
|
+
import "./chunk-DV34VG3N.js";
|
|
15
31
|
import {
|
|
16
32
|
BATCH_PATH,
|
|
17
33
|
createCorsHandler,
|
|
18
34
|
executeAction,
|
|
19
35
|
executeRoute,
|
|
20
36
|
handleBatchRequest
|
|
21
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-V3RGGV5P.js";
|
|
22
38
|
import {
|
|
23
39
|
incomingMessageToHandlerRequest,
|
|
24
40
|
sendError
|
|
25
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-TEH6RKDC.js";
|
|
42
|
+
import "./chunk-V6Y2SMRG.js";
|
|
26
43
|
import "./chunk-P6OS7652.js";
|
|
27
44
|
import "./chunk-ZDUO4IYN.js";
|
|
28
45
|
import "./chunk-IDWN2OSG.js";
|
|
29
|
-
import "./chunk-
|
|
46
|
+
import "./chunk-AHYOVVJ7.js";
|
|
47
|
+
import "./chunk-SOYOYGWY.js";
|
|
48
|
+
import "./chunk-CNOCBSTV.js";
|
|
49
|
+
import "./chunk-ZWN3AODA.js";
|
|
30
50
|
import {
|
|
31
51
|
findSuggestion
|
|
32
52
|
} from "./chunk-NTDN54XO.js";
|
|
@@ -36,29 +56,17 @@ import {
|
|
|
36
56
|
extractTraceId
|
|
37
57
|
} from "./chunk-IXXZBZF7.js";
|
|
38
58
|
import "./chunk-AVQU5CQF.js";
|
|
59
|
+
import "./chunk-UMNXCU3K.js";
|
|
60
|
+
import {
|
|
61
|
+
logRequest
|
|
62
|
+
} from "./chunk-AP2E5WHS.js";
|
|
63
|
+
import "./chunk-CHTAWXC2.js";
|
|
39
64
|
import {
|
|
40
65
|
createPluginRunnerFromConfig
|
|
41
66
|
} from "./chunk-VSLTKX5L.js";
|
|
42
67
|
import {
|
|
43
68
|
createRateLimiter
|
|
44
69
|
} from "./chunk-SFGGRC35.js";
|
|
45
|
-
import {
|
|
46
|
-
createViteLoader
|
|
47
|
-
} from "./chunk-4Z5XO4O4.js";
|
|
48
|
-
import {
|
|
49
|
-
ACTION_SCHEMAS_DIR,
|
|
50
|
-
generateManifest,
|
|
51
|
-
matchRoute,
|
|
52
|
-
scanServerActions,
|
|
53
|
-
scanServerActionsEnriched,
|
|
54
|
-
scanServerRoutes,
|
|
55
|
-
scanWebSocketRoutes
|
|
56
|
-
} from "./chunk-7HGZ3CKL.js";
|
|
57
|
-
import {
|
|
58
|
-
scanAgents
|
|
59
|
-
} from "./chunk-A6UFN6QQ.js";
|
|
60
|
-
import "./chunk-DV34VG3N.js";
|
|
61
|
-
import "./chunk-V6Y2SMRG.js";
|
|
62
70
|
import "./chunk-ACKBVBUI.js";
|
|
63
71
|
import "./chunk-IZ3TIL6K.js";
|
|
64
72
|
import {
|
|
@@ -69,14 +77,6 @@ import "./chunk-YSJOZEI6.js";
|
|
|
69
77
|
import {
|
|
70
78
|
generateNonce
|
|
71
79
|
} from "./chunk-Z4PJMZLM.js";
|
|
72
|
-
import "./chunk-UMNXCU3K.js";
|
|
73
|
-
import {
|
|
74
|
-
logRequest
|
|
75
|
-
} from "./chunk-TQTEKNOL.js";
|
|
76
|
-
import "./chunk-CHTAWXC2.js";
|
|
77
|
-
import "./chunk-AHYOVVJ7.js";
|
|
78
|
-
import "./chunk-SOYOYGWY.js";
|
|
79
|
-
import "./chunk-ZWN3AODA.js";
|
|
80
80
|
import "./chunk-XTHN6JBX.js";
|
|
81
81
|
export {
|
|
82
82
|
ACTION_SCHEMAS_DIR,
|
|
@@ -111,4 +111,4 @@ export {
|
|
|
111
111
|
scanWebSocketRoutes,
|
|
112
112
|
sendError
|
|
113
113
|
};
|
|
114
|
-
//# sourceMappingURL=internal-api-
|
|
114
|
+
//# sourceMappingURL=internal-api-EPAFPRDC.js.map
|
|
@@ -16,7 +16,7 @@ import {
|
|
|
16
16
|
handleCspReport,
|
|
17
17
|
handleCsrfReadiness,
|
|
18
18
|
mountAgent
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-BSH3OSJ5.js";
|
|
20
20
|
import {
|
|
21
21
|
resolveProvider
|
|
22
22
|
} from "./chunk-4JRXZTVQ.js";
|
|
@@ -88,4 +88,4 @@ export {
|
|
|
88
88
|
scanWebSocketRoutes,
|
|
89
89
|
sendError
|
|
90
90
|
};
|
|
91
|
-
//# sourceMappingURL=internal-api-
|
|
91
|
+
//# sourceMappingURL=internal-api-SKPCSHTV.js.map
|
|
@@ -110,6 +110,17 @@ interface JobBackend {
|
|
|
110
110
|
enqueueInTransaction?(client: PoolLike, input: JobEnqueueInput): Promise<{
|
|
111
111
|
jobId: string;
|
|
112
112
|
}>;
|
|
113
|
+
/**
|
|
114
|
+
* Optional: remove the job `(name, idempotencyKey)` through `client`, a connection inside the
|
|
115
|
+
* caller's transaction, while no worker ever leased it. Resolves `true` when it removed one and
|
|
116
|
+
* `false` when there was none or a worker has leased it (even with an expired lease) or it
|
|
117
|
+
* failed, because a run may be going on for it (usetheokit/theokit#2118). A backend whose jobs
|
|
118
|
+
* live elsewhere leaves it out, as with `enqueueInTransaction`.
|
|
119
|
+
*/
|
|
120
|
+
cancelInTransaction?(client: PoolLike, input: {
|
|
121
|
+
name: string;
|
|
122
|
+
idempotencyKey: string;
|
|
123
|
+
}): Promise<boolean>;
|
|
113
124
|
/**
|
|
114
125
|
* Optional: resolve when the backend's store answers, reject when it does not. `GET /__theo/ready`
|
|
115
126
|
* calls it under `theokit start` and `theokit dev`, so an unreachable job store answers 503
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import "tsx/esm";
|
|
3
3
|
import {
|
|
4
4
|
createAgentSsrLoader
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-MDTPLIOU.js";
|
|
6
6
|
import {
|
|
7
7
|
extractAppResources,
|
|
8
8
|
handleMcpJsonRpc
|
|
@@ -79,4 +79,4 @@ async function mcpCommand(name, deps = {}) {
|
|
|
79
79
|
export {
|
|
80
80
|
mcpCommand
|
|
81
81
|
};
|
|
82
|
-
//# sourceMappingURL=mcp-
|
|
82
|
+
//# sourceMappingURL=mcp-RFCVZ76T.js.map
|
|
@@ -4,8 +4,8 @@ import "tsx/esm";
|
|
|
4
4
|
// src/cli/commands/preview.ts
|
|
5
5
|
async function defaultSteps() {
|
|
6
6
|
const [{ buildCommand }, { startCommand }] = await Promise.all([
|
|
7
|
-
import("./build-
|
|
8
|
-
import("./start-
|
|
7
|
+
import("./build-55ZYADOG.js"),
|
|
8
|
+
import("./start-DBGV5FUN.js")
|
|
9
9
|
]);
|
|
10
10
|
return {
|
|
11
11
|
build: (opts) => buildCommand(opts),
|
|
@@ -20,4 +20,4 @@ async function previewCommand(options = {}, steps) {
|
|
|
20
20
|
export {
|
|
21
21
|
previewCommand
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=preview-
|
|
23
|
+
//# sourceMappingURL=preview-T4BVZIN2.js.map
|
|
@@ -275,7 +275,9 @@ interface ChannelWebhookConfig {
|
|
|
275
275
|
onMessage: (message: ChannelMessage) => void | Promise<void>;
|
|
276
276
|
}
|
|
277
277
|
/**
|
|
278
|
-
* Handle one channel webhook request.
|
|
278
|
+
* Handle one channel webhook request. `target` is either the request path (parsed as
|
|
279
|
+
* `/api/agents/<name>/channels/<platform>/webhook`) or an explicit `{ agent, platform }` for an app
|
|
280
|
+
* that serves the webhook on its own route. Returns:
|
|
279
281
|
* 404 UNKNOWN_PLATFORM — no validator configured for `<platform>`
|
|
280
282
|
* 400 BAD_REQUEST — path is not a channel webhook, or the body is not JSON
|
|
281
283
|
* 401 INVALID_SIGNATURE — the platform signature check failed (negative case)
|
|
@@ -283,7 +285,10 @@ interface ChannelWebhookConfig {
|
|
|
283
285
|
* 200 `<challenge>` — subscribe handshake accepted (text/plain, per Meta's requirement)
|
|
284
286
|
* 200 { ok: true } — validated + handed to `onMessage`
|
|
285
287
|
*/
|
|
286
|
-
declare function handleChannelWebhook(request: Request,
|
|
288
|
+
declare function handleChannelWebhook(request: Request, target: string | {
|
|
289
|
+
readonly agent: string;
|
|
290
|
+
readonly platform: string;
|
|
291
|
+
}, config: ChannelWebhookConfig): Promise<Response>;
|
|
287
292
|
|
|
288
293
|
/**
|
|
289
294
|
* M30 (ADR-0041) — MCP Apps: `ui://` HTML resources for the MCP server (M16).
|
|
@@ -310,12 +310,6 @@ declare function Authenticated<TSession>(sessions: SessionReader<TSession>): new
|
|
|
310
310
|
|
|
311
311
|
declare function encrypt<T>(data: T, secret: string): Promise<string>;
|
|
312
312
|
declare function decrypt<T>(token: string, secret: string): Promise<T | null>;
|
|
313
|
-
/**
|
|
314
|
-
* Reset the derived-key cache. Test helper — never call from production code.
|
|
315
|
-
* Used by Vitest to guarantee isolation between tests that use distinct
|
|
316
|
-
* secrets and want to confirm the derivation path runs.
|
|
317
|
-
*/
|
|
318
|
-
declare function _resetKeyCacheForTests(): void;
|
|
319
313
|
|
|
320
314
|
/**
|
|
321
315
|
* T6.2 — RFC 6238 TOTP primitive.
|
|
@@ -579,15 +573,30 @@ interface OidcMetadata {
|
|
|
579
573
|
}
|
|
580
574
|
/** Clear the discovery cache. Used by tests. */
|
|
581
575
|
declare function clearOidcCache(): void;
|
|
576
|
+
/** Thrown when the issuer or a discovered endpoint is neither https nor loopback. */
|
|
577
|
+
declare class OidcInsecureEndpointError extends Error {
|
|
578
|
+
readonly name = "OidcInsecureEndpointError";
|
|
579
|
+
readonly code = "oidc_insecure_endpoint";
|
|
580
|
+
/** 'issuer' or the metadata field name, e.g. 'token_endpoint' */
|
|
581
|
+
readonly field: string;
|
|
582
|
+
readonly url: string;
|
|
583
|
+
constructor(field: string, url: string, detail?: string);
|
|
584
|
+
}
|
|
585
|
+
/** https always; http only for localhost, [::1], ::1 and 127.0.0.0/8. Never 0.0.0.0. */
|
|
586
|
+
declare function isSafeOidcUrl(url: string): boolean;
|
|
582
587
|
/**
|
|
583
588
|
* Fetch (or return cached) OIDC provider metadata.
|
|
584
589
|
*
|
|
585
590
|
* Throws when:
|
|
586
591
|
* - Issuer URL is malformed
|
|
587
|
-
* - Issuer is HTTP and not a loopback host (EC-7)
|
|
592
|
+
* - Issuer is HTTP and not a loopback host (EC-7): OidcInsecureEndpointError, field 'issuer'
|
|
588
593
|
* - HTTP response is non-OK
|
|
589
594
|
* - Metadata lacks `authorization_endpoint` (sanity check)
|
|
595
|
+
* - Any returned endpoint (`authorization_endpoint`, `token_endpoint`, and when present
|
|
596
|
+
* `userinfo_endpoint`, `jwks_uri`, `end_session_endpoint`) is not https or loopback:
|
|
597
|
+
* OidcInsecureEndpointError with the field name. Every endpoint this function returns is
|
|
598
|
+
* https or loopback. Endpoints need not share the issuer's host.
|
|
590
599
|
*/
|
|
591
600
|
declare function discoverOidcProvider(issuer: string | URL): Promise<OidcMetadata>;
|
|
592
601
|
|
|
593
|
-
export { AuthRequiredError, Authenticated, type BackupCode, type BackupCodeOptions, MIN_SECRET_LENGTH, type OidcMetadata, type PkceChallenge, type PreviewMarker, type PreviewMarkerConfig, type SecretWeakness, type SecretWeaknessCode, type SessionConfig, type SessionManager, type SessionManagerWeb, type SessionMeta, type SessionReader, type ThrottleOptions, type ThrottleState, type TotpAlgorithm, type TotpOptions, type TotpUriOptions, type VerifyTotpOptions,
|
|
602
|
+
export { AuthRequiredError, Authenticated, type BackupCode, type BackupCodeOptions, MIN_SECRET_LENGTH, OidcInsecureEndpointError, type OidcMetadata, type PkceChallenge, type PreviewMarker, type PreviewMarkerConfig, type SecretWeakness, type SecretWeaknessCode, type SessionConfig, type SessionManager, type SessionManagerWeb, type SessionMeta, type SessionReader, type ThrottleOptions, type ThrottleState, type TotpAlgorithm, type TotpOptions, type TotpUriOptions, type VerifyTotpOptions, assertProductionSecret, checkThrottle, clearOidcCache, createPreviewMarker, createSessionManager, createSessionManagerWeb, decrypt, discoverOidcProvider, encrypt, generateBackupCodes, generateOAuthState, generatePkceChallenge, generateTotp, generateTotpSecret, inspectSecret, isSafeOidcUrl, pkceChallengeFromVerifier, recordAttempt, requireAuth, rotateIfNeeded, rotateIfNeededWeb, totpUri, verifyBackupCode, verifyOAuthState, verifyTotp };
|
|
@@ -2,7 +2,7 @@ import {
|
|
|
2
2
|
AuthRequiredError,
|
|
3
3
|
Authenticated,
|
|
4
4
|
MIN_SECRET_LENGTH,
|
|
5
|
-
|
|
5
|
+
OidcInsecureEndpointError,
|
|
6
6
|
assertProductionSecret,
|
|
7
7
|
checkThrottle,
|
|
8
8
|
clearOidcCache,
|
|
@@ -18,6 +18,7 @@ import {
|
|
|
18
18
|
generateTotp,
|
|
19
19
|
generateTotpSecret,
|
|
20
20
|
inspectSecret,
|
|
21
|
+
isSafeOidcUrl,
|
|
21
22
|
pkceChallengeFromVerifier,
|
|
22
23
|
recordAttempt,
|
|
23
24
|
requireAuth,
|
|
@@ -27,7 +28,7 @@ import {
|
|
|
27
28
|
verifyBackupCode,
|
|
28
29
|
verifyOAuthState,
|
|
29
30
|
verifyTotp
|
|
30
|
-
} from "../../chunk-
|
|
31
|
+
} from "../../chunk-YAGGFI7B.js";
|
|
31
32
|
import "../../chunk-4FWBKX6G.js";
|
|
32
33
|
import "../../chunk-YSJOZEI6.js";
|
|
33
34
|
import {
|
|
@@ -38,7 +39,7 @@ export {
|
|
|
38
39
|
AuthRequiredError,
|
|
39
40
|
Authenticated,
|
|
40
41
|
MIN_SECRET_LENGTH,
|
|
41
|
-
|
|
42
|
+
OidcInsecureEndpointError,
|
|
42
43
|
assertProductionSecret,
|
|
43
44
|
checkThrottle,
|
|
44
45
|
clearOidcCache,
|
|
@@ -55,6 +56,7 @@ export {
|
|
|
55
56
|
generateTotp,
|
|
56
57
|
generateTotpSecret,
|
|
57
58
|
inspectSecret,
|
|
59
|
+
isSafeOidcUrl,
|
|
58
60
|
pkceChallengeFromVerifier,
|
|
59
61
|
recordAttempt,
|
|
60
62
|
requireAuth,
|
|
@@ -14,17 +14,17 @@ import {
|
|
|
14
14
|
translateCronToVercel,
|
|
15
15
|
validateCronSchedule,
|
|
16
16
|
writeCronManifest
|
|
17
|
-
} from "../../chunk-
|
|
17
|
+
} from "../../chunk-5EZJNG6M.js";
|
|
18
18
|
import {
|
|
19
19
|
createPostgresCronLock
|
|
20
|
-
} from "../../chunk-
|
|
20
|
+
} from "../../chunk-WHQN35LA.js";
|
|
21
21
|
import "../../chunk-ZN5H7CUR.js";
|
|
22
|
-
import "../../chunk-UMNXCU3K.js";
|
|
23
|
-
import "../../chunk-TQTEKNOL.js";
|
|
24
|
-
import "../../chunk-CHTAWXC2.js";
|
|
25
22
|
import "../../chunk-AHYOVVJ7.js";
|
|
26
23
|
import "../../chunk-SOYOYGWY.js";
|
|
27
24
|
import "../../chunk-ZWN3AODA.js";
|
|
25
|
+
import "../../chunk-UMNXCU3K.js";
|
|
26
|
+
import "../../chunk-AP2E5WHS.js";
|
|
27
|
+
import "../../chunk-CHTAWXC2.js";
|
|
28
28
|
import "../../chunk-XTHN6JBX.js";
|
|
29
29
|
export {
|
|
30
30
|
CRON_MANIFEST_SCHEMA_VERSION,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { B as BATCH_PATH, a as BatchExecuteFn, b as BatchPathConflictError, c as BatchPayload, d as BatchRequestItem, e as BatchResponse, f as BatchResultItem, C as CookieOptions, h as CorsConfig, i as CorsHandler, j as CorsOrigin, k as CorsWebHandler, l as CustomErrorPages, E as ExecuteActionOptions, m as ExecuteRouteContext, F as FileTooLargeError, H as HandleBatchOptions, M as MAX_ERROR_HTML_BYTES, n as MiddlewareNextUnavailableError, o as MiddlewareResult, N as NotFoundError, q as ProcedureInputError, r as ProcedureOutputError, S as STRIPPED_HEADERS, v as SendErrorInput, w as SendErrorOptions, T as TRACE_HEADER, x as TRACE_PARENT_HEADER, y as TheoError, W as W3CTraceContext,
|
|
1
|
+
export { B as BATCH_PATH, a as BatchExecuteFn, b as BatchPathConflictError, c as BatchPayload, d as BatchRequestItem, e as BatchResponse, f as BatchResultItem, C as CookieOptions, h as CorsConfig, i as CorsHandler, j as CorsOrigin, k as CorsWebHandler, l as CustomErrorPages, E as ExecuteActionOptions, m as ExecuteRouteContext, F as FileTooLargeError, H as HandleBatchOptions, M as MAX_ERROR_HTML_BYTES, n as MiddlewareNextUnavailableError, o as MiddlewareResult, N as NotFoundError, q as ProcedureInputError, r as ProcedureOutputError, S as STRIPPED_HEADERS, v as SendErrorInput, w as SendErrorOptions, T as TRACE_HEADER, x as TRACE_PARENT_HEADER, y as TheoError, W as W3CTraceContext, A as appendCookieToHeaders, D as appendDeleteCookieToHeaders, G as callProcedure, I as createCorsHandler, J as createCorsWebHandler, K as createOpenApiHandler, L as createServerContext, Q as deleteCookie, V as envelopeCodeToStatus, X as executeAction, Y as executeRoute, Z as executeWebRequest, _ as extractTraceId, $ as extractTraceIdFromRequest, a0 as extractW3CTraceContext, a1 as fromUnknown, a2 as getCookie, a3 as getCookieFromRequest, a4 as handleBatchRequest, a5 as handleRequestError, a6 as handleWebRequestError, a7 as injectModulePreloads, a8 as jsonTransformer, a9 as loadCustomErrorPages, aa as matchesOrigin, ab as parseCookieHeader, ac as parseRequestBody, ad as parseTraceparent, ae as parseTraceparentContext, af as resolveTransformer, ag as resolveUserModule, ah as runMiddlewareAndContext, ai as sendError, aj as sendJson, ak as serializeCookie, al as serveStaticFile, am as serverErrorToEnvelope, an as setCookie, ao as superjsonTransformer, ap as validateRouteInput } from '../../index-BHUYAnjZ.js';
|
|
2
2
|
export { f as defineReadyRoute, s as serveReservedRoute } from '../../health-route-CYI7z5g3.js';
|
|
3
3
|
export { A as ActionError, b as ActionInputError, f as extractUniversalIssues, i as isActionError, d as isInputError } from '../../action-protocol-tGm3NKRg.js';
|
|
4
4
|
import '../../error-envelope-DG47lt8E.js';
|
|
5
5
|
import 'node:http';
|
|
6
6
|
import '../../plugin-types-BUVfUQ0V.js';
|
|
7
7
|
import '../../plugin-runner-BVMOSxvb.js';
|
|
8
|
-
import '../../job-backend-
|
|
8
|
+
import '../../job-backend-CPASsVEt.js';
|
|
9
9
|
import '../../storage-types-ndO0ZZqH.js';
|
|
10
10
|
import '../../match-DaKsL73w.js';
|
|
11
11
|
import '../../module-loader-DCip7NoL.js';
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
injectModulePreloads,
|
|
8
8
|
loadCustomErrorPages,
|
|
9
9
|
serveStaticFile
|
|
10
|
-
} from "../../chunk-
|
|
10
|
+
} from "../../chunk-F6YBS77T.js";
|
|
11
11
|
import "../../chunk-O2KGDLA7.js";
|
|
12
12
|
import {
|
|
13
13
|
jsonTransformer,
|
|
@@ -26,11 +26,9 @@ import {
|
|
|
26
26
|
handleRequestError,
|
|
27
27
|
handleWebRequestError,
|
|
28
28
|
matchesOrigin
|
|
29
|
-
} from "../../chunk-
|
|
29
|
+
} from "../../chunk-V3RGGV5P.js";
|
|
30
30
|
import {
|
|
31
31
|
MiddlewareNextUnavailableError,
|
|
32
|
-
_resetMiddlewareCacheForTests,
|
|
33
|
-
_resetUninvocableWarningsForTests,
|
|
34
32
|
createServerContext,
|
|
35
33
|
executeWebRequest,
|
|
36
34
|
resolveUserModule,
|
|
@@ -38,7 +36,8 @@ import {
|
|
|
38
36
|
sendError,
|
|
39
37
|
sendJson,
|
|
40
38
|
validateRouteInput
|
|
41
|
-
} from "../../chunk-
|
|
39
|
+
} from "../../chunk-TEH6RKDC.js";
|
|
40
|
+
import "../../chunk-V6Y2SMRG.js";
|
|
42
41
|
import "../../chunk-P6OS7652.js";
|
|
43
42
|
import {
|
|
44
43
|
ActionError,
|
|
@@ -48,7 +47,8 @@ import {
|
|
|
48
47
|
isInputError
|
|
49
48
|
} from "../../chunk-ZDUO4IYN.js";
|
|
50
49
|
import "../../chunk-IDWN2OSG.js";
|
|
51
|
-
import "../../chunk-
|
|
50
|
+
import "../../chunk-CNOCBSTV.js";
|
|
51
|
+
import "../../chunk-ZWN3AODA.js";
|
|
52
52
|
import {
|
|
53
53
|
TRACE_HEADER,
|
|
54
54
|
TRACE_PARENT_HEADER,
|
|
@@ -59,7 +59,11 @@ import {
|
|
|
59
59
|
parseTraceparentContext
|
|
60
60
|
} from "../../chunk-IXXZBZF7.js";
|
|
61
61
|
import "../../chunk-AVQU5CQF.js";
|
|
62
|
-
import
|
|
62
|
+
import {
|
|
63
|
+
FileTooLargeError,
|
|
64
|
+
parseRequestBody
|
|
65
|
+
} from "../../chunk-AP2E5WHS.js";
|
|
66
|
+
import "../../chunk-CHTAWXC2.js";
|
|
63
67
|
import {
|
|
64
68
|
envelopeCodeToStatus
|
|
65
69
|
} from "../../chunk-ACKBVBUI.js";
|
|
@@ -83,12 +87,6 @@ import {
|
|
|
83
87
|
serializeCookie,
|
|
84
88
|
setCookie
|
|
85
89
|
} from "../../chunk-4FWBKX6G.js";
|
|
86
|
-
import {
|
|
87
|
-
FileTooLargeError,
|
|
88
|
-
parseRequestBody
|
|
89
|
-
} from "../../chunk-TQTEKNOL.js";
|
|
90
|
-
import "../../chunk-CHTAWXC2.js";
|
|
91
|
-
import "../../chunk-ZWN3AODA.js";
|
|
92
90
|
import "../../chunk-XTHN6JBX.js";
|
|
93
91
|
export {
|
|
94
92
|
ActionError,
|
|
@@ -105,8 +103,6 @@ export {
|
|
|
105
103
|
TRACE_HEADER,
|
|
106
104
|
TRACE_PARENT_HEADER,
|
|
107
105
|
TheoError,
|
|
108
|
-
_resetMiddlewareCacheForTests,
|
|
109
|
-
_resetUninvocableWarningsForTests,
|
|
110
106
|
appendCookieToHeaders,
|
|
111
107
|
appendDeleteCookieToHeaders,
|
|
112
108
|
callProcedure,
|
package/dist/server/index.d.ts
CHANGED
|
@@ -6,25 +6,25 @@ export { C as CustomTool, D as DefineAgentToolSpec, T as ToolContextMessage, a a
|
|
|
6
6
|
export { A as AccessDecision, R as RoutePolicy, b as RoutePolicyInput, a as RouteSubject, e as evaluateRoutePolicy, r as requireOwner, s as subjectFromContext } from '../route-policy-BHXQDzBF.js';
|
|
7
7
|
export { b as HookName, H as HookResult, O as OnErrorHook, c as OnRequestHook, d as OnResponseHook, P as PluginContext, e as PluginErrorContext, f as PreHandlerHook, R as RunHookOptions, a as TheoApp, T as TheoPlugin } from '../plugin-types-BUVfUQ0V.js';
|
|
8
8
|
export { H as HEALTH_PATH, a as HealthRouteConfig, b as READY_PATH, c as ReadyRouteConfig, d as ReservedResponse, R as ReservedRoutes, e as defineHealthRoute, f as defineReadyRoute, s as serveReservedRoute } from '../health-route-CYI7z5g3.js';
|
|
9
|
-
export { B as BATCH_PATH, a as BatchExecuteFn, b as BatchPathConflictError, c as BatchPayload, d as BatchRequestItem, e as BatchResponse, f as BatchResultItem, g as BodyParserOptions, C as CookieOptions, h as CorsConfig, i as CorsHandler, j as CorsOrigin, k as CorsWebHandler, l as CustomErrorPages, E as ExecuteActionOptions, m as ExecuteRouteContext, F as FileTooLargeError, H as HandleBatchOptions, M as MAX_ERROR_HTML_BYTES, n as MiddlewareNextUnavailableError, o as MiddlewareResult, N as NotFoundError, O as OpenApiDocsOptions, P as ParsedBody, p as ProcedureInput, q as ProcedureInputError, r as ProcedureOutputError, R as RawRouteInput, s as RouteInputChannel, t as RouteInputSchemas, u as RouteInputValidation, S as STRIPPED_HEADERS, v as SendErrorInput, w as SendErrorOptions, T as TRACE_HEADER, x as TRACE_PARENT_HEADER, y as TheoError, z as TheoTransformer, U as UploadedFile, W as W3CTraceContext,
|
|
9
|
+
export { B as BATCH_PATH, a as BatchExecuteFn, b as BatchPathConflictError, c as BatchPayload, d as BatchRequestItem, e as BatchResponse, f as BatchResultItem, g as BodyParserOptions, C as CookieOptions, h as CorsConfig, i as CorsHandler, j as CorsOrigin, k as CorsWebHandler, l as CustomErrorPages, E as ExecuteActionOptions, m as ExecuteRouteContext, F as FileTooLargeError, H as HandleBatchOptions, M as MAX_ERROR_HTML_BYTES, n as MiddlewareNextUnavailableError, o as MiddlewareResult, N as NotFoundError, O as OpenApiDocsOptions, P as ParsedBody, p as ProcedureInput, q as ProcedureInputError, r as ProcedureOutputError, R as RawRouteInput, s as RouteInputChannel, t as RouteInputSchemas, u as RouteInputValidation, S as STRIPPED_HEADERS, v as SendErrorInput, w as SendErrorOptions, T as TRACE_HEADER, x as TRACE_PARENT_HEADER, y as TheoError, z as TheoTransformer, U as UploadedFile, W as W3CTraceContext, A as appendCookieToHeaders, D as appendDeleteCookieToHeaders, G as callProcedure, I as createCorsHandler, J as createCorsWebHandler, K as createOpenApiHandler, L as createServerContext, Q as deleteCookie, V as envelopeCodeToStatus, X as executeAction, Y as executeRoute, Z as executeWebRequest, _ as extractTraceId, $ as extractTraceIdFromRequest, a0 as extractW3CTraceContext, a1 as fromUnknown, a2 as getCookie, a3 as getCookieFromRequest, a4 as handleBatchRequest, a5 as handleRequestError, a6 as handleWebRequestError, a7 as injectModulePreloads, a8 as jsonTransformer, a9 as loadCustomErrorPages, aa as matchesOrigin, ab as parseCookieHeader, ac as parseRequestBody, ad as parseTraceparent, ae as parseTraceparentContext, af as resolveTransformer, ag as resolveUserModule, ah as runMiddlewareAndContext, ai as sendError, aj as sendJson, ak as serializeCookie, al as serveStaticFile, am as serverErrorToEnvelope, an as setCookie, ao as superjsonTransformer, ap as validateRouteInput } from '../index-BHUYAnjZ.js';
|
|
10
10
|
export { A as ActionError, a as ActionErrorCode, b as ActionInputError, e as ActionManifestEntry, c as ActionResult, S as SerializedActionResult, U as UniversalZodIssue, f as extractUniversalIssues, i as isActionError, d as isInputError } from '../action-protocol-tGm3NKRg.js';
|
|
11
|
-
export { ACTION_SCHEMAS_DIR, ActionNode, ActionScanError, LoadedManifest, ManifestAction, ManifestAgent, ManifestRoute, ManifestWebSocket, TheoManifest, WebSocketRouteNode,
|
|
11
|
+
export { ACTION_SCHEMAS_DIR, ActionNode, ActionScanError, LoadedManifest, ManifestAction, ManifestAgent, ManifestRoute, ManifestWebSocket, TheoManifest, WebSocketRouteNode, compareRouteSpecificity, generateManifest, loadManifest, scanMiddlewares, scanServerActions, scanServerActionsEnriched, scanServerRoutes, scanWebSocketRoutes, writeManifest } from './scan/index.js';
|
|
12
12
|
export { S as ServerRouteNode, c as compilePattern, m as matchRoute } from '../match-DaKsL73w.js';
|
|
13
13
|
export { L as LoadModule, c as createProductionLoader, a as createViteLoader } from '../module-loader-DCip7NoL.js';
|
|
14
14
|
export { AcpRequestTimeoutError, AcpToolConfig, AcpToolTransport, AcpTransportClosedError, AcpTurnStoppedError, AppResource, AppResourceInput, ChannelMessage, ChannelWebhookConfig, DEFAULT_ACP_TIMEOUT_MS, McpResourceContents, McpResourceDescriptor, NodeAcpTransport, StdioStreams, VendorAgentClient, VendorAgentToolConfig, WorkflowLike, WorkflowToolConfig, buildResourceDescriptors, createACPTool, createVendorAgentTool, createWorkflowTool, defineAppResource, extractAppResources, handleChannelWebhook, handleMcpStdioLine, handleMcpToolsJsonRpc, isChannelPath, parseChannelPath, readAppResource, serveMcpStdio, serveMcpToolsStdio } from './agent/index.js';
|
|
15
15
|
export { CodeModeApi, CodeModeConfig, CodeModePermission, CodeModePermissionDeniedError, Sandbox, createCodeMode } from '@theokit/agents/code-mode';
|
|
16
16
|
export { AgentModule, InProcessApprovalRequest, InProcessApprovalRequiredError, InProcessAwaitApproval, StreamAgentTurnDeps, StreamAgentTurnInProcessInput, streamAgentTurnInProcess } from '@theokit/agents';
|
|
17
17
|
export { P as ProviderDescriptor, R as ResolvedProvider, l as listProviders, a as registerProvider, b as resetProviderRegistry, r as resolveProvider, t as tryResolveProvider } from '../provider-resolver-Cc9C3-Rb.js';
|
|
18
|
-
export { AuthRequiredError, Authenticated, BackupCode, BackupCodeOptions, MIN_SECRET_LENGTH, OidcMetadata, PkceChallenge, PreviewMarker, PreviewMarkerConfig, SecretWeakness, SecretWeaknessCode, SessionConfig, SessionManager, SessionManagerWeb, SessionMeta, SessionReader, ThrottleOptions, ThrottleState, TotpAlgorithm, TotpOptions, TotpUriOptions, VerifyTotpOptions,
|
|
18
|
+
export { AuthRequiredError, Authenticated, BackupCode, BackupCodeOptions, MIN_SECRET_LENGTH, OidcInsecureEndpointError, OidcMetadata, PkceChallenge, PreviewMarker, PreviewMarkerConfig, SecretWeakness, SecretWeaknessCode, SessionConfig, SessionManager, SessionManagerWeb, SessionMeta, SessionReader, ThrottleOptions, ThrottleState, TotpAlgorithm, TotpOptions, TotpUriOptions, VerifyTotpOptions, assertProductionSecret, checkThrottle, clearOidcCache, createPreviewMarker, createSessionManager, createSessionManagerWeb, decrypt, discoverOidcProvider, encrypt, generateBackupCodes, generateOAuthState, generatePkceChallenge, generateTotp, generateTotpSecret, inspectSecret, isSafeOidcUrl, pkceChallengeFromVerifier, recordAttempt, requireAuth, rotateIfNeeded, rotateIfNeededWeb, totpUri, verifyBackupCode, verifyOAuthState, verifyTotp } from './auth/index.js';
|
|
19
19
|
export { g as generateNonce } from '../nonce-BXt7Qu_C.js';
|
|
20
20
|
export { InMemoryUsageStorage, ToolHookEvent, TrackAgentRunInput, TrackAgentRunOptions, TrackAgentToolsHooks, TrackAgentToolsOptions, trackAgentRun, trackAgentTools } from './cost/index.js';
|
|
21
21
|
export { T as ToolUsageRecord, b as UsageQuery, a as UsageRecord, c as UsageResult, U as UsageStorageAdapter } from '../cost-types-BALTuBpG.js';
|
|
22
22
|
export { InMemoryUsageStorage as NeutralUsageStorage } from '@theokit/agents/usage';
|
|
23
23
|
export { CRON_MANIFEST_SCHEMA_VERSION, CronConcurrencyPolicy, CronContext, CronDefinition, CronManifest, CronManifestEntry, CronNode, CronOptions, CronScheduler, CronSchedulerOptions, DuplicateCronNameError, ExistingConfigUnparseableError, buildCronManifest, convertToAwsCron, createCronScheduler, defineCron, scanCronDirs, scanCrons, translateCronToAws, translateCronToCloudflare, translateCronToDeno, translateCronToVercel, validateCronSchedule, writeCronManifest } from './cron/index.js';
|
|
24
24
|
export { C as CronLock, P as PostgresCronLockOptions, c as createPostgresCronLock } from '../cron-lock-CfAvLApv.js';
|
|
25
|
-
export { DuplicateContextKeyError, DuplicateJobNameError, EnqueueOptions, InMemoryJobBackend, InMemoryJobBackendOptions, JOB_MANIFEST_SCHEMA_VERSION, JobContext, JobDefinition, JobManifest, JobManifestEntry, JobNode, JobOptions, JobRegistry, JobRunner, JobWorker, JobWorkerOptions, Outbox, OutboxFlushOptions, PostgresJobBackend, PostgresJobBackendOptions, QueueClient, TransactionalEnqueueUnsupportedError, buildJobManifest, createJobRunner, createJobWorker, createOutbox, createOutboxDispatcher, createQueueClient, defineJob, scanJobs, writeJobManifest } from './jobs/index.js';
|
|
26
|
-
export { J as JobBackend, a as JobEnqueueInput, b as JobLease, c as JobLeaseExtensionUnsupportedError, d as JobLeaseFence, e as JobLeaseLostError, f as JobNackOptions, N as NonRetryableError } from '../job-backend-
|
|
27
|
-
export { ConsoleObservabilityAdapter, LogLevel, LoggerFn, NoopObservabilityAdapter, NoopSpan, ObservabilityAdapter, RequestLog, SpanAttributes, SpanHandle, SpanImpl, StructuredLog, TheoCloudObservabilityAdapter, TheoLogger,
|
|
25
|
+
export { DuplicateContextKeyError, DuplicateJobNameError, EnqueueOptions, InMemoryJobBackend, InMemoryJobBackendOptions, JOB_MANIFEST_SCHEMA_VERSION, JobContext, JobDefinition, JobManifest, JobManifestEntry, JobNode, JobOptions, JobRegistry, JobRunner, JobWorker, JobWorkerOptions, Outbox, OutboxFlushOptions, PostgresJobBackend, PostgresJobBackendOptions, QueueClient, TransactionalCancelUnsupportedError, TransactionalEnqueueUnsupportedError, buildJobManifest, createJobRunner, createJobWorker, createOutbox, createOutboxDispatcher, createQueueClient, defineJob, scanJobs, writeJobManifest } from './jobs/index.js';
|
|
26
|
+
export { J as JobBackend, a as JobEnqueueInput, b as JobLease, c as JobLeaseExtensionUnsupportedError, d as JobLeaseFence, e as JobLeaseLostError, f as JobNackOptions, N as NonRetryableError } from '../job-backend-CPASsVEt.js';
|
|
27
|
+
export { ConsoleObservabilityAdapter, LogLevel, LoggerFn, NoopObservabilityAdapter, NoopSpan, ObservabilityAdapter, RequestLog, SpanAttributes, SpanHandle, SpanImpl, StructuredLog, TheoCloudObservabilityAdapter, TheoLogger, createLogger, createObservabilityPlugin, defineObservabilityAdapter, findSuggestion, levenshtein, logRequest, resolveAdapter, serializeSpansToOtlp, warnOnce } from './observability/index.js';
|
|
28
28
|
export { a as AuditEvent, A as AuditLogger, J as JsonStdoutSink, c as createNoOpLogger, s as safeAudit } from '../audit-log-BQWM5YLG.js';
|
|
29
29
|
export { D as DuplicateDecorationError, a as DuplicatePluginError, P as PluginRunner } from '../plugin-runner-BVMOSxvb.js';
|
|
30
30
|
export { InvalidPluginShapeError, createPluginRunnerFromConfig } from './plugins/index.js';
|
|
@@ -38,7 +38,7 @@ export { a as CsrfReadinessRouteSummary, C as CsrfReadinessStore, b as CsrfReadi
|
|
|
38
38
|
export { P as PostgresFactory, R as RedisFactory, S as StorageManager, g as getStorageManager } from '../storage-manager-vIxAHMwm.js';
|
|
39
39
|
export { Db0Database, UnstorageInstance, useDatabase, useUnstorage } from './storage/index.js';
|
|
40
40
|
export { G as GenericFactory, P as PoolLike, b as PostgresDatabaseConfig, d as RedisLike, R as RedisServerConfig, a as ServerConfig, S as StorageAdapter, c as StorageConfig, T as TlsConfig } from '../storage-types-ndO0ZZqH.js';
|
|
41
|
-
export { BodyTooLargeError, DEFAULT_MAX_BODY_BYTES, DiscordWebhookOptions, GitHubWebhookOptions, LineWebhookOptions, RawBodyResult, ReadRawBodyOptions, SlackWebhookOptions, StripeWebhookOptions, TelegramWebhookOptions, defineWebhook, discord, dispatchWebhook, github, line, readRawBody, slack, stripe, telegram, timingSafeEqual } from './webhook/index.js';
|
|
41
|
+
export { BodyTooLargeError, DEFAULT_MAX_BODY_BYTES, DecodeResult, DecodeSignature, DiscordWebhookOptions, GitHubWebhookOptions, LineWebhookOptions, RawBodyResult, ReadRawBodyOptions, SlackWebhookOptions, StripeWebhookOptions, TelegramWebhookOptions, decodeBase64Signature, decodeHexSignature, defineWebhook, discord, dispatchWebhook, github, line, readRawBody, slack, stripe, telegram, timingSafeEqual, verifyHmacSha256 } from './webhook/index.js';
|
|
42
42
|
export { D as DefineWebhookOptions, S as SubscribeFn, a as SubscribeResult, V as VerifyFn, b as VerifyResult, W as WebhookContext, c as WebhookDefinition, d as WhatsAppSubscribeOptions, e as WhatsAppWebhookOptions, w as whatsapp, f as whatsappSubscribe } from '../whatsapp-4W2eK2ij.js';
|
|
43
43
|
import { z } from 'zod';
|
|
44
44
|
export { ComposeInstructionsOptions, ComposedInstructions, ConfigLayer, ContextPressure, ContextPressureThresholdError, ContextPressureThresholds, CustomCommand, CustomCommandsResult, DEFAULT_CONTEXT_PRESSURE_THRESHOLDS, InstructionBlock, InstructionSource, InstructionTree, InstructionTreeBudget, LayerOutOfOrderError, LayeredConfig, LayeredConfigInput, LayeredConfigResult, LoadCustomCommandsInput, LoadInstructionTreeInput, ParsedFrontmatter, PrecedenceReport, ProvenancePerKey, TrustRecord, TrustStore, TrustStorePermissionsError, composeInstructions, contextPressure, effectiveContextWindow, frontmatterValue, loadCustomCommands, loadInstructionTree, splitFrontmatter } from '@theokit/agents/config';
|
|
@@ -398,11 +398,6 @@ declare function initCacheEngine(config: NormalizedCacheConfig, hooks?: Pick<Cac
|
|
|
398
398
|
* bootstrap missed calling initCacheEngine, or cache.enabled is false.
|
|
399
399
|
*/
|
|
400
400
|
declare function getCacheEngine(): CacheEngine;
|
|
401
|
-
/**
|
|
402
|
-
* Test-only: clear the singleton so the next test can re-init.
|
|
403
|
-
* Production code MUST NOT call this.
|
|
404
|
-
*/
|
|
405
|
-
declare function _resetCacheEngine(): void;
|
|
406
401
|
|
|
407
402
|
interface RouteRule {
|
|
408
403
|
maxAge?: number;
|
|
@@ -628,8 +623,6 @@ interface LoadEnvResult {
|
|
|
628
623
|
* `process.env.NODE_ENV`. Stashed in `__THEOKIT_USER_NODE_ENV` instead.
|
|
629
624
|
*/
|
|
630
625
|
|
|
631
|
-
/** Test-only side-door for EC-2 — clear the module-level cache between vitest test files. */
|
|
632
|
-
declare function _resetEnvCache(): void;
|
|
633
626
|
declare function loadEnv(options?: LoadEnvOptions): LoadEnvResult;
|
|
634
627
|
|
|
635
|
-
export { DEFAULT_MAX_AGE as CACHE_DEFAULT_MAX_AGE, DEFAULT_MAX_ENTRY_SIZE as CACHE_DEFAULT_MAX_ENTRY_SIZE, DEFAULT_SWR_MULTIPLIER as CACHE_DEFAULT_SWR_MULTIPLIER, CACHE_TAG_MAX_ITEMS, CACHE_TAG_MAX_LENGTH, CTX_WRITERS, type CacheControlInput, type CacheEngine, type CacheEngineOptions, type CacheEntry, type CacheStatus, type CacheStorageAdapter, type CacheStore, type CacheStoreAdmin, type ValidationResult as CacheValidationResult, type CachedFunction, type CachedRouteConfig, type CompiledRouteRule, type ContextValue, DEFAULT_EXCLUDED_QUERY_PARAMS, type DefineCachedFunctionOptions, type GetOrComputeOptions, InMemoryCacheAdapter, type InMemoryCacheAdapterOptions, type JobsAugmentedCtx, type KeyDerivationOptions, type LoadEnvOptions, type LoadEnvResult, type NormalizedCacheConfig, type QueueClientLike, type RevalidateResult, type RouteCacheOptions, RouteConfig, type RouteRule, type RouteRules, type SerializedResponse, THEO_T_PREFIX,
|
|
628
|
+
export { DEFAULT_MAX_AGE as CACHE_DEFAULT_MAX_AGE, DEFAULT_MAX_ENTRY_SIZE as CACHE_DEFAULT_MAX_ENTRY_SIZE, DEFAULT_SWR_MULTIPLIER as CACHE_DEFAULT_SWR_MULTIPLIER, CACHE_TAG_MAX_ITEMS, CACHE_TAG_MAX_LENGTH, CTX_WRITERS, type CacheControlInput, type CacheEngine, type CacheEngineOptions, type CacheEntry, type CacheStatus, type CacheStorageAdapter, type CacheStore, type CacheStoreAdmin, type ValidationResult as CacheValidationResult, type CachedFunction, type CachedRouteConfig, type CompiledRouteRule, type ContextValue, DEFAULT_EXCLUDED_QUERY_PARAMS, type DefineCachedFunctionOptions, type GetOrComputeOptions, InMemoryCacheAdapter, type InMemoryCacheAdapterOptions, type JobsAugmentedCtx, type KeyDerivationOptions, type LoadEnvOptions, type LoadEnvResult, type NormalizedCacheConfig, type QueueClientLike, type RevalidateResult, type RouteCacheOptions, RouteConfig, type RouteRule, type RouteRules, type SerializedResponse, THEO_T_PREFIX, compileRouteRules, createCacheEngine, defineCachedFunction, defineCachedRoute, deriveKey as deriveCacheKey, deserializeResponse, getCacheControlHeader, getCacheEngine, initCacheEngine, loadEnv, resolveRouteRule, revalidatePath, revalidateTag, serializeResponse, updateTag, validateExpire as validateCacheExpire, validateMaxAge as validateCacheMaxAge, validateTags as validateCacheTags };
|