@standardagents/builder 0.41.7 → 0.41.9
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/built-in-routes.js +52 -40
- package/dist/built-in-routes.js.map +1 -1
- package/dist/{discovery-CIGNVJfG.d.ts → discovery-D5pmuazY.d.ts} +1 -1
- package/dist/{index-PSu6cMEz.d.ts → index-ChHAVogf.d.ts} +2 -2
- package/dist/index.d.ts +5 -5
- package/dist/index.js +367 -16
- package/dist/index.js.map +1 -1
- package/dist/packing.d.ts +3 -3
- package/dist/plugin.js +9 -1
- package/dist/plugin.js.map +1 -1
- package/dist/resolver-DWuGxI4w.d.ts +4557 -0
- package/dist/runtime.d.ts +10 -4519
- package/dist/runtime.js +359 -16
- package/dist/runtime.js.map +1 -1
- package/dist/test.d.ts +2 -2
- package/dist/{types-D1ABHvAH.d.ts → types-Dhd0M369.d.ts} +1 -1
- package/package.json +5 -5
package/dist/packing.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { P as PackingAnalysis, a as PackingOptions, b as PackingResult,
|
|
2
|
-
export { D as DiscoveredPackage } from './types-
|
|
3
|
-
export { P as PackageDiscoveryService, d as discoverPackages } from './discovery-
|
|
1
|
+
import { P as PackingAnalysis, a as PackingOptions, b as PackingResult, d as UnpackAnalysis, U as UnpackOptions, c as UnpackResult } from './types-Dhd0M369.js';
|
|
2
|
+
export { D as DiscoveredPackage } from './types-Dhd0M369.js';
|
|
3
|
+
export { P as PackageDiscoveryService, d as discoverPackages } from './discovery-D5pmuazY.js';
|
|
4
4
|
import '@standardagents/spec';
|
|
5
5
|
|
|
6
6
|
/**
|
package/dist/plugin.js
CHANGED
|
@@ -7891,6 +7891,8 @@ import {
|
|
|
7891
7891
|
applyRuntimeCors,
|
|
7892
7892
|
runtimeCorsHeaders,
|
|
7893
7893
|
runtimePreflightResponse,
|
|
7894
|
+
formatUpstreamTiming,
|
|
7895
|
+
withUpstreamTiming,
|
|
7894
7896
|
} from "@standardagents/builder/runtime";
|
|
7895
7897
|
import { isThreadEndpoint, getEndpointAccess } from "@standardagents/spec";
|
|
7896
7898
|
|
|
@@ -8015,13 +8017,19 @@ ${packedThreadRouteCode}
|
|
|
8015
8017
|
// thread id, for same-request reuse by controllers (AB-05). Never cached
|
|
8016
8018
|
// across requests.
|
|
8017
8019
|
let threadAccess = null;
|
|
8020
|
+
// The request handed to the controller. A protected API request carries
|
|
8021
|
+
// x-standard-upstream-timing with the authentication cost; the header is
|
|
8022
|
+
// overwritten, never merged, so a caller cannot forge upstream time.
|
|
8023
|
+
let controllerRequest = request;
|
|
8018
8024
|
|
|
8019
8025
|
// Require authentication for all API routes except public ones.
|
|
8020
8026
|
// WebSocket tickets are single-use and are consumed here. Controllers
|
|
8021
8027
|
// must reuse context.auth (resolveRequestAuth) rather than calling
|
|
8022
8028
|
// requireAuth again, or a ticket-only upgrade will 401.
|
|
8023
8029
|
if (isApiRoute && !publicRoute) {
|
|
8030
|
+
const authStartedAt = Date.now();
|
|
8024
8031
|
const authResult = await requireAuth(request, env);
|
|
8032
|
+
controllerRequest = withUpstreamTiming(request, formatUpstreamTiming('auth', Date.now() - authStartedAt));
|
|
8025
8033
|
|
|
8026
8034
|
// If requireAuth returns a Response, it's an error (401)
|
|
8027
8035
|
if (authResult instanceof Response) {
|
|
@@ -8078,7 +8086,7 @@ ${packedThreadRouteCode}
|
|
|
8078
8086
|
}
|
|
8079
8087
|
|
|
8080
8088
|
const context = {
|
|
8081
|
-
req:
|
|
8089
|
+
req: controllerRequest,
|
|
8082
8090
|
params: routeMatch.params || {},
|
|
8083
8091
|
env: env,
|
|
8084
8092
|
url: url,
|