@arbol-ai/maximus 8.7.2 → 8.8.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/analytics/analytics.d.ts +1 -1
- package/dist/body.d.ts +1 -1
- package/dist/capture/index.d.ts +1 -1
- package/dist/chunks/{define-app-g0A34g8z.js → define-app-Bd6sRVHj.js} +1 -1
- package/dist/chunks/{http-layout-CdFZEF2S.js → http-layout-DqE7LBsS.js} +1 -1
- package/dist/chunks/{meter-BnrQY5rb.js → meter-dTMGs_lr.js} +1 -1
- package/dist/chunks/{openapi-BkR-hcYJ.js → openapi-BX_eqRLX.js} +1 -1
- package/dist/chunks/{openapi-file-F5kJS8x-.js → openapi-file-BV-f_Wij.js} +1 -1
- package/dist/chunks/{pages-DLW65kXL.js → pages-DVORVVEZ.js} +1 -1
- package/dist/chunks/{runtime-DoyJqzAv.js → runtime-CWORw_TD.js} +3 -3
- package/dist/chunks/{server-DxifcN7e.js → server-DCwV3d2Y.js} +1 -1
- package/dist/chunks/{src-BNbGseOR.js → src-Bcl6xrV7.js} +5 -5
- package/dist/chunks/{tokens-b9dEBUu9.js → tokens-D0OMoQWV.js} +74 -13
- package/dist/chunks/{types-Do00dTUs.d.ts → types-t_09KY-x.d.ts} +34 -1
- package/dist/chunks/{workers-types-DjWyO_Pu.d.ts → workers-types-DyQBrA49.d.ts} +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/diagnostics.d.ts +1 -1
- package/dist/errors.d.ts +1 -1
- package/dist/http-paths.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -3
- package/dist/internals.d.ts +1 -1
- package/dist/internals.js +2 -2
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/index.js +1 -1
- package/dist/mcp/tasks.d.ts +1 -1
- package/dist/project/config.d.ts +1 -1
- package/dist/project/index.d.ts +2 -2
- package/dist/project/index.js +2 -2
- package/dist/schemas.d.ts +1 -1
- package/dist/standard-failures.d.ts +1 -1
- package/dist/tooling/cli.js +1 -1
- package/dist/vite/index.d.ts +1 -1
- package/dist/vite/index.js +3 -3
- package/dist/webhooks.d.ts +1 -1
- package/dist/workers/runtime.d.ts +1 -1
- package/dist/workers/runtime.js +1 -1
- package/package.json +1 -1
- package/skills/maximus/references/project.md +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { rr as Observer } from "../chunks/types-
|
|
1
|
+
import { rr as Observer } from "../chunks/types-t_09KY-x.js";
|
|
2
2
|
import { Static, Type } from "typebox";
|
|
3
3
|
/** An analytics event: the allowlisted metadata of one operation call, flattened, with an id of its own. */
|
|
4
4
|
export declare const ExecutionEventSchema: Type.TObject<{
|
package/dist/body.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as readBodyText, c as isJsonMediaType, d as retryAfterSeconds, f as publicDestination, g as readBodyBytes, h as HttpBodyFailureReason, l as readJsonBody, m as HttpBodyFailure, p as BodyReadOptions, u as readJsonResponse } from "./chunks/types-
|
|
1
|
+
import { _ as readBodyText, c as isJsonMediaType, d as retryAfterSeconds, f as publicDestination, g as readBodyBytes, h as HttpBodyFailureReason, l as readJsonBody, m as HttpBodyFailure, p as BodyReadOptions, u as readJsonResponse } from "./chunks/types-t_09KY-x.js";
|
|
2
2
|
export { type BodyReadOptions, type HttpBodyFailure, type HttpBodyFailureReason, isJsonMediaType, publicDestination, readBodyBytes, readBodyText, readJsonBody, readJsonResponse, retryAfterSeconds };
|
package/dist/capture/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ar as
|
|
1
|
+
import { Ar as CaptureRecord, Gn as CaptureConfig, Jn as CaptureSink, Kn as CaptureDimensions, Kt as RegisteredEnv, Wn as AnyContext, ct as withoutSecrets, jr as CaptureRecordSchema, qn as CaptureInvocation } from "../chunks/types-t_09KY-x.js";
|
|
2
2
|
/** What `pipeline()` takes. */
|
|
3
3
|
interface PipelineOptions<E> {
|
|
4
4
|
/**
|
|
@@ -4,7 +4,7 @@ import { a as operationPathParameters, r as isInputHeaderName, t as createHttpRo
|
|
|
4
4
|
import { R as holdsSecrets, T as hasUncompiledCodecs } from "./schemas-_UJcx_uY.js";
|
|
5
5
|
import { t as pathParameterSchemas } from "./http-routes-B6tCsnxB.js";
|
|
6
6
|
import { b as operationScopes, d as MAX_BODY_BYTES_CEILING, f as STANDARD_CODES, t as MAX_TASK_TTL_MS, x as isNamespacedScope } from "./tasks-CD-B6_nv.js";
|
|
7
|
-
import { b as checkRoles, g as hasSchemaReferences, m as bundleSchemas, o as tokenAudiences, t as checkTokenAuthority } from "./tokens-
|
|
7
|
+
import { b as checkRoles, g as hasSchemaReferences, m as bundleSchemas, o as tokenAudiences, t as checkTokenAuthority } from "./tokens-D0OMoQWV.js";
|
|
8
8
|
import { IsKind } from "typebox";
|
|
9
9
|
|
|
10
10
|
// src/internal/exact-length.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { f as Value, t as admitInput } from "./validation-CpzAxj2_.js";
|
|
2
2
|
import { B as withoutSecrets, R as holdsSecrets } from "./schemas-_UJcx_uY.js";
|
|
3
3
|
import { i as standardErrors } from "./errors-BoutSmiy.js";
|
|
4
|
-
import { a as isAttachmentSchema, o as validAttachment } from "./define-app-
|
|
4
|
+
import { a as isAttachmentSchema, o as validAttachment } from "./define-app-Bd6sRVHj.js";
|
|
5
5
|
import { b as operationScopes, c as ADMISSION_CODES, f as STANDARD_CODES, l as BODY_CODES, v as operationMatchesScopes, y as operationOutputLimit } from "./tasks-CD-B6_nv.js";
|
|
6
6
|
import { t as err } from "./result-CF4OzG9O.js";
|
|
7
7
|
import { t as sha256Hex } from "./digest-C51F1bhA.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { S as resolveRoles, _ as schemaIds, f as usesCloudflareAccess, h as canonical, m as bundleSchemas, s as tokenEndpoints } from "./tokens-
|
|
1
|
+
import { S as resolveRoles, _ as schemaIds, f as usesCloudflareAccess, h as canonical, m as bundleSchemas, s as tokenEndpoints } from "./tokens-D0OMoQWV.js";
|
|
2
2
|
import { a as operationPathParameters } from "./http-paths-D043DkJv.js";
|
|
3
3
|
import { L as wireInput } from "./schemas-_UJcx_uY.js";
|
|
4
4
|
import { t as queryKind } from "./query-kind-CWKAXEME.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as createRpcOpenApi } from "./openapi-
|
|
1
|
+
import { n as createRpcOpenApi } from "./openapi-BX_eqRLX.js";
|
|
2
2
|
import { t as prepareConfiguredProject } from "./prepare-configured-Cithjf80.js";
|
|
3
3
|
import { t as packageDirectory } from "./scaffold-BfrJN0Yk.js";
|
|
4
4
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as executeOperation, r as recordCapture, t as recordMeter } from "./meter-
|
|
1
|
+
import { n as executeOperation, r as recordCapture, t as recordMeter } from "./meter-dTMGs_lr.js";
|
|
2
2
|
import { i as standardErrors } from "./errors-BoutSmiy.js";
|
|
3
|
-
import { r as createHttpHandler } from "./src-
|
|
3
|
+
import { r as createHttpHandler } from "./src-Bcl6xrV7.js";
|
|
4
4
|
import { r as ok, t as err } from "./result-CF4OzG9O.js";
|
|
5
|
-
import { p as PrincipalSchema } from "./tokens-
|
|
5
|
+
import { p as PrincipalSchema } from "./tokens-D0OMoQWV.js";
|
|
6
6
|
import { i as parseInput } from "./validation-CpzAxj2_.js";
|
|
7
7
|
import { a as recordExecution, l as withTelemetry, o as reportUnexpected, s as telemetryEnabled } from "./telemetry-BtxJh69Q.js";
|
|
8
8
|
import { r as isRequestId } from "./correlation-4b23a-a4.js";
|
|
@@ -2,7 +2,7 @@ import { d as MAX_BODY_BYTES_CEILING, h as mcpOpenWorld, v as operationMatchesSc
|
|
|
2
2
|
import { o as reportUnexpected } from "./telemetry-BtxJh69Q.js";
|
|
3
3
|
import { i as standardErrors } from "./errors-BoutSmiy.js";
|
|
4
4
|
import { L as wireInput } from "./schemas-_UJcx_uY.js";
|
|
5
|
-
import { h as canonical, v as standaloneSchema } from "./tokens-
|
|
5
|
+
import { h as canonical, v as standaloneSchema } from "./tokens-D0OMoQWV.js";
|
|
6
6
|
import { t as toYaml } from "./yaml-Dk2L24yQ.js";
|
|
7
7
|
import { a as mcpTask, n as attachTasks, o as toolResult, r as declaresTasks } from "./tasks-DELqUSq8.js";
|
|
8
8
|
import { McpServer, ProtocolError, ProtocolErrorCode, createMcpHandler } from "@modelcontextprotocol/server";
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { i as binaryBody, n as defineApp, r as attachmentResponse } from "./define-app-
|
|
1
|
+
import { i as binaryBody, n as defineApp, r as attachmentResponse } from "./define-app-Bd6sRVHj.js";
|
|
2
2
|
import { a as taskAccess, b as operationScopes, m as isPublicOperation, o as taskView, p as composeOperations, s as withTaskOperations, u as DEFAULT_MAX_BODY_BYTES, v as operationMatchesScopes } from "./tasks-CD-B6_nv.js";
|
|
3
3
|
import { r as ok, t as err } from "./result-CF4OzG9O.js";
|
|
4
4
|
import { i as standardErrors } from "./errors-BoutSmiy.js";
|
|
5
|
-
import { c as tokenIssuer, i as presentedToken, n as createTokenAuthorization, o as tokenAudiences, u as isCrossSiteWrite } from "./tokens-
|
|
6
|
-
import { n as executeOperation, r as recordCapture, t as recordMeter } from "./meter-
|
|
5
|
+
import { c as tokenIssuer, i as presentedToken, n as createTokenAuthorization, o as tokenAudiences, u as isCrossSiteWrite } from "./tokens-D0OMoQWV.js";
|
|
6
|
+
import { n as executeOperation, r as recordCapture, t as recordMeter } from "./meter-dTMGs_lr.js";
|
|
7
7
|
import { t as createHttpRouteResolver } from "./http-paths-D043DkJv.js";
|
|
8
8
|
import { r as readBodyText } from "./body-DOIHwIIl.js";
|
|
9
9
|
import { t as sha256Hex } from "./digest-C51F1bhA.js";
|
|
10
|
-
import { a as ownsPrefix, i as nativePaths, n as composition, o as servesCloudflareAccess, r as httpTransports, s as servesOwnBearer, t as VERSIONED_PATH } from "./http-layout-
|
|
11
|
-
import { i as queryKinds, r as queryInput, t as createOpenApi } from "./openapi-
|
|
10
|
+
import { a as ownsPrefix, i as nativePaths, n as composition, o as servesCloudflareAccess, r as httpTransports, s as servesOwnBearer, t as VERSIONED_PATH } from "./http-layout-DqE7LBsS.js";
|
|
11
|
+
import { i as queryKinds, r as queryInput, t as createOpenApi } from "./openapi-BX_eqRLX.js";
|
|
12
12
|
import { n as mediaType } from "./json-B14evE6-.js";
|
|
13
13
|
import { t as toYaml } from "./yaml-Dk2L24yQ.js";
|
|
14
14
|
import { a as recordExecution, i as recordAdmission, l as withTelemetry, o as reportUnexpected, s as telemetryEnabled } from "./telemetry-BtxJh69Q.js";
|
|
@@ -6,7 +6,7 @@ import { S as matchesScopes, b as operationScopes, m as isPublicOperation, x as
|
|
|
6
6
|
import { r as ok, t as err } from "./result-CF4OzG9O.js";
|
|
7
7
|
import { t as sha256Hex } from "./digest-C51F1bhA.js";
|
|
8
8
|
import { Type } from "typebox";
|
|
9
|
-
import { createRemoteJWKSet, jwtVerify } from "jose";
|
|
9
|
+
import { createRemoteJWKSet, decodeJwt, jwtVerify } from "jose";
|
|
10
10
|
|
|
11
11
|
// src/roles.ts
|
|
12
12
|
/**
|
|
@@ -627,9 +627,22 @@ function checkTokenAuthority(policy, namespace) {
|
|
|
627
627
|
const access = usesCloudflareAccess(policy);
|
|
628
628
|
if (policy.access !== void 0 && !access) throw new TypeError("tokens.access grants Cloudflare Access callers: set tokens.source to cloudflare-access.");
|
|
629
629
|
if (access) checkAccessPolicy(policy, namespace);
|
|
630
|
+
if (policy.additionalIssuers !== void 0 && (access || policy.resolve !== void 0 || usesOwnBearer(policy))) throw new TypeError("tokens.additionalIssuers verifies OAuth access tokens: not under cloudflare-access, a resolve of its own, or a bearer scheme.");
|
|
630
631
|
if (usesOwnBearer(policy) || access && policy.resolve !== void 0 && policy.issuer === void 0) return;
|
|
631
|
-
|
|
632
|
-
|
|
632
|
+
checkIssuerFacts(policy, "tokens");
|
|
633
|
+
const issuers = tokenIssuers(policy);
|
|
634
|
+
if (issuers.some((issuer) => !httpsUrl(issuer)) || [
|
|
635
|
+
policy.jwksUri,
|
|
636
|
+
policy.authorizationEndpoint,
|
|
637
|
+
policy.tokenEndpoint
|
|
638
|
+
].some((endpoint) => endpoint !== void 0 && !httpsUrl(endpoint, issuers[0]))) throw new TypeError("tokens.issuer, jwksUri, authorizationEndpoint and tokenEndpoint must be absolute HTTPS URLs, the last three resolved against the issuer.");
|
|
639
|
+
checkAdditionalIssuers(policy, issuers);
|
|
640
|
+
}
|
|
641
|
+
/** Refuses an algorithm list, a claim mapping or a token type that could never verify a token. */
|
|
642
|
+
function checkIssuerFacts(facts, at) {
|
|
643
|
+
const { algorithms, claims, requireType } = facts;
|
|
644
|
+
if (algorithms !== void 0 && (!algorithms.length || algorithms.some((name) => !TOKEN_ALGORITHMS.has(name)))) throw new TypeError(`${at}.algorithms lists one or more asymmetric JWS algorithms.`);
|
|
645
|
+
if (requireType !== void 0 && requireType !== "at+jwt") throw new TypeError(`${at}.requireType is at+jwt or absent.`);
|
|
633
646
|
if (claims !== void 0) {
|
|
634
647
|
const { permissions, machineSubject } = claims;
|
|
635
648
|
if ([
|
|
@@ -637,14 +650,26 @@ function checkTokenAuthority(policy, namespace) {
|
|
|
637
650
|
claims.scopes,
|
|
638
651
|
claims.client,
|
|
639
652
|
permissions === false ? void 0 : permissions
|
|
640
|
-
].some((path) => path !== void 0 && (typeof path !== "string" || !path)) || machineSubject !== void 0 && !["{client}@clients", "{client}"].includes(machineSubject)) throw new TypeError(
|
|
653
|
+
].some((path) => path !== void 0 && (typeof path !== "string" || !path)) || machineSubject !== void 0 && !["{client}@clients", "{client}"].includes(machineSubject)) throw new TypeError(`${at}.claims names each claim by a non-empty string (permissions may be false), and machineSubject is {client}@clients or {client}.`);
|
|
654
|
+
}
|
|
655
|
+
}
|
|
656
|
+
/**
|
|
657
|
+
* Refuses additional issuers that could never verify a token, or that would make one server's token read as
|
|
658
|
+
* another's: one that is not an HTTPS URL, one the policy's `issuer` already names, one listed twice, a JWKS
|
|
659
|
+
* that is not HTTPS, a malformed algorithm list, claim mapping or token type.
|
|
660
|
+
*/
|
|
661
|
+
function checkAdditionalIssuers(policy, issuers) {
|
|
662
|
+
const additional = policy.additionalIssuers;
|
|
663
|
+
if (additional === void 0) return;
|
|
664
|
+
if (!Array.isArray(additional) || !additional.length) throw new TypeError("tokens.additionalIssuers lists one or more authorization servers, or is absent.");
|
|
665
|
+
const seen = new Set(issuers);
|
|
666
|
+
for (const [index, server] of additional.entries()) {
|
|
667
|
+
const at = `tokens.additionalIssuers[${index}]`;
|
|
668
|
+
if (typeof server?.issuer !== "string" || !httpsUrl(server.issuer) || server.jwksUri !== void 0 && !httpsUrl(server.jwksUri, server.issuer)) throw new TypeError(`${at}.issuer and jwksUri must be absolute HTTPS URLs, jwksUri resolved against issuer.`);
|
|
669
|
+
if (seen.has(server.issuer)) throw new TypeError(`${at}.issuer is named twice: each server's tokens are verified against its own keys.`);
|
|
670
|
+
seen.add(server.issuer);
|
|
671
|
+
checkIssuerFacts(server, at);
|
|
641
672
|
}
|
|
642
|
-
const issuers = tokenIssuers(policy);
|
|
643
|
-
if (issuers.some((issuer) => !httpsUrl(issuer)) || [
|
|
644
|
-
policy.jwksUri,
|
|
645
|
-
policy.authorizationEndpoint,
|
|
646
|
-
policy.tokenEndpoint
|
|
647
|
-
].some((endpoint) => endpoint !== void 0 && !httpsUrl(endpoint, issuers[0]))) throw new TypeError("tokens.issuer, jwksUri, authorizationEndpoint and tokenEndpoint must be absolute HTTPS URLs, the last three resolved against the issuer.");
|
|
648
673
|
}
|
|
649
674
|
/** The authorization server's authorization and token endpoints, which OpenAPI publishes. */
|
|
650
675
|
function tokenEndpoints(policy) {
|
|
@@ -691,9 +716,19 @@ function createTokenVerifier(policy) {
|
|
|
691
716
|
requiredClaims: ["exp", "sub"]
|
|
692
717
|
});
|
|
693
718
|
if (!accessTokenType(protectedHeader.typ)) throw new Error("The token is typed as another kind of JWT than an access token.");
|
|
719
|
+
if (policy.requireType && String(protectedHeader.typ).toLowerCase().replace(/^application\//, "") !== "at+jwt") throw new Error("The token does not say it is an access token, which its issuer requires.");
|
|
694
720
|
return payload;
|
|
695
721
|
};
|
|
696
722
|
}
|
|
723
|
+
/** The `iss` a token names, read without verifying it: only to choose which server's keys verify it. */
|
|
724
|
+
function claimedIssuer(token) {
|
|
725
|
+
try {
|
|
726
|
+
const { iss } = decodeJwt(token);
|
|
727
|
+
return typeof iss === "string" ? iss : void 0;
|
|
728
|
+
} catch {
|
|
729
|
+
return;
|
|
730
|
+
}
|
|
731
|
+
}
|
|
697
732
|
/** The longest token admission reads; a longer one is refused unread. */
|
|
698
733
|
const MAX_TOKEN_LENGTH = 16384;
|
|
699
734
|
/** A compact JWS: three base64url segments separated by dots. */
|
|
@@ -729,13 +764,39 @@ function presentedToken(request, policy) {
|
|
|
729
764
|
*/
|
|
730
765
|
function createTokenAuthorization(policy, given) {
|
|
731
766
|
let verifier = given;
|
|
732
|
-
|
|
767
|
+
const additional = policy.additionalIssuers ?? [];
|
|
768
|
+
/** Each additional server's verifier, built on first use, by its issuer. */
|
|
769
|
+
const additionalVerifiers = /* @__PURE__ */ new Map();
|
|
770
|
+
/**
|
|
771
|
+
* Verifies an OAuth access token against the server its `iss` names, building that verifier on first use.
|
|
772
|
+
* A token naming none of the trusted servers is verified against the policy's own, which refuses it.
|
|
773
|
+
*/
|
|
733
774
|
const verify = (token) => {
|
|
775
|
+
const server = additional.find(({ issuer }) => issuer === claimedIssuer(token));
|
|
776
|
+
if (server && !given) {
|
|
777
|
+
let serverVerifier = additionalVerifiers.get(server.issuer);
|
|
778
|
+
if (!serverVerifier) {
|
|
779
|
+
serverVerifier = createTokenVerifier({
|
|
780
|
+
...server,
|
|
781
|
+
audience: policy.audience
|
|
782
|
+
});
|
|
783
|
+
additionalVerifiers.set(server.issuer, serverVerifier);
|
|
784
|
+
}
|
|
785
|
+
return serverVerifier(token);
|
|
786
|
+
}
|
|
734
787
|
verifier ??= createTokenVerifier(policy);
|
|
735
788
|
return verifier(token);
|
|
736
789
|
};
|
|
737
|
-
/**
|
|
738
|
-
|
|
790
|
+
/**
|
|
791
|
+
* The principal a verified token's claims grant: Access's projection, or the claim mapping of the server
|
|
792
|
+
* whose `iss` the verified token carries.
|
|
793
|
+
*/
|
|
794
|
+
const project = (claims) => {
|
|
795
|
+
if (usesCloudflareAccess(policy)) return projectAccessToken(claims, policy);
|
|
796
|
+
const iss = typeof claims === "object" && claims !== null ? claims.iss : void 0;
|
|
797
|
+
const server = additional.find(({ issuer }) => issuer === iss);
|
|
798
|
+
return projectToken(claims, server ? server.claims : policy.claims);
|
|
799
|
+
};
|
|
739
800
|
/**
|
|
740
801
|
* Admits the request when its token carries `scope` or, for a list, any one of them (every one with
|
|
741
802
|
* `scopeMatch` `all`).
|
|
@@ -574,6 +574,25 @@ interface TokenDevelopment {
|
|
|
574
574
|
/** The organization the developer acts in; `local-development` by default. */
|
|
575
575
|
organizationId?: string;
|
|
576
576
|
}
|
|
577
|
+
/**
|
|
578
|
+
* Another authorization server whose access tokens an application also accepts, with what is particular to
|
|
579
|
+
* its tokens: during a move from one server to another, both are trusted for a while.
|
|
580
|
+
*/
|
|
581
|
+
interface TokenIssuer {
|
|
582
|
+
/** The exact `iss` its tokens carry: an absolute HTTPS URL. */
|
|
583
|
+
issuer: string;
|
|
584
|
+
/** Its JWKS URL, resolved against `issuer` and HTTPS only; defaults to `.well-known/jwks.json`. */
|
|
585
|
+
jwksUri?: string;
|
|
586
|
+
/** The algorithms it signs access tokens with; `['RS256']` by default. */
|
|
587
|
+
algorithms?: readonly TokenAlgorithm[];
|
|
588
|
+
/** Where its access tokens put the organization, the scopes, the client and permissions; as `claims`. */
|
|
589
|
+
claims?: TokenClaims;
|
|
590
|
+
/**
|
|
591
|
+
* `at+jwt` when its access tokens must say they are access tokens (RFC 9068): set it for a server that signs
|
|
592
|
+
* other JWTs, such as ID tokens, with the same keys. Without it, a plain JWT is accepted too.
|
|
593
|
+
*/
|
|
594
|
+
requireType?: 'at+jwt';
|
|
595
|
+
}
|
|
577
596
|
/**
|
|
578
597
|
* How the application verifies bearer tokens: the audiences they must carry, the OAuth issuer and its JWKS,
|
|
579
598
|
* or the application's own `resolve`, the scheme OpenAPI publishes and the OAuth discovery it serves; or,
|
|
@@ -614,6 +633,20 @@ interface TokenPolicy<E = unknown> {
|
|
|
614
633
|
* Access, only the organization's claim.
|
|
615
634
|
*/
|
|
616
635
|
claims?: TokenClaims;
|
|
636
|
+
/**
|
|
637
|
+
* `at+jwt` when the issuer's access tokens must say they are access tokens (RFC 9068): set it for a server
|
|
638
|
+
* that signs other JWTs, such as ID tokens, with the same keys. Without it, a plain JWT is accepted too.
|
|
639
|
+
*/
|
|
640
|
+
requireType?: 'at+jwt';
|
|
641
|
+
/**
|
|
642
|
+
* Other authorization servers whose access tokens the application also accepts, each with its own JWKS,
|
|
643
|
+
* algorithms, claim mapping and token type: while the application moves from one server to another. A
|
|
644
|
+
* token is verified against the server its `iss` names, and only that one, and its claims are read with that
|
|
645
|
+
* server's mapping. Discovery and OpenAPI keep naming `issuer`; to move, make the new server `issuer` and
|
|
646
|
+
* list the old one here until its tokens have expired. Not under the `cloudflare-access` source, nor with
|
|
647
|
+
* the application's own `resolve`.
|
|
648
|
+
*/
|
|
649
|
+
additionalIssuers?: readonly TokenIssuer[];
|
|
617
650
|
/**
|
|
618
651
|
* Where requests present their tokens: `authorization` (the default), as a bearer token, or
|
|
619
652
|
* `cloudflare-access`, as the application token Cloudflare Access sets in `Cf-Access-Jwt-Assertion`, which
|
|
@@ -3002,4 +3035,4 @@ declare function createRpcOpenApi<E, C, O extends Record<string, OperationShape>
|
|
|
3002
3035
|
* the argument.
|
|
3003
3036
|
*/
|
|
3004
3037
|
declare function defineApp<Env, C>(): <const Ops extends Record<string, OperationShape>>(manifest: AppManifest<Env, C, Ops>) => AppManifest<Env, C, Ops>;
|
|
3005
|
-
export { PageInfo as $, executeOperation as $n,
|
|
3038
|
+
export { PageInfo as $, executeOperation as $n, DurableCorrelation as $r, defineContext as $t, TransportContext as A, ResolvedRole as An, CaptureRecord as Ar, decodeSchema as At, DeletedObject as B, TokenUsage as Bn, Attachment as Br, HandlerArguments as Bt, isPathParameterValue as C, isPublicOperation as Cn, matchesScopes as Cr, stripObject as Ct, HttpRoute as D, SchemaKeywords as Dn, TokenPrincipal as Dr, SchemaValidationError as Dt, HttpOptions as E, operationScopes as En, TokenClient as Er, SchemaIssue as Et, Static$2 as F, BillingService as Fn, Result as Fr, ContextDeclaration as Ft, NamedReference as G, CaptureConfig as Gn, ErrorDefinition as Gr, PreparedContext as Gt, EmailAddressSchema as H, UsageReceipt as Hn, CreateArguments as Hr, HandlerHttp as Ht, TSchema$2 as I, LimitVerdict as In, Success as Ir, DomainCode as It, PostalAddress as J, CaptureSink as Jn, FailureData as Jr, SchemaOf as Jt, NamedReferenceSchema as K, CaptureDimensions as Kn, ErrorFactory as Kr, RegisteredEnv as Kt, Type$2 as L, MeteredCall as Ln, err as Lr, Fail as Lt, projectAccessToken as M, RoleDefinitions as Mn, BinaryBody as Mr, parseSchema as Mt, EmptyInputSchema as N, defineRoles as Nn, BodyFailure as Nr, AuthOptions as Nt, HttpTransport as O, StaticDecode as On, OAuthResource as Or, InputIssue as Ot, OrganizationIdSchema as P, resolveRoles as Pn, FailureResult as Pr, ContextArguments as Pt, Page as Q, ExecutionCall as Qn, standardErrors as Qr, defineAuth as Qt, UuidSchema as R, OperationMeter as Rn, isResult as Rr, Failed as Rt, isInputHeaderName as S, composeOperations as Sn, ScopeMatch as Sr, strictObject as St, HttpMiddleware as T, operationMatchesScopes as Tn, PrincipalSchema as Tr, urlSchema as Tt, HexColorSchema as U, recordMeter as Un, DefinedErrors as Ur, HandlerMcp as Ut, DeletedObjectSchema as V, UsageEvent as Vn, AttachmentOutputSchema as Vr, HandlerDeclaration as Vt, HttpsUrlSchema as W, AnyContext as Wn, ErrorCatalog as Wr, HandlerOptions as Wt, SignedUrl as X, VerifiedCaller as Xn, defineErrors as Xr, ToolDeclaration as Xt, PostalAddressSchema as Y, CapturedCall as Yn, FailureSchema as Yr, SchemaOrFields as Yt, SignedUrlSchema as Z, recordCapture as Zn, resultSchema as Zr, ToolOptions as Zt, readBodyText as _, McpSkill as _n, TokenScheme as _r, literalUnion as _t, t as a, ApplicationBuilder as an, diagnosticsEnabled as ar, cursorKey as at, createHttpRouteResolver as b, OperationScope as bn, createTokenVerifier as br, pipeSchema as bt, isJsonMediaType as c, TaskAccess as cn, telemetryEnabled as cr, withoutSecrets as ct, retryAfterSeconds as d, AppManifest as dn, TokenAlgorithm as dr, readSchema as dt, TraceParent as ei, defineHandler as en, AdmissionObservation as er, PageInfoSchema as et, publicDestination as f, Exposure as fn, TokenClaims as fr, SchemaInput as ft, readBodyBytes as g, McpGuide as gn, TokenResolutionContext as gr, inspectSchema as gt, HttpBodyFailureReason as h, McpConfiguration as hn, TokenPolicy as hr, inputSchema as ht, Type$1 as i, parseTraceParent as ii, StandardFailure as in, TelemetryConfig as ir, TPage as it, createHttpHandler as j, RoleDefinition as jn, CaptureRecordSchema as jr, parseInput as jt, RouteContext as k, MAX_ROLES as kn, protectedResourceMetadata as kr, decodeInput as kt, readJsonBody as l, TaskRecord as ln, withDiagnostics as lr, Checked as lt, HttpBodyFailure as m, InvocationAuthority as mn, TokenIssuer as mr, extendObject as mt, Static$1 as n, durableCorrelation as ni, defineTool as nn, ExecutionObservation as nr, PageQuery as nt, createOpenApi as o, ApplicationConfiguration as on, recordExecution as or, cutPage as ot, BodyReadOptions as p, Invocation as pn, TokenDevelopment as pr, defaultSchema as pt, PhoneNumberSchema as q, CaptureInvocation as qn, Failure as qr, RouteBody as qt, TSchema$1 as r, isRequestId as ri, STANDARD_FAILURES as rn, Observer as rr, PageQueryFields as rt, createRpcOpenApi as s, maximus as sn, reportUnexpected as sr, pageLimit as st, defineApp as t, createRequestId as ti, defineTelemetry as tn, BackgroundContext as tr, PageOrder as tt, readJsonResponse as u, TaskStore as un, TokenAccess as ur, checkSchema as ut, HttpRouteDefinition as v, OperationHandler as vn, TokenSource as vr, looseObject as vt, operationPathParameters as w, operation as wn, Principal as wr, transformSchema as wt, decodePathParameter as x, OperationShape as xn, projectToken as xr, refineSchema as xt, HttpRouteMatch as y, OperationMiddleware as yn, createTokenAuthorization as yr, normalizeSchema as yt, t$1 as z, SpendVerdict as zn, ok as zr, HandlerAnswer as zt };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { D as HttpRoute, E as HttpOptions, Fr as Result, dn as AppManifest, n as Static, qr as Failure, r as TSchema, un as TaskStore, wr as Principal, xn as OperationShape } from "./types-t_09KY-x.js";
|
|
2
2
|
import { DurableObject, WorkerEntrypoint } from "cloudflare:workers";
|
|
3
3
|
/** A Workers static-assets binding; product stores and secrets never satisfy this capability. */
|
|
4
4
|
interface AssetBinding {
|
package/dist/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { F as Static,
|
|
1
|
+
import { F as Static, qr as Failure, xn as OperationShape } from "./chunks/types-t_09KY-x.js";
|
|
2
2
|
/** What every HTTP operation answers: its data on success, its failure otherwise, and the request id. */
|
|
3
3
|
export type Envelope<T> = {
|
|
4
4
|
success: true;
|
package/dist/diagnostics.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $r as
|
|
1
|
+
import { $r as DurableCorrelation, ar as diagnosticsEnabled, cr as telemetryEnabled, ei as TraceParent, ii as parseTraceParent, ir as TelemetryConfig, lr as withDiagnostics, ni as durableCorrelation, nr as ExecutionObservation, or as recordExecution, ri as isRequestId, rr as Observer, sr as reportUnexpected, ti as createRequestId, tr as BackgroundContext } from "./chunks/types-t_09KY-x.js";
|
|
2
2
|
/**
|
|
3
3
|
* What diagnostics may say about an error: its name, its causes' names, its issue count and its stack
|
|
4
4
|
* locations.
|
package/dist/errors.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Gr as
|
|
1
|
+
import { Gr as ErrorDefinition, Hr as CreateArguments, Jr as FailureData, Kr as ErrorFactory, Qr as standardErrors, Ur as DefinedErrors, Wr as ErrorCatalog, Xr as defineErrors, Yr as FailureSchema, Zr as resultSchema, qr as Failure, ri as isRequestId } from "./chunks/types-t_09KY-x.js";
|
|
2
2
|
export { CreateArguments, DefinedErrors, ErrorCatalog, ErrorDefinition, ErrorFactory, Failure, FailureData, FailureSchema, defineErrors, isRequestId, resultSchema, standardErrors };
|
package/dist/http-paths.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as isPathParameterValue, S as isInputHeaderName, b as createHttpRouteResolver, v as HttpRouteDefinition, w as operationPathParameters, x as decodePathParameter, y as HttpRouteMatch } from "./chunks/types-
|
|
1
|
+
import { C as isPathParameterValue, S as isInputHeaderName, b as createHttpRouteResolver, v as HttpRouteDefinition, w as operationPathParameters, x as decodePathParameter, y as HttpRouteMatch } from "./chunks/types-t_09KY-x.js";
|
|
2
2
|
export { HttpRouteDefinition, HttpRouteMatch, createHttpRouteResolver, decodePathParameter, isInputHeaderName, isPathParameterValue, operationPathParameters };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as PageInfo, $t as defineContext, A as TransportContext, An as ResolvedRole, B as DeletedObject, Bn as TokenUsage, Br as
|
|
2
|
-
export { type AdmissionObservation, type AppManifest, type ApplicationBuilder, type ApplicationConfiguration, type Attachment, AttachmentOutputSchema, type AuthOptions, type BackgroundContext, type BillingService, type BinaryBody, type BodyFailure, type BodyReadOptions, type ContextArguments, type ContextDeclaration, type DefinedErrors, type DeletedObject, DeletedObjectSchema, type DomainCode, EmailAddressSchema, EmptyInputSchema, type ErrorCatalog, type ErrorDefinition, type ErrorFactory, type ExecutionObservation, type Exposure, type Fail, type Failed, type Failure, type FailureData, type FailureResult, FailureSchema, type HandlerAnswer, type HandlerArguments, type HandlerDeclaration, type HandlerHttp, type HandlerMcp, type HandlerOptions, HexColorSchema, type HttpBodyFailure, type HttpBodyFailureReason, type HttpMiddleware, type HttpOptions, type HttpRoute, type HttpRouteDefinition, type HttpRouteMatch, type HttpTransport, HttpsUrlSchema, type Invocation, type InvocationAuthority, type LimitVerdict, MAX_ROLES, type McpConfiguration, type McpGuide, type McpSkill, type NamedReference, NamedReferenceSchema, type OAuthResource, type Observer, type OperationMeter, type OperationMiddleware, type OperationScope, type OperationShape, OrganizationIdSchema, Page, type PageInfo, PageInfoSchema, type PageOrder, type PageQuery, PageQueryFields, PhoneNumberSchema, type PostalAddress, PostalAddressSchema, type PreparedContext, type Principal, PrincipalSchema, type ResolvedRole, type Result, type RoleDefinition, type RoleDefinitions, type RouteBody, type RouteContext, type SchemaKeywords, type SchemaOf, type SchemaOrFields, type ScopeMatch, type SignedUrl, SignedUrlSchema, type SpendVerdict, type Static, type Success, type TPage, type TSchema, type TelemetryConfig, type TokenAccess, type TokenAlgorithm, type TokenClaims, type TokenClient, type TokenDevelopment, type TokenPolicy, type TokenPrincipal, type TokenResolutionContext, type TokenScheme, type TokenSource, type TokenUsage, type ToolDeclaration, type ToolOptions, type TransportContext, Type, type UsageEvent, type UsageReceipt, UuidSchema, createHttpHandler, createHttpRouteResolver, createOpenApi, createRpcOpenApi, createTokenAuthorization, createTokenVerifier, cursorKey, cutPage, defineAuth, defineContext, defineErrors, defineHandler, defineRoles, defineTelemetry, defineTool, err, isJsonMediaType, isPublicOperation, isResult, matchesScopes, maximus, ok, operationMatchesScopes, operationScopes, pageLimit, parseInput, parseSchema, projectAccessToken, projectToken, protectedResourceMetadata, publicDestination, readBodyBytes, readBodyText, readJsonBody, readJsonResponse, reportUnexpected, resolveRoles, resultSchema, retryAfterSeconds, standardErrors, t };
|
|
1
|
+
import { $ as PageInfo, $t as defineContext, A as TransportContext, An as ResolvedRole, B as DeletedObject, Bn as TokenUsage, Br as Attachment, Bt as HandlerArguments, Cn as isPublicOperation, Cr as matchesScopes, D as HttpRoute, Dn as SchemaKeywords, Dr as TokenPrincipal, E as HttpOptions, En as operationScopes, Er as TokenClient, Fn as BillingService, Fr as Result, Ft as ContextDeclaration, G as NamedReference, Gr as ErrorDefinition, Gt as PreparedContext, H as EmailAddressSchema, Hn as UsageReceipt, Ht as HandlerHttp, In as LimitVerdict, Ir as Success, It as DomainCode, J as PostalAddress, Jr as FailureData, Jt as SchemaOf, K as NamedReferenceSchema, Kr as ErrorFactory, Lr as err, Lt as Fail, M as projectAccessToken, Mn as RoleDefinitions, Mr as BinaryBody, Mt as parseSchema, N as EmptyInputSchema, Nn as defineRoles, Nr as BodyFailure, Nt as AuthOptions, O as HttpTransport, Or as OAuthResource, P as OrganizationIdSchema, Pn as resolveRoles, Pr as FailureResult, Pt as ContextArguments, Q as Page, Qr as standardErrors, Qt as defineAuth, R as UuidSchema, Rn as OperationMeter, Rr as isResult, Rt as Failed, Sr as ScopeMatch, T as HttpMiddleware, Tn as operationMatchesScopes, Tr as PrincipalSchema, U as HexColorSchema, Ur as DefinedErrors, Ut as HandlerMcp, V as DeletedObjectSchema, Vn as UsageEvent, Vr as AttachmentOutputSchema, Vt as HandlerDeclaration, W as HttpsUrlSchema, Wr as ErrorCatalog, Wt as HandlerOptions, X as SignedUrl, Xr as defineErrors, Xt as ToolDeclaration, Y as PostalAddressSchema, Yr as FailureSchema, Yt as SchemaOrFields, Z as SignedUrlSchema, Zr as resultSchema, Zt as ToolOptions, _ as readBodyText, _n as McpSkill, _r as TokenScheme, a as t, an as ApplicationBuilder, at as cursorKey, b as createHttpRouteResolver, bn as OperationScope, br as createTokenVerifier, c as isJsonMediaType, d as retryAfterSeconds, dn as AppManifest, dr as TokenAlgorithm, en as defineHandler, er as AdmissionObservation, et as PageInfoSchema, f as publicDestination, fn as Exposure, fr as TokenClaims, g as readBodyBytes, gn as McpGuide, gr as TokenResolutionContext, h as HttpBodyFailureReason, hn as McpConfiguration, hr as TokenPolicy, i as Type, ir as TelemetryConfig, it as TPage, j as createHttpHandler, jn as RoleDefinition, jt as parseInput, k as RouteContext, kn as MAX_ROLES, kr as protectedResourceMetadata, l as readJsonBody, m as HttpBodyFailure, mn as InvocationAuthority, mr as TokenIssuer, n as Static, nn as defineTool, nr as ExecutionObservation, nt as PageQuery, o as createOpenApi, on as ApplicationConfiguration, ot as cutPage, p as BodyReadOptions, pn as Invocation, pr as TokenDevelopment, q as PhoneNumberSchema, qr as Failure, qt as RouteBody, r as TSchema, rr as Observer, rt as PageQueryFields, s as createRpcOpenApi, sn as maximus, sr as reportUnexpected, st as pageLimit, tn as defineTelemetry, tr as BackgroundContext, tt as PageOrder, u as readJsonResponse, ur as TokenAccess, v as HttpRouteDefinition, vr as TokenSource, wr as Principal, xn as OperationShape, xr as projectToken, y as HttpRouteMatch, yn as OperationMiddleware, yr as createTokenAuthorization, zn as SpendVerdict, zr as ok, zt as HandlerAnswer } from "./chunks/types-t_09KY-x.js";
|
|
2
|
+
export { type AdmissionObservation, type AppManifest, type ApplicationBuilder, type ApplicationConfiguration, type Attachment, AttachmentOutputSchema, type AuthOptions, type BackgroundContext, type BillingService, type BinaryBody, type BodyFailure, type BodyReadOptions, type ContextArguments, type ContextDeclaration, type DefinedErrors, type DeletedObject, DeletedObjectSchema, type DomainCode, EmailAddressSchema, EmptyInputSchema, type ErrorCatalog, type ErrorDefinition, type ErrorFactory, type ExecutionObservation, type Exposure, type Fail, type Failed, type Failure, type FailureData, type FailureResult, FailureSchema, type HandlerAnswer, type HandlerArguments, type HandlerDeclaration, type HandlerHttp, type HandlerMcp, type HandlerOptions, HexColorSchema, type HttpBodyFailure, type HttpBodyFailureReason, type HttpMiddleware, type HttpOptions, type HttpRoute, type HttpRouteDefinition, type HttpRouteMatch, type HttpTransport, HttpsUrlSchema, type Invocation, type InvocationAuthority, type LimitVerdict, MAX_ROLES, type McpConfiguration, type McpGuide, type McpSkill, type NamedReference, NamedReferenceSchema, type OAuthResource, type Observer, type OperationMeter, type OperationMiddleware, type OperationScope, type OperationShape, OrganizationIdSchema, Page, type PageInfo, PageInfoSchema, type PageOrder, type PageQuery, PageQueryFields, PhoneNumberSchema, type PostalAddress, PostalAddressSchema, type PreparedContext, type Principal, PrincipalSchema, type ResolvedRole, type Result, type RoleDefinition, type RoleDefinitions, type RouteBody, type RouteContext, type SchemaKeywords, type SchemaOf, type SchemaOrFields, type ScopeMatch, type SignedUrl, SignedUrlSchema, type SpendVerdict, type Static, type Success, type TPage, type TSchema, type TelemetryConfig, type TokenAccess, type TokenAlgorithm, type TokenClaims, type TokenClient, type TokenDevelopment, type TokenIssuer, type TokenPolicy, type TokenPrincipal, type TokenResolutionContext, type TokenScheme, type TokenSource, type TokenUsage, type ToolDeclaration, type ToolOptions, type TransportContext, Type, type UsageEvent, type UsageReceipt, UuidSchema, createHttpHandler, createHttpRouteResolver, createOpenApi, createRpcOpenApi, createTokenAuthorization, createTokenVerifier, cursorKey, cutPage, defineAuth, defineContext, defineErrors, defineHandler, defineRoles, defineTelemetry, defineTool, err, isJsonMediaType, isPublicOperation, isResult, matchesScopes, maximus, ok, operationMatchesScopes, operationScopes, pageLimit, parseInput, parseSchema, projectAccessToken, projectToken, protectedResourceMetadata, publicDestination, readBodyBytes, readBodyText, readJsonBody, readJsonResponse, reportUnexpected, resolveRoles, resultSchema, retryAfterSeconds, standardErrors, t };
|
package/dist/index.js
CHANGED
|
@@ -4,12 +4,12 @@ import { i as standardErrors, n as defineErrors, r as resultSchema, t as Failure
|
|
|
4
4
|
import { n as readBodyBytes, r as readBodyText } from "./chunks/body-DOIHwIIl.js";
|
|
5
5
|
import { t as createHttpRouteResolver } from "./chunks/http-paths-D043DkJv.js";
|
|
6
6
|
import { S as matchesScopes, b as operationScopes, m as isPublicOperation, v as operationMatchesScopes } from "./chunks/tasks-CD-B6_nv.js";
|
|
7
|
-
import { S as resolveRoles, a as projectToken, d as projectAccessToken, n as createTokenAuthorization, p as PrincipalSchema, r as createTokenVerifier, x as defineRoles, y as MAX_ROLES } from "./chunks/tokens-
|
|
7
|
+
import { S as resolveRoles, a as projectToken, d as projectAccessToken, n as createTokenAuthorization, p as PrincipalSchema, r as createTokenVerifier, x as defineRoles, y as MAX_ROLES } from "./chunks/tokens-D0OMoQWV.js";
|
|
8
8
|
import { n as isResult, r as ok, t as err } from "./chunks/result-CF4OzG9O.js";
|
|
9
|
-
import { a as maximus, i as protectedResourceMetadata, n as t, r as createHttpHandler, t as Type } from "./chunks/src-
|
|
9
|
+
import { a as maximus, i as protectedResourceMetadata, n as t, r as createHttpHandler, t as Type } from "./chunks/src-Bcl6xrV7.js";
|
|
10
10
|
import { a as defineTelemetry, i as defineHandler, n as defineAuth, o as defineTool, r as defineContext } from "./chunks/handler-DSpyrWc-.js";
|
|
11
11
|
import { o as reportUnexpected } from "./chunks/telemetry-BtxJh69Q.js";
|
|
12
|
-
import { n as createRpcOpenApi, t as createOpenApi } from "./chunks/openapi-
|
|
12
|
+
import { n as createRpcOpenApi, t as createOpenApi } from "./chunks/openapi-BX_eqRLX.js";
|
|
13
13
|
import { a as retryAfterSeconds, i as readJsonResponse, r as readJsonBody, t as isJsonMediaType } from "./chunks/json-B14evE6-.js";
|
|
14
14
|
import { t as publicDestination } from "./chunks/destination-5xTX0b7E.js";
|
|
15
15
|
|
package/dist/internals.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $n as executeOperation, A as TransportContext, E as HttpOptions, En as operationScopes, Gn as CaptureConfig, Ln as MeteredCall, O as HttpTransport, Qn as ExecutionCall, Sn as composeOperations, Un as recordMeter, Xn as VerifiedCaller, Yn as CapturedCall, Zn as recordCapture, b as createHttpRouteResolver, cr as telemetryEnabled, dn as AppManifest, ir as TelemetryConfig, lr as withDiagnostics, mn as InvocationAuthority, or as recordExecution, pn as Invocation, t as defineApp, tr as BackgroundContext, v as HttpRouteDefinition, wn as operation, xn as OperationShape, y as HttpRouteMatch, yn as OperationMiddleware } from "./chunks/types-
|
|
1
|
+
import { $n as executeOperation, A as TransportContext, E as HttpOptions, En as operationScopes, Gn as CaptureConfig, Ln as MeteredCall, O as HttpTransport, Qn as ExecutionCall, Sn as composeOperations, Un as recordMeter, Xn as VerifiedCaller, Yn as CapturedCall, Zn as recordCapture, b as createHttpRouteResolver, cr as telemetryEnabled, dn as AppManifest, ir as TelemetryConfig, lr as withDiagnostics, mn as InvocationAuthority, or as recordExecution, pn as Invocation, t as defineApp, tr as BackgroundContext, v as HttpRouteDefinition, wn as operation, xn as OperationShape, y as HttpRouteMatch, yn as OperationMiddleware } from "./chunks/types-t_09KY-x.js";
|
|
2
2
|
export { type AppManifest, type BackgroundContext, type CaptureConfig, type CapturedCall, type ExecutionCall, type HttpOptions, type HttpRouteDefinition, type HttpRouteMatch, type HttpTransport, type Invocation, type InvocationAuthority, type MeteredCall, type OperationMiddleware, type OperationShape, type TelemetryConfig, type TransportContext, type VerifiedCaller, composeOperations, createHttpRouteResolver, defineApp, executeOperation, operation, operationScopes, recordCapture, recordExecution, recordMeter, telemetryEnabled, withDiagnostics };
|
package/dist/internals.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as executeOperation, r as recordCapture, t as recordMeter } from "./chunks/meter-
|
|
2
|
-
import { n as defineApp } from "./chunks/define-app-
|
|
1
|
+
import { n as executeOperation, r as recordCapture, t as recordMeter } from "./chunks/meter-dTMGs_lr.js";
|
|
2
|
+
import { n as defineApp } from "./chunks/define-app-Bd6sRVHj.js";
|
|
3
3
|
import { b as operationScopes, g as operation, p as composeOperations } from "./chunks/tasks-CD-B6_nv.js";
|
|
4
4
|
import { a as recordExecution, c as withDiagnostics, s as telemetryEnabled } from "./chunks/telemetry-BtxJh69Q.js";
|
|
5
5
|
import { t as createHttpRouteResolver } from "./chunks/http-paths-D043DkJv.js";
|
package/dist/mcp/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { O as HttpTransport } from "../chunks/types-
|
|
1
|
+
import { O as HttpTransport } from "../chunks/types-t_09KY-x.js";
|
|
2
2
|
/**
|
|
3
3
|
* The MCP transport, for `createWorker(app, { transports: [mcp()] })`: serves the operations that declare
|
|
4
4
|
* `mcp` as tools over Streamable HTTP at `/mcp` (or `path`), with the OpenAPI document and guides as
|
package/dist/mcp/index.js
CHANGED
|
@@ -13,7 +13,7 @@ function mcp(options = {}) {
|
|
|
13
13
|
scope: (namespace) => `${namespace}:mcp:use`,
|
|
14
14
|
maxBodyBytes: (operations, fallback) => Math.max(fallback, ...operations.flatMap(([, op]) => op.mcp ? [op.maxBodyBytes ?? fallback] : [])),
|
|
15
15
|
async handle(context) {
|
|
16
|
-
const { handleMcp } = await import("../chunks/server-
|
|
16
|
+
const { handleMcp } = await import("../chunks/server-DCwV3d2Y.js");
|
|
17
17
|
return handleMcp(context);
|
|
18
18
|
}
|
|
19
19
|
};
|
package/dist/mcp/tasks.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fr as Result, cn as TaskAccess, ln as TaskRecord, qr as Failure } from "../chunks/types-t_09KY-x.js";
|
|
2
2
|
import { CallToolResult, McpServer } from "@modelcontextprotocol/server";
|
|
3
3
|
/** The Tasks extension's id, which a client declares on each request and a server among its capabilities. */
|
|
4
4
|
export declare const TASKS_EXTENSION = "io.modelcontextprotocol/tasks";
|
package/dist/project/config.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Ft as ContextDeclaration, Rn as OperationMeter, T as HttpMiddleware, Vt as HandlerDeclaration, Xt as ToolDeclaration, an as ApplicationBuilder, dn as AppManifest, fn as Exposure, pn as Invocation, vn as OperationHandler, xn as OperationShape, yn as OperationMiddleware } from "../chunks/types-
|
|
1
|
+
import { Ft as ContextDeclaration, Rn as OperationMeter, T as HttpMiddleware, Vt as HandlerDeclaration, Xt as ToolDeclaration, an as ApplicationBuilder, dn as AppManifest, fn as Exposure, pn as Invocation, vn as OperationHandler, xn as OperationShape, yn as OperationMiddleware } from "../chunks/types-t_09KY-x.js";
|
|
2
2
|
import { TSchema } from "typebox";
|
|
3
3
|
/** A route's HTTP method. */
|
|
4
4
|
type HttpMethod = 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
package/dist/project/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { D as HttpRoute, dn as AppManifest, xn as OperationShape } from "../chunks/types-
|
|
2
|
-
import { n as WorkerOptions, r as WorkerRuntime } from "../chunks/workers-types-
|
|
1
|
+
import { D as HttpRoute, dn as AppManifest, xn as OperationShape } from "../chunks/types-t_09KY-x.js";
|
|
2
|
+
import { n as WorkerOptions, r as WorkerRuntime } from "../chunks/workers-types-DyQBrA49.js";
|
|
3
3
|
/** File modules use native Workers handlers; unmatched events fail instead of disappearing. */
|
|
4
4
|
type Handlers<E> = Omit<ExportedHandler<E>, 'fetch'>;
|
|
5
5
|
/** One schedule, declared beside the code it runs. Configure its trigger in Cloudflare as well. */
|
package/dist/project/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { i as standardErrors } from "../chunks/errors-BoutSmiy.js";
|
|
2
|
-
import { r as createAssetHandler, t as createWorker } from "../chunks/runtime-
|
|
3
|
-
import { t as checkPagePaths } from "../chunks/pages-
|
|
2
|
+
import { r as createAssetHandler, t as createWorker } from "../chunks/runtime-CWORw_TD.js";
|
|
3
|
+
import { t as checkPagePaths } from "../chunks/pages-DVORVVEZ.js";
|
|
4
4
|
|
|
5
5
|
// src/project/handlers.ts
|
|
6
6
|
/** Compose file handlers with explicit fallbacks, preserving the platform's execution context. */
|
package/dist/schemas.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as PageInfo, At as decodeSchema, B as DeletedObject, Br as
|
|
1
|
+
import { $ as PageInfo, At as decodeSchema, B as DeletedObject, Br as Attachment, Ct as stripObject, Dn as SchemaKeywords, Dt as SchemaValidationError, Et as SchemaIssue, F as Static, G as NamedReference, H as EmailAddressSchema, I as TSchema, J as PostalAddress, K as NamedReferenceSchema, L as Type, Mt as parseSchema, N as EmptyInputSchema, On as StaticDecode, Ot as InputIssue, P as OrganizationIdSchema, Q as Page, R as UuidSchema, St as strictObject, Tt as urlSchema, U as HexColorSchema, V as DeletedObjectSchema, Vr as AttachmentOutputSchema, W as HttpsUrlSchema, X as SignedUrl, Y as PostalAddressSchema, Z as SignedUrlSchema, _t as literalUnion, at as cursorKey, bt as pipeSchema, ct as withoutSecrets, dt as readSchema, et as PageInfoSchema, ft as SchemaInput, gt as inspectSchema, ht as inputSchema, it as TPage, jt as parseInput, kt as decodeInput, lt as Checked, mt as extendObject, nt as PageQuery, ot as cutPage, pt as defaultSchema, q as PhoneNumberSchema, rt as PageQueryFields, st as pageLimit, tt as PageOrder, ut as checkSchema, vt as looseObject, wt as transformSchema, xt as refineSchema, yt as normalizeSchema, z as t } from "./chunks/types-t_09KY-x.js";
|
|
2
2
|
export { type Attachment, AttachmentOutputSchema, type Checked, type DeletedObject, DeletedObjectSchema, EmailAddressSchema, EmptyInputSchema, HexColorSchema, HttpsUrlSchema, type InputIssue, type NamedReference, NamedReferenceSchema, OrganizationIdSchema, Page, type PageInfo, PageInfoSchema, type PageOrder, type PageQuery, PageQueryFields, PhoneNumberSchema, type PostalAddress, PostalAddressSchema, type SchemaInput, type SchemaIssue, type SchemaKeywords, SchemaValidationError, type SignedUrl, SignedUrlSchema, type Static, type StaticDecode, type TPage, type TSchema, Type, UuidSchema, checkSchema, cursorKey, cutPage, decodeInput, decodeSchema, defaultSchema, extendObject, inputSchema, inspectSchema, literalUnion, looseObject, normalizeSchema, pageLimit, parseInput, parseSchema, pipeSchema, readSchema, refineSchema, strictObject, stripObject, t, transformSchema, urlSchema, withoutSecrets };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { in as StandardFailure, rn as STANDARD_FAILURES } from "./chunks/types-
|
|
1
|
+
import { in as StandardFailure, rn as STANDARD_FAILURES } from "./chunks/types-t_09KY-x.js";
|
|
2
2
|
export { STANDARD_FAILURES, StandardFailure };
|
package/dist/tooling/cli.js
CHANGED
|
@@ -139,7 +139,7 @@ async function run() {
|
|
|
139
139
|
return;
|
|
140
140
|
}
|
|
141
141
|
case "openapi": {
|
|
142
|
-
const { writeOpenApi } = await import("../chunks/openapi-file-
|
|
142
|
+
const { writeOpenApi } = await import("../chunks/openapi-file-BV-f_Wij.js");
|
|
143
143
|
const written = await writeOpenApi(rest[0] ?? ".", {
|
|
144
144
|
...values.out === void 0 ? {} : { out: values.out },
|
|
145
145
|
check: values.check
|
package/dist/vite/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Mn as RoleDefinitions, dr as TokenAlgorithm,
|
|
1
|
+
import { Mn as RoleDefinitions, dr as TokenAlgorithm, hr as TokenPolicy, pr as TokenDevelopment } from "../chunks/types-t_09KY-x.js";
|
|
2
2
|
import { WorkerConfig } from "cf/config";
|
|
3
3
|
import { Plugin } from "vite";
|
|
4
4
|
/** Where the Worker runs: `development` under `vp dev`, `production` in every build. */
|
package/dist/vite/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { a as operationPathParameters } from "../chunks/http-paths-D043DkJv.js";
|
|
2
|
-
import { a as ownsPrefix, t as VERSIONED_PATH } from "../chunks/http-layout-
|
|
2
|
+
import { a as ownsPrefix, t as VERSIONED_PATH } from "../chunks/http-layout-DqE7LBsS.js";
|
|
3
3
|
import { t as routeName } from "../chunks/names-ncD7A3DV.js";
|
|
4
|
-
import { t as checkPagePaths } from "../chunks/pages-
|
|
4
|
+
import { t as checkPagePaths } from "../chunks/pages-DVORVVEZ.js";
|
|
5
5
|
import { a as projectPath, i as projectFiles, o as publicFiles, r as compareNames, s as routeShape, t as PROJECT_DIRECTORIES } from "../chunks/project-files-C0OX7MQQ.js";
|
|
6
|
-
import { t as checkMcpResourceNames } from "../chunks/define-app-
|
|
6
|
+
import { t as checkMcpResourceNames } from "../chunks/define-app-Bd6sRVHj.js";
|
|
7
7
|
import { existsSync, lstatSync, mkdirSync, readFileSync, readdirSync, renameSync, rmSync, writeFileSync } from "node:fs";
|
|
8
8
|
import { dirname, join, posix, relative, resolve, sep } from "node:path";
|
|
9
9
|
import { fileURLToPath } from "node:url";
|
package/dist/webhooks.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Fr as Result, qr as Failure } from "./chunks/types-t_09KY-x.js";
|
|
2
2
|
/** Why a webhook signature was refused: absent, malformed, outside the time tolerance, or not matching. */
|
|
3
3
|
export declare const WEBHOOK_SIGNATURE_FAILURES: readonly ['missing', 'malformed', 'expired', 'mismatch'];
|
|
4
4
|
/** Why a webhook signature was refused. */
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as credentials, i as createWorker, n as WorkerOptions, o as WorkerAssetsOptions, r as WorkerRuntime, t as RpcMethods } from "../chunks/workers-types-
|
|
1
|
+
import { a as credentials, i as createWorker, n as WorkerOptions, o as WorkerAssetsOptions, r as WorkerRuntime, t as RpcMethods } from "../chunks/workers-types-DyQBrA49.js";
|
|
2
2
|
export { RpcMethods, type WorkerAssetsOptions, WorkerOptions, WorkerRuntime, createWorker, credentials };
|
package/dist/workers/runtime.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arbol-ai/maximus",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.8.0",
|
|
4
4
|
"description": "Maximus: define a service once and serve it over HTTP, MCP and Worker RPC on Cloudflare Workers, configured in vite.config.ts, with its OpenAPI and CLI.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"api",
|
|
@@ -25,7 +25,7 @@ export default defineConfig({
|
|
|
25
25
|
| Option | Meaning, and default |
|
|
26
26
|
| -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
27
27
|
| `origin` | Required. The public HTTPS URL that OpenAPI, MCP resources and OAuth discovery advertise, and the default token audience. A `workers.dev` origin is served there; any other host becomes the Worker's custom domain unless `domains` or a fetch trigger route it. |
|
|
28
|
-
| `tokens` | `issuer`, the OAuth authorization server; `audience`, the origin by default; `jwksUri`, `algorithms`, `claims`, `scheme`, `authorizationEndpoint`, `tokenEndpoint`; `source` and `access` behind Cloudflare Access; `development`, the development token's binding, `DEVELOPMENT_TOKEN` by default, `false` for none. See [Tokens](#tokens). |
|
|
28
|
+
| `tokens` | `issuer`, the OAuth authorization server; `audience`, the origin by default; `jwksUri`, `algorithms`, `claims`, `scheme`, `authorizationEndpoint`, `tokenEndpoint`; `source` and `access` behind Cloudflare Access; `development`, the development token's binding, `DEVELOPMENT_TOKEN` by default, `false` for none. See [Tokens](#tokens). `additionalIssuers` lists other servers trusted during a move, each with its own JWKS, claims and `requireType`; a token is verified against the one its `iss` names. |
|
|
29
29
|
| `name` | The Worker's name, the MCP server's and the scopes' prefix: lowercase letters, digits and single hyphens. By default, the package's name without its scope. |
|
|
30
30
|
| `namespace`, `title`, `version` | The scopes' prefix (the name), the human name (the name), the version `/health` reports (the package's). |
|
|
31
31
|
| `description`, `groups` | The OpenAPI document's description of the service, and of each group of routes by its name: `{ Notes: "The notes of the caller's organization." }`. |
|