{"version":3,"file":"foundation.mjs","names":["createEffectFoundation","observability","Observability","options","dependencies","bindEffectCommand","bindEffectQuery"],"sources":["../../../src/modules/effect/foundation.ts"],"sourcesContent":["// oxlint-disable-next-line cvx/component-boundaries -- SAFETY: Internal optional adapter shares the Effect-free Foundation lifecycle and types without entering the Convex component deployment graph.\nimport {\n\tObservability,\n\ttype ObservabilityOptions,\n} from '../../components/foundation/modules/observability/observability'\nimport { bindEffectCommand, type EffectCommandDependencies } from './command'\nimport { bindEffectQuery } from './query'\n\n/** Shared host capabilities are bound once; registry resolvers stay invocation-local. */\nexport type EffectFoundationOptions = Omit<EffectCommandDependencies, 'observability'> & {\n\tobservability: ObservabilityOptions\n}\nexport type EffectFoundation<Options extends EffectFoundationOptions> = {\n\tCommand: ReturnType<typeof bindEffectCommand<Options & { observability: Observability }>>\n\tQuery: ReturnType<typeof bindEffectQuery<Options & { observability: Observability }>>\n\tobservability: Observability\n}\n\nexport function createEffectFoundation<const Options extends EffectFoundationOptions>(\n\toptions: Options,\n): EffectFoundation<Options> {\n\tconst observability = new Observability(options.observability)\n\tconst dependencies = { ...options, observability }\n\treturn {\n\t\tCommand: bindEffectCommand(dependencies),\n\t\tQuery: bindEffectQuery(dependencies),\n\t\tobservability,\n\t}\n}\n"],"mappings":"oMAkBA,SAAgBA,EACf,EAC4B,CAC5B,IAAMC,EAAgB,IAAIC,EAAcC,EAAQ,aAAa,EACvDC,EAAe,CAAE,GAAGD,EAAS,eAAc,EACjD,MAAO,CACN,QAASE,EAAkBD,CAAY,EACvC,MAAOE,EAAgBF,CAAY,EACnC,eACD,CACD"}