@exposify/express 0.3.7 → 0.3.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { RouteInfo, AgentReadyOptions } from '@exposify/core';
2
- export { describe, exposed, hidden } from '@exposify/core';
2
+ export { HostedAuthResolverConfig, completeMcpLogin, createHostedAuthResolver, describe, exposed, hidden, hostedBroker } from '@exposify/core';
3
3
 
4
4
  interface RoutesFromExpressOptions {
5
5
  /**
@@ -15,7 +15,22 @@ interface RoutesFromExpressOptions {
15
15
  }
16
16
  declare function routesFromExpress(app: unknown, opts?: RoutesFromExpressOptions): RouteInfo[];
17
17
 
18
+ /** Symbol under which `aiReady()`'s middleware carries the options it was given. */
19
+ declare const AIREADY_OPTIONS_TAG: unique symbol;
20
+
18
21
  interface ExpressAiReadyOptions extends AgentReadyOptions {
22
+ /**
23
+ * The app's own login, for Connect with the hosted broker: AI assistants
24
+ * sign in on a form served at /mcp/login, which makes this login request
25
+ * through your app. Found by itself (a POST route that reads a password
26
+ * from the body and sets a session or signs a token); name another route
27
+ * (`{ path, fields }`), or `false` to not offer it.
28
+ */
29
+ login?: false | {
30
+ path: string;
31
+ fields: string[];
32
+ body?: "json" | "form";
33
+ };
19
34
  /** Where docs globs and the .exposify cache resolve. Default: process.cwd() */
20
35
  cwd?: string;
21
36
  /**
@@ -29,7 +44,20 @@ interface ExpressAiReadyOptions extends AgentReadyOptions {
29
44
  * router/app object registered at that prefix.
30
45
  */
31
46
  mounts?: Record<string, unknown>;
47
+ /**
48
+ * Tool descriptions file written by `exposify-express setup`/`describe`.
49
+ * Default: exposify.descriptions.json in `cwd`, if present. `false` ignores it.
50
+ * describe() text in code still wins over it.
51
+ */
52
+ descriptions?: string | false;
53
+ /**
54
+ * The app's OpenAPI document: an object (e.g. `SwaggerModule.createDocument(app, …)`
55
+ * in NestJS) or a path to a JSON file. Matching operations give tools real
56
+ * input schemas, and their summary/description becomes the tool description
57
+ * (below describe() and exposify.descriptions.json).
58
+ */
59
+ openapi?: string | object;
32
60
  }
33
61
  declare function aiReady(options?: ExpressAiReadyOptions): (req: any, res: any, next: any) => void;
34
62
 
35
- export { type ExpressAiReadyOptions, aiReady, routesFromExpress };
63
+ export { AIREADY_OPTIONS_TAG, type ExpressAiReadyOptions, aiReady, routesFromExpress };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { RouteInfo, AgentReadyOptions } from '@exposify/core';
2
- export { describe, exposed, hidden } from '@exposify/core';
2
+ export { HostedAuthResolverConfig, completeMcpLogin, createHostedAuthResolver, describe, exposed, hidden, hostedBroker } from '@exposify/core';
3
3
 
4
4
  interface RoutesFromExpressOptions {
5
5
  /**
@@ -15,7 +15,22 @@ interface RoutesFromExpressOptions {
15
15
  }
16
16
  declare function routesFromExpress(app: unknown, opts?: RoutesFromExpressOptions): RouteInfo[];
17
17
 
18
+ /** Symbol under which `aiReady()`'s middleware carries the options it was given. */
19
+ declare const AIREADY_OPTIONS_TAG: unique symbol;
20
+
18
21
  interface ExpressAiReadyOptions extends AgentReadyOptions {
22
+ /**
23
+ * The app's own login, for Connect with the hosted broker: AI assistants
24
+ * sign in on a form served at /mcp/login, which makes this login request
25
+ * through your app. Found by itself (a POST route that reads a password
26
+ * from the body and sets a session or signs a token); name another route
27
+ * (`{ path, fields }`), or `false` to not offer it.
28
+ */
29
+ login?: false | {
30
+ path: string;
31
+ fields: string[];
32
+ body?: "json" | "form";
33
+ };
19
34
  /** Where docs globs and the .exposify cache resolve. Default: process.cwd() */
20
35
  cwd?: string;
21
36
  /**
@@ -29,7 +44,20 @@ interface ExpressAiReadyOptions extends AgentReadyOptions {
29
44
  * router/app object registered at that prefix.
30
45
  */
31
46
  mounts?: Record<string, unknown>;
47
+ /**
48
+ * Tool descriptions file written by `exposify-express setup`/`describe`.
49
+ * Default: exposify.descriptions.json in `cwd`, if present. `false` ignores it.
50
+ * describe() text in code still wins over it.
51
+ */
52
+ descriptions?: string | false;
53
+ /**
54
+ * The app's OpenAPI document: an object (e.g. `SwaggerModule.createDocument(app, …)`
55
+ * in NestJS) or a path to a JSON file. Matching operations give tools real
56
+ * input schemas, and their summary/description becomes the tool description
57
+ * (below describe() and exposify.descriptions.json).
58
+ */
59
+ openapi?: string | object;
32
60
  }
33
61
  declare function aiReady(options?: ExpressAiReadyOptions): (req: any, res: any, next: any) => void;
34
62
 
35
- export { type ExpressAiReadyOptions, aiReady, routesFromExpress };
63
+ export { AIREADY_OPTIONS_TAG, type ExpressAiReadyOptions, aiReady, routesFromExpress };