@zuplo/runtime 6.60.23 → 6.60.24

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.
@@ -1833,6 +1833,55 @@ export declare interface CognitoJwtInboundPolicyOptions {
1833
1833
  oAuthResourceMetadataEnabled?: boolean;
1834
1834
  }
1835
1835
 
1836
+ /**
1837
+ * Comet Opik Tracing Inbound Policy
1838
+ * @title Comet Opik Tracing
1839
+ * @hidden
1840
+ *
1841
+ * This policy automatically handles tracing for both streaming and non-streaming
1842
+ * responses from AI Gateway. It creates traces when requests start and spans
1843
+ * when responses complete.
1844
+ *
1845
+ * For streaming responses, it clones the response stream and processes it in
1846
+ * the background using `waitUntil`, allowing the original stream to pass through
1847
+ * unmodified while still capturing the complete content for tracing.
1848
+ *
1849
+ * @param request - The ZuploRequest
1850
+ * @param context - The ZuploContext
1851
+ * @param options - The policy options set in policies.json
1852
+ * @param policyName - The name of the policy as set in policies.json
1853
+ * @returns A Request or a Response
1854
+ */
1855
+ export declare function CometOpikTracingInboundPolicy(
1856
+ request: ZuploRequest,
1857
+ context: ZuploContext,
1858
+ options: CometOpikTracingPolicyOptions,
1859
+ policyName: string
1860
+ ): Promise<ZuploRequest | Response>;
1861
+
1862
+ /**
1863
+ * Track AI Gateway requests and responses using Comet Opik's LLM observability platform.
1864
+ * @public
1865
+ */
1866
+ export declare interface CometOpikTracingPolicyOptions {
1867
+ /**
1868
+ * The Comet Opik API key for authentication.
1869
+ */
1870
+ apiKey: string;
1871
+ /**
1872
+ * The Comet Opik project name for organizing traces.
1873
+ */
1874
+ projectName: string;
1875
+ /**
1876
+ * The Comet Opik workspace name.
1877
+ */
1878
+ workspace: string;
1879
+ /**
1880
+ * The base URL for the Comet Opik API (optional, defaults to https://www.comet.com/opik/api).
1881
+ */
1882
+ baseUrl?: string;
1883
+ }
1884
+
1836
1885
  /**
1837
1886
  * The compatibility date on which to run the gateway
1838
1887
  */
@@ -4980,6 +5029,89 @@ declare type LokiTransportVersion = 1 | 2;
4980
5029
 
4981
5030
  /* Excluded from this release type: LookupResult */
4982
5031
 
5032
+ /**
5033
+ * Configuration structure for the MCP Gateway
5034
+ */
5035
+ export declare interface McpGatewayConfig {
5036
+ /**
5037
+ * Array of MCP server configurations
5038
+ */
5039
+ servers: McpGatewayServerConfig[];
5040
+ }
5041
+
5042
+ /**
5043
+ * The Zuplo MCP gateway handler: used to build and bind origin MCP servers
5044
+ * to "virtual" MCP servers.
5045
+ * Only POST requests are supported for the HTTP streamable MCP transport.
5046
+ *
5047
+ * @beta
5048
+ * @param request - The ZuploRequest
5049
+ * @param context - The ZuploContext
5050
+ * @returns ZuploResponse
5051
+ */
5052
+ export declare function mcpGatewayHandler(
5053
+ request: ZuploRequest,
5054
+ context: ZuploContext
5055
+ ): Promise<Response>;
5056
+
5057
+ declare interface McpGatewayOrigin {
5058
+ /**
5059
+ * display name for the origin MCP server
5060
+ */
5061
+ name: string;
5062
+ /**
5063
+ * display description for the origin MCP server
5064
+ */
5065
+ description: string;
5066
+ /**
5067
+ * The actual endpoint of the origin MCP server
5068
+ */
5069
+ baseUrl: string;
5070
+ /**
5071
+ * The list of allowed tools on the server
5072
+ */
5073
+ tools: McpGatewayTool[];
5074
+ /**
5075
+ * Optional prefix to add to all tool names from this server to avoid conflicts
5076
+ * @example "weather_" would make "get_forecast" become "weather_get_forecast"
5077
+ */
5078
+ toolNamePrefix?: string;
5079
+ /**
5080
+ * Whether to include this server's capabilities in the combined server.
5081
+ * Defaults to true.
5082
+ */
5083
+ enabled?: boolean;
5084
+ }
5085
+
5086
+ /**
5087
+ * Configuration for an individual MCP server in the gateway
5088
+ */
5089
+ declare interface McpGatewayServerConfig {
5090
+ /**
5091
+ * Unique name and identifier for the MCP server
5092
+ */
5093
+ name: string;
5094
+ /**
5095
+ * Description of what this MCP server provides
5096
+ */
5097
+ description: string;
5098
+ /**
5099
+ * The endpoint slug path where this MCP server will be accessible
5100
+ * @example "/todo-mcp"
5101
+ */
5102
+ slug: string;
5103
+ /**
5104
+ * Array of origin configurations for this server
5105
+ */
5106
+ origins: McpGatewayOrigin[];
5107
+ }
5108
+
5109
+ declare interface McpGatewayTool {
5110
+ name: string;
5111
+ description: string;
5112
+ inputSchema: object;
5113
+ }
5114
+
4983
5115
  /**
4984
5116
  * An MCP Server handler for Zuplo
4985
5117
  * Only POST requests are supported for the HTTP streamable MCP transport.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zuplo/runtime",
3
3
  "type": "module",
4
- "version": "6.60.23",
4
+ "version": "6.60.24",
5
5
  "repository": "https://github.com/zuplo/zuplo",
6
6
  "author": "Zuplo, Inc.",
7
7
  "exports": {