{"version":3,"file":"pi.cjs","names":["definePiExtension","piToolContributions","withPiRenderers","toolRead","renderRead"],"sources":["../../generated/pi.ts"],"sourcesContent":["// Generated by @agimon-ai/doompi-build. Do not edit by hand.\nimport { definePiExtension, piToolContributions, withPiRenderers, type PiPluginContext } from '@agimon-ai/doompi-core/pi-extension';\n\nimport toolRead from '../src/extensions/workspaces/sessions/(backend)/tool/read.cli';\nimport renderRead from '../src/extensions/workspaces/sessions/(frontend)/tool/read.cli';\n\ntype OptionsOf<T> = T extends (context: PiPluginContext<infer Options>) => unknown ? Options : never;\ntype InferredOptions = Exclude<OptionsOf<typeof toolRead>, undefined>;\ntype Intersect<Union> =\n  (Union extends unknown ? (value: Union) => void : never) extends (value: infer Value) => void ? Value : never;\ntype ExtensionOptions = [InferredOptions] extends [never] ? undefined : Intersect<InferredOptions>;\n\ntype Factory<T, C> = (context: C) => T;\nconst at = <T, C>(value: T | Factory<T, C>, context: C): T =>\n  typeof value === 'function' ? (value as Factory<T, C>)(context) : value;\nconst via = <T>(identity: Record<string, unknown>, value: unknown): T => ({ ...identity, ...(value as object) }) as T;\n\nexport const extension = definePiExtension<ExtensionOptions>('@agimon-ai/doompi-read', (context) => ({\n  ...piToolContributions('@agimon-ai/doompi-read', [via({ name: 'read' }, withPiRenderers(at(toolRead, context), at(renderRead, context)))]),\n}));\n\nexport default extension;\n"],"mappings":";;;;;;;;AAaA,MAAM,MAAY,OAA0B,YAC1C,OAAO,UAAU,aAAc,MAAwB,OAAO,IAAI;AACpE,MAAM,OAAU,UAAmC,WAAuB;CAAE,GAAG;CAAU,GAAI;AAAiB;AAE9G,MAAa,aAAA,GAAYA,oCAAAA,kBAAAA,CAAoC,2BAA2B,aAAa,EACnG,IAAA,GAAGC,oCAAAA,oBAAAA,CAAoB,0BAA0B,CAAC,IAAI,EAAE,MAAM,OAAO,IAAA,GAAGC,oCAAAA,gBAAAA,CAAgB,GAAGC,iBAAAA,SAAU,OAAO,GAAG,GAAGC,mBAAAA,SAAY,OAAO,CAAC,CAAC,CAAC,CAAC,EAC3I,EAAE"}