UNPKG

@genkit-ai/core

Version:

Genkit AI framework core libraries.

257 lines (253 loc) 9.49 kB
import { z } from 'zod'; /** * Copyright 2024 Google LLC * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ /** * ReflectionRegisterSchema is the payload for the 'register' method. */ declare const ReflectionRegisterParamsSchema: z.ZodObject<{ id: z.ZodString; pid: z.ZodNumber; name: z.ZodOptional<z.ZodString>; genkitVersion: z.ZodOptional<z.ZodString>; reflectionApiSpecVersion: z.ZodOptional<z.ZodNumber>; envs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; }, "strip", z.ZodTypeAny, { id: string; pid: number; name?: string | undefined; genkitVersion?: string | undefined; reflectionApiSpecVersion?: number | undefined; envs?: string[] | undefined; }, { id: string; pid: number; name?: string | undefined; genkitVersion?: string | undefined; reflectionApiSpecVersion?: number | undefined; envs?: string[] | undefined; }>; type ReflectionRegisterParams = z.infer<typeof ReflectionRegisterParamsSchema>; /** * ReflectionStreamChunkSchema is the payload for the 'streamChunk' method. */ declare const ReflectionStreamChunkParamsSchema: z.ZodObject<{ requestId: z.ZodString; chunk: z.ZodAny; }, "strip", z.ZodTypeAny, { requestId: string; chunk?: any; }, { requestId: string; chunk?: any; }>; type ReflectionStreamChunkParams = z.infer<typeof ReflectionStreamChunkParamsSchema>; /** * ReflectionRunActionStateSchema is the payload for the 'runActionState' method. */ declare const ReflectionRunActionStateParamsSchema: z.ZodObject<{ requestId: z.ZodString; state: z.ZodOptional<z.ZodObject<{ traceId: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { traceId?: string | undefined; }, { traceId?: string | undefined; }>>; }, "strip", z.ZodTypeAny, { requestId: string; state?: { traceId?: string | undefined; } | undefined; }, { requestId: string; state?: { traceId?: string | undefined; } | undefined; }>; type ReflectionRunActionStateParams = z.infer<typeof ReflectionRunActionStateParamsSchema>; /** * ReflectionConfigureSchema is the payload for the 'configure' method. */ declare const ReflectionConfigureParamsSchema: z.ZodObject<{ telemetryServerUrl: z.ZodOptional<z.ZodString>; }, "strip", z.ZodTypeAny, { telemetryServerUrl?: string | undefined; }, { telemetryServerUrl?: string | undefined; }>; type ReflectionConfigureParams = z.infer<typeof ReflectionConfigureParamsSchema>; /** * ReflectionListValuesSchema is the payload for the 'listValues' method. */ declare const ReflectionListValuesParamsSchema: z.ZodObject<{ type: z.ZodString; }, "strip", z.ZodTypeAny, { type: string; }, { type: string; }>; type ReflectionListValuesParams = z.infer<typeof ReflectionListValuesParamsSchema>; /** * ReflectionRunActionSchema is the payload for the 'runAction' method. */ declare const ReflectionRunActionParamsSchema: z.ZodObject<{ key: z.ZodString; input: z.ZodOptional<z.ZodAny>; context: z.ZodOptional<z.ZodAny>; telemetryLabels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>; stream: z.ZodOptional<z.ZodBoolean>; streamInput: z.ZodOptional<z.ZodBoolean>; }, "strip", z.ZodTypeAny, { key: string; context?: any; input?: any; stream?: boolean | undefined; telemetryLabels?: Record<string, string> | undefined; streamInput?: boolean | undefined; }, { key: string; context?: any; input?: any; stream?: boolean | undefined; telemetryLabels?: Record<string, string> | undefined; streamInput?: boolean | undefined; }>; type ReflectionRunActionParams = z.infer<typeof ReflectionRunActionParamsSchema>; /** * ReflectionCancelActionSchema is the payload for the 'cancelAction' method. */ declare const ReflectionCancelActionParamsSchema: z.ZodObject<{ traceId: z.ZodString; }, "strip", z.ZodTypeAny, { traceId: string; }, { traceId: string; }>; type ReflectionCancelActionParams = z.infer<typeof ReflectionCancelActionParamsSchema>; /** * ReflectionSendInputStreamChunkSchema is the payload for the 'sendInputStreamChunk' method. */ declare const ReflectionSendInputStreamChunkParamsSchema: z.ZodObject<{ requestId: z.ZodString; chunk: z.ZodAny; }, "strip", z.ZodTypeAny, { requestId: string; chunk?: any; }, { requestId: string; chunk?: any; }>; type ReflectionSendInputStreamChunkParams = z.infer<typeof ReflectionSendInputStreamChunkParamsSchema>; /** * ReflectionEndInputStreamSchema is the payload for the 'endInputStream' method. */ declare const ReflectionEndInputStreamParamsSchema: z.ZodObject<{ requestId: z.ZodString; }, "strip", z.ZodTypeAny, { requestId: string; }, { requestId: string; }>; type ReflectionEndInputStreamParams = z.infer<typeof ReflectionEndInputStreamParamsSchema>; /** * ReflectionListActionsResponseSchema is the result for the 'listActions' method. */ declare const ReflectionListActionsResponseSchema: z.ZodObject<{ actions: z.ZodRecord<z.ZodString, z.ZodObject<{ key: z.ZodOptional<z.ZodString>; actionType: z.ZodOptional<z.ZodString>; name: z.ZodString; description: z.ZodOptional<z.ZodString>; inputSchema: z.ZodOptional<z.ZodUnknown>; inputJsonSchema: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>; outputSchema: z.ZodOptional<z.ZodUnknown>; outputJsonSchema: z.ZodOptional<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>>; streamSchema: z.ZodOptional<z.ZodUnknown>; metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>; }, "strip", z.ZodTypeAny, { name: string; metadata?: Record<string, any> | undefined; description?: string | undefined; key?: string | undefined; actionType?: string | undefined; inputSchema?: unknown; inputJsonSchema?: {} | undefined; outputSchema?: unknown; outputJsonSchema?: {} | undefined; streamSchema?: unknown; }, { name: string; metadata?: Record<string, any> | undefined; description?: string | undefined; key?: string | undefined; actionType?: string | undefined; inputSchema?: unknown; inputJsonSchema?: {} | undefined; outputSchema?: unknown; outputJsonSchema?: {} | undefined; streamSchema?: unknown; }>>; }, "strip", z.ZodTypeAny, { actions: Record<string, { name: string; metadata?: Record<string, any> | undefined; description?: string | undefined; key?: string | undefined; actionType?: string | undefined; inputSchema?: unknown; inputJsonSchema?: {} | undefined; outputSchema?: unknown; outputJsonSchema?: {} | undefined; streamSchema?: unknown; }>; }, { actions: Record<string, { name: string; metadata?: Record<string, any> | undefined; description?: string | undefined; key?: string | undefined; actionType?: string | undefined; inputSchema?: unknown; inputJsonSchema?: {} | undefined; outputSchema?: unknown; outputJsonSchema?: {} | undefined; streamSchema?: unknown; }>; }>; type ReflectionListActionsResponse = z.infer<typeof ReflectionListActionsResponseSchema>; /** * ReflectionListValuesResponseSchema is the result for the 'listValues' method. */ declare const ReflectionListValuesResponseSchema: z.ZodObject<{ values: z.ZodRecord<z.ZodString, z.ZodAny>; }, "strip", z.ZodTypeAny, { values: Record<string, any>; }, { values: Record<string, any>; }>; type ReflectionListValuesResponse = z.infer<typeof ReflectionListValuesResponseSchema>; /** * ReflectionCancelActionResponseSchema is the result for the 'cancelAction' method. */ declare const ReflectionCancelActionResponseSchema: z.ZodObject<{ message: z.ZodString; }, "strip", z.ZodTypeAny, { message: string; }, { message: string; }>; type ReflectionCancelActionResponse = z.infer<typeof ReflectionCancelActionResponseSchema>; export { type ReflectionCancelActionParams, ReflectionCancelActionParamsSchema, type ReflectionCancelActionResponse, ReflectionCancelActionResponseSchema, type ReflectionConfigureParams, ReflectionConfigureParamsSchema, type ReflectionEndInputStreamParams, ReflectionEndInputStreamParamsSchema, type ReflectionListActionsResponse, ReflectionListActionsResponseSchema, type ReflectionListValuesParams, ReflectionListValuesParamsSchema, type ReflectionListValuesResponse, ReflectionListValuesResponseSchema, type ReflectionRegisterParams, ReflectionRegisterParamsSchema, type ReflectionRunActionParams, ReflectionRunActionParamsSchema, type ReflectionRunActionStateParams, ReflectionRunActionStateParamsSchema, type ReflectionSendInputStreamChunkParams, ReflectionSendInputStreamChunkParamsSchema, type ReflectionStreamChunkParams, ReflectionStreamChunkParamsSchema };