@assistant-ui/react-mcp 0.1.20 → 0.1.22
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.
- package/LICENSE +1 -1
- package/dist/auth/createOAuthProvider.d.ts.map +1 -1
- package/dist/auth/createOAuthProvider.js +7 -1
- package/dist/auth/createOAuthProvider.js.map +1 -1
- package/dist/context/McpConnectorByIndexProvider.js.map +1 -1
- package/dist/context/McpCustomServerByIndexProvider.js.map +1 -1
- package/dist/context/McpServerByIdProvider.js.map +1 -1
- package/dist/hooks/useMcpOAuthCallback.js.map +1 -1
- package/dist/primitives/addForm/McpAddFormAuthFields.js.map +1 -1
- package/dist/primitives/addForm/McpAddFormAuthSelect.js.map +1 -1
- package/dist/primitives/addForm/McpAddFormBearerTokenField.js.map +1 -1
- package/dist/primitives/addForm/McpAddFormCancel.js.map +1 -1
- package/dist/primitives/addForm/McpAddFormError.js.map +1 -1
- package/dist/primitives/addForm/McpAddFormNameField.js.map +1 -1
- package/dist/primitives/addForm/McpAddFormRoot.d.ts.map +1 -1
- package/dist/primitives/addForm/McpAddFormRoot.js +14 -5
- package/dist/primitives/addForm/McpAddFormRoot.js.map +1 -1
- package/dist/primitives/addForm/McpAddFormScopesField.js.map +1 -1
- package/dist/primitives/addForm/McpAddFormSubmit.js.map +1 -1
- package/dist/primitives/addForm/McpAddFormUrlField.js.map +1 -1
- package/dist/primitives/elicitation/McpElicitationPrimitiveAccept.js.map +1 -1
- package/dist/primitives/elicitation/McpElicitationPrimitiveCancel.js.map +1 -1
- package/dist/primitives/elicitation/McpElicitationPrimitiveDecline.js.map +1 -1
- package/dist/primitives/elicitation/McpElicitationPrimitiveError.js.map +1 -1
- package/dist/primitives/elicitation/McpElicitationPrimitiveFields.js.map +1 -1
- package/dist/primitives/elicitation/McpElicitationPrimitiveItems.js.map +1 -1
- package/dist/primitives/elicitation/McpElicitationPrimitiveMessage.js.map +1 -1
- package/dist/primitives/elicitation/McpElicitationPrimitiveRoot.js.map +1 -1
- package/dist/primitives/manager/McpManagerAddCustomTrigger.js.map +1 -1
- package/dist/primitives/manager/McpManagerRoot.js.map +1 -1
- package/dist/primitives/server/McpServerConnectButton.js.map +1 -1
- package/dist/primitives/server/McpServerDisconnectButton.js.map +1 -1
- package/dist/primitives/server/McpServerError.js.map +1 -1
- package/dist/primitives/server/McpServerIcon.js.map +1 -1
- package/dist/primitives/server/McpServerName.js.map +1 -1
- package/dist/primitives/server/McpServerOAuthLink.js.map +1 -1
- package/dist/primitives/server/McpServerRemoveButton.js.map +1 -1
- package/dist/primitives/server/McpServerRoot.js.map +1 -1
- package/dist/primitives/server/McpServerStatus.js.map +1 -1
- package/dist/primitives/server/McpServerToolName.js.map +1 -1
- package/dist/primitives/server/McpServerTools.js.map +1 -1
- package/dist/resources/McpCustomServerPersistence.d.ts +17 -0
- package/dist/resources/McpCustomServerPersistence.d.ts.map +1 -0
- package/dist/resources/McpCustomServerPersistence.js +192 -0
- package/dist/resources/McpCustomServerPersistence.js.map +1 -0
- package/dist/resources/McpElicitationLifecycle.d.ts +12 -0
- package/dist/resources/McpElicitationLifecycle.d.ts.map +1 -0
- package/dist/resources/McpElicitationLifecycle.js +144 -0
- package/dist/resources/McpElicitationLifecycle.js.map +1 -0
- package/dist/resources/McpManagerResource.d.ts.map +1 -1
- package/dist/resources/McpManagerResource.js +28 -205
- package/dist/resources/McpManagerResource.js.map +1 -1
- package/dist/resources/McpServerResource.d.ts.map +1 -1
- package/dist/resources/McpServerResource.js +24 -101
- package/dist/resources/McpServerResource.js.map +1 -1
- package/dist/resources/storage/McpLocalStorage.d.ts +1 -4
- package/dist/resources/storage/McpLocalStorage.d.ts.map +1 -1
- package/dist/resources/storage/McpLocalStorage.js +1 -100
- package/dist/resources/storage/McpLocalStorage.js.map +1 -1
- package/dist/resources/storage/McpStoredDataNormalization.d.ts +5 -0
- package/dist/resources/storage/McpStoredDataNormalization.d.ts.map +1 -0
- package/dist/resources/storage/McpStoredDataNormalization.js +95 -0
- package/dist/resources/storage/McpStoredDataNormalization.js.map +1 -0
- package/dist/utils/serverUrl.d.ts +1 -0
- package/dist/utils/serverUrl.d.ts.map +1 -1
- package/dist/utils/serverUrl.js +15 -1
- package/dist/utils/serverUrl.js.map +1 -1
- package/package.json +15 -11
- package/src/auth/createOAuthProvider.test.ts +30 -1
- package/src/auth/createOAuthProvider.ts +12 -4
- package/src/primitives/addForm/McpAddFormRoot.test.tsx +66 -0
- package/src/primitives/addForm/McpAddFormRoot.tsx +11 -1
- package/src/resources/McpCustomServerPersistence.test.ts +56 -0
- package/src/resources/McpCustomServerPersistence.ts +233 -0
- package/src/resources/McpElicitationLifecycle.test.ts +83 -0
- package/src/resources/McpElicitationLifecycle.ts +156 -0
- package/src/resources/McpManagerResource.test.ts +36 -0
- package/src/resources/McpManagerResource.ts +25 -248
- package/src/resources/McpServerResource.test.ts +123 -10
- package/src/resources/McpServerResource.ts +29 -149
- package/src/resources/storage/McpLocalStorage.ts +9 -209
- package/src/resources/storage/McpStoredDataNormalization.test.ts +24 -0
- package/src/resources/storage/McpStoredDataNormalization.ts +201 -0
- package/src/utils/serverUrl.test.ts +30 -0
- package/src/utils/serverUrl.ts +26 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpElicitationPrimitiveError.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useMcpElicitation","McpElicitationPrimitiveError","Element","div","Props","props","ref","$","_c","error","t0","properties","join","t1","children","message","t2","displayName"],"sources":["../../../src/primitives/elicitation/McpElicitationPrimitiveError.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useMcpElicitation } from \"./context\";\n\nexport namespace McpElicitationPrimitiveError {\n export type Element = ComponentRef<typeof Primitive.div>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.div>;\n}\n\nexport const McpElicitationPrimitiveError = forwardRef<\n McpElicitationPrimitiveError.Element,\n McpElicitationPrimitiveError.Props\n>((props, ref) => {\n const error = useMcpElicitation().error;\n if (!error) return null;\n return (\n <Primitive.div\n {...props}\n ref={ref}\n data-properties={error.properties?.join(\",\")}\n >\n {props.children ?? error.message}\n </Primitive.div>\n );\n});\n\nMcpElicitationPrimitiveError.displayName = \"McpElicitationPrimitive.Error\";\n"],"mappings":";;;;;;AAaA,MAAaK,+BAA+BH,YAG1CO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,QAAcT,kBAAkB,CAAC,CAAAS;CACjC,IAAI,CAACA,OAAK,OAAS;CAAK,IAAAC;CAAA,IAAAH,EAAA,OAAAE,MAAAE,YAAA;EAKHD,KAAAD,MAAKE,YAAiBC,KAAC,GAAG;EAACL,EAAA,KAAAE,MAAAE;EAAAJ,EAAA,KAAAG;CAAA,OAAAA,KAAAH,EAAA;CAE3C,MAAAM,KAAAR,MAAKS,YAAaL,MAAKM;CAAQ,IAAAC;CAAA,IAAAT,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAG,MAAAH,EAAA,OAAAM,IAAA;EALlCG,KAAA,oBAAA,UAAA,KAAA;GAAA,GACMX;GACCC;GACY,mBAAAI;GAEhBG,UAAAA;EACH,CAAA;EAAgBN,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAG;EAAAH,EAAA,KAAAM;EAAAN,EAAA,KAAAS;CAAA,OAAAA,KAAAT,EAAA;CAAA,OANhBS;AAMgB,CAEnB;AAEDf,6BAA6BgB,cAAc"}
|
|
1
|
+
{"version":3,"file":"McpElicitationPrimitiveError.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useMcpElicitation","McpElicitationPrimitiveError","Element","div","Props","props","ref","$","_c","error","t0","properties","join","t1","children","message","t2","displayName","_c"],"sources":["../../../src/primitives/elicitation/McpElicitationPrimitiveError.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useMcpElicitation } from \"./context\";\n\nexport namespace McpElicitationPrimitiveError {\n export type Element = ComponentRef<typeof Primitive.div>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.div>;\n}\n\nexport const McpElicitationPrimitiveError = forwardRef<\n McpElicitationPrimitiveError.Element,\n McpElicitationPrimitiveError.Props\n>((props, ref) => {\n const error = useMcpElicitation().error;\n if (!error) return null;\n return (\n <Primitive.div\n {...props}\n ref={ref}\n data-properties={error.properties?.join(\",\")}\n >\n {props.children ?? error.message}\n </Primitive.div>\n );\n});\n\nMcpElicitationPrimitiveError.displayName = \"McpElicitationPrimitive.Error\";\n"],"mappings":";;;;;;AAaA,MAAaK,+BAA+BH,YAG1CO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,QAAcT,kBAAkB,CAAC,CAAAS;CACjC,IAAI,CAACA,OAAK,OAAS;CAAK,IAAAC;CAAA,IAAAH,EAAA,OAAAE,MAAAE,YAAA;EAKHD,KAAAD,MAAKE,YAAiBC,KAAC,GAAG;EAACL,EAAA,KAAAE,MAAAE;EAAAJ,EAAA,KAAAG;CAAA,OAAAA,KAAAH,EAAA;CAE3C,MAAAM,KAAAR,MAAKS,YAAaL,MAAKM;CAAQ,IAAAC;CAAA,IAAAT,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAG,MAAAH,EAAA,OAAAM,IAAA;EALlCG,KAAA,oBAAA,UAAA,KAAA;GAAA,GACMX;GACCC;GACY,mBAAAI;GAEhBG,UAAAA;EACH,CAAA;EAAgBN,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAG;EAAAH,EAAA,KAAAM;EAAAN,EAAA,KAAAS;CAAA,OAAAA,KAAAT,EAAA;CAAA,OANhBS;AAMgB,CAEnB;AAEDf,6BAA6BgB,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpElicitationPrimitiveFields.js","names":["FC","ReactNode","ElicitationFieldContext","ElicitationFieldContextValue","useElicitationContext","useMcpElicitationField","McpElicitationPrimitiveFields","Props","children","field","t0","$","_c","elicitation","draft","setField","properties","requestedSchema","Record","Array","isArray","t1","t2","Symbol","for","bb0","fields","Object","entries","length","map","t3","name","schema","value","hasOwn","undefined","setValue","displayName"],"sources":["../../../src/primitives/elicitation/McpElicitationPrimitiveFields.tsx"],"sourcesContent":["import { type FC, type ReactNode } from \"react\";\nimport {\n ElicitationFieldContext,\n type ElicitationFieldContextValue,\n useElicitationContext,\n} from \"./context\";\n\nexport { useMcpElicitationField } from \"./context\";\n\nexport namespace McpElicitationPrimitiveFields {\n export type Props = {\n children: (field: ElicitationFieldContextValue) => ReactNode;\n };\n}\n\nexport const McpElicitationPrimitiveFields: FC<\n McpElicitationPrimitiveFields.Props\n> = ({ children }) => {\n const { elicitation, draft, setField } = useElicitationContext();\n const properties = (\n elicitation.requestedSchema as {\n properties?: Record<string, unknown> | undefined;\n } | null\n )?.properties;\n\n if (\n properties === null ||\n typeof properties !== \"object\" ||\n Array.isArray(properties)\n ) {\n return null;\n }\n\n const fields = Object.entries(properties);\n if (fields.length === 0) return null;\n\n return (\n <>\n {fields.map(([name, schema]) => {\n const field = {\n name,\n schema,\n value: Object.hasOwn(draft, name) ? draft[name] : undefined,\n setValue: (value: unknown) => setField(name, value),\n };\n return (\n <ElicitationFieldContext.Provider key={name} value={field}>\n {children(field)}\n </ElicitationFieldContext.Provider>\n );\n })}\n </>\n );\n};\n\nMcpElicitationPrimitiveFields.displayName = \"McpElicitationPrimitive.Fields\";\n"],"mappings":";;;;;AAeA,MAAaM,iCAETI,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAC,MAAA,EAAAJ,aAAAE;CACH,MAAA,EAAAG,aAAAC,OAAAC,aAAyCX,sBAAsB;CAC/D,MAAAY,aACEH,YAAWI,iBAGAD;CAEb,IACEA,eAAe,QACf,OAAOA,eAAe,YACtBG,MAAKC,QAASJ,UAAU,GAAC,OAElB;CACR,IAAAK;CAAA,IAAAC;CAAA,IAAAX,EAAA,OAAAH,YAAAG,EAAA,OAAAG,SAAAH,EAAA,OAAAK,cAAAL,EAAA,OAAAI,UAAA;EAG+BO,KAAAC,OAAIC,IAAJ,6BAAG;EAACC,KAAA;GADpC,MAAAC,SAAeC,OAAMC,QAASZ,UAAU;GACxC,IAAIU,OAAMG,WAAY,GAAC;IAASP,KAAA;IAAA,MAAAG;GAAI;GAGlCJ,KAAA,oBAAA,UAAA,EAAA,UACGK,OAAMI,KAAKC,OAAA;IAAC,MAAA,CAAAC,MAAAC,UAAAF;IACX,MAAAtB,QAAc;KAAAuB;KAAAC;KAAAC,OAGLP,OAAMQ,OAAQrB,OAAOkB,IAA8B,IAAtBlB,MAAMkB,QAAnCI,KAAAA;KAAoDC,WACjDH,UAAoBnB,SAASiB,MAAME,KAAK;IACpD;IAAE,OAEA,oBAAA,wBAAA,UAAA;KAAoDzB,OAAAA;KACjDD,UAAAA,SAASC,KAAK;IACjB,GAFuCuB,IAEvC;GAAmC,CAEtC,EAAC,CAAA;EACD;EAAArB,EAAA,KAAAH;EAAAG,EAAA,KAAAG;EAAAH,EAAA,KAAAK;EAAAL,EAAA,KAAAI;EAAAJ,EAAA,KAAAU;EAAAV,EAAA,KAAAW;CAAA,OAAA;EAAAD,KAAAV,EAAA;EAAAW,KAAAX,EAAA;CAAA;CAAA,IAAAW,OAAAC,OAAAC,IAAA,6BAAA,GAAA,OAAAF;CAAA,OAdHD;AAcG;AAIPf,8BAA8BgC,cAAc"}
|
|
1
|
+
{"version":3,"file":"McpElicitationPrimitiveFields.js","names":["FC","ReactNode","ElicitationFieldContext","ElicitationFieldContextValue","useElicitationContext","useMcpElicitationField","McpElicitationPrimitiveFields","Props","children","field","t0","$","_c","elicitation","draft","setField","properties","requestedSchema","Record","Array","isArray","t1","t2","Symbol","for","bb0","fields","Object","entries","length","map","t3","name","schema","value","hasOwn","undefined","setValue","displayName","_c"],"sources":["../../../src/primitives/elicitation/McpElicitationPrimitiveFields.tsx"],"sourcesContent":["import { type FC, type ReactNode } from \"react\";\nimport {\n ElicitationFieldContext,\n type ElicitationFieldContextValue,\n useElicitationContext,\n} from \"./context\";\n\nexport { useMcpElicitationField } from \"./context\";\n\nexport namespace McpElicitationPrimitiveFields {\n export type Props = {\n children: (field: ElicitationFieldContextValue) => ReactNode;\n };\n}\n\nexport const McpElicitationPrimitiveFields: FC<\n McpElicitationPrimitiveFields.Props\n> = ({ children }) => {\n const { elicitation, draft, setField } = useElicitationContext();\n const properties = (\n elicitation.requestedSchema as {\n properties?: Record<string, unknown> | undefined;\n } | null\n )?.properties;\n\n if (\n properties === null ||\n typeof properties !== \"object\" ||\n Array.isArray(properties)\n ) {\n return null;\n }\n\n const fields = Object.entries(properties);\n if (fields.length === 0) return null;\n\n return (\n <>\n {fields.map(([name, schema]) => {\n const field = {\n name,\n schema,\n value: Object.hasOwn(draft, name) ? draft[name] : undefined,\n setValue: (value: unknown) => setField(name, value),\n };\n return (\n <ElicitationFieldContext.Provider key={name} value={field}>\n {children(field)}\n </ElicitationFieldContext.Provider>\n );\n })}\n </>\n );\n};\n\nMcpElicitationPrimitiveFields.displayName = \"McpElicitationPrimitive.Fields\";\n"],"mappings":";;;;;AAeA,MAAaM,iCAETI,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAC,MAAA,EAAAJ,aAAAE;CACH,MAAA,EAAAG,aAAAC,OAAAC,aAAyCX,sBAAsB;CAC/D,MAAAY,aACEH,YAAWI,iBAGAD;CAEb,IACEA,eAAe,QACf,OAAOA,eAAe,YACtBG,MAAKC,QAASJ,UAAU,GAAC,OAElB;CACR,IAAAK;CAAA,IAAAC;CAAA,IAAAX,EAAA,OAAAH,YAAAG,EAAA,OAAAG,SAAAH,EAAA,OAAAK,cAAAL,EAAA,OAAAI,UAAA;EAG+BO,KAAAC,OAAIC,IAAJ,6BAAG;EAACC,KAAA;GADpC,MAAAC,SAAeC,OAAMC,QAASZ,UAAU;GACxC,IAAIU,OAAMG,WAAY,GAAC;IAASP,KAAA;IAAA,MAAAG;GAAI;GAGlCJ,KAAA,oBAAA,UAAA,EAAA,UACGK,OAAMI,KAAKC,OAAA;IAAC,MAAA,CAAAC,MAAAC,UAAAF;IACX,MAAAtB,QAAc;KAAAuB;KAAAC;KAAAC,OAGLP,OAAMQ,OAAQrB,OAAOkB,IAA8B,IAAtBlB,MAAMkB,QAAnCI,KAAAA;KAAoDC,WACjDH,UAAoBnB,SAASiB,MAAME,KAAK;IACpD;IAAE,OAEA,oBAAA,wBAAA,UAAA;KAAoDzB,OAAAA;KACjDD,UAAAA,SAASC,KAAK;IACjB,GAFuCuB,IAEvC;GAAmC,CAEtC,EAAC,CAAA;EACD;EAAArB,EAAA,KAAAH;EAAAG,EAAA,KAAAG;EAAAH,EAAA,KAAAK;EAAAL,EAAA,KAAAI;EAAAJ,EAAA,KAAAU;EAAAV,EAAA,KAAAW;CAAA,OAAA;EAAAD,KAAAV,EAAA;EAAAW,KAAAX,EAAA;CAAA;CAAA,IAAAW,OAAAC,OAAAC,IAAA,6BAAA,GAAA,OAAAF;CAAA,OAdHD;AAcG;AAIPf,8BAA8BgC,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpElicitationPrimitiveItems.js","names":["FC","ReactNode","useCallback","useMemo","useState","useAuiState","MCPElicitation","ElicitationContext","initialElicitationDraft","useMcpElicitation","McpElicitationPrimitiveItems","Props","children","elicitation","McpElicitationPrimitiveItem","t0","$","_c","t1","requestedSchema","draft","setDraft","t2","Symbol","for","name","value","current","setField","t3","context","t4","t5","elicitations","_temp","length","id","map","displayName","state","mcpServer","pendingElicitations"],"sources":["../../../src/primitives/elicitation/McpElicitationPrimitiveItems.tsx"],"sourcesContent":["import { type FC, type ReactNode, useCallback, useMemo, useState } from \"react\";\nimport { useAuiState } from \"@assistant-ui/store\";\nimport type { MCPElicitation } from \"../../mcp-scope\";\nimport { ElicitationContext } from \"./context\";\nimport { initialElicitationDraft } from \"./initialElicitationDraft\";\n\nexport { useMcpElicitation } from \"./context\";\n\nexport namespace McpElicitationPrimitiveItems {\n export type Props = {\n children: ReactNode | ((elicitation: MCPElicitation) => ReactNode);\n };\n}\n\nconst McpElicitationPrimitiveItem: FC<{\n elicitation: MCPElicitation;\n children: McpElicitationPrimitiveItems.Props[\"children\"];\n}> = ({ elicitation, children }) => {\n const [draft, setDraft] = useState<Record<string, unknown>>(() =>\n initialElicitationDraft(elicitation.requestedSchema),\n );\n const setField = useCallback((name: string, value: unknown) => {\n setDraft((current) => ({ ...current, [name]: value }));\n }, []);\n const context = useMemo(\n () => ({ elicitation, draft, setField }),\n [elicitation, draft, setField],\n );\n\n return (\n <ElicitationContext.Provider value={context}>\n {typeof children === \"function\" ? children(elicitation) : children}\n </ElicitationContext.Provider>\n );\n};\n\nexport const McpElicitationPrimitiveItems: FC<\n McpElicitationPrimitiveItems.Props\n> = ({ children }) => {\n const elicitations = useAuiState(\n (state) => state.mcpServer.pendingElicitations,\n );\n if (elicitations.length === 0) return null;\n return (\n <>\n {elicitations.map((elicitation) => (\n <McpElicitationPrimitiveItem\n key={elicitation.id}\n elicitation={elicitation}\n >\n {children}\n </McpElicitationPrimitiveItem>\n ))}\n </>\n );\n};\n\nMcpElicitationPrimitiveItems.displayName = \"McpElicitationPrimitive.Items\";\n"],"mappings":";;;;;;;AAcA,MAAMc,+BAGDC,OAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAC,MAAA,EAAAJ,aAAAD,aAAAG;CAAyB,IAAAG;CAAA,IAAAF,EAAA,OAAAH,YAAAM,iBAAA;EAC+BD,WAC1DV,wBAAwBK,YAAWM,eAAgB;EAACH,EAAA,KAAAH,YAAAM;EAAAH,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CADtD,MAAA,CAAAI,OAAAC,YAA0BjB,SAAkCc,EAE5D;CAAE,IAAAI;CAAA,IAAAN,EAAA,OAAAO,OAAAC,IAAA,2BAAA,GAAA;EAC2BF,MAAAG,MAAAC,UAAA;GAC3BL,UAASM,aAAc;IAAA,GAAKA;KAAUF,OAAOC;GAAM,EAAE;EAAC;EACvDV,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAFD,MAAAY,WAAiBN;CAEV,IAAAO;CAAA,IAAAb,EAAA,OAAAI,SAAAJ,EAAA,OAAAH,aAAA;EAEEgB,KAAA;GAAAhB;GAAAO;GAAAQ;EAA+B;EAACZ,EAAA,KAAAI;EAAAJ,EAAA,KAAAH;EAAAG,EAAA,KAAAa;CAAA,OAAAA,KAAAb,EAAA;CADzC,MAAAc,UACSD;CAEP,IAAAE;CAAA,IAAAf,EAAA,OAAAJ,YAAAI,EAAA,OAAAH,aAAA;EAIGkB,KAAA,OAAOnB,aAAa,aAAaA,SAASC,WAAsB,IAAhED;EAAiEI,EAAA,KAAAJ;EAAAI,EAAA,KAAAH;EAAAG,EAAA,KAAAe;CAAA,OAAAA,KAAAf,EAAA;CAAA,IAAAgB;CAAA,IAAAhB,EAAA,OAAAc,WAAAd,EAAA,QAAAe,IAAA;EADpEC,KAAA,oBAAA,mBAAA,UAAA;GAAoCF,OAAAA;GACjCC,UAAAA;EACH,CAAA;EAA8Bf,EAAA,KAAAc;EAAAd,EAAA,MAAAe;EAAAf,EAAA,MAAAgB;CAAA,OAAAA,KAAAhB,EAAA;CAAA,OAF9BgB;AAE8B;AAIlC,MAAatB,gCAETK,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAC,MAAA,EAAAL,aAAAG;CACH,MAAAkB,eAAqB5B,YACnB6B,KACF;CACA,IAAID,aAAYE,WAAY,GAAC,OAAS;CAAK,IAAAjB;CAAA,IAAAF,EAAA,OAAAJ,YAAAI,EAAA,OAAAiB,cAAA;EAAA,IAAAX;EAAA,IAAAN,EAAA,OAAAJ,UAAA;GAGrBU,MAAAT,gBAChB,oBAAC,6BAAD;IAEeA;IAEZD;GAJyB,GACrBC,YAAWuB,EADU;GAM7BpB,EAAA,KAAAJ;GAAAI,EAAA,KAAAM;EAAA,OAAAA,KAAAN,EAAA;EAPAE,KAAAe,aAAYI,IAAKf,EAOjB;EAACN,EAAA,KAAAJ;EAAAI,EAAA,KAAAiB;EAAAjB,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAAA,IAAAM;CAAA,IAAAN,EAAA,OAAAE,IAAA;EARJI,KAAA,oBAAA,UAAA,EAAA,UACGJ,GAOC,CAAA;EACDF,EAAA,KAAAE;EAAAF,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OATHM;AASG;AAIPZ,6BAA6B4B,cAAc;AAnBvC,SAAAJ,MAAAK,OAAA;CAAA,OAEWA,MAAKC,UAAUC;AAAoB"}
|
|
1
|
+
{"version":3,"file":"McpElicitationPrimitiveItems.js","names":["FC","ReactNode","useCallback","useMemo","useState","useAuiState","MCPElicitation","ElicitationContext","initialElicitationDraft","useMcpElicitation","McpElicitationPrimitiveItems","Props","children","elicitation","McpElicitationPrimitiveItem","t0","$","_c","t1","requestedSchema","draft","setDraft","t2","Symbol","for","name","value","current","setField","t3","context","t4","t5","elicitations","_temp","length","id","map","displayName","state","mcpServer","pendingElicitations","_c"],"sources":["../../../src/primitives/elicitation/McpElicitationPrimitiveItems.tsx"],"sourcesContent":["import { type FC, type ReactNode, useCallback, useMemo, useState } from \"react\";\nimport { useAuiState } from \"@assistant-ui/store\";\nimport type { MCPElicitation } from \"../../mcp-scope\";\nimport { ElicitationContext } from \"./context\";\nimport { initialElicitationDraft } from \"./initialElicitationDraft\";\n\nexport { useMcpElicitation } from \"./context\";\n\nexport namespace McpElicitationPrimitiveItems {\n export type Props = {\n children: ReactNode | ((elicitation: MCPElicitation) => ReactNode);\n };\n}\n\nconst McpElicitationPrimitiveItem: FC<{\n elicitation: MCPElicitation;\n children: McpElicitationPrimitiveItems.Props[\"children\"];\n}> = ({ elicitation, children }) => {\n const [draft, setDraft] = useState<Record<string, unknown>>(() =>\n initialElicitationDraft(elicitation.requestedSchema),\n );\n const setField = useCallback((name: string, value: unknown) => {\n setDraft((current) => ({ ...current, [name]: value }));\n }, []);\n const context = useMemo(\n () => ({ elicitation, draft, setField }),\n [elicitation, draft, setField],\n );\n\n return (\n <ElicitationContext.Provider value={context}>\n {typeof children === \"function\" ? children(elicitation) : children}\n </ElicitationContext.Provider>\n );\n};\n\nexport const McpElicitationPrimitiveItems: FC<\n McpElicitationPrimitiveItems.Props\n> = ({ children }) => {\n const elicitations = useAuiState(\n (state) => state.mcpServer.pendingElicitations,\n );\n if (elicitations.length === 0) return null;\n return (\n <>\n {elicitations.map((elicitation) => (\n <McpElicitationPrimitiveItem\n key={elicitation.id}\n elicitation={elicitation}\n >\n {children}\n </McpElicitationPrimitiveItem>\n ))}\n </>\n );\n};\n\nMcpElicitationPrimitiveItems.displayName = \"McpElicitationPrimitive.Items\";\n"],"mappings":";;;;;;;AAcA,MAAMc,+BAGDC,OAAA;CAAA,MAAAC,IAAAC,EAAA,EAAA;CAAC,MAAA,EAAAJ,aAAAD,aAAAG;CAAyB,IAAAG;CAAA,IAAAF,EAAA,OAAAH,YAAAM,iBAAA;EAC+BD,WAC1DV,wBAAwBK,YAAWM,eAAgB;EAACH,EAAA,KAAAH,YAAAM;EAAAH,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CADtD,MAAA,CAAAI,OAAAC,YAA0BjB,SAAkCc,EAE5D;CAAE,IAAAI;CAAA,IAAAN,EAAA,OAAAO,OAAAC,IAAA,2BAAA,GAAA;EAC2BF,MAAAG,MAAAC,UAAA;GAC3BL,UAASM,aAAc;IAAA,GAAKA;KAAUF,OAAOC;GAAM,EAAE;EAAC;EACvDV,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAFD,MAAAY,WAAiBN;CAEV,IAAAO;CAAA,IAAAb,EAAA,OAAAI,SAAAJ,EAAA,OAAAH,aAAA;EAEEgB,KAAA;GAAAhB;GAAAO;GAAAQ;EAA+B;EAACZ,EAAA,KAAAI;EAAAJ,EAAA,KAAAH;EAAAG,EAAA,KAAAa;CAAA,OAAAA,KAAAb,EAAA;CADzC,MAAAc,UACSD;CAEP,IAAAE;CAAA,IAAAf,EAAA,OAAAJ,YAAAI,EAAA,OAAAH,aAAA;EAIGkB,KAAA,OAAOnB,aAAa,aAAaA,SAASC,WAAsB,IAAhED;EAAiEI,EAAA,KAAAJ;EAAAI,EAAA,KAAAH;EAAAG,EAAA,KAAAe;CAAA,OAAAA,KAAAf,EAAA;CAAA,IAAAgB;CAAA,IAAAhB,EAAA,OAAAc,WAAAd,EAAA,QAAAe,IAAA;EADpEC,KAAA,oBAAA,mBAAA,UAAA;GAAoCF,OAAAA;GACjCC,UAAAA;EACH,CAAA;EAA8Bf,EAAA,KAAAc;EAAAd,EAAA,MAAAe;EAAAf,EAAA,MAAAgB;CAAA,OAAAA,KAAAhB,EAAA;CAAA,OAF9BgB;AAE8B;AAIlC,MAAatB,gCAETK,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAC,MAAA,EAAAL,aAAAG;CACH,MAAAkB,eAAqB5B,YACnB6B,KACF;CACA,IAAID,aAAYE,WAAY,GAAC,OAAS;CAAK,IAAAjB;CAAA,IAAAF,EAAA,OAAAJ,YAAAI,EAAA,OAAAiB,cAAA;EAAA,IAAAX;EAAA,IAAAN,EAAA,OAAAJ,UAAA;GAGrBU,MAAAT,gBAChB,oBAAC,6BAAD;IAEeA;IAEZD;GAJyB,GACrBC,YAAWuB,EADU;GAM7BpB,EAAA,KAAAJ;GAAAI,EAAA,KAAAM;EAAA,OAAAA,KAAAN,EAAA;EAPAE,KAAAe,aAAYI,IAAKf,EAOjB;EAACN,EAAA,KAAAJ;EAAAI,EAAA,KAAAiB;EAAAjB,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAAA,IAAAM;CAAA,IAAAN,EAAA,OAAAE,IAAA;EARJI,KAAA,oBAAA,UAAA,EAAA,UACGJ,GAOC,CAAA;EACDF,EAAA,KAAAE;EAAAF,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OATHM;AASG;AAIPZ,6BAA6B4B,cAAc;AAnBvC,SAAAJ,MAAAK,OAAA;CAAA,OAEWA,MAAKC,UAAUC;AAAoB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpElicitationPrimitiveMessage.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useMcpElicitation","McpElicitationPrimitiveMessage","Element","span","Props","props","ref","$","_c","elicitation","t0","children","message","t1","displayName"],"sources":["../../../src/primitives/elicitation/McpElicitationPrimitiveMessage.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useMcpElicitation } from \"./context\";\n\nexport namespace McpElicitationPrimitiveMessage {\n export type Element = ComponentRef<typeof Primitive.span>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.span>;\n}\n\nexport const McpElicitationPrimitiveMessage = forwardRef<\n McpElicitationPrimitiveMessage.Element,\n McpElicitationPrimitiveMessage.Props\n>((props, ref) => {\n const elicitation = useMcpElicitation();\n return (\n <Primitive.span {...props} ref={ref}>\n {props.children ?? elicitation.message}\n </Primitive.span>\n );\n});\n\nMcpElicitationPrimitiveMessage.displayName = \"McpElicitationPrimitive.Message\";\n"],"mappings":";;;;;;AAaA,MAAaK,iCAAiCH,YAG5CO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,cAAoBT,kBAAkB;CAGjC,MAAAU,KAAAL,MAAKM,YAAaF,YAAWG;CAAQ,IAAAC;CAAA,IAAAN,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAG,IAAA;EADxCG,KAAA,oBAAA,UAAA,MAAA;GAAA,GAAoBR;GAAYC;GAC7BI,UAAAA;EACH,CAAA;EAAiBH,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAG;EAAAH,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OAFjBM;AAEiB,CAEpB;AAEDZ,+BAA+Ba,cAAc"}
|
|
1
|
+
{"version":3,"file":"McpElicitationPrimitiveMessage.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useMcpElicitation","McpElicitationPrimitiveMessage","Element","span","Props","props","ref","$","_c","elicitation","t0","children","message","t1","displayName","_c"],"sources":["../../../src/primitives/elicitation/McpElicitationPrimitiveMessage.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useMcpElicitation } from \"./context\";\n\nexport namespace McpElicitationPrimitiveMessage {\n export type Element = ComponentRef<typeof Primitive.span>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.span>;\n}\n\nexport const McpElicitationPrimitiveMessage = forwardRef<\n McpElicitationPrimitiveMessage.Element,\n McpElicitationPrimitiveMessage.Props\n>((props, ref) => {\n const elicitation = useMcpElicitation();\n return (\n <Primitive.span {...props} ref={ref}>\n {props.children ?? elicitation.message}\n </Primitive.span>\n );\n});\n\nMcpElicitationPrimitiveMessage.displayName = \"McpElicitationPrimitive.Message\";\n"],"mappings":";;;;;;AAaA,MAAaK,iCAAiCH,YAG5CO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,cAAoBT,kBAAkB;CAGjC,MAAAU,KAAAL,MAAKM,YAAaF,YAAWG;CAAQ,IAAAC;CAAA,IAAAN,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAG,IAAA;EADxCG,KAAA,oBAAA,UAAA,MAAA;GAAA,GAAoBR;GAAYC;GAC7BI,UAAAA;EACH,CAAA;EAAiBH,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAG;EAAAH,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OAFjBM;AAEiB,CAEpB;AAEDZ,+BAA+Ba,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpElicitationPrimitiveRoot.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useMcpElicitation","McpElicitationPrimitiveRoot","Element","div","Props","props","ref","$","_c","elicitation","t0","id","displayName"],"sources":["../../../src/primitives/elicitation/McpElicitationPrimitiveRoot.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useMcpElicitation } from \"./context\";\n\nexport namespace McpElicitationPrimitiveRoot {\n export type Element = ComponentRef<typeof Primitive.div>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.div>;\n}\n\nexport const McpElicitationPrimitiveRoot = forwardRef<\n McpElicitationPrimitiveRoot.Element,\n McpElicitationPrimitiveRoot.Props\n>((props, ref) => {\n const elicitation = useMcpElicitation();\n return (\n <Primitive.div {...props} ref={ref} data-elicitation-id={elicitation.id} />\n );\n});\n\nMcpElicitationPrimitiveRoot.displayName = \"McpElicitationPrimitive.Root\";\n"],"mappings":";;;;;;AAaA,MAAaK,8BAA8BH,YAGzCO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,cAAoBT,kBAAkB;CAAE,IAAAU;CAAA,IAAAH,EAAA,OAAAE,YAAAE,MAAAJ,EAAA,OAAAF,SAAAE,EAAA,OAAAD,KAAA;EAEtCI,KAAA,oBAAA,UAAA,KAAA;GAAA,GAAmBL;GAAYC;GAA0B,uBAAAG,YAAWE;EAAG,CAAA;EAAIJ,EAAA,KAAAE,YAAAE;EAAAJ,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAG;CAAA,OAAAA,KAAAH,EAAA;CAAA,OAA3EG;AAA2E,CAE9E;AAEDT,4BAA4BW,cAAc"}
|
|
1
|
+
{"version":3,"file":"McpElicitationPrimitiveRoot.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useMcpElicitation","McpElicitationPrimitiveRoot","Element","div","Props","props","ref","$","_c","elicitation","t0","id","displayName","_c"],"sources":["../../../src/primitives/elicitation/McpElicitationPrimitiveRoot.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useMcpElicitation } from \"./context\";\n\nexport namespace McpElicitationPrimitiveRoot {\n export type Element = ComponentRef<typeof Primitive.div>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.div>;\n}\n\nexport const McpElicitationPrimitiveRoot = forwardRef<\n McpElicitationPrimitiveRoot.Element,\n McpElicitationPrimitiveRoot.Props\n>((props, ref) => {\n const elicitation = useMcpElicitation();\n return (\n <Primitive.div {...props} ref={ref} data-elicitation-id={elicitation.id} />\n );\n});\n\nMcpElicitationPrimitiveRoot.displayName = \"McpElicitationPrimitive.Root\";\n"],"mappings":";;;;;;AAaA,MAAaK,8BAA8BH,YAGzCO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,cAAoBT,kBAAkB;CAAE,IAAAU;CAAA,IAAAH,EAAA,OAAAE,YAAAE,MAAAJ,EAAA,OAAAF,SAAAE,EAAA,OAAAD,KAAA;EAEtCI,KAAA,oBAAA,UAAA,KAAA;GAAA,GAAmBL;GAAYC;GAA0B,uBAAAG,YAAWE;EAAG,CAAA;EAAIJ,EAAA,KAAAE,YAAAE;EAAAJ,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAG;CAAA,OAAAA,KAAAH,EAAA;CAAA,OAA3EG;AAA2E,CAE9E;AAEDT,4BAA4BW,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpManagerAddCustomTrigger.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","McpManagerPrimitiveAddCustomTrigger","Element","button","Props","props","ref","$","_c","t0","displayName"],"sources":["../../../src/primitives/manager/McpManagerAddCustomTrigger.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\n\nexport namespace McpManagerPrimitiveAddCustomTrigger {\n export type Element = ComponentRef<typeof Primitive.button>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.button>;\n}\n\nexport const McpManagerPrimitiveAddCustomTrigger = forwardRef<\n McpManagerPrimitiveAddCustomTrigger.Element,\n McpManagerPrimitiveAddCustomTrigger.Props\n>((props, ref) => {\n return <Primitive.button {...props} type=\"button\" ref={ref} />;\n});\n\nMcpManagerPrimitiveAddCustomTrigger.displayName =\n \"McpManagerPrimitive.AddCustomTrigger\";\n"],"mappings":";;;;;AAYA,MAAaI,sCAAsCF,YAGjDM,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAC;CAAA,IAAAF,EAAA,OAAAF,SAAAE,EAAA,OAAAD,KAAA;EACOG,KAAA,oBAAA,UAAA,QAAA;GAAA,GAAsBJ;GAAY,MAAA;GAAcC;EAAG,CAAA;EAAIC,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAAA,OAAvDE;AAAuD,CAC/D;AAEDR,oCAAoCS,cAClC"}
|
|
1
|
+
{"version":3,"file":"McpManagerAddCustomTrigger.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","McpManagerPrimitiveAddCustomTrigger","Element","button","Props","props","ref","$","_c","t0","displayName","_c"],"sources":["../../../src/primitives/manager/McpManagerAddCustomTrigger.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\n\nexport namespace McpManagerPrimitiveAddCustomTrigger {\n export type Element = ComponentRef<typeof Primitive.button>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.button>;\n}\n\nexport const McpManagerPrimitiveAddCustomTrigger = forwardRef<\n McpManagerPrimitiveAddCustomTrigger.Element,\n McpManagerPrimitiveAddCustomTrigger.Props\n>((props, ref) => {\n return <Primitive.button {...props} type=\"button\" ref={ref} />;\n});\n\nMcpManagerPrimitiveAddCustomTrigger.displayName =\n \"McpManagerPrimitive.AddCustomTrigger\";\n"],"mappings":";;;;;AAYA,MAAaI,sCAAsCF,YAGjDM,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAC;CAAA,IAAAF,EAAA,OAAAF,SAAAE,EAAA,OAAAD,KAAA;EACOG,KAAA,oBAAA,UAAA,QAAA;GAAA,GAAsBJ;GAAY,MAAA;GAAcC;EAAG,CAAA;EAAIC,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAE;CAAA,OAAAA,KAAAF,EAAA;CAAA,OAAvDE;AAAuD,CAC/D;AAEDR,oCAAoCS,cAClC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpManagerRoot.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAuiState","McpManagerPrimitiveRoot","Element","div","Props","props","ref","$","_c","isHydrated","_temp","t0","undefined","t1","displayName","s","mcp"],"sources":["../../../src/primitives/manager/McpManagerRoot.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport namespace McpManagerPrimitiveRoot {\n export type Element = ComponentRef<typeof Primitive.div>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.div>;\n}\n\nexport const McpManagerPrimitiveRoot = forwardRef<\n McpManagerPrimitiveRoot.Element,\n McpManagerPrimitiveRoot.Props\n>((props, ref) => {\n const isHydrated = useAuiState((s) => s.mcp.isHydrated);\n return (\n <Primitive.div\n {...props}\n ref={ref}\n data-mcp-hydrated={isHydrated || undefined}\n />\n );\n});\n\nMcpManagerPrimitiveRoot.displayName = \"McpManagerPrimitive.Root\";\n"],"mappings":";;;;;;AAaA,MAAaK,0BAA0BH,YAGrCO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAMuB,MAAAG,KALJX,YAAYU,KAKRD,KAAAG,KAAAA;CAAuB,IAAAC;CAAA,IAAAN,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAI,IAAA;EAH5CE,KAAA,oBAAA,UAAA,KAAA;GAAA,GACMR;GACCC;GACc,qBAAAK;EAAuB,CAAA;EAC1CJ,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAI;EAAAJ,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OAJFM;AAIE,CAEL;AAEDZ,wBAAwBa,cAAc;AAXpC,SAAAJ,MAAAK,GAAA;CAAA,OACsCA,EAACC,IAAIP;AAAW"}
|
|
1
|
+
{"version":3,"file":"McpManagerRoot.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAuiState","McpManagerPrimitiveRoot","Element","div","Props","props","ref","$","_c","isHydrated","_temp","t0","undefined","t1","displayName","s","mcp","_c"],"sources":["../../../src/primitives/manager/McpManagerRoot.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport namespace McpManagerPrimitiveRoot {\n export type Element = ComponentRef<typeof Primitive.div>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.div>;\n}\n\nexport const McpManagerPrimitiveRoot = forwardRef<\n McpManagerPrimitiveRoot.Element,\n McpManagerPrimitiveRoot.Props\n>((props, ref) => {\n const isHydrated = useAuiState((s) => s.mcp.isHydrated);\n return (\n <Primitive.div\n {...props}\n ref={ref}\n data-mcp-hydrated={isHydrated || undefined}\n />\n );\n});\n\nMcpManagerPrimitiveRoot.displayName = \"McpManagerPrimitive.Root\";\n"],"mappings":";;;;;;AAaA,MAAaK,0BAA0BH,YAGrCO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAMuB,MAAAG,KALJX,YAAYU,KAKRD,KAAAG,KAAAA;CAAuB,IAAAC;CAAA,IAAAN,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAI,IAAA;EAH5CE,KAAA,oBAAA,UAAA,KAAA;GAAA,GACMR;GACCC;GACc,qBAAAK;EAAuB,CAAA;EAC1CJ,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAI;EAAAJ,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OAJFM;AAIE,CAEL;AAEDZ,wBAAwBa,cAAc;AAXpC,SAAAJ,MAAAK,GAAA;CAAA,OACsCA,EAACC,IAAIP;AAAW"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerConnectButton.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAui","useAuiState","McpServerPrimitiveConnectButton","Element","button","Props","CONNECTABLE","Set","props","ref","$","_c","state","_temp","aui","has","t0","undefined","t1","e","onClick","defaultPrevented","mcpServer","connect","t2","displayName","s","connectionState"],"sources":["../../../src/primitives/server/McpServerConnectButton.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAui, useAuiState } from \"@assistant-ui/store\";\n\nexport namespace McpServerPrimitiveConnectButton {\n export type Element = ComponentRef<typeof Primitive.button>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.button>;\n}\n\nconst CONNECTABLE = new Set([\"disconnected\", \"error\", \"authRequired\"]);\n\nexport const McpServerPrimitiveConnectButton = forwardRef<\n McpServerPrimitiveConnectButton.Element,\n McpServerPrimitiveConnectButton.Props\n>((props, ref) => {\n const state = useAuiState((s) => s.mcpServer.connectionState);\n const aui = useAui();\n if (!CONNECTABLE.has(state)) return null;\n return (\n <Primitive.button\n {...props}\n type=\"button\"\n ref={ref}\n data-state-hint={state === \"authRequired\" ? \"auth-required\" : undefined}\n onClick={(e) => {\n props.onClick?.(e);\n if (e.defaultPrevented) return;\n void aui.mcpServer.connect();\n }}\n />\n );\n});\n\nMcpServerPrimitiveConnectButton.displayName =\n \"McpServerPrimitive.ConnectButton\";\n"],"mappings":";;;;;;AAaA,MAAMU,8BAAc,IAAIC,IAAI;CAAC;CAAgB;CAAS;AAAc,CAAC;AAErE,MAAaL,kCAAkCJ,YAG7CU,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,QAAcX,YAAYY,KAAkC;CAC5D,MAAAC,MAAYd,OAAO;CACnB,IAAI,CAACM,YAAWS,IAAKH,KAAK,GAAC,OAAS;CAMf,MAAAI,KAAAJ,UAAU,iBAAV,kBAAAK,KAAAA;CAAsD,IAAAC;CAAA,IAAAR,EAAA,OAAAI,OAAAJ,EAAA,OAAAF,OAAA;EAC9DU,MAAAC,MAAA;GACPX,MAAKY,UAAWD,CAAC;GACjB,IAAIA,EAACE,kBAAiB;GACjBP,IAAGQ,UAAUC,QAAS;EAAC;EAC7Bb,EAAA,KAAAI;EAAAJ,EAAA,KAAAF;EAAAE,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,IAAAc;CAAA,IAAAd,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAM,MAAAN,EAAA,OAAAQ,IAAA;EATHM,KAAA,oBAAA,UAAA,QAAA;GAAA,GACMhB;GACC,MAAA;GACAC;GACY,mBAAAO;GACR,SAAAE;EAIR,CAAA;EACDR,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAM;EAAAN,EAAA,KAAAQ;EAAAR,EAAA,KAAAc;CAAA,OAAAA,KAAAd,EAAA;CAAA,OAVFc;AAUE,CAEL;AAEDtB,gCAAgCuB,cAC9B;AApBA,SAAAZ,MAAAa,GAAA;CAAA,OACiCA,EAACJ,UAAUK;AAAgB"}
|
|
1
|
+
{"version":3,"file":"McpServerConnectButton.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAui","useAuiState","McpServerPrimitiveConnectButton","Element","button","Props","CONNECTABLE","Set","props","ref","$","_c","state","_temp","aui","has","t0","undefined","t1","e","onClick","defaultPrevented","mcpServer","connect","t2","displayName","s","connectionState","_c"],"sources":["../../../src/primitives/server/McpServerConnectButton.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAui, useAuiState } from \"@assistant-ui/store\";\n\nexport namespace McpServerPrimitiveConnectButton {\n export type Element = ComponentRef<typeof Primitive.button>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.button>;\n}\n\nconst CONNECTABLE = new Set([\"disconnected\", \"error\", \"authRequired\"]);\n\nexport const McpServerPrimitiveConnectButton = forwardRef<\n McpServerPrimitiveConnectButton.Element,\n McpServerPrimitiveConnectButton.Props\n>((props, ref) => {\n const state = useAuiState((s) => s.mcpServer.connectionState);\n const aui = useAui();\n if (!CONNECTABLE.has(state)) return null;\n return (\n <Primitive.button\n {...props}\n type=\"button\"\n ref={ref}\n data-state-hint={state === \"authRequired\" ? \"auth-required\" : undefined}\n onClick={(e) => {\n props.onClick?.(e);\n if (e.defaultPrevented) return;\n void aui.mcpServer.connect();\n }}\n />\n );\n});\n\nMcpServerPrimitiveConnectButton.displayName =\n \"McpServerPrimitive.ConnectButton\";\n"],"mappings":";;;;;;AAaA,MAAMU,8BAAc,IAAIC,IAAI;CAAC;CAAgB;CAAS;AAAc,CAAC;AAErE,MAAaL,kCAAkCJ,YAG7CU,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,QAAcX,YAAYY,KAAkC;CAC5D,MAAAC,MAAYd,OAAO;CACnB,IAAI,CAACM,YAAWS,IAAKH,KAAK,GAAC,OAAS;CAMf,MAAAI,KAAAJ,UAAU,iBAAV,kBAAAK,KAAAA;CAAsD,IAAAC;CAAA,IAAAR,EAAA,OAAAI,OAAAJ,EAAA,OAAAF,OAAA;EAC9DU,MAAAC,MAAA;GACPX,MAAKY,UAAWD,CAAC;GACjB,IAAIA,EAACE,kBAAiB;GACjBP,IAAGQ,UAAUC,QAAS;EAAC;EAC7Bb,EAAA,KAAAI;EAAAJ,EAAA,KAAAF;EAAAE,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,IAAAc;CAAA,IAAAd,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAM,MAAAN,EAAA,OAAAQ,IAAA;EATHM,KAAA,oBAAA,UAAA,QAAA;GAAA,GACMhB;GACC,MAAA;GACAC;GACY,mBAAAO;GACR,SAAAE;EAIR,CAAA;EACDR,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAM;EAAAN,EAAA,KAAAQ;EAAAR,EAAA,KAAAc;CAAA,OAAAA,KAAAd,EAAA;CAAA,OAVFc;AAUE,CAEL;AAEDtB,gCAAgCuB,cAC9B;AApBA,SAAAZ,MAAAa,GAAA;CAAA,OACiCA,EAACJ,UAAUK;AAAgB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerDisconnectButton.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAui","useAuiState","McpServerPrimitiveDisconnectButton","Element","button","Props","DISCONNECTABLE","Set","props","ref","$","_c","state","_temp","aui","has","t0","e","onClick","defaultPrevented","mcpServer","disconnect","t1","displayName","s","connectionState"],"sources":["../../../src/primitives/server/McpServerDisconnectButton.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAui, useAuiState } from \"@assistant-ui/store\";\n\nexport namespace McpServerPrimitiveDisconnectButton {\n export type Element = ComponentRef<typeof Primitive.button>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.button>;\n}\n\nconst DISCONNECTABLE = new Set([\"connected\", \"connecting\", \"authPending\"]);\n\nexport const McpServerPrimitiveDisconnectButton = forwardRef<\n McpServerPrimitiveDisconnectButton.Element,\n McpServerPrimitiveDisconnectButton.Props\n>((props, ref) => {\n const state = useAuiState((s) => s.mcpServer.connectionState);\n const aui = useAui();\n if (!DISCONNECTABLE.has(state)) return null;\n return (\n <Primitive.button\n {...props}\n type=\"button\"\n ref={ref}\n onClick={(e) => {\n props.onClick?.(e);\n if (e.defaultPrevented) return;\n void aui.mcpServer.disconnect();\n }}\n />\n );\n});\n\nMcpServerPrimitiveDisconnectButton.displayName =\n \"McpServerPrimitive.DisconnectButton\";\n"],"mappings":";;;;;;AAaA,MAAMU,iCAAiB,IAAIC,IAAI;CAAC;CAAa;CAAc;AAAa,CAAC;AAEzE,MAAaL,qCAAqCJ,YAGhDU,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,QAAcX,YAAYY,KAAkC;CAC5D,MAAAC,MAAYd,OAAO;CACnB,IAAI,CAACM,eAAcS,IAAKH,KAAK,GAAC,OAAS;CAAK,IAAAI;CAAA,IAAAN,EAAA,OAAAI,OAAAJ,EAAA,OAAAF,OAAA;EAM/BQ,MAAAC,MAAA;GACPT,MAAKU,UAAWD,CAAC;GACjB,IAAIA,EAACE,kBAAiB;GACjBL,IAAGM,UAAUC,WAAY;EAAC;EAChCX,EAAA,KAAAI;EAAAJ,EAAA,KAAAF;EAAAE,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,IAAAY;CAAA,IAAAZ,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAM,IAAA;EARHM,KAAA,oBAAA,UAAA,QAAA;GAAA,GACMd;GACC,MAAA;GACAC;GACI,SAAAO;EAIR,CAAA;EACDN,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAM;EAAAN,EAAA,KAAAY;CAAA,OAAAA,KAAAZ,EAAA;CAAA,OATFY;AASE,CAEL;AAEDpB,mCAAmCqB,cACjC;AAnBA,SAAAV,MAAAW,GAAA;CAAA,OACiCA,EAACJ,UAAUK;AAAgB"}
|
|
1
|
+
{"version":3,"file":"McpServerDisconnectButton.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAui","useAuiState","McpServerPrimitiveDisconnectButton","Element","button","Props","DISCONNECTABLE","Set","props","ref","$","_c","state","_temp","aui","has","t0","e","onClick","defaultPrevented","mcpServer","disconnect","t1","displayName","s","connectionState","_c"],"sources":["../../../src/primitives/server/McpServerDisconnectButton.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAui, useAuiState } from \"@assistant-ui/store\";\n\nexport namespace McpServerPrimitiveDisconnectButton {\n export type Element = ComponentRef<typeof Primitive.button>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.button>;\n}\n\nconst DISCONNECTABLE = new Set([\"connected\", \"connecting\", \"authPending\"]);\n\nexport const McpServerPrimitiveDisconnectButton = forwardRef<\n McpServerPrimitiveDisconnectButton.Element,\n McpServerPrimitiveDisconnectButton.Props\n>((props, ref) => {\n const state = useAuiState((s) => s.mcpServer.connectionState);\n const aui = useAui();\n if (!DISCONNECTABLE.has(state)) return null;\n return (\n <Primitive.button\n {...props}\n type=\"button\"\n ref={ref}\n onClick={(e) => {\n props.onClick?.(e);\n if (e.defaultPrevented) return;\n void aui.mcpServer.disconnect();\n }}\n />\n );\n});\n\nMcpServerPrimitiveDisconnectButton.displayName =\n \"McpServerPrimitive.DisconnectButton\";\n"],"mappings":";;;;;;AAaA,MAAMU,iCAAiB,IAAIC,IAAI;CAAC;CAAa;CAAc;AAAa,CAAC;AAEzE,MAAaL,qCAAqCJ,YAGhDU,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,QAAcX,YAAYY,KAAkC;CAC5D,MAAAC,MAAYd,OAAO;CACnB,IAAI,CAACM,eAAcS,IAAKH,KAAK,GAAC,OAAS;CAAK,IAAAI;CAAA,IAAAN,EAAA,OAAAI,OAAAJ,EAAA,OAAAF,OAAA;EAM/BQ,MAAAC,MAAA;GACPT,MAAKU,UAAWD,CAAC;GACjB,IAAIA,EAACE,kBAAiB;GACjBL,IAAGM,UAAUC,WAAY;EAAC;EAChCX,EAAA,KAAAI;EAAAJ,EAAA,KAAAF;EAAAE,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,IAAAY;CAAA,IAAAZ,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAM,IAAA;EARHM,KAAA,oBAAA,UAAA,QAAA;GAAA,GACMd;GACC,MAAA;GACAC;GACI,SAAAO;EAIR,CAAA;EACDN,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAM;EAAAN,EAAA,KAAAY;CAAA,OAAAA,KAAAZ,EAAA;CAAA,OATFY;AASE,CAEL;AAEDpB,mCAAmCqB,cACjC;AAnBA,SAAAV,MAAAW,GAAA;CAAA,OACiCA,EAACJ,UAAUK;AAAgB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerError.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAuiState","McpServerPrimitiveError","Element","div","Props","props","ref","$","_c","message","_temp","t0","children","t1","displayName","s","mcpServer","lastError"],"sources":["../../../src/primitives/server/McpServerError.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport namespace McpServerPrimitiveError {\n export type Element = ComponentRef<typeof Primitive.div>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.div>;\n}\n\nexport const McpServerPrimitiveError = forwardRef<\n McpServerPrimitiveError.Element,\n McpServerPrimitiveError.Props\n>((props, ref) => {\n const message = useAuiState((s) => s.mcpServer.lastError?.message ?? null);\n if (message === null) return null;\n return (\n <Primitive.div {...props} ref={ref}>\n {props.children ?? message}\n </Primitive.div>\n );\n});\n\nMcpServerPrimitiveError.displayName = \"McpServerPrimitive.Error\";\n"],"mappings":";;;;;;AAaA,MAAaK,0BAA0BH,YAGrCO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,UAAgBT,YAAYU,KAA6C;CACzE,IAAID,YAAY,MAAI,OAAS;CAGxB,MAAAE,KAAAN,MAAKO,YAALH;CAAyB,IAAAI;CAAA,IAAAN,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAI,IAAA;EAD5BE,KAAA,oBAAA,UAAA,KAAA;GAAA,GAAmBR;GAAYC;GAC5BK,UAAAA;EACH,CAAA;EAAgBJ,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAI;EAAAJ,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OAFhBM;AAEgB,CAEnB;AAEDZ,wBAAwBa,cAAc;AAVpC,SAAAJ,MAAAK,GAAA;CAAA,OACmCA,EAACC,UAAUC,WAAmBR,WAA9B;AAAsC"}
|
|
1
|
+
{"version":3,"file":"McpServerError.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAuiState","McpServerPrimitiveError","Element","div","Props","props","ref","$","_c","message","_temp","t0","children","t1","displayName","s","mcpServer","lastError","_c"],"sources":["../../../src/primitives/server/McpServerError.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport namespace McpServerPrimitiveError {\n export type Element = ComponentRef<typeof Primitive.div>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.div>;\n}\n\nexport const McpServerPrimitiveError = forwardRef<\n McpServerPrimitiveError.Element,\n McpServerPrimitiveError.Props\n>((props, ref) => {\n const message = useAuiState((s) => s.mcpServer.lastError?.message ?? null);\n if (message === null) return null;\n return (\n <Primitive.div {...props} ref={ref}>\n {props.children ?? message}\n </Primitive.div>\n );\n});\n\nMcpServerPrimitiveError.displayName = \"McpServerPrimitive.Error\";\n"],"mappings":";;;;;;AAaA,MAAaK,0BAA0BH,YAGrCO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,UAAgBT,YAAYU,KAA6C;CACzE,IAAID,YAAY,MAAI,OAAS;CAGxB,MAAAE,KAAAN,MAAKO,YAALH;CAAyB,IAAAI;CAAA,IAAAN,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAI,IAAA;EAD5BE,KAAA,oBAAA,UAAA,KAAA;GAAA,GAAmBR;GAAYC;GAC5BK,UAAAA;EACH,CAAA;EAAgBJ,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAI;EAAAJ,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OAFhBM;AAEgB,CAEnB;AAEDZ,wBAAwBa,cAAc;AAVpC,SAAAJ,MAAAK,GAAA;CAAA,OACmCA,EAACC,UAAUC,WAAmBR,WAA9B;AAAsC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerIcon.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAuiState","McpServerPrimitiveIcon","Element","img","Props","Omit","src","alt","t0","ref","$","_c","props","iconUrl","_temp","name","_temp2","effective","t1","t2","displayName","s","mcpServer","icon","s_0"],"sources":["../../../src/primitives/server/McpServerIcon.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport namespace McpServerPrimitiveIcon {\n export type Element = ComponentRef<typeof Primitive.img>;\n export type Props = Omit<\n ComponentPropsWithoutRef<typeof Primitive.img>,\n \"src\" | \"alt\"\n > & {\n /** Override the icon URL. Defaults to the server's icon prop. */\n src?: string;\n alt?: string;\n };\n}\n\nexport const McpServerPrimitiveIcon = forwardRef<\n McpServerPrimitiveIcon.Element,\n McpServerPrimitiveIcon.Props\n>(({ src, alt, ...props }, ref) => {\n const iconUrl = useAuiState((s) => s.mcpServer.icon ?? null);\n const name = useAuiState((s) => s.mcpServer.name);\n const effective = src ?? iconUrl;\n if (!effective) return null;\n return (\n <Primitive.img {...props} ref={ref} src={effective} alt={alt ?? name} />\n );\n});\n\nMcpServerPrimitiveIcon.displayName = \"McpServerPrimitive.Icon\";\n"],"mappings":";;;;;;AAoBA,MAAaK,yBAAyBH,YAGpCU,IAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAN;CAAA,IAAAI,EAAA,OAAAF,IAAA;EAAC,CAAA,CAAAF,KAAAC,KAAA,GAAAK,SAAAJ;EAAsBE,EAAA,KAAAF;EAAAE,EAAA,KAAAH;EAAAG,EAAA,KAAAE;EAAAF,EAAA,KAAAJ;CAAA,OAAA;EAAAC,MAAAG,EAAA;EAAAE,QAAAF,EAAA;EAAAJ,MAAAI,EAAA;CAAA;CACvB,MAAAG,UAAgBb,YAAYc,KAA+B;CAC3D,MAAAC,OAAaf,YAAYgB,MAAuB;CAChD,MAAAC,YAAkBX,OAAAO;CAClB,IAAI,CAACI,WAAS,OAAS;CAEoC,MAAAC,KAAAX,OAAAQ;CAAW,IAAAI;CAAA,IAAAT,EAAA,OAAAO,aAAAP,EAAA,OAAAE,SAAAF,EAAA,OAAAD,OAAAC,EAAA,OAAAQ,IAAA;EAApEC,KAAA,oBAAA,UAAA,KAAA;GAAA,GAAmBP;GAAYH;GAAUQ,KAAAA;GAAgB,KAAAC;EAAW,CAAA;EAAIR,EAAA,KAAAO;EAAAP,EAAA,KAAAE;EAAAF,EAAA,KAAAD;EAAAC,EAAA,KAAAQ;EAAAR,EAAA,KAAAS;CAAA,OAAAA,KAAAT,EAAA;CAAA,OAAxES;AAAwE,CAE3E;AAEDlB,uBAAuBmB,cAAc;AAVnC,SAAAN,MAAAO,GAAA;CAAA,OACmCA,EAACC,UAAUC,QAAX;AAAwB;AAD3D,SAAAP,OAAAQ,KAAA;CAAA,OAEgCH,IAACC,UAAUP;AAAK"}
|
|
1
|
+
{"version":3,"file":"McpServerIcon.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAuiState","McpServerPrimitiveIcon","Element","img","Props","Omit","src","alt","t0","ref","$","_c","props","iconUrl","_temp","name","_temp2","effective","t1","t2","displayName","s","mcpServer","icon","s_0","_c"],"sources":["../../../src/primitives/server/McpServerIcon.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport namespace McpServerPrimitiveIcon {\n export type Element = ComponentRef<typeof Primitive.img>;\n export type Props = Omit<\n ComponentPropsWithoutRef<typeof Primitive.img>,\n \"src\" | \"alt\"\n > & {\n /** Override the icon URL. Defaults to the server's icon prop. */\n src?: string;\n alt?: string;\n };\n}\n\nexport const McpServerPrimitiveIcon = forwardRef<\n McpServerPrimitiveIcon.Element,\n McpServerPrimitiveIcon.Props\n>(({ src, alt, ...props }, ref) => {\n const iconUrl = useAuiState((s) => s.mcpServer.icon ?? null);\n const name = useAuiState((s) => s.mcpServer.name);\n const effective = src ?? iconUrl;\n if (!effective) return null;\n return (\n <Primitive.img {...props} ref={ref} src={effective} alt={alt ?? name} />\n );\n});\n\nMcpServerPrimitiveIcon.displayName = \"McpServerPrimitive.Icon\";\n"],"mappings":";;;;;;AAoBA,MAAaK,yBAAyBH,YAGpCU,IAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAN;CAAA,IAAAI,EAAA,OAAAF,IAAA;EAAC,CAAA,CAAAF,KAAAC,KAAA,GAAAK,SAAAJ;EAAsBE,EAAA,KAAAF;EAAAE,EAAA,KAAAH;EAAAG,EAAA,KAAAE;EAAAF,EAAA,KAAAJ;CAAA,OAAA;EAAAC,MAAAG,EAAA;EAAAE,QAAAF,EAAA;EAAAJ,MAAAI,EAAA;CAAA;CACvB,MAAAG,UAAgBb,YAAYc,KAA+B;CAC3D,MAAAC,OAAaf,YAAYgB,MAAuB;CAChD,MAAAC,YAAkBX,OAAAO;CAClB,IAAI,CAACI,WAAS,OAAS;CAEoC,MAAAC,KAAAX,OAAAQ;CAAW,IAAAI;CAAA,IAAAT,EAAA,OAAAO,aAAAP,EAAA,OAAAE,SAAAF,EAAA,OAAAD,OAAAC,EAAA,OAAAQ,IAAA;EAApEC,KAAA,oBAAA,UAAA,KAAA;GAAA,GAAmBP;GAAYH;GAAUQ,KAAAA;GAAgB,KAAAC;EAAW,CAAA;EAAIR,EAAA,KAAAO;EAAAP,EAAA,KAAAE;EAAAF,EAAA,KAAAD;EAAAC,EAAA,KAAAQ;EAAAR,EAAA,KAAAS;CAAA,OAAAA,KAAAT,EAAA;CAAA,OAAxES;AAAwE,CAE3E;AAEDlB,uBAAuBmB,cAAc;AAVnC,SAAAN,MAAAO,GAAA;CAAA,OACmCA,EAACC,UAAUC,QAAX;AAAwB;AAD3D,SAAAP,OAAAQ,KAAA;CAAA,OAEgCH,IAACC,UAAUP;AAAK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerName.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAuiState","McpServerPrimitiveName","Element","span","Props","props","ref","$","_c","name","_temp","t0","children","t1","displayName","s","mcpServer"],"sources":["../../../src/primitives/server/McpServerName.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport namespace McpServerPrimitiveName {\n export type Element = ComponentRef<typeof Primitive.span>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.span>;\n}\n\nexport const McpServerPrimitiveName = forwardRef<\n McpServerPrimitiveName.Element,\n McpServerPrimitiveName.Props\n>((props, ref) => {\n const name = useAuiState((s) => s.mcpServer.name);\n return (\n <Primitive.span {...props} ref={ref}>\n {props.children ?? name}\n </Primitive.span>\n );\n});\n\nMcpServerPrimitiveName.displayName = \"McpServerPrimitive.Name\";\n"],"mappings":";;;;;;AAaA,MAAaK,yBAAyBH,YAGpCO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,OAAaT,YAAYU,KAAuB;CAG3C,MAAAC,KAAAN,MAAKO,YAALH;CAAsB,IAAAI;CAAA,IAAAN,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAI,IAAA;EADzBE,KAAA,oBAAA,UAAA,MAAA;GAAA,GAAoBR;GAAYC;GAC7BK,UAAAA;EACH,CAAA;EAAiBJ,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAI;EAAAJ,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OAFjBM;AAEiB,CAEpB;AAEDZ,uBAAuBa,cAAc;AATnC,SAAAJ,MAAAK,GAAA;CAAA,OACgCA,EAACC,UAAUP;AAAK"}
|
|
1
|
+
{"version":3,"file":"McpServerName.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAuiState","McpServerPrimitiveName","Element","span","Props","props","ref","$","_c","name","_temp","t0","children","t1","displayName","s","mcpServer","_c"],"sources":["../../../src/primitives/server/McpServerName.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport namespace McpServerPrimitiveName {\n export type Element = ComponentRef<typeof Primitive.span>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.span>;\n}\n\nexport const McpServerPrimitiveName = forwardRef<\n McpServerPrimitiveName.Element,\n McpServerPrimitiveName.Props\n>((props, ref) => {\n const name = useAuiState((s) => s.mcpServer.name);\n return (\n <Primitive.span {...props} ref={ref}>\n {props.children ?? name}\n </Primitive.span>\n );\n});\n\nMcpServerPrimitiveName.displayName = \"McpServerPrimitive.Name\";\n"],"mappings":";;;;;;AAaA,MAAaK,yBAAyBH,YAGpCO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,OAAaT,YAAYU,KAAuB;CAG3C,MAAAC,KAAAN,MAAKO,YAALH;CAAsB,IAAAI;CAAA,IAAAN,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAI,IAAA;EADzBE,KAAA,oBAAA,UAAA,MAAA;GAAA,GAAoBR;GAAYC;GAC7BK,UAAAA;EACH,CAAA;EAAiBJ,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAI;EAAAJ,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OAFjBM;AAEiB,CAEpB;AAEDZ,uBAAuBa,cAAc;AATnC,SAAAJ,MAAAK,GAAA;CAAA,OACgCA,EAACC,UAAUP;AAAK"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerOAuthLink.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAuiState","McpServerPrimitiveOAuthLink","Element","a","Props","Omit","href","t0","ref","$","_c","props","url","_temp","effective","t1","rel","t2","displayName","s","mcpServer","authorizationUrl"],"sources":["../../../src/primitives/server/McpServerOAuthLink.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport namespace McpServerPrimitiveOAuthLink {\n export type Element = ComponentRef<typeof Primitive.a>;\n export type Props = Omit<\n ComponentPropsWithoutRef<typeof Primitive.a>,\n \"href\"\n > & {\n /** Optional href override; defaults to the server's authorizationUrl. */\n href?: string;\n };\n}\n\nexport const McpServerPrimitiveOAuthLink = forwardRef<\n McpServerPrimitiveOAuthLink.Element,\n McpServerPrimitiveOAuthLink.Props\n>(({ href, ...props }, ref) => {\n const url = useAuiState((s) => s.mcpServer.authorizationUrl);\n const effective = href ?? url;\n if (!effective) return null;\n return (\n <Primitive.a\n target=\"_blank\"\n {...props}\n ref={ref}\n href={effective}\n rel={props.rel ?? \"noopener noreferrer\"}\n />\n );\n});\n\nMcpServerPrimitiveOAuthLink.displayName = \"McpServerPrimitive.OAuthLink\";\n"],"mappings":";;;;;;AAmBA,MAAaK,8BAA8BH,YAGzCS,IAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAF,IAAA;EAAC,CAAA,CAAAD,MAAA,GAAAK,SAAAJ;EAAkBE,EAAA,KAAAF;EAAAE,EAAA,KAAAH;EAAAG,EAAA,KAAAE;CAAA,OAAA;EAAAL,OAAAG,EAAA;EAAAE,QAAAF,EAAA;CAAA;CACnB,MAAAG,MAAYZ,YAAYa,KAAmC;CAC3D,MAAAC,YAAkBR,QAAAM;CAClB,IAAI,CAACE,WAAS,OAAS;CAOd,MAAAC,KAAAJ,MAAKK,OAAL;CAAkC,IAAAC;CAAA,IAAAR,EAAA,OAAAK,aAAAL,EAAA,OAAAE,SAAAF,EAAA,OAAAD,OAAAC,EAAA,OAAAM,IAAA;EALzCE,KAAA,oBAAA,UAAA,GAAA;GACS,QAAA;GAAQ,GACXN;GACCH;GACCM,MAAAA;GACD,KAAAC;EAAkC,CAAA;EACvCN,EAAA,KAAAK;EAAAL,EAAA,KAAAE;EAAAF,EAAA,KAAAD;EAAAC,EAAA,KAAAM;EAAAN,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,OANFQ;AAME,CAEL;AAEDhB,4BAA4BiB,cAAc;AAfxC,SAAAL,MAAAM,GAAA;CAAA,OAC+BA,EAACC,UAAUC;AAAiB"}
|
|
1
|
+
{"version":3,"file":"McpServerOAuthLink.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAuiState","McpServerPrimitiveOAuthLink","Element","a","Props","Omit","href","t0","ref","$","_c","props","url","_temp","effective","t1","rel","t2","displayName","s","mcpServer","authorizationUrl","_c"],"sources":["../../../src/primitives/server/McpServerOAuthLink.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport namespace McpServerPrimitiveOAuthLink {\n export type Element = ComponentRef<typeof Primitive.a>;\n export type Props = Omit<\n ComponentPropsWithoutRef<typeof Primitive.a>,\n \"href\"\n > & {\n /** Optional href override; defaults to the server's authorizationUrl. */\n href?: string;\n };\n}\n\nexport const McpServerPrimitiveOAuthLink = forwardRef<\n McpServerPrimitiveOAuthLink.Element,\n McpServerPrimitiveOAuthLink.Props\n>(({ href, ...props }, ref) => {\n const url = useAuiState((s) => s.mcpServer.authorizationUrl);\n const effective = href ?? url;\n if (!effective) return null;\n return (\n <Primitive.a\n target=\"_blank\"\n {...props}\n ref={ref}\n href={effective}\n rel={props.rel ?? \"noopener noreferrer\"}\n />\n );\n});\n\nMcpServerPrimitiveOAuthLink.displayName = \"McpServerPrimitive.OAuthLink\";\n"],"mappings":";;;;;;AAmBA,MAAaK,8BAA8BH,YAGzCS,IAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAA,IAAAJ;CAAA,IAAAK;CAAA,IAAAF,EAAA,OAAAF,IAAA;EAAC,CAAA,CAAAD,MAAA,GAAAK,SAAAJ;EAAkBE,EAAA,KAAAF;EAAAE,EAAA,KAAAH;EAAAG,EAAA,KAAAE;CAAA,OAAA;EAAAL,OAAAG,EAAA;EAAAE,QAAAF,EAAA;CAAA;CACnB,MAAAG,MAAYZ,YAAYa,KAAmC;CAC3D,MAAAC,YAAkBR,QAAAM;CAClB,IAAI,CAACE,WAAS,OAAS;CAOd,MAAAC,KAAAJ,MAAKK,OAAL;CAAkC,IAAAC;CAAA,IAAAR,EAAA,OAAAK,aAAAL,EAAA,OAAAE,SAAAF,EAAA,OAAAD,OAAAC,EAAA,OAAAM,IAAA;EALzCE,KAAA,oBAAA,UAAA,GAAA;GACS,QAAA;GAAQ,GACXN;GACCH;GACCM,MAAAA;GACD,KAAAC;EAAkC,CAAA;EACvCN,EAAA,KAAAK;EAAAL,EAAA,KAAAE;EAAAF,EAAA,KAAAD;EAAAC,EAAA,KAAAM;EAAAN,EAAA,KAAAQ;CAAA,OAAAA,KAAAR,EAAA;CAAA,OANFQ;AAME,CAEL;AAEDhB,4BAA4BiB,cAAc;AAfxC,SAAAL,MAAAM,GAAA;CAAA,OAC+BA,EAACC,UAAUC;AAAiB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerRemoveButton.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAui","useAuiState","McpServerPrimitiveRemoveButton","Element","button","Props","props","ref","$","_c","kind","_temp","aui","t0","e","onClick","defaultPrevented","mcpServer","remove","catch","_temp2","t1","displayName","s"],"sources":["../../../src/primitives/server/McpServerRemoveButton.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAui, useAuiState } from \"@assistant-ui/store\";\n\nexport namespace McpServerPrimitiveRemoveButton {\n export type Element = ComponentRef<typeof Primitive.button>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.button>;\n}\n\nexport const McpServerPrimitiveRemoveButton = forwardRef<\n McpServerPrimitiveRemoveButton.Element,\n McpServerPrimitiveRemoveButton.Props\n>((props, ref) => {\n const kind = useAuiState((s) => s.mcpServer.kind);\n const aui = useAui();\n if (kind !== \"custom\") return null;\n return (\n <Primitive.button\n {...props}\n type=\"button\"\n ref={ref}\n onClick={(e) => {\n props.onClick?.(e);\n if (e.defaultPrevented) return;\n void aui.mcpServer.remove().catch(() => undefined);\n }}\n />\n );\n});\n\nMcpServerPrimitiveRemoveButton.displayName = \"McpServerPrimitive.RemoveButton\";\n"],"mappings":";;;;;;AAaA,MAAaM,iCAAiCJ,YAG5CQ,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,OAAaT,YAAYU,KAAuB;CAChD,MAAAC,MAAYZ,OAAO;CACnB,IAAIU,SAAS,UAAQ,OAAS;CAAK,IAAAG;CAAA,IAAAL,EAAA,OAAAI,OAAAJ,EAAA,OAAAF,OAAA;EAMtBO,MAAAC,MAAA;GACPR,MAAKS,UAAWD,CAAC;GACjB,IAAIA,EAACE,kBAAiB;GACjBJ,IAAGK,UAAUC,OAAQ,CAAC,CAAAC,MAAOC,MAAe;EAAC;EACnDZ,EAAA,KAAAI;EAAAJ,EAAA,KAAAF;EAAAE,EAAA,KAAAK;CAAA,OAAAA,KAAAL,EAAA;CAAA,IAAAa;CAAA,IAAAb,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAK,IAAA;EARHQ,KAAA,oBAAA,UAAA,QAAA;GAAA,GACMf;GACC,MAAA;GACAC;GACI,SAAAM;EAIR,CAAA;EACDL,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAK;EAAAL,EAAA,KAAAa;CAAA,OAAAA,KAAAb,EAAA;CAAA,OATFa;AASE,CAEL;AAEDnB,+BAA+BoB,cAAc;AAlB3C,SAAAX,MAAAY,GAAA;CAAA,OACgCA,EAACN,UAAUP;AAAK;AADhD,SAAAU,SAAA,CAAA"}
|
|
1
|
+
{"version":3,"file":"McpServerRemoveButton.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAui","useAuiState","McpServerPrimitiveRemoveButton","Element","button","Props","props","ref","$","_c","kind","_temp","aui","t0","e","onClick","defaultPrevented","mcpServer","remove","catch","_temp2","t1","displayName","s","_c"],"sources":["../../../src/primitives/server/McpServerRemoveButton.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAui, useAuiState } from \"@assistant-ui/store\";\n\nexport namespace McpServerPrimitiveRemoveButton {\n export type Element = ComponentRef<typeof Primitive.button>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.button>;\n}\n\nexport const McpServerPrimitiveRemoveButton = forwardRef<\n McpServerPrimitiveRemoveButton.Element,\n McpServerPrimitiveRemoveButton.Props\n>((props, ref) => {\n const kind = useAuiState((s) => s.mcpServer.kind);\n const aui = useAui();\n if (kind !== \"custom\") return null;\n return (\n <Primitive.button\n {...props}\n type=\"button\"\n ref={ref}\n onClick={(e) => {\n props.onClick?.(e);\n if (e.defaultPrevented) return;\n void aui.mcpServer.remove().catch(() => undefined);\n }}\n />\n );\n});\n\nMcpServerPrimitiveRemoveButton.displayName = \"McpServerPrimitive.RemoveButton\";\n"],"mappings":";;;;;;AAaA,MAAaM,iCAAiCJ,YAG5CQ,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,OAAaT,YAAYU,KAAuB;CAChD,MAAAC,MAAYZ,OAAO;CACnB,IAAIU,SAAS,UAAQ,OAAS;CAAK,IAAAG;CAAA,IAAAL,EAAA,OAAAI,OAAAJ,EAAA,OAAAF,OAAA;EAMtBO,MAAAC,MAAA;GACPR,MAAKS,UAAWD,CAAC;GACjB,IAAIA,EAACE,kBAAiB;GACjBJ,IAAGK,UAAUC,OAAQ,CAAC,CAAAC,MAAOC,MAAe;EAAC;EACnDZ,EAAA,KAAAI;EAAAJ,EAAA,KAAAF;EAAAE,EAAA,KAAAK;CAAA,OAAAA,KAAAL,EAAA;CAAA,IAAAa;CAAA,IAAAb,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAK,IAAA;EARHQ,KAAA,oBAAA,UAAA,QAAA;GAAA,GACMf;GACC,MAAA;GACAC;GACI,SAAAM;EAIR,CAAA;EACDL,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAK;EAAAL,EAAA,KAAAa;CAAA,OAAAA,KAAAb,EAAA;CAAA,OATFa;AASE,CAEL;AAEDnB,+BAA+BoB,cAAc;AAlB3C,SAAAX,MAAAY,GAAA;CAAA,OACgCA,EAACN,UAAUP;AAAK;AADhD,SAAAU,SAAA,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerRoot.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAuiState","McpServerPrimitiveRoot","Element","div","Props","props","ref","$","_c","id","_temp","kind","_temp2","connectionState","_temp3","hasError","_temp4","t0","undefined","t1","displayName","s","mcpServer","s_0","s_1","s_2","lastError"],"sources":["../../../src/primitives/server/McpServerRoot.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport namespace McpServerPrimitiveRoot {\n export type Element = ComponentRef<typeof Primitive.div>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.div>;\n}\n\nexport const McpServerPrimitiveRoot = forwardRef<\n McpServerPrimitiveRoot.Element,\n McpServerPrimitiveRoot.Props\n>((props, ref) => {\n const id = useAuiState((s) => s.mcpServer.id);\n const kind = useAuiState((s) => s.mcpServer.kind);\n const connectionState = useAuiState((s) => s.mcpServer.connectionState);\n const hasError = useAuiState((s) => s.mcpServer.lastError !== null);\n\n return (\n <Primitive.div\n {...props}\n ref={ref}\n data-server-id={id}\n data-kind={kind}\n data-connection-state={connectionState}\n data-has-error={hasError || undefined}\n />\n );\n});\n\nMcpServerPrimitiveRoot.displayName = \"McpServerPrimitive.Root\";\n"],"mappings":";;;;;;AAaA,MAAaK,yBAAyBH,YAGpCO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,KAAWT,YAAYU,KAAqB;CAC5C,MAAAC,OAAaX,YAAYY,MAAuB;CAChD,MAAAC,kBAAwBb,YAAYc,MAAkC;CAUlD,MAAAG,KATHjB,YAAYgB,MASTD,KAAAG,KAAAA;CAAqB,IAAAC;CAAA,IAAAZ,EAAA,OAAAM,mBAAAN,EAAA,OAAAE,MAAAF,EAAA,OAAAI,QAAAJ,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAU,IAAA;EANvCE,KAAA,oBAAA,UAAA,KAAA;GAAA,GACMd;GACCC;GACWG,kBAAAA;GACLE,aAAAA;GACYE,yBAAAA;GACP,kBAAAI;EAAqB,CAAA;EACrCV,EAAA,KAAAM;EAAAN,EAAA,KAAAE;EAAAF,EAAA,KAAAI;EAAAJ,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAU;EAAAV,EAAA,KAAAY;CAAA,OAAAA,KAAAZ,EAAA;CAAA,OAPFY;AAOE,CAEL;AAEDlB,uBAAuBmB,cAAc;AAlBnC,SAAAV,MAAAW,GAAA;CAAA,OAC8BA,EAACC,UAAUb;AAAG;AAD5C,SAAAG,OAAAW,KAAA;CAAA,OAEgCF,IAACC,UAAUX;AAAK;AAFhD,SAAAG,OAAAU,KAAA;CAAA,OAG2CH,IAACC,UAAUT;AAAgB;AAHtE,SAAAG,OAAAS,KAAA;CAAA,OAIoCJ,IAACC,UAAUI,cAAe;AAAI"}
|
|
1
|
+
{"version":3,"file":"McpServerRoot.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAuiState","McpServerPrimitiveRoot","Element","div","Props","props","ref","$","_c","id","_temp","kind","_temp2","connectionState","_temp3","hasError","_temp4","t0","undefined","t1","displayName","s","mcpServer","s_0","s_1","s_2","lastError","_c"],"sources":["../../../src/primitives/server/McpServerRoot.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport namespace McpServerPrimitiveRoot {\n export type Element = ComponentRef<typeof Primitive.div>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.div>;\n}\n\nexport const McpServerPrimitiveRoot = forwardRef<\n McpServerPrimitiveRoot.Element,\n McpServerPrimitiveRoot.Props\n>((props, ref) => {\n const id = useAuiState((s) => s.mcpServer.id);\n const kind = useAuiState((s) => s.mcpServer.kind);\n const connectionState = useAuiState((s) => s.mcpServer.connectionState);\n const hasError = useAuiState((s) => s.mcpServer.lastError !== null);\n\n return (\n <Primitive.div\n {...props}\n ref={ref}\n data-server-id={id}\n data-kind={kind}\n data-connection-state={connectionState}\n data-has-error={hasError || undefined}\n />\n );\n});\n\nMcpServerPrimitiveRoot.displayName = \"McpServerPrimitive.Root\";\n"],"mappings":";;;;;;AAaA,MAAaK,yBAAyBH,YAGpCO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,KAAWT,YAAYU,KAAqB;CAC5C,MAAAC,OAAaX,YAAYY,MAAuB;CAChD,MAAAC,kBAAwBb,YAAYc,MAAkC;CAUlD,MAAAG,KATHjB,YAAYgB,MASTD,KAAAG,KAAAA;CAAqB,IAAAC;CAAA,IAAAZ,EAAA,OAAAM,mBAAAN,EAAA,OAAAE,MAAAF,EAAA,OAAAI,QAAAJ,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAU,IAAA;EANvCE,KAAA,oBAAA,UAAA,KAAA;GAAA,GACMd;GACCC;GACWG,kBAAAA;GACLE,aAAAA;GACYE,yBAAAA;GACP,kBAAAI;EAAqB,CAAA;EACrCV,EAAA,KAAAM;EAAAN,EAAA,KAAAE;EAAAF,EAAA,KAAAI;EAAAJ,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAU;EAAAV,EAAA,KAAAY;CAAA,OAAAA,KAAAZ,EAAA;CAAA,OAPFY;AAOE,CAEL;AAEDlB,uBAAuBmB,cAAc;AAlBnC,SAAAV,MAAAW,GAAA;CAAA,OAC8BA,EAACC,UAAUb;AAAG;AAD5C,SAAAG,OAAAW,KAAA;CAAA,OAEgCF,IAACC,UAAUX;AAAK;AAFhD,SAAAG,OAAAU,KAAA;CAAA,OAG2CH,IAACC,UAAUT;AAAgB;AAHtE,SAAAG,OAAAS,KAAA;CAAA,OAIoCJ,IAACC,UAAUI,cAAe;AAAI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerStatus.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAuiState","McpServerPrimitiveStatus","Element","span","Props","props","ref","$","_c","state","_temp","t0","children","t1","displayName","s","mcpServer","connectionState"],"sources":["../../../src/primitives/server/McpServerStatus.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport namespace McpServerPrimitiveStatus {\n export type Element = ComponentRef<typeof Primitive.span>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.span>;\n}\n\nexport const McpServerPrimitiveStatus = forwardRef<\n McpServerPrimitiveStatus.Element,\n McpServerPrimitiveStatus.Props\n>((props, ref) => {\n const state = useAuiState((s) => s.mcpServer.connectionState);\n return (\n <Primitive.span {...props} ref={ref} data-state={state}>\n {props.children ?? state}\n </Primitive.span>\n );\n});\n\nMcpServerPrimitiveStatus.displayName = \"McpServerPrimitive.Status\";\n"],"mappings":";;;;;;AAaA,MAAaK,2BAA2BH,YAGtCO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,QAAcT,YAAYU,KAAkC;CAGvD,MAAAC,KAAAN,MAAKO,YAALH;CAAuB,IAAAI;CAAA,IAAAN,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAE,SAAAF,EAAA,OAAAI,IAAA;EAD1BE,KAAA,oBAAA,UAAA,MAAA;GAAA,GAAoBR;GAAYC;GAAiBG,cAAAA;GAC9CE,UAAAA;EACH,CAAA;EAAiBJ,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAE;EAAAF,EAAA,KAAAI;EAAAJ,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OAFjBM;AAEiB,CAEpB;AAEDZ,yBAAyBa,cAAc;AATrC,SAAAJ,MAAAK,GAAA;CAAA,OACiCA,EAACC,UAAUC;AAAgB"}
|
|
1
|
+
{"version":3,"file":"McpServerStatus.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useAuiState","McpServerPrimitiveStatus","Element","span","Props","props","ref","$","_c","state","_temp","t0","children","t1","displayName","s","mcpServer","connectionState","_c"],"sources":["../../../src/primitives/server/McpServerStatus.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useAuiState } from \"@assistant-ui/store\";\n\nexport namespace McpServerPrimitiveStatus {\n export type Element = ComponentRef<typeof Primitive.span>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.span>;\n}\n\nexport const McpServerPrimitiveStatus = forwardRef<\n McpServerPrimitiveStatus.Element,\n McpServerPrimitiveStatus.Props\n>((props, ref) => {\n const state = useAuiState((s) => s.mcpServer.connectionState);\n return (\n <Primitive.span {...props} ref={ref} data-state={state}>\n {props.children ?? state}\n </Primitive.span>\n );\n});\n\nMcpServerPrimitiveStatus.displayName = \"McpServerPrimitive.Status\";\n"],"mappings":";;;;;;AAaA,MAAaK,2BAA2BH,YAGtCO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,QAAcT,YAAYU,KAAkC;CAGvD,MAAAC,KAAAN,MAAKO,YAALH;CAAuB,IAAAI;CAAA,IAAAN,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAE,SAAAF,EAAA,OAAAI,IAAA;EAD1BE,KAAA,oBAAA,UAAA,MAAA;GAAA,GAAoBR;GAAYC;GAAiBG,cAAAA;GAC9CE,UAAAA;EACH,CAAA;EAAiBJ,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAE;EAAAF,EAAA,KAAAI;EAAAJ,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OAFjBM;AAEiB,CAEpB;AAEDZ,yBAAyBa,cAAc;AATrC,SAAAJ,MAAAK,GAAA;CAAA,OACiCA,EAACC,UAAUC;AAAgB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerToolName.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useMcpServerTool","McpServerPrimitiveToolName","Element","span","Props","props","ref","$","_c","tool","t0","children","name","t1","displayName"],"sources":["../../../src/primitives/server/McpServerToolName.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useMcpServerTool } from \"./McpServerTools\";\n\nexport namespace McpServerPrimitiveToolName {\n export type Element = ComponentRef<typeof Primitive.span>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.span>;\n}\n\nexport const McpServerPrimitiveToolName = forwardRef<\n McpServerPrimitiveToolName.Element,\n McpServerPrimitiveToolName.Props\n>((props, ref) => {\n const tool = useMcpServerTool();\n return (\n <Primitive.span {...props} ref={ref} data-tool-name={tool.name}>\n {props.children ?? tool.name}\n </Primitive.span>\n );\n});\n\nMcpServerPrimitiveToolName.displayName = \"McpServerPrimitive.ToolName\";\n"],"mappings":";;;;;;AAaA,MAAaK,6BAA6BH,YAGxCO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,OAAaT,iBAAiB;CAGzB,MAAAU,KAAAL,MAAKM,YAAaF,KAAIG;CAAK,IAAAC;CAAA,IAAAN,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAG,MAAAH,EAAA,OAAAE,KAAAG,MAAA;EAD9BC,KAAA,oBAAA,UAAA,MAAA;GAAA,GAAoBR;GAAYC;GAAqB,kBAAAG,KAAIG;GACtDF,UAAAA;EACH,CAAA;EAAiBH,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAG;EAAAH,EAAA,KAAAE,KAAAG;EAAAL,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OAFjBM;AAEiB,CAEpB;AAEDZ,2BAA2Ba,cAAc"}
|
|
1
|
+
{"version":3,"file":"McpServerToolName.js","names":["ComponentPropsWithoutRef","ComponentRef","forwardRef","Primitive","useMcpServerTool","McpServerPrimitiveToolName","Element","span","Props","props","ref","$","_c","tool","t0","children","name","t1","displayName","_c"],"sources":["../../../src/primitives/server/McpServerToolName.tsx"],"sourcesContent":["import {\n type ComponentPropsWithoutRef,\n type ComponentRef,\n forwardRef,\n} from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useMcpServerTool } from \"./McpServerTools\";\n\nexport namespace McpServerPrimitiveToolName {\n export type Element = ComponentRef<typeof Primitive.span>;\n export type Props = ComponentPropsWithoutRef<typeof Primitive.span>;\n}\n\nexport const McpServerPrimitiveToolName = forwardRef<\n McpServerPrimitiveToolName.Element,\n McpServerPrimitiveToolName.Props\n>((props, ref) => {\n const tool = useMcpServerTool();\n return (\n <Primitive.span {...props} ref={ref} data-tool-name={tool.name}>\n {props.children ?? tool.name}\n </Primitive.span>\n );\n});\n\nMcpServerPrimitiveToolName.displayName = \"McpServerPrimitive.ToolName\";\n"],"mappings":";;;;;;AAaA,MAAaK,6BAA6BH,YAGxCO,OAAAC,QAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CACA,MAAAC,OAAaT,iBAAiB;CAGzB,MAAAU,KAAAL,MAAKM,YAAaF,KAAIG;CAAK,IAAAC;CAAA,IAAAN,EAAA,OAAAF,SAAAE,EAAA,OAAAD,OAAAC,EAAA,OAAAG,MAAAH,EAAA,OAAAE,KAAAG,MAAA;EAD9BC,KAAA,oBAAA,UAAA,MAAA;GAAA,GAAoBR;GAAYC;GAAqB,kBAAAG,KAAIG;GACtDF,UAAAA;EACH,CAAA;EAAiBH,EAAA,KAAAF;EAAAE,EAAA,KAAAD;EAAAC,EAAA,KAAAG;EAAAH,EAAA,KAAAE,KAAAG;EAAAL,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OAFjBM;AAEiB,CAEpB;AAEDZ,2BAA2Ba,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"McpServerTools.js","names":["FC","ReactNode","createContext","useContext","useAuiState","MCPToolInfo","ToolContext","useMcpServerTool","tool","Error","McpServerPrimitiveTools","Props","children","t0","$","_c","tools","_temp","length","t1","t2","name","map","displayName","s","mcpServer"],"sources":["../../../src/primitives/server/McpServerTools.tsx"],"sourcesContent":["import { type FC, type ReactNode, createContext, useContext } from \"react\";\nimport { useAuiState } from \"@assistant-ui/store\";\nimport type { MCPToolInfo } from \"../../mcp-scope\";\n\nconst ToolContext = createContext<MCPToolInfo | null>(null);\n\nexport const useMcpServerTool = (): MCPToolInfo => {\n const tool = useContext(ToolContext);\n if (!tool) {\n throw new Error(\n \"useMcpServerTool must be used inside <McpServerPrimitive.Tools>\",\n );\n }\n return tool;\n};\n\nexport namespace McpServerPrimitiveTools {\n export type Props = {\n children: ReactNode | ((tool: MCPToolInfo) => ReactNode);\n };\n}\n\nexport const McpServerPrimitiveTools: FC<McpServerPrimitiveTools.Props> = ({\n children,\n}) => {\n const tools = useAuiState((s) => s.mcpServer.tools);\n if (tools.length === 0) return null;\n return (\n <>\n {tools.map((tool) => (\n <ToolContext.Provider key={tool.name} value={tool}>\n {typeof children === \"function\" ? children(tool) : children}\n </ToolContext.Provider>\n ))}\n </>\n );\n};\n\nMcpServerPrimitiveTools.displayName = \"McpServerPrimitive.Tools\";\n"],"mappings":";;;;;AAIA,MAAMM,cAAcJ,cAAkC,IAAI;AAE1D,MAAaK,yBAAmB;CAC9B,MAAAC,OAAaL,WAAWG,WAAW;CACnC,IAAI,CAACE,MACH,MAAM,IAAIC,MACR,iEACF;CACD,OACMD;AAAI;AASb,MAAaE,2BAA6DG,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAC,MAAA,EAAAH,aAAAC;CAGzE,MAAAG,QAAcZ,YAAYa,KAAwB;CAClD,IAAID,MAAKE,WAAY,GAAC,OAAS;CAAK,IAAAC;CAAA,IAAAL,EAAA,OAAAF,YAAAE,EAAA,OAAAE,OAAA;EAAA,IAAAI;EAAA,IAAAN,EAAA,OAAAF,UAAA;GAGrBQ,MAAAZ,SACT,oBAAA,YAAA,UAAA;IAA6CA,OAAAA;IAC1C,UAAA,OAAOI,aAAa,aAAaA,SAASJ,IAAe,IAAzDI;GACH,GAF2BJ,KAAIa,IAE/B;GACDP,EAAA,KAAAF;GAAAE,EAAA,KAAAM;EAAA,OAAAA,KAAAN,EAAA;EAJAK,KAAAH,MAAKM,IAAKF,EAIV;EAACN,EAAA,KAAAF;EAAAE,EAAA,KAAAE;EAAAF,EAAA,KAAAK;CAAA,OAAAA,KAAAL,EAAA;CAAA,IAAAM;CAAA,IAAAN,EAAA,OAAAK,IAAA;EALJC,KAAA,oBAAA,UAAA,EAAA,UACGD,GAIC,CAAA;EACDL,EAAA,KAAAK;EAAAL,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OANHM;AAMG;AAIPV,wBAAwBa,cAAc;AAhBoC,SAAAN,MAAAO,GAAA;CAAA,OAGvCA,EAACC,UAAUT;AAAM"}
|
|
1
|
+
{"version":3,"file":"McpServerTools.js","names":["FC","ReactNode","createContext","useContext","useAuiState","MCPToolInfo","ToolContext","useMcpServerTool","tool","Error","McpServerPrimitiveTools","Props","children","t0","$","_c","tools","_temp","length","t1","t2","name","map","displayName","s","mcpServer","_c"],"sources":["../../../src/primitives/server/McpServerTools.tsx"],"sourcesContent":["import { type FC, type ReactNode, createContext, useContext } from \"react\";\nimport { useAuiState } from \"@assistant-ui/store\";\nimport type { MCPToolInfo } from \"../../mcp-scope\";\n\nconst ToolContext = createContext<MCPToolInfo | null>(null);\n\nexport const useMcpServerTool = (): MCPToolInfo => {\n const tool = useContext(ToolContext);\n if (!tool) {\n throw new Error(\n \"useMcpServerTool must be used inside <McpServerPrimitive.Tools>\",\n );\n }\n return tool;\n};\n\nexport namespace McpServerPrimitiveTools {\n export type Props = {\n children: ReactNode | ((tool: MCPToolInfo) => ReactNode);\n };\n}\n\nexport const McpServerPrimitiveTools: FC<McpServerPrimitiveTools.Props> = ({\n children,\n}) => {\n const tools = useAuiState((s) => s.mcpServer.tools);\n if (tools.length === 0) return null;\n return (\n <>\n {tools.map((tool) => (\n <ToolContext.Provider key={tool.name} value={tool}>\n {typeof children === \"function\" ? children(tool) : children}\n </ToolContext.Provider>\n ))}\n </>\n );\n};\n\nMcpServerPrimitiveTools.displayName = \"McpServerPrimitive.Tools\";\n"],"mappings":";;;;;AAIA,MAAMM,cAAcJ,cAAkC,IAAI;AAE1D,MAAaK,yBAAmB;CAC9B,MAAAC,OAAaL,WAAWG,WAAW;CACnC,IAAI,CAACE,MACH,MAAM,IAAIC,MACR,iEACF;CACD,OACMD;AAAI;AASb,MAAaE,2BAA6DG,OAAA;CAAA,MAAAC,IAAAC,EAAA,CAAA;CAAC,MAAA,EAAAH,aAAAC;CAGzE,MAAAG,QAAcZ,YAAYa,KAAwB;CAClD,IAAID,MAAKE,WAAY,GAAC,OAAS;CAAK,IAAAC;CAAA,IAAAL,EAAA,OAAAF,YAAAE,EAAA,OAAAE,OAAA;EAAA,IAAAI;EAAA,IAAAN,EAAA,OAAAF,UAAA;GAGrBQ,MAAAZ,SACT,oBAAA,YAAA,UAAA;IAA6CA,OAAAA;IAC1C,UAAA,OAAOI,aAAa,aAAaA,SAASJ,IAAe,IAAzDI;GACH,GAF2BJ,KAAIa,IAE/B;GACDP,EAAA,KAAAF;GAAAE,EAAA,KAAAM;EAAA,OAAAA,KAAAN,EAAA;EAJAK,KAAAH,MAAKM,IAAKF,EAIV;EAACN,EAAA,KAAAF;EAAAE,EAAA,KAAAE;EAAAF,EAAA,KAAAK;CAAA,OAAAA,KAAAL,EAAA;CAAA,IAAAM;CAAA,IAAAN,EAAA,OAAAK,IAAA;EALJC,KAAA,oBAAA,UAAA,EAAA,UACGD,GAIC,CAAA;EACDL,EAAA,KAAAK;EAAAL,EAAA,KAAAM;CAAA,OAAAA,KAAAN,EAAA;CAAA,OANHM;AAMG;AAIPV,wBAAwBa,cAAc;AAhBoC,SAAAN,MAAAO,GAAA;CAAA,OAGvCA,EAACC,UAAUT;AAAM"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { MCPCustomServerRecord } from "../mcp-scope.js";
|
|
2
|
+
import type { MCPStorage } from "./storage/types.js";
|
|
3
|
+
export type CustomServerPersistenceQueues = Map<string, Promise<void>>;
|
|
4
|
+
export declare const holdCustomServerPersistence: (persistenceQueues: CustomServerPersistenceQueues, scopeKey: string) => () => void;
|
|
5
|
+
type McpCustomServersResourceProps = {
|
|
6
|
+
storage: MCPStorage;
|
|
7
|
+
scopeKey: string;
|
|
8
|
+
persistenceQueues: CustomServerPersistenceQueues;
|
|
9
|
+
};
|
|
10
|
+
export declare const McpCustomServersResource: import("@assistant-ui/tap").Resource<{
|
|
11
|
+
customServers: MCPCustomServerRecord[];
|
|
12
|
+
isHydrated: boolean;
|
|
13
|
+
updateCustomServers: (updater: (records: MCPCustomServerRecord[]) => MCPCustomServerRecord[]) => void;
|
|
14
|
+
removeCustomServer: (id: string) => void;
|
|
15
|
+
}, [McpCustomServersResourceProps]>;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=McpCustomServerPersistence.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpCustomServerPersistence.d.ts","sourceRoot":"","sources":["../../src/resources/McpCustomServerPersistence.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,qBAAqB,EAAE,wBAAqB;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,2BAAwB;AA6BlD,MAAM,MAAM,6BAA6B,GAAG,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;AA2BvE,eAAO,MAAM,2BAA2B,GACtC,mBAAmB,6BAA6B,EAChD,UAAU,MAAM,eAQjB,CAAC;AAgBF,KAAK,6BAA6B,GAAG;IACnC,OAAO,EAAE,UAAU,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,EAAE,6BAA6B,CAAC;CAClD,CAAC;AAyIF,eAAO,MAAM,wBAAwB;;;mCA9CtB,CAAC,OAAO,EAAE,qBAAqB,EAAE,KAAK,qBAAqB,EAAE;6BA6BnE,MAAM;mCAiB8D,CAAC"}
|
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { c } from "@assistant-ui/tap/react-shim/compiler-runtime";
|
|
2
|
+
import { useEffect, useEffectEvent, useRef, useState } from "@assistant-ui/tap/react-shim";
|
|
3
|
+
import { resource } from "@assistant-ui/tap";
|
|
4
|
+
//#region src/resources/McpCustomServerPersistence.ts
|
|
5
|
+
const reportCustomStorageFailure = (operation, error) => {
|
|
6
|
+
console.error(`[assistant-ui/react-mcp] failed to ${operation} custom servers:`, error);
|
|
7
|
+
};
|
|
8
|
+
const reportBlockedCustomServerPersistence = () => {
|
|
9
|
+
console.error("[assistant-ui/react-mcp] custom server changes remain in memory because loading the persisted list failed; remount the manager to retry");
|
|
10
|
+
};
|
|
11
|
+
const persistCustomServers = async (storage, records) => {
|
|
12
|
+
try {
|
|
13
|
+
await storage.saveCustomServers(records);
|
|
14
|
+
} catch (error) {
|
|
15
|
+
reportCustomStorageFailure("save", error);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
const enqueueCustomServerTask = (persistenceQueues, scopeKey, task) => {
|
|
19
|
+
const next = (persistenceQueues.get(scopeKey) ?? Promise.resolve()).then(task);
|
|
20
|
+
persistenceQueues.set(scopeKey, next);
|
|
21
|
+
next.then(() => {
|
|
22
|
+
if (persistenceQueues.get(scopeKey) === next) persistenceQueues.delete(scopeKey);
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
const enqueueCustomServerPersistence = (persistenceQueues, scopeKey, storage, records) => enqueueCustomServerTask(persistenceQueues, scopeKey, () => persistCustomServers(storage, records));
|
|
26
|
+
const holdCustomServerPersistence = (persistenceQueues, scopeKey) => {
|
|
27
|
+
let release = () => {};
|
|
28
|
+
const gate = new Promise((resolve) => {
|
|
29
|
+
release = resolve;
|
|
30
|
+
});
|
|
31
|
+
enqueueCustomServerTask(persistenceQueues, scopeKey, () => gate);
|
|
32
|
+
return release;
|
|
33
|
+
};
|
|
34
|
+
const deduplicateCustomServers = (records) => {
|
|
35
|
+
const seen = /* @__PURE__ */ new Set();
|
|
36
|
+
return records.filter((record) => {
|
|
37
|
+
if (seen.has(record.id)) {
|
|
38
|
+
console.error(`[assistant-ui/react-mcp] ignored duplicate custom server id "${record.id}" loaded from storage`);
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
seen.add(record.id);
|
|
42
|
+
return true;
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
const useMcpCustomServersResource = (t0) => {
|
|
46
|
+
const $ = c(22);
|
|
47
|
+
const { storage, scopeKey, persistenceQueues } = t0;
|
|
48
|
+
let t1;
|
|
49
|
+
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
50
|
+
t1 = [];
|
|
51
|
+
$[0] = t1;
|
|
52
|
+
} else t1 = $[0];
|
|
53
|
+
const [customServers, setCustomServers] = useState(t1);
|
|
54
|
+
const [isHydrated, setIsHydrated] = useState(false);
|
|
55
|
+
let t2;
|
|
56
|
+
if ($[1] === Symbol.for("react.memo_cache_sentinel")) {
|
|
57
|
+
t2 = [];
|
|
58
|
+
$[1] = t2;
|
|
59
|
+
} else t2 = $[1];
|
|
60
|
+
const customServersRef = useRef(t2);
|
|
61
|
+
const hydrationStateRef = useRef("pending");
|
|
62
|
+
const hasPendingMutationRef = useRef(false);
|
|
63
|
+
const [removedBeforeHydration] = useState(_temp);
|
|
64
|
+
const reportedBlockedPersistenceRef = useRef(false);
|
|
65
|
+
let t3;
|
|
66
|
+
if ($[2] !== persistenceQueues || $[3] !== removedBeforeHydration || $[4] !== scopeKey || $[5] !== storage) {
|
|
67
|
+
t3 = async (signal) => {
|
|
68
|
+
while (true) {
|
|
69
|
+
const pendingPersistence = persistenceQueues.get(scopeKey);
|
|
70
|
+
if (!pendingPersistence) break;
|
|
71
|
+
await pendingPersistence;
|
|
72
|
+
if (signal.cancelled) return;
|
|
73
|
+
if (persistenceQueues.get(scopeKey) === pendingPersistence) break;
|
|
74
|
+
}
|
|
75
|
+
let records;
|
|
76
|
+
try {
|
|
77
|
+
const loadedRecords = await storage.loadCustomServers();
|
|
78
|
+
records = deduplicateCustomServers(loadedRecords);
|
|
79
|
+
} catch (t4) {
|
|
80
|
+
const error = t4;
|
|
81
|
+
if (!signal.cancelled) {
|
|
82
|
+
reportCustomStorageFailure("load", error);
|
|
83
|
+
hydrationStateRef.current = "failed";
|
|
84
|
+
if (hasPendingMutationRef.current) {
|
|
85
|
+
reportBlockedCustomServerPersistence();
|
|
86
|
+
reportedBlockedPersistenceRef.current = true;
|
|
87
|
+
}
|
|
88
|
+
setIsHydrated(true);
|
|
89
|
+
}
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
const hadPendingMutation = hasPendingMutationRef.current;
|
|
93
|
+
const hydratedRecords = records.filter((record) => !removedBeforeHydration.has(record.id));
|
|
94
|
+
const mergedRecords = (() => {
|
|
95
|
+
const prev = customServersRef.current;
|
|
96
|
+
if (prev.length === 0) return hydratedRecords;
|
|
97
|
+
const persistedIds = new Set(hydratedRecords.map(_temp2));
|
|
98
|
+
return [...hydratedRecords, ...prev.filter((r_0) => !persistedIds.has(r_0.id))];
|
|
99
|
+
})();
|
|
100
|
+
customServersRef.current = mergedRecords;
|
|
101
|
+
hydrationStateRef.current = "succeeded";
|
|
102
|
+
hasPendingMutationRef.current = false;
|
|
103
|
+
if (hadPendingMutation) enqueueCustomServerPersistence(persistenceQueues, scopeKey, storage, mergedRecords);
|
|
104
|
+
if (signal.cancelled) return;
|
|
105
|
+
setCustomServers(mergedRecords);
|
|
106
|
+
setIsHydrated(true);
|
|
107
|
+
};
|
|
108
|
+
$[2] = persistenceQueues;
|
|
109
|
+
$[3] = removedBeforeHydration;
|
|
110
|
+
$[4] = scopeKey;
|
|
111
|
+
$[5] = storage;
|
|
112
|
+
$[6] = t3;
|
|
113
|
+
} else t3 = $[6];
|
|
114
|
+
const hydrate = useEffectEvent(t3);
|
|
115
|
+
let t4;
|
|
116
|
+
if ($[7] !== hydrate) {
|
|
117
|
+
t4 = () => {
|
|
118
|
+
const signal_0 = { cancelled: false };
|
|
119
|
+
hydrate(signal_0);
|
|
120
|
+
return () => {
|
|
121
|
+
signal_0.cancelled = true;
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
$[7] = hydrate;
|
|
125
|
+
$[8] = t4;
|
|
126
|
+
} else t4 = $[8];
|
|
127
|
+
let t5;
|
|
128
|
+
if ($[9] === Symbol.for("react.memo_cache_sentinel")) {
|
|
129
|
+
t5 = [];
|
|
130
|
+
$[9] = t5;
|
|
131
|
+
} else t5 = $[9];
|
|
132
|
+
useEffect(t4, t5);
|
|
133
|
+
let t6;
|
|
134
|
+
if ($[10] !== persistenceQueues || $[11] !== scopeKey || $[12] !== storage) {
|
|
135
|
+
t6 = (updater) => {
|
|
136
|
+
const next = updater(customServersRef.current);
|
|
137
|
+
customServersRef.current = next;
|
|
138
|
+
setCustomServers(next);
|
|
139
|
+
if (hydrationStateRef.current === "succeeded") {
|
|
140
|
+
enqueueCustomServerPersistence(persistenceQueues, scopeKey, storage, next);
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
hasPendingMutationRef.current = true;
|
|
144
|
+
if (hydrationStateRef.current === "failed" && !reportedBlockedPersistenceRef.current) {
|
|
145
|
+
reportBlockedCustomServerPersistence();
|
|
146
|
+
reportedBlockedPersistenceRef.current = true;
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
$[10] = persistenceQueues;
|
|
150
|
+
$[11] = scopeKey;
|
|
151
|
+
$[12] = storage;
|
|
152
|
+
$[13] = t6;
|
|
153
|
+
} else t6 = $[13];
|
|
154
|
+
const updateCustomServers = t6;
|
|
155
|
+
let t7;
|
|
156
|
+
if ($[14] !== removedBeforeHydration || $[15] !== updateCustomServers) {
|
|
157
|
+
t7 = (id) => {
|
|
158
|
+
if (hydrationStateRef.current === "pending") removedBeforeHydration.add(id);
|
|
159
|
+
updateCustomServers((prev_0) => prev_0.filter((record_0) => record_0.id !== id));
|
|
160
|
+
};
|
|
161
|
+
$[14] = removedBeforeHydration;
|
|
162
|
+
$[15] = updateCustomServers;
|
|
163
|
+
$[16] = t7;
|
|
164
|
+
} else t7 = $[16];
|
|
165
|
+
const removeCustomServer = t7;
|
|
166
|
+
let t8;
|
|
167
|
+
if ($[17] !== customServers || $[18] !== isHydrated || $[19] !== removeCustomServer || $[20] !== updateCustomServers) {
|
|
168
|
+
t8 = {
|
|
169
|
+
customServers,
|
|
170
|
+
isHydrated,
|
|
171
|
+
updateCustomServers,
|
|
172
|
+
removeCustomServer
|
|
173
|
+
};
|
|
174
|
+
$[17] = customServers;
|
|
175
|
+
$[18] = isHydrated;
|
|
176
|
+
$[19] = removeCustomServer;
|
|
177
|
+
$[20] = updateCustomServers;
|
|
178
|
+
$[21] = t8;
|
|
179
|
+
} else t8 = $[21];
|
|
180
|
+
return t8;
|
|
181
|
+
};
|
|
182
|
+
const McpCustomServersResource = resource(useMcpCustomServersResource);
|
|
183
|
+
function _temp() {
|
|
184
|
+
return /* @__PURE__ */ new Set();
|
|
185
|
+
}
|
|
186
|
+
function _temp2(r) {
|
|
187
|
+
return r.id;
|
|
188
|
+
}
|
|
189
|
+
//#endregion
|
|
190
|
+
export { McpCustomServersResource, holdCustomServerPersistence };
|
|
191
|
+
|
|
192
|
+
//# sourceMappingURL=McpCustomServerPersistence.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpCustomServerPersistence.js","names":["useState","useEffect","useEffectEvent","useRef","useCallback","resource","MCPCustomServerRecord","MCPStorage","reportCustomStorageFailure","operation","error","console","reportBlockedCustomServerPersistence","persistCustomServers","storage","records","saveCustomServers","CustomServerPersistenceQueues","Map","Promise","enqueueCustomServerTask","persistenceQueues","scopeKey","task","previous","get","next","resolve","then","set","delete","enqueueCustomServerPersistence","holdCustomServerPersistence","release","gate","deduplicateCustomServers","seen","Set","filter","record","has","id","add","McpCustomServersResourceProps","useMcpCustomServersResource","t0","$","_c","t1","Symbol","for","customServers","setCustomServers","isHydrated","setIsHydrated","t2","customServersRef","hydrationStateRef","hasPendingMutationRef","removedBeforeHydration","_temp","reportedBlockedPersistenceRef","t3","signal","pendingPersistence","cancelled","loadedRecords","loadCustomServers","t4","current","hadPendingMutation","hydratedRecords","mergedRecords","prev","length","persistedIds","map","_temp2","r_0","r","hydrate","signal_0","t5","t6","updater","updateCustomServers","t7","prev_0","record_0","removeCustomServer","t8","McpCustomServersResource","_c"],"sources":["../../src/resources/McpCustomServerPersistence.ts"],"sourcesContent":["import {\n useState,\n useEffect,\n useEffectEvent,\n useRef,\n useCallback,\n} from \"react\";\nimport { resource } from \"@assistant-ui/tap\";\nimport type { MCPCustomServerRecord } from \"../mcp-scope\";\nimport type { MCPStorage } from \"./storage/types\";\n\nconst reportCustomStorageFailure = (\n operation: \"load\" | \"save\",\n error: unknown,\n) => {\n console.error(\n `[assistant-ui/react-mcp] failed to ${operation} custom servers:`,\n error,\n );\n};\n\nconst reportBlockedCustomServerPersistence = () => {\n console.error(\n \"[assistant-ui/react-mcp] custom server changes remain in memory because loading the persisted list failed; remount the manager to retry\",\n );\n};\n\nconst persistCustomServers = async (\n storage: MCPStorage,\n records: MCPCustomServerRecord[],\n) => {\n try {\n await storage.saveCustomServers(records);\n } catch (error) {\n reportCustomStorageFailure(\"save\", error);\n }\n};\n\nexport type CustomServerPersistenceQueues = Map<string, Promise<void>>;\n\nconst enqueueCustomServerTask = (\n persistenceQueues: CustomServerPersistenceQueues,\n scopeKey: string,\n task: () => Promise<void>,\n) => {\n const previous = persistenceQueues.get(scopeKey);\n const next = (previous ?? Promise.resolve()).then(task);\n persistenceQueues.set(scopeKey, next);\n void next.then(() => {\n if (persistenceQueues.get(scopeKey) === next) {\n persistenceQueues.delete(scopeKey);\n }\n });\n};\n\nconst enqueueCustomServerPersistence = (\n persistenceQueues: CustomServerPersistenceQueues,\n scopeKey: string,\n storage: MCPStorage,\n records: MCPCustomServerRecord[],\n) =>\n enqueueCustomServerTask(persistenceQueues, scopeKey, () =>\n persistCustomServers(storage, records),\n );\n\nexport const holdCustomServerPersistence = (\n persistenceQueues: CustomServerPersistenceQueues,\n scopeKey: string,\n) => {\n let release = () => {};\n const gate = new Promise<void>((resolve) => {\n release = resolve;\n });\n enqueueCustomServerTask(persistenceQueues, scopeKey, () => gate);\n return release;\n};\n\nconst deduplicateCustomServers = (records: MCPCustomServerRecord[]) => {\n const seen = new Set<string>();\n return records.filter((record) => {\n if (seen.has(record.id)) {\n console.error(\n `[assistant-ui/react-mcp] ignored duplicate custom server id \"${record.id}\" loaded from storage`,\n );\n return false;\n }\n seen.add(record.id);\n return true;\n });\n};\n\ntype McpCustomServersResourceProps = {\n storage: MCPStorage;\n scopeKey: string;\n persistenceQueues: CustomServerPersistenceQueues;\n};\n\nconst useMcpCustomServersResource = ({\n storage,\n scopeKey,\n persistenceQueues,\n}: McpCustomServersResourceProps) => {\n const [customServers, setCustomServers] = useState<MCPCustomServerRecord[]>(\n [],\n );\n const [isHydrated, setIsHydrated] = useState(false);\n\n const customServersRef = useRef<MCPCustomServerRecord[]>([]);\n const hydrationStateRef = useRef<\"pending\" | \"succeeded\" | \"failed\">(\n \"pending\",\n );\n const hasPendingMutationRef = useRef(false);\n const [removedBeforeHydration] = useState(() => new Set<string>());\n const reportedBlockedPersistenceRef = useRef(false);\n\n const hydrate = useEffectEvent(async (signal: { cancelled: boolean }) => {\n // A revisited scope must not read behind writes still queued against it.\n while (true) {\n const pendingPersistence = persistenceQueues.get(scopeKey);\n if (!pendingPersistence) break;\n await pendingPersistence;\n if (signal.cancelled) return;\n if (persistenceQueues.get(scopeKey) === pendingPersistence) break;\n }\n\n let records: Awaited<ReturnType<typeof storage.loadCustomServers>>;\n try {\n const loadedRecords = await storage.loadCustomServers();\n records = deduplicateCustomServers(loadedRecords);\n } catch (error) {\n if (!signal.cancelled) {\n reportCustomStorageFailure(\"load\", error);\n hydrationStateRef.current = \"failed\";\n if (hasPendingMutationRef.current) {\n reportBlockedCustomServerPersistence();\n reportedBlockedPersistenceRef.current = true;\n }\n setIsHydrated(true);\n }\n return;\n }\n // Merge rather than replace so any addCustomServer calls that\n // happened before hydration resolved aren't silently overwritten.\n // Persisted order wins; pre-hydration locals append.\n const hadPendingMutation = hasPendingMutationRef.current;\n const hydratedRecords = records.filter(\n (record) => !removedBeforeHydration.has(record.id),\n );\n const mergedRecords = (() => {\n const prev = customServersRef.current;\n if (prev.length === 0) return hydratedRecords;\n const persistedIds = new Set(hydratedRecords.map((r) => r.id));\n return [\n ...hydratedRecords,\n ...prev.filter((r) => !persistedIds.has(r.id)),\n ];\n })();\n customServersRef.current = mergedRecords;\n hydrationStateRef.current = \"succeeded\";\n hasPendingMutationRef.current = false;\n if (hadPendingMutation) {\n enqueueCustomServerPersistence(\n persistenceQueues,\n scopeKey,\n storage,\n mergedRecords,\n );\n }\n if (signal.cancelled) return;\n setCustomServers(mergedRecords);\n setIsHydrated(true);\n });\n\n useEffect(() => {\n const signal = { cancelled: false };\n // Hydration reads persisted records asynchronously; there is no earlier\n // point than mount at which to start it.\n // eslint-disable-next-line react-hooks/set-state-in-effect\n void hydrate(signal);\n return () => {\n signal.cancelled = true;\n };\n }, []);\n\n const updateCustomServers = useCallback(\n (\n updater: (records: MCPCustomServerRecord[]) => MCPCustomServerRecord[],\n ) => {\n const next = updater(customServersRef.current);\n customServersRef.current = next;\n setCustomServers(next);\n\n if (hydrationStateRef.current === \"succeeded\") {\n enqueueCustomServerPersistence(\n persistenceQueues,\n scopeKey,\n storage,\n next,\n );\n return;\n }\n\n hasPendingMutationRef.current = true;\n if (\n hydrationStateRef.current === \"failed\" &&\n !reportedBlockedPersistenceRef.current\n ) {\n reportBlockedCustomServerPersistence();\n reportedBlockedPersistenceRef.current = true;\n }\n },\n [persistenceQueues, scopeKey, storage],\n );\n\n const removeCustomServer = useCallback(\n (id: string) => {\n if (hydrationStateRef.current === \"pending\") {\n removedBeforeHydration.add(id);\n }\n updateCustomServers((prev) => prev.filter((record) => record.id !== id));\n },\n [removedBeforeHydration, updateCustomServers],\n );\n\n return {\n customServers,\n isHydrated,\n updateCustomServers,\n removeCustomServer,\n };\n};\n\nexport const McpCustomServersResource = resource(useMcpCustomServersResource);\n"],"mappings":"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"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ElicitRequest, ElicitResult } from "@modelcontextprotocol/client";
|
|
2
|
+
import type { MCPElicitation, MCPElicitationResponse } from "../mcp-scope.js";
|
|
3
|
+
export declare const useMcpElicitationLifecycle: () => {
|
|
4
|
+
pendingElicitations: MCPElicitation[];
|
|
5
|
+
cancelPendingElicitations: () => void;
|
|
6
|
+
requestElicitation: (request: ElicitRequest, signal: AbortSignal, isCurrentConnection: () => boolean) => Promise<ElicitResult>;
|
|
7
|
+
answerElicitation: (id: string, response: MCPElicitationResponse) => readonly {
|
|
8
|
+
property: string;
|
|
9
|
+
message: string;
|
|
10
|
+
}[] | undefined;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=McpElicitationLifecycle.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"McpElicitationLifecycle.d.ts","sourceRoot":"","sources":["../../src/resources/McpElicitationLifecycle.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAChF,OAAO,KAAK,EAAE,cAAc,EAAE,sBAAsB,EAAE,wBAAqB;AAI3E,eAAO,MAAM,0BAA0B;;;kCA+C1B,aAAa,UACd,WAAW,uBACE,MAAM,OAAO,KACjC,OAAO,CAAC,YAAY,CAAC;4BA+ChB,MAAM,YACA,sBAAsB,KAC/B,SAAS;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,GAAG,SAAS;CAkDlE,CAAC"}
|