@copilotkit/runtime 1.51.3-next.5 → 1.51.3-next.6
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/CHANGELOG.md +9 -0
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
- package/src/lib/runtime/copilot-runtime.ts +6 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# @copilotkit/runtime
|
|
2
2
|
|
|
3
|
+
## 1.51.3-next.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 3a0822d: fix: do not run middleware for internal get requests
|
|
8
|
+
- @copilotkit/shared@1.51.3-next.6
|
|
9
|
+
- @copilotkitnext/agent@1.51.3-next.6
|
|
10
|
+
- @copilotkitnext/runtime@1.51.3-next.6
|
|
11
|
+
|
|
3
12
|
## 1.51.3-next.5
|
|
4
13
|
|
|
5
14
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -72,7 +72,7 @@ var require_package = __commonJS({
|
|
|
72
72
|
publishConfig: {
|
|
73
73
|
access: "public"
|
|
74
74
|
},
|
|
75
|
-
version: "1.51.3-next.
|
|
75
|
+
version: "1.51.3-next.6",
|
|
76
76
|
sideEffects: false,
|
|
77
77
|
main: "./dist/index.js",
|
|
78
78
|
module: "./dist/index.mjs",
|
|
@@ -3580,7 +3580,7 @@ var CopilotRuntime = class {
|
|
|
3580
3580
|
const { request } = hookParams;
|
|
3581
3581
|
const publicApiKey = request.headers.get("x-copilotcloud-public-api-key");
|
|
3582
3582
|
const body = await shared.readBody(request);
|
|
3583
|
-
const forwardedProps = body.forwardedProps;
|
|
3583
|
+
const forwardedProps = body == null ? void 0 : body.forwardedProps;
|
|
3584
3584
|
const cloudBaseUrl = process.env.COPILOT_CLOUD_BASE_URL || "https://api.cloud.copilotkit.ai";
|
|
3585
3585
|
telemetry_client_default.capture("oss.runtime.copilot_request_created", {
|
|
3586
3586
|
"cloud.guardrails.enabled": ((_a = forwardedProps == null ? void 0 : forwardedProps.cloud) == null ? void 0 : _a.guardrails) !== void 0,
|
|
@@ -3591,6 +3591,8 @@ var CopilotRuntime = class {
|
|
|
3591
3591
|
} : {},
|
|
3592
3592
|
"cloud.base_url": cloudBaseUrl
|
|
3593
3593
|
});
|
|
3594
|
+
if (request.method === "GET" || !body)
|
|
3595
|
+
return;
|
|
3594
3596
|
const middlewareResult = await ((_c = params == null ? void 0 : params.beforeRequestMiddleware) == null ? void 0 : _c.call(params, hookParams));
|
|
3595
3597
|
if ((_d = params == null ? void 0 : params.middleware) == null ? void 0 : _d.onBeforeRequest) {
|
|
3596
3598
|
const { request: request2, runtime, path } = hookParams;
|