apps 0.0.1-beta.82 → 0.0.1-beta.84
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/framework-reference.json +1 -1
- package/js/{chunk-5WGONRKQ.js → chunk-AIXYBMMI.js} +1 -1
- package/js/{chunk-WCGAO3X5.js → chunk-BX2S3T2R.js} +1 -1
- package/js/{chunk-OY47QPQY.js → chunk-HNCCRVIT.js} +39 -1
- package/js/{chunk-YQUG4CES.js → chunk-IGOYMUWZ.js} +1 -1
- package/js/{chunk-HJG4RBYM.js → chunk-JKH7ALFN.js} +1 -1
- package/js/{chunk-Z2SWTZCF.js → chunk-OHBKJ54H.js} +3 -3
- package/js/{chunk-4NFSABEA.js → chunk-T2B6GUVY.js} +2 -2
- package/js/effect.js +4 -4
- package/js/graphql.js +5 -5
- package/js/host.js +4 -4
- package/js/index.js +4 -2
- package/js/mcp/effect.js +6 -6
- package/js/mcp/stdio.js +6 -6
- package/js/mcp.js +7 -7
- package/js/openapi.js +93 -90
- package/package.json +1 -1
- package/runtime.json +1 -1
- package/types/apps/src/implementation/openapi-compile.d.ts +3 -2
- package/types/apps/src/implementation/openapi-source.d.ts +5 -1
- package/types/apps/src/implementation/router.d.ts +8 -0
- package/types/apps/src/index.d.ts +1 -1
- package/types/apps/src/openapi.d.ts +5 -0
|
@@ -17,7 +17,8 @@ export declare function errorResponses(document: OpenApiDocument, operation: Jso
|
|
|
17
17
|
*/
|
|
18
18
|
export declare const compileOpenApiDocument: (entry: OpenApiImport, inputDocument: JsonObject, options?: {
|
|
19
19
|
readonly baseUrl?: string;
|
|
20
|
-
|
|
20
|
+
/** The origins operations may address; every other operation is left out. */
|
|
21
|
+
readonly allowedOrigin?: string | readonly string[];
|
|
21
22
|
/** Inserted between every operation's server and path; see `prefixParameters`. */
|
|
22
23
|
readonly pathPrefix?: string;
|
|
23
24
|
readonly securitySchemes?: Readonly<Record<string, JsonObject>>;
|
|
@@ -133,7 +134,7 @@ export declare const compileOpenApiDocument: (entry: OpenApiImport, inputDocumen
|
|
|
133
134
|
readonly [x: string]: Schema.Json;
|
|
134
135
|
};
|
|
135
136
|
};
|
|
136
|
-
|
|
137
|
+
pinnedOrigins: string[];
|
|
137
138
|
fallback: readonly {
|
|
138
139
|
readonly [x: string]: readonly string[];
|
|
139
140
|
}[] | undefined;
|
|
@@ -14,7 +14,11 @@ export interface OpenapiSourceOptions extends Omit<OpenapiToolsOptions, "operati
|
|
|
14
14
|
} | {
|
|
15
15
|
readonly document: JsonObject;
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
/**
|
|
18
|
+
* The origin that may receive credentials, or several origins of one service, such as its API
|
|
19
|
+
* and upload hosts. Operations on any other origin are left out.
|
|
20
|
+
*/
|
|
21
|
+
readonly allowedOrigin: string | readonly string[];
|
|
18
22
|
readonly securitySchemes: Readonly<Record<string, JsonObject>>;
|
|
19
23
|
readonly baseUrl?: string;
|
|
20
24
|
/**
|
|
@@ -68,3 +68,11 @@ export declare const declaredOperations: (root: AppRouter | undefined, path?: st
|
|
|
68
68
|
* its own tools' hints.
|
|
69
69
|
*/
|
|
70
70
|
export declare const withApprovals: <Query, Mutation>(source: RouterDeclaration<Query, Mutation>, policy: (operation: OperationDeclaration<"query" | "mutation", never>, name: string) => Approval | undefined) => RouterDeclaration<Query, Mutation>;
|
|
71
|
+
/**
|
|
72
|
+
* Expose a protocol router's tools under other names, such as the names an earlier client used.
|
|
73
|
+
* `rename` receives each tool's name relative to this router and returns the name to expose, or
|
|
74
|
+
* undefined to leave the tool out. When two tools would share a name, the first listed keeps it.
|
|
75
|
+
* Calls and descriptions find a tool by its exposed name. Works on routers that discover their
|
|
76
|
+
* tools, such as `mcpRouter`, `graphqlRouter` and `liveOpenapiRouter`.
|
|
77
|
+
*/
|
|
78
|
+
export declare const renameTools: <Query, Mutation>(source: RouterDeclaration<Query, Mutation>, rename: (name: string) => string | undefined) => RouterDeclaration<Query, Mutation>;
|
|
@@ -25,7 +25,7 @@ export { base64, basic, bearer, header, t, type FieldRef, type FieldRefs, type P
|
|
|
25
25
|
export type { Placement };
|
|
26
26
|
export type { AccountRequest } from "./contracts/provider.js";
|
|
27
27
|
export { accountRouter } from "./implementation/account-router.js";
|
|
28
|
-
export { router, dynamicRouter, withApprovals, type OperationChild, type OperationDeclaration, type RouterDeclaration, type RouterChild, type RouterOptions, } from "./implementation/router.js";
|
|
28
|
+
export { router, dynamicRouter, withApprovals, renameTools, type OperationChild, type OperationDeclaration, type RouterDeclaration, type RouterChild, type RouterOptions, } from "./implementation/router.js";
|
|
29
29
|
export type { RouterIcon } from "./contracts/router.js";
|
|
30
30
|
export { dynamicSkills } from "./implementation/dynamic-skills.js";
|
|
31
31
|
export type { HostedTool as OperationDescription } from "./contracts/host.js";
|
|
@@ -9,4 +9,9 @@ export { OpenapiError, isOpenapiTextMedia, openapiBinaryResultSchema, OpenapiErr
|
|
|
9
9
|
export declare const openapiRouter: (options: OpenapiToolsOptions, kinds?: OperationKinds) => Promise<import("./index.js").RouterDeclaration<unknown, unknown>>;
|
|
10
10
|
export type { OperationKinds } from "./implementation/protocol-operations.js";
|
|
11
11
|
export * from "./contracts/openapi-compile.js";
|
|
12
|
+
/**
|
|
13
|
+
* The names `liveOpenapiRouter` gives a document's operations, from each operation's
|
|
14
|
+
* operationId, first tag, method and path alone. It reads no document and compiles nothing.
|
|
15
|
+
*/
|
|
16
|
+
export { planOperationNames, type OperationNameInput } from "./implementation/openapi-names.js";
|
|
12
17
|
export { liveOpenapiRouter, openapiToolNames, type OpenapiSourceOptions, type OpenapiToolNamesOptions, } from "./implementation/openapi-source.js";
|