theokit 0.59.0 → 0.61.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/dist/{actions-virtual-module-L6SCJLDI.js → actions-virtual-module-345YHSEB.js} +8 -8
- package/dist/{actions-virtual-module-YQBEDNHN.js → actions-virtual-module-XI5IGBF4.js} +4 -4
- package/dist/adapters/agent-mount.d.ts +2 -2
- package/dist/adapters/agent-mount.js +3 -3
- package/dist/adapters/security-headers.d.ts +2 -2
- package/dist/adapters/security-headers.js +1 -1
- package/dist/{agent-X7RDENTI.js → agent-L45EZWPV.js} +3 -3
- package/dist/{app-typed-client-F3YLMV4N.js → app-typed-client-B7QIRDSP.js} +8 -8
- package/dist/{app-typed-client-BE4LZPK2.js → app-typed-client-GVP4V4X3.js} +4 -4
- package/dist/{aws-lambda-VKMYUMP2.js → aws-lambda-2R77AV5F.js} +3 -3
- package/dist/{build-H2UDKBV7.js → build-22OMF3NG.js} +6 -6
- package/dist/{bun-POLTY2HK.js → bun-MAAG4MKW.js} +3 -3
- package/dist/{chunk-CF2DNN5R.js → chunk-45XETXSG.js} +10 -2
- package/dist/chunk-45XETXSG.js.map +1 -0
- package/dist/{chunk-KQ27YDLG.js → chunk-4BQIJ4HE.js} +3 -3
- package/dist/{chunk-JW5UFKQ3.js → chunk-5AGNZXHJ.js} +2 -2
- package/dist/{chunk-IRQGAC4L.js → chunk-5GZROLDV.js} +2 -2
- package/dist/{chunk-IRQGAC4L.js.map → chunk-5GZROLDV.js.map} +1 -1
- package/dist/{chunk-6YRZWT5X.js → chunk-6R6UR64X.js} +9 -9
- package/dist/{chunk-YN4W7LCX.js → chunk-ENRT6DAU.js} +6 -1
- package/dist/chunk-ENRT6DAU.js.map +1 -0
- package/dist/{chunk-BPYMC7SU.js → chunk-EYRWD2AB.js} +2 -2
- package/dist/{chunk-HA35FS7U.js → chunk-FFS7IRZF.js} +2 -2
- package/dist/{chunk-M357ILK5.js → chunk-H2X5T45M.js} +3 -3
- package/dist/{chunk-GO7UWJ47.js → chunk-KPZ2JSAU.js} +53 -26
- package/dist/chunk-KPZ2JSAU.js.map +1 -0
- package/dist/{chunk-IF7CZXPW.js → chunk-KVZQJ3ZM.js} +8 -3
- package/dist/chunk-KVZQJ3ZM.js.map +1 -0
- package/dist/{chunk-VJRPOUKM.js → chunk-L2NSHQOY.js} +4 -4
- package/dist/{chunk-KZ3PXNPT.js → chunk-MIPHNT4J.js} +3 -3
- package/dist/chunk-MIPHNT4J.js.map +1 -0
- package/dist/{chunk-IJER2SYS.js → chunk-OH32SN46.js} +20 -1
- package/dist/{chunk-IJER2SYS.js.map → chunk-OH32SN46.js.map} +1 -1
- package/dist/{chunk-WOANPZBT.js → chunk-Q3UE7WIM.js} +2 -2
- package/dist/{chunk-4OTIXAUY.js → chunk-TMQ52AZR.js} +24 -1
- package/dist/chunk-TMQ52AZR.js.map +1 -0
- package/dist/{chunk-E43VJ3E5.js → chunk-VPX3MS5D.js} +2 -2
- package/dist/{chunk-RPET332G.js → chunk-VV2VU3LJ.js} +2 -2
- package/dist/chunk-VV2VU3LJ.js.map +1 -0
- package/dist/{chunk-35QIWOHT.js → chunk-WFIAYPBH.js} +10 -2
- package/dist/chunk-WFIAYPBH.js.map +1 -0
- package/dist/{chunk-MWPC7EOR.js → chunk-YXEKPMDK.js} +5 -5
- package/dist/{chunk-YGL3H3UW.js → chunk-ZXJAI4J7.js} +34 -11
- package/dist/chunk-ZXJAI4J7.js.map +1 -0
- package/dist/cli/index.js +9 -9
- package/dist/{cloudflare-SIG42OIW.js → cloudflare-F5DNYH4B.js} +3 -3
- package/dist/{deno-deploy-LQAYOOPW.js → deno-deploy-47E7GIME.js} +3 -3
- package/dist/{dev-SJE2GSAC.js → dev-BDODXUEA.js} +22 -17
- package/dist/dev-BDODXUEA.js.map +1 -0
- package/dist/{index-ADEV6pen.d.ts → index-BXGSBlxf.d.ts} +1 -1
- package/dist/index.d.ts +7 -0
- package/dist/index.js +9 -8
- package/dist/index.js.map +1 -1
- package/dist/{info-6WJ3JRNE.js → info-2H7I55YN.js} +3 -3
- package/dist/{internal-api-4FBFRQ4G.js → internal-api-QKWTQ2Q7.js} +4 -4
- package/dist/{internal-api-W5RURFU7.js → internal-api-VRUDDBEG.js} +8 -8
- package/dist/{load-config-BKUAMGO5.js → load-config-VMKOV44Y.js} +3 -3
- package/dist/{mcp-I5HCW4QF.js → mcp-WMZSXQQG.js} +4 -4
- package/dist/{netlify-C2IRCZKI.js → netlify-BJQGPMGY.js} +3 -3
- package/dist/{openapi-WDX3XX2J.js → openapi-SKKXWFX4.js} +3 -3
- package/dist/{preview-PWGO5LUE.js → preview-GUEKVBGL.js} +3 -3
- package/dist/{provider-resolver-VS61zqsw.d.ts → provider-resolver-1aWi_WSz.d.ts} +17 -0
- package/dist/{registry-3LUHO4IB.js → registry-APCN3PSJ.js} +7 -7
- package/dist/{route-config-Cm_ZMA1C.d.ts → route-config-B7FaTSby.d.ts} +1 -1
- package/dist/{route-policy-BxOycCDq.d.ts → route-policy-BHXQDzBF.d.ts} +20 -1
- package/dist/{routes-A2YLFEYC.js → routes-ECCDRHXZ.js} +3 -3
- package/dist/{schema-WKTNTGX6.js → schema-ND7GHPQK.js} +2 -2
- package/dist/{security-headers-Ccj7ncNx.d.ts → security-headers-C2cByfJn.d.ts} +5 -0
- package/dist/server/agent/index.d.ts +17 -2
- package/dist/server/agent/index.js +2 -2
- package/dist/server/define/index.d.ts +5 -4
- package/dist/server/define/index.js +1 -1
- package/dist/server/http/index.d.ts +3 -3
- package/dist/server/http/index.js +3 -3
- package/dist/server/index.d.ts +7 -7
- package/dist/server/index.js +13 -9
- package/dist/server/index.js.map +1 -1
- package/dist/server/security/index.d.ts +2 -2
- package/dist/server/security/index.js +2 -2
- package/dist/server/webhook/index.d.ts +9 -4
- package/dist/server/webhook/index.js +7 -3
- package/dist/{server-boundary-CJIXOPCF.js → server-boundary-7BRS2CWI.js} +4 -4
- package/dist/{server-boundary-WVWEJNUJ.js → server-boundary-OEBKNBEP.js} +8 -8
- package/dist/{start-KEWSYVVU.js → start-AKMBT3DW.js} +9 -9
- package/dist/{vercel-BMCQKCWE.js → vercel-BEDGUVXX.js} +3 -3
- package/dist/vite-plugin/index.js +8 -8
- package/dist/{vite-plugin-TU3HQA43.js → vite-plugin-37OQ5RDR.js} +8 -8
- package/dist/whatsapp-D_Fnl1LX.d.ts +85 -0
- package/package.json +2 -2
- package/dist/chunk-35QIWOHT.js.map +0 -1
- package/dist/chunk-4OTIXAUY.js.map +0 -1
- package/dist/chunk-CF2DNN5R.js.map +0 -1
- package/dist/chunk-GO7UWJ47.js.map +0 -1
- package/dist/chunk-IF7CZXPW.js.map +0 -1
- package/dist/chunk-KZ3PXNPT.js.map +0 -1
- package/dist/chunk-RPET332G.js.map +0 -1
- package/dist/chunk-YGL3H3UW.js.map +0 -1
- package/dist/chunk-YN4W7LCX.js.map +0 -1
- package/dist/dev-SJE2GSAC.js.map +0 -1
- package/dist/webhook-types-DGIjjcaI.d.ts +0 -43
- /package/dist/{actions-virtual-module-L6SCJLDI.js.map → actions-virtual-module-345YHSEB.js.map} +0 -0
- /package/dist/{actions-virtual-module-YQBEDNHN.js.map → actions-virtual-module-XI5IGBF4.js.map} +0 -0
- /package/dist/{agent-X7RDENTI.js.map → agent-L45EZWPV.js.map} +0 -0
- /package/dist/{app-typed-client-F3YLMV4N.js.map → app-typed-client-B7QIRDSP.js.map} +0 -0
- /package/dist/{app-typed-client-BE4LZPK2.js.map → app-typed-client-GVP4V4X3.js.map} +0 -0
- /package/dist/{aws-lambda-VKMYUMP2.js.map → aws-lambda-2R77AV5F.js.map} +0 -0
- /package/dist/{build-H2UDKBV7.js.map → build-22OMF3NG.js.map} +0 -0
- /package/dist/{bun-POLTY2HK.js.map → bun-MAAG4MKW.js.map} +0 -0
- /package/dist/{chunk-KQ27YDLG.js.map → chunk-4BQIJ4HE.js.map} +0 -0
- /package/dist/{chunk-JW5UFKQ3.js.map → chunk-5AGNZXHJ.js.map} +0 -0
- /package/dist/{chunk-6YRZWT5X.js.map → chunk-6R6UR64X.js.map} +0 -0
- /package/dist/{chunk-BPYMC7SU.js.map → chunk-EYRWD2AB.js.map} +0 -0
- /package/dist/{chunk-HA35FS7U.js.map → chunk-FFS7IRZF.js.map} +0 -0
- /package/dist/{chunk-M357ILK5.js.map → chunk-H2X5T45M.js.map} +0 -0
- /package/dist/{chunk-VJRPOUKM.js.map → chunk-L2NSHQOY.js.map} +0 -0
- /package/dist/{chunk-WOANPZBT.js.map → chunk-Q3UE7WIM.js.map} +0 -0
- /package/dist/{chunk-E43VJ3E5.js.map → chunk-VPX3MS5D.js.map} +0 -0
- /package/dist/{chunk-MWPC7EOR.js.map → chunk-YXEKPMDK.js.map} +0 -0
- /package/dist/{cloudflare-SIG42OIW.js.map → cloudflare-F5DNYH4B.js.map} +0 -0
- /package/dist/{deno-deploy-LQAYOOPW.js.map → deno-deploy-47E7GIME.js.map} +0 -0
- /package/dist/{info-6WJ3JRNE.js.map → info-2H7I55YN.js.map} +0 -0
- /package/dist/{internal-api-4FBFRQ4G.js.map → internal-api-QKWTQ2Q7.js.map} +0 -0
- /package/dist/{internal-api-W5RURFU7.js.map → internal-api-VRUDDBEG.js.map} +0 -0
- /package/dist/{load-config-BKUAMGO5.js.map → load-config-VMKOV44Y.js.map} +0 -0
- /package/dist/{mcp-I5HCW4QF.js.map → mcp-WMZSXQQG.js.map} +0 -0
- /package/dist/{netlify-C2IRCZKI.js.map → netlify-BJQGPMGY.js.map} +0 -0
- /package/dist/{openapi-WDX3XX2J.js.map → openapi-SKKXWFX4.js.map} +0 -0
- /package/dist/{preview-PWGO5LUE.js.map → preview-GUEKVBGL.js.map} +0 -0
- /package/dist/{registry-3LUHO4IB.js.map → registry-APCN3PSJ.js.map} +0 -0
- /package/dist/{routes-A2YLFEYC.js.map → routes-ECCDRHXZ.js.map} +0 -0
- /package/dist/{schema-WKTNTGX6.js.map → schema-ND7GHPQK.js.map} +0 -0
- /package/dist/{server-boundary-CJIXOPCF.js.map → server-boundary-7BRS2CWI.js.map} +0 -0
- /package/dist/{server-boundary-WVWEJNUJ.js.map → server-boundary-OEBKNBEP.js.map} +0 -0
- /package/dist/{start-KEWSYVVU.js.map → start-AKMBT3DW.js.map} +0 -0
- /package/dist/{vercel-BMCQKCWE.js.map → vercel-BEDGUVXX.js.map} +0 -0
- /package/dist/{vite-plugin-TU3HQA43.js.map → vite-plugin-37OQ5RDR.js.map} +0 -0
|
@@ -16,10 +16,10 @@ import {
|
|
|
16
16
|
handleCspReport,
|
|
17
17
|
handleCsrfReadiness,
|
|
18
18
|
mountAgent
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-KVZQJ3ZM.js";
|
|
20
20
|
import {
|
|
21
21
|
resolveProvider
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-WFIAYPBH.js";
|
|
23
23
|
import {
|
|
24
24
|
dispatchControllerRequest,
|
|
25
25
|
incomingMessageToHandlerRequest,
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
} from "./chunk-L4TB6FXQ.js";
|
|
28
28
|
import {
|
|
29
29
|
generateNonce
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-VV2VU3LJ.js";
|
|
31
31
|
import {
|
|
32
32
|
TRACE_HEADER,
|
|
33
33
|
extractTraceId
|
|
@@ -87,4 +87,4 @@ export {
|
|
|
87
87
|
scanWebSocketRoutes,
|
|
88
88
|
sendError
|
|
89
89
|
};
|
|
90
|
-
//# sourceMappingURL=internal-api-
|
|
90
|
+
//# sourceMappingURL=internal-api-QKWTQ2Q7.js.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
dispatchControllerRequest
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Q3UE7WIM.js";
|
|
4
4
|
import {
|
|
5
5
|
mountAgent
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-H2X5T45M.js";
|
|
7
7
|
import {
|
|
8
8
|
CSP_REPORT_PATH,
|
|
9
9
|
CsrfReadinessStore,
|
|
10
10
|
applySecurityHeaders,
|
|
11
11
|
handleCspReport,
|
|
12
12
|
handleCsrfReadiness
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import "./chunk-
|
|
13
|
+
} from "./chunk-EYRWD2AB.js";
|
|
14
|
+
import "./chunk-5GZROLDV.js";
|
|
15
15
|
import {
|
|
16
16
|
BATCH_PATH,
|
|
17
17
|
createCorsHandler,
|
|
@@ -20,11 +20,11 @@ import {
|
|
|
20
20
|
handleBatchRequest,
|
|
21
21
|
incomingMessageToHandlerRequest,
|
|
22
22
|
sendError
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-5AGNZXHJ.js";
|
|
24
24
|
import "./chunk-P6OS7652.js";
|
|
25
25
|
import "./chunk-ZDUO4IYN.js";
|
|
26
26
|
import "./chunk-D4VP2QPR.js";
|
|
27
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-ENRT6DAU.js";
|
|
28
28
|
import "./chunk-47FFT43U.js";
|
|
29
29
|
import {
|
|
30
30
|
findSuggestion
|
|
@@ -64,7 +64,7 @@ import "./chunk-ACKBVBUI.js";
|
|
|
64
64
|
import "./chunk-IZ3TIL6K.js";
|
|
65
65
|
import {
|
|
66
66
|
resolveProvider
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-45XETXSG.js";
|
|
68
68
|
import "./chunk-YSJOZEI6.js";
|
|
69
69
|
import {
|
|
70
70
|
generateNonce
|
|
@@ -107,4 +107,4 @@ export {
|
|
|
107
107
|
scanWebSocketRoutes,
|
|
108
108
|
sendError
|
|
109
109
|
};
|
|
110
|
-
//# sourceMappingURL=internal-api-
|
|
110
|
+
//# sourceMappingURL=internal-api-VRUDDBEG.js.map
|
|
@@ -3,14 +3,14 @@ import "tsx/esm";
|
|
|
3
3
|
import {
|
|
4
4
|
deepMerge,
|
|
5
5
|
loadConfig
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-FFS7IRZF.js";
|
|
7
7
|
import "./chunk-3QPVEJ7D.js";
|
|
8
8
|
import "./chunk-U5PWXS3J.js";
|
|
9
|
-
import "./chunk-
|
|
9
|
+
import "./chunk-TMQ52AZR.js";
|
|
10
10
|
import "./chunk-ZNZISJDZ.js";
|
|
11
11
|
import "./chunk-OSBGZYXZ.js";
|
|
12
12
|
export {
|
|
13
13
|
deepMerge,
|
|
14
14
|
loadConfig
|
|
15
15
|
};
|
|
16
|
-
//# sourceMappingURL=load-config-
|
|
16
|
+
//# sourceMappingURL=load-config-VMKOV44Y.js.map
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
import "tsx/esm";
|
|
3
3
|
import {
|
|
4
4
|
createAgentSsrLoader
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-YXEKPMDK.js";
|
|
6
6
|
import {
|
|
7
7
|
extractAppResources,
|
|
8
8
|
handleMcpJsonRpc
|
|
9
9
|
} from "./chunk-2CVV6CNN.js";
|
|
10
|
-
import "./chunk-
|
|
10
|
+
import "./chunk-WFIAYPBH.js";
|
|
11
11
|
import {
|
|
12
12
|
scanAgents
|
|
13
13
|
} from "./chunk-5NNFO7R7.js";
|
|
@@ -46,7 +46,7 @@ async function serveMcpStdio(mod, name, appResources, streams) {
|
|
|
46
46
|
// src/cli/commands/mcp.ts
|
|
47
47
|
async function mcpCommand(name, deps = {}) {
|
|
48
48
|
const projectRoot = deps.projectRoot ?? process.cwd();
|
|
49
|
-
const agentsDir = deps.agentsDir ?? (await (await import("./load-config-
|
|
49
|
+
const agentsDir = deps.agentsDir ?? (await (await import("./load-config-VMKOV44Y.js")).loadConfig(projectRoot)).agentsDir;
|
|
50
50
|
const agent = scanAgents(projectRoot, agentsDir).find((a) => a.name === name);
|
|
51
51
|
if (!agent) {
|
|
52
52
|
const names = scanAgents(projectRoot, agentsDir).map((a) => a.name).join(", ");
|
|
@@ -75,4 +75,4 @@ async function mcpCommand(name, deps = {}) {
|
|
|
75
75
|
export {
|
|
76
76
|
mcpCommand
|
|
77
77
|
};
|
|
78
|
-
//# sourceMappingURL=mcp-
|
|
78
|
+
//# sourceMappingURL=mcp-WMZSXQQG.js.map
|
|
@@ -7,13 +7,13 @@ import {
|
|
|
7
7
|
deployedTraceFragment,
|
|
8
8
|
describeDeployedSecurityHeaders,
|
|
9
9
|
renderSecurityHeadersConfigLiteral
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-VPX3MS5D.js";
|
|
11
11
|
import {
|
|
12
12
|
nodeAdapter
|
|
13
13
|
} from "./chunk-KI4DOTN4.js";
|
|
14
14
|
import {
|
|
15
15
|
buildSecurityHeaders
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-VV2VU3LJ.js";
|
|
17
17
|
import {
|
|
18
18
|
assertServicesUnsupported,
|
|
19
19
|
readManifest
|
|
@@ -242,4 +242,4 @@ export {
|
|
|
242
242
|
netlifyAdapter,
|
|
243
243
|
renderNetlifyFunction
|
|
244
244
|
};
|
|
245
|
-
//# sourceMappingURL=netlify-
|
|
245
|
+
//# sourceMappingURL=netlify-BJQGPMGY.js.map
|
|
@@ -12,10 +12,10 @@ import "./chunk-NO6HA4FG.js";
|
|
|
12
12
|
import "./chunk-Z7CJHDLS.js";
|
|
13
13
|
import {
|
|
14
14
|
loadConfig
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-FFS7IRZF.js";
|
|
16
16
|
import "./chunk-3QPVEJ7D.js";
|
|
17
17
|
import "./chunk-U5PWXS3J.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-TMQ52AZR.js";
|
|
19
19
|
import "./chunk-ZNZISJDZ.js";
|
|
20
20
|
import "./chunk-OSBGZYXZ.js";
|
|
21
21
|
|
|
@@ -84,4 +84,4 @@ function emitOpenApiInMemory(manifest, config) {
|
|
|
84
84
|
export {
|
|
85
85
|
openapiCommand
|
|
86
86
|
};
|
|
87
|
-
//# sourceMappingURL=openapi-
|
|
87
|
+
//# sourceMappingURL=openapi-SKKXWFX4.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-22OMF3NG.js"),
|
|
8
|
+
import("./start-AKMBT3DW.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-GUEKVBGL.js.map
|
|
@@ -60,6 +60,23 @@ interface ProviderDescriptor {
|
|
|
60
60
|
* contradicts the real one is a debugging trap rather than a harmless inaccuracy.
|
|
61
61
|
*/
|
|
62
62
|
baseUrlEnv?: string;
|
|
63
|
+
/**
|
|
64
|
+
* True when this provider is a GATEWAY — it serves other providers' catalogs under their own
|
|
65
|
+
* model ids, reachable by prefixing its name (`openrouter/openai/gpt-4o-mini`).
|
|
66
|
+
*
|
|
67
|
+
* It changes nothing about resolution. It exists so the refusal below can name a model id that
|
|
68
|
+
* would work instead of only the variable that is missing (#554): a scaffold shipping
|
|
69
|
+
* `openai/gpt-4o-mini` and an `.env.example` asking for `OPENROUTER_API_KEY` produced an error
|
|
70
|
+
* naming `OPENAI_API_KEY` — the one key the reader was never told to get — while the key they had
|
|
71
|
+
* serves that exact id through the gateway.
|
|
72
|
+
*
|
|
73
|
+
* Deliberately NOT a licence to substitute. Every caller here takes `.apiKey` and discards
|
|
74
|
+
* `.baseUrl`; the SDK picks the endpoint from the model id (measured: `openai/gpt-4o-mini` →
|
|
75
|
+
* `api.openai.com`, `openrouter/openai/gpt-4o-mini` → `openrouter.ai`). Handing an OpenRouter key
|
|
76
|
+
* to a request bound for OpenAI is #326 exactly, so the caller changes the id and the routing
|
|
77
|
+
* follows — the framework does not change it for them.
|
|
78
|
+
*/
|
|
79
|
+
gateway?: boolean;
|
|
63
80
|
/** Resolution priority (lower = higher priority). FIRST match wins. */
|
|
64
81
|
priority: number;
|
|
65
82
|
}
|
|
@@ -4,13 +4,13 @@ import "tsx/esm";
|
|
|
4
4
|
// src/adapters/registry.ts
|
|
5
5
|
var adapterRegistry = {
|
|
6
6
|
node: async () => (await import("./node-OSVPYQ3D.js")).nodeAdapter,
|
|
7
|
-
vercel: async () => (await import("./vercel-
|
|
8
|
-
cloudflare: async () => (await import("./cloudflare-
|
|
7
|
+
vercel: async () => (await import("./vercel-BEDGUVXX.js")).vercelAdapter,
|
|
8
|
+
cloudflare: async () => (await import("./cloudflare-F5DNYH4B.js")).cloudflareAdapter,
|
|
9
9
|
static: async () => (await import("./static-SVDWIOXJ.js")).staticAdapter,
|
|
10
|
-
bun: async () => (await import("./bun-
|
|
11
|
-
"deno-deploy": async () => (await import("./deno-deploy-
|
|
12
|
-
netlify: async () => (await import("./netlify-
|
|
13
|
-
"aws-lambda": async () => (await import("./aws-lambda-
|
|
10
|
+
bun: async () => (await import("./bun-MAAG4MKW.js")).bunAdapter,
|
|
11
|
+
"deno-deploy": async () => (await import("./deno-deploy-47E7GIME.js")).denoDeployAdapter,
|
|
12
|
+
netlify: async () => (await import("./netlify-BJQGPMGY.js")).netlifyAdapter,
|
|
13
|
+
"aws-lambda": async () => (await import("./aws-lambda-2R77AV5F.js")).awsLambdaAdapter,
|
|
14
14
|
"theo-cloud": async () => (await import("./theo-cloud-3ET4G5T6.js")).theoCloudAdapter
|
|
15
15
|
};
|
|
16
16
|
async function resolveAdapter(target) {
|
|
@@ -20,4 +20,4 @@ async function resolveAdapter(target) {
|
|
|
20
20
|
export {
|
|
21
21
|
resolveAdapter
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=registry-
|
|
23
|
+
//# sourceMappingURL=registry-APCN3PSJ.js.map
|
|
@@ -32,7 +32,26 @@ interface RoutePolicyInput<TQuery = unknown, TBody = unknown, TParams = unknown>
|
|
|
32
32
|
* like a route nobody thought about (ADR 0001 section Consequences, Risks).
|
|
33
33
|
*/
|
|
34
34
|
type RoutePolicy<TQuery = unknown, TBody = unknown, TParams = unknown> = 'public' | ((input: RoutePolicyInput<TQuery, TBody, TParams>) => boolean | AccessDecision | Promise<boolean | AccessDecision>);
|
|
35
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* Narrow a RUN-CONTEXT to the subject it carries, if it carries one.
|
|
37
|
+
*
|
|
38
|
+
* The argument is the object `server/context.ts` builds — the one with `subject` on it. It is NOT a
|
|
39
|
+
* controller guard's `ExecutionContext`, and telling a caller so is the whole reason for the throw
|
|
40
|
+
* below (usetheokit/theokit#574).
|
|
41
|
+
*
|
|
42
|
+
* An `ExecutionContext` carries `getRequest`, `getUrl`, `getClass` and `getMethodName` and nothing
|
|
43
|
+
* else, so this function used to answer `null` for it — indistinguishable from "an anonymous
|
|
44
|
+
* caller". A guard written as `subjectFromContext(context) !== null` therefore denied EVERYONE, and
|
|
45
|
+
* passed the only test aimed at it, because that test asserted an unauthenticated request is
|
|
46
|
+
* refused. A guard that always denies is indistinguishable from a working one until somebody tries
|
|
47
|
+
* to get in.
|
|
48
|
+
*
|
|
49
|
+
* That is a silent, fail-CLOSED defect, which is the worst combination: nothing errors, nothing
|
|
50
|
+
* logs, and the failure looks like the feature. `error-handling.md` § 2 is unambiguous here — fail
|
|
51
|
+
* fast, fail loud, and never return a magic value for a caller mistake.
|
|
52
|
+
*
|
|
53
|
+
* @throws TypeError when handed an `ExecutionContext` instead of a run-context.
|
|
54
|
+
*/
|
|
36
55
|
declare function subjectFromContext(context: unknown): RouteSubject | null;
|
|
37
56
|
/**
|
|
38
57
|
* Evaluate a route policy. THE single implementation - the HTTP executors and
|
|
@@ -11,10 +11,10 @@ import {
|
|
|
11
11
|
import "./chunk-Z7CJHDLS.js";
|
|
12
12
|
import {
|
|
13
13
|
loadConfig
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-FFS7IRZF.js";
|
|
15
15
|
import "./chunk-3QPVEJ7D.js";
|
|
16
16
|
import "./chunk-U5PWXS3J.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-TMQ52AZR.js";
|
|
18
18
|
import "./chunk-ZNZISJDZ.js";
|
|
19
19
|
import "./chunk-OSBGZYXZ.js";
|
|
20
20
|
|
|
@@ -64,4 +64,4 @@ async function routesCommand() {
|
|
|
64
64
|
export {
|
|
65
65
|
routesCommand
|
|
66
66
|
};
|
|
67
|
-
//# sourceMappingURL=routes-
|
|
67
|
+
//# sourceMappingURL=routes-ECCDRHXZ.js.map
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import "tsx/esm";
|
|
3
3
|
import {
|
|
4
4
|
theoConfigSchema
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-TMQ52AZR.js";
|
|
6
6
|
import "./chunk-ZNZISJDZ.js";
|
|
7
7
|
import {
|
|
8
8
|
cacheSchema,
|
|
@@ -17,4 +17,4 @@ export {
|
|
|
17
17
|
storageSchema,
|
|
18
18
|
theoConfigSchema
|
|
19
19
|
};
|
|
20
|
-
//# sourceMappingURL=schema-
|
|
20
|
+
//# sourceMappingURL=schema-ND7GHPQK.js.map
|
|
@@ -45,6 +45,11 @@
|
|
|
45
45
|
* in animation directives
|
|
46
46
|
* - img-src 'self' data: blob: — supports inline data URIs, blobs
|
|
47
47
|
* from canvas exports
|
|
48
|
+
* - media-src 'self' data: blob: — same reasoning for audio/video the app
|
|
49
|
+
* generated itself. Absent until #553:
|
|
50
|
+
* `<audio>` fell back to default-src
|
|
51
|
+
* and a blob: from plugin-voice's TTS
|
|
52
|
+
* was blocked in the browser
|
|
48
53
|
* - font-src 'self' data: — Geist fonts inline-base64
|
|
49
54
|
* - connect-src 'self' ws: wss: — WebSocket dev HMR + agent streams
|
|
50
55
|
* - frame-ancestors 'none' — clickjacking defense
|
|
@@ -3,8 +3,8 @@ import { C as CustomTool } from '../../define-agent-tool-aYYLpMeo.js';
|
|
|
3
3
|
import { AcpTransport } from '@theokit/agents';
|
|
4
4
|
export { InProcessApprovalRequest, InProcessApprovalRequiredError, InProcessAwaitApproval, StreamAgentTurnDeps, StreamAgentTurnInProcessInput, streamAgentTurnInProcess } from '@theokit/agents';
|
|
5
5
|
import { CustomTool as CustomTool$1 } from '@theokit/sdk';
|
|
6
|
-
import { V as VerifyFn } from '../../
|
|
7
|
-
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-
|
|
6
|
+
import { V as VerifyFn, S as SubscribeFn } from '../../whatsapp-D_Fnl1LX.js';
|
|
7
|
+
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-1aWi_WSz.js';
|
|
8
8
|
|
|
9
9
|
/**
|
|
10
10
|
* M26 (ADR-0041) — `createWorkflowTool`: wrap an SDK `Workflow` as a `CustomTool`.
|
|
@@ -218,6 +218,19 @@ interface ChannelMessage {
|
|
|
218
218
|
interface ChannelWebhookConfig {
|
|
219
219
|
/** Per-platform signature validators (e.g. `{ slack: slack({...}), telegram: telegram({...}) }`). */
|
|
220
220
|
validators: Record<string, VerifyFn>;
|
|
221
|
+
/**
|
|
222
|
+
* Per-platform responders for the GET a platform sends to VERIFY the endpoint before it will
|
|
223
|
+
* subscribe it (e.g. `{ whatsapp: whatsappSubscribe({ verifyToken }) }`).
|
|
224
|
+
*
|
|
225
|
+
* Separate from `validators` because it answers a different question at a different moment: a
|
|
226
|
+
* validator authenticates a delivery, this authenticates a subscription request, and a platform
|
|
227
|
+
* may need one, both, or neither. Per-platform rather than a bare `verifyToken` on this config,
|
|
228
|
+
* because the query parameters are Meta's — shared with Instagram and Messenger, not universal —
|
|
229
|
+
* and putting them here would bake one platform's shape into the seam (#556).
|
|
230
|
+
*
|
|
231
|
+
* A platform with no entry answers 405 on a GET: the route exists and does not do that.
|
|
232
|
+
*/
|
|
233
|
+
subscribe?: Record<string, SubscribeFn>;
|
|
221
234
|
/** Handoff seam — wire the SDK gateway / agent here. Invoked only after signature validation. */
|
|
222
235
|
onMessage: (message: ChannelMessage) => void | Promise<void>;
|
|
223
236
|
}
|
|
@@ -226,6 +239,8 @@ interface ChannelWebhookConfig {
|
|
|
226
239
|
* 404 UNKNOWN_PLATFORM — no validator configured for `<platform>`
|
|
227
240
|
* 400 BAD_REQUEST — path is not a channel webhook, or the body is not JSON
|
|
228
241
|
* 401 INVALID_SIGNATURE — the platform signature check failed (negative case)
|
|
242
|
+
* 405 SUBSCRIBE_UNSUPPORTED — a GET on a platform that declared no `subscribe` responder
|
|
243
|
+
* 200 `<challenge>` — subscribe handshake accepted (text/plain, per Meta's requirement)
|
|
229
244
|
* 200 { ok: true } — validated + handed to `onMessage`
|
|
230
245
|
*/
|
|
231
246
|
declare function handleChannelWebhook(request: Request, urlPath: string, config: ChannelWebhookConfig): Promise<Response>;
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
parseChannelPath,
|
|
13
13
|
serveMcpStdio,
|
|
14
14
|
streamAgentTurnInProcess
|
|
15
|
-
} from "../../chunk-
|
|
15
|
+
} from "../../chunk-OH32SN46.js";
|
|
16
16
|
import "../../chunk-DVUJLMTF.js";
|
|
17
17
|
import {
|
|
18
18
|
buildResourceDescriptors,
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
resetProviderRegistry,
|
|
27
27
|
resolveProvider,
|
|
28
28
|
tryResolveProvider
|
|
29
|
-
} from "../../chunk-
|
|
29
|
+
} from "../../chunk-45XETXSG.js";
|
|
30
30
|
import "../../chunk-XTHN6JBX.js";
|
|
31
31
|
export {
|
|
32
32
|
CodeModePermissionDeniedError,
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { R as RouteConfig } from '../../route-config-
|
|
1
|
+
import { R as RouteConfig } from '../../route-config-B7FaTSby.js';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import { W as WebSocketHandler, b as WebSocketLike } from '../../define-websocket-DzPn1sR6.js';
|
|
4
4
|
export { a as WebSocketHandlerWeb } from '../../define-websocket-DzPn1sR6.js';
|
|
5
5
|
import { b as ToolTransform, C as CustomTool } from '../../define-agent-tool-aYYLpMeo.js';
|
|
6
6
|
export { D as DefineAgentToolSpec, T as ToolContextMessage, a as ToolHandlerContext, c as applyTransform } from '../../define-agent-tool-aYYLpMeo.js';
|
|
7
|
-
import { R as RoutePolicy } from '../../route-policy-
|
|
8
|
-
export { A as AccessDecision, b as RoutePolicyInput, a as RouteSubject, e as evaluateRoutePolicy, r as requireOwner, s as subjectFromContext } from '../../route-policy-
|
|
7
|
+
import { R as RoutePolicy } from '../../route-policy-BHXQDzBF.js';
|
|
8
|
+
export { A as AccessDecision, b as RoutePolicyInput, a as RouteSubject, e as evaluateRoutePolicy, r as requireOwner, s as subjectFromContext } from '../../route-policy-BHXQDzBF.js';
|
|
9
9
|
import { c as OnRequestHook, f as PreHandlerHook, d as OnResponseHook, O as OnErrorHook, T as TheoPlugin } from '../../plugin-types-BUVfUQ0V.js';
|
|
10
|
+
export { b as HookName, P as PluginContext, e as PluginErrorContext } from '../../plugin-types-BUVfUQ0V.js';
|
|
10
11
|
import { WireChunk } from '@theokit/presenter/wire';
|
|
11
12
|
import { IncomingMessage } from 'node:http';
|
|
12
13
|
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-C0hk64_U.js';
|
|
@@ -402,4 +403,4 @@ interface WebChannelHandler<TMessage = unknown> {
|
|
|
402
403
|
*/
|
|
403
404
|
declare function defineWebChannel<TMessage = unknown>(handler: WebChannelHandler<TMessage>): WebChannelHandler<TMessage>;
|
|
404
405
|
|
|
405
|
-
export { type ActionAccept, type ActionBuilder, type ActionConfig, type ChannelHandler, CustomTool, type MiddlewareBuilder, type MiddlewareHandler, type PluginBuilder, type RouteBuilder, RouteConfig, RoutePolicy, type ToolBuilder, ToolTransform, type WebChannelHandler, type WebSocketBuilder, WebSocketHandler, WebSocketLike, action, defineChannel, defineWebChannel, middleware, plugin, route, tool, uiMessageStreamResponse, websocket };
|
|
406
|
+
export { type ActionAccept, type ActionBuilder, type ActionConfig, type ChannelHandler, CustomTool, type MiddlewareBuilder, type MiddlewareHandler, OnErrorHook, OnRequestHook, OnResponseHook, type PluginBuilder, PreHandlerHook, type RouteBuilder, RouteConfig, RoutePolicy, TheoPlugin, type ToolBuilder, ToolTransform, type WebChannelHandler, type WebSocketBuilder, WebSocketHandler, WebSocketLike, action, defineChannel, defineWebChannel, middleware, plugin, route, tool, uiMessageStreamResponse, websocket };
|
|
@@ -1,4 +1,4 @@
|
|
|
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 MiddlewareResult, N as NotFoundError, p as ProcedureInputError, q as ProcedureOutputError, S as STRIPPED_HEADERS, u as SendErrorInput, v as SendErrorOptions, T as TRACE_HEADER, w as TRACE_PARENT_HEADER, x as TheoError, W as W3CTraceContext, _ as _resetMiddlewareCacheForTests, z as appendCookieToHeaders, A as appendDeleteCookieToHeaders, D as callProcedure, G as createCorsHandler, I as createCorsWebHandler, J as createOpenApiHandler, K as createServerContext, L as deleteCookie, Q as envelopeCodeToStatus, V as executeAction, X as executeRoute, Y as executeWebRequest, Z 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 jsonTransformer, a8 as loadCustomErrorPages, a9 as matchesOrigin, aa as parseCookieHeader, ab as parseRequestBody, ac as parseTraceparent, ad as parseTraceparentContext, ae as resolveTransformer, af as runMiddlewareAndContext, ag as sendError, ah as sendJson, ai as serializeCookie, aj as serveStaticFile, ak as serverErrorToEnvelope, al as setCookie, am as superjsonTransformer, an as validateRouteInput } from '../../index-
|
|
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 MiddlewareResult, N as NotFoundError, p as ProcedureInputError, q as ProcedureOutputError, S as STRIPPED_HEADERS, u as SendErrorInput, v as SendErrorOptions, T as TRACE_HEADER, w as TRACE_PARENT_HEADER, x as TheoError, W as W3CTraceContext, _ as _resetMiddlewareCacheForTests, z as appendCookieToHeaders, A as appendDeleteCookieToHeaders, D as callProcedure, G as createCorsHandler, I as createCorsWebHandler, J as createOpenApiHandler, K as createServerContext, L as deleteCookie, Q as envelopeCodeToStatus, V as executeAction, X as executeRoute, Y as executeWebRequest, Z 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 jsonTransformer, a8 as loadCustomErrorPages, a9 as matchesOrigin, aa as parseCookieHeader, ab as parseRequestBody, ac as parseTraceparent, ad as parseTraceparentContext, ae as resolveTransformer, af as runMiddlewareAndContext, ag as sendError, ah as sendJson, ai as serializeCookie, aj as serveStaticFile, ak as serverErrorToEnvelope, al as setCookie, am as superjsonTransformer, an as validateRouteInput } from '../../index-BXGSBlxf.js';
|
|
2
2
|
export { A as ActionError, b as ActionInputError, f as extractUniversalIssues, i as isActionError, d as isInputError } from '../../action-protocol-tGm3NKRg.js';
|
|
3
3
|
import '../../error-envelope-DG47lt8E.js';
|
|
4
4
|
import 'node:http';
|
|
@@ -10,5 +10,5 @@ import 'vite';
|
|
|
10
10
|
import '../../csrf-Dgot9qSM.js';
|
|
11
11
|
import '../../audit-log-BQWM5YLG.js';
|
|
12
12
|
import 'zod';
|
|
13
|
-
import '../../route-config-
|
|
14
|
-
import '../../route-policy-
|
|
13
|
+
import '../../route-config-B7FaTSby.js';
|
|
14
|
+
import '../../route-policy-BHXQDzBF.js';
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
createOpenApiHandler,
|
|
7
7
|
loadCustomErrorPages,
|
|
8
8
|
serveStaticFile
|
|
9
|
-
} from "../../chunk-
|
|
9
|
+
} from "../../chunk-4BQIJ4HE.js";
|
|
10
10
|
import {
|
|
11
11
|
jsonTransformer,
|
|
12
12
|
resolveTransformer,
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
sendError,
|
|
32
32
|
sendJson,
|
|
33
33
|
validateRouteInput
|
|
34
|
-
} from "../../chunk-
|
|
34
|
+
} from "../../chunk-5AGNZXHJ.js";
|
|
35
35
|
import "../../chunk-P6OS7652.js";
|
|
36
36
|
import {
|
|
37
37
|
ActionError,
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
isInputError
|
|
42
42
|
} from "../../chunk-ZDUO4IYN.js";
|
|
43
43
|
import "../../chunk-D4VP2QPR.js";
|
|
44
|
-
import "../../chunk-
|
|
44
|
+
import "../../chunk-ENRT6DAU.js";
|
|
45
45
|
import "../../chunk-47FFT43U.js";
|
|
46
46
|
import {
|
|
47
47
|
FileTooLargeError,
|
package/dist/server/index.d.ts
CHANGED
|
@@ -1,16 +1,17 @@
|
|
|
1
|
-
import { R as RouteConfig } from '../route-config-
|
|
1
|
+
import { R as RouteConfig } from '../route-config-B7FaTSby.js';
|
|
2
2
|
export { ActionAccept, ActionBuilder, ActionConfig, ChannelHandler, MiddlewareBuilder, MiddlewareHandler, PluginBuilder, RouteBuilder, ToolBuilder, WebChannelHandler, WebSocketBuilder, action, defineChannel, defineWebChannel, middleware, plugin, route, tool, uiMessageStreamResponse, websocket } from './define/index.js';
|
|
3
3
|
export { W as WebSocketHandler, a as WebSocketHandlerWeb, b as WebSocketLike } from '../define-websocket-DzPn1sR6.js';
|
|
4
4
|
export { C as CustomTool, D as DefineAgentToolSpec, T as ToolContextMessage, a as ToolHandlerContext, b as ToolTransform, c as applyTransform } from '../define-agent-tool-aYYLpMeo.js';
|
|
5
|
-
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-
|
|
5
|
+
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';
|
|
6
|
+
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';
|
|
6
7
|
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-C0hk64_U.js';
|
|
7
|
-
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 MiddlewareResult, N as NotFoundError, O as OpenApiDocsOptions, P as ParsedBody, o as ProcedureInput, p as ProcedureInputError, q as ProcedureOutputError, R as RawRouteInput, r as RouteInputChannel, s as RouteInputSchemas, t as RouteInputValidation, S as STRIPPED_HEADERS, u as SendErrorInput, v as SendErrorOptions, T as TRACE_HEADER, w as TRACE_PARENT_HEADER, x as TheoError, y as TheoTransformer, U as UploadedFile, W as W3CTraceContext, _ as _resetMiddlewareCacheForTests, z as appendCookieToHeaders, A as appendDeleteCookieToHeaders, D as callProcedure, G as createCorsHandler, I as createCorsWebHandler, J as createOpenApiHandler, K as createServerContext, L as deleteCookie, Q as envelopeCodeToStatus, V as executeAction, X as executeRoute, Y as executeWebRequest, Z 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 jsonTransformer, a8 as loadCustomErrorPages, a9 as matchesOrigin, aa as parseCookieHeader, ab as parseRequestBody, ac as parseTraceparent, ad as parseTraceparentContext, ae as resolveTransformer, af as runMiddlewareAndContext, ag as sendError, ah as sendJson, ai as serializeCookie, aj as serveStaticFile, ak as serverErrorToEnvelope, al as setCookie, am as superjsonTransformer, an as validateRouteInput } from '../index-
|
|
8
|
+
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 MiddlewareResult, N as NotFoundError, O as OpenApiDocsOptions, P as ParsedBody, o as ProcedureInput, p as ProcedureInputError, q as ProcedureOutputError, R as RawRouteInput, r as RouteInputChannel, s as RouteInputSchemas, t as RouteInputValidation, S as STRIPPED_HEADERS, u as SendErrorInput, v as SendErrorOptions, T as TRACE_HEADER, w as TRACE_PARENT_HEADER, x as TheoError, y as TheoTransformer, U as UploadedFile, W as W3CTraceContext, _ as _resetMiddlewareCacheForTests, z as appendCookieToHeaders, A as appendDeleteCookieToHeaders, D as callProcedure, G as createCorsHandler, I as createCorsWebHandler, J as createOpenApiHandler, K as createServerContext, L as deleteCookie, Q as envelopeCodeToStatus, V as executeAction, X as executeRoute, Y as executeWebRequest, Z 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 jsonTransformer, a8 as loadCustomErrorPages, a9 as matchesOrigin, aa as parseCookieHeader, ab as parseRequestBody, ac as parseTraceparent, ad as parseTraceparentContext, ae as resolveTransformer, af as runMiddlewareAndContext, ag as sendError, ah as sendJson, ai as serializeCookie, aj as serveStaticFile, ak as serverErrorToEnvelope, al as setCookie, am as superjsonTransformer, an as validateRouteInput } from '../index-BXGSBlxf.js';
|
|
8
9
|
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';
|
|
9
10
|
export { ACTION_SCHEMAS_DIR, ActionNode, ActionScanError, LoadedManifest, ManifestAction, ManifestAgent, ManifestRoute, ManifestWebSocket, TheoManifest, WebSocketRouteNode, _resetRouteScanCacheForTests, compareRouteSpecificity, generateManifest, loadManifest, scanMiddlewares, scanServerActions, scanServerActionsEnriched, scanServerRoutes, scanWebSocketRoutes, writeManifest } from './scan/index.js';
|
|
10
11
|
export { L as LoadModule, S as ServerRouteNode, c as compilePattern, a as createProductionLoader, b as createViteLoader, m as matchRoute } from '../match-Dw4CNXJH.js';
|
|
11
12
|
export { AcpToolConfig, AppResource, AppResourceInput, ChannelMessage, ChannelWebhookConfig, CodeModeApi, CodeModeConfig, CodeModePermission, CodeModePermissionDeniedError, McpResourceContents, McpResourceDescriptor, NodeAcpTransport, Sandbox, StdioStreams, VendorAgentClient, VendorAgentToolConfig, WorkflowLike, WorkflowToolConfig, buildResourceDescriptors, createACPTool, createCodeMode, createVendorAgentTool, createWorkflowTool, defineAppResource, extractAppResources, handleChannelWebhook, handleMcpStdioLine, isChannelPath, parseChannelPath, readAppResource, serveMcpStdio } from './agent/index.js';
|
|
12
13
|
export { InProcessApprovalRequest, InProcessApprovalRequiredError, InProcessAwaitApproval, StreamAgentTurnDeps, StreamAgentTurnInProcessInput, streamAgentTurnInProcess } from '@theokit/agents';
|
|
13
|
-
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-
|
|
14
|
+
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-1aWi_WSz.js';
|
|
14
15
|
export { AuthRequiredError, BackupCode, BackupCodeOptions, OidcMetadata, PkceChallenge, SessionConfig, SessionManager, SessionManagerWeb, SessionMeta, ThrottleOptions, ThrottleState, TotpAlgorithm, TotpOptions, TotpUriOptions, VerifyTotpOptions, _resetKeyCacheForTests, assertProductionSecret, checkThrottle, clearOidcCache, createSessionManager, createSessionManagerWeb, decrypt, discoverOidcProvider, encrypt, generateBackupCodes, generateOAuthState, generatePkceChallenge, generateTotp, generateTotpSecret, pkceChallengeFromVerifier, recordAttempt, requireAuth, rotateIfNeeded, rotateIfNeededWeb, totpUri, verifyBackupCode, verifyOAuthState, verifyTotp } from './auth/index.js';
|
|
15
16
|
export { g as generateNonce } from '../nonce-BXt7Qu_C.js';
|
|
16
17
|
export { InMemoryUsageStorage, ToolHookEvent, TrackAgentRunInput, TrackAgentRunOptions, TrackAgentToolsHooks, TrackAgentToolsOptions, trackAgentRun, trackAgentTools } from './cost/index.js';
|
|
@@ -34,12 +35,11 @@ export { P as PostgresFactory, R as RedisFactory, S as StorageManager, g as getS
|
|
|
34
35
|
export { Db0Database, UnstorageInstance, useDatabase, useUnstorage } from './storage/index.js';
|
|
35
36
|
export { G as GenericFactory, b as PoolLike, P as PostgresDatabaseConfig, d as RedisLike, R as RedisServerConfig, a as ServerConfig, S as StorageAdapter, c as StorageConfig, T as TlsConfig } from '../storage-types-CFGPFIdB.js';
|
|
36
37
|
export { BodyTooLargeError, DEFAULT_MAX_BODY_BYTES, DiscordWebhookOptions, GitHubWebhookOptions, RawBodyResult, ReadRawBodyOptions, SlackWebhookOptions, StripeWebhookOptions, TelegramWebhookOptions, defineWebhook, discord, dispatchWebhook, github, readRawBody, slack, stripe, telegram, timingSafeEqual } from './webhook/index.js';
|
|
37
|
-
export { D as DefineWebhookOptions, V as VerifyFn,
|
|
38
|
+
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-D_Fnl1LX.js';
|
|
38
39
|
import { z } from 'zod';
|
|
39
|
-
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';
|
|
40
40
|
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';
|
|
41
41
|
export { a as ServiceDefinition, S as ServicesConfig, b as ServicesConfigInput, c as ServicesConfigOutput } from '../schema-BdakLtuC.js';
|
|
42
|
-
export { C as CspMode, D as DEFAULT_CSP, a as DEFAULT_PERMISSIONS_POLICY, c as SecurityEnv, S as SecurityHeadersConfig, d as SecurityHeadersOptions, b as buildSecurityHeaders } from '../security-headers-
|
|
42
|
+
export { C as CspMode, D as DEFAULT_CSP, a as DEFAULT_PERMISSIONS_POLICY, c as SecurityEnv, S as SecurityHeadersConfig, d as SecurityHeadersOptions, b as buildSecurityHeaders } from '../security-headers-C2cByfJn.js';
|
|
43
43
|
import '@theokit/presenter/wire';
|
|
44
44
|
import 'node:http';
|
|
45
45
|
import '../error-envelope-DG47lt8E.js';
|
package/dist/server/index.js
CHANGED
|
@@ -20,8 +20,10 @@ import {
|
|
|
20
20
|
slack,
|
|
21
21
|
stripe,
|
|
22
22
|
telegram,
|
|
23
|
-
timingSafeEqual
|
|
24
|
-
|
|
23
|
+
timingSafeEqual,
|
|
24
|
+
whatsapp,
|
|
25
|
+
whatsappSubscribe
|
|
26
|
+
} from "../chunk-KPZ2JSAU.js";
|
|
25
27
|
import {
|
|
26
28
|
action,
|
|
27
29
|
defineChannel,
|
|
@@ -41,7 +43,7 @@ import {
|
|
|
41
43
|
createOpenApiHandler,
|
|
42
44
|
loadCustomErrorPages,
|
|
43
45
|
serveStaticFile
|
|
44
|
-
} from "../chunk-
|
|
46
|
+
} from "../chunk-4BQIJ4HE.js";
|
|
45
47
|
import {
|
|
46
48
|
DuplicateJobNameError,
|
|
47
49
|
InMemoryJobBackend,
|
|
@@ -85,12 +87,12 @@ import {
|
|
|
85
87
|
handleCsrfReadinessRequest,
|
|
86
88
|
normalizeLegacy,
|
|
87
89
|
normalizeNew
|
|
88
|
-
} from "../chunk-
|
|
90
|
+
} from "../chunk-EYRWD2AB.js";
|
|
89
91
|
import {
|
|
90
92
|
DEFAULT_CSP,
|
|
91
93
|
DEFAULT_PERMISSIONS_POLICY,
|
|
92
94
|
buildSecurityHeaders
|
|
93
|
-
} from "../chunk-
|
|
95
|
+
} from "../chunk-5GZROLDV.js";
|
|
94
96
|
import {
|
|
95
97
|
jsonTransformer,
|
|
96
98
|
resolveTransformer,
|
|
@@ -115,7 +117,7 @@ import {
|
|
|
115
117
|
sendError,
|
|
116
118
|
sendJson,
|
|
117
119
|
validateRouteInput
|
|
118
|
-
} from "../chunk-
|
|
120
|
+
} from "../chunk-5AGNZXHJ.js";
|
|
119
121
|
import {
|
|
120
122
|
CSRF_WARN_CODE,
|
|
121
123
|
CSRF_WARN_DOCS_URL,
|
|
@@ -136,7 +138,7 @@ import {
|
|
|
136
138
|
evaluateRoutePolicy,
|
|
137
139
|
requireOwner,
|
|
138
140
|
subjectFromContext
|
|
139
|
-
} from "../chunk-
|
|
141
|
+
} from "../chunk-ENRT6DAU.js";
|
|
140
142
|
import {
|
|
141
143
|
DuplicateContextKeyError,
|
|
142
144
|
createOutbox,
|
|
@@ -244,7 +246,7 @@ import {
|
|
|
244
246
|
parseChannelPath,
|
|
245
247
|
serveMcpStdio,
|
|
246
248
|
streamAgentTurnInProcess
|
|
247
|
-
} from "../chunk-
|
|
249
|
+
} from "../chunk-OH32SN46.js";
|
|
248
250
|
import {
|
|
249
251
|
applyTransform
|
|
250
252
|
} from "../chunk-DVUJLMTF.js";
|
|
@@ -260,7 +262,7 @@ import {
|
|
|
260
262
|
resetProviderRegistry,
|
|
261
263
|
resolveProvider,
|
|
262
264
|
tryResolveProvider
|
|
263
|
-
} from "../chunk-
|
|
265
|
+
} from "../chunk-45XETXSG.js";
|
|
264
266
|
import {
|
|
265
267
|
AuthRequiredError,
|
|
266
268
|
_resetKeyCacheForTests,
|
|
@@ -1392,6 +1394,8 @@ export {
|
|
|
1392
1394
|
verifyTotp,
|
|
1393
1395
|
warnOnce,
|
|
1394
1396
|
websocket,
|
|
1397
|
+
whatsapp,
|
|
1398
|
+
whatsappSubscribe,
|
|
1395
1399
|
writeCronManifest,
|
|
1396
1400
|
writeJobManifest,
|
|
1397
1401
|
writeManifest
|