{"version":3,"sources":["../src/index.ts"],"sourcesContent":["/**\n * Copyright 2024 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport { version } from './__codegen/version.mjs';\n\n/**\n * Genkit library version.\n */\nexport const GENKIT_VERSION = version;\n\n/**\n * Genkit client header for API calls.\n */\nexport const GENKIT_CLIENT_HEADER = `genkit-node/${GENKIT_VERSION} gl-node/${process.versions.node}`;\nexport const GENKIT_REFLECTION_API_SPEC_VERSION = 1;\n\nexport { z } from 'zod';\nexport * from './action.mjs';\nexport { getAsyncContext } from './async-context.mjs';\nexport {\n  OperationSchema,\n  backgroundAction,\n  defineBackgroundAction,\n  isBackgroundAction,\n  registerBackgroundAction,\n  type BackgroundAction,\n  type BackgroundActionFnArg,\n  type BackgroundActionParams,\n  type BackgroundActionRunOptions,\n  type Operation,\n} from './background-action.mjs';\nexport {\n  getGenkitRuntimeConfig,\n  resetGenkitRuntimeConfig,\n  setGenkitRuntimeConfig,\n  type GenkitRuntimeConfig,\n} from './config.mjs';\nexport {\n  apiKey,\n  getContext,\n  runWithContext,\n  type ActionContext,\n  type ApiKeyContext,\n  type ContextProvider,\n  type RequestData,\n} from './context.mjs';\nexport {\n  defineDynamicActionProvider,\n  type DapConfig,\n  type DapFn,\n  type DynamicActionProviderAction,\n} from './dynamic-action-provider.mjs';\nexport {\n  GenkitError,\n  UnstableApiError,\n  UserFacingError,\n  assertUnstable,\n  getCallableJSON,\n  getHttpStatus,\n  type ErrorResponseMetadata,\n  type StatusName,\n} from './error.mjs';\nexport {\n  defineFlow,\n  flow,\n  run,\n  type Flow,\n  type FlowConfig,\n  type FlowFn,\n  type FlowSideChannel,\n} from './flow.mjs';\nexport * from './plugin.mjs';\nexport * from './reflection.mjs';\nexport {\n  annotateSchema,\n  defineJsonSchema,\n  defineSchema,\n  toJsonSchema,\n  type JSONSchema,\n} from './schema.mjs';\nexport * from './telemetryTypes.mjs';\nexport * from './utils.mjs';\n\nconst clientHeaderGlobalKey = '__genkit_ClientHeader';\n\n/** Additional attribution information to include in the x-goog-api-client header. */\nexport function getClientHeader() {\n  if (global[clientHeaderGlobalKey]) {\n    return GENKIT_CLIENT_HEADER + ' ' + global[clientHeaderGlobalKey];\n  }\n  return GENKIT_CLIENT_HEADER;\n}\n\n/** Sets additional attribution information to include in the x-goog-api-client header. */\nexport function setClientHeader(header: string) {\n  global[clientHeaderGlobalKey] = header;\n}\n"],"mappings":"AAgBA,SAAS,eAAe;AAKjB,MAAM,iBAAiB;AAKvB,MAAM,uBAAuB,eAAe,cAAc,YAAY,QAAQ,SAAS,IAAI;AAC3F,MAAM,qCAAqC;AAElD,SAAS,SAAS;AAClB,cAAc;AACd,SAAS,uBAAuB;AAChC;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAMK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AACP;AAAA,EACE;AAAA,OAIK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAGK;AACP;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OAKK;AACP,cAAc;AACd,cAAc;AACd;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OAEK;AACP,cAAc;AACd,cAAc;AAEd,MAAM,wBAAwB;AAGvB,SAAS,kBAAkB;AAChC,MAAI,OAAO,qBAAqB,GAAG;AACjC,WAAO,uBAAuB,MAAM,OAAO,qBAAqB;AAAA,EAClE;AACA,SAAO;AACT;AAGO,SAAS,gBAAgB,QAAgB;AAC9C,SAAO,qBAAqB,IAAI;AAClC;","names":[]}