solace-agent-mesh 0.2.2__py3-none-any.whl → 0.2.4__py3-none-any.whl
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.
Potentially problematic release.
This version of solace-agent-mesh might be problematic. Click here for more details.
- solace_agent_mesh/agents/base_agent_component.py +101 -71
- solace_agent_mesh/assets/web-visualizer/assets/{index-C5awueeJ.js → index-DnDr1pnu.js} +33 -33
- solace_agent_mesh/assets/web-visualizer/index.html +1 -1
- solace_agent_mesh/cli/__init__.py +1 -1
- solace_agent_mesh/config_portal/backend/server.py +41 -0
- solace_agent_mesh/config_portal/frontend/static/client/assets/_index-a-zJ6rLx.js +46 -0
- solace_agent_mesh/config_portal/frontend/static/client/assets/{manifest-c92a7808.js → manifest-44c41103.js} +1 -1
- solace_agent_mesh/config_portal/frontend/static/client/index.html +1 -1
- solace_agent_mesh/services/history_service/history_providers/sql_history_provider.py +3 -3
- {solace_agent_mesh-0.2.2.dist-info → solace_agent_mesh-0.2.4.dist-info}/METADATA +9 -5
- {solace_agent_mesh-0.2.2.dist-info → solace_agent_mesh-0.2.4.dist-info}/RECORD +14 -14
- solace_agent_mesh/config_portal/frontend/static/client/assets/_index-b13CSm84.js +0 -42
- {solace_agent_mesh-0.2.2.dist-info → solace_agent_mesh-0.2.4.dist-info}/WHEEL +0 -0
- {solace_agent_mesh-0.2.2.dist-info → solace_agent_mesh-0.2.4.dist-info}/entry_points.txt +0 -0
- {solace_agent_mesh-0.2.2.dist-info → solace_agent_mesh-0.2.4.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import{j as e,r as g}from"./index-BJHAE5s4.js";function re({steps:s,currentStepIndex:t,onStepClick:c}){return e.jsxs("div",{className:"relative w-full",children:[e.jsx("div",{className:"absolute top-5 left-0 right-0 h-1 bg-gray-300 mr-9 ml-9",children:e.jsx("div",{className:"h-full bg-solace-green transition-all duration-300 ease-in-out",style:{width:t===0?"0%":`${t/(s.length-1)*100}%`}})}),e.jsx("div",{className:"flex items-center justify-between w-full relative z-10",children:s.map((a,i)=>{const d=i===t,m=i<t;return e.jsxs("div",{className:"flex flex-col items-center",children:[e.jsx("button",{onClick:()=>c==null?void 0:c(i),disabled:!c,className:`
|
|
2
|
-
w-10 h-10 rounded-full flex items-center justify-center
|
|
3
|
-
font-bold transition-colors duration-300
|
|
4
|
-
${d?"bg-solace-green text-white":""}
|
|
5
|
-
${m?"bg-solace-dark-green text-white":""}
|
|
6
|
-
${!d&&!m?"bg-gray-200 text-gray-600":""}
|
|
7
|
-
${c?"cursor-pointer":"cursor-default"}
|
|
8
|
-
`,children:m?e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}):i+1}),e.jsx("span",{className:`
|
|
9
|
-
mt-2 text-xs font-medium text-center
|
|
10
|
-
${d?"text-solace-green":""}
|
|
11
|
-
${m?"text-solace-dark-green":""}
|
|
12
|
-
${!d&&!m?"text-gray-500":""}
|
|
13
|
-
`,children:a.title})]},a.id)})})]})}function L({children:s,onClick:t,disabled:c=!1,variant:a="primary",type:i="button",className:d=""}){const m="py-2 px-4 rounded-md font-medium transition-colors focus:outline-none focus:ring-2 focus:ring-offset-2",v={primary:"bg-solace-green hover:bg-solace-dark-green text-white focus:ring-solace-green disabled:bg-solace-green/50",secondary:"bg-gray-200 hover:bg-gray-300 text-gray-800 focus:ring-gray-500 disabled:bg-gray-100 disabled:text-gray-400",outline:"border border-gray-300 hover:bg-gray-50 text-gray-700 focus:ring-solace-green disabled:text-gray-400"};return e.jsx("button",{type:i,className:`${m} ${v[a]} ${d}`,onClick:t,disabled:c,children:s})}const J=()=>e.jsx("svg",{className:"w-4 h-4 mr-1.5 text-green-500",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),X={quick:{title:"Get Started Quickly",timeEstimate:"2 minutes",timeColor:"green",description:"Simple setup with recommended defaults",features:["Connect AI provider","Uses sensible defaults for everything else"]},advanced:{title:"Advanced Setup",timeEstimate:"10 minutes",timeColor:"blue",description:"Full control over all configuration options",features:["Set namespace for topic prefixes","Specify broker settings","Connect AI provider","Customize built-in agents","Configure file service"]}},ne=["Ready-to-use Solace Agent Mesh with basic capabilities","Chat interface and REST API for immediate testing","Foundation for adding more agents later"],te=({pathType:s,isSelected:t,onSelect:c})=>{const a=X[s];return e.jsxs("div",{className:`
|
|
14
|
-
border rounded-lg p-6 cursor-pointer transition-all
|
|
15
|
-
${t?"border-solace-blue bg-solace-light-blue/10 shadow-md":"border-gray-200 hover:border-solace-blue/50 hover:bg-gray-50"}
|
|
16
|
-
`,onClick:c,children:[e.jsxs("div",{className:"flex justify-between items-start mb-4",children:[e.jsx("h3",{className:"text-xl font-bold text-solace-blue",children:a.title}),e.jsx("span",{className:`bg-${a.timeColor}-100 text-${a.timeColor}-800 text-xs font-medium px-2.5 py-0.5 rounded`,children:a.timeEstimate})]}),e.jsx("p",{className:"text-gray-600 mb-4",children:a.description}),e.jsx("div",{children:e.jsx("ul",{className:"space-y-2 text-sm text-gray-600",children:a.features.map(i=>e.jsxs("li",{className:"flex items-center",children:[e.jsx(J,{}),i]},i))})})]})};function ie({data:s,updateData:t,onNext:c,onPrevious:a}){const[i,d]=g.useState(s.setupPath??null),m=o=>{d(o),t({setupPath:o})},v=()=>{i&&c()};return e.jsxs("div",{className:"space-y-6",children:[e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:Object.keys(X).map(o=>e.jsx(te,{pathType:o,isSelected:i===o,onSelect:()=>m(o)},o))}),e.jsxs("div",{className:"mt-6 p-4 border rounded-lg",children:[e.jsx("h3",{className:"text-lg font-semibold text-solace-blue mb-3",children:"What you'll get after setup:"}),e.jsx("ul",{className:"space-y-2 text-gray-700",children:ne.map(o=>e.jsxs("li",{className:"flex items-center",children:[e.jsx(J,{}),o]},o))})]}),e.jsx("div",{className:"mt-8 flex justify-end",children:e.jsx(L,{onClick:v,disabled:!i,children:"Continue"})})]})}function S({label:s,htmlFor:t,error:c,children:a,helpText:i,required:d=!1}){return e.jsxs("div",{className:"mb-4",children:[e.jsxs("label",{htmlFor:t,className:"block text-sm font-medium text-gray-700 mb-1",children:[s,d&&e.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),a,i&&e.jsx("p",{className:"mt-1 text-sm text-gray-500",children:i}),c&&e.jsx("p",{className:"mt-1 text-sm text-red-600",children:c})]})}function R({id:s,type:t="text",name:c,value:a,onChange:i,placeholder:d="",required:m=!1,disabled:v=!1,className:o="",autoFocus:j=!1}){return e.jsx("input",{id:s,name:c||s,type:t,value:a,onChange:i,placeholder:d,required:m,disabled:v,autoFocus:j,className:`
|
|
17
|
-
w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm
|
|
18
|
-
focus:outline-none focus:ring-blue-500 focus:border-blue-500
|
|
19
|
-
disabled:bg-gray-100 disabled:text-gray-500
|
|
20
|
-
${o}
|
|
21
|
-
`})}function T({children:s,className:t=""}){return e.jsx("div",{className:`p-4 bg-blue-50 rounded-md ${t}`,children:e.jsx("p",{className:"text-sm text-blue-800",children:s})})}function U({children:s,className:t=""}){return e.jsx("div",{className:`p-4 bg-yellow-50 rounded-md ${t}`,children:e.jsx("p",{className:"text-sm text-yellow-800",children:s})})}function oe({children:s,variant:t="info",className:c=""}){const a={info:"bg-blue-50 text-blue-800",success:"bg-green-50 text-green-800",error:"bg-red-50 text-red-800",loading:"bg-blue-50 text-blue-800"};return e.jsx("div",{className:`p-3 rounded-md ${a[t]} ${c}`,children:e.jsx("p",{className:"text-sm",children:s})})}function le({data:s,updateData:t,onNext:c,onPrevious:a}){var m;const i=v=>{t({[v.target.name]:v.target.value})},d=v=>{v.preventDefault(),c()};return e.jsxs("form",{onSubmit:d,children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx(T,{className:"mb-4",children:"The namespace is a unique identifier that will be prefixed to all your event topics in the Solace Agent Mesh. Choose something meaningful to your organization or project."}),e.jsx(S,{label:"Project Namespace",htmlFor:"namespace",helpText:"Any simple text identifier that makes sense for your project (e.g., 'my-project', 'acme-corp')",required:!0,children:e.jsx(R,{id:"namespace",name:"namespace",value:s.namespace,onChange:i,placeholder:"Enter a namespace (e.g., my-project)",required:!0})})]}),e.jsxs("div",{className:"mt-8 flex justify-end space-x-4",children:[e.jsx(L,{onClick:a,variant:"outline",disabled:!0,children:"Previous"}),e.jsx(L,{type:"submit",disabled:!((m=s.namespace)!=null&&m.trim()),children:"Next"})]})]})}function B({id:s,options:t,value:c,onChange:a,name:i,required:d=!1,disabled:m=!1,className:v=""}){return e.jsxs("div",{className:"relative",children:[e.jsx("select",{id:s,name:i||s,value:c,onChange:a,required:d,disabled:m,className:`
|
|
22
|
-
w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm
|
|
23
|
-
focus:outline-none focus:ring-blue-500 focus:border-blue-500
|
|
24
|
-
disabled:bg-gray-100 disabled:text-gray-500
|
|
25
|
-
appearance-none
|
|
26
|
-
pr-10
|
|
27
|
-
${v}
|
|
28
|
-
`,children:t.map(o=>e.jsx("option",{value:o.value,children:o.label},o.value))}),e.jsx("div",{className:"pointer-events-none absolute inset-y-0 right-0 flex items-center px-2",children:e.jsx("svg",{className:"h-6 w-6 text-gray-500",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true",children:e.jsx("path",{fillRule:"evenodd",d:"M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z",clipRule:"evenodd"})})})]})}const ae=[{value:"solace",label:"Existing Solace Pub/Sub+ broker"},{value:"container",label:"New local Solace PubSub+ broker container"},{value:"dev_mode",label:"Dev mode (simplified setup)"}],ce=[{value:"podman",label:"Podman"},{value:"docker",label:"Docker"}];function de({data:s,updateData:t,onNext:c,onPrevious:a}){const[i,d]=g.useState({}),[m,v]=g.useState(!1),[o,j]=g.useState({isRunning:!1,success:s.container_started===!0,message:s.container_started?"Container already started successfully":""});g.useEffect(()=>{!s.container_engine&&s.broker_type==="container"&&t({container_engine:"podman"}),s.container_engine&&s.broker_type!=="container"&&t({container_engine:""}),s.broker_type!=="dev_mode"?t({dev_mode:!1}):s.broker_type==="dev_mode"&&t({dev_mode:!0})},[s.broker_type]);const N=x=>{t({[x.target.name]:x.target.value})},w=()=>{const x={};let _=!0;return y==="solace"&&(s.broker_url||(x.broker_url="Broker URL is required",_=!1),s.broker_vpn||(x.broker_vpn="VPN name is required",_=!1),s.broker_username||(x.broker_username="Username is required",_=!1),s.broker_password||(x.broker_password="Password is required",_=!1)),y==="container"&&!o.success&&(x.container="You must successfully run the container before proceeding",_=!1),d(x),_},f=async()=>{v(!0),j({isRunning:!0,success:!1,message:"Starting container..."});try{const _=await(await fetch("api/runcontainer",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({container_engine:s.container_engine})})).json();_.status==="success"?(j({isRunning:!1,success:!0,message:_.message??"Container started successfully!"}),t({container_engine:s.container_engine,container_started:!0})):(j({isRunning:!1,success:!1,message:_.message??"Failed to start container. Please try again."}),t({container_started:!1}))}catch(x){j({isRunning:!1,success:!1,message:x instanceof Error?x.message:"An unexpected error occurred"}),t({container_started:!1})}finally{v(!1)}},C=x=>{x.preventDefault(),w()&&c()},y=s.broker_type,E=y==="solace",M=y==="container",I=()=>o.isRunning?"loading":o.success?"success":"error",l=()=>m?e.jsxs(e.Fragment,{children:[e.jsxs("svg",{className:"animate-spin h-4 w-4 mr-2",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4",fill:"none"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),"Starting Container..."]}):o.success?e.jsxs(e.Fragment,{children:[e.jsx("svg",{className:"h-4 w-4 mr-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}),"Container Running"]}):e.jsxs(e.Fragment,{children:[e.jsx("svg",{className:"h-4 w-4 mr-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})}),"Download and Run Container"]});return e.jsxs("form",{onSubmit:C,children:[e.jsxs("div",{className:"space-y-6",children:[e.jsx(S,{label:"Broker Type",htmlFor:"broker_type",required:!0,children:e.jsx(B,{id:"broker_type",name:"broker_type",options:ae,value:y,onChange:N,disabled:o.success&&s.broker_type==="container"})}),E&&e.jsxs("div",{className:"space-y-4 p-4 border border-gray-200 rounded-md",children:[e.jsx(T,{className:"mb-4",children:"Connect to an existing Solace PubSub+ broker running locally or in the cloud. You will need your broker credentials."}),e.jsx(S,{label:"Broker URL",htmlFor:"broker_url",error:i.broker_url,required:!0,children:e.jsx(R,{id:"broker_url",name:"broker_url",value:s.broker_url||"",onChange:N,placeholder:"ws://localhost:8008"})}),e.jsx(S,{label:"VPN Name",htmlFor:"broker_vpn",error:i.broker_vpn,required:!0,children:e.jsx(R,{id:"broker_vpn",name:"broker_vpn",value:s.broker_vpn||"",onChange:N,placeholder:"default"})}),e.jsx(S,{label:"Username",htmlFor:"broker_username",error:i.broker_username,required:!0,children:e.jsx(R,{id:"broker_username",name:"broker_username",value:s.broker_username||"",onChange:N,placeholder:"default"})}),e.jsx(S,{label:"Password",htmlFor:"broker_password",error:i.broker_password,required:!0,children:e.jsx(R,{id:"broker_password",name:"broker_password",type:"password",value:s.broker_password||"",onChange:N,placeholder:"Enter password"})})]}),M&&e.jsxs("div",{className:"space-y-4 p-4 border border-gray-200 rounded-md",children:[e.jsx(T,{className:"mb-4",children:"This option will download and run a local Solace PubSub+ broker container on your machine using Docker or Podman. You need to have Docker or Podman installed on your system."}),e.jsx(S,{label:"Container Engine",htmlFor:"container_engine",helpText:"Select the container engine installed on your system",required:!0,children:e.jsx(B,{id:"container_engine",name:"container_engine",options:ce,value:s.container_engine??"",onChange:N,disabled:o.isRunning||o.success})}),i.container&&e.jsx("div",{className:"text-sm text-red-600 mt-1 bg-red-50 p-2 border-l-4 border-red-500",children:i.container}),o.message&&e.jsx(oe,{variant:I(),children:o.message}),e.jsx("div",{className:"relative",children:e.jsxs("div",{className:"flex flex-col",children:[e.jsx(L,{onClick:f,disabled:m||o.success,variant:"primary",type:"button",className:"flex items-center justify-center gap-2",children:l()}),o.success&&e.jsxs("div",{className:"mt-2 flex items-center text-sm text-green-600",children:[e.jsx("svg",{className:"h-4 w-4 mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})}),"Container is running. You may proceed to the next step."]}),!o.success&&!m&&!o.message&&e.jsxs("div",{className:"mt-2 flex items-center text-sm text-blue-600",children:[e.jsxs("svg",{className:"h-4 w-4 mr-1",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round",children:[e.jsx("circle",{cx:"12",cy:"12",r:"10"}),e.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),e.jsx("line",{x1:"12",y1:"8",x2:"12",y2:"8"})]}),"You must start the container before proceeding to the next step"]})]})})]}),y==="dev_mode"&&e.jsxs(U,{children:[e.jsx("strong",{children:"Warning:"})," Dev mode runs everything in a single process and is not recommended for production use."]})]}),e.jsxs("div",{className:"mt-8 flex justify-end space-x-4",children:[e.jsx(L,{onClick:a,variant:"outline",type:"button",children:"Previous"}),e.jsxs(L,{type:"submit",disabled:m||y==="container"&&!o.success,variant:y==="container"&&!o.success?"secondary":"primary",children:[y==="container"&&!o.success&&!m&&e.jsxs("span",{className:"flex items-center",children:[e.jsx("svg",{className:"h-4 w-4 mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"})}),"Run Container First"]}),!(y==="container"&&!o.success&&!m)&&"Next"]})]})]})}function $({id:s,checked:t,onChange:c,disabled:a=!1}){const[i,d]=g.useState(t);g.useEffect(()=>{d(t)},[t]);const m=()=>{if(!a){const v=!i;d(v),c(v)}};return e.jsx("div",{className:"inline-block",children:e.jsxs("label",{htmlFor:s,className:"relative inline-flex items-center cursor-pointer",children:[e.jsx("input",{type:"checkbox",id:s,name:s,checked:i,onChange:m,disabled:a,className:"sr-only"}),e.jsx("div",{className:`
|
|
29
|
-
relative w-11 h-6 rounded-full transition-colors duration-300 ease-in-out
|
|
30
|
-
${i?"bg-solace-green":"bg-gray-300"}
|
|
31
|
-
${a?"opacity-50":""}
|
|
32
|
-
`,children:e.jsx("span",{className:`
|
|
33
|
-
absolute top-1 left-1 bg-white w-4 h-4 rounded-full shadow transform transition-transform duration-300 ease-in-out
|
|
34
|
-
${i?"translate-x-5":"translate-x-0"}
|
|
35
|
-
`})}),e.jsx("span",{className:"sr-only",children:i?"Enabled":"Disabled"})]})})}function me({title:s="Confirmation Required",message:t,onConfirm:c,onCancel:a}){return e.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:e.jsxs("div",{className:"bg-white rounded-lg p-6 max-w-md w-full",children:[e.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:s}),e.jsx("p",{className:"mb-6 text-gray-700",children:t}),e.jsxs("div",{className:"flex justify-end space-x-3",children:[e.jsx(L,{variant:"outline",onClick:a,children:"Cancel"}),e.jsx(L,{onClick:c,children:"Continue"})]})]})})}function W({id:s,name:t,value:c,onChange:a,placeholder:i="",required:d=!1,disabled:m=!1,className:v="",autoFocus:o=!1,suggestions:j,onFocus:N,fetchSuggestions:w,showLoadingIndicator:f=!1}){const[C,y]=g.useState(!1),[E,M]=g.useState([]),[I,l]=g.useState(!1),x=g.useRef(null),_=g.useRef(null);g.useEffect(()=>{if(j&&j.length>0){const u=j.filter(k=>k!=null).filter(k=>k.toLowerCase().includes((c||"").toLowerCase()));M(u)}else M([])},[c,j]),g.useEffect(()=>{const u=k=>{x.current&&!x.current.contains(k.target)&&_.current&&!_.current.contains(k.target)&&y(!1)};return document.addEventListener("mousedown",u),()=>{document.removeEventListener("mousedown",u)}},[]);const n=async()=>{if(N&&N(),w)try{l(!0);const u=await w();u&&u.length>0&&M(u)}catch(u){console.error("Error fetching suggestions:",u)}finally{l(!1)}},r=()=>{y(!0)},p=u=>{var F;a({target:{name:t||s,value:u}}),y(!1),(F=x.current)==null||F.focus()};return e.jsxs("div",{className:"relative w-full",children:[e.jsx("input",{ref:x,id:s,name:t||s,type:"text",value:c||"",onChange:a,onFocus:n,onClick:r,placeholder:i,required:d,disabled:m,autoFocus:o,className:`
|
|
36
|
-
w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm
|
|
37
|
-
focus:outline-none focus:ring-blue-500 focus:border-blue-500
|
|
38
|
-
disabled:bg-gray-100 disabled:text-gray-500
|
|
39
|
-
${v}
|
|
40
|
-
`,autoComplete:"off"}),I&&f&&e.jsx("div",{className:"absolute right-3 top-1/2 transform -translate-y-1/2",children:e.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-b-2 border-solace-green"})}),C&&E.length>0&&e.jsx("div",{ref:_,className:"absolute z-10 w-full mt-1 border bg-white border-gray-300 rounded-md shadow-lg max-h-60 overflow-auto",children:e.jsx("ul",{children:E.map((u,k)=>e.jsx("li",{onClick:()=>p(u),className:"px-3 py-2 cursor-pointer hover:bg-stone-300",children:u},k))})})]})}const q={openai:"https://api.openai.com/v1",anthropic:"https://api.anthropic.com",google:"https://generativelanguage.googleapis.com/v1beta/openai",aws:"https://bedrock-runtime.us-east-1.amazonaws.com",cohere:"https://api.cohere.ai/compatibility/v1"},Q=[{value:"openai",label:"OpenAI"},{value:"anthropic",label:"Anthropic"},{value:"google",label:"Google Gemini"},{value:"azure",label:"Azure"},{value:"openai_compatible",label:"OpenAI Compatible Provider"}],ue=[{value:"openai",label:"OpenAI"},{value:"google",label:"Google Gemini"},{value:"cohere",label:"Cohere"},{value:"openai_compatible",label:"OpenAI Compatible Provider"}],Z={openai:"openai",anthropic:"anthropic",google:"openai",openai_compatible:"openai",azure:"azure"},pe={openai:"openai",google:"openai",cohere:"cohere",openai_compatible:"openai"},he={openai:["text-embedding-3-small","text-embedding-3-large","text-embedding-ada-002"],google:["gemini-embedding-exp-03-07"],cohere:["embed-english-v3.0","embed-multilingual-v3.0","embed-english-light-v3.0","embed-multilingual-light-v3.0"],openai_compatible:[]},ge=[{value:"openai",label:"OpenAI"},{value:"openai_compatible",label:"OpenAI Compatible Provider"}],xe={openai:"openai",google:"gemini",openai_compatible:"openai"},O={openai:["dall-e-3","dall-e-2"],google:["imagen-3","imagen-2"],openai_compatible:[]},be={openai:["o3-mini","o3-mini-high","o3-mini-low","o1","o1-preview","o1-mini","gpt-4.5-preview","gpt-4o","gpt-4o-mini"],anthropic:["claude-3-7-sonnet-20250219","claude-3-5-sonnet-20241022","claude-3-5-haiku-20241022","claude-3-opus-20240229","claude-3-haiku-20240307"],google:["gemini-2.0-flash-001","gemini-2.0-pro-exp-02-05","gemini-2.0-flash-lite-001","gemini-2.0-flash-thinking-exp-01-21","gemini-1.5-flash-002","gemini-1.5-pro-002"],bedrock:["amazon.nova-pro-v1:0","amazon.nova-pro-latency-optimized-v1:0","amazon.nova-lite-v1:0","amazon.nova-micro-v1:0","anthropic.claude-3-7-sonnet-20250219-v1:0","anthropic.claude-3-5-sonnet-20241022-v2:0","anthropic.claude-3-5-haiku-20241022-v1:0","anthropic.claude-3-5-sonnet-20240620-v1:0","anthropic.claude-3-opus-20240229-v1:0","anthropic.claude-3-sonnet-20240229-v1:0","anthropic.claude-3-haiku-20240307-v1:0"],custom:[]};async function fe(s,t){try{const c=s.endsWith("/")?s:`${s}/`,a=await fetch(`${c}v1/models`,{method:"GET",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"}});if(!a.ok)throw new Error(`Failed to fetch models: ${a.status}`);const i=await a.json();return i.data&&Array.isArray(i.data)?i.data.filter(d=>d.id).map(d=>d.id):i.models&&Array.isArray(i.models)?i.models.filter(d=>d.id??d.name).map(d=>d.id??d.name):Array.isArray(i)?i.filter(d=>d.id??d.name).map(d=>d.id??d.name):[]}catch(c){return console.error("Error fetching models:",c),[]}}const V=(s,t)=>s.includes("/")?s:`${Z[t]||t}/${s}`;function ee({data:s,updateData:t,onNext:c,onPrevious:a}){const[i,d]=g.useState({}),[m,v]=g.useState(!1),[o,j]=g.useState(null),[N,w]=g.useState(!1),[f,C]=g.useState([]),[y,E]=g.useState([]),[M,I]=g.useState(!1),[l,x]=g.useState(null),[_,n]=g.useState(null);g.useEffect(()=>{console.log(s.setupPath);const b={};s.llm_provider||(b.llm_provider="openai"),s.embedding_provider||(b.embedding_provider="openai"),s.embedding_service_enabled===void 0&&(b.embedding_service_enabled=!0),Object.keys(b).length>0&&t(b)},[s,t]),g.useEffect(()=>{if(s.llm_provider){const b={};if(l!==null&&l!==s.llm_provider){if(b.llm_model_name="",s.llm_provider!=="openai_compatible"){const P=q[s.llm_provider]||"";b.llm_endpoint_url=P}else b.llm_endpoint_url="";Object.keys(b).length>0&&t(b)}x(s.llm_provider)}},[s.llm_provider,l,t]),g.useEffect(()=>{if(s.embedding_provider&&s.embedding_service_enabled){const b={};if(_!==null&&_!==s.embedding_provider){if(b.embedding_model_name="",s.embedding_provider!=="openai_compatible"){const P=q[s.embedding_provider]||"";b.embedding_endpoint_url=P}else b.embedding_endpoint_url="";Object.keys(b).length>0&&t(b)}n(s.embedding_provider)}},[s.embedding_provider,_,t,s.embedding_service_enabled]),g.useEffect(()=>{s.llm_provider&&s.llm_provider!=="openai_compatible"?C(be[s.llm_provider]||[]):C([])},[s.llm_provider]),g.useEffect(()=>{s.embedding_provider&&s.embedding_provider!=="openai_compatible"?E(he[s.embedding_provider]||[]):E([])},[s.embedding_provider]);const r=b=>{t({[b.target.name]:b.target.value})},p=b=>{t({embedding_service_enabled:b}),b||d({...i,embedding_provider:"",embedding_endpoint_url:"",embedding_api_key:"",embedding_model_name:""})},u=g.useCallback(async()=>{if(s.llm_provider==="openai_compatible"&&s.llm_endpoint_url&&s.llm_api_key){I(!0);try{const b=await fe(s.llm_endpoint_url,s.llm_api_key);C(b)}catch(b){console.error("Error fetching models:",b)}finally{I(!1)}}return[]},[s.llm_provider,s.llm_endpoint_url,s.llm_api_key]),k=()=>{const b={};let P=!0;return s.llm_provider||(b.llm_provider="LLM provider is required",P=!1),s.llm_provider==="openai_compatible"&&!s.llm_endpoint_url&&(b.llm_endpoint_url="LLM endpoint is required for OpenAI compatible endpoint}",P=!1),s.llm_model_name||(b.llm_model_name="LLM model name is required",P=!1),s.llm_api_key||(b.llm_api_key="LLM API key is required",P=!1),s.setupPath==="advanced"&&s.embedding_service_enabled&&(s.embedding_provider||(b.embedding_provider="Embedding provider is required",P=!1),s.embedding_endpoint_url||(b.embedding_endpoint_url="Embedding endpoint is required",P=!1),s.embedding_model_name||(b.embedding_model_name="Embedding model name is required",P=!1),s.embedding_api_key||(b.embedding_api_key="Embedding API key is required",P=!1)),d(b),P},F=async()=>{v(!0),j(null);try{const b=s.llm_provider!=="openai_compatible"&&q[s.llm_provider]||s.llm_endpoint_url,P=V(s.llm_model_name,s.llm_provider),D=await(await fetch("/api/test_llm_config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({model:P,api_key:s.llm_api_key,base_url:b})})).json();D.status==="success"?(v(!1),c()):(j(D.message??"Failed to test LLM configuration"),w(!0),v(!1))}catch(b){j(b instanceof Error?`Error: ${b.message}`:"An unexpected error occurred while testing the LLM configuration"),w(!0),v(!1)}},z=b=>{b.preventDefault(),k()&&F()};return e.jsxs("form",{onSubmit:z,children:[e.jsxs("div",{className:"space-y-6",children:[e.jsx(T,{className:"mb-4",children:'Configure your AI service provider for language models. To use a LLM provider not in the dropdown choose "OpenAI Compatible Provider" and enter your base URL, API key and model name.'}),e.jsxs("div",{className:"border-b border-gray-200 pb-4 mb-4",children:[e.jsx("h3",{className:"text-lg font-medium mb-4 text-gray-700 font-semibold",children:"Language Model Configuration"}),e.jsx(S,{label:"LLM Provider",htmlFor:"llm_provider",error:i.llm_provider,required:!0,children:e.jsx(B,{id:"llm_provider",name:"llm_provider",value:s.llm_provider||"",onChange:r,options:Q})}),(s.llm_provider==="openai_compatible"||s.llm_provider==="azure")&&e.jsx(S,{label:"LLM Endpoint URL",htmlFor:"llm_endpoint_url",error:i.llm_endpoint_url,required:!0,children:e.jsx(R,{id:"llm_endpoint_url",name:"llm_endpoint_url",value:s.llm_endpoint_url,onChange:r,placeholder:"https://api.example.com/v1",autoFocus:!0})}),e.jsx(S,{label:"LLM API Key",htmlFor:"llm_api_key",error:i.llm_api_key,required:!0,children:e.jsx(R,{id:"llm_api_key",name:"llm_api_key",type:"password",value:s.llm_api_key,onChange:r,placeholder:"Enter your API key"})}),s.llm_provider==="azure"&&e.jsxs(U,{className:"mb-4",children:[e.jsx("strong",{children:"Important:"}),' For Azure, in the "LLM Model Name" field, enter your ',e.jsx("strong",{children:"deployment name"})," (not the underlying model name). Your Azure deployment name is the name you assigned when you deployed the model in Azure OpenAI Service. For more details, refer to the ",e.jsx("a",{href:"https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/create-resource?pivots=web-portal#deploy-a-model",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"Azure documentation"}),"."]}),e.jsx(S,{label:"LLM Model Name",htmlFor:"llm_model_name",error:i.llm_model_name,helpText:"Select or type a model name",required:!0,children:e.jsx(W,{id:"llm_model_name",name:"llm_model_name",value:s.llm_model_name,onChange:r,placeholder:"Select or type a model name",suggestions:f,onFocus:s.llm_provider==="openai_compatible"?u:void 0,showLoadingIndicator:M})})]}),s.setupPath==="advanced"&&e.jsxs(e.Fragment,{children:[e.jsxs(T,{children:[e.jsxs("a",{href:"https://solacelabs.github.io/solace-agent-mesh/docs/documentation/user-guide/advanced/services/embedding-service",target:"_blank",rel:"noopener noreferrer",className:"font-medium underline inline-flex items-center",children:["The Embedding Service",e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-3.5 w-3.5 ml-0.5",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})]})," ","provides a unified interface for agents to request text, image, or multi-modal embeddings through the Solace Agent Mesh."]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("h3",{className:"text-lg font-medium text-gray-700 font-semibold",children:"Embedding Model Configuration"}),e.jsxs("div",{className:"flex items-center",children:[e.jsx("span",{className:"mr-3 text-sm text-gray-600",children:"Enable Embedding Service"}),e.jsx($,{id:"embedding_service_enabled",checked:s.embedding_service_enabled,onChange:p})]})]}),s.embedding_service_enabled&&e.jsxs("div",{className:"space-y-4",children:[e.jsx(S,{label:"Embedding Provider",htmlFor:"embedding_provider",error:i.embedding_provider,required:!0,children:e.jsx(B,{id:"embedding_provider",name:"embedding_provider",value:s.embedding_provider||"",onChange:r,options:ue})}),s.embedding_provider==="openai_compatible"&&e.jsx(S,{label:"Embedding Endpoint URL",htmlFor:"embedding_endpoint_url",error:i.embedding_endpoint_url,required:!0,children:e.jsx(R,{id:"embedding_endpoint_url",name:"embedding_endpoint_url",value:s.embedding_endpoint_url||"",onChange:r,placeholder:"https://api.example.com/v1"})}),e.jsx(S,{label:"Embedding API Key",htmlFor:"embedding_api_key",error:i.embedding_api_key,required:!0,children:e.jsx(R,{id:"embedding_api_key",name:"embedding_api_key",type:"password",value:s.embedding_api_key||"",onChange:r,placeholder:"Enter your API key"})}),e.jsx(S,{label:"Embedding Model Name",htmlFor:"embedding_model_name",error:i.embedding_model_name,required:!0,children:e.jsx(W,{id:"embedding_model_name",name:"embedding_model_name",value:s.embedding_model_name,onChange:r,placeholder:"Select or type a model name",suggestions:y,showLoadingIndicator:M})})]})]})]})]}),e.jsxs("div",{className:"mt-8 flex justify-end space-x-4",children:[e.jsx(L,{onClick:a,disabled:s.setupPath==="quick",variant:"outline",children:"Previous"}),e.jsx(L,{type:"submit",children:"Next"})]}),m&&e.jsx("div",{className:"fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50",children:e.jsxs("div",{className:"bg-white rounded-lg p-6 max-w-md w-full text-center",children:[e.jsx("h3",{className:"text-lg font-medium text-gray-900 mb-4",children:"Testing LLM Configuration"}),e.jsx("div",{className:"flex justify-center mb-4",children:e.jsx("div",{className:"animate-spin rounded-full h-10 w-10 border-b-2 border-solace-green"})}),e.jsx("p",{children:"Please wait while we test your LLM configuration..."})]})}),N&&e.jsx(me,{title:"Connection Test Failed",message:`We couldn't connect to your AI provider: ${o}
|
|
41
|
-
Please check your API key, model name, and endpoint URL (if applicable).
|
|
42
|
-
Do you want to skip this check and continue anyway?`,onConfirm:()=>{w(!1),c()},onCancel:()=>{w(!1)}})]})}const A={webRequest:{id:"web_request",name:"Web Request Agent",description:"Can make queries to web to get real-time data"},imageProcessing:{id:"image_processing",name:"Image Processing Agent",description:"Generate images from text or convert images to text"}},h={provider:"IMAGE_GEN_PROVIDER",endpoint:"IMAGE_GEN_ENDPOINT",apiKey:"IMAGE_GEN_API_KEY",model:"IMAGE_GEN_MODEL"};function ve({data:s,updateData:t,onNext:c,onPrevious:a}){const[i,d]=g.useState(s.built_in_agent??[]),[m,v]=g.useState({}),[o,j]=g.useState({}),[N,w]=g.useState([]),f=l=>{const n=Object.entries(l).filter(([r,p])=>p!=="").map(([r,p])=>`${r}=${p}`);t({env_var:n})};g.useEffect(()=>{const l={};if(s.env_var&&Array.isArray(s.env_var)&&s.env_var.forEach(x=>{if(x.includes("=")){const[_,n]=x.split("=");l[_]=n}}),i.includes(A.imageProcessing.id)){l[h.provider]||(l[h.provider]="openai");const x=l[h.provider];!l[h.endpoint]&&x!=="openai_compatible"&&(l[h.endpoint]=q[x]||""),l[h.apiKey]||(l[h.apiKey]=""),l[h.model]||(l[h.model]=""),x&&x!=="openai_compatible"&&w(O[x]||[])}v(l)},[s.env_var]);const C=(l,x)=>{const _={...m,[l]:x};v(_),o[l]&&j({...o,[l]:""}),f(_)},y=(l,x)=>{let _;if(x){if(_=i.includes(l)?i:[...i,l],l===A.imageProcessing.id&&!i.includes(A.imageProcessing.id)){const n={...m},r="openai";n[h.provider]=r,n[h.endpoint]=q[r],n[h.apiKey]="",n[h.model]="",v(n),w(O[r]||[]),f(n)}}else if(_=i.filter(n=>n!==l),l===A.imageProcessing.id){const n={...m},r={...o};Object.values(h).forEach(p=>{delete n[p],delete r[p]}),v(n),j(r),f(n)}d(_),t({built_in_agent:_})},E=l=>{const x={...m,[h.provider]:l,[h.model]:""};l!=="openai_compatible"?(x[h.endpoint]=q[l]||"",w(O[l]||[])):(x[h.endpoint]="",w([])),v(x);const _=[h.provider,h.model,h.endpoint],n={...o};_.forEach(r=>{n[r]&&delete n[r]}),Object.keys(n).length!==Object.keys(o).length&&j(n),f(x)},M=()=>{const l={};let x=!0;return i.includes(A.imageProcessing.id)&&(m[h.provider]||(l[h.provider]="Image Generation Provider is required",x=!1),m[h.provider]==="openai_compatible"&&!m[h.endpoint]&&(l[h.endpoint]="Image Generation Endpoint is required",x=!1),m[h.apiKey]||(l[h.apiKey]="Image Generation API Key is required",x=!1),m[h.model]||(l[h.model]="Image Generation Model is required",x=!1)),j(l),x},I=l=>{l.preventDefault(),M()&&c()};return e.jsxs("form",{onSubmit:I,children:[e.jsxs("div",{className:"space-y-6",children:[e.jsx(T,{className:"mb-4",children:"Enable and configure built-in agents to extend your system's capabilities."}),e.jsx("div",{className:"flex flex-col p-4 border border-gray-200 rounded-md",children:e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"font-medium text-solace-blue",children:A.webRequest.name}),e.jsx("p",{className:"text-sm text-gray-500",children:A.webRequest.description})]}),e.jsx($,{id:`toggle_${A.webRequest.id}`,checked:i.includes(A.webRequest.id),onChange:l=>y(A.webRequest.id,l)})]})}),e.jsxs("div",{className:"flex flex-col p-4 border border-gray-200 rounded-md",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"font-medium text-solace-blue",children:A.imageProcessing.name}),e.jsx("p",{className:"text-sm text-gray-500",children:A.imageProcessing.description})]}),e.jsx($,{id:`toggle_${A.imageProcessing.id}`,checked:i.includes(A.imageProcessing.id),onChange:l=>y(A.imageProcessing.id,l)})]}),i.includes(A.imageProcessing.id)&&e.jsxs("div",{className:"space-y-4 mt-4 pt-4 border-t border-gray-200",children:[e.jsx(S,{label:"Image Generation Provider",htmlFor:h.provider,error:o[h.provider],required:!0,children:e.jsx(B,{id:h.provider,name:h.provider,value:m[h.provider]||"",onChange:l=>E(l.target.value),options:ge})}),m[h.provider]==="openai_compatible"&&e.jsx(S,{label:"Image Generation Endpoint",htmlFor:h.endpoint,error:o[h.endpoint],required:!0,children:e.jsx(R,{id:h.endpoint,name:h.endpoint,type:"text",value:m[h.endpoint]||"",onChange:l=>C(h.endpoint,l.target.value),placeholder:"Enter endpoint URL"})}),e.jsx(S,{label:"Image Generation API Key",htmlFor:h.apiKey,error:o[h.apiKey],required:!0,children:e.jsx(R,{id:h.apiKey,name:h.apiKey,type:"password",value:m[h.apiKey]||"",onChange:l=>C(h.apiKey,l.target.value),placeholder:"Enter API key"})}),e.jsx(S,{label:"Image Generation Model",htmlFor:h.model,error:o[h.model],required:!0,children:e.jsx(W,{id:h.model,name:h.model,value:m[h.model]||"",onChange:l=>C(h.model,l.target.value),placeholder:"Select or type a model name",suggestions:N,onFocus:()=>{const l=m[h.provider]||"openai";l!=="openai_compatible"&&w(O[l]||[])}})})]})]})]}),e.jsxs("div",{className:"mt-8 flex justify-end space-x-4",children:[e.jsx(L,{onClick:a,variant:"outline",type:"button",children:"Previous"}),e.jsx(L,{type:"submit",children:"Next"})]})]})}const _e=[{value:"volume",label:"Volume: Use a local volume (directory) to store files"},{value:"bucket",label:"Bucket: Use a cloud bucket to store files (Must use AWS S3 API)"}];function je({data:s,updateData:t,onNext:c,onPrevious:a}){const[i,d]=g.useState({}),[m,v]=g.useState(""),[o,j]=g.useState(""),[N,w]=g.useState(""),[f,C]=g.useState(!1),[y,E]=g.useState(s.file_service_provider||"volume");g.useEffect(()=>{if(f)return;const r=s.file_service_provider||"volume";if(E(r),r==="volume"){let p="/tmp/solace-agent-mesh";if(s.file_service_config&&Array.isArray(s.file_service_config)){const u=s.file_service_config.find(k=>k.startsWith("directory="));u&&(p=u.split("=")[1])}v(p),s.file_service_config||t({file_service_provider:r,file_service_config:[`directory=${p}`]})}else if(r==="bucket"&&s.file_service_config&&Array.isArray(s.file_service_config)){const p=s.file_service_config.find(k=>k.startsWith("bucket_name=")),u=s.file_service_config.find(k=>k.startsWith("endpoint_url="));p&&j(p.split("=")[1]),u&&w(u.split("=")[1])}C(!0)},[s,f,t]);const M=r=>{const p=r.target.value;E(p),p==="volume"?t({file_service_provider:p,file_service_config:[`directory=${m||"/tmp/solace-agent-mesh"}`]}):p==="bucket"&&t({file_service_provider:p,file_service_config:[`bucket_name=${o}`,`endpoint_url=${N}`]})},I=r=>{const p=r.target.value;v(p),t({file_service_config:[`directory=${p}`]})},l=r=>{const p=r.target.value;j(p),t({file_service_config:[`bucket_name=${p}`,...N?[`endpoint_url=${N}`]:[]]})},x=r=>{const p=r.target.value;w(p),t({file_service_config:[...o?[`bucket_name=${o}`]:[],`endpoint_url=${p}`]})},_=()=>{const r={};let p=!0;return y==="volume"?m||(r.volumePath="Volume path is required",p=!1):y==="bucket"&&(o||(r.bucketName="Bucket name is required",p=!1),N||(r.endpointUrl="Endpoint URL is required",p=!1)),d(r),p},n=r=>{r.preventDefault(),_()&&c()};return e.jsxs("form",{onSubmit:n,children:[e.jsxs("div",{className:"space-y-6",children:[e.jsx(T,{className:"mb-4",children:"Choose how you want to store files in your Solace Agent Mesh system."}),e.jsx(S,{label:"File Service Provider",htmlFor:"file_service_provider",required:!0,children:e.jsx(B,{id:"file_service_provider",name:"file_service_provider",options:_e,value:y,onChange:M})}),y==="volume"&&e.jsx(S,{label:"Volume Path",htmlFor:"volumePath",helpText:"The directory path where files will be stored",error:i.volumePath,required:!0,children:e.jsx(R,{id:"volumePath",name:"volumePath",value:m,onChange:I,placeholder:"/tmp/solace-agent-mesh",autoFocus:!0})}),y==="bucket"&&e.jsxs(e.Fragment,{children:[e.jsx(S,{label:"Bucket Name",htmlFor:"bucketName",helpText:"The name of the S3 bucket to use for file storage",error:i.bucketName,required:!0,children:e.jsx(R,{id:"bucketName",name:"bucketName",value:o,onChange:l,placeholder:"my-s3-bucket"})}),e.jsx(S,{label:"Endpoint URL",htmlFor:"endpointUrl",helpText:"The S3 service endpoint URL",error:i.endpointUrl,required:!0,children:e.jsx(R,{id:"endpointUrl",name:"endpointUrl",value:N,onChange:x,placeholder:"https://s3.amazonaws.com"})}),e.jsxs(U,{children:[e.jsx("strong",{children:"Note:"})," You can setup the Boto3 authentication configuration in the ./solace-agent-mesh.yaml file"]})]})]}),e.jsxs("div",{className:"mt-8 flex justify-end space-x-4",children:[e.jsx(L,{onClick:a,variant:"outline",children:"Previous"}),e.jsx(L,{type:"submit",children:"Next"})]})]})}const ye=["llm","ai","api","url","vpn"],Ne=["broker_password","llm_api_key","embedding_api_key"],K={Project:["namespace"],Broker:["broker_type"],"AI Providers":["llm_model_name","llm_endpoint_url","llm_api_key","embedding_model_name","embedding_endpoint_url","embedding_api_key"],"Built-in Agents":["built_in_agent"],"File Service":["file_service_provider","file_service_config"]};function se({data:s,updateData:t,onPrevious:c}){const[a,i]=g.useState(!1),[d,m]=g.useState(null),v=g.useMemo(()=>{const n={};return Object.values(A).forEach(r=>{n[r.id]={name:r.name}}),n},[]),o=n=>n===void 0||n===""||Array.isArray(n)&&n.length===0,j=n=>n.split("_").map(r=>ye.includes(r.toLowerCase())?r.toUpperCase():r.charAt(0).toUpperCase()+r.slice(1)).join(" "),N=(n,r)=>Ne.includes(n)||n.toUpperCase().includes("API_KEY")?r&&r.length>0?"••••••••":"Not provided":typeof r=="boolean"?r?"Yes":"No":Array.isArray(r)?r.join(", "):r&&r.toString().length>0?r.toString():"Not provided",w=n=>{switch(n){case"solace":return"Existing Solace Pub/Sub+ broker";case"container":return"New local Solace PubSub+ broker container (podman/docker)";case"dev_mode":return"Run in 'dev mode' - all in one process (not recommended for production)";default:return n}},f=()=>{const n=s.broker_type;return n?e.jsxs("div",{children:[e.jsxs("div",{className:"mb-1",children:[e.jsx("span",{className:"text-gray-600",children:"Type:"}),e.jsx("span",{className:"font-medium text-gray-900 ml-2",children:w(n)})]}),n==="container"&&e.jsx("div",{className:"pl-4 border-l-2 border-gray-300 mb-2",children:e.jsxs("div",{className:"flex mb-1",children:[e.jsx("span",{className:"text-gray-600",children:"Container Engine:"}),e.jsx("span",{className:"font-medium text-gray-900 ml-2",children:s.container_engine??"Docker"})]})}),(n==="solace"||n==="container")&&e.jsxs("div",{className:"pl-4 border-l-2 border-gray-300",children:[e.jsxs("div",{className:"flex mb-1",children:[e.jsx("span",{className:"text-gray-600",children:"Broker URL:"}),e.jsx("span",{className:"font-medium text-gray-900 ml-2",children:s.broker_url})]}),e.jsxs("div",{className:"flex mb-1",children:[e.jsx("span",{className:"text-gray-600",children:"Broker VPN:"}),e.jsx("span",{className:"font-medium text-gray-900 ml-2",children:s.broker_vpn})]}),e.jsxs("div",{className:"flex mb-1",children:[e.jsx("span",{className:"text-gray-600",children:"Username:"}),e.jsx("span",{className:"font-medium text-gray-900 ml-2",children:s.broker_username})]}),e.jsxs("div",{className:"flex mb-1",children:[e.jsx("span",{className:"text-gray-600",children:"Password:"}),e.jsx("span",{className:"font-medium text-gray-900 ml-2",children:N("broker_password",s.broker_password)})]})]})]}):null},C=n=>e.jsx("div",{className:"space-y-2 pl-1",children:n.map(r=>{const p=v[r]||{name:r};return e.jsxs("div",{className:"flex items-center",children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 text-green-600 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),e.jsx("div",{children:e.jsx("span",{className:"font-medium text-gray-900",children:p.name})})]},r)})}),y=n=>{var u,k,F;const r=n.some(z=>z.startsWith("directory=")),p=n.some(z=>z.startsWith("bucket_name="));if(r){const z=(u=n.find(b=>b.startsWith("directory=")))==null?void 0:u.split("=")[1];return e.jsx("div",{className:"pl-4 border-l-2 border-gray-300",children:e.jsxs("div",{className:"flex mb-1",children:[e.jsx("span",{className:"text-gray-600",children:"Volume Path:"}),e.jsx("span",{className:"font-medium text-gray-900 ml-2",children:z})]})})}if(p){const z=(k=n.find(P=>P.startsWith("bucket_name=")))==null?void 0:k.split("=")[1],b=(F=n.find(P=>P.startsWith("endpoint_url=")))==null?void 0:F.split("=")[1];return e.jsxs("div",{className:"pl-4 border-l-2 border-gray-300",children:[e.jsxs("div",{className:"flex mb-1",children:[e.jsx("span",{className:"text-gray-600",children:"Bucket Name:"}),e.jsx("span",{className:"font-medium text-gray-900 ml-2",children:z})]}),e.jsxs("div",{className:"flex mb-1",children:[e.jsx("span",{className:"text-gray-600",children:"Endpoint URL:"}),e.jsx("span",{className:"font-medium text-gray-900 ml-2",children:b})]})]})}return e.jsx("div",{className:"font-medium text-gray-900",children:n.join(", ")})},E=n=>{const r=Q.find(p=>p.value===n);return r?r.label:n},M=(n,r)=>r.some(u=>!o(s[u]))?n==="AI Providers"?e.jsxs("div",{className:"pb-4 mb-4 border-b border-gray-300 last:border-0 last:mb-0 last:pb-0",children:[e.jsx("h4",{className:"font-semibold text-solace-blue mb-3",children:n}),e.jsxs("div",{className:"space-y-3",children:[s.llm_model_name&&e.jsxs("div",{className:"flex mb-1",children:[e.jsx("span",{className:"text-gray-600",children:"LLM Model Name:"}),e.jsx("span",{className:"font-medium text-gray-900 ml-2",children:s.llm_model_name})]}),s.llm_provider&&e.jsxs("div",{className:"flex mb-1",children:[e.jsx("span",{className:"text-gray-600",children:"LLM Provider:"}),e.jsx("span",{className:"font-medium text-gray-900 ml-2",children:E(s.llm_provider)})]}),s.llm_provider==="openai_compatible"&&s.llm_endpoint_url&&e.jsxs("div",{className:"flex mb-1",children:[e.jsx("span",{className:"text-gray-600",children:"LLM Endpoint URL:"}),e.jsx("span",{className:"font-medium text-gray-900 ml-2",children:s.llm_endpoint_url})]}),s.llm_api_key&&e.jsxs("div",{className:"flex mb-1",children:[e.jsx("span",{className:"text-gray-600",children:"LLM API Key:"}),e.jsx("span",{className:"font-medium text-gray-900 ml-2",children:N("llm_api_key",s.llm_api_key)})]}),s.setupPath==="advanced"&&e.jsx(e.Fragment,{children:s.embedding_service_enabled===!0&&e.jsxs(e.Fragment,{children:[s.embedding_model_name&&e.jsxs("div",{className:"flex mb-1",children:[e.jsx("span",{className:"text-gray-600",children:"Embedding Model Name:"}),e.jsx("span",{className:"font-medium text-gray-900 ml-2",children:s.embedding_model_name})]}),s.embedding_provider&&e.jsxs("div",{className:"flex mb-1",children:[e.jsx("span",{className:"text-gray-600",children:"Embedding Provider:"}),e.jsx("span",{className:"font-medium text-gray-900 ml-2",children:E(s.embedding_provider)})]}),s.embedding_provider==="openai_compatible"&&s.embedding_endpoint_url&&e.jsxs("div",{className:"flex mb-1",children:[e.jsx("span",{className:"text-gray-600",children:"Embedding Endpoint URL:"}),e.jsx("span",{className:"font-medium text-gray-900 ml-2",children:s.embedding_endpoint_url})]}),s.embedding_api_key&&e.jsxs("div",{className:"flex mb-1",children:[e.jsx("span",{className:"text-gray-600",children:"Embedding API Key:"}),e.jsx("span",{className:"font-medium text-gray-900 ml-2",children:N("embedding_api_key",s.embedding_api_key)})]})]})})]})]},n):e.jsxs("div",{className:"pb-4 mb-4 border-b border-gray-300 last:border-0 last:mb-0 last:pb-0",children:[e.jsx("h4",{className:"font-semibold text-solace-blue mb-3",children:n}),e.jsx("div",{className:"space-y-3",children:r.map(u=>o(s[u])?null:u==="broker_type"?e.jsx("div",{children:f()},u):u==="built_in_agent"&&Array.isArray(s[u])?e.jsx("div",{children:C(s[u])},u):u==="file_service_config"&&Array.isArray(s[u])?e.jsx("div",{children:y(s[u])},u):e.jsxs("div",{className:"flex mb-1",children:[e.jsxs("span",{className:"text-gray-600",children:[j(u),":"]}),e.jsx("span",{className:"font-medium text-gray-900 ml-2",children:N(u,s[u])})]},u))})]},n):null,I=n=>{if(n.namespace&&!n.namespace.endsWith("/")&&(n.namespace+="/"),n.container_started&&delete n.container_started,n.llm_provider&&(n.llm_provider=Z[n.llm_provider]),n.embedding_provider&&(n.embedding_provider=pe[n.embedding_provider]),n.llm_model_name&&n.llm_provider&&(n.llm_model_name=V(n.llm_model_name,n.llm_provider),delete n.llm_provider),n.embedding_service_enabled||(n.embedding_api_key="",n.embedding_model_name="",n.embedding_endpoint_url=""),n.embedding_model_name&&n.embedding_provider&&(n.embedding_model_name=V(n.embedding_model_name,n.embedding_provider),delete n.embedding_provider),n.env_var&&Array.isArray(n.env_var)){let r="",p="";if(n.env_var.forEach(u=>{u.startsWith("IMAGE_GEN_PROVIDER=")&&(r=u.split("=")[1]),u.startsWith("IMAGE_GEN_MODEL=")&&(p=u.split("=")[1])}),r&&p){const u=xe[r]||r,k=V(p,u);n.env_var=n.env_var.map(F=>F.startsWith("IMAGE_GEN_MODEL=")?`IMAGE_GEN_MODEL=${k}`:F.startsWith("IMAGE_GEN_PROVIDER=")?null:F).filter(Boolean)}}},l=async(n=!0)=>{I(s),console.log("Submitting configuration:",s);try{const r=await fetch("api/save_config",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n?{...s,force:!0}:s)}),p=await r.json();if(!r.ok)throw new Error(`HTTP error ${r.status}: ${p.message??"Unknown error"}`);if(p.status==="success"){console.log("Configuration sent successfully!"),t({showSuccess:!0});try{const u=await fetch("api/shutdown",{method:"POST"});u.ok?console.log("Shutdown request sent successfully"):console.warn("Shutdown request failed:",u.status)}catch(u){console.error("Error sending shutdown request:",u)}}else throw new Error(p.message??"Failed to save configuration")}catch(r){m(r instanceof Error?r.message:"An unknown error occurred"),console.error("Error saving configuration:",r)}finally{i(!1)}},x=async()=>{i(!0),m(null),await l()},_=n=>{n.preventDefault(),x()};return e.jsx("div",{className:"space-y-6",children:e.jsxs("form",{onSubmit:_,children:[e.jsx("div",{className:"bg-gray-100 border border-gray-300 rounded-md p-5 space-y-4",children:s.setupPath==="quick"?M("AI Providers",K["AI Providers"]):Object.entries(K).map(([n,r])=>M(n,r))}),d&&e.jsxs("div",{className:"p-4 bg-red-50 text-red-700 rounded-md border border-red-200",children:[e.jsx("p",{className:"font-medium",children:"Error initializing project"}),e.jsx("p",{children:d})]}),e.jsxs("div",{className:"mt-8 flex justify-end space-x-4",children:[e.jsx(L,{onClick:c,variant:"outline",type:"button",children:"Previous"}),e.jsx(L,{type:"submit",disabled:a,children:a?e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsxs("svg",{className:"animate-spin -ml-1 mr-2 h-4 w-4 text-white",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),e.jsx("span",{children:"Initializing..."})]}):"Initialize Project"})]})]})})}const we=({icon:s,title:t,description:c,time:a,link:i})=>e.jsx("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:"block bg-white rounded-lg shadow-sm border border-gray-100 hover:shadow-md transition-all duration-200 hover:border-solace-blue/30 group h-full",children:e.jsxs("div",{className:"p-5 flex flex-col h-full",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("div",{className:"flex items-center",children:[e.jsx("span",{className:"text-2xl mr-3",children:s}),e.jsx("h4",{className:"text-lg font-medium text-gray-800 group-hover:text-solace-blue transition-colors",children:t})]}),e.jsx("div",{className:"bg-gray-100 text-gray-600 px-3 py-1 rounded-full text-xs font-medium",children:a})]}),e.jsx("p",{className:"text-gray-600 text-sm flex-grow mb-4",children:c}),e.jsx("div",{className:"mt-auto flex justify-end",children:e.jsxs("span",{className:"text-solace-blue text-sm font-medium flex items-center group-hover:translate-x-1 transition-transform",children:["View Tutorial",e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 ml-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 5l7 7-7 7"})})]})})]})}),ke=({icon:s,title:t,description:c,link:a})=>e.jsxs("a",{href:a,target:"_blank",rel:"noopener noreferrer",className:"flex p-4 bg-gray-50 hover:bg-gray-100 rounded-lg border border-gray-200 transition-colors group",children:[e.jsx("div",{className:"mr-4 bg-solace-blue bg-opacity-10 p-3 rounded-lg text-solace-blue group-hover:bg-opacity-20",children:s}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-medium text-gray-800",children:t}),e.jsx("p",{className:"text-sm text-gray-600",children:c})]})]});function Se({text:s}){const[t,c]=g.useState(!1),a=async()=>{try{await navigator.clipboard.writeText(s),c(!0),setTimeout(()=>c(!1),2e3)}catch(d){console.error("Failed to copy text:",d)}},i=()=>t?e.jsx("svg",{className:"w-5 h-5 text-green-500 transition-all duration-300",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"})}):e.jsx("svg",{className:"w-5 h-5 transition-all duration-300",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"})});return e.jsx("button",{onClick:a,className:"text-white transition-colors opacity-100","aria-label":t?"Copied":"Copy to clipboard",children:i()})}function Ce(){const[s,t]=g.useState("getting-started"),c=3,a=s==="getting-started"?0:s==="tutorials"?1:2,i=f=>f===0?"tutorials":f===1?"documentation":"getting-started",d=f=>f===1?"getting-started":f===2?"tutorials":"documentation",m=()=>{if(a<c-1){const f=i(a);t(f)}},v=()=>{if(a>0){const f=d(a);t(f)}},o=f=>{const C="px-4 py-3 text-sm font-medium ";return s===f?C+"text-solace-blue border-b-2 border-solace-blue":C+"text-gray-500 hover:text-solace-blue"},j=[{icon:"🌤️",title:"Weather Agent",description:"Build an agent that gives Solace Agent Mesh the ability to access real-time weather information.",time:"~5 min",link:"https://github.com/SolaceLabs/solace-agent-mesh-core-plugins/tree/main/sam-geo-information"},{icon:"🗃️",title:"SQL Database Integration",description:"Enable Solace Agent Mesh to answer company-specific questions using a sample coffee company database.",time:"~10-15 min",link:"https://solacelabs.github.io/solace-agent-mesh/docs/documentation/tutorials/sql-database"},{icon:"🧠",title:"MCP Integration",description:"Integrating a Model Context Protocol (MCP) Server into Solace Agent Mesh.",time:"~10-15 min",link:"https://solacelabs.github.io/solace-agent-mesh/docs/documentation/tutorials/mcp-integration"},{icon:"💬",title:"Slack Integration",description:"Chat with Solace Agent Mesh directly from Slack.",time:"~20-30 min",link:"https://solacelabs.github.io/solace-agent-mesh/docs/documentation/tutorials/slack-integration"}],N=[{icon:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})}),title:"Getting Started",description:"Introduction and basic concepts",link:"https://solacelabs.github.io/solace-agent-mesh/docs/documentation/getting-started/introduction/"},{icon:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M4 5a1 1 0 011-1h14a1 1 0 011 1v2a1 1 0 01-1 1H5a1 1 0 01-1-1V5zM4 13a1 1 0 011-1h6a1 1 0 011 1v6a1 1 0 01-1 1H5a1 1 0 01-1-1v-6zM16 13a1 1 0 011-1h2a1 1 0 011 1v6a1 1 0 01-1 1h-2a1 1 0 01-1-1v-6z"})}),title:"Architecture",description:"System architecture and design",link:"https://solacelabs.github.io/solace-agent-mesh/docs/documentation/getting-started/component-overview"},{icon:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122"})}),title:"Tutorials",description:"Step-by-step guides",link:"https://solacelabs.github.io/solace-agent-mesh/docs/documentation/tutorials/event-mesh-gateway"},{icon:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"})}),title:"User Guides",description:"User Guides for various components",link:"https://solacelabs.github.io/solace-agent-mesh/docs/documentation/user-guide/solace-ai-connector"}],w=()=>s==="getting-started"?e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"p-6 bg-white rounded-lg shadow-sm border border-gray-100",children:[e.jsxs("h3",{className:"text-lg font-medium text-gray-800 mb-4 flex items-center",children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 mr-2 text-solace-blue",viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{d:"M11 3a1 1 0 10-2 0v1a1 1 0 102 0V3zM15.657 5.757a1 1 0 00-1.414-1.414l-.707.707a1 1 0 001.414 1.414l.707-.707zM18 10a1 1 0 01-1 1h-1a1 1 0 110-2h1a1 1 0 011 1zM5.05 6.464A1 1 0 106.464 5.05l-.707-.707a1 1 0 00-1.414 1.414l.707.707zM5 10a1 1 0 01-1 1H3a1 1 0 110-2h1a1 1 0 011 1zM8 16v-1h4v1a2 2 0 11-4 0zM12 14c.015-.34.208-.646.477-.859a4 4 0 10-4.954 0c.27.213.462.519.476.859h4.002z"})}),"Your Configuration Files"]}),e.jsx("p",{className:"text-gray-600 mb-4",children:"Your configurations have been saved in the following files:"}),e.jsxs("div",{className:"flex space-x-4 mb-4",children:[e.jsxs("div",{className:"bg-gray-50 px-4 py-3 rounded-md border border-gray-200 flex-1 flex items-center",children:[e.jsx("code",{className:"text-solace-blue font-mono",children:".env"}),e.jsx("span",{className:"ml-3 text-gray-500 text-sm",children:"Environment variables"})]}),e.jsxs("div",{className:"bg-gray-50 px-4 py-3 rounded-md border border-gray-200 flex-1 flex items-center",children:[e.jsx("code",{className:"text-solace-blue font-mono",children:"solace-agent-mesh.yaml"}),e.jsx("span",{className:"ml-3 text-gray-500 text-sm",children:"Configuration file"})]})]})]}),e.jsxs("div",{className:"p-6 bg-white rounded-lg shadow-sm border border-gray-100",children:[e.jsxs("h3",{className:"text-lg font-medium text-gray-800 mb-4 flex items-center",children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 mr-2 text-solace-blue",viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M12.316 3.051a1 1 0 01.633 1.265l-4 12a1 1 0 11-1.898-.632l4-12a1 1 0 011.265-.633zM5.707 6.293a1 1 0 010 1.414L3.414 10l2.293 2.293a1 1 0 11-1.414 1.414l-3-3a1 1 0 010-1.414l3-3a1 1 0 011.414 0zm8.586 0a1 1 0 011.414 0l3 3a1 1 0 010 1.414l-3 3a1 1 0 11-1.414-1.414L16.586 10l-2.293-2.293a1 1 0 010-1.414z",clipRule:"evenodd"})}),"Start the Service"]}),e.jsx("p",{className:"text-gray-600 mb-4",children:"To start Solace Agent Mesh directly, run:"}),e.jsxs("div",{className:"bg-gray-800 text-gray-200 p-4 rounded-md font-mono text-sm mb-4 flex items-center justify-between group relative",children:[e.jsx("code",{children:"sam run -b"}),e.jsx(Se,{text:"sam run -b"})]}),e.jsxs("p",{className:"text-gray-600",children:["You can use ",e.jsx("code",{className:"bg-gray-100 px-1 py-0.5 rounded",children:"sam"})," as a shorthand for ",e.jsx("code",{className:"bg-gray-100 px-1 py-0.5 rounded",children:"solace-agent-mesh"})," in all commands."]})]})]}):s==="tutorials"?e.jsxs("div",{children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h3",{className:"text-lg font-medium text-gray-800 mb-2",children:"Hands-on Tutorials"}),e.jsx("p",{className:"text-gray-600",children:"Ready to go further? Here are some practical tutorials to help you leverage the full potential of Solace Agent Mesh."})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:j.map(f=>e.jsx(we,{icon:f.icon,title:f.title,description:f.description,time:f.time,link:f.link},f.title))})]}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"p-6 bg-white rounded-lg shadow-sm border border-gray-100",children:[e.jsxs("h3",{className:"text-lg font-medium text-gray-800 mb-4 flex items-center",children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 mr-2 text-solace-blue",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M12 6.253v13m0-13C10.832 5.477 9.246 5 7.5 5S4.168 5.477 3 6.253v13C4.168 18.477 5.754 18 7.5 18s3.332.477 4.5 1.253m0-13C13.168 5.477 14.754 5 16.5 5c1.747 0 3.332.477 4.5 1.253v13C19.832 18.477 18.247 18 16.5 18c-1.746 0-3.332.477-4.5 1.253"})}),"Documentation Resources"]}),e.jsx("p",{className:"text-gray-600 mb-6",children:"Explore our comprehensive documentation to get the most out of Solace Agent Mesh:"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:N.map(f=>e.jsx(ke,{icon:f.icon,title:f.title,description:f.description,link:f.link},f.title))}),e.jsx("div",{className:"mt-6 text-center",children:e.jsxs("a",{href:"https://solacelabs.github.io/solace-agent-mesh/docs/documentation/getting-started/introduction/",target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center px-5 py-2 rounded-md bg-solace-blue text-white hover:bg-solace-blue-dark transition-colors",children:["View Documentation",e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-4 w-4 ml-2",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M14 5l7 7m0 0l-7 7m7-7H3"})})]})})]}),e.jsxs("div",{className:"p-6 bg-gradient-to-b from-solace-blue-light to-blue-50 rounded-lg text-center",children:[e.jsx("h3",{className:"text-lg font-medium text-solace-blue mb-2",children:"Connect with the Community"}),e.jsx("p",{className:"text-gray-600 mb-4",children:"Solace Agent Mesh is open source! We welcome contributions and discussions from the community."}),e.jsxs("div",{className:"mt-6 flex flex-col sm:flex-row justify-center items-stretch gap-4",children:[e.jsxs("a",{href:"https://github.com/SolaceLabs/solace-agent-mesh",target:"_blank",rel:"noopener noreferrer",className:"w-full sm:w-1/2 p-4 rounded-md bg-white text-solace-blue border border-solace-blue hover:bg-solace-blue hover:text-white transition-colors flex flex-col items-center justify-center group",children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 24 24",className:"mb-2 text-solace-blue group-hover:text-white transition-colors",children:e.jsx("path",{d:"M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z",fill:"currentColor"})}),e.jsx("span",{className:"font-medium",children:"GitHub Repository"})]}),e.jsxs("a",{href:"https://solace.community/c/solace-agent-mesh/16",target:"_blank",rel:"noopener noreferrer",className:"w-full sm:w-1/2 p-4 rounded-md bg-white text-solace-blue border border-solace-blue hover:bg-solace-blue hover:text-white transition-colors flex flex-col items-center justify-center group",children:[e.jsx("img",{src:"Solace_community_logo.png",alt:"Solace Community Forum Logo",className:"max-h-8 mb-2 object-contain"}),e.jsx("span",{className:"font-medium",children:"Community Forum"})]})]})]})]});return e.jsxs("div",{className:"max-w-5xl mx-auto",children:[e.jsxs("div",{className:"p-8 bg-gradient-to-br from-green-50 to-blue-50 rounded-xl mb-8 text-center relative overflow-hidden",children:[e.jsxs("div",{className:"relative z-10",children:[e.jsx("div",{className:"inline-block bg-green-100 p-3 rounded-full mb-4",children:e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-10 w-10 text-green-600",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z"})})}),e.jsx("h2",{className:"text-2xl font-bold text-gray-800 mb-2",children:"Solace Agent Mesh Initialized Successfully!"}),e.jsx("p",{className:"text-gray-600 mb-6 max-w-2xl mx-auto",children:"Your configuration has been saved and your project has been set up. You're now ready to start exploring the capabilities of Solace Agent Mesh."}),e.jsxs("div",{className:"inline-flex items-center px-4 py-2 bg-solace-blue text-white rounded-full shadow-sm",children:[e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 mr-2",viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm1-11a1 1 0 10-2 0v3.586L7.707 9.293a1 1 0 00-1.414 1.414l3 3a1 1 0 001.414 0l3-3a1 1 0 00-1.414-1.414L11 10.586V7z",clipRule:"evenodd"})}),"Configuration saved successfully"]})]}),e.jsx("div",{className:"absolute top-0 right-0 -mt-10 -mr-10 h-40 w-40 bg-green-200 opacity-50 rounded-full"}),e.jsx("div",{className:"absolute bottom-0 left-0 -mb-10 -ml-10 h-32 w-32 bg-green-200 opacity-50 rounded-full"})]}),e.jsxs("div",{className:"flex items-center mb-6 border-b",children:[e.jsxs("div",{className:"flex-1 flex",children:[e.jsx("button",{onClick:()=>t("getting-started"),className:o("getting-started"),children:"Getting Started"}),e.jsx("button",{onClick:()=>t("tutorials"),className:o("tutorials"),children:"Tutorials"}),e.jsx("button",{onClick:()=>t("documentation"),className:o("documentation"),children:"Documentation"})]}),e.jsxs("div",{className:"text-gray-500 text-sm mr-4 flex items-center",children:["Page ",a+1," of ",c]})]}),w(),e.jsxs("div",{className:"mt-8 flex justify-between items-center",children:[e.jsx("div",{className:"text-sm text-gray-500",children:e.jsxs("span",{className:"md:hidden",children:["Page ",a+1," of ",c]})}),e.jsxs("div",{className:"flex space-x-4",children:[e.jsx(L,{onClick:v,variant:"outline",type:"button",disabled:a===0,children:"Previous"}),e.jsx(L,{onClick:m,type:"button",disabled:a===c-1,children:"Next"})]})]})]})}const G={id:"path-selection",title:"Setup Path",description:"Choose your setup path",component:ie},Y=[{id:"project-setup",title:"Project Structure",description:"Set up your project namespace",component:le},{id:"broker-setup",title:"Broker Setup",description:"Configure your Solace PubSub+ broker connection",component:de},{id:"ai-provider-setup",title:"AI Provider",description:"Configure your AI services",component:ee},{id:"builtin-agent-setup",title:"Built-in Agents",description:"Enable and configure built-in agents",component:ve},{id:"file-service-setup",title:"File Service",description:"Configure storage for your files",component:je},{id:"completion",title:"Review & Submit",description:"Finalize your configuration",component:se}],H=[{id:"ai-provider-setup",title:"AI Provider",description:"Configure your AI services",component:ee},{id:"completion",title:"Review & Submit",description:"Finalize your configuration",component:se}];function Ee(){const[s,t]=g.useState(0),[c,a]=g.useState({}),[i,d]=g.useState(!1),[m,v]=g.useState(null),[o,j]=g.useState(null),[N,w]=g.useState(!1),[f,C]=g.useState([G]);g.useEffect(()=>{o&&(d(!0),fetch(`/api/default_options?path=${o}`).then(r=>{if(!r.ok)throw new Error("Failed to fetch default options");return r.json()}).then(r=>{if(r!=null&&r.default_options){const p=r.default_options;y(p),a({...c,...p}),d(!1)}else throw new Error("Invalid response format")}).catch(r=>{console.error("Error fetching default options:",r),v("Failed to connect to server, is the init process still running?"),d(!1)}))},[o]);const y=r=>{r.llm_model_name&&delete r.llm_model_name,r.embedding_model_name&&delete r.embedding_model_name};g.useEffect(()=>{o==="quick"?C([G,...H]):o==="advanced"&&C([G,...Y])},[o]);const E=f[s],M=r=>{r.setupPath&&r.setupPath!==o&&j(r.setupPath),r.showSuccess===!0&&w(!0),a({...c,...r})},I=()=>{s<f.length-1&&t(s+1)},l=()=>{s>0&&t(s-1)};if(i&&s>0)return e.jsxs("div",{className:"max-w-4xl mx-auto p-6 flex flex-col items-center justify-center min-h-[400px]",children:[e.jsx("h1",{className:"text-3xl font-bold mb-8 text-solace-blue",children:"Solace Agent Mesh Initialization"}),e.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6 w-full text-center",children:[e.jsxs("div",{className:"animate-pulse flex flex-col items-center",children:[e.jsx("div",{className:"h-4 w-1/2 bg-gray-200 rounded mb-4"}),e.jsx("div",{className:"h-10 w-3/4 bg-gray-200 rounded"})]}),e.jsx("p",{className:"mt-4",children:"Loading configuration options..."})]})]});if(m)return e.jsxs("div",{className:"max-w-4xl mx-auto p-6",children:[e.jsx("h1",{className:"text-3xl font-bold mb-8 text-center text-solace-blue",children:"Solace Agent Mesh Initialization"}),e.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:[e.jsxs("div",{className:"bg-red-100 border-l-4 border-red-500 text-red-700 p-4",role:"alert",children:[e.jsx("p",{className:"font-bold",children:"Error"}),e.jsx("p",{children:m})]}),e.jsx("div",{className:"mt-4 flex justify-center",children:e.jsx("button",{onClick:()=>window.location.reload(),className:"bg-solace-blue hover:bg-blue-700 text-white font-bold py-2 px-4 rounded",children:"Retry"})})]})]});if(N)return e.jsx("div",{className:"max-w-4xl mx-auto p-6",children:e.jsx(Ce,{})});const x=E.component,_=s>0,n=()=>o==="quick"?H:o==="advanced"?Y:[];return e.jsxs("div",{className:"max-w-4xl mx-auto p-6",children:[e.jsx("h1",{className:"text-3xl font-bold mb-8 text-center text-solace-blue",children:"Solace Agent Mesh Initialization"}),_&&e.jsx("div",{className:"mb-8",children:e.jsx(re,{steps:n(),currentStepIndex:s>0?s-1:0,onStepClick:r=>{}})}),e.jsxs("div",{className:"bg-white rounded-lg shadow-md p-6 mb-6",children:[e.jsx("h2",{className:"text-xl font-bold mb-2 text-solace-blue",children:E.title}),e.jsx("p",{className:"text-gray-600 mb-6",children:E.description}),e.jsx(x,{data:c,updateData:M,onNext:I,onPrevious:l})]})]})}const Me=()=>[{title:"Solace Agent Mesh Initializer"},{name:"description",content:"Initialize your Solace Agent Mesh project"}];function Ae(){return e.jsx("div",{className:"min-h-screen bg-gray-50 py-8",children:e.jsx(Ee,{})})}export{Ae as default,Me as meta};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|