theokit 0.64.0 → 0.65.0-next.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.
Files changed (53) hide show
  1. package/dist/{actions-virtual-module-AD7HFFOF.js → actions-virtual-module-6QVMUINF.js} +2 -2
  2. package/dist/{actions-virtual-module-BKIT7HNS.js → actions-virtual-module-SYV4JN7B.js} +3 -3
  3. package/dist/{agent-PL3FR4HI.js → agent-66GYFKOK.js} +2 -2
  4. package/dist/{app-typed-client-AJRW3JJV.js → app-typed-client-4S33OHT4.js} +2 -2
  5. package/dist/{app-typed-client-NOXQEEVF.js → app-typed-client-KH27ZGRT.js} +3 -3
  6. package/dist/{build-C7CVA5AK.js → build-PKAYYRGE.js} +4 -4
  7. package/dist/{chunk-2NARRZPP.js → chunk-4DSRX3CO.js} +2 -2
  8. package/dist/{chunk-BQJBFHAY.js → chunk-N4JUQJGN.js} +2 -2
  9. package/dist/{chunk-5AQRVWSU.js → chunk-PIIVSFLF.js} +15 -13
  10. package/dist/{chunk-5AQRVWSU.js.map → chunk-PIIVSFLF.js.map} +1 -1
  11. package/dist/{chunk-JHUFPH7B.js → chunk-PLX5U76I.js} +17 -15
  12. package/dist/chunk-PLX5U76I.js.map +1 -0
  13. package/dist/{chunk-GDZOWQV7.js → chunk-QD5X56I3.js} +44 -4
  14. package/dist/chunk-QD5X56I3.js.map +1 -0
  15. package/dist/{chunk-2PF3TDM2.js → chunk-RE2WE7CD.js} +2 -2
  16. package/dist/{chunk-A3EMTZR2.js → chunk-WAYUHS54.js} +44 -4
  17. package/dist/chunk-WAYUHS54.js.map +1 -0
  18. package/dist/{chunk-6EV6FC7X.js → chunk-ZE2UHAET.js} +3 -3
  19. package/dist/cli/index.js +6 -6
  20. package/dist/{dev-HPUCCB3E.js → dev-O5J4UCNZ.js} +5 -5
  21. package/dist/index.js +2 -2
  22. package/dist/{internal-api-TOUFX6VZ.js → internal-api-J6WBHES5.js} +2 -2
  23. package/dist/{internal-api-TZTO4VMP.js → internal-api-LSB5E7BR.js} +3 -3
  24. package/dist/{mcp-AFLDYTK5.js → mcp-FYEOYYNR.js} +2 -2
  25. package/dist/{preview-M3DWFVKB.js → preview-KWRFNXXW.js} +3 -3
  26. package/dist/{server-boundary-Z5LSU7ZW.js → server-boundary-AS2UEMW5.js} +3 -3
  27. package/dist/{server-boundary-FBHI5NZP.js → server-boundary-PXJZNZAX.js} +2 -2
  28. package/dist/{start-QAPAZ2YC.js → start-2U7TL4CM.js} +10 -6
  29. package/dist/{start-QAPAZ2YC.js.map → start-2U7TL4CM.js.map} +1 -1
  30. package/dist/vite-plugin/index.js +2 -2
  31. package/dist/{vite-plugin-ZT2XNAGM.js → vite-plugin-TS6MGV5R.js} +5 -5
  32. package/package.json +1 -1
  33. package/dist/chunk-A3EMTZR2.js.map +0 -1
  34. package/dist/chunk-GDZOWQV7.js.map +0 -1
  35. package/dist/chunk-JHUFPH7B.js.map +0 -1
  36. /package/dist/{actions-virtual-module-AD7HFFOF.js.map → actions-virtual-module-6QVMUINF.js.map} +0 -0
  37. /package/dist/{actions-virtual-module-BKIT7HNS.js.map → actions-virtual-module-SYV4JN7B.js.map} +0 -0
  38. /package/dist/{agent-PL3FR4HI.js.map → agent-66GYFKOK.js.map} +0 -0
  39. /package/dist/{app-typed-client-AJRW3JJV.js.map → app-typed-client-4S33OHT4.js.map} +0 -0
  40. /package/dist/{app-typed-client-NOXQEEVF.js.map → app-typed-client-KH27ZGRT.js.map} +0 -0
  41. /package/dist/{build-C7CVA5AK.js.map → build-PKAYYRGE.js.map} +0 -0
  42. /package/dist/{chunk-2NARRZPP.js.map → chunk-4DSRX3CO.js.map} +0 -0
  43. /package/dist/{chunk-BQJBFHAY.js.map → chunk-N4JUQJGN.js.map} +0 -0
  44. /package/dist/{chunk-2PF3TDM2.js.map → chunk-RE2WE7CD.js.map} +0 -0
  45. /package/dist/{chunk-6EV6FC7X.js.map → chunk-ZE2UHAET.js.map} +0 -0
  46. /package/dist/{dev-HPUCCB3E.js.map → dev-O5J4UCNZ.js.map} +0 -0
  47. /package/dist/{internal-api-TOUFX6VZ.js.map → internal-api-J6WBHES5.js.map} +0 -0
  48. /package/dist/{internal-api-TZTO4VMP.js.map → internal-api-LSB5E7BR.js.map} +0 -0
  49. /package/dist/{mcp-AFLDYTK5.js.map → mcp-FYEOYYNR.js.map} +0 -0
  50. /package/dist/{preview-M3DWFVKB.js.map → preview-KWRFNXXW.js.map} +0 -0
  51. /package/dist/{server-boundary-Z5LSU7ZW.js.map → server-boundary-AS2UEMW5.js.map} +0 -0
  52. /package/dist/{server-boundary-FBHI5NZP.js.map → server-boundary-PXJZNZAX.js.map} +0 -0
  53. /package/dist/{vite-plugin-ZT2XNAGM.js.map → vite-plugin-TS6MGV5R.js.map} +0 -0
@@ -12,7 +12,7 @@ import {
12
12
  serveMatchedAuxRoute,
13
13
  serveThroughPluginLifecycle,
14
14
  setupSsrDevMiddleware
15
- } from "./chunk-6EV6FC7X.js";
15
+ } from "./chunk-ZE2UHAET.js";
16
16
  import {
17
17
  resolveTheoRootDir
18
18
  } from "./chunk-FDOOBTXJ.js";
@@ -38,7 +38,7 @@ import {
38
38
  mountAgent,
39
39
  readAgentPolicy,
40
40
  writeWebResponseToServerResponse
41
- } from "./chunk-2NARRZPP.js";
41
+ } from "./chunk-4DSRX3CO.js";
42
42
  import {
43
43
  getApprovalRegistry,
44
44
  resolveProvider
@@ -48,7 +48,7 @@ import {
48
48
  dispatchControllerRequest,
49
49
  incomingMessageToHandlerRequest,
50
50
  sendError
51
- } from "./chunk-GDZOWQV7.js";
51
+ } from "./chunk-QD5X56I3.js";
52
52
  import {
53
53
  TRACE_HEADER,
54
54
  createObservabilityPluginFromConfig,
@@ -776,6 +776,7 @@ async function tryControllerFallthrough(ctx) {
776
776
  csrfMode: ctx.csrfMode,
777
777
  disallowed: ctx.disallowed,
778
778
  requestId: ctx.requestId,
779
+ pluginRunner: ctx.pluginRunner,
779
780
  // M47 — serve @Expose-bound agent routes via the ONE runtime (mountAgent). CSRF is already enforced
780
781
  // once at the controller-dispatch boundary (G5), so mountAgent runs with csrfMode 'off' (no double gate).
781
782
  //
@@ -846,12 +847,6 @@ function createApiMiddleware(vite, serverDir, rateLimitConfigOrOptions) {
846
847
  if (applyRateLimitOr429(req, res, { rateLimiter, requestId, url, start })) {
847
848
  return;
848
849
  }
849
- if (pluginRunner && await runPluginsBeforeRouteMatch(pluginRunner, { req, res, requestId, start, url })) {
850
- return;
851
- }
852
- if (await handleBatchIfMatch(req, res, { url, batching, requestId, start })) {
853
- return;
854
- }
855
850
  const routes = scanServerRoutes(serverDir);
856
851
  const match = matchRoute(url, routes);
857
852
  if (!match) {
@@ -864,10 +859,17 @@ function createApiMiddleware(vite, serverDir, rateLimitConfigOrOptions) {
864
859
  disallowed,
865
860
  requestId,
866
861
  url,
867
- start
862
+ start,
863
+ pluginRunner
868
864
  })) {
869
865
  return;
870
866
  }
867
+ if (pluginRunner && await runPluginsBeforeRouteMatch(pluginRunner, { req, res, requestId, start, url })) {
868
+ return;
869
+ }
870
+ if (await handleBatchIfMatch(req, res, { url, batching, requestId, start })) {
871
+ return;
872
+ }
871
873
  const urlPath = url.split("?")[0];
872
874
  const routePaths = routes.map((r) => r.routePath);
873
875
  const suggestion = findSuggestion(urlPath, routePaths);
@@ -2179,19 +2181,19 @@ async function theoPluginAsync(rootOrOptions) {
2179
2181
  })
2180
2182
  );
2181
2183
  }
2182
- const { appTypedClientPlugin } = await import("./app-typed-client-NOXQEEVF.js");
2184
+ const { appTypedClientPlugin } = await import("./app-typed-client-KH27ZGRT.js");
2183
2185
  const appClientPlugin = appTypedClientPlugin({
2184
2186
  cwd: projectRoot,
2185
2187
  serverDir: serverDirAbs,
2186
2188
  distDir: resolve5(projectRoot, ".theokit")
2187
2189
  });
2188
- const { actionsVirtualModule } = await import("./actions-virtual-module-BKIT7HNS.js");
2190
+ const { actionsVirtualModule } = await import("./actions-virtual-module-SYV4JN7B.js");
2189
2191
  const actionsPlugin = actionsVirtualModule({
2190
2192
  serverDir: serverDirAbs,
2191
2193
  distDir: resolve5(projectRoot, ".theokit")
2192
2194
  });
2193
2195
  const { agentsTypedClientPlugin } = await import("./agents-typed-client-D4OA2TXB.js");
2194
- const { generateManifest } = await import("./internal-api-TZTO4VMP.js");
2196
+ const { generateManifest } = await import("./internal-api-LSB5E7BR.js");
2195
2197
  const agentsClientPlugin = agentsTypedClientPlugin({
2196
2198
  projectRoot,
2197
2199
  agentsDir: agentsDirName,
@@ -2208,7 +2210,7 @@ async function theoPluginAsync(rootOrOptions) {
2208
2210
  const controllerTransformPlugin = controllerSwcTransformPlugin({
2209
2211
  serverDir: serverDirAbs
2210
2212
  });
2211
- const { serverOnlyImportBoundary } = await import("./server-boundary-Z5LSU7ZW.js");
2213
+ const { serverOnlyImportBoundary } = await import("./server-boundary-AS2UEMW5.js");
2212
2214
  const serverBoundaryPlugin = serverOnlyImportBoundary({
2213
2215
  projectRoot,
2214
2216
  serverDir: serverDirAbs
@@ -2383,4 +2385,4 @@ export {
2383
2385
  theoPluginAsync,
2384
2386
  theoPlugin
2385
2387
  };
2386
- //# sourceMappingURL=chunk-JHUFPH7B.js.map
2388
+ //# sourceMappingURL=chunk-PLX5U76I.js.map