kizunajs 2.0.0-beta.24 → 2.0.0-beta.26
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/README.md +1 -1
- package/dist/{adapter-DW1ixy_N.mjs → adapter-BUH7okoJ.mjs} +25 -7
- package/dist/{adapter-CWSs910w.cjs → adapter-CcVDJOmm.cjs} +36 -6
- package/dist/{adapter-nQIkQwsM.d.cts → adapter-DSw79pNT.d.cts} +23 -2
- package/dist/{adapter-BdkB6ql9.d.mts → adapter-DxFLPtzt.d.mts} +23 -2
- package/dist/adapter.cjs +3 -1
- package/dist/adapter.d.cts +2 -2
- package/dist/adapter.d.mts +2 -2
- package/dist/adapter.mjs +2 -2
- package/dist/generator.d.cts +1 -1
- package/dist/generator.d.mts +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/jobs-entry.cjs +1 -1
- package/dist/jobs-entry.d.cts +1 -1
- package/dist/jobs-entry.d.mts +1 -1
- package/dist/jobs-entry.mjs +1 -1
- package/dist/plugin.d.cts +1 -1
- package/dist/plugin.d.mts +1 -1
- package/package.json +1 -1
- package/src/adapter.ts +2 -0
- package/src/handler-pipeline.ts +19 -5
- package/src/tool-definitions.ts +27 -6
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
A spec-driven framework for building fully typed REST APIs in TypeScript, where your route declarations produce the validation, the documentation, the clients, and the AI tools.
|
|
6
6
|
|
|
7
|
-
[](https://www.npmjs.com/package/kizunajs/v/2.0.0-beta.
|
|
7
|
+
[](https://www.npmjs.com/package/kizunajs/v/2.0.0-beta.26)
|
|
8
8
|

|
|
9
9
|
|
|
10
10
|
[Documentation](https://kizunajs.com)
|
|
@@ -82,17 +82,35 @@ const buildToolInputSchema = (route) => {
|
|
|
82
82
|
hasBody
|
|
83
83
|
};
|
|
84
84
|
};
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
85
|
+
/**
|
|
86
|
+
* A schema as a model reads it: a date as the ISO string the wire carries, and
|
|
87
|
+
* nothing that tells a model nothing, like `$schema`, kizuna's `brand`, or the
|
|
88
|
+
* safe-integer bounds `z.int()` adds.
|
|
89
|
+
*/
|
|
90
|
+
const toolJsonSchema = (schema, io) => {
|
|
91
|
+
const { $schema: _, ...jsonSchema } = z.toJSONSchema(schema, {
|
|
92
|
+
io,
|
|
89
93
|
unrepresentable: "any",
|
|
90
94
|
override: (context) => {
|
|
91
95
|
encodeForWire(context);
|
|
92
96
|
delete context.jsonSchema.brand;
|
|
97
|
+
if (context.jsonSchema.minimum === Number.MIN_SAFE_INTEGER) delete context.jsonSchema.minimum;
|
|
98
|
+
if (context.jsonSchema.maximum === Number.MAX_SAFE_INTEGER) delete context.jsonSchema.maximum;
|
|
93
99
|
}
|
|
94
100
|
});
|
|
95
|
-
return
|
|
101
|
+
return jsonSchema;
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* The `{ params, query, body }` a model sends, as JSON Schema. A route that
|
|
105
|
+
* takes nothing gets MCP's recommended schema for no input.
|
|
106
|
+
*/
|
|
107
|
+
const toolInputJsonSchema = (route) => {
|
|
108
|
+
const { shape } = buildToolInputSchema(route);
|
|
109
|
+
if (shape === void 0) return {
|
|
110
|
+
type: "object",
|
|
111
|
+
additionalProperties: false
|
|
112
|
+
};
|
|
113
|
+
return toolJsonSchema(z.object(shape), "input");
|
|
96
114
|
};
|
|
97
115
|
/**
|
|
98
116
|
* One {@link ToolDefinition} per route.
|
|
@@ -107,7 +125,7 @@ const buildToolDefinitions = (routes) => {
|
|
|
107
125
|
name: names.get(routeKey),
|
|
108
126
|
key: routeKey,
|
|
109
127
|
description: describeTool(route),
|
|
110
|
-
inputSchema:
|
|
128
|
+
inputSchema: toolInputJsonSchema(route)
|
|
111
129
|
}));
|
|
112
130
|
};
|
|
113
131
|
//#endregion
|
|
@@ -2333,4 +2351,4 @@ const headersToObject = (headers) => {
|
|
|
2333
2351
|
return result;
|
|
2334
2352
|
};
|
|
2335
2353
|
//#endregion
|
|
2336
|
-
export { dispatchDueJobs as $, parseFetchBody as A, matchRoute as B, guardDenyFor as C,
|
|
2354
|
+
export { dispatchDueJobs as $, parseFetchBody as A, matchRoute as B, guardDenyFor as C, toolJsonSchema as Ct, jobRoutes as D, jobRouter as E, warnUnsupportedJobOptions as F, JobDispatchError as G, insufficientScope as H, isRawResponse as I, createJobRunner as J, defineJobTransport as K, rawResponse as L, routerFromRoutes as M, runHandler as N, jobRunnerFrom as O, runRoute as P, DispatchResultSchema as Q, assertNoPathCollisions as R, getHeaderValue as S, toolInputJsonSchema as St, isGuardDenial as T, toolRefusal as Tt, requiresDenial as U, sortFlattenedRoutes as V, withPermissions as W, ResponseError as X, jobFnAt as Y, DispatchFailedSchema as Z, defineAdapter as _, toolEvents as _t, HANDLER_ARG_KEYS as a, STATUS_TITLES as at, entriesToObject as b, describeTool as bt, ROUTER_META as c, createRoles as ct, SCHEMES_META as d, permissionNames as dt, dispatchSucceeded as et, adapterContextOf as f, createGroups as ft, contractOf as g, expandStreamTools as gt, boundJobKeys as h, groupRoutes as ht, GUARD_SCHEMA_META as i, problemFromBody as it, renderJsonResult as j, parseBodyText as k, RUN_ROUTE_KEY as l, isPermissions as lt, bearerChallenge as m, assembleRoutes as mt, DISPATCH_ROUTE_KEY as n, failedJobs as nt, JOBS_META as o, getStatusText as ot, assembleApi as p, isGroupSet as pt, JobInputError as q, GUARDS_META as r, problemDetails as rt, REQUEST_CONTEXT_META as s, createPermissions as st, API_META as t, dueJobs as tt, ResponseValidationError as u, isRoles as ut, dispatchHandler as v, buildToolDefinitions as vt, headersToObject as w, toolOptionsOf as wt, extractCredential as x, selectToolRoutes as xt, dispatchRoute as y, buildToolInputSchema as yt, routeClaims as z };
|
|
@@ -82,17 +82,35 @@ const buildToolInputSchema = (route) => {
|
|
|
82
82
|
hasBody
|
|
83
83
|
};
|
|
84
84
|
};
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
85
|
+
/**
|
|
86
|
+
* A schema as a model reads it: a date as the ISO string the wire carries, and
|
|
87
|
+
* nothing that tells a model nothing, like `$schema`, kizuna's `brand`, or the
|
|
88
|
+
* safe-integer bounds `z.int()` adds.
|
|
89
|
+
*/
|
|
90
|
+
const toolJsonSchema = (schema, io) => {
|
|
91
|
+
const { $schema: _, ...jsonSchema } = zod.z.toJSONSchema(schema, {
|
|
92
|
+
io,
|
|
89
93
|
unrepresentable: "any",
|
|
90
94
|
override: (context) => {
|
|
91
95
|
require_plugin_server.encodeForWire(context);
|
|
92
96
|
delete context.jsonSchema.brand;
|
|
97
|
+
if (context.jsonSchema.minimum === Number.MIN_SAFE_INTEGER) delete context.jsonSchema.minimum;
|
|
98
|
+
if (context.jsonSchema.maximum === Number.MAX_SAFE_INTEGER) delete context.jsonSchema.maximum;
|
|
93
99
|
}
|
|
94
100
|
});
|
|
95
|
-
return
|
|
101
|
+
return jsonSchema;
|
|
102
|
+
};
|
|
103
|
+
/**
|
|
104
|
+
* The `{ params, query, body }` a model sends, as JSON Schema. A route that
|
|
105
|
+
* takes nothing gets MCP's recommended schema for no input.
|
|
106
|
+
*/
|
|
107
|
+
const toolInputJsonSchema = (route) => {
|
|
108
|
+
const { shape } = buildToolInputSchema(route);
|
|
109
|
+
if (shape === void 0) return {
|
|
110
|
+
type: "object",
|
|
111
|
+
additionalProperties: false
|
|
112
|
+
};
|
|
113
|
+
return toolJsonSchema(zod.z.object(shape), "input");
|
|
96
114
|
};
|
|
97
115
|
/**
|
|
98
116
|
* One {@link ToolDefinition} per route.
|
|
@@ -107,7 +125,7 @@ const buildToolDefinitions = (routes) => {
|
|
|
107
125
|
name: names.get(routeKey),
|
|
108
126
|
key: routeKey,
|
|
109
127
|
description: describeTool(route),
|
|
110
|
-
inputSchema:
|
|
128
|
+
inputSchema: toolInputJsonSchema(route)
|
|
111
129
|
}));
|
|
112
130
|
};
|
|
113
131
|
//#endregion
|
|
@@ -2771,6 +2789,18 @@ Object.defineProperty(exports, "toolEvents", {
|
|
|
2771
2789
|
return toolEvents;
|
|
2772
2790
|
}
|
|
2773
2791
|
});
|
|
2792
|
+
Object.defineProperty(exports, "toolInputJsonSchema", {
|
|
2793
|
+
enumerable: true,
|
|
2794
|
+
get: function() {
|
|
2795
|
+
return toolInputJsonSchema;
|
|
2796
|
+
}
|
|
2797
|
+
});
|
|
2798
|
+
Object.defineProperty(exports, "toolJsonSchema", {
|
|
2799
|
+
enumerable: true,
|
|
2800
|
+
get: function() {
|
|
2801
|
+
return toolJsonSchema;
|
|
2802
|
+
}
|
|
2803
|
+
});
|
|
2774
2804
|
Object.defineProperty(exports, "toolOptionsOf", {
|
|
2775
2805
|
enumerable: true,
|
|
2776
2806
|
get: function() {
|
|
@@ -546,6 +546,17 @@ interface ToolDefinition {
|
|
|
546
546
|
*/
|
|
547
547
|
inputSchema: Record<string, unknown>;
|
|
548
548
|
}
|
|
549
|
+
/**
|
|
550
|
+
* A schema as a model reads it: a date as the ISO string the wire carries, and
|
|
551
|
+
* nothing that tells a model nothing, like `$schema`, kizuna's `brand`, or the
|
|
552
|
+
* safe-integer bounds `z.int()` adds.
|
|
553
|
+
*/
|
|
554
|
+
declare const toolJsonSchema: (schema: z.ZodType, io: "input" | "output") => Record<string, unknown>;
|
|
555
|
+
/**
|
|
556
|
+
* The `{ params, query, body }` a model sends, as JSON Schema. A route that
|
|
557
|
+
* takes nothing gets MCP's recommended schema for no input.
|
|
558
|
+
*/
|
|
559
|
+
declare const toolInputJsonSchema: (route: RouteDefinition) => Record<string, unknown>;
|
|
549
560
|
/**
|
|
550
561
|
* One {@link ToolDefinition} per route.
|
|
551
562
|
*/
|
|
@@ -662,11 +673,21 @@ type ApplyErrorEnvelope<Input, Status> = IsErrorStatus<Status> extends true ? (I
|
|
|
662
673
|
type HandlerBody<S, Status> = S extends z.ZodType ? ApplyErrorEnvelope<z.input<S>, Status> : S extends StreamResponseDefinition ? IsErrorStatus<Status> extends true ? never : StreamBodyOf<S> : S extends {
|
|
663
674
|
body: z.ZodType;
|
|
664
675
|
} ? ApplyErrorEnvelope<z.input<S['body']>, Status> : never;
|
|
665
|
-
|
|
676
|
+
/**
|
|
677
|
+
* A response that carries no body, like a `204: z.void()`, may leave `body` out. A body
|
|
678
|
+
* that resolves to `never` stays required, so a status that cannot be returned still
|
|
679
|
+
* fails to compile.
|
|
680
|
+
*/
|
|
681
|
+
type ResponseReturn<R extends Pick<RouteDefinition, 'responses'>, Status extends keyof R['responses']> = IsBodiless<HandlerBody<R['responses'][Status], Status>> extends true ? {
|
|
682
|
+
status: Status extends number ? Status : never;
|
|
683
|
+
body?: HandlerBody<R['responses'][Status], Status>;
|
|
684
|
+
headers?: ResponseHeaders;
|
|
685
|
+
} : {
|
|
666
686
|
status: Status extends number ? Status : never;
|
|
667
687
|
body: HandlerBody<R['responses'][Status], Status>;
|
|
668
688
|
headers?: ResponseHeaders;
|
|
669
689
|
};
|
|
690
|
+
type IsBodiless<Body> = [Body] extends [never] ? false : [Body] extends [undefined | void] ? true : false;
|
|
670
691
|
/**
|
|
671
692
|
* Constrained to `responses` alone so a job, which has no method or path, reuses it.
|
|
672
693
|
*/
|
|
@@ -2755,4 +2776,4 @@ declare const parseBodyText: (text: string, route: RouteDefinition) => unknown;
|
|
|
2755
2776
|
declare const parseFetchBody: (request: Request, route: RouteDefinition) => Promise<unknown>;
|
|
2756
2777
|
declare const headersToObject: (headers: Headers) => ResponseHeaders;
|
|
2757
2778
|
//#endregion
|
|
2758
|
-
export { jobRoutes as $,
|
|
2779
|
+
export { jobRoutes as $, StreamBodyOf as $i, isJobDefinition as $n, AuthContextOf as $r, PluginsBySlug as $t, RenderedResult as A, BasicConfig as Aa, ToolRunOptions as Ai, RoutesOf as An, parseCron as Ar, sanitizeIdentifier as At, bearerChallenge as B, IdentityParamsOf as Ba, toolOptionsOf as Bi, JobHandler as Bn, GroupSet as Br, PluginApi as Bt, JOBS_META as C, toolEvents as Ca, isRouteDefinition as Ci, GeneratedFile as Cn, ParsedCron as Cr, resolveResponseBody as Ct, REQUEST_CONTEXT_META as D, withPermissions as Da, ToolAnswer as Di, GuardSchemaOf as Dn, firesBetween as Dr, resolveResponseHeaders as Dt, MountedOf as E, requiresDenial as Ea, StreamTools as Ei, ApiPluginsOf as En, dueSchedules as Er, resolveResponseEtag as Et, RouteMatcher as F, CredentialOf as Fa, buildToolInputSchema as Fi, CompiledJobs as Fn, RequestContextHeaderValues as Fr, AnyPlugin as Ft, dispatchRoute as G, RoleOf as Ga, PathParamsCheck as Gi, JobRunnerConfig as Gn, isRawResponse as Gr, PluginExportsOf as Gt, contractOf as H, NoCredential as Ha, ExtractPathParams as Hi, JobHandlerReturn as Hn, createGroups as Hr, PluginDeclaration as Ht, SCHEMES_META as I, CustomConfig as Ia, describeTool as Ii, FlattenedJob as In, RequestContextSchema as Ir, ApiPlugins as It, getHeaderValue as J, buildPath as Ji, JobsArg as Jn, RouteWithHandler as Jr, PluginRouteBuilder as Jt, entriesToObject as K, RolesOf as Ka, PathSegment as Ki, JobVoidReturn as Kn, rawResponse as Kr, PluginFactory as Kt, ServerOptions as L, GrantsOf as La, selectToolRoutes as Li, HttpJobsConfig as Ln, GroupOptions as Lr, InstallOptions as Lt, RequestContextRun as M, BearerConfig as Ma, ToolDefinition as Mi, AuthoredJobDefinition as Mn, scheduleTimezone as Mr, statusToCamelCase as Mt, RequestPipeline as N, BearerCredential as Na, ToolInputSchema as Ni, AuthoredJobs as Nn, RequestContextConfig as Nr, toCamelCase as Nt, ROUTER_META as O, ApiKeyConfig as Oa, ToolEventYield as Oi, JobsOf as On, nextRun as Or, resolveResponseStream as Ot, ResponseValidationError as P, Credential as Pa, buildToolDefinitions as Pi, CompiledJob as Pn, RequestContextHeaderInputs as Pr, toPascalCase as Pt, jobRouter as Q, StreamBody as Qi, isCompiledJob as Qn, sortFlattenedRoutes as Qr, PluginSetupContext as Qt, adapterContextOf as R, GuardHoldings as Ra, toolInputJsonSchema as Ri, InProcessJobsConfig as Rn, GroupPaths as Rr, PLUGIN_ROUTES_META_KEY as Rt, HandlerContextOf as S, expandStreamTools as Sa, formatValidationError as Si, DiffSettings as Sn, JobSchedule as Sr, mergeHeaderFields as St, MountArgsOf as T, insufficientScope as Ta, ModelToolCall as Ti, ApiDefinition as Tn, cron as Tr, resolveResponseContentType as Tt, defineAdapter as U, OAuth2Config as Ua, HasPathParams as Ui, JobHandlers as Un, isGroupSet as Ur, PluginDefinition as Ut, boundJobKeys as V, IdentityRole as Va, toolRefusal as Vi, JobHandlerArgs as Vn, ResolvedGroup as Vr, PluginArgs as Vt, dispatchHandler as W, OpenIdConnectConfig as Wa, PathParamName as Wi, JobResponses as Wn, RawResponse as Wr, PluginExportValues as Wt, headersToObject as X, EVENT_STREAM_MEDIA_TYPE as Xi, NoJobs as Xn, RouteMatch as Xr, PluginRoutesOf as Xt, guardDenyFor as Y, parsePath as Yi, JobsConfig as Yn, MatchResult as Yr, PluginRoutes as Yt, isGuardDenial as Z, EncodeStreamOptions as Zi, flattenJobs as Zn, matchRoute as Zr, PluginSetup as Zt, GuardDeny as _, ToolCall as _a, ThrowableReturn as _i, ConfiguredRequestContextSchemas as _n, JobTransportSupports as _r, isJsonMediaType as _t, AdapterRequest as a, StreamMode as aa, GuardReturn as ai, pluginRouteTree as an, JobQueueArgs as ar, runHandler as at, HANDLER_ARG_KEYS as b, ToolKeys as ba, allowedMethodsForPath as bi, KizunaConfigShape as bn, ScheduledJob as br, isZodSchema as bt, ApiBrand as c, isNamedStream as ca, HandlerArgs as ci, ConfiguredAdapterContext as cn, JobRunner as cr, ApiRouter as ct, DISPATCH_ROUTE_KEY as d, streamContentType as da, RawInputs as di, ConfiguredGroups as dn, jobFnAt as dr, createApiReference as dt, StreamChunk as ea, BrandedHandlerContext as ei, ResolvedPlugin as en, jobAt as er, jobRunnerFrom as et, ErrorFormatter as f, streamMode as fa, RequestContextValues as fi, ConfiguredGuardSchema as fn, JobDescriptor as fr, pluginExportsOf as ft, GuardDenialBody as g, ToolAt as ga, RoutesWithHandlerContext as gi, ConfiguredRequestContext as gn, JobTransportDefinition as gr, isHintPrefix as gt, GuardDenial as h, StreamWithTools as ha, Router as hi, ConfiguredPlugins as hn, JobTransport as hr, resolvePlugins as ht, AdapterDefinition as i, StreamMessageOf as ia, GuardParams as ii, definePlugin as in, JobInputError as ir, routerFromRoutes as it, RequestContextMap as j, BasicCredential as ja, ToolRunResult as ji, SchemesOf as jn, scheduleExpression as jr, shortTypeName as jt, RUN_ROUTE_KEY as k, ApiKeyCredential as ka, ToolRunCall as ki, RequestContextOf as kn, nextRuns as kr, sanitizeFieldName as kt, ApiParts as l, routeStreams as la, HandlerReturn as li, ConfiguredAdapterValue as ln, JobRunnerOptions as lr, ResponseError as lt, GUARD_SCHEMA_META as m, streamStatuses as ma, RouteHandler as mi, ConfiguredJobs as mn, JobMessage as mr, pluginRoutesOf as mt, API_META as n, StreamContext as na, FlattenedRoute as ni, RoutePathSchema as nn, JobFn as nr, parseFetchBody as nt, AdapterResult as o, StreamYield as oa, GuardSuccess as oi, route as on, JobQueueOptions as or, runRoute as ot, GUARDS_META as p, streamSchemas as pa, RouteGuardBrandOf as pi, ConfiguredIdentities as pn, JobDispatchError as pr, pluginRouterOf as pt, extractCredential as q, RoutePathParamsCheck as qi, Jobs as qn, RouteBuilder as qr, PluginList as qt, Adapter as r, StreamMessage as ra, GuardAnswer as ri, SlugOption as rn, JobFnByKey as rr, renderJsonResult as rt, AnyAdapter as s, encodeStreamBody as sa, GuardedParamNames as si, ApiContext as sn, JobRunArgs as sr, warnUnsupportedJobOptions as st, ADAPTER_CONTEXT as t, StreamComment as ta, ContextFromAuth as ti, RouteAuthSchema as tn, JobErrorHandler as tr, parseBodyText as tt, ApiWithRouter as u, soleStreamResponse as ua, HandlersFromRoutes as ui, ConfiguredCodes as un, createJobRunner as ur, groupRoutes as ut, GuardMap as v, ToolError as va, ValidationFailure as vi, JobFnOf as vn, JobWorker as vr, isStreamResponse as vt, JobsMeta as w, AccessCheckInput as wa, validateRequest as wi, apiEntries as wn, assertValidSchedule as wr, resolveResponseCache as wt, HandleArgs as x, ToolResult as xa, flattenRoutes as xi, ApiEntry as xn, defineJobTransport as xr, localTypeName as xt, GuardRun as y, ToolEvents as ya, ValidationStage as yi, JobsOfTree as yn, JobWorkerContext as yr, isSuccessStatus as yt, assembleApi as z, Identity as za, toolJsonSchema as zi, JobDefinition as zn, GroupPathsOf as zr, PLUGIN_SERVERS_META_KEY as zt };
|
|
@@ -546,6 +546,17 @@ interface ToolDefinition {
|
|
|
546
546
|
*/
|
|
547
547
|
inputSchema: Record<string, unknown>;
|
|
548
548
|
}
|
|
549
|
+
/**
|
|
550
|
+
* A schema as a model reads it: a date as the ISO string the wire carries, and
|
|
551
|
+
* nothing that tells a model nothing, like `$schema`, kizuna's `brand`, or the
|
|
552
|
+
* safe-integer bounds `z.int()` adds.
|
|
553
|
+
*/
|
|
554
|
+
declare const toolJsonSchema: (schema: z.ZodType, io: "input" | "output") => Record<string, unknown>;
|
|
555
|
+
/**
|
|
556
|
+
* The `{ params, query, body }` a model sends, as JSON Schema. A route that
|
|
557
|
+
* takes nothing gets MCP's recommended schema for no input.
|
|
558
|
+
*/
|
|
559
|
+
declare const toolInputJsonSchema: (route: RouteDefinition) => Record<string, unknown>;
|
|
549
560
|
/**
|
|
550
561
|
* One {@link ToolDefinition} per route.
|
|
551
562
|
*/
|
|
@@ -662,11 +673,21 @@ type ApplyErrorEnvelope<Input, Status> = IsErrorStatus<Status> extends true ? (I
|
|
|
662
673
|
type HandlerBody<S, Status> = S extends z.ZodType ? ApplyErrorEnvelope<z.input<S>, Status> : S extends StreamResponseDefinition ? IsErrorStatus<Status> extends true ? never : StreamBodyOf<S> : S extends {
|
|
663
674
|
body: z.ZodType;
|
|
664
675
|
} ? ApplyErrorEnvelope<z.input<S['body']>, Status> : never;
|
|
665
|
-
|
|
676
|
+
/**
|
|
677
|
+
* A response that carries no body, like a `204: z.void()`, may leave `body` out. A body
|
|
678
|
+
* that resolves to `never` stays required, so a status that cannot be returned still
|
|
679
|
+
* fails to compile.
|
|
680
|
+
*/
|
|
681
|
+
type ResponseReturn<R extends Pick<RouteDefinition, 'responses'>, Status extends keyof R['responses']> = IsBodiless<HandlerBody<R['responses'][Status], Status>> extends true ? {
|
|
682
|
+
status: Status extends number ? Status : never;
|
|
683
|
+
body?: HandlerBody<R['responses'][Status], Status>;
|
|
684
|
+
headers?: ResponseHeaders;
|
|
685
|
+
} : {
|
|
666
686
|
status: Status extends number ? Status : never;
|
|
667
687
|
body: HandlerBody<R['responses'][Status], Status>;
|
|
668
688
|
headers?: ResponseHeaders;
|
|
669
689
|
};
|
|
690
|
+
type IsBodiless<Body> = [Body] extends [never] ? false : [Body] extends [undefined | void] ? true : false;
|
|
670
691
|
/**
|
|
671
692
|
* Constrained to `responses` alone so a job, which has no method or path, reuses it.
|
|
672
693
|
*/
|
|
@@ -2755,4 +2776,4 @@ declare const parseBodyText: (text: string, route: RouteDefinition) => unknown;
|
|
|
2755
2776
|
declare const parseFetchBody: (request: Request, route: RouteDefinition) => Promise<unknown>;
|
|
2756
2777
|
declare const headersToObject: (headers: Headers) => ResponseHeaders;
|
|
2757
2778
|
//#endregion
|
|
2758
|
-
export { jobRoutes as $,
|
|
2779
|
+
export { jobRoutes as $, StreamBodyOf as $i, isJobDefinition as $n, AuthContextOf as $r, PluginsBySlug as $t, RenderedResult as A, BasicConfig as Aa, ToolRunOptions as Ai, RoutesOf as An, parseCron as Ar, sanitizeIdentifier as At, bearerChallenge as B, IdentityParamsOf as Ba, toolOptionsOf as Bi, JobHandler as Bn, GroupSet as Br, PluginApi as Bt, JOBS_META as C, toolEvents as Ca, isRouteDefinition as Ci, GeneratedFile as Cn, ParsedCron as Cr, resolveResponseBody as Ct, REQUEST_CONTEXT_META as D, withPermissions as Da, ToolAnswer as Di, GuardSchemaOf as Dn, firesBetween as Dr, resolveResponseHeaders as Dt, MountedOf as E, requiresDenial as Ea, StreamTools as Ei, ApiPluginsOf as En, dueSchedules as Er, resolveResponseEtag as Et, RouteMatcher as F, CredentialOf as Fa, buildToolInputSchema as Fi, CompiledJobs as Fn, RequestContextHeaderValues as Fr, AnyPlugin as Ft, dispatchRoute as G, RoleOf as Ga, PathParamsCheck as Gi, JobRunnerConfig as Gn, isRawResponse as Gr, PluginExportsOf as Gt, contractOf as H, NoCredential as Ha, ExtractPathParams as Hi, JobHandlerReturn as Hn, createGroups as Hr, PluginDeclaration as Ht, SCHEMES_META as I, CustomConfig as Ia, describeTool as Ii, FlattenedJob as In, RequestContextSchema as Ir, ApiPlugins as It, getHeaderValue as J, buildPath as Ji, JobsArg as Jn, RouteWithHandler as Jr, PluginRouteBuilder as Jt, entriesToObject as K, RolesOf as Ka, PathSegment as Ki, JobVoidReturn as Kn, rawResponse as Kr, PluginFactory as Kt, ServerOptions as L, GrantsOf as La, selectToolRoutes as Li, HttpJobsConfig as Ln, GroupOptions as Lr, InstallOptions as Lt, RequestContextRun as M, BearerConfig as Ma, ToolDefinition as Mi, AuthoredJobDefinition as Mn, scheduleTimezone as Mr, statusToCamelCase as Mt, RequestPipeline as N, BearerCredential as Na, ToolInputSchema as Ni, AuthoredJobs as Nn, RequestContextConfig as Nr, toCamelCase as Nt, ROUTER_META as O, ApiKeyConfig as Oa, ToolEventYield as Oi, JobsOf as On, nextRun as Or, resolveResponseStream as Ot, ResponseValidationError as P, Credential as Pa, buildToolDefinitions as Pi, CompiledJob as Pn, RequestContextHeaderInputs as Pr, toPascalCase as Pt, jobRouter as Q, StreamBody as Qi, isCompiledJob as Qn, sortFlattenedRoutes as Qr, PluginSetupContext as Qt, adapterContextOf as R, GuardHoldings as Ra, toolInputJsonSchema as Ri, InProcessJobsConfig as Rn, GroupPaths as Rr, PLUGIN_ROUTES_META_KEY as Rt, HandlerContextOf as S, expandStreamTools as Sa, formatValidationError as Si, DiffSettings as Sn, JobSchedule as Sr, mergeHeaderFields as St, MountArgsOf as T, insufficientScope as Ta, ModelToolCall as Ti, ApiDefinition as Tn, cron as Tr, resolveResponseContentType as Tt, defineAdapter as U, OAuth2Config as Ua, HasPathParams as Ui, JobHandlers as Un, isGroupSet as Ur, PluginDefinition as Ut, boundJobKeys as V, IdentityRole as Va, toolRefusal as Vi, JobHandlerArgs as Vn, ResolvedGroup as Vr, PluginArgs as Vt, dispatchHandler as W, OpenIdConnectConfig as Wa, PathParamName as Wi, JobResponses as Wn, RawResponse as Wr, PluginExportValues as Wt, headersToObject as X, EVENT_STREAM_MEDIA_TYPE as Xi, NoJobs as Xn, RouteMatch as Xr, PluginRoutesOf as Xt, guardDenyFor as Y, parsePath as Yi, JobsConfig as Yn, MatchResult as Yr, PluginRoutes as Yt, isGuardDenial as Z, EncodeStreamOptions as Zi, flattenJobs as Zn, matchRoute as Zr, PluginSetup as Zt, GuardDeny as _, ToolCall as _a, ThrowableReturn as _i, ConfiguredRequestContextSchemas as _n, JobTransportSupports as _r, isJsonMediaType as _t, AdapterRequest as a, StreamMode as aa, GuardReturn as ai, pluginRouteTree as an, JobQueueArgs as ar, runHandler as at, HANDLER_ARG_KEYS as b, ToolKeys as ba, allowedMethodsForPath as bi, KizunaConfigShape as bn, ScheduledJob as br, isZodSchema as bt, ApiBrand as c, isNamedStream as ca, HandlerArgs as ci, ConfiguredAdapterContext as cn, JobRunner as cr, ApiRouter as ct, DISPATCH_ROUTE_KEY as d, streamContentType as da, RawInputs as di, ConfiguredGroups as dn, jobFnAt as dr, createApiReference as dt, StreamChunk as ea, BrandedHandlerContext as ei, ResolvedPlugin as en, jobAt as er, jobRunnerFrom as et, ErrorFormatter as f, streamMode as fa, RequestContextValues as fi, ConfiguredGuardSchema as fn, JobDescriptor as fr, pluginExportsOf as ft, GuardDenialBody as g, ToolAt as ga, RoutesWithHandlerContext as gi, ConfiguredRequestContext as gn, JobTransportDefinition as gr, isHintPrefix as gt, GuardDenial as h, StreamWithTools as ha, Router as hi, ConfiguredPlugins as hn, JobTransport as hr, resolvePlugins as ht, AdapterDefinition as i, StreamMessageOf as ia, GuardParams as ii, definePlugin as in, JobInputError as ir, routerFromRoutes as it, RequestContextMap as j, BasicCredential as ja, ToolRunResult as ji, SchemesOf as jn, scheduleExpression as jr, shortTypeName as jt, RUN_ROUTE_KEY as k, ApiKeyCredential as ka, ToolRunCall as ki, RequestContextOf as kn, nextRuns as kr, sanitizeFieldName as kt, ApiParts as l, routeStreams as la, HandlerReturn as li, ConfiguredAdapterValue as ln, JobRunnerOptions as lr, ResponseError as lt, GUARD_SCHEMA_META as m, streamStatuses as ma, RouteHandler as mi, ConfiguredJobs as mn, JobMessage as mr, pluginRoutesOf as mt, API_META as n, StreamContext as na, FlattenedRoute as ni, RoutePathSchema as nn, JobFn as nr, parseFetchBody as nt, AdapterResult as o, StreamYield as oa, GuardSuccess as oi, route as on, JobQueueOptions as or, runRoute as ot, GUARDS_META as p, streamSchemas as pa, RouteGuardBrandOf as pi, ConfiguredIdentities as pn, JobDispatchError as pr, pluginRouterOf as pt, extractCredential as q, RoutePathParamsCheck as qi, Jobs as qn, RouteBuilder as qr, PluginList as qt, Adapter as r, StreamMessage as ra, GuardAnswer as ri, SlugOption as rn, JobFnByKey as rr, renderJsonResult as rt, AnyAdapter as s, encodeStreamBody as sa, GuardedParamNames as si, ApiContext as sn, JobRunArgs as sr, warnUnsupportedJobOptions as st, ADAPTER_CONTEXT as t, StreamComment as ta, ContextFromAuth as ti, RouteAuthSchema as tn, JobErrorHandler as tr, parseBodyText as tt, ApiWithRouter as u, soleStreamResponse as ua, HandlersFromRoutes as ui, ConfiguredCodes as un, createJobRunner as ur, groupRoutes as ut, GuardMap as v, ToolError as va, ValidationFailure as vi, JobFnOf as vn, JobWorker as vr, isStreamResponse as vt, JobsMeta as w, AccessCheckInput as wa, validateRequest as wi, apiEntries as wn, assertValidSchedule as wr, resolveResponseCache as wt, HandleArgs as x, ToolResult as xa, flattenRoutes as xi, ApiEntry as xn, defineJobTransport as xr, localTypeName as xt, GuardRun as y, ToolEvents as ya, ValidationStage as yi, JobsOfTree as yn, JobWorkerContext as yr, isSuccessStatus as yt, assembleApi as z, Identity as za, toolJsonSchema as zi, JobDefinition as zn, GroupPathsOf as zr, PLUGIN_SERVERS_META_KEY as zt };
|
package/dist/adapter.cjs
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_plugin = require("./plugin-Dw-yCjTY.cjs");
|
|
3
3
|
const require_plugin_server = require("./plugin-server-7pkhltOp.cjs");
|
|
4
4
|
const require_schemas = require("./schemas-Bre1FVHq.cjs");
|
|
5
|
-
const require_adapter = require("./adapter-
|
|
5
|
+
const require_adapter = require("./adapter-CcVDJOmm.cjs");
|
|
6
6
|
exports.API_META = require_adapter.API_META;
|
|
7
7
|
exports.AUTO_GUARD_BRAND = require_plugin.AUTO_GUARD_BRAND;
|
|
8
8
|
exports.AUTO_RESPONSES_BRAND = require_plugin.AUTO_RESPONSES_BRAND;
|
|
@@ -80,6 +80,8 @@ exports.runHandler = require_adapter.runHandler;
|
|
|
80
80
|
exports.runRoute = require_adapter.runRoute;
|
|
81
81
|
exports.selectToolRoutes = require_adapter.selectToolRoutes;
|
|
82
82
|
exports.sortFlattenedRoutes = require_adapter.sortFlattenedRoutes;
|
|
83
|
+
exports.toolInputJsonSchema = require_adapter.toolInputJsonSchema;
|
|
84
|
+
exports.toolJsonSchema = require_adapter.toolJsonSchema;
|
|
83
85
|
exports.toolOptionsOf = require_adapter.toolOptionsOf;
|
|
84
86
|
exports.toolRefusal = require_adapter.toolRefusal;
|
|
85
87
|
exports.validateRequest = require_plugin_server.validateRequest;
|
package/dist/adapter.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { A as AutoResponsesBrand, B as ROUTES_GROUP, D as AUTO_RESPONSES_BRAND, I as HANDLER_CONTEXT_BRAND, K as RouteDefinition, L as HandlerContextBrand, T as AUTO_GUARD_BRAND, W as ResponseHeaders, Y as RoutePath, Z as Routes, at as ProblemDetails, c as authenticationChallenge, f as resolveSecurityRequirements, st as problemDetails, z as Method } from "./error-response-YbkRMKno.cjs";
|
|
2
|
-
import { $ as jobRoutes, A as RenderedResult, B as bearerChallenge,
|
|
3
|
-
export { ADAPTER_CONTEXT, API_META, AUTO_GUARD_BRAND, AUTO_RESPONSES_BRAND, AccessCheckInput, Adapter, AdapterDefinition, AdapterRequest, AdapterResult, AnyAdapter, ApiBrand, ApiParts, ApiPlugins, ApiRouter, ApiWithRouter, AutoResponsesBrand, BrandedHandlerContext, CompiledJob, ContextFromAuth, DISPATCH_ROUTE_KEY, EncodeStreamOptions, ErrorFormatter, FlattenedJob, FlattenedRoute, GUARDS_META, GUARD_SCHEMA_META, GuardDenial, GuardDenialBody, GuardDeny, GuardMap, GuardParams, GuardRun, GuardedParamNames, HANDLER_ARG_KEYS, HANDLER_CONTEXT_BRAND, HandleArgs, HandlerContextBrand, HandlerContextOf, HandlersFromRoutes, JOBS_META, JobDescriptor, JobDispatchError, JobErrorHandler, JobFnByKey, JobHandler, JobHandlers, JobInputError, JobMessage, JobRunner, JobRunnerOptions, JobTransport, JobWorker, JobWorkerContext, Jobs, JobsMeta, MatchResult, Method, MountArgsOf, MountedOf, PathSegment, PluginArgs, PluginDeclaration, PluginDefinition, PluginExportValues, PluginExportsOf, PluginRoutes, PluginRoutesOf, ProblemDetails, REQUEST_CONTEXT_META, ROUTER_META, ROUTES_GROUP, RUN_ROUTE_KEY, RawInputs, RawResponse, RenderedResult, RequestContextMap, RequestContextRun, RequestContextValues, RequestPipeline, ResolvedPlugin, ResponseError, ResponseHeaders, ResponseValidationError, RouteDefinition, RouteHandler, RouteMatch, RouteMatcher, RoutePath, Router, Routes, RoutesWithHandlerContext, SCHEMES_META, ScheduledJob, ServerOptions, StreamContext, ToolDefinition, ToolInputSchema, ValidationFailure, ValidationStage, adapterContextOf, allowedMethodsForPath, assembleApi, authenticationChallenge, bearerChallenge, boundJobKeys, buildPath, buildToolDefinitions, buildToolInputSchema, contractOf, createApiReference, createJobRunner, defineAdapter, defineJobTransport, definePlugin, describeTool, dispatchHandler, dispatchRoute, encodeStreamBody, entriesToObject, extractCredential, flattenJobs, flattenRoutes, formatValidationError, getHeaderValue, groupRoutes, guardDenyFor, headersToObject, insufficientScope, isCompiledJob, isGroupSet, isGuardDenial, isRawResponse, isRouteDefinition, isStreamResponse, jobAt, jobFnAt, jobRouter, jobRoutes, jobRunnerFrom, matchRoute, parseBodyText, parseFetchBody, parsePath, pluginExportsOf, pluginRouteTree, pluginRouterOf, pluginRoutesOf, problemDetails, rawResponse, renderJsonResult, requiresDenial, resolvePlugins, resolveSecurityRequirements, routerFromRoutes, runHandler, runRoute, selectToolRoutes, sortFlattenedRoutes, toolOptionsOf, toolRefusal, validateRequest, warnUnsupportedJobOptions, withPermissions };
|
|
2
|
+
import { $ as jobRoutes, A as RenderedResult, B as bearerChallenge, Bi as toolOptionsOf, Bn as JobHandler, C as JOBS_META, Ci as isRouteDefinition, D as REQUEST_CONTEXT_META, Da as withPermissions, E as MountedOf, Ea as requiresDenial, F as RouteMatcher, Fi as buildToolInputSchema, G as dispatchRoute, Gr as isRawResponse, Gt as PluginExportsOf, H as contractOf, Ht as PluginDeclaration, I as SCHEMES_META, Ii as describeTool, In as FlattenedJob, It as ApiPlugins, J as getHeaderValue, Ji as buildPath, K as entriesToObject, Ki as PathSegment, Kr as rawResponse, L as ServerOptions, Li as selectToolRoutes, M as RequestContextRun, Mi as ToolDefinition, N as RequestPipeline, Ni as ToolInputSchema, O as ROUTER_META, P as ResponseValidationError, Pi as buildToolDefinitions, Pn as CompiledJob, Q as jobRouter, Qn as isCompiledJob, Qr as sortFlattenedRoutes, R as adapterContextOf, Ri as toolInputJsonSchema, S as HandlerContextOf, Si as formatValidationError, T as MountArgsOf, Ta as insufficientScope, U as defineAdapter, Un as JobHandlers, Ur as isGroupSet, Ut as PluginDefinition, V as boundJobKeys, Vi as toolRefusal, Vt as PluginArgs, W as dispatchHandler, Wr as RawResponse, Wt as PluginExportValues, X as headersToObject, Xr as RouteMatch, Xt as PluginRoutesOf, Y as guardDenyFor, Yi as parsePath, Yr as MatchResult, Yt as PluginRoutes, Z as isGuardDenial, Zi as EncodeStreamOptions, Zn as flattenJobs, Zr as matchRoute, _ as GuardDeny, a as AdapterRequest, an as pluginRouteTree, at as runHandler, b as HANDLER_ARG_KEYS, bi as allowedMethodsForPath, br as ScheduledJob, c as ApiBrand, cr as JobRunner, ct as ApiRouter, d as DISPATCH_ROUTE_KEY, di as RawInputs, dr as jobFnAt, dt as createApiReference, ei as BrandedHandlerContext, en as ResolvedPlugin, er as jobAt, et as jobRunnerFrom, f as ErrorFormatter, fi as RequestContextValues, fr as JobDescriptor, ft as pluginExportsOf, g as GuardDenialBody, gi as RoutesWithHandlerContext, h as GuardDenial, hi as Router, hr as JobTransport, ht as resolvePlugins, i as AdapterDefinition, ii as GuardParams, in as definePlugin, ir as JobInputError, it as routerFromRoutes, j as RequestContextMap, k as RUN_ROUTE_KEY, l as ApiParts, lr as JobRunnerOptions, lt as ResponseError, m as GUARD_SCHEMA_META, mi as RouteHandler, mr as JobMessage, mt as pluginRoutesOf, n as API_META, na as StreamContext, ni as FlattenedRoute, nt as parseFetchBody, o as AdapterResult, ot as runRoute, p as GUARDS_META, pr as JobDispatchError, pt as pluginRouterOf, q as extractCredential, qn as Jobs, r as Adapter, rr as JobFnByKey, rt as renderJsonResult, s as AnyAdapter, sa as encodeStreamBody, si as GuardedParamNames, st as warnUnsupportedJobOptions, t as ADAPTER_CONTEXT, ti as ContextFromAuth, tr as JobErrorHandler, tt as parseBodyText, u as ApiWithRouter, ui as HandlersFromRoutes, ur as createJobRunner, ut as groupRoutes, v as GuardMap, vi as ValidationFailure, vr as JobWorker, vt as isStreamResponse, w as JobsMeta, wa as AccessCheckInput, wi as validateRequest, x as HandleArgs, xi as flattenRoutes, xr as defineJobTransport, y as GuardRun, yi as ValidationStage, yr as JobWorkerContext, z as assembleApi, zi as toolJsonSchema } from "./adapter-DSw79pNT.cjs";
|
|
3
|
+
export { ADAPTER_CONTEXT, API_META, AUTO_GUARD_BRAND, AUTO_RESPONSES_BRAND, AccessCheckInput, Adapter, AdapterDefinition, AdapterRequest, AdapterResult, AnyAdapter, ApiBrand, ApiParts, ApiPlugins, ApiRouter, ApiWithRouter, AutoResponsesBrand, BrandedHandlerContext, CompiledJob, ContextFromAuth, DISPATCH_ROUTE_KEY, EncodeStreamOptions, ErrorFormatter, FlattenedJob, FlattenedRoute, GUARDS_META, GUARD_SCHEMA_META, GuardDenial, GuardDenialBody, GuardDeny, GuardMap, GuardParams, GuardRun, GuardedParamNames, HANDLER_ARG_KEYS, HANDLER_CONTEXT_BRAND, HandleArgs, HandlerContextBrand, HandlerContextOf, HandlersFromRoutes, JOBS_META, JobDescriptor, JobDispatchError, JobErrorHandler, JobFnByKey, JobHandler, JobHandlers, JobInputError, JobMessage, JobRunner, JobRunnerOptions, JobTransport, JobWorker, JobWorkerContext, Jobs, JobsMeta, MatchResult, Method, MountArgsOf, MountedOf, PathSegment, PluginArgs, PluginDeclaration, PluginDefinition, PluginExportValues, PluginExportsOf, PluginRoutes, PluginRoutesOf, ProblemDetails, REQUEST_CONTEXT_META, ROUTER_META, ROUTES_GROUP, RUN_ROUTE_KEY, RawInputs, RawResponse, RenderedResult, RequestContextMap, RequestContextRun, RequestContextValues, RequestPipeline, ResolvedPlugin, ResponseError, ResponseHeaders, ResponseValidationError, RouteDefinition, RouteHandler, RouteMatch, RouteMatcher, RoutePath, Router, Routes, RoutesWithHandlerContext, SCHEMES_META, ScheduledJob, ServerOptions, StreamContext, ToolDefinition, ToolInputSchema, ValidationFailure, ValidationStage, adapterContextOf, allowedMethodsForPath, assembleApi, authenticationChallenge, bearerChallenge, boundJobKeys, buildPath, buildToolDefinitions, buildToolInputSchema, contractOf, createApiReference, createJobRunner, defineAdapter, defineJobTransport, definePlugin, describeTool, dispatchHandler, dispatchRoute, encodeStreamBody, entriesToObject, extractCredential, flattenJobs, flattenRoutes, formatValidationError, getHeaderValue, groupRoutes, guardDenyFor, headersToObject, insufficientScope, isCompiledJob, isGroupSet, isGuardDenial, isRawResponse, isRouteDefinition, isStreamResponse, jobAt, jobFnAt, jobRouter, jobRoutes, jobRunnerFrom, matchRoute, parseBodyText, parseFetchBody, parsePath, pluginExportsOf, pluginRouteTree, pluginRouterOf, pluginRoutesOf, problemDetails, rawResponse, renderJsonResult, requiresDenial, resolvePlugins, resolveSecurityRequirements, routerFromRoutes, runHandler, runRoute, selectToolRoutes, sortFlattenedRoutes, toolInputJsonSchema, toolJsonSchema, toolOptionsOf, toolRefusal, validateRequest, warnUnsupportedJobOptions, withPermissions };
|
package/dist/adapter.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { A as AutoResponsesBrand, B as ROUTES_GROUP, D as AUTO_RESPONSES_BRAND, I as HANDLER_CONTEXT_BRAND, K as RouteDefinition, L as HandlerContextBrand, T as AUTO_GUARD_BRAND, W as ResponseHeaders, Y as RoutePath, Z as Routes, at as ProblemDetails, c as authenticationChallenge, f as resolveSecurityRequirements, st as problemDetails, z as Method } from "./error-response-NoOGdh8H.mjs";
|
|
2
|
-
import { $ as jobRoutes, A as RenderedResult, B as bearerChallenge,
|
|
3
|
-
export { ADAPTER_CONTEXT, API_META, AUTO_GUARD_BRAND, AUTO_RESPONSES_BRAND, AccessCheckInput, Adapter, AdapterDefinition, AdapterRequest, AdapterResult, AnyAdapter, ApiBrand, ApiParts, ApiPlugins, ApiRouter, ApiWithRouter, AutoResponsesBrand, BrandedHandlerContext, CompiledJob, ContextFromAuth, DISPATCH_ROUTE_KEY, EncodeStreamOptions, ErrorFormatter, FlattenedJob, FlattenedRoute, GUARDS_META, GUARD_SCHEMA_META, GuardDenial, GuardDenialBody, GuardDeny, GuardMap, GuardParams, GuardRun, GuardedParamNames, HANDLER_ARG_KEYS, HANDLER_CONTEXT_BRAND, HandleArgs, HandlerContextBrand, HandlerContextOf, HandlersFromRoutes, JOBS_META, JobDescriptor, JobDispatchError, JobErrorHandler, JobFnByKey, JobHandler, JobHandlers, JobInputError, JobMessage, JobRunner, JobRunnerOptions, JobTransport, JobWorker, JobWorkerContext, Jobs, JobsMeta, MatchResult, Method, MountArgsOf, MountedOf, PathSegment, PluginArgs, PluginDeclaration, PluginDefinition, PluginExportValues, PluginExportsOf, PluginRoutes, PluginRoutesOf, ProblemDetails, REQUEST_CONTEXT_META, ROUTER_META, ROUTES_GROUP, RUN_ROUTE_KEY, RawInputs, RawResponse, RenderedResult, RequestContextMap, RequestContextRun, RequestContextValues, RequestPipeline, ResolvedPlugin, ResponseError, ResponseHeaders, ResponseValidationError, RouteDefinition, RouteHandler, RouteMatch, RouteMatcher, RoutePath, Router, Routes, RoutesWithHandlerContext, SCHEMES_META, ScheduledJob, ServerOptions, StreamContext, ToolDefinition, ToolInputSchema, ValidationFailure, ValidationStage, adapterContextOf, allowedMethodsForPath, assembleApi, authenticationChallenge, bearerChallenge, boundJobKeys, buildPath, buildToolDefinitions, buildToolInputSchema, contractOf, createApiReference, createJobRunner, defineAdapter, defineJobTransport, definePlugin, describeTool, dispatchHandler, dispatchRoute, encodeStreamBody, entriesToObject, extractCredential, flattenJobs, flattenRoutes, formatValidationError, getHeaderValue, groupRoutes, guardDenyFor, headersToObject, insufficientScope, isCompiledJob, isGroupSet, isGuardDenial, isRawResponse, isRouteDefinition, isStreamResponse, jobAt, jobFnAt, jobRouter, jobRoutes, jobRunnerFrom, matchRoute, parseBodyText, parseFetchBody, parsePath, pluginExportsOf, pluginRouteTree, pluginRouterOf, pluginRoutesOf, problemDetails, rawResponse, renderJsonResult, requiresDenial, resolvePlugins, resolveSecurityRequirements, routerFromRoutes, runHandler, runRoute, selectToolRoutes, sortFlattenedRoutes, toolOptionsOf, toolRefusal, validateRequest, warnUnsupportedJobOptions, withPermissions };
|
|
2
|
+
import { $ as jobRoutes, A as RenderedResult, B as bearerChallenge, Bi as toolOptionsOf, Bn as JobHandler, C as JOBS_META, Ci as isRouteDefinition, D as REQUEST_CONTEXT_META, Da as withPermissions, E as MountedOf, Ea as requiresDenial, F as RouteMatcher, Fi as buildToolInputSchema, G as dispatchRoute, Gr as isRawResponse, Gt as PluginExportsOf, H as contractOf, Ht as PluginDeclaration, I as SCHEMES_META, Ii as describeTool, In as FlattenedJob, It as ApiPlugins, J as getHeaderValue, Ji as buildPath, K as entriesToObject, Ki as PathSegment, Kr as rawResponse, L as ServerOptions, Li as selectToolRoutes, M as RequestContextRun, Mi as ToolDefinition, N as RequestPipeline, Ni as ToolInputSchema, O as ROUTER_META, P as ResponseValidationError, Pi as buildToolDefinitions, Pn as CompiledJob, Q as jobRouter, Qn as isCompiledJob, Qr as sortFlattenedRoutes, R as adapterContextOf, Ri as toolInputJsonSchema, S as HandlerContextOf, Si as formatValidationError, T as MountArgsOf, Ta as insufficientScope, U as defineAdapter, Un as JobHandlers, Ur as isGroupSet, Ut as PluginDefinition, V as boundJobKeys, Vi as toolRefusal, Vt as PluginArgs, W as dispatchHandler, Wr as RawResponse, Wt as PluginExportValues, X as headersToObject, Xr as RouteMatch, Xt as PluginRoutesOf, Y as guardDenyFor, Yi as parsePath, Yr as MatchResult, Yt as PluginRoutes, Z as isGuardDenial, Zi as EncodeStreamOptions, Zn as flattenJobs, Zr as matchRoute, _ as GuardDeny, a as AdapterRequest, an as pluginRouteTree, at as runHandler, b as HANDLER_ARG_KEYS, bi as allowedMethodsForPath, br as ScheduledJob, c as ApiBrand, cr as JobRunner, ct as ApiRouter, d as DISPATCH_ROUTE_KEY, di as RawInputs, dr as jobFnAt, dt as createApiReference, ei as BrandedHandlerContext, en as ResolvedPlugin, er as jobAt, et as jobRunnerFrom, f as ErrorFormatter, fi as RequestContextValues, fr as JobDescriptor, ft as pluginExportsOf, g as GuardDenialBody, gi as RoutesWithHandlerContext, h as GuardDenial, hi as Router, hr as JobTransport, ht as resolvePlugins, i as AdapterDefinition, ii as GuardParams, in as definePlugin, ir as JobInputError, it as routerFromRoutes, j as RequestContextMap, k as RUN_ROUTE_KEY, l as ApiParts, lr as JobRunnerOptions, lt as ResponseError, m as GUARD_SCHEMA_META, mi as RouteHandler, mr as JobMessage, mt as pluginRoutesOf, n as API_META, na as StreamContext, ni as FlattenedRoute, nt as parseFetchBody, o as AdapterResult, ot as runRoute, p as GUARDS_META, pr as JobDispatchError, pt as pluginRouterOf, q as extractCredential, qn as Jobs, r as Adapter, rr as JobFnByKey, rt as renderJsonResult, s as AnyAdapter, sa as encodeStreamBody, si as GuardedParamNames, st as warnUnsupportedJobOptions, t as ADAPTER_CONTEXT, ti as ContextFromAuth, tr as JobErrorHandler, tt as parseBodyText, u as ApiWithRouter, ui as HandlersFromRoutes, ur as createJobRunner, ut as groupRoutes, v as GuardMap, vi as ValidationFailure, vr as JobWorker, vt as isStreamResponse, w as JobsMeta, wa as AccessCheckInput, wi as validateRequest, x as HandleArgs, xi as flattenRoutes, xr as defineJobTransport, y as GuardRun, yi as ValidationStage, yr as JobWorkerContext, z as assembleApi, zi as toolJsonSchema } from "./adapter-DxFLPtzt.mjs";
|
|
3
|
+
export { ADAPTER_CONTEXT, API_META, AUTO_GUARD_BRAND, AUTO_RESPONSES_BRAND, AccessCheckInput, Adapter, AdapterDefinition, AdapterRequest, AdapterResult, AnyAdapter, ApiBrand, ApiParts, ApiPlugins, ApiRouter, ApiWithRouter, AutoResponsesBrand, BrandedHandlerContext, CompiledJob, ContextFromAuth, DISPATCH_ROUTE_KEY, EncodeStreamOptions, ErrorFormatter, FlattenedJob, FlattenedRoute, GUARDS_META, GUARD_SCHEMA_META, GuardDenial, GuardDenialBody, GuardDeny, GuardMap, GuardParams, GuardRun, GuardedParamNames, HANDLER_ARG_KEYS, HANDLER_CONTEXT_BRAND, HandleArgs, HandlerContextBrand, HandlerContextOf, HandlersFromRoutes, JOBS_META, JobDescriptor, JobDispatchError, JobErrorHandler, JobFnByKey, JobHandler, JobHandlers, JobInputError, JobMessage, JobRunner, JobRunnerOptions, JobTransport, JobWorker, JobWorkerContext, Jobs, JobsMeta, MatchResult, Method, MountArgsOf, MountedOf, PathSegment, PluginArgs, PluginDeclaration, PluginDefinition, PluginExportValues, PluginExportsOf, PluginRoutes, PluginRoutesOf, ProblemDetails, REQUEST_CONTEXT_META, ROUTER_META, ROUTES_GROUP, RUN_ROUTE_KEY, RawInputs, RawResponse, RenderedResult, RequestContextMap, RequestContextRun, RequestContextValues, RequestPipeline, ResolvedPlugin, ResponseError, ResponseHeaders, ResponseValidationError, RouteDefinition, RouteHandler, RouteMatch, RouteMatcher, RoutePath, Router, Routes, RoutesWithHandlerContext, SCHEMES_META, ScheduledJob, ServerOptions, StreamContext, ToolDefinition, ToolInputSchema, ValidationFailure, ValidationStage, adapterContextOf, allowedMethodsForPath, assembleApi, authenticationChallenge, bearerChallenge, boundJobKeys, buildPath, buildToolDefinitions, buildToolInputSchema, contractOf, createApiReference, createJobRunner, defineAdapter, defineJobTransport, definePlugin, describeTool, dispatchHandler, dispatchRoute, encodeStreamBody, entriesToObject, extractCredential, flattenJobs, flattenRoutes, formatValidationError, getHeaderValue, groupRoutes, guardDenyFor, headersToObject, insufficientScope, isCompiledJob, isGroupSet, isGuardDenial, isRawResponse, isRouteDefinition, isStreamResponse, jobAt, jobFnAt, jobRouter, jobRoutes, jobRunnerFrom, matchRoute, parseBodyText, parseFetchBody, parsePath, pluginExportsOf, pluginRouteTree, pluginRouterOf, pluginRoutesOf, problemDetails, rawResponse, renderJsonResult, requiresDenial, resolvePlugins, resolveSecurityRequirements, routerFromRoutes, runHandler, runRoute, selectToolRoutes, sortFlattenedRoutes, toolInputJsonSchema, toolJsonSchema, toolOptionsOf, toolRefusal, validateRequest, warnUnsupportedJobOptions, withPermissions };
|
package/dist/adapter.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as definePlugin, d as AUTO_RESPONSES_BRAND, g as ROUTES_GROUP, l as AUTO_GUARD_BRAND, m as HANDLER_CONTEXT_BRAND, o as pluginRouteTree } from "./plugin-xxCxibmu.mjs";
|
|
2
2
|
import { P as encodeStreamBody, W as isStreamResponse, _ as jobAt, a as pluginRoutesOf, ct as parsePath, dt as formatValidationError, ft as isRouteDefinition, h as isCompiledJob, i as pluginRouterOf, lt as allowedMethodsForPath, m as flattenJobs, o as resolvePlugins, pt as validateRequest, r as pluginExportsOf, st as buildPath, t as createApiReference, ut as flattenRoutes } from "./plugin-server-B-JDZ7GV.mjs";
|
|
3
3
|
import { l as authenticationChallenge, p as resolveSecurityRequirements } from "./schemas-DBX8DwFb.mjs";
|
|
4
|
-
import { A as parseFetchBody, B as matchRoute, C as guardDenyFor, Ct as
|
|
5
|
-
export { API_META, AUTO_GUARD_BRAND, AUTO_RESPONSES_BRAND, DISPATCH_ROUTE_KEY, GUARDS_META, GUARD_SCHEMA_META, HANDLER_ARG_KEYS, HANDLER_CONTEXT_BRAND, JOBS_META, JobDispatchError, JobInputError, REQUEST_CONTEXT_META, ROUTER_META, ROUTES_GROUP, RUN_ROUTE_KEY, ResponseError, ResponseValidationError, SCHEMES_META, adapterContextOf, allowedMethodsForPath, assembleApi, authenticationChallenge, bearerChallenge, boundJobKeys, buildPath, buildToolDefinitions, buildToolInputSchema, contractOf, createApiReference, createJobRunner, defineAdapter, defineJobTransport, definePlugin, describeTool, dispatchHandler, dispatchRoute, encodeStreamBody, entriesToObject, extractCredential, flattenJobs, flattenRoutes, formatValidationError, getHeaderValue, groupRoutes, guardDenyFor, headersToObject, insufficientScope, isCompiledJob, isGroupSet, isGuardDenial, isRawResponse, isRouteDefinition, isStreamResponse, jobAt, jobFnAt, jobRouter, jobRoutes, jobRunnerFrom, matchRoute, parseBodyText, parseFetchBody, parsePath, pluginExportsOf, pluginRouteTree, pluginRouterOf, pluginRoutesOf, problemDetails, rawResponse, renderJsonResult, requiresDenial, resolvePlugins, resolveSecurityRequirements, routerFromRoutes, runHandler, runRoute, selectToolRoutes, sortFlattenedRoutes, toolOptionsOf, toolRefusal, validateRequest, warnUnsupportedJobOptions, withPermissions };
|
|
4
|
+
import { A as parseFetchBody, B as matchRoute, C as guardDenyFor, Ct as toolJsonSchema, D as jobRoutes, E as jobRouter, F as warnUnsupportedJobOptions, G as JobDispatchError, H as insufficientScope, I as isRawResponse, J as createJobRunner, K as defineJobTransport, L as rawResponse, M as routerFromRoutes, N as runHandler, O as jobRunnerFrom, P as runRoute, S as getHeaderValue, St as toolInputJsonSchema, T as isGuardDenial, Tt as toolRefusal, U as requiresDenial, V as sortFlattenedRoutes, W as withPermissions, X as ResponseError, Y as jobFnAt, _ as defineAdapter, a as HANDLER_ARG_KEYS, b as entriesToObject, bt as describeTool, c as ROUTER_META, d as SCHEMES_META, f as adapterContextOf, g as contractOf, h as boundJobKeys, ht as groupRoutes, i as GUARD_SCHEMA_META, j as renderJsonResult, k as parseBodyText, l as RUN_ROUTE_KEY, m as bearerChallenge, n as DISPATCH_ROUTE_KEY, o as JOBS_META, p as assembleApi, pt as isGroupSet, q as JobInputError, r as GUARDS_META, rt as problemDetails, s as REQUEST_CONTEXT_META, t as API_META, u as ResponseValidationError, v as dispatchHandler, vt as buildToolDefinitions, w as headersToObject, wt as toolOptionsOf, x as extractCredential, xt as selectToolRoutes, y as dispatchRoute, yt as buildToolInputSchema } from "./adapter-BUH7okoJ.mjs";
|
|
5
|
+
export { API_META, AUTO_GUARD_BRAND, AUTO_RESPONSES_BRAND, DISPATCH_ROUTE_KEY, GUARDS_META, GUARD_SCHEMA_META, HANDLER_ARG_KEYS, HANDLER_CONTEXT_BRAND, JOBS_META, JobDispatchError, JobInputError, REQUEST_CONTEXT_META, ROUTER_META, ROUTES_GROUP, RUN_ROUTE_KEY, ResponseError, ResponseValidationError, SCHEMES_META, adapterContextOf, allowedMethodsForPath, assembleApi, authenticationChallenge, bearerChallenge, boundJobKeys, buildPath, buildToolDefinitions, buildToolInputSchema, contractOf, createApiReference, createJobRunner, defineAdapter, defineJobTransport, definePlugin, describeTool, dispatchHandler, dispatchRoute, encodeStreamBody, entriesToObject, extractCredential, flattenJobs, flattenRoutes, formatValidationError, getHeaderValue, groupRoutes, guardDenyFor, headersToObject, insufficientScope, isCompiledJob, isGroupSet, isGuardDenial, isRawResponse, isRouteDefinition, isStreamResponse, jobAt, jobFnAt, jobRouter, jobRoutes, jobRunnerFrom, matchRoute, parseBodyText, parseFetchBody, parsePath, pluginExportsOf, pluginRouteTree, pluginRouterOf, pluginRoutesOf, problemDetails, rawResponse, renderJsonResult, requiresDenial, resolvePlugins, resolveSecurityRequirements, routerFromRoutes, runHandler, runRoute, selectToolRoutes, sortFlattenedRoutes, toolInputJsonSchema, toolJsonSchema, toolOptionsOf, toolRefusal, validateRequest, warnUnsupportedJobOptions, withPermissions };
|
package/dist/generator.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { K as RouteDefinition, W as ResponseHeaders, Z as Routes, j as CachePolicy } from "./error-response-YbkRMKno.cjs";
|
|
2
|
-
import { At as sanitizeIdentifier, Cn as GeneratedFile, Ct as resolveResponseBody, Dt as resolveResponseHeaders, Et as resolveResponseEtag, In as FlattenedJob,
|
|
2
|
+
import { At as sanitizeIdentifier, Cn as GeneratedFile, Ct as resolveResponseBody, Dt as resolveResponseHeaders, Et as resolveResponseEtag, In as FlattenedJob, Mt as statusToCamelCase, Nt as toCamelCase, Ot as resolveResponseStream, Pn as CompiledJob, Pt as toPascalCase, Qn as isCompiledJob, St as mergeHeaderFields, Tn as ApiDefinition, Tt as resolveResponseContentType, Xi as EVENT_STREAM_MEDIA_TYPE, Yi as parsePath, Zn as flattenJobs, _t as isJsonMediaType, aa as StreamMode, bt as isZodSchema, ca as isNamedStream, da as streamContentType, er as jobAt, fa as streamMode, gt as isHintPrefix, jt as shortTypeName, kt as sanitizeFieldName, la as routeStreams, ma as streamStatuses, pa as streamSchemas, qn as Jobs, ua as soleStreamResponse, vt as isStreamResponse, wt as resolveResponseCache, xt as localTypeName, yt as isSuccessStatus } from "./adapter-DSw79pNT.cjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
|
|
5
5
|
//#region src/zod-internals.d.ts
|
package/dist/generator.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { K as RouteDefinition, W as ResponseHeaders, Z as Routes, j as CachePolicy } from "./error-response-NoOGdh8H.mjs";
|
|
2
|
-
import { At as sanitizeIdentifier, Cn as GeneratedFile, Ct as resolveResponseBody, Dt as resolveResponseHeaders, Et as resolveResponseEtag, In as FlattenedJob,
|
|
2
|
+
import { At as sanitizeIdentifier, Cn as GeneratedFile, Ct as resolveResponseBody, Dt as resolveResponseHeaders, Et as resolveResponseEtag, In as FlattenedJob, Mt as statusToCamelCase, Nt as toCamelCase, Ot as resolveResponseStream, Pn as CompiledJob, Pt as toPascalCase, Qn as isCompiledJob, St as mergeHeaderFields, Tn as ApiDefinition, Tt as resolveResponseContentType, Xi as EVENT_STREAM_MEDIA_TYPE, Yi as parsePath, Zn as flattenJobs, _t as isJsonMediaType, aa as StreamMode, bt as isZodSchema, ca as isNamedStream, da as streamContentType, er as jobAt, fa as streamMode, gt as isHintPrefix, jt as shortTypeName, kt as sanitizeFieldName, la as routeStreams, ma as streamStatuses, pa as streamSchemas, qn as Jobs, ua as soleStreamResponse, vt as isStreamResponse, wt as resolveResponseCache, xt as localTypeName, yt as isSuccessStatus } from "./adapter-DxFLPtzt.mjs";
|
|
3
3
|
import { z } from "zod";
|
|
4
4
|
|
|
5
5
|
//#region src/zod-internals.d.ts
|
package/dist/index.cjs
CHANGED
|
@@ -3,7 +3,7 @@ const require_plugin = require("./plugin-Dw-yCjTY.cjs");
|
|
|
3
3
|
const require_error_response = require("./error-response-DN5Dsf8b.cjs");
|
|
4
4
|
const require_plugin_server = require("./plugin-server-7pkhltOp.cjs");
|
|
5
5
|
const require_schemas = require("./schemas-Bre1FVHq.cjs");
|
|
6
|
-
const require_adapter = require("./adapter-
|
|
6
|
+
const require_adapter = require("./adapter-CcVDJOmm.cjs");
|
|
7
7
|
let zod = require("zod");
|
|
8
8
|
//#region src/group-routes.ts
|
|
9
9
|
/**
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { $ as SecurityRequirement, A as AutoResponsesBrand, B as ROUTES_GROUP, C as isPermissions, D as AUTO_RESPONSES_BRAND, E as AUTO_GUARD_WRITTEN_BRAND, F as HANDLER, G as RouteAuth, H as ResponseContentType, I as HANDLER_CONTEXT_BRAND, J as RouteHiddenToolCheck, K as RouteDefinition, L as HandlerContextBrand, M as DECLARATION, N as DeclarationKind, O as AuthoredRouteDefinition, P as GuardStatus, Q as SchemeNameOf, R as METHODS, S as createRoles, T as AUTO_GUARD_BRAND, U as ResponseDefinition, V as RequiredPermissions, X as RouteToolOptions, Y as RoutePath, Z as Routes, _ as PermissionSet, a as OAuthFlows, at as ProblemDetails, b as RoleNamesOf, ct as problemFromBody, d as isSecurityScheme, et as StreamDefinition, g as PermissionName, h as PermissionCatalog, i as OAuthFlow, it as GuardSchemaCheck, j as CachePolicy, k as AuthoredRoutes, l as authorizationServerIssuer, lt as STATUS_TITLES, m as GrantNamesOf, n as isProblemDetails, nt as GuardBody, o as OpenApiSecuritySchemeObject, ot as StripProblemEnvelope, p as CatalogOf, q as RouteHandlerFunction, r as ContextOf, rt as GuardOutput, s as SecurityScheme, st as problemDetails, tt as StreamResponseDefinition, u as declaredScopes, ut as getStatusText, v as Permissions, w as isRoles, x as Roles, y as RoleDefinition, z as Method } from "./error-response-YbkRMKno.cjs";
|
|
2
|
-
import { $i as
|
|
2
|
+
import { $i as StreamBodyOf, $n as isJobDefinition, $r as AuthContextOf, $t as PluginsBySlug, Aa as BasicConfig, Ai as ToolRunOptions, An as RoutesOf, Ar as parseCron, Ba as IdentityParamsOf, Bn as JobHandler, Br as GroupSet, Bt as PluginApi, Ca as toolEvents, Ci as isRouteDefinition, Cn as GeneratedFile, Cr as ParsedCron, Di as ToolAnswer, Dn as GuardSchemaOf, Dr as firesBetween, E as MountedOf, Ei as StreamTools, En as ApiPluginsOf, Er as dueSchedules, Fa as CredentialOf, Fn as CompiledJobs, Fr as RequestContextHeaderValues, Ft as AnyPlugin, Ga as RoleOf, Gi as PathParamsCheck, Gn as JobRunnerConfig, Gt as PluginExportsOf, Ha as NoCredential, Hi as ExtractPathParams, Hn as JobHandlerReturn, Hr as createGroups, Ht as PluginDeclaration, Ia as CustomConfig, In as FlattenedJob, Ir as RequestContextSchema, It as ApiPlugins, J as getHeaderValue, Ji as buildPath, Jn as JobsArg, Jr as RouteWithHandler, Ka as RolesOf, Kn as JobVoidReturn, Kt as PluginFactory, La as GrantsOf, Ln as HttpJobsConfig, Lr as GroupOptions, Ma as BearerConfig, Mi as ToolDefinition, Mn as AuthoredJobDefinition, Mr as scheduleTimezone, Na as BearerCredential, Nn as AuthoredJobs, Nr as RequestContextConfig, Oa as ApiKeyConfig, Oi as ToolEventYield, On as JobsOf, Or as nextRun, Pa as Credential, Pn as CompiledJob, Pr as RequestContextHeaderInputs, Qi as StreamBody, Qn as isCompiledJob, Qt as PluginSetupContext, Ra as GuardHoldings, Rn as InProcessJobsConfig, Rr as GroupPaths, Sa as expandStreamTools, Sn as DiffSettings, Sr as JobSchedule, T as MountArgsOf, Ti as ModelToolCall, Tn as ApiDefinition, Tr as cron, Ua as OAuth2Config, Ui as HasPathParams, Un as JobHandlers, Ut as PluginDefinition, Va as IdentityRole, Vn as JobHandlerArgs, Vr as ResolvedGroup, Vt as PluginArgs, Wa as OpenIdConnectConfig, Wi as PathParamName, Wn as JobResponses, Wt as PluginExportValues, Xi as EVENT_STREAM_MEDIA_TYPE, Xn as NoJobs, Xt as PluginRoutesOf, Yi as parsePath, Yn as JobsConfig, Yt as PluginRoutes, Zn as flattenJobs, Zt as PluginSetup, _ as GuardDeny, _a as ToolCall, _i as ThrowableReturn, _n as ConfiguredRequestContextSchemas, _r as JobTransportSupports, aa as StreamMode, ai as GuardReturn, ar as JobQueueArgs, ba as ToolKeys, bn as KizunaConfigShape, br as ScheduledJob, bt as isZodSchema, ca as isNamedStream, ci as HandlerArgs, cn as ConfiguredAdapterContext, cr as JobRunner, da as streamContentType, dn as ConfiguredGroups, dr as jobFnAt, ea as StreamChunk, ei as BrandedHandlerContext, er as jobAt, fa as streamMode, fn as ConfiguredGuardSchema, fr as JobDescriptor, ga as ToolAt, gi as RoutesWithHandlerContext, gn as ConfiguredRequestContext, gr as JobTransportDefinition, h as GuardDenial, ha as StreamWithTools, hn as ConfiguredPlugins, hr as JobTransport, ia as StreamMessageOf, in as definePlugin, ir as JobInputError, ja as BasicCredential, ji as ToolRunResult, jn as SchemesOf, jr as scheduleExpression, ka as ApiKeyCredential, ki as ToolRunCall, kn as RequestContextOf, kr as nextRuns, la as routeStreams, li as HandlerReturn, ln as ConfiguredAdapterValue, lr as JobRunnerOptions, lt as ResponseError, ma as streamStatuses, mn as ConfiguredJobs, mr as JobMessage, na as StreamContext, nr as JobFn, oa as StreamYield, oi as GuardSuccess, or as JobQueueOptions, pi as RouteGuardBrandOf, pn as ConfiguredIdentities, pr as JobDispatchError, qi as RoutePathParamsCheck, qn as Jobs, qr as RouteBuilder, qt as PluginList, ra as StreamMessage, ri as GuardAnswer, rr as JobFnByKey, s as AnyAdapter, sr as JobRunArgs, ta as StreamComment, ti as ContextFromAuth, tr as JobErrorHandler, u as ApiWithRouter, ua as soleStreamResponse, un as ConfiguredCodes, ur as createJobRunner, va as ToolError, vn as JobFnOf, vr as JobWorker, vt as isStreamResponse, wn as apiEntries, wr as assertValidSchedule, xa as ToolResult, xn as ApiEntry, xr as defineJobTransport, ya as ToolEvents, yn as JobsOfTree, yr as JobWorkerContext, za as Identity, zn as JobDefinition, zr as GroupPathsOf } from "./adapter-DSw79pNT.cjs";
|
|
3
3
|
import { a as buildProtectedResourceMetadata, c as ValidationErrorFor, d as isValidationError, i as assertCanonicalResourceUri, n as ProtectedResourceMetadata, o as BuiltinIssueCode, s as ValidationError, t as ProtectedResourceConfig, u as ValidationIssueCode } from "./protected-resource-metadata-B9hMFQ9N.cjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { $input, $output } from "zod/v4/core";
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { $ as SecurityRequirement, A as AutoResponsesBrand, B as ROUTES_GROUP, C as isPermissions, D as AUTO_RESPONSES_BRAND, E as AUTO_GUARD_WRITTEN_BRAND, F as HANDLER, G as RouteAuth, H as ResponseContentType, I as HANDLER_CONTEXT_BRAND, J as RouteHiddenToolCheck, K as RouteDefinition, L as HandlerContextBrand, M as DECLARATION, N as DeclarationKind, O as AuthoredRouteDefinition, P as GuardStatus, Q as SchemeNameOf, R as METHODS, S as createRoles, T as AUTO_GUARD_BRAND, U as ResponseDefinition, V as RequiredPermissions, X as RouteToolOptions, Y as RoutePath, Z as Routes, _ as PermissionSet, a as OAuthFlows, at as ProblemDetails, b as RoleNamesOf, ct as problemFromBody, d as isSecurityScheme, et as StreamDefinition, g as PermissionName, h as PermissionCatalog, i as OAuthFlow, it as GuardSchemaCheck, j as CachePolicy, k as AuthoredRoutes, l as authorizationServerIssuer, lt as STATUS_TITLES, m as GrantNamesOf, n as isProblemDetails, nt as GuardBody, o as OpenApiSecuritySchemeObject, ot as StripProblemEnvelope, p as CatalogOf, q as RouteHandlerFunction, r as ContextOf, rt as GuardOutput, s as SecurityScheme, st as problemDetails, tt as StreamResponseDefinition, u as declaredScopes, ut as getStatusText, v as Permissions, w as isRoles, x as Roles, y as RoleDefinition, z as Method } from "./error-response-NoOGdh8H.mjs";
|
|
2
|
-
import { $i as
|
|
2
|
+
import { $i as StreamBodyOf, $n as isJobDefinition, $r as AuthContextOf, $t as PluginsBySlug, Aa as BasicConfig, Ai as ToolRunOptions, An as RoutesOf, Ar as parseCron, Ba as IdentityParamsOf, Bn as JobHandler, Br as GroupSet, Bt as PluginApi, Ca as toolEvents, Ci as isRouteDefinition, Cn as GeneratedFile, Cr as ParsedCron, Di as ToolAnswer, Dn as GuardSchemaOf, Dr as firesBetween, E as MountedOf, Ei as StreamTools, En as ApiPluginsOf, Er as dueSchedules, Fa as CredentialOf, Fn as CompiledJobs, Fr as RequestContextHeaderValues, Ft as AnyPlugin, Ga as RoleOf, Gi as PathParamsCheck, Gn as JobRunnerConfig, Gt as PluginExportsOf, Ha as NoCredential, Hi as ExtractPathParams, Hn as JobHandlerReturn, Hr as createGroups, Ht as PluginDeclaration, Ia as CustomConfig, In as FlattenedJob, Ir as RequestContextSchema, It as ApiPlugins, J as getHeaderValue, Ji as buildPath, Jn as JobsArg, Jr as RouteWithHandler, Ka as RolesOf, Kn as JobVoidReturn, Kt as PluginFactory, La as GrantsOf, Ln as HttpJobsConfig, Lr as GroupOptions, Ma as BearerConfig, Mi as ToolDefinition, Mn as AuthoredJobDefinition, Mr as scheduleTimezone, Na as BearerCredential, Nn as AuthoredJobs, Nr as RequestContextConfig, Oa as ApiKeyConfig, Oi as ToolEventYield, On as JobsOf, Or as nextRun, Pa as Credential, Pn as CompiledJob, Pr as RequestContextHeaderInputs, Qi as StreamBody, Qn as isCompiledJob, Qt as PluginSetupContext, Ra as GuardHoldings, Rn as InProcessJobsConfig, Rr as GroupPaths, Sa as expandStreamTools, Sn as DiffSettings, Sr as JobSchedule, T as MountArgsOf, Ti as ModelToolCall, Tn as ApiDefinition, Tr as cron, Ua as OAuth2Config, Ui as HasPathParams, Un as JobHandlers, Ut as PluginDefinition, Va as IdentityRole, Vn as JobHandlerArgs, Vr as ResolvedGroup, Vt as PluginArgs, Wa as OpenIdConnectConfig, Wi as PathParamName, Wn as JobResponses, Wt as PluginExportValues, Xi as EVENT_STREAM_MEDIA_TYPE, Xn as NoJobs, Xt as PluginRoutesOf, Yi as parsePath, Yn as JobsConfig, Yt as PluginRoutes, Zn as flattenJobs, Zt as PluginSetup, _ as GuardDeny, _a as ToolCall, _i as ThrowableReturn, _n as ConfiguredRequestContextSchemas, _r as JobTransportSupports, aa as StreamMode, ai as GuardReturn, ar as JobQueueArgs, ba as ToolKeys, bn as KizunaConfigShape, br as ScheduledJob, bt as isZodSchema, ca as isNamedStream, ci as HandlerArgs, cn as ConfiguredAdapterContext, cr as JobRunner, da as streamContentType, dn as ConfiguredGroups, dr as jobFnAt, ea as StreamChunk, ei as BrandedHandlerContext, er as jobAt, fa as streamMode, fn as ConfiguredGuardSchema, fr as JobDescriptor, ga as ToolAt, gi as RoutesWithHandlerContext, gn as ConfiguredRequestContext, gr as JobTransportDefinition, h as GuardDenial, ha as StreamWithTools, hn as ConfiguredPlugins, hr as JobTransport, ia as StreamMessageOf, in as definePlugin, ir as JobInputError, ja as BasicCredential, ji as ToolRunResult, jn as SchemesOf, jr as scheduleExpression, ka as ApiKeyCredential, ki as ToolRunCall, kn as RequestContextOf, kr as nextRuns, la as routeStreams, li as HandlerReturn, ln as ConfiguredAdapterValue, lr as JobRunnerOptions, lt as ResponseError, ma as streamStatuses, mn as ConfiguredJobs, mr as JobMessage, na as StreamContext, nr as JobFn, oa as StreamYield, oi as GuardSuccess, or as JobQueueOptions, pi as RouteGuardBrandOf, pn as ConfiguredIdentities, pr as JobDispatchError, qi as RoutePathParamsCheck, qn as Jobs, qr as RouteBuilder, qt as PluginList, ra as StreamMessage, ri as GuardAnswer, rr as JobFnByKey, s as AnyAdapter, sr as JobRunArgs, ta as StreamComment, ti as ContextFromAuth, tr as JobErrorHandler, u as ApiWithRouter, ua as soleStreamResponse, un as ConfiguredCodes, ur as createJobRunner, va as ToolError, vn as JobFnOf, vr as JobWorker, vt as isStreamResponse, wn as apiEntries, wr as assertValidSchedule, xa as ToolResult, xn as ApiEntry, xr as defineJobTransport, ya as ToolEvents, yn as JobsOfTree, yr as JobWorkerContext, za as Identity, zn as JobDefinition, zr as GroupPathsOf } from "./adapter-DxFLPtzt.mjs";
|
|
3
3
|
import { a as buildProtectedResourceMetadata, c as ValidationErrorFor, d as isValidationError, i as assertCanonicalResourceUri, n as ProtectedResourceMetadata, o as BuiltinIssueCode, s as ValidationError, t as ProtectedResourceConfig, u as ValidationIssueCode } from "./protected-resource-metadata-CfBVsqIk.mjs";
|
|
4
4
|
import { z } from "zod";
|
|
5
5
|
import { $input, $output } from "zod/v4/core";
|
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@ import { a as definePlugin, c as createRoute, d as AUTO_RESPONSES_BRAND, f as DE
|
|
|
2
2
|
import { E as readObjectShape, m as readDef, n as isProblemDetails, r as createModel, t as ProblemDetailsSchema } from "./error-response-D7urgxeq.mjs";
|
|
3
3
|
import { C as firesBetween, D as scheduleExpression, E as parseCron, F as isNamedStream, I as routeStreams, K as isZodSchema, L as soleStreamResponse, M as EVENT_STREAM_MEDIA_TYPE, O as scheduleTimezone, R as streamContentType, S as dueSchedules, T as nextRuns, V as streamStatuses, W as isStreamResponse, Y as resolveResponseBody, _ as jobAt, b as assertValidSchedule, ct as parsePath, f as assertJobRunner, ft as isRouteDefinition, g as isJobDefinition, h as isCompiledJob, l as assertValidDeprecationDates, m as flattenJobs, o as resolvePlugins, p as buildJobs, r as pluginExportsOf, s as assertValidCache, st as buildPath, t as createApiReference, ut as flattenRoutes, v as jobClaims, w as nextRun, x as cron, z as streamMode } from "./plugin-server-B-JDZ7GV.mjs";
|
|
4
4
|
import { a as assertCanonicalResourceUri, c as isValidationError, d as declaredScopes, f as isSecurityScheme, l as authenticationChallenge, o as buildProtectedResourceMetadata, p as resolveSecurityRequirements, u as authorizationServerIssuer } from "./schemas-DBX8DwFb.mjs";
|
|
5
|
-
import { $ as dispatchDueJobs, F as warnUnsupportedJobOptions, G as JobDispatchError, J as createJobRunner, K as defineJobTransport, M as routerFromRoutes, Q as DispatchResultSchema, R as assertNoPathCollisions, S as getHeaderValue, X as ResponseError, Y as jobFnAt, Z as DispatchFailedSchema, _t as toolEvents, at as STATUS_TITLES, ct as createRoles, dt as permissionNames, et as dispatchSucceeded, ft as createGroups, gt as expandStreamTools, ht as groupRoutes, it as problemFromBody, lt as isPermissions, mt as assembleRoutes, nt as failedJobs, o as JOBS_META, ot as getStatusText, p as assembleApi, q as JobInputError, rt as problemDetails, st as createPermissions, tt as dueJobs, ut as isRoles, z as routeClaims } from "./adapter-
|
|
5
|
+
import { $ as dispatchDueJobs, F as warnUnsupportedJobOptions, G as JobDispatchError, J as createJobRunner, K as defineJobTransport, M as routerFromRoutes, Q as DispatchResultSchema, R as assertNoPathCollisions, S as getHeaderValue, X as ResponseError, Y as jobFnAt, Z as DispatchFailedSchema, _t as toolEvents, at as STATUS_TITLES, ct as createRoles, dt as permissionNames, et as dispatchSucceeded, ft as createGroups, gt as expandStreamTools, ht as groupRoutes, it as problemFromBody, lt as isPermissions, mt as assembleRoutes, nt as failedJobs, o as JOBS_META, ot as getStatusText, p as assembleApi, q as JobInputError, rt as problemDetails, st as createPermissions, tt as dueJobs, ut as isRoles, z as routeClaims } from "./adapter-BUH7okoJ.mjs";
|
|
6
6
|
import { z } from "zod";
|
|
7
7
|
//#region src/group-routes.ts
|
|
8
8
|
/**
|
package/dist/jobs-entry.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
2
|
const require_plugin_server = require("./plugin-server-7pkhltOp.cjs");
|
|
3
|
-
const require_adapter = require("./adapter-
|
|
3
|
+
const require_adapter = require("./adapter-CcVDJOmm.cjs");
|
|
4
4
|
//#region src/start-jobs.ts
|
|
5
5
|
/**
|
|
6
6
|
* The dedupe key an occurrence gets. Every instance ticking the same minute
|
package/dist/jobs-entry.d.cts
CHANGED
package/dist/jobs-entry.d.mts
CHANGED
package/dist/jobs-entry.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { D as scheduleExpression, O as scheduleTimezone, m as flattenJobs, w as nextRun } from "./plugin-server-B-JDZ7GV.mjs";
|
|
2
|
-
import { O as jobRunnerFrom, Y as jobFnAt, h as boundJobKeys, o as JOBS_META } from "./adapter-
|
|
2
|
+
import { O as jobRunnerFrom, Y as jobFnAt, h as boundJobKeys, o as JOBS_META } from "./adapter-BUH7okoJ.mjs";
|
|
3
3
|
//#region src/start-jobs.ts
|
|
4
4
|
/**
|
|
5
5
|
* The dedupe key an occurrence gets. Every instance ticking the same minute
|
package/dist/plugin.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Y as RoutePath } from "./error-response-YbkRMKno.cjs";
|
|
2
|
-
import { $t as PluginsBySlug, Bt as PluginApi, Ft as AnyPlugin, Gt as PluginExportsOf, Ht as PluginDeclaration, It as ApiPlugins, Jt as PluginRouteBuilder, Kt as PluginFactory, Lt as InstallOptions, Qt as PluginSetupContext, Rt as PLUGIN_ROUTES_META_KEY, Ut as PluginDefinition, Vt as PluginArgs, Wt as PluginExportValues, Xt as PluginRoutesOf, Yt as PluginRoutes, Zt as PluginSetup, an as pluginRouteTree, en as ResolvedPlugin, in as definePlugin, nn as RoutePathSchema, on as route, qt as PluginList, rn as SlugOption, sn as ApiContext, tn as RouteAuthSchema, zt as PLUGIN_SERVERS_META_KEY } from "./adapter-
|
|
2
|
+
import { $t as PluginsBySlug, Bt as PluginApi, Ft as AnyPlugin, Gt as PluginExportsOf, Ht as PluginDeclaration, It as ApiPlugins, Jt as PluginRouteBuilder, Kt as PluginFactory, Lt as InstallOptions, Qt as PluginSetupContext, Rt as PLUGIN_ROUTES_META_KEY, Ut as PluginDefinition, Vt as PluginArgs, Wt as PluginExportValues, Xt as PluginRoutesOf, Yt as PluginRoutes, Zt as PluginSetup, an as pluginRouteTree, en as ResolvedPlugin, in as definePlugin, nn as RoutePathSchema, on as route, qt as PluginList, rn as SlugOption, sn as ApiContext, tn as RouteAuthSchema, zt as PLUGIN_SERVERS_META_KEY } from "./adapter-DSw79pNT.cjs";
|
|
3
3
|
export { AnyPlugin, ApiContext, ApiPlugins, InstallOptions, PLUGIN_ROUTES_META_KEY, PLUGIN_SERVERS_META_KEY, PluginApi, PluginArgs, PluginDeclaration, PluginDefinition, PluginExportValues, PluginExportsOf, PluginFactory, PluginList, PluginRouteBuilder, PluginRoutes, PluginRoutesOf, PluginSetup, PluginSetupContext, PluginsBySlug, ResolvedPlugin, RouteAuthSchema, RoutePath, RoutePathSchema, SlugOption, definePlugin, pluginRouteTree, route };
|
package/dist/plugin.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { Y as RoutePath } from "./error-response-NoOGdh8H.mjs";
|
|
2
|
-
import { $t as PluginsBySlug, Bt as PluginApi, Ft as AnyPlugin, Gt as PluginExportsOf, Ht as PluginDeclaration, It as ApiPlugins, Jt as PluginRouteBuilder, Kt as PluginFactory, Lt as InstallOptions, Qt as PluginSetupContext, Rt as PLUGIN_ROUTES_META_KEY, Ut as PluginDefinition, Vt as PluginArgs, Wt as PluginExportValues, Xt as PluginRoutesOf, Yt as PluginRoutes, Zt as PluginSetup, an as pluginRouteTree, en as ResolvedPlugin, in as definePlugin, nn as RoutePathSchema, on as route, qt as PluginList, rn as SlugOption, sn as ApiContext, tn as RouteAuthSchema, zt as PLUGIN_SERVERS_META_KEY } from "./adapter-
|
|
2
|
+
import { $t as PluginsBySlug, Bt as PluginApi, Ft as AnyPlugin, Gt as PluginExportsOf, Ht as PluginDeclaration, It as ApiPlugins, Jt as PluginRouteBuilder, Kt as PluginFactory, Lt as InstallOptions, Qt as PluginSetupContext, Rt as PLUGIN_ROUTES_META_KEY, Ut as PluginDefinition, Vt as PluginArgs, Wt as PluginExportValues, Xt as PluginRoutesOf, Yt as PluginRoutes, Zt as PluginSetup, an as pluginRouteTree, en as ResolvedPlugin, in as definePlugin, nn as RoutePathSchema, on as route, qt as PluginList, rn as SlugOption, sn as ApiContext, tn as RouteAuthSchema, zt as PLUGIN_SERVERS_META_KEY } from "./adapter-DxFLPtzt.mjs";
|
|
3
3
|
export { AnyPlugin, ApiContext, ApiPlugins, InstallOptions, PLUGIN_ROUTES_META_KEY, PLUGIN_SERVERS_META_KEY, PluginApi, PluginArgs, PluginDeclaration, PluginDefinition, PluginExportValues, PluginExportsOf, PluginFactory, PluginList, PluginRouteBuilder, PluginRoutes, PluginRoutesOf, PluginSetup, PluginSetupContext, PluginsBySlug, ResolvedPlugin, RouteAuthSchema, RoutePath, RoutePathSchema, SlugOption, definePlugin, pluginRouteTree, route };
|
package/package.json
CHANGED
package/src/adapter.ts
CHANGED
package/src/handler-pipeline.ts
CHANGED
|
@@ -46,11 +46,25 @@ type HandlerBody<S, Status> = S extends z.ZodType
|
|
|
46
46
|
? ApplyErrorEnvelope<z.input<S['body']>, Status>
|
|
47
47
|
: never;
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
49
|
+
/**
|
|
50
|
+
* A response that carries no body, like a `204: z.void()`, may leave `body` out. A body
|
|
51
|
+
* that resolves to `never` stays required, so a status that cannot be returned still
|
|
52
|
+
* fails to compile.
|
|
53
|
+
*/
|
|
54
|
+
type ResponseReturn<R extends Pick<RouteDefinition, 'responses'>, Status extends keyof R['responses']> =
|
|
55
|
+
IsBodiless<HandlerBody<R['responses'][Status], Status>> extends true
|
|
56
|
+
? {
|
|
57
|
+
status: Status extends number ? Status : never;
|
|
58
|
+
body?: HandlerBody<R['responses'][Status], Status>;
|
|
59
|
+
headers?: ResponseHeaders;
|
|
60
|
+
}
|
|
61
|
+
: {
|
|
62
|
+
status: Status extends number ? Status : never;
|
|
63
|
+
body: HandlerBody<R['responses'][Status], Status>;
|
|
64
|
+
headers?: ResponseHeaders;
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
type IsBodiless<Body> = [Body] extends [never] ? false : [Body] extends [undefined | void] ? true : false;
|
|
54
68
|
|
|
55
69
|
/**
|
|
56
70
|
* Constrained to `responses` alone so a job, which has no method or path, reuses it.
|
package/src/tool-definitions.ts
CHANGED
|
@@ -134,17 +134,38 @@ export interface ToolDefinition {
|
|
|
134
134
|
inputSchema: Record<string, unknown>;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
137
|
+
/**
|
|
138
|
+
* A schema as a model reads it: a date as the ISO string the wire carries, and
|
|
139
|
+
* nothing that tells a model nothing, like `$schema`, kizuna's `brand`, or the
|
|
140
|
+
* safe-integer bounds `z.int()` adds.
|
|
141
|
+
*/
|
|
142
|
+
export const toolJsonSchema = (schema: z.ZodType, io: 'input' | 'output'): Record<string, unknown> => {
|
|
143
|
+
const { $schema: _, ...jsonSchema } = z.toJSONSchema(schema, {
|
|
144
|
+
io,
|
|
141
145
|
unrepresentable: 'any',
|
|
142
146
|
override: (context) => {
|
|
143
147
|
encodeForWire(context);
|
|
144
148
|
delete context.jsonSchema.brand;
|
|
149
|
+
if (context.jsonSchema.minimum === Number.MIN_SAFE_INTEGER) delete context.jsonSchema.minimum;
|
|
150
|
+
if (context.jsonSchema.maximum === Number.MAX_SAFE_INTEGER) delete context.jsonSchema.maximum;
|
|
145
151
|
},
|
|
146
152
|
}) as Record<string, unknown>;
|
|
147
|
-
return
|
|
153
|
+
return jsonSchema;
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
/**
|
|
157
|
+
* The `{ params, query, body }` a model sends, as JSON Schema. A route that
|
|
158
|
+
* takes nothing gets MCP's recommended schema for no input.
|
|
159
|
+
*/
|
|
160
|
+
export const toolInputJsonSchema = (route: RouteDefinition): Record<string, unknown> => {
|
|
161
|
+
const { shape } = buildToolInputSchema(route);
|
|
162
|
+
if (shape === undefined) {
|
|
163
|
+
return {
|
|
164
|
+
type: 'object',
|
|
165
|
+
additionalProperties: false,
|
|
166
|
+
};
|
|
167
|
+
}
|
|
168
|
+
return toolJsonSchema(z.object(shape), 'input');
|
|
148
169
|
};
|
|
149
170
|
|
|
150
171
|
/**
|
|
@@ -163,6 +184,6 @@ export const buildToolDefinitions = (routes: Routes): ToolDefinition[] => {
|
|
|
163
184
|
name: names.get(routeKey)!,
|
|
164
185
|
key: routeKey,
|
|
165
186
|
description: describeTool(route),
|
|
166
|
-
inputSchema:
|
|
187
|
+
inputSchema: toolInputJsonSchema(route),
|
|
167
188
|
}));
|
|
168
189
|
};
|