diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json index 638dfa8..23bcdbe 100644 --- a/.claude-plugin/marketplace.json +++ b/.claude-plugin/marketplace.json @@ -10,7 +10,7 @@ "name": "genesys-cloud-architect", "source": "./", "description": "Create, test, and debug Genesys Cloud Architect flows", - "version": "2.0.5" + "version": "2.0.6" } ] } diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json index 3eff0af..d8f9c9e 100644 --- a/.claude-plugin/plugin.json +++ b/.claude-plugin/plugin.json @@ -1,7 +1,7 @@ { "name": "genesys-cloud-architect", "description": "Create, test, and debug Genesys Cloud Architect flows", - "version": "2.0.5", + "version": "2.0.6", "author": { "name": "Lucas Woodward", "url": "https://makingchatbots.com/" diff --git a/package.json b/package.json index 8a5a1a9..256406f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "genesys-cloud-architect", - "version": "2.0.5", + "version": "2.0.6", "private": true, "packageManager": "pnpm@11.1.3+sha512.c85357fe17ca12dd23dd7071822666dfd7e3cb76fe214e3370b5ea2fb34f2a231185509b63e717f3cd0acb38dd3f8d82bcd5e8172400ae678b70ea4fbed0896d", "author": { diff --git a/servers/genesys-cloud-architect-mcp.js b/servers/genesys-cloud-architect-mcp.js index daaaa4b..7b9cb38 100644 --- a/servers/genesys-cloud-architect-mcp.js +++ b/servers/genesys-cloud-architect-mcp.js @@ -138,7 +138,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs. `).trim();w="",x&&l.push({level:"error",message:a(x)})},A=setTimeout(()=>{d.kill("SIGTERM"),f(),c?.success?m():h(`Deploy timed out after ${O1/1e3}s.`)},O1);d.on("error",x=>{h(`Failed to start deploy runner: ${x.message}`)});let b="";d.stdout.on("data",x=>{b+=x.toString();let y=b.split(` `);b=y.pop()??"";for(let T of y)g(T)}),d.on("close",x=>{g(b.trim()),f(),c?.success?m():h(c?.error??`Deploy runner exited with code ${x}`)})})}});function Rn(t){if(t===null||typeof t!="object")return{message:String(t)};let e="status"in t&&typeof t.status=="number"?t.status:void 0,n="code"in t&&typeof t.code=="string"&&t.code.length>0?t.code:void 0,i="message"in t&&typeof t.message=="string"&&t.message.length>0?t.message:void 0;return{status:e,code:n,message:i}}function Ht(t,e){return t===401?" The access token is missing or expired; re-authenticate (restart the MCP server) and retry.":t===403?` The OAuth client needs the '${e}' permission.`:""}function Bn(t){let{status:e,code:n,message:i}=Rn(t),a=[];return e!==void 0?a.push(`HTTP ${e}${n?` (${n})`:""}`):n&&a.push(n),i&&a.push(i),a.length>0?a.join(": "):"Unknown error"}function Gr(t){return(t??"").toLowerCase()}function Ha(t,e){return Gr(t.name)===Gr(e)}function Ph(t,e){return t.slice().sort((n,i)=>Number(Ha(i,e))-Number(Ha(n,e)))}var vie=50,Cie=200;function Aie(t){return t.trim().split(/\s+/).map(e=>`*${e.replace(/^\*+|\*+$/g,"")}*`).join(" ")}function bie(t){return{id:t.id??"",name:t.name,type:t.type??"",publishedVersion:t.publishedVersion?.commitVersion??null,...t.description?{description:t.description}:{}}}var xie={name:K.string().min(1).describe("The flow name, or some words from it, to search for. Every word must appear somewhere in the flow name, case-insensitively and in any order, so 'payment' finds 'Book_Payment' and 'Returns' finds 'UK_Returns_Desk Main Flow'. Wildcards are added automatically; do not include asterisks."),type:K.array(K.string()).optional().describe('Optional flow types to restrict the search to, e.g. ["inboundcall"], ["bot", "digitalbot"], ["workflow"]. Omit to search flows of every type.')},q1=({architectApi:t})=>({config:{description:"Finds Genesys Cloud Architect flows by name, resolving the human-readable name users know (e.g. 'Book_Payment') to the flow id every other flow tool requires. Returns each matching flow's id, name, type and published version. Matching is a case-insensitive search over flow names in which every word of the query must appear somewhere in the name, in any order, so a fragment of a word or a few words from the name both work; flows whose name equals the query exactly are listed first. The returned id is accepted verbatim by flow_ir, flow_action, search_in_flow, flow_dependencies and flow_versions. A publishedVersion of null means the flow has never been published.",annotations:{title:"Find Flow",readOnlyHint:!0,destructiveHint:!1},inputSchema:xie},handler:async({name:e,type:n})=>{try{let i=[],a=Aie(e),r=0,s=1;for(;;){let u=await t.getFlows({name:a,pageSize:100,pageNumber:s,...n?.length?{type:n}:{}});if(u.entities&&i.push(...u.entities),r=u.total??r,!u.nextUri||i.length>=Cie)break;s++}r=Math.max(r,i.length);let o=Ph(i,e).slice(0,vie),l=[];if(o.length===0)l.push(`No flows matched "${e}". Every word of the query must appear in the flow name, so drop words you are unsure of (keep the most distinctive one), or drop the type filter if one was given.`);else if(r>o.length){let u=`${r} flows matched; only ${o.length} are returned${Ha(o[0],e)?", exact name matches first":""}.`;i.length0?{notes:l}:{}};return{content:[{type:"text",text:JSON.stringify(c)}]}}catch(i){return{isError:!0,content:[{type:"text",text:`Failed to search for flows: ${Bn(i)}`}]}}}});var jh=200,_1=10;function H1(t){return t&&t!=="NONE"?t:void 0}function yie(t){let e=H1(t.flowErrorReason),n=H1(t.flowWarningReason);return{executionId:t.id??"",flowId:t.flowId??null,flowName:t.flowName??null,flowType:t.flowType??null,flowVersion:t.flowVersion??null,conversationId:t.conversationId??null,...t.workitemId?{workitemId:t.workitemId}:{},startDateTime:t.startDateTime??null,endDateTime:t.endDateTime??null,...e?{flowErrorReason:e}:{},...n?{flowWarningReason:n}:{}}}function Pie(t,e){return(t.startDateTime??"").localeCompare(e.startDateTime??"")}async function jie(t){try{return(await t.getFlowsInstancesSettingsExecutiondata()).enabled}catch{return}}var Sie={conversationId:K.string().min(1).optional().describe("The Genesys Cloud conversation id. Returns every flow instance that conversation ran, so a call that went through an inbound flow and then an in-queue flow yields two entries. Preferred filter: it is what the API indexes on."),flowId:K.string().min(1).optional().describe("The Architect flow id. Returns recent instances of that flow, whichever conversation ran them. Combine with conversationId to pick one flow out of a conversation."),onlyWithErrors:K.boolean().optional().describe("When true, only instances that ended with a flow error are returned (flowErrorReason is set). Applied to the instances the query fetched, so with a busy flow the errored runs beyond the API's 200-instance cap are not seen. Use it to find the runs worth inspecting with flow_execution_data.")},I1=({architectApi:t})=>({config:{description:`Finds the recorded executions (flow instances) of Genesys Cloud Architect flows, by conversation id and/or flow id. Returns each instance's executionId, flow id/name/type/version, conversationId, start and end times, and any flowErrorReason or flowWarningReason, oldest first. Use it to answer 'what did this conversation do' or 'has this flow been failing', then pass an executionId to flow_execution_data for the action-by-action log. Only the last ${_1} days are retained, the API cannot filter by date, and at most ${jh} instances are returned per query, so prefer conversationId. A run is listed only once it has ended. test_bot_flow runs have no conversation id, so find them by flowId or pass their sessionId straight to flow_execution_data.`,annotations:{title:"Find Flow Execution",readOnlyHint:!0,destructiveHint:!1},inputSchema:Sie},handler:async({conversationId:e,flowId:n,onlyWithErrors:i})=>{if(!e&&!n)return{isError:!0,content:[{type:"text",text:"Provide a conversationId, a flowId, or both."}]};let a=[];e&&a.push({key:"ConversationId",operator:"eq",value:e}),n&&a.push({key:"FlowId",operator:"eq",value:n});try{let r=await t.postFlowsInstancesQuery({query:[{and:a}]},{pageSize:jh}),s=(r.entities??[]).map(yie),o=(i?s.filter(p=>p.flowErrorReason!==void 0):s).sort(Pie),l=Math.max(r.total??0,s.length),c=[];i&&o.length===0&&s.length>0?c.push(`None of the ${s.length} instance(s) fetched ended with a flow error. Drop onlyWithErrors to see them.`):o.length===0?await jie(t)===!1?c.push("No instances matched, and execution data storage is disabled for this org (Architect > Settings > Execution data), so none are being recorded."):c.push(`No instances matched. A run is listed only after it ends; execution data is kept for ${_1} days and is only captured for flows published after storage was enabled (republish older flows); and test_bot_flow runs have no conversation id, so search for them by flowId. Check the id, or query by flowId to see whether the flow records anything at all.`):l>s.length?c.push(`${l} instances matched but only ${s.length} were fetched. Narrow the query with a conversationId.`):s.length>=jh&&c.push(`The API caps results at ${jh}; older instances may exist.`);let u={query:{...e?{conversationId:e}:{},...n?{flowId:n}:{},...i?{onlyWithErrors:i}:{}},executions:o,total:l,...c.length>0?{notes:c}:{}};return{content:[{type:"text",text:JSON.stringify(u)}]}}catch(r){let{status:s}=Rn(r),o=s===400?" The query was rejected; check that the conversationId and flowId are well-formed Genesys Cloud ids.":Ht(s,"Architect > Flow Instance > Search");return{isError:!0,content:[{type:"text",text:`Failed to search for flow executions: ${Bn(r)}${o}`}]}}}});function ht(t){return t?.id?{id:t.id,...t.name?{name:t.name}:{}}:null}var Oie=50,Tie=200;function kie(t){return`*${t.trim().replace(/^\*+|\*+$/g,"")}*`}function Mie(t){let e=ht(t.queueFlow),n=ht(t.emailInQueueFlow),i=ht(t.messageInQueueFlow);return{id:t.id??"",name:t.name??"",division:ht(t.division),memberCount:t.memberCount??null,joinedMemberCount:t.joinedMemberCount??null,dateModified:t.dateModified??null,...t.description?{description:t.description}:{},...e?{queueFlow:e}:{},...n?{emailInQueueFlow:n}:{},...i?{messageInQueueFlow:i}:{}}}var Eie={name:K.string().min(1).describe("The queue name, or a portion of it, to search for. Matched case-insensitively against queue names, so a partial name like 'sales' finds 'UK_Sales'. Wildcards are added automatically; do not include asterisks.")},R1=({routingApi:t})=>({config:{description:"Finds Genesys Cloud routing queues by name, resolving the human-readable name users know (e.g. 'Sales') to the queue's id and exact name. Returns each matching queue's id, name, division (id and name), memberCount (agents configured on the queue), joinedMemberCount (agents currently joined and taking work), dateModified and, when configured, its in-queue flows (queueFlow for calls, emailInQueueFlow, messageInQueueFlow). Matching is a case-insensitive search that accepts a portion of the name; queues whose name equals the query exactly are listed first. When several similarly named queues match, dateModified and the member counts help tell a live queue from an abandoned one. Use the returned exact name as the search_in_flow query to find the actions in a flow that transfer to the queue. The in-queue flow ids are accepted verbatim by flow_ir, flow_action, search_in_flow, flow_dependencies and flow_versions.",annotations:{title:"Find Queue",readOnlyHint:!0,destructiveHint:!1},inputSchema:Eie},handler:async({name:e})=>{try{let n=[],i=kie(e),a=0,r=1;for(;;){let c=await t.getRoutingQueues({name:i,pageSize:100,pageNumber:r});if(c.entities&&n.push(...c.entities),a=c.total??a,!c.nextUri||n.length>=Tie)break;r++}a=Math.max(a,n.length);let s=Ph(n,e).slice(0,Oie),o=[];if(s.length===0)o.push(`No queues matched "${e}". The search already accepts a portion of the name, so try a shorter fragment.`);else if(a>s.length){let c=`${a} queues matched; only ${s.length} are returned${Ha(s[0],e)?", exact name matches first":""}.`;n.length0?{notes:o}:{}};return{content:[{type:"text",text:JSON.stringify(l)}]}}catch(n){let i=Ht(Rn(n).status,"Routing > Queue > View");return{isError:!0,content:[{type:"text",text:`Failed to search for queues: ${Bn(n)}${i}`}]}}}});function bi(t,e){t=t-263;let n=Sh(),i=n[t];if(bi.UBxAdX===void 0){var a=function(l){let c="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=",u="",p="";for(let h=0,g,d,m=0;d=l.charAt(m++);~d&&(g=h%4?g*64+d:d,h++%4)?u+=String.fromCharCode(255&g>>(-2*h&6)):0)d=c.indexOf(d);for(let h=0,g=u.length;ht+qie(269,"B(Oy"),Ia=(t,e)=>t+"::"+e;(function(t,e){let n=sn,i=t();for(;;)try{if(-parseInt(n(601,"2^8r"))/1*(-parseInt(n(614,"BPOp"))/2)+parseInt(n(410,"nh]r"))/3+parseInt(n(456,"5)aM"))/4+parseInt(n(575,"g[YB"))/5*(parseInt(n(617,"8)1B"))/6)+-parseInt(n(477,"Tq&^"))/7+parseInt(n(548,"aWki"))/8*(parseInt(n(618,"cZD]"))/9)+parseInt(n(389,"&6[["))/10*(-parseInt(n(414,"futP"))/11)===e)break;i.push(i.shift())}catch{i.push(i.shift())}})(Oh,535779);function oo(t){let e=sn,n={EJSni:e(534,"w0Pl")};return typeof t===n[e(488,"BPOp")]&&t!==null&&!Array[e(561,"&6[[")](t)}function sn(t,e){t=t-381;let n=Oh(),i=n[t];if(sn.KuLjVm===void 0){var a=function(l){let c="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=",u="",p="";for(let h=0,g,d,m=0;d=l.charAt(m++);~d&&(g=h%4?g*64+d:d,h++%4)?u+=String.fromCharCode(255&g>>(-2*h&6)):0)d=c.indexOf(d);for(let h=0,g=u.length;h{let s=e;if(!oo(a)||Object[s(476,"Tq&^")](a)[s(459,"E3qq")]===0){i[s(532,"0i$G")]({index:r,kind:n[s(589,"1huO")],value:a});return}for(let[o,l]of Object[s(584,"Y7TF")](a))i[s(443,"GS%K")](n[s(490,"Tq&^")](oo,l)?{...l,index:r,kind:o}:{index:r,kind:o,value:l})}),i}function Hie(t){let e=sn,n={tArcd:function(a,r){return a===r},WGRkz:e(448,"Y7TF")};if(!Array[e(586,"jUNE")](t[e(542,"TthH")]))return 0;let i=0;for(let a of t[e(602,"PG(N")])if(e(581,"w0Pl")!==e(391,"iRgv"))oo(a)&&oo(a[e(510,"x!e$")])&&a[e(630,"&^g9")][e(563,"PG(N")]&&i++;else{let r={FXarj:function(o,l){return o(l)},SDxnm:function(o,l){return o!==l},lIRku:e(572,"egic"),igRxU:function(o,l){return n[e(565,"cZD]")](o,l)}},s=new _0x43eb0f;for(let o of _0x4567b0)typeof o[e(583,"hBv(")]===e(623,"EarX")&&typeof o[e(495,"cZD]")]===n[e(506,"eAat")]&&s[e(482,")kG&")](o[e(523,"1&Ff")],o);return _0x19e4a7[e(441,"g[YB")](o=>{let l=e;if(!r[l(629,"nh]r")](_0xea936b,o[l(552,"OXPB")]))return o;let c=o[l(494,"JlhD")][l(491,"(TZ!")];if(r[l(422,"PG(N")](typeof c,l(381,"OMeU")))return o;let u=s[l(520,"XX@L")](c);if(!u)return o;let p={index:u[l(425,"q2Iz")],...typeof u[l(521,"EarX")]===r[l(551,"azF#")]?{actionId:u[l(420,"azF#")]}:{},...r[l(517,"@J]z")](typeof u[l(467,"JX5L")],l(518,"iRgv"))?{actionName:u[l(454,"2^8r")]}:{}};return{...o,relatedAction:p}})}return i}function Iie(t){let e=sn,n={NblTc:function(a,r){return a===r},FztXN:e(409,"x!e$"),ueQcp:function(a,r){return a===r},WUtQq:function(a,r){return a===r}},i=new Map;for(let a of t)n[e(610,"(TZ!")](typeof a[e(451,"Eqf4")],e(423,"eAat"))&&typeof a[e(383,"g[YB")]===e(572,"egic")&&i[e(599,"Y7TF")](a[e(431,"1huO")],a);return t[e(505,"&^g9")](a=>{let r=e;if(n[r(407,"oCM9")]!==r(600,"Eqf4")){let s=_0x5ae653[r(466,"Eqf4")];if(n[r(406,"futP")](typeof s[r(438,"@J]z")],r(596,"2^8r"))){let o=_0x51f586[r(493,"cZD]")](s[r(567,"ceXq")]);o?o[r(573,"OXPB")]++:_0x4d4f52[r(427,"nh]r")](s[r(446,"9Fdv")],{index:s[r(607,"hBv(")],actionId:s[r(411,"eAat")],...s[r(615,"XX@L")]?{actionName:s[r(628,"PG(N")]}:{},iterations:1})}}else{if(!oo(a[r(546,"Y7TF")]))return a;let s=a[r(392,"E3qq")][r(570,"XX@L")];if(typeof s!==r(399,"E3qq"))return a;let o=i[r(536,"2^8r")](s);if(!o)return a;let l={index:o[r(591,"OXPB")],...n[r(419,"eAat")](typeof o[r(415,"tUnD")],r(489,"w0Pl"))?{actionId:o[r(603,"iRgv")]}:{},...typeof o[r(597,"egic")]===r(528,"8)1B")?{actionName:o[r(453,"@J]z")]}:{}};return{...a,relatedAction:l}}})}function Rie(t){let e=sn,n={DPNXZ:function(l,c){return l===c},gWGTQ:e(479,"OXPB"),txXCb:function(l,c){return l+c},wRTNd:e(580,"w0Pl"),YjEGF:function(l,c){return l!==c},QFVvQ:e(398,"iRgv"),ZbYoz:e(564,"oCM9"),BchAd:e(385,"g[YB")},i={},a=new Map,r=[],s=new Map;for(let l of t){if(n[e(393,"TthH")]===e(452,"M(AU"))return _0x153783[e(525,"x!e$")];{if(i[l[e(577,"q2Iz")]]=n[e(394,"vPKg")](i[l[e(516,"JlhD")]]??0,1),l[e(462,"1&Ff")]===e(461,"XX@L")&&l[e(540,"D0)Y")]){let p=l[e(543,"&6[[")];if(typeof p[e(595,"1&Ff")]===e(449,"JX5L"))if(n[e(556,"w0Pl")]!==e(403,"jUNE")){let h=s[e(609,"ceXq")](p[e(591,"OXPB")]);if(h)if(n[e(554,"2^8r")](n[e(522,"jUNE")],n[e(503,"PG(N")]))h[e(445,"PG(N")]++;else return gkqhIJ[e(499,"Y7TF")](typeof _0x5454f4,e(460,"0i$G"))&&_0x438eda!==null&&!_0x3aab03[e(498,"iRgv")](_0x3468b2);else s[e(473,"OMeU")](p[e(567,"ceXq")],{index:p[e(401,"PG(N")],actionId:p[e(585,"egic")],...p[e(487,"cZD]")]?{actionName:p[e(502,"jUNE")]}:{},iterations:1})}else _0x3a8bce[e(588,"9Fdv")]++,_0x5be94d[e(566,"1&Ff")][e(511,"JlhD")](_0x1752e1[e(464,"1huO")])}if(typeof l[e(519,"&^g9")]!==n[e(512,"E3qq")])continue;let c=Hie(l);c>1&&r[e(620,"UJNl")]({index:l[e(481,"0i$G")],actionId:l[e(605,"5)aM")],...typeof l[e(524,"ceXq")]===n[e(416,"1&Ff")]?{actionName:l[e(560,"lrjV")]}:{},participantTurns:c});let u=a[e(557,"5)aM")](l[e(471,"(TZ!")]);u?(u[e(457,"egic")]++,u[e(626,"D0)Y")][e(514,"BPOp")](l[e(469,"Eqf4")])):a[e(508,"aWki")](l[e(447,"q2Iz")],{actionId:l[e(585,"egic")],...n[e(472,"nh]r")](typeof l[e(470,"1&Ff")],e(480,"@J]z"))?{actionName:l[e(611,"EarX")]}:{},executions:1,eventIndexes:[l[e(426,"E3qq")]]})}}let o=[...a[e(530,"nh]r")]()][e(413,"8)1B")](l=>l[e(593,"(TZ!")]>1)[e(571,"futP")]((l,c)=>c[e(588,"9Fdv")]-l[e(404,"D0)Y")]);return{eventCount:t[e(468,"GS%K")],eventKinds:i,repeatedActions:o,loops:[...s[e(582,"azF#")]()],asksWithRetries:r}}function By(t){let e=sn,n={sghsp:function(a,r){return a(r)}},i=n[e(444,")kG&")](Iie,_ie(t));return{events:i,summary:Rie(i)}}function Ly(t,e){let n=sn,i={rMkeV:function(a,r){return a===r},chSPS:n(545,"@J]z")};for(let a of t)if(i[n(428,"iRgv")](n(405,"tUnD"),i[n(621,"1&Ff")]))_0x454f62++;else{if(!Array[n(537,"x!e$")](a[n(439,"GS%K")]))continue;for(let r of a[n(604,")kG&")])if(oo(r)&&typeof r[n(553,"oCM9")]===n(449,"JX5L")&&r[n(559,"q2Iz")][n(492,"hBv(")](e)&&r[n(594,"tUnD")]!==null&&r[n(547,"OXPB")]!==void 0)return r[n(455,"cZD]")]}}function Oh(){let t=["WQOoW6hdOCkae8k7WPO9yW","p8kuW6tcLL4","ebGZyaVcIthcR8osaN3dP2y","W4tdImoDW5VcPG","amkGzWJdRgy","WQBdLcWmW5WHvKSk","W6hcHNajW44y","WOSsBCkbW6DoW6ZcKuK","la7dPxa","WOudzSkg","ANrudvlcUG","oSkbW7RcILxdNG","WPqAWPO","imkgW4NcKuNdMfm","frfeahJdUh7cNG","W5O+wrpdRq","W7u5xcCTWQRdRCkRWRJcRmodWQaE","WRlcISkuWP7dSW9yW4VdUmkXjwXn","vWFcGISUy8oEW5Pp","wSkimXnbjrnZW7yldmovW4C","W601EZ3dH8kOW6jw","W6narCoMWQu","WOKwghy+CSkS","bWZdGW5q","emoYmJxdRSoopW","mcJdQXPM","WPldL8knASoWfvSLrmkxcW","W4BdUMvAtq","eGldGq9qk8of","WPBcS2BdUJZdO25SWPXlWRre","WQOvWQVcPsO","WOmlEa","CKrQjLu","W5jrW7a","imoJmColW4BcMW","iSoJmmojW67cNCkHW7SSBqJcQa","W5tdRmk5W5/dRf/cOmo9BCoB","qCkEhGbhiq4","fCk9EWu","DGyoph9srZNdMXXBtIrRfG","WQxcMhJdQX8","Aa3dHCoMW5u","WRDHWQvoW4BcNNldOwLSW6ldPG","WQidW7hdRCkx","kCkkbW","W6CMW7CrWOpdRINdIujyW7xdGSkr","i8oqbKNdT0xdT8oFWR1SFW","W7JdKmoxW50","v1rXpftdNq","gbNdIGLuj8oyjCo6WPi","gWFdVY13","WPBdLCklySo5zr8kuSkQcrNdVq","mmkplConW4DwWRe","p8oRlmoe","Ac3dHmoUW7/dUmoHfW","o8o3nSoqW7RcI8kDW78wzcZcQq","AuDOoha","A1rmiLi","W5ZdKLTexCo6","krvpW7tcTgZdNKm","WO8xaNaYB8kR","run3pfxdLe7cVa","nCkuW4NdLbaYuq","W4SOwIqm","fgv9gmkyW57cR8k0jdi","awfkmq0","DM9Aer0","gapdIX5n","xmk2W4BcPSk7","mNJdOuLXWQddP8kcW4HW","W7tcQmoVevO","WRn0WRrjW53cUvxdOq","WOalWPZcIWj0","run3pfxdLeNcUCoslG","E35OkWBdOmktWPxcPYa","WPKCaG","WPCKCCkjW4a","W4jmW5/dM1rAcmoJWQzrpW","DqWemLPhxcldNa","W4LWW6b/W7JdKgLj","kmklW4PgWOBdHfBdQSk2","W5rxW7ajeH48pq","uu5Oo1xdJwK","irHFW7JcOW","ECoEwSkkbgVcL8kzWPJcPmktbmkP","WQWiW6e","afxdShT1","uCk0W5dcQSk4W7uJW7b8BW","hSk5crf/aJu","W7G3Fd/dMW","j3Gpmmo+FvakW4a","j8olf0pdRv/dKmorWR5a","W43dLKm","rCkaqWldIenv","jxNcHSkYWONcOCk7bY/dIJlcPv0","W6ldJmoKW5VcUvyw","EexcOSkZ","WRf/WPnWW6e","cSk2q8kwWRO","q8kJW5BcQSk5W7W","B1xcPq","yXev","W6iQvsGTWOBdP8koWR7cOmopWRW","W5VdOmkPW5pdSa","CrCvoebDEYZdNXO","W5hcV30oW4e","n8kopSox","E8oLWRZdO8ooFa","ohxdSfPXWQddNSkmW5jRW55R","W4BcNmozmmk9kemPCSkVhW","W74ZBJFdGmkNW4LEWRy","W5dcKmoooSkMoW","v8oVeSogW7ldOmkfhCoMW7DeDW","qCoLi1hcSdCNEf/dOt49W6fZ","W4JcGbHwE8oJ","gSoCAuihDKCcW5ekbSoFW7G0","BMHUla","W5LXW5zcW5O","ExjYnGZdTSkZ","vsJcObWk","W5RcKsXHFa","W4xcI8oofSkPp0i","o2hdPK9O","xmkmlbL7irPx","W5b0W7b/W6m","AwLUkWFdQq","W4/cIGblCCo/WPvLW5e9","ErOfnfC","W4zaW7yjeXC","c8kaW6tdSHO","W6iKvsuSWRVdOmkfWRxcQW","W4hcISord0K","W4xdNCojW73cQa","WQBcQgddIXm","l8ksW6VdHqCGw8k3bNe","mmk7W7hcIgK","WQpdKcLjWPTDALmLlMiy","aSk7u8kAWQ3cUmk5lG","AvpcPCkYwCkU","fCk9ErxdP3m","WRRcJSoIW7ZcIxuwW7G","W6pcQSo3dvbjW6vb","WPb0WQHHW5y","kmkwW7ZcILtdL2mE","W7BcHgGvW4qfvMa","fSk9DSkqWRi","W4VdKenyv8oNmxy","WQPTWQ1oW6q","qZazp0i","emkSvCkAWQZcSq","WRrLWQ9nW6lcTM7dSwv3W67dPCk2cSkN","pCoSjSofW7C","C3n4jXe","W6tcGMG","W5PEW79ZW4e","FsJdKW","W7LkumouWPi","ffHHmXhdLHBcHmoShIO","W5LvW6yfeq","W5HvW7q","lH7dT3VcSSkDW5FcTmkm","Ac3dHmoUW7JdVq","run3pfxdLfpcOCoplG","sw5fjaNdKsW","W7fhqmoyWOuyW4ZdIq","t3yveSklWRmqWP1T","W7RcS8oUcMK","W47cHCom","AhDo","swiueW","lCknW5bCWPC","Eqaei05hxcldNaW","ghn8hSkv","nCoHnSojW6dcKCkeW7O","WPKnbgS1Bq","wMhdGCoTW5pdGa","kCknf8ouwdBdRmks","WO8jFmklW71uW4ZcMG","W5KbW5WhW4G","W7fhqmoyWOuyW4VdJmk3WRe","WPiCWPRcIWn9n8oHWPnf","AI3dM8oWW5q","WOqeWR1xtKnhnSodrMSUW5K","qvHMnK/dJM7cT8oroa","W6tcKN8FW44yBgSTna","DNHYjr3dPG","mXNdVh3cUCki","i8oEbKtdTN3dSCoFWQm","WRL+WQ5e","zwvhngK","ge5GnrW","ka7dPhy","WPWpzmkdW6zFW6hcV0tdRCk9F2O","shBdH8oTW5ldIrVdTmkfW6a","vxijhmkEWRK","WOCeBmkhW6O","WRn0WRrjW53cUvldPgfX","nMpdSenRWRRdH8kj","W5pcT1iKW7e","E8o0WRO","zhvkav7cOa","W6m2W5S","W6CZDIC","WRHUp2hcMCo1WP1fWR4AW7tcLSkr","txymhSkeWPmoWPLWyhi","pXFdPIjM","W6nqrSoyWOqr","nrxdSN3cOG","lCkpW4W","zmoJWOJdMCou","iCkdya","W4RcL8o9iCk6pvm","Fs/dG8oSW57dT8oycZJdLq","Fs/dG8oSW57dT8oceYxdLq","uWfSlSoG","DMjmav/cQq","W5ubxcBdSa","mNJdOuLXWQddP8kcW4HkW7m","lrHFW67cJgVdO08","EYNdGW","l8knFSoUbCkZnq","EttdKSoMW4tdRCoLhsBdUtW","shhdLW","Fsjrja","W4fGW5vKW6xdN1K","WQ4PofOb","WOalzCkh","v3GdhSkz","pCkeW7ZdJW09zSk5gwC","sHy4pLu","W6tcK30iW44IEW","lSkApa","nmkFDCkyWRG","W4hdRSk+W53dILu","w8ozbW","W4hdQSk/W5VdQL/cJ8oW","pCkaW7RcJq","pmkxy8oY","wh50aW0","WO8jFmklW71uW5hcH1FdVa","zJ5mka","lH9xW6NcVNa","j8klFSo+","W7LdzSojWR8","W5TNW6z/W7NdMq","iSkyomoqW41XWPXl","iConfW","uCk0W5dcQSk4W7uKW7u","dCkHW57dKdm","WRDVWQvdW4FcO3xdQMjDW6m"];return Oh=function(){return t},Oh()}function Fy(t,e){let n=sn,i={AEDaS:n(402,"5)aM"),VhVGE:function(p,h){return p!==h},lrFSt:n(574,"OXPB"),LtjbU:function(p,h){return p===h},xzmnV:n(527,"futP")},a=new Map(e[n(501,"GS%K")][n(515,"hBv(")](p=>p[n(497,"BPOp")]===n(412,"UJNl"))[n(484,"JlhD")](p=>[p.id,p])),r=new Map(e[n(613,"Tq&^")][n(442,"w0Pl")](p=>[p.id,p])),s=new Set,o=new Set,l=new Set,c=t[n(555,"Eqf4")](p=>{let h=n;if(typeof p[h(450,"87pe")]===i[h(463,"egic")]){s[h(568,"87pe")](p[h(417,"x!e$")]);let d=a[h(616,"azF#")](p[h(418,"nh]r")]);if(!d)if(i[h(539,"Tq&^")](i[h(590,"E3qq")],i[h(483,"OMeU")]))_0x19239b[h(625,"PG(N")](_0x1ccf2a[h(430,"@J]z")],{index:_0x2f9a4b[h(622,"eAat")],actionId:_0x481fd3[h(544,"Tq&^")],..._0x4f7109[h(611,"EarX")]?{actionName:_0xfc9d9a[h(400,"vPKg")]}:{},iterations:1});else return o[h(429,"cZD]")](p[h(418,"nh]r")]),{...p,ir:null};let m={nodeId:d.id,...d[h(513,"Eqf4")]?{actionType:d[h(436,"egic")]}:{},taskId:d[h(435,"cZD]")],taskName:d[h(397,"&6[[")],terminal:d[h(509,"lrjV")],reachable:d[h(384,"Tq&^")],successors:d[h(408,"jUNE")]};if(typeof p[h(579,"q2Iz")]===i[h(549,"OXPB")]){let w=Ia(d.id,p[h(382,"(TZ!")]),f=d[h(458,"nh]r")][h(562,"8)1B")](A=>A.id===w);m[h(478,"GS%K")]={nodeId:w,...f?.[h(592,"EarX")]?{label:f[h(432,"5)aM")]}:{},inIr:f!==void 0}}return{...p,ir:m}}let g=typeof p[h(576,"&^g9")]===h(596,"2^8r")?p[h(504,"nh]r")]:i[h(587,"D0)Y")](typeof p[h(558,"q2Iz")],h(535,"x!e$"))?p[h(507,"lrjV")]:void 0;if(g!==void 0)if(i[h(421,"1&Ff")]===i[h(440,"tUnD")]){let d=r[h(624,"UJNl")](g);return d?{...p,ir:{nodeId:gt(d.id),taskId:d.id,taskName:d[h(500,"Eqf4")]}}:(l[h(496,"JX5L")](g),{...p,ir:null})}else{if(!_0x521468[h(485,"g[YB")](_0x1aff73[h(531,"Eqf4")]))return 0;let d=0;for(let m of _0x1f30d6[h(542,"TthH")])_0x40dcca(m)&&_0x44dec6(m[h(465,"0i$G")])&&m[h(390,"E3qq")][h(424,"1&Ff")]&&d++;return d}return p}),u=e[n(627,"lrjV")][n(388,"vPKg")](p=>p[n(533,"Eqf4")]===n(474,"w0Pl")&&!s[n(475,"M(AU")](p.id))[n(433,"5)aM")](p=>({id:p.id,label:p[n(396,"(TZ!")],...p[n(486,"cZD]")]?{actionType:p[n(598,"E3qq")]}:{},taskName:p[n(578,"cZD]")],reachable:p[n(434,"0i$G")]}));return{events:c,unmatchedActionIds:[...o],unmatchedStateIds:[...l],actionsNotExecuted:u}}function xi(t,e){t=t-436;let n=Th(),i=n[t];if(xi.uUIMcb===void 0){var a=function(l){let c="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=",u="",p="";for(let h=0,g,d,m=0;d=l.charAt(m++);~d&&(g=h%4?g*64+d:d,h++%4)?u+=String.fromCharCode(255&g>>(-2*h&6)):0)d=c.indexOf(d);for(let h=0,g=u.length;hw},gkmxE:function(m,w){return m+w}},s=new Set(e[a(514,"n^@j")][a(440,"hEug")](m=>m[a(464,"&n7^")]+" "+m.to)),o=new Map,l=new Map,c=new Map,u=new Map;for(let m of t[a(507,"PF3h")][a(461,"G$Bk")]())o[a(475,"5BFD")](m,[]),l[a(460,"DK18")](m,new Set),c[a(522,"G$Bk")](m,[]),u[a(499,"HozS")](m,new Set);for(let m of t[a(487,"p2Mh")]){let w=s[a(518,"[bM7")](m[a(515,"Vg]o")]+" "+m.to),f=o[a(482,"ru)n")](m.to);if(f){let b=m[a(498,"r)]0")]+" "+(m[a(455,"5BFD")]??"")+" "+w,x=l[a(465,"r)]0")](m.to);if(x&&!x[a(526,"eCRl")](b))if(r[a(473,"t*3X")]!==a(503,"6q3!"))for(let y of _0x1c1973[a(511,"#fXA")])_0xd9c226(y);else x[a(509,"4bWK")](b),f[a(448,"C7XG")]({id:m[a(480,"quc!")],label:m[a(483,"imA#")],backEdge:w})}let A=c[a(486,"zNY6")](m[a(467,"t*3X")]);if(A){let b=m.to+" "+(m[a(468,"(NtY")]??"")+" "+w,x=u[a(442,"C7XG")](m[a(464,"&n7^")]);x&&!x[a(456,"quc!")](b)&&(a(479,"quc!")===a(466,"Ef)R")?(x[a(519,"G$Bk")](b),A[a(447,"(NtY")]({id:m.to,label:m[a(493,"@Vyy")],backEdge:w})):_0x4ebc9e=_0x2d6e2b)}}let p=-1;for(let m of e[a(458,"6q3!")][a(494,"(xRJ")]())if(r[a(441,"hB%s")]===r[a(463,"mPHC")]){let w=_0x3d1d1f[a(452,"hB%s")][a(524,"PF3h")](_0x5843fe);return w?[{id:_0x491cd3,name:w[a(525,"p2Mh")],reusable:_0x331f75[a(444,"FwpK")][a(478,"YZ3x")](_0x5e5f8c)}]:[]}else r[a(504,"mPHC")](m,p)&&(p=m);let h=r[a(496,"330f")](p,1),g=[];for(let[m,w]of t[a(491,"8HDt")]){let f=e[a(469,"C7XG")][a(513,"VpkJ")](m),A=f?e[a(481,"p2Mh")][a(488,"imA#")](m):h++;g[a(462,"G$Bk")]({id:m,kind:w[a(497,"n^@j")],actionType:w[a(445,"r)]0")],label:w[a(510,"t*3X")],description:w[a(453,"mPHC")],predecessors:o[a(474,"q*$d")](m)??[],successors:c[a(489,"TlBL")](m)??[],order:A,taskId:w[a(454,"(NtY")],taskName:w[a(528,"EwLi")],reachable:f,terminal:w[a(527,"5BFD")]})}g[a(438,"vwHu")]((m,w)=>m[a(436,"5BFD")]-w[a(439,"EK*[")]);let d=n[a(508,"hEug")][a(506,"r)]0")](m=>{let w=a,f=n[w(529,"n^@j")][w(477,"hEug")](m);return f?[{id:m,name:f[w(457,"[bM7")],reusable:n[w(485,"TlBL")][w(472,"330f")](m)}]:[]});return{flowName:n[a(476,"quc!")],flowType:n[a(459,"hB%s")],entryTaskId:n[a(502,"HozS")],reachabilityIsComplete:i,tasks:d,nodes:g}}function Th(){let t=["qCkFcmosgG","WPiLxJrToSo8W6BdPG","W7/dQgS","WQ82zdG5","vrNdGmkeW5i","W7FcRmoxWQtcQI0L","nSk5yG","W5lcHSk0ECkbhSkWB0W","WRNcMSoFWRC","ymkhWQ9kw8oVWQVdJsK","W5pcMCk0BK3dNxldPc/dHtxdLa","WOZcG04","uGbN","W5D/WOeYW5rmf3RdINVcMbBdTa","B8oPkmkNW6lcIxFcQMf6W77cIei","qaf3","WRn+W4RcVCoeW6dcPq","smkvga","A2Wofa","W4xcQSo7","W6ZcJNr6WPrlWRdcVq","zSkfCahdHCkhvwu","W4tcHSkKECk3","W7FcMwjYWO8","tXGOpr7cTZBdMZ3dQfy","rSkytte","hJVdJZpcSW","WOSLxq","jmk6gvRcNW","ENvF","WRRcH8kOWQ3cUe9VWQealxqqFW","W5OXd1fKW6/cKmokm0pdRa1/pH0","m8oCW691rmoUWOxdHttcMW","WOhdN8oUimoXo8kGreNcMdG","W7NdGCoPW7q","BwvymG","W6i/cvnc","sCoQAYtdL8kDW4VcNINcQMDC","bHBcIvDxWR3cMI0A","cSk8ixNcNa","DgaVDmk4W5W8W4zrqCoh","W73dLCoPW7FdGH4","W7tcIMrYWPe","WOFdT2m","WORcG1ddJq","z3TBnCob","gmkXpwxcU8ouW7pcMq","CSoNxq","waf6WP8","qXfWWOq","E3qttCkT","q2ajWPi","nCoAW68","WO/cKu/dHSow","WQuLAta","W6xdLCo4W7NdPW","CMjppXi","xCovqmkKia","B8oRkCkGW6FcGxBdJNDXW6lcIfJcIa","WRufwq","WRyNtrSF","u0VdIq","W6VcJNi","WONdUN9mW48qW6H0","WOeHwq","WORdICo/","WRNdNebHW7i","WONdPh9w","AN8hfmk2","lmo/ea","i8oAWOZdNwK","oKxcOu9G","vCojFmkpoteFWP7cP3Tux1a3gW","nGlcPq","ygKefmk3","kmoEWPO","qmojFq","WPK3WQfQxrhdQt3cNshcTSo2","WQhcHmoXWQZcGq","WOb2WR1wdSkbW6JcKeFdVSkkmmk6W5q","W7RdSCofW6JcOa","kCkRnr3cSLG","y8kmWQiRhmkWW6hdMY7cSdGehq","WROpr1hcNq","W5VcJSk5DG","nmonW7rX","WPuPW4W","WQJdUfLzW5a","W7jMp2TNcCoKgWxdGrRcT2G","WOmIW4X3WPOOrM7dI3ZcJq","CNb2cmol","xLCYvCkT","b8kIubFdUSokwInmiSk+FuO","nmotW7POzSoHWQe"];return Th=function(){return t},Th()}(function(t,e){let n=qi,i=t();for(;;)try{if(-parseInt(n(501,"NufE"))/1+parseInt(n(454,"x*)D"))/2*(-parseInt(n(477,"@)pF"))/3)+-parseInt(n(486,"tuF)"))/4*(-parseInt(n(478,"tDMj"))/5)+-parseInt(n(558,"7ktM"))/6+-parseInt(n(503,"r%GY"))/7+-parseInt(n(455,"*@A^"))/8*(-parseInt(n(496,"tVf)"))/9)+parseInt(n(489,"dJLo"))/10===e)break;i.push(i.shift())}catch{i.push(i.shift())}})(kh,125886);function qi(t,e){t=t-452;let n=kh(),i=n[t];if(qi.kmqTvd===void 0){var a=function(l){let c="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=",u="",p="";for(let h=0,g,d,m=0;d=l.charAt(m++);~d&&(g=h%4?g*64+d:d,h++%4)?u+=String.fromCharCode(255&g>>(-2*h&6)):0)d=c.indexOf(d);for(let h=0,g=u.length;h0?a:void 0}function It(t,e){for(let n of e){let i=Nr(t,n);if(i!==void 0)return i}}function Wn(t,e){t=t-407;let n=Mh(),i=n[t];if(Wn.bPVnLm===void 0){var a=function(l){let c="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=",u="",p="";for(let h=0,g,d,m=0;d=l.charAt(m++);~d&&(g=h%4?g*64+d:d,h++%4)?u+=String.fromCharCode(255&g>>(-2*h&6)):0)d=c.indexOf(d);for(let h=0,g=u.length;ho},ucmzx:function(s,o){return s===o}},i=t[e(461,"EUB&")];if(n[e(425,"aF3l")](i,null)||typeof i!==n[e(455,"^DmT")])return;let{text:a,type:r}=i;if(typeof a===n[e(479,"paV[")]&&n[e(427,"2aXE")](a[e(440,"rsC^")]()[e(511,"Ycte")],0))return a;if(n[e(510,"oy9E")](typeof r,e(482,"7HMc"))&&r[e(497,"dkjW")]>0)return r}function Vy(t,e){let n=Wn,i={FvLgT:function(r,s){return r(s)}},a=t[n(515,"bR]F")](r=>r[n(411,"oy9E")]===e);return a?(a[n(451,"(O16")]=!0,t):[{outputId:e,label:i[n(485,"2ISW")](Jy,e),synthetic:!0,terminal:!0},...t]}var Ou={isTerminal:()=>!0,outputs:()=>[]},D1={isTerminal:()=>!0,describe:t=>It(t,[ke(421,"bR]F"),ke(416,"f$h$"),ke(476,"R2Oh"),ke(508,"^Czk"),ke(505,"paV["),ke(514,"Whzw"),ke(509,"@hw2"),ke(465,"bTei")]),outputs:t=>Vy(Ur(t)[ke(437,")SlE")]($r),ke(428,"qAfb"))},Wie={isTerminal:()=>!1,outputs:t=>{let e=ke,n={lvYxk:function(r,s){return r!==s},RkXBs:e(496,"4Ou%"),EpGNw:e(501,"2ISW"),QRLDK:function(r,s){return r===s}},i=t[e(435,"J3@O")];if(!i||n[e(458,"f$h$")](typeof i,n[e(464,"@hw2")]))return[];let a=$r(i,0);return a[e(491,"R2Oh")]=n[e(486,"zBzF")],!(n[e(474,"Whzw")](typeof i[e(504,"e!s[")],e(481,"oy9E"))&&i[e(492,"U0TI")][e(409,"7QFd")]>0)&&(a[e(410,"E*BP")]=e(418,"EUB&")),[a]}},zie={describe:()=>ke(457,"Whzw"),outputs:()=>[]},Die={outputs:t=>Vy(Ur(t)[ke(422,"NTe%")]($r),ke(407,"G$N4"))},Gie={isTerminal:()=>!0,describe:t=>It(t,[ke(460,"EUB&")]),outputs:t=>Vy(Ur(t)[ke(456,"Ycte")]($r),ke(441,"&cGC"))},Nie={outputs:t=>{let e=ke,n=Ur(t);return n[e(493,"FMrc")]>0?[$r(n[0],0)]:[]}},Uie={isTerminal:()=>!1,describe:t=>{let e=ke,n={fniml:function(a,r){return a(r)}},i=n[e(436,"rsC^")](Ur,t)[e(495,"Zijd")](a=>typeof a[e(470,"GGG0")]===e(480,"hflm")&&!/^__.*__$/[e(429,"OY^5")](a[e(472,"#&DX")]))[e(437,")SlE")](a=>a[e(468,"9n%m")])[e(433,"zBzF")](a=>typeof a===e(487,"2aXE")&&a[e(494,"MmsE")]>0);return i[e(408,"R2Oh")]>0?e(463,"e!s[")+i[e(415,"e!s[")](", "):void 0}},Yn=t=>({describe:t}),Eh={DisconnectAction:Ou,EndFlowAction:Ou,EndTaskAction:Ou,EndStateAction:Ou,ExitBotFlowAction:Ou,LoopAction:Wie,ExitLoopAction:zie,ProcessVoicemailInputAction:Die,CallBotFlowAction:Gie,AskForNLUNextIntentAction:Nie,WaitForInputAction:{},AskForNLUIntentAction:Uie,CallTaskAction:{},TaskAction:{},TransferMenuAction:{},TransferTaskAction:{},LoopUntilAction:{},DecisionAction:Yn(z1),SwitchAction:Yn(z1),DataAction:Yn(t=>It(t,[ke(488,"U0TI")])),DataTableLookupAction:Yn(t=>It(t,[ke(438,"oy9E")])),CallCommonModuleAction:Yn(t=>It(t,[ke(452,"(^(^")])),CallBotConnectorAction:Yn(t=>It(t,[ke(419,"rhAW")])),CallDigitalBotFlowAction:Yn(t=>It(t,[ke(434,"7HMc")])),AddFlowMilestoneAction:Yn(t=>It(t,[ke(478,"GGG0")])),ScreenPopAction:Yn(t=>It(t,[ke(512,"MFyx")])),PlayAudioAction:Yn(t=>It(t,[ke(439,"FMrc")])),SetFlowOutcomeAction:Yn(t=>{let e=ke,n={lyiML:function(r,s,o){return r(s,o)},ZFIQl:function(r,s){return r===s},kefqh:e(417,"^Czk")},i=n[e(502,"EUB&")](Nr,t,e(477,"Cp2g")),a=Nr(t,e(471,"e!s["));return i&&a?n[e(448,"2ISW")](e(469,")SlE"),n[e(443,"9n%m")])?i+e(453,"^DmT")+a:_0x116f29:i??a}),InitializeFlowOutcomeAction:Yn(t=>Nr(t,ke(447,"U0TI"))),EvaluateScheduleGroupAction:Yn(t=>Nr(t,ke(413,"rsC^"))),FindSystemPromptAction:Yn(t=>Nr(t,ke(444,"MjqO"))),SetUUIDataAction:Yn(t=>Nr(t,ke(459,"Whzw"))),UpdateVariableAction:{},SetAttributesAction:{},GetAttributesAction:{},EvaluateScheduleAction:{},CollectInputAction:{},GetResponseAction:{},AskForBooleanAction:{},AskForSlotAction:{},CommunicateAction:{},DigitalMenuAction:{},SendResponseAction:{},TranscriptionAction:{},FindQueueAction:{},FindUserPromptAction:{},SetWhisperAudio:{},BridgeServerAction:{}};var Ra=Pn;(function(t,e){let n=Pn,i=t();for(;;)try{if(parseInt(n(397,"(^pw"))/1*(parseInt(n(418,"$ONb"))/2)+-parseInt(n(442,"$8lJ"))/3*(-parseInt(n(426,"B^l&"))/4)+parseInt(n(390,"dyj["))/5*(-parseInt(n(443,"N!B%"))/6)+parseInt(n(403,"@K(v"))/7*(-parseInt(n(455,"$ONb"))/8)+-parseInt(n(427,"irk4"))/9*(-parseInt(n(429,"^AZe"))/10)+parseInt(n(395,"r*Ur"))/11+-parseInt(n(432,"(KSP"))/12*(parseInt(n(394,"4FWg"))/13)===e)break;i.push(i.shift())}catch{i.push(i.shift())}})(qh,215737);function _h(t){let e=Pn,n={STwps:function(i,a){return i===a},XpfiP:function(i,a){return i>a}};return n[e(383,"4FWg")](typeof t,e(387,"9Fp["))&&n[e(405,"bVl(")](t[e(388,"r*Ur")],0)}function Ur(t){let e=Pn,n=[];if(Array[e(447,"xMz2")](t[e(439,"ZmI5")]))for(let i of t[e(425,"$ONb")])i&&typeof i===e(399,"^AZe")&&n[e(452,"bVl(")](i);return t[e(400,"M[ds")]&&typeof t[e(393,"XbQE")]===e(420,"VuM&")&&n[e(454,"$8lJ")](t[e(406,"[BZK")]),n}function Jy(t){let e=Pn,n=t[e(436,"3sTn")](/^__/,"")[e(411,"$8lJ")](/__$/,"");if(n[e(453,"yAu*")]===0)return t;let i=n[e(437,"M[ds")]();return i[e(449,"VOOX")](0)[e(409,"N!B%")]()+i[e(456,"2dqX")](1)}function $r(t,e){let n=Pn,i={tnZTo:function(o,l){return o===l},aYovv:n(398,"@K(v"),wEzUa:function(o,l){return o>l},AYxvR:function(o,l){return o(l)}},a=t[n(416,"N!B%")]??n(412,"$8lJ")+e+"__",r=i[n(382,"VOOX")](typeof t[n(438,"VuM&")],i[n(423,"X8pF")])&&i[n(386,"r*Ur")](t[n(446,"2dqX")][n(408,"(^pw")],0)?t[n(428,"xMz2")]:i[n(404,"VuM&")](Jy,a),s={outputId:a,label:r,nextActionId:t[n(415,"[I3l")],synthetic:!1,terminal:!1};return t[n(444,"x2$A")]===!1&&(s[n(445,"sXNH")]=!0),s}var $ie=[Ra(392,"$ONb"),Ra(385,"irk4")];function Pn(t,e){t=t-382;let n=qh(),i=n[t];if(Pn.VnOVms===void 0){var a=function(l){let c="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=",u="",p="";for(let h=0,g,d,m=0;d=l.charAt(m++);~d&&(g=h%4?g*64+d:d,h++%4)?u+=String.fromCharCode(255&g>>(-2*h&6)):0)d=c.indexOf(d);for(let h=0,g=u.length;h{},outputs:t=>Ur(t)[Ra(419,"&uUh")]($r),isTerminal:()=>!1,referencedTaskIds:t=>{let e=Ra,n=[];for(let i of $ie){let a=t[i];typeof a===e(396,"[BZK")&&a[e(457,"!m]y")]>0&&n[e(451,"@K(v")](a)}return n}},Bie=new Set([Ra(389,"9Fp["),Ra(421,"CdM4")]);function N1(t){let e=Ra,n={FAIxl:function(i,a){return i===a},YYemF:e(384,"BKAJ")};return n[e(440,"XBJ$")](typeof t,n[e(424,"$rAa")])&&t[e(391,"tszC")](e(413,"BKAJ"))&&!Bie[e(414,"1E]a")](t)}function qh(){let t=["WPKBE8kpi8oOWOe","W4RcRfRcQMe","cmoCnGKB","WQzQwCo8","W6hdN3xcRSo2g8ofWQi","zSkYeCoqzGq","W7PpsSonWO3cNhvPhmkZFq","DColW6/cQheBosG6W5hcVG","WQxcHmoiW64aowW","WOJcVSo3W5C1cLZdOwq","smkMW55JW60bmmoI","gGCj","rCopWONcKYddTCkIWQ0KWRNcM2m","W6fvA8onWOJcJu5o","W6xcSgVcISoaaCo/","WRb7r8kLvSkbqmoFmxy","W68EDa","W6tcL0JcUvddLG","BCkcngFdRtSWx0v1WQ3cRuSjWRC5fG8","FmoKFLioBrpcRW","W6FcLCkdASky","FZrHWOmO","W7KObSo9za","DtpcOZGUW6Gp","W53cLSokEW9mACk+WQVdG8oOfN0","W540WRORW5e","WOf8mZa5W4ZcKCkG","dr8LEMBcO8oJWQ4","WOvgWO/cV8oSwqiaW4e","WRVdS8kdWOFcN3P2W5JdJq","rGCqs8otWQddIW","WRH8r8kNimo2xCoBc3fyeG","d8o8cxVdNCkcWOj/bazeW5tdUa","qhRcKSkKWRhcI8kY","W7JcTCkzW4ytySkWBCk4acK","W6FcLedcUv8","W4JdRILpDa","WPtcQ1hcN8o+","pSonprOk","W6/dKSkiWRrvohZdRePJWQC","WR8vkSkpW4RdJxf5m8kIxCow","WO9htCkIACkwpW","WQmyWP53qmoQevK","ue4XEKC","W5SMWPK8W4/cH8kf","oCkXW7nfkZFdNMtdHhCKvmkq","WOlcT3eAW4OQ","WPDZpCosmmozWQrmWOGF","W540E8kk","imoziWG","lSoWnx3dKqe","WQFcLmolW6O","WRT7s8kGjmo1hCopl0zQfdK","t0m6Fe4","aMFdM13dGmox","WPxcSuO8W6q","DCkNxXmE","B8kGW41KW7aa","WOpdH8kwpgGrpmkpWPBdRmoNaf8","kdKcW5ZcJa","WOxcMmoJWQq2W4O","mXKwW67cMxi","WQlcNSoWWQmRW4TTDejTW7/cGMJcVCkRWQ45WPG","FSolWRhdKcW9kq0","WPryW4NcHeu9nqHFW58","W70OaCo+rCkNtCoTn3zZbGq","W4xdLdqr","hSogg1juyIVdPL4wW6K","BuHoWRVdLc7cOZHMFuNcQ8os","WQv/x8o9WObR","omoJmSoCxczfiG","W501ESklh8o9","W58UlZaxW5C","W7ZcU8kHW4e","W644hCkIW5PUi8kpwSoBFq","dSo8dxVdKCkoWOv9jq1iW6pdLq"];return qh=function(){return t},qh()}function U1(t){return t?t in Eh||N1(t):!1}function $1(t){let e=Ra,n={namzA:function(r,s){return r(s)}},i=n[e(441,"bVl(")](N1,t)?{...G1,...D1}:G1,a=t&&t in Eh?Eh[t]:void 0;return a?{...i,...a}:i}(function(t,e){let n=yi,i=t();for(;;)try{if(parseInt(n(143,")Z%b"))/1+-parseInt(n(146,"mB4W"))/2+-parseInt(n(153,"qqiF"))/3*(parseInt(n(149,"dLTL"))/4)+-parseInt(n(134,"(rDt"))/5*(-parseInt(n(131,"bpdM"))/6)+-parseInt(n(137,"iOHi"))/7*(parseInt(n(141,"iOHi"))/8)+-parseInt(n(154,"BkM%"))/9+parseInt(n(130,"JvV]"))/10*(parseInt(n(135,"CB0S"))/11)===e)break;i.push(i.shift())}catch{i.push(i.shift())}})(Hh,738297);function Hh(){let t=["W5qDW7ZdK8kpnLjB","ndzeWOpcImkoW5qmW6rmW7pdRmog","W6K1hwJcUmkDA25vWQZcHCksWQ/cHW","W7zYW6NdRCkRnWr9bGVcNgJdJa","r8kNWRRdHCkbAKFcUWndW5jKWQW","kCoqWRTrzve","WOBcLWG2bmoBW4NcGCk4ibiQFG","W7f2WPhcMmoDseDC","WQWxECoWyfNdUSkz","W5NdL8ofmmkRdIbHWQ/dLmoUW7y","c8kqA39LW7iN","fvhcQhybeSo3WOddMLyYW6u","WRBcUmocm8kQW6vHWRJcUCoZuXtcSG","WObiW58","WPnmW5JdUCkulufiWRW","rNddOmo2usKCW7NcPKCiW7u","hWZcVtONjmk9pG","WPytW7FcKSoDp13dRMhdS8k/zCoP","W4fxECkYcsb7gSorWPvZna","eI/dUaDwr8o1","g2ufW5FdOKdcT3XgWRNdISonW4W","vmoPeCkiea","W51LWQtdTmkszsuEcbRdK3e","gwCcW5tdPedcS1fYWQ7dUCojW4y","qmkHW7JcMmo2hrtcPa","hW7dUMTtu8kujaFdL01F","t3SoEcBcNwJdMW","dSkQWORdG1fL"];return Hh=function(){return t},Hh()}function yi(t,e){t=t-128;let n=Hh(),i=n[t];if(yi.KwdJso===void 0){var a=function(l){let c="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=",u="",p="";for(let h=0,g,d,m=0;d=l.charAt(m++);~d&&(g=h%4?g*64+d:d,h++%4)?u+=String.fromCharCode(255&g>>(-2*h&6)):0)d=c.indexOf(d);for(let h=0,g=u.length;h>(-2*h&6)):0)d=c.indexOf(d);for(let h=0,g=u.length;h>(-2*h&6)):0)d=c.indexOf(d);for(let h=0,g=u.length;hr[i(245,"%CR0")](p));return{graph:{nodes:r,edges:o,adjacency:s,roots:u,dropped:l},warnings:c}}function Ln(t,e){t=t-249;let n=zh(),i=n[t];if(Ln.xSZvch===void 0){var a=function(l){let c="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=",u="",p="";for(let h=0,g,d,m=0;d=l.charAt(m++);~d&&(g=h%4?g*64+d:d,h++%4)?u+=String.fromCharCode(255&g>>(-2*h&6)):0)d=c.indexOf(d);for(let h=0,g=u.length;hl}},r=[],s=[];if(Array[i(261,"zgtt")](t[i(352,"*cEf")]))for(let o of t[i(337,"d6EN")])o&&a[i(348,"YKa$")](typeof o,a[i(265,"Phb!")])&&r[i(383,"n1FM")](o);if(Array[i(288,"YKa$")](t[i(270,"&2VF")]))for(let o of t[i(379,"CrGd")])if(i(377,"[L2Q")===i(314,"01fm")){let l=o?.[i(336,"[rKm")];if(!l||a[i(370,"d6EN")](typeof l,a[i(315,"Wha3")]))if(i(264,"SZvn")===i(382,"[rKm")){let u=_0x454aa3.id;if(typeof u===i(319,"Wha3"))return u}else continue;if(typeof l.id!==i(308,"pHhn")){n[i(292,"CrGd")]({code:i(313,"p0z1"),message:i(346,"%0GC")+(l[i(317,"zgtt")]??a[i(355,"3V5d")])+i(325,"s@Ru")+e+i(371,"x(Xr"),taskId:e});continue}r[i(292,"CrGd")](l);let c=a[i(303,"Fw(t")](typeof o[i(365,"^G^[")],a[i(367,"E7w6")])&&a[i(295,"Tl*z")](o[i(302,"[L2Q")][i(306,"95BH")],0)?o[i(301,"Yj2U")]:l[i(263,"Qvz]")]??l.id;s[i(327,"&2VF")]({actionId:l.id,label:c})}else _0x2bb29a&&a[i(334,"nLN5")](typeof _0x1717a9,i(255,"n1FM"))&&_0x4e8d56[i(300,"Tfyt")](_0x240fc8);return{orderedActions:r,menuChoices:s}}function Fie(t){let e=Ln,n={CfLmI:function(i,a){return i===a},msYiE:function(i,a){return i===a},Psxks:e(329,"Tfyt"),SeXor:function(i,a){return i===a},yULUQ:e(345,"Fw(t"),rfzOF:e(268,"*cEf")};if(n[e(254,"p0z1")](typeof t,e(319,"Wha3")))return t;if(t&&typeof t===n[e(273,"YKa$")]){let i=t.id;if(typeof i===e(335,"Phb!")){if(n[e(381,"n1FM")]===e(283,"v7ZF"))return i;if(n[e(276,"s@Ru")](typeof _0x668c1a,e(256,"%0GC")))return _0x3eb66d;if(_0x415c79&&n[e(364,"v7ZF")](typeof _0x20ddc7,n[e(375,"pHhn")])){let a=_0x455772.id;if(n[e(291,"[rKm")](typeof a,n[e(358,"95BH")]))return a}return _0x5ebbf1}}}function F1(t){let e=Ln,n={LhFbr:e(347,"6ttI"),tpKyA:e(256,"%0GC"),mCgGD:function(g,d){return g>d},fBMIV:function(g,d){return g!==d},pmslL:e(318,"x(Xr"),rwnBS:function(g,d){return g===d},MTSBo:function(g,d){return g>d},hpiGj:e(282,"aHS3"),Ygrbn:function(g,d){return g(d)}},i=[],a=new Map,r=Array[e(324,"nLN5")](t[e(296,"9DOV")])?t[e(374,"YKa$")]:[];for(let g of r){if(!g||typeof g!==n[e(269,"aST]")]||typeof g.id!==n[e(339,"p7$w")])continue;let d=typeof g[e(260,"aST]")]===n[e(298,"E7w6")]&&n[e(272,"iOcl")](g[e(330,"%Y1$")][e(321,"s@Ru")],0)?g[e(250,"v7ZF")]:g.id,{orderedActions:m,menuChoices:w}=Lie(g,g.id,i);a[e(299,"&2VF")](g.id,{id:g.id,name:d,startAction:typeof g[e(310,"d6EN")]===e(333,"jVkp")?g[e(341,"WyZ$")]:void 0,orderedActions:m,menuChoices:w})}let s=new Set;for(let{id:g,orderedActions:d}of a[e(277,"&G7k")]())for(let m of d){if(n[e(360,"Tl*z")](typeof m.id,e(319,"Wha3"))){i[e(373,"Fw(t")]({code:e(378,"d6EN"),message:e(279,"s@Ru")+(m[e(354,"*cEf")]??e(311,"YKa$"))+e(293,"Wha3")+g+e(357,"[L2Q"),taskId:g});continue}s[e(267,"WyZ$")](m.id)&&i[e(350,"*cEf")]({code:n[e(285,"pwCB")],message:e(328,"CrGd")+m.id+e(326,"aST]")+g+e(275,"v7ZF"),nodeId:m.id,taskId:g}),s[e(359,"SZvn")](m.id)}let o=[...a[e(284,"Qvz]")]()],l=t[e(281,"SZvn")],c=typeof l===e(369,"Tl*z")&&a[e(267,"WyZ$")](l),u=c?[l,...o[e(332,"9DOV")](g=>g!==l)]:o;n[e(343,"v7ZF")](typeof l,n[e(356,"v7ZF")])&&n[e(280,"^G^[")](l[e(351,"3V5d")],0)&&!c&&i[e(289,"95BH")]({code:n[e(251,"jVkp")],message:e(309,"x(Xr")+l+e(368,"^G^[")});let p=new Set,h=t[e(331,"01fm")]?.[e(363,"n1FM")];if(Array[e(361,"v7ZF")](h))for(let g of h){let d=n[e(259,"9DOV")](Fie,g);d!==void 0&&p[e(290,"^G^[")](d)}return{flowName:typeof t[e(344,"YKa$")]===n[e(305,"9DOV")]?t[e(253,"x(Xr")]:"",flowType:typeof t[e(349,"s@Ru")]===n[e(304,"nLN5")]?t[e(258,"TR^2")]:"",tasks:a,taskOrder:u,entryTaskId:c?l:void 0,reusableTaskIds:p,warnings:i}}function Dh(){let t=["y3VdUSkxu34","x8krWOC0l8otWPK1W4W6","gSk3v1KJWPrOba","F1ZdUa","aSkkW44l","WOhdRmkLzdK6wmoCWOtdSNlcRJ4","wCkSD10PW5KQW695iWJdKGLPWOi","WQfkdColW7VdJ3dcUxxdGqmVDmo0","xCozlhhcLCk4oSotwSohW4THACkSqCk6i0b/W73cTXvv","t8kQWRtdNMm5j1ddNumqnJZdVSoFW4tcOhpcLI5SWO/dTCknW4O","W6DaW6TLW6jCuLO0W7rqW7BdUCovWPLwW7pdVmoUeSkIW7xdKmoU","wZihW4qzW4jaWRjXwSoeWPNdJq","wCkxWQCHkmokWRK/","pdhcRM4pEHvK","W7hcHCoAja","r8k9xG","WRiPW4ZcQuu","WPX8WQtdKCogkmkDWPNdKx8","WO/cQ8kWWRO","EeZdTCkEyq","hmkEW5ag","lSopW51B","WOm6WOarWOqGj24YW71CW5NdPq","FfddV8kNW7tdI8o5FG","d8kZs8kN","WPtcSSoVFgfHfmktWOBdVM3cPZtdHhldGJxcG0i0cXdcNmo0WPO0WPqPuctdQatdVd4RW73cIx5AW5FcGt0jq2D8W7HWWPddUCoZueNdGxLHDCo1xdTspxNcV8ksW5Wy","xCotW4GLWQnqW6pcQa","w8k9xSoSW7pdGCkFm3C","jCkBgSoIW4TLaCkPymoSW4eYW4ijlhLKW6W","ACkev3Cy","W7ers8kxWQFcLa","wmkqW4vo","pmkSv0W4WPqbbSkOW7BdLwnGcdJdLCo3bf0","hCoUgSk2WOZdKmkVn3W+W4K","W517W41qW4rNBq","C8kyCmoS","WQzxWR5p","A8o2aflcQq","hSkpWROIlSoxWP48WOq","FSkSWQZdSa","qSkqW5TaW4jJpf5nWP4","WQJcKSkIWPS","lmomlCk7W5L2nCk9pmksWOVcKmoQ","EgRdM8kJuuddOZldIeBdNNm9","WRRdLutcUXS","aSotW6ixl8oQWRWbW4K","lmoAW79Mia","W7CeWQCZWOjLWRPWf8ovWPNdQSkIva","rmo6sgiyWOrRja","W4tcRSoVna","W70uCSkjWR8","WQCRW4VcJw8uwgW","lmo54OolWRHKkGD4W6rOew4VW5ldN8ovWRD0WOeoy8kxW6xdJa","q8ocpCoUW6v+gCkY","WPTbW4KAshrOWO7cN1C","W5ZdUfVdVW","wZmoW4CzW4DjWR55BCoHWPtdKa","xmkOx8oUW5ldLa","WQBcGt/cKIu","fSklWQbXoCoxWOm6W486W7HQWPO","yNZcLgysEJzs","W4NdGZSdWO3dLqHKWPldSSo+hq","pIBcRCobhYzlWRD7CGH7","gmkoW5edWOrAW4JcGa","oq7dK8kIW6ny","W5FdJ8kvWOO","WQddOw5xW5K","W7lcQqBdPmohcr4LgSodCq","oCkLW6GGWQjJW6FcS8koCxZcH2xcOrLDywZcHG","lINcI8klqhZcGGFdMq","W5tdVCoKW6DtothdSSo6y8oDnxq","jxnkWOvzWOvz"];return Dh=function(){return t},Dh()}var Ky=Si;(function(t,e){let n=Si,i=t();for(;;)try{if(-parseInt(n(174,"LOFW"))/1*(-parseInt(n(159,"HkIQ"))/2)+parseInt(n(172,"RNu7"))/3+parseInt(n(166,"ebkS"))/4+parseInt(n(161,"f1H7"))/5+parseInt(n(225,"*QGQ"))/6*(-parseInt(n(188,"f1H7"))/7)+-parseInt(n(182,"l](v"))/8*(parseInt(n(165,"AX7t"))/9)+parseInt(n(184,"@]yG"))/10===e)break;i.push(i.shift())}catch{i.push(i.shift())}})(Dh,742447);function Si(t,e){t=t-156;let n=Dh(),i=n[t];if(Si.LqqnyE===void 0){var a=function(l){let c="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=",u="",p="";for(let h=0,g,d,m=0;d=l.charAt(m++);~d&&(g=h%4?g*64+d:d,h++%4)?u+=String.fromCharCode(255&g>>(-2*h&6)):0)d=c.indexOf(d);for(let h=0,g=u.length;h0?o[e(160,"^5a*")]:u??l;i[e(216,"Jtbz")]({id:l,kind:n[e(223,"5*jK")],actionType:u,label:p,description:c[e(156,"6h[z")](o),taskId:r,taskName:s[e(208,"m#)^")],terminal:c[e(178,"O6D0")](o)}),!n[e(171,"zCk(")](U1,u)&&a[e(226,"l](v")]({code:n[e(196,"LOFW")],message:e(185,"RVwP")+n[e(221,"tDks")](u,e(215,"O6D0"))+e(157,"Jtbz"),nodeId:l,taskId:r}),Vie[e(192,"5$np")](u??"")&&a[e(191,"#rb^")]({code:e(187,"lc40"),message:e(209,"*QGQ")+l+e(202,"l](v"),nodeId:l,taskId:r});for(let h of c[e(211,"lc40")](o))i[e(213,"xxIJ")]({id:Ia(l,h[e(190,"AX7t")]),kind:e(220,"LOFW"),label:h[e(163,"C2FY")],taskId:r,taskName:s[e(195,"E@ba")],terminal:h[e(168,"9qHV")]}),h[e(200,"UL$#")]&&a[e(197,"9qHV")]({code:n[e(214,"RVwP")],message:e(176,"f1H7")+h[e(179,"*QGQ")]+e(201,"5$np")+l+e(164,"O6D0"),nodeId:n[e(227,"@]yG")](Ia,l,h[e(189,"O6D0")]),taskId:r})}return{nodes:i,warnings:a}}function Oi(t,e){t=t-368;let n=Nh(),i=n[t];if(Oi.PMkAeE===void 0){var a=function(l){let c="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=",u="",p="";for(let h=0,g,d,m=0;d=l.charAt(m++);~d&&(g=h%4?g*64+d:d,h++%4)?u+=String.fromCharCode(255&g>>(-2*h&6)):0)d=c.indexOf(d);for(let h=0,g=u.length;h0;){let u=c[c[e(400,"3iA&")]-1],p=t[e(374,"rtD4")][e(416,"Eqt*")](u[e(410,"ueYm")])??[];if(u[e(431,"qAS8")]>(-2*h&6)):0)d=c.indexOf(d);for(let h=0,g=u.length;hg[e(412,"32ln")]===e(437,"n(f["));return{ok:!0,ir:W1(l,u,i,p),graph:l,warnings:[...i[e(429,"ZH9P")],...r,...o,...c]}}catch(i){return{ok:!1,error:{code:n[e(430,"z92R")],message:i instanceof Error?i[e(432,"Bf1^")]:String(i)}}}}(function(t,e){let n=on,i=t();for(;;)try{if(-parseInt(n(442,"vc4a"))/1+-parseInt(n(467,"t]cL"))/2+parseInt(n(479,"Wh5H"))/3+-parseInt(n(406,"fRtI"))/4*(-parseInt(n(438,"D[!P"))/5)+parseInt(n(468,"jJ[4"))/6+-parseInt(n(322,"DtF7"))/7*(parseInt(n(476,"]X)1"))/8)+parseInt(n(393,"c!8o"))/9*(parseInt(n(358,"c!8o"))/10)===e)break;i.push(i.shift())}catch{i.push(i.shift())}})($h,115582);function $h(){let t=["nJOJDGvOWQi","ySkPlmkhWOddMG","FtRcJM4euSoUW5lcKCk5W4BdNa","W4KTWPaeWP/dPa0","W7xdUd1cW4ddNbrXW65Qhq","W75iWQdcIvtdN2hcR8ouW5PbW5y","W4KhpeBdLb/cJvFcMSoIWQO","W6hdGbddUW","zCoCW4ffsq","jWC/kCoUW6ecWQKF","jaqMomoeW7S","W4pcMmkTDCk5WO/dMa","WOpdJcldM0NcTeZcPSkgW7S","sCo+muD5W5BcPL/dVYaJ","CmoIjCotgCoUWO0TW6eQ","WPRcTYy","WOZdMSodcxNdSG","fdK4jmoxW6O","WOlcJxiLvG","WQJdO34ZyW","WONdKCojc3xdLx0","jXhcOMu","q3dcT8ooW77dSLKrWP3cPq/dTmkuW5C","W4/cLx9sf8oW","W7VdGbldNmo5","E8ogf09I","WOCFWP8Mzcy","WOpdNSoEc17dV3xdJq0JCspdNW","pXWRW7/dVW","uSoKi8oY","W6RdLHVdVCoU","jNxdLYDF","WQtdUaBdVxC","W67dTd3dGsW","WQRdSKLNW77cMwG","WOOVpmosExu","yJCDWPK/WOS","W5JcGNTqjW","p2jgW4D8W5tcUsmBd8ogW5m","ydmEWPS","xdVcUg7dU38","W4FdRXRdVCoI","FCoKp8oDaSoO","mZuJEvm","sxJcMuyuWOD8WOaUiSkpvJ/dUeFdNuVdHIz1","EeJcGKHsWReoW4m","oISOWOhcVW","x8oEwb7cRW","zsNcIutdTG","WPy4W5hdNri","nX8GWQFcGW","W5HyW4JdG0jpW4GcW5JcGmkHWQS","n0pcU8oqW5O","W5pcG2DEgSoJ","s8oIeCoOnrbz","WRlcJ8kUWRhdVsW","sxdcRq","WRZdRqSN","o0xcNmodW6C","W6FdRYZdL8ox","fuRdVZPc","WRpdLveKrG","WP0DWOlcMa","W7ddI8oOW63cON3cO8kNW4FcMfum","WRNcPeCvWOpcJqrcW6X8pb0","W6VdPdRdUSoJ","WQK9W53dOcy","AJSuWPC/","DZHeBSoICG","W7JcIbddVGZdVCoI","AuFcUMnB","rbRdHhNcQW","W5JdNSokcwVdTe0","W4W7WR8rWPNdRq","sCoZnSo4oq","WQtdG2dcVeNdSSozyMmiW4K","W63dSH9kW4pdKq","WRWlW6FdKW/cJG","WQy/WQBcSra","AdRdMuFcIa","W5Seh0BdKq","WOFcS3ukua","WR4CiCoNCa","iHunl8ovW64F","W5hdMcjKW6pdSdb3W5bqnIScW65Xnmom","BJRdUv7cMcRdNSojW7Tbr0tcObW","ytJdSg7cTa","gIW1WPNcVW","zmkQA8kjAMjhuYq","WRxdPhuGqCoy","W5enhK7dLXi","hN/cNCoMW7m","jtGBW7/dNriVWQ1MW7hdUSoLw1FcP2/cMH9q","CSkSkmkcjG","WP7dSmk+r15cWOrfrM4","WQCeWPVcGta","rSo0pmo/mXq","W6/dKvnB","BmkOmSklWOZdGa","fYyKWQlcTa","WQNdTgGV","mKZdGCkV","tCo1a8oohW","AsLyCSopFvhcHmo5oa","CSoCttBcMq","W7NcMIi","rcpcO0VdRa","rw/cG8o1W4O","q8kAbmkrWQ8","jMRcUmomW4O","xmkYkmkJWO4","WQtdUqS","WQ7dPvGcuG","W40Da0e","W6/cRCoAWRDeW7BdOCkDW5r5FSkO","WQhdPrpdHfC","jGmIkmoKW6CjWQuesG","WQmAW7VdNrxcGq","W7hcOx5hgW","WPWGWPebzG","W75pWQhcJ1ddN3hcO8oWW7jcW4C","odW0fSoI","W7pdGu5uW77cSG","WO9zrrJcKeVcHwhcJ8o6WQFdOa","Af/cGe5U","W6ZcUsP3aSoEWRijm0bS","W5NcGSk7ECkVWQC","WOxcGMCRsIJdP8ozDmkV","n0JdLCk5","WR3dVdCAW7K","WRRdOGGSW5O","W6RdLHRdVq/dUSkT","WOfpWQCUAqm","WQ4BW7e","W5m7WQu","WOVdVmoVeW","WO7dIJJdLvlcSG","WPldUSkK","WQxdTHWQW6S","meJdGSkTWONcSG","WORdV8oOe8oSW68","WRxcGGddPCkt","oCouW4flwZxdRa","uCo0e096W5S","WPBdVCkUs0K","W4lcKhjYgW","tSo0pSo9mXK","ohVcUCoXW6a","W4tcL8kKDq","WPGTW58Q","W4RdTJzFW68","vGaKWPmU","WOGqWPtcKW","WPXoWOyCDW","kWKSW6JdKq","W63dHdBdQG","rSoTwdxcMCo9","jqCHoa","oxRdJSkUWOO","WPxdHYWeqmk0W6imxCkoAYS","WOZdJJVdLW","jZSjW5FdNXi","W5FcRmk3r8k8WQRdIJtdLCopqa0","WONcIh0","WRFdOhyI","E8k9z8ku","BGuK","itChW5FdHcKQ","DG5DsCoe","AcLyymo4Fq","jJGoW5C","uSkumSkBWPpdIW","EZZdN3JcUq","WQSwW7ldKXu","DCkqkmkgoa","umo4eW","i2/dKtHsea","WRBcJLSYyW","DgJcUNfZ","WRlcLw7cTKRcRmkxrdPvW4mE","zHxdHv3cQq","q3hcMfyZWOO","CSobW5rfuZW","W57dVKnHW6BcUa","WRhcJSkVWRa","AGiUrWLKWOa","w8o6kmoOcW","W43dQrFdPZi","W5tdHwDbW5i","WQ7dUaxdGw0","AmogW6DEtZRdGW","kduwWR7cJWnoESob","WOJdRCokl2S","y8kczSkSta","WPhdJ1H/i8oJW50f","WORcGh4N","W5ujaW","WRddU8ky","WPpdI8oFb2pdVq","WOuJW4C9WQTD","BCoqW4Hlstm","oGtcVwLRWRe","W4xdQqZdLCoz","s03cLevA","krO3r2W"];return $h=function(){return t},$h()}function J1(t,e){let n=on,i={CJEvq:function(a,r){return a(r)},FWjgl:n(376,"H@tb"),ewfco:function(a,r){return a!==r},QynAm:function(a,r){return a!==r},cPOZm:n(414,"XiA5"),uJcEg:function(a,r,s){return a(r,s)},iTIpi:function(a,r){return a(r)}};if(Array[n(330,"mJZP")](t[n(418,"pwJ[")]))for(let a of t[n(326,"H@tb")])a&&typeof a===n(360,"@d[V")&&i[n(314,"&8kS")](e,a);if(Array[n(407,"VKAc")](t[n(489,"WXiM")]))for(let a of t[n(426,"mStz")])if(i[n(429,"LeEI")]!==n(423,"QnPc")){if(!a||i[n(434,"8iF]")](typeof a,n(405,"iPoA")))continue;let r=a[n(297,"iPoA")];if(!r||i[n(309,"iPoA")](typeof r,i[n(353,"@d[V")]))continue;i[n(318,"0JUY")](e,r,i[n(346,"yUbg")](Kie,a))}else _0x2f4862[n(416,"&8kS")]=_0x3ac537[n(370,"iPoA")]}function Kie(t){let e=on,n={NQBsL:e(400,"AZUn")},i={};return typeof t.id===n[e(340,"&%!R")]&&(i.id=t.id),typeof t[e(348,"ymQI")]===e(472,"RjQh")&&(i[e(394,"H@tb")]=t[e(300,"&obv")]),typeof t[e(471,"vc4a")]===n[e(307,"iPoA")]&&(i[e(412,"ksh2")]=t[e(372,"4I(c")]),i}function K1(t){let e=on;if({cRfHu:function(a,r){return a===r}}[e(485,"H@tb")](t,null)||typeof t!==e(375,"fRtI")||Array[e(487,"XiA5")](t))return[];let i=t[e(448,"V6CQ")];return Array[e(389,"ksh2")](i)?i:[]}function Xy(t,e){let n=on,i={KWWAf:n(474,"sSZR"),ykxrL:n(388,"&8kS"),FkVIS:n(402,"sSZR"),GEgjn:function(c,u){return c===u},rBkNH:n(391,"]X)1"),eJRvr:n(463,"8iF]"),kXCwo:n(339,"CT*K"),wdCEg:n(381,"ksh2"),jTJcs:function(c,u,p){return c(u,p)},HNgcc:n(386,"mJZP")},a=[],r=new Set;for(let c of Array[n(473,"Wh5H")](e)?e:[])typeof c===n(457,"c!8o")&&!r[n(304,"Wh5H")](c)&&(n(323,"sSZR")!==i[n(379,"WXiM")]?(r[n(419,"&%!R")](c),a[n(299,"QnPc")](c)):_0x179a1d[n(461,"C4z#")](_0x57d211));if(a[n(335,"&8kS")]===0)return{found:[],notFound:[]};let s=new Map;for(let c of K1(t)){if(!c||typeof c!==i[n(454,"lC[Q")]||typeof c.id!==i[n(311,"QnPc")])continue;let u=c.id,p=typeof c[n(363,"QnPc")]===i[n(311,"QnPc")]&&c[n(354,"mJZP")][n(446,"pwJ[")]>0?c[n(334,"CT*K")]:u;i[n(465,"QnPc")](J1,c,(h,g)=>{let d=n;if(i[d(482,"st]1")]!==i[d(385,"]PoV")]){if(typeof h.id!==d(444,"FDZw")||!r[d(310,"C4z#")](h.id))return;let m={actionId:h.id,action:h,taskId:u,taskName:p};g&&(m[d(302,"RjQh")]=g);let w=s[d(460,"mStz")](h.id);if(w){if(i[d(491,"lC[Q")]!==d(452,"FDZw"))return[];w[d(312,"DtF7")](m)}else i[d(303,"AL3P")](i[d(367,"RjQh")],d(371,"WXiM"))?_0x4ca4e8[d(492,"x#vC")]=!0:s[d(333,"VKAc")](h.id,[m])}else return})}let o=[],l=[];for(let c of a){let u=s[n(396,"A[cs")](c);if(u)if(i[n(445,"8iF]")]!==n(357,"&obv"))o[n(383,"t]cL")](...u);else{let p=_0x446246[n(417,"LeEI")]()[n(366,"@d[V")](_0x2edca2);if(p===-1)return _0x2bbe8e;let h=_0x14a15c[n(365,"$rME")](p,_0x142827[n(321,"D[!P")]);return{index:h,length:_0xd2f9a3[n(374,"LeEI")](_0x883e66[n(342,"LeEI")],_0x51925f[n(380,"V6CQ")]-h)}}else l[n(296,"D[!P")](c)}return{found:o,notFound:l}}var Zie=64;function Qie(t,e){let n=on,i={XrgBO:function(r,s,o,l){return r(s,o,l)},vzpcI:function(r,s){return r+s},flKQS:function(r,s){return r===s},OPmgz:function(r,s){return r!==s},qdOUj:function(r,s){return r!==s},QVkpo:n(486,"&Z7q"),kzZNw:function(r,s){return r!==s}};if(t instanceof RegExp){if(i[n(328,"C4z#")](n(305,"FDZw"),i[n(317,"c!8o")]))return{found:[],notFound:[]};{let r=new RegExp(t[n(398,"ymQI")],t[n(422,"H@tb")]);return s=>{let o=n;r[o(413,"XiA5")]=0;let l=r[o(351,"st]1")](s);return l?{index:l[o(337,"C4z#")],length:l[0][o(331,"F)%R")]}:void 0}}}if(i[n(352,"F)%R")](typeof t,n(459,"t]cL"))||t[n(316,"4I(c")]===0)if(n(464,"fRtI")!==n(453,"4I(c")){let r=_0x1c2c0d;for(let s of _0x31168b[n(327,"&obv")](r))i[n(478,"pwJ[")](_0x13b2dd,r[s],_0x5f5cad?_0x113afb+"."+s:s,_0x1e7e8c+1)}else return;if(i[n(497,"jsC9")](e?.[n(431,"]X)1")],!0)){if(i[n(306,"mStz")](n(451,"AL3P"),n(401,"8iF]")))return r=>{let s=n,o=r[s(384,"$rME")](t);return o===-1?void 0:{index:o,length:t[s(420,"]X)1")]}};_0x387419(_0x237059[_0x2b2c35],_0x7af7f2?_0x42bb9e+"."+_0x3adb1d:_0x4e7d52,i[n(329,"C4z#")](_0x33a4ab,1))}let a=t[n(410,"DtF7")]();return r=>{let s=n,o={JljqF:function(l,c){return i[on(450,"lC[Q")](l,c)}};if(i[s(495,"yUbg")](s(462,"yUbg"),s(350,"vc4a"))){let l=r[s(408,"jJ[4")]()[s(424,"]X)1")](a);if(i[s(456,"yUbg")](l,-1))return;let c=Math[s(362,"H@tb")](l,r[s(480,"jJ[4")]);return{index:c,length:Math[s(336,"@4w2")](t[s(399,"ksh2")],r[s(345,"]PoV")]-c)}}else{let l=_0x301ea9[s(415,"uOx&")](_0x3709ef);return dOIZcf[s(294,"st]1")](l,-1)?_0x4ce4e2:{index:l,length:_0x4ad91a[s(477,"VKAc")]}}}}function on(t,e){t=t-293;let n=$h(),i=n[t];if(on.FZCxdb===void 0){var a=function(l){let c="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=",u="",p="";for(let h=0,g,d,m=0;d=l.charAt(m++);~d&&(g=h%4?g*64+d:d,h++%4)?u+=String.fromCharCode(255&g>>(-2*h&6)):0)d=c.indexOf(d);for(let h=0,g=u.length;h=u},fBHZG:function(c,u,p,h){return c(u,p,h)},aPKUM:i(441,"c!8o"),FWPOQ:function(c,u){return c+u},taoBx:function(c,u){return c>u}},r=[],s=0,o=new Set,l=(c,u,p)=>{let h=i;if(typeof c===h(481,"4I(c")){let g=a[h(483,"WXiM")](e,c);if(g)if(h(344,"c!8o")===h(490,"WXiM"))s+=1,r[h(493,"QnPc")]u},wEHMC:function(c,u){return c!==u},mQfNQ:function(c,u){return c>u},jxlzn:function(c,u,p){return c(u,p)}},r=a[i(469,"8iF]")](Qie,e,n);if(!r)return{hasMatches:!1};let s=n?.[i(496,"@d[V")],o=a[i(387,"D[!P")](typeof s,i(430,"0JUY"))&&a[i(403,"jZ&E")](s,0)?Math[i(484,"DtF7")](s):Number[i(488,"jJ[4")],l=[];for(let c of K1(t)){if(!c||a[i(308,"yUbg")](typeof c,i(360,"@d[V"))||a[i(432,"@d[V")](typeof c.id,i(325,"uOx&")))continue;let u=c.id,p=typeof c[i(411,"8iF]")]===a[i(392,"x#vC")]&&a[i(437,"mJZP")](c[i(359,"&8kS")][i(382,"VTFE")],0)?c[i(425,"AZUn")]:u;a[i(435,"fRtI")](J1,c,(h,g)=>{let d=i;if(typeof h.id!==d(397,"]X)1"))return;let{hits:m,truncated:w}=a[d(377,"sSZR")](Xie,h,r,o);if(m[d(494,"DtF7")]===0)return;let f={actionId:h.id,taskId:u,taskName:p,matchedPaths:m};a[d(298,"lC[Q")](typeof h[d(421,"XiA5")],d(355,"AL3P"))&&(f[d(293,"@4w2")]=h[d(439,"&Z7q")]),a[d(349,"jJ[4")](typeof h[d(443,"vc4a")],a[d(320,"XiA5")])&&h[d(359,"&8kS")][d(440,"vc4a")]>0&&(f[d(356,"XiA5")]=h[d(347,"uOx&")]),g&&(f[d(315,"XiA5")]=g),w&&(f[d(390,"lC[Q")]=!0),l[d(466,"st]1")](f)})}return l[i(480,"jJ[4")]>0?{hasMatches:!0,matches:l}:{hasMatches:!1}}(function(t,e){for(var n=_i,i=t();;)try{var a=-parseInt(n(315,"2Hn["))/1+-parseInt(n(300,"AxmG"))/2*(parseInt(n(301,"1MSm"))/3)+-parseInt(n(295,"j@#V"))/4*(parseInt(n(294,"CRq&"))/5)+-parseInt(n(306,"Ql9o"))/6*(-parseInt(n(299,"IjBb"))/7)+-parseInt(n(312,"^ivg"))/8*(parseInt(n(305,"Ba^$"))/9)+-parseInt(n(316,"Ba^$"))/10*(-parseInt(n(310,"^h&Z"))/11)+parseInt(n(302,"S9vi"))/12;if(a===e)break;i.push(i.shift())}catch{i.push(i.shift())}})(Bh,715798);function Bh(){var t=["WO3dRwm2W7ZcKmo9vG","jCo2WQb/p8kkb8oKW5X0WOC","A1TgWOFcVWvqbSk3AbiQWOS","t8oaWRBcGSkaW4DrW6S","f1OUWQiaDmkNW4pcUSoSlSoF","W6T2WRFdG8k/WOfIaa","W7/dKCkcW7tcJxJdQSoMk8kpW6FdG8kEWQK","sCkByeuDW6BcKmoroCkxfCkdW74","WOBdPmk4l8owW5qn","W68iWQhcLCokdmoFbhZcVJm","W6X/W5BcKmoBW5vhlmosW7SeW7C","FSo/WQ0WW53dMCkMzbqrgZa","AfLaWOpcTvWmlSkoCHe","W5hcRuSGF8oOWQy","zM/dMHfjkwtcS8kCW6ZdSvm","WQxcUhxdVdPZvIHnW71bWOZcTLG","W7RdQgjSAbTVFZJdMdO","WQ7cVN3cIuqOmxP0","W6z2W5tdPCkGWO9Ximom","W7JdN8omWRRdUsBcSmkB","fGzCW7DPn8k1","W5ddSd52hCkVW6BdVwybWR/dRq8","q8kzWOBcGmkJW4vR","tmonW75BCCkQu1ldMq7cRSk9WOK"];return Bh=function(){return t},Bh()}function _i(t,e){t=t-294;var n=Bh(),i=n[t];if(_i.wqEToO===void 0){var a=function(l){for(var c="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/=",u="",p="",h=0,g,d,m=0;d=l.charAt(m++);~d&&(g=h%4?g*64+d:d,h++%4)?u+=String.fromCharCode(255&g>>(-2*h&6)):0)d=c.indexOf(d);for(var w=0,f=u.length;wn?t.getFlowVersionConfiguration(e,n,r?{deleted:"true"}:{}):t.getFlowLatestconfiguration(e,r?{deleted:!0}:{}),a=n?{flowVersion:n}:{latest:!0};try{try{return{ok:!0,configuration:await i(!1),source:a}}catch(r){if(Rn(r).status!==410)throw r;return{ok:!0,configuration:await i(!0),source:{...a,deleted:!0}}}}catch(r){let{status:s}=Rn(r);return{ok:!1,...s!==void 0?{status:s}:{},message:Yie(e,n,r)}}}function Lh(t){let e="latest"in t?"latest configuration":`configuration of version "${t.flowVersion}"`;return t.deleted?`${e} (the flow has since been deleted)`:e}function Yie(t,e,n){let{status:i,message:a}=Rn(n),r=e?`version "${e}" of flow "${t}"`:`flow "${t}"`;return i===404?e?`Version "${e}" of flow "${t}" not found. Check the flow id, and the version against flow_versions: pass its \`version\` value exactly (e.g. "57.0").`:`Flow "${t}" not found. Check the flow id.`:i===410?`Flow "${t}" has been deleted (410)`+(a?`: ${a}`:".")+" Its configuration could not be retrieved even as a deleted flow's; execution data recorded before the deletion may still exist.":i===401?`Not authenticated with Genesys Cloud (401) fetching ${r}: the access token is missing or expired. The flow may well exist \u2014 re-authenticate (restart the MCP server) and retry rather than concluding anything about the flow.`:i===403?`Not authorised to read ${r} (403): the OAuth client lacks permission or division access to it. The flow exists but this client cannot see it.`:i===429?`Rate limited by Genesys Cloud (429) fetching ${r}. Transient \u2014 wait and retry; this says nothing about the flow.`:i!==void 0&&i>=500?`Genesys Cloud returned ${i} fetching ${r}. Transient server-side error \u2014 retry; this says nothing about the flow.`:`Failed to fetch ${r}`+(i!==void 0?` (HTTP ${i})`:"")+(a?`: ${a}`:".")+" Likely transient (network or gateway) \u2014 retry rather than concluding the flow does not exist."}var Z1=50;function ete(t){let e=[],n=new Map,i=!1;for(let a of t){let r=a.split("::")[0]||a;r!==a&&(i=!0),n.has(r)||(n.set(r,a),e.push(r))}return{lookupIds:e,requestedFor:n,strippedAny:i}}var nte={flowId:K.string().min(1).describe("The Genesys Cloud Architect flow ID"),flowVersion:Wa,actionIds:K.array(K.string().min(1)).min(1).max(Z1).describe(`Action GUIDs, taken from the \`id\` of flow_ir nodes whose \`kind\` is "action". Batch every action of interest into as few calls as possible rather than calling this tool once per action. Branch-output ids of the form \`::\` are also accepted; the suffix is stripped and the underlying action is returned. Maximum ${Z1} ids per call; chunk a larger set into successive calls.`)},Q1=({architectApi:t})=>({config:{description:"Retrieves the raw Architect configuration of specific actions in a Genesys Cloud Architect flow: decision expressions, prompt text, data action inputs and outputs, and any other per-action settings that the flow_ir tool omits. Use flow_ir first to find action ids and to understand the control flow, then use this tool to find out what an action actually does. Do not use the raw fields returned here to make control-flow claims: flow_ir has already resolved those, and its answer accounts for branches the raw configuration does not reflect.",annotations:{title:"Flow Action",readOnlyHint:!0,destructiveHint:!1},inputSchema:nte},handler:async({flowId:e,flowVersion:n,actionIds:i})=>{let a=await mt(t,e,n);if(!a.ok)return{isError:!0,content:[{type:"text",text:a.message}]};let{lookupIds:r,requestedFor:s,strippedAny:o}=ete(i),l=Xy(a.configuration,r),c=p=>({...p,actionId:s.get(p.actionId)??p.actionId}),u=[];return o&&u.push("Some requested ids were flow_ir synthetic node ids of the form ::; the suffix was stripped and the underlying action looked up, then reported under the id as requested. A ::start id identifies a task rather than an action, so it never matches."),l.notFound.length>0&&u.push("latest"in a.source?"Ids in notFound are absent from this flow's latest configuration. The flow may have been redeployed since flow_ir was called, so re-run flow_ir and re-join rather than concluding those actions no longer exist.":`Ids in notFound are absent from version "${a.source.flowVersion}" of this flow. If they came from a flow_ir call on a different version (or on the latest configuration) they exist only there; re-run flow_ir with the same flowVersion and re-join.`),{content:[{type:"text",text:JSON.stringify({flowId:e,configuration:a.source,found:l.found.map(c),notFound:l.notFound.map(p=>s.get(p)??p),...u.length>0?{notes:u}:{}})}]}}});function X1(t){let e=t.toUpperCase();return e.endsWith("FLOW")?e:`${e}FLOW`}function ite(t,e){let n={};for(let i of e){let a=i.type??"UNKNOWN";n[a]||(n[a]=[]),n[a].push({id:i.id??"",name:i.name??"",...i.version?{version:i.version}:{},deleted:i.deleted??!1,updated:i.updated??!1})}return{flow:{id:t.id??"",name:t.name,type:X1(t.type??""),version:t.publishedVersion?.commitVersion??"1"},dependencies:n}}var tte={flowId:K.string().min(1).describe("The Genesys Cloud Architect flow ID")},Y1=({architectApi:t})=>({config:{description:"Retrieves all dependencies consumed by a Genesys Cloud Architect flow. Returns the flow metadata and its dependencies grouped by type.",annotations:{title:"Flow Dependencies",readOnlyHint:!0,destructiveHint:!1},inputSchema:tte},handler:async({flowId:e})=>{try{let n;try{n=await t.getFlow(e)}catch{return{isError:!0,content:[{type:"text",text:`Flow "${e}" not found.`}]}}let i=X1(n.type??""),a=n.publishedVersion?.commitVersion??"1",r=[],s=1;for(;;){let l=await t.getArchitectDependencytrackingConsumedresources(n.id,a,i,{pageSize:100,pageNumber:s});if(l.entities&&r.push(...l.entities),!l.nextUri)break;s++}let o=ite(n,r);return{content:[{type:"text",text:JSON.stringify(o)}]}}catch(n){return{isError:!0,content:[{type:"text",text:`Failed to retrieve flow dependencies: ${Bn(n)}`}]}}}});var ate=1e3,rte=45e3,ste=10,ez="Architect > Flow Instance > View",Yt=class extends Error{};function ku(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}async function ote(t){let e=await fetch(t);if(!e.ok)throw new Yt(`Downloading the execution data file failed with HTTP ${e.status}.`);return e.json()}function lte(t){return new Promise(e=>setTimeout(e,t))}function ute(t){return t.jobState==="Success"||t.jobState==="Failed"?!0:t.entities?.some(e=>e.downloadUri||e.failed===!0)??!1}async function cte(t,e,n,i){let a=e,r=Date.now()+i;for(;!ute(a);){if(!a.id)throw new Yt(`The retrieval job reported state "${a.jobState??"unknown"}" without a job id to poll.`);if(Date.now()>=r)throw new Yt(`The retrieval job (${a.id}) was still "${a.jobState??"unknown"}" after ${Math.round(i/1e3)}s. Retry shortly; the job may complete on its own.`);await lte(n),a=await t.getFlowsInstancesJob(a.id)}return a}function nz(t){return`No execution data exists for execution id "${t}". Either the id is wrong (it is the flow instance id, which for test_bot_flow runs is the sessionId it returned, not a conversation id or flow id), the run is older than the ${ste}-day retention period, the flow was last published before execution data storage was enabled for the org (flows must be republished after enabling it), or storage is disabled. Use find_flow_execution with a conversationId to list the instances that do exist.`}function pte(t,e){switch(e.statusCode){case"404":return nz(t);case"403":return`Not authorised to read execution data for "${t}" (403): the OAuth client needs the '${ez}' permission and division access to the flow.`;default:return`Retrieving execution data for "${t}" failed`+(e.statusCode?` (HTTP ${e.statusCode})`:"")+"."}}function dte(t,e){if(e instanceof Yt)return e.message;let{status:n}=Rn(e);if(n===404)return nz(t);let i=Ht(n,ez);return`Failed to retrieve execution data for "${t}": ${Bn(e)}.${i}`}function hte(t){if(ku(t)&&ku(t.flow)&&Array.isArray(t.flow.execution))return t.flow;if(ku(t)&&Array.isArray(t.execution))return t;let e=ku(t)?Object.keys(t).join(", "):typeof t;throw new Yt(`The downloaded execution data had an unexpected shape (top-level: ${e}); expected { flow: { execution: [...] } }.`)}var gte={executionId:K.string().min(1).describe("The flow instance (execution) id. This is the `id` of an entry returned by find_flow_execution, or the sessionId returned by test_bot_flow. It is not a conversation id or a flow id."),includeIr:K.boolean().default(!0).describe("Default true. Joins each action event to the flow's IR (the same graph flow_ir returns) using actionId, adding the action's type, task and outgoing edges, and lists the IR actions this instance never executed. Costs one extra flow configuration fetch. Set false when only the raw event log is wanted.")},iz=({architectApi:t,download:e=ote,pollIntervalMs:n=ate,maxWaitMs:i=rte})=>({config:{description:"Retrieves the historical execution data of one run of a Genesys Cloud Architect flow: the ordered log of what that single conversation actually did, action by action, with timestamps, the messages sent and received, the branch each decision or menu took, variable assignments, errors and the exit reason. Use it to see how a customer traversed a flow, to find loops and retries (summary.repeatedActions for actions run more than once, summary.loops for Loop actions and their iteration counts, summary.asksWithRetries for asks that re-prompted), errors (eventError events with a relatedAction) and dead ends, or to confirm a flow is behaving. flow_ir shows what could happen; this shows what did happen, this time. Each action event's actionId is the id of the flow_ir node whose kind is \"action\", and is accepted verbatim by flow_action. An action's outputPathId names the branch it took; joined to the IR it is the branch-output node :: (ir.takenBranch). Event kinds are usually named action for IR actionType Action (actionCommunicate is CommunicateAction, actionDecision is DecisionAction), with exceptions: actionUpdateData is UpdateVariableAction, actionJumpToTask is TransferTaskAction and actionAskForIntent is AskForNLUIntentAction; the ir.actionType annotation on each event is authoritative. events[] is in execution order; the IR's `order` field is not and must not be used for sequencing. trackingId is the action number shown in the Architect UI; gaps in it are authoring history, not missing actions. The instance's logLevel governs which sections exist: below 'all', variables and communications may be absent or empty, which is expected rather than an error. Pass the sessionId from test_bot_flow to see exactly how a test run traversed the flow; data is available seconds after the run ends, and such runs have a null conversationId.",annotations:{title:"Flow Execution Data",readOnlyHint:!0,destructiveHint:!1},inputSchema:gte},handler:async({executionId:a,includeIr:r})=>{let s;try{let M=await t.getFlowsInstance(a),J=await cte(t,M,n,i),N=J.entities?.find(_=>_.id===a)??J.entities?.[0];if(J.jobState==="Failed"&&!N)throw new Yt(`The retrieval job (${J.id??"unknown id"}) failed without reporting a cause.`);if(!N)throw new Yt(`The retrieval job (${J.id??"unknown id"}) completed with no results.`);if(N.failed||!N.downloadUri)return{isError:!0,content:[{type:"text",text:pte(a,N)}]};s=hte(await e(N.downloadUri))}catch(M){return{isError:!0,content:[{type:"text",text:dte(a,M)}]}}let{execution:o,...l}=s,c=By(o),u=c.events,p=c.summary,h=[],g=u.find(M=>M.kind==="endedFlow"),d=typeof g?.flowExitReason=="string"?g.flowExitReason:null;g||h.push("No endedFlow event: the run had not finished when the data was captured, or the log was cut short. Do not treat the last event as where the flow ended.");let m=Ly(u,".ConversationId"),w=ku(l.executionInfo)?l.executionInfo.logLevel:void 0;typeof w=="string"&&w.toLowerCase()!=="all"&&h.push(`This instance was captured at log level "${w}". Variable values, communications or action inputs/outputs may be absent because they were not recorded, not because they did not happen.`),l.isTruncated===!0&&h.push("isTruncated is true: the log was cut off by the execution cap, so later actions ran without being recorded."),p.repeatedActions.length>0&&h.push(`${p.repeatedActions.length} action(s) executed more than once; see summary.repeatedActions and each occurrence's executionId to tell iterations apart.`),p.asksWithRetries.length>0&&h.push(`${p.asksWithRetries.length} ask/menu action(s) needed more than one participant input (summary.asksWithRetries); the retries are the turns inside that event's execution[], not repeated actions.`);let f=p.eventKinds.eventError??0;f>0&&h.push(`${f} eventError event(s) occurred; each one's relatedAction names the action that was executing (matched on context.executionId), and context.reason gives the cause.`);let A=Date.parse(String(l.startDateTime)),b=Date.parse(String(l.endDateTime)),x=Number.isFinite(A)&&Number.isFinite(b)?b-A:null,y;if(r){let M=typeof l.flowId=="string"?l.flowId:void 0,J=typeof l.flowVersion=="string"?l.flowVersion:void 0;if(!M)h.push("The execution data carried no flowId, so no IR join was possible.");else{let N=await mte(t,M,J,h);if(N){let _=Tu(N.configuration);if(!_.ok)h.push(`The flow configuration could not be parsed into an IR (${_.error.code}: ${_.error.message}); events are unjoined.`);else{let I=Fy(u,_.ir);u=I.events,y={configuration:N.configuration_source,unmatchedActionIds:I.unmatchedActionIds,unmatchedStateIds:I.unmatchedStateIds,actionsNotExecuted:I.actionsNotExecuted,warnings:_.warnings},I.unmatchedActionIds.length>0&&h.push(`${I.unmatchedActionIds.length} executed action id(s) have no node in the IR (ir.unmatchedActionIds). If the join used the latest configuration rather than the version that ran, the flow has probably been redeployed since; otherwise the action may live in a called common module or bot flow, which the parent's IR does not contain.`)}}}}let T={...l,executionId:typeof l.executionId=="string"?l.executionId:a,conversationId:typeof m=="string"?m:null,durationMs:x,flowExitReason:d,logLevel:typeof w=="string"?w:null,summary:p,events:u,...y?{ir:y}:{},...h.length>0?{notes:h}:{}};return{content:[{type:"text",text:JSON.stringify(T)}]}}});async function mte(t,e,n,i){if(n){let r=await mt(t,e,n);if(r.ok)return{configuration:r.configuration,configuration_source:r.source};if(r.status===410){i.push("IR join skipped: the flow has been deleted, so no configuration can be fetched. The events are still complete; only the ir annotations and actionsNotExecuted are unavailable.");return}i.push(`Could not fetch the configuration of flow version ${n} (${r.message}) so the IR join used the latest configuration instead, which may differ from what ran.`)}else i.push("The execution data carried no flowVersion; the IR join used the latest configuration, which may differ from what ran.");let a=await mt(t,e);if(!a.ok){i.push(`IR join skipped: ${a.message}`);return}return{configuration:a.configuration,configuration_source:a.source}}function fte(t,e){let n=t.find(a=>a.id===e);if(n)return{match:n};let i=t.filter(a=>Ha(a,e));return i.length>1?{ambiguous:i}:i[0]?{match:i[0]}:void 0}var wte={flowId:K.string().min(1).describe("The Genesys Cloud Architect flow ID"),flowVersion:Wa,task:K.string().min(1).optional().describe("Optional. Restrict the returned nodes to a single task, by task id or task name (case-insensitive). Use this to explore a large flow one task at a time. The full task list is always returned, and a node's predecessors and successors may reference nodes in other tasks, which will not appear in the filtered node list.")},tz=({architectApi:t})=>({config:{description:"Retrieves the intermediate representation (IR) of a Genesys Cloud Architect flow: a flat, ordered list of its actions with the branches connecting them. Use this to understand what an existing flow does. It answers what follows an action, which branch leads where, which actions are unreachable, and how tasks call each other.",annotations:{title:"Flow IR",readOnlyHint:!0,destructiveHint:!1},inputSchema:wte},handler:async({flowId:e,flowVersion:n,task:i})=>{let a=await mt(t,e,n);if(!a.ok)return{isError:!0,content:[{type:"text",text:a.message}]};let r=Tu(a.configuration);if(!r.ok)return{isError:!0,content:[{type:"text",text:`Failed to parse flow "${e}" (${r.error.code}): ${r.error.message}`}]};let s=r.ir;if(typeof i=="string"){let o=fte(s.tasks,i);if(!o){let l=s.tasks.map(c=>c.name).join(", ");return{isError:!0,content:[{type:"text",text:`No task matching "${i}" in flow "${e}". Available tasks: ${l||"(none)"}.`}]}}if("ambiguous"in o){let l=o.ambiguous.map(c=>`"${c.name}" (id: ${c.id})`).join(", ");return{isError:!0,content:[{type:"text",text:`Task name "${i}" is ambiguous in flow "${e}". It matches ${l}. Retry with the task id.`}]}}s={...s,nodes:s.nodes.filter(l=>l.taskId===o.match.id)}}return{content:[{type:"text",text:JSON.stringify({flowId:e,configuration:a.source,ir:s,warnings:r.warnings})}]}}});var vte="Architect > Flow > View (architect:flow:view)",Cte=100,Ate=2e3;function bte(t){if(t===void 0)return null;let e=new Date(t);return Number.isFinite(e.getTime())?e.toISOString():null}var xte="saved_version_",yte={PUBLISH:"publish",CHECKIN:"checkin",SAVE:"save"};function Pte(t,e){if(e||t.datePublished)return"publish";let n=t.type&&yte[t.type.toUpperCase()];return n||(t.dateCheckedIn!==void 0?"checkin":t.dateSaved!==void 0||t.id?.startsWith(xte)?"save":"unknown")}function jte(t,e){let n=o=>o.split(".").map(l=>Number(l)||0),[i=0,a=0]=n(t),[r=0,s=0]=n(e);return r-i||s-a}function Ste(t,e){return(e.dateCreated??"").localeCompare(t.dateCreated??"")||jte(t.version,e.version)}function Ote(t,e){return e?e.id&&t.id?e.id===t.id:e.commitVersion!==void 0&&e.commitVersion===t.commitVersion:!1}function Tte(t,e,n){let i=Ote(t,e);return{version:t.commitVersion??"",id:t.id??"",kind:Pte(t,i),dateCreated:bte(t.dateCreated),datePublished:t.datePublished??null,datePublishedEnd:t.datePublishedEnd??null,isPublished:i,...n?{createdBy:ht(t.createdBy),createdByClient:ht(t.createdByClient)}:{}}}var kte={flowId:K.string().min(1).describe("The Genesys Cloud Architect flow ID"),includeCheckIns:K.boolean().optional().describe("When true, check-in and save versions are listed alongside publishes, as are undated versions of unknown kind. Off by default: only published versions, which are the ones that ever handled traffic, are returned."),includeAuthor:K.boolean().optional().describe("When true, each version carries createdBy (the creating user's id; the API gives no name here) and createdByClient (the OAuth client, for versions created through the API). Off by default so no person identifiers appear in the output; set it only when the data owner has agreed to that.")},az=({architectApi:t})=>({config:{description:"Lists the versions of a Genesys Cloud Architect flow, newest first: each version's number, kind (publish, checkin, save, unknown), dateCreated, datePublished and datePublishedEnd (the window in which it was the live version), and whether it is the currently published one. Use it to answer when a flow changed, e.g. 'which version was live at 09:30 on the 5th'. The version numbers are the flowVersion values find_flow_execution reports, and are accepted as flowVersion by flow_ir, flow_action, search_in_flow and get_prompts to read that version. The API records no publish comment, so what changed must be read from the configuration.",annotations:{title:"Flow Versions",readOnlyHint:!0,destructiveHint:!1},inputSchema:kte},handler:async({flowId:e,includeCheckIns:n,includeAuthor:i})=>{try{let a=async m=>{let w=[],f=0,A=1;for(;;){let b=await t.getFlowVersions(e,{pageSize:Cte,pageNumber:A,...m?{deleted:!0}:{}});if(b.entities&&w.push(...b.entities),f=b.total??f,!b.nextUri||w.length>=Ate)break;A++}return{entities:w,total:Math.max(f,w.length)}},r=async()=>{try{return{flow:await t.getFlow(e),deleted:!1}}catch(m){if(Rn(m).status!==410)throw m;return{flow:await t.getFlow(e,{deleted:!0}),deleted:!0}}},{flow:s,deleted:o}=await r(),l=await a(o),c=s.publishedVersion,u=l.entities.map(m=>Tte(m,c,i??!1)),p=(n?u:u.filter(m=>m.kind==="publish")).sort(Ste),h=u.length-p.length,g=[];o&&g.push("This flow has been deleted. Its history is listed as it stood at deletion; find_flow no longer lists it."),l.total===0?g.push("This flow has no versions at all: nothing has been saved, checked in or published."):p.length===0&&h>0&&!c?g.push(`This flow has never been published; its ${h} version(s) are check-ins, saves or undated versions. Set includeCheckIns to list them.`):h>0&&g.push(`${h} check-in, save or undated version(s) omitted. Set includeCheckIns to list them.`),l.entities.lengthm.isPublished)&&g.push(`The published version (${c.commitVersion??c.id}) is not among the versions listed.`);let d={flowId:s.id??e,flowName:s.name,flowType:s.type??"",publishedVersion:c?.commitVersion??null,versions:p,total:l.total,...o?{deleted:!0}:{},...g.length>0?{notes:g}:{}};return{content:[{type:"text",text:JSON.stringify(d)}]}}catch(a){let{status:r}=Rn(a);return r===404?{isError:!0,content:[{type:"text",text:`Flow "${e}" not found. Check the flow id.`}]}:r===410?{isError:!0,content:[{type:"text",text:`Flow "${e}" has been deleted (410) and its versions could not be retrieved even as a deleted flow's.`}]}:{isError:!0,content:[{type:"text",text:`Failed to list flow versions: ${Bn(a)}${Ht(r,vte)}`}]}}}});var ea=50,rz="Architect > User Prompt > View (architect:userPrompt:view)",Mte="transcoded",eP=/^Prompt\./i,Ete=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function sz(t){return Math.round(t*1e3)/1e3}function qte(t){return{language:t.language??"",languageDefault:t.languageDefault??!1,durationSeconds:t.durationSeconds??null,hasAudio:!!t.mediaUri&&(t.uploadStatus===void 0||t.uploadStatus===Mte),ttsString:t.ttsString||null,text:t.text||null}}function _te(t,e){let n=Gr(e),i=(t.resources??[]).filter(a=>!e||Gr(a.language)===n);return{id:t.id??"",name:t.name??"",description:t.description??null,division:ht(t.division),resources:i.map(qte)}}function nP(t){return t.trim().replace(eP,"")}function Hte(t){let e=new Set;for(let n of t)for(let i of n.resources)e.add(i.language);return[...e].sort().map(n=>{let i=0,a=0,r=0,s=[];for(let o of t){let l=o.resources.find(u=>u.language===n),c=l?.hasAudio?l.durationSeconds??null:null;s.push({id:o.id,name:o.name,startSeconds:sz(i),durationSeconds:c}),c===null?r++:(a++,i+=c)}return{language:n,totalDurationSeconds:sz(i),promptsWithAudio:a,promptsWithoutAudio:r,sequence:s}})}function Ite(t){let e=new Map,n=new Set,i=(r,s)=>{let o=ht({id:r,name:s});!o||e.has(o.id)||e.set(o.id,o)},a=(r,s)=>{if(r===null||typeof r!="object"||n.has(r))return;if(n.add(r),Array.isArray(r)){for(let l of r)a(l,s);return}let o=r;if(o.type==="pmt"){let l=typeof o.name=="string"?o.name:void 0,c=typeof o.text=="string"?o.text:void 0;typeof o.id=="string"&&l?.match(eP)?i(o.id,nP(l)):typeof o.val=="string"&&Ete.test(o.val)&&c!==void 0&&(c.match(eP)?i(o.val,nP(c)):s==="lit"&&i(o.val,c))}for(let[l,c]of Object.entries(o))a(c,l)};return a(t,void 0),[...e.values()]}var Rte={promptIds:K.array(K.string().min(1)).max(ea).optional().describe(`User prompt GUIDs, e.g. the \`id\` of entries under USERPROMPT in flow_dependencies output. Returned in the order given. Combined with \`promptNames\` the total must not exceed ${ea}; chunk a larger set into successive calls. \`flowId\` has its own separate limit.`),promptNames:K.array(K.string().min(1)).max(ea).optional().describe("User prompt names, exactly as the flow references them. A `Prompt.` prefix is accepted and stripped, so `Prompt.Welcome` and `Welcome` both find the prompt named Welcome. Matching is exact (ignoring case), not a search. Returned in the order given, after any `promptIds`."),flowId:K.string().min(1).optional().describe(`A Genesys Cloud Architect flow ID. Every user prompt the flow's configuration (the latest, or the \`flowVersion\` given) references is returned, in the order the references are encountered, so one call covers the flow's whole script. At most ${ea} referenced prompts are fetched; any beyond that are listed in a note to fetch via \`promptIds\`.`),flowVersion:Wa,language:K.string().min(1).optional().describe("Restrict each prompt's resources to one language tag, e.g. `en-gb`. Omit to return every language.")},oz=({architectApi:t})=>({config:{description:"Retrieves Genesys Cloud Architect user prompts: the reusable audio assets that call and in-queue flows play via `Prompt.` references in Play Audio, Communicate, Menu and Collect Input actions. For each prompt returns its id, name, description, division and one resource per language holding what the caller actually hears: `durationSeconds` and `hasAudio` (an uploaded recording, which takes precedence), `ttsString` (spoken by text-to-speech when there is no recording) and `text` (a transcript of the recording, informational only). A resource with neither audio nor a TTS string plays silence. `durationTotals` sums the recorded durations per language across the prompts in requested order and gives each prompt's start offset, so a hang-up N seconds into a sequence of prompts can be attributed to the prompt that was playing. Look prompts up by name when flow_action output shows `Prompt.`, by id from flow_dependencies USERPROMPT entries, or by `flowId` to get every prompt a flow references in one call. Batch every prompt of interest into one call rather than calling once per prompt. Does not cover system prompts (`PromptSystem.`).",annotations:{title:"Get Prompts",readOnlyHint:!0,destructiveHint:!1},inputSchema:Rte},handler:async({promptIds:e=[],promptNames:n=[],flowId:i,flowVersion:a,language:r})=>{if(e.length===0&&n.length===0&&!i)return{isError:!0,content:[{type:"text",text:"Provide at least one of `promptIds`, `promptNames` or `flowId`."}]};if(a&&!i)return{isError:!0,content:[{type:"text",text:"`flowVersion` selects which configuration of `flowId` to read, so it needs `flowId`."}]};if(e.length+n.length>ea)return{isError:!0,content:[{type:"text",text:`At most ${ea} prompts can be requested per call (${e.length} ids + ${n.length} names given). Chunk the request into successive calls.`}]};let s=[],o=[],l=[],c=[],u=new Set,p=w=>{w.id&&u.has(w.id)||(w.id&&u.add(w.id),s.push(_te(w,r)))},h=async w=>{if(!u.has(w))try{p(await t.getArchitectPrompt(w,{includeResources:!0,includeMediaUris:!0,...r?{language:[r]}:{}}))}catch(f){let{status:A}=Rn(f);if(A===404)o.push(w);else{if(A===401)throw f;A===403?l.push({requested:w,error:`${Bn(f)}. The prompt exists but the OAuth client cannot read it: it lacks division access to it, or the '${rz}' permission.`}):l.push({requested:w,error:Bn(f)})}}},g;if(i){let w=await mt(t,i,a);if(!w.ok)return{isError:!0,content:[{type:"text",text:w.message}]};g={references:Ite(w.configuration),source:w.source}}try{for(let w of new Set(e))await h(w);if(n.length>0){let w=new Map;for(let b of n){let x=nP(b),y=Gr(x);y&&!w.has(y)&&w.set(y,{requested:b,stripped:x})}let f=new Map,A=1;for(;;){let b=await t.getArchitectPrompts({name:[...w.values()].map(x=>x.stripped),includeResources:!0,includeMediaUris:!0,...r?{language:[r]}:{},pageSize:100,pageNumber:A});for(let x of b.entities??[]){let y=Gr(x.name);w.has(y)&&!f.has(y)&&f.set(y,x)}if(!b.nextUri)break;A++}for(let[b,{requested:x}]of w){let y=f.get(b);y?p(y):o.push(x)}}if(g){let{references:w,source:f}=g;w.length===0&&c.push(`Flow "${i}" references no user prompts in its ${Lh(f)}. Audio it plays is inline TTS, system prompts or neither.`);let A=w.slice(0,ea),b=w.slice(ea);b.length>0&&c.push(`Flow "${i}" references ${w.length} user prompts; only the first ${ea} were fetched. Fetch the rest with promptIds: `+b.map(y=>y.id).join(", "));let x=0;for(let y of A)u.has(y.id)?x++:await h(y.id);x>0&&c.push(`${x} of the flow's referenced prompts were already returned at their promptIds/promptNames position, so durationTotals.sequence does not follow flow order. Call with flowId alone for a flow-ordered sequence.`)}}catch(w){let f=Ht(Rn(w).status,rz);return{isError:!0,content:[{type:"text",text:`Failed to retrieve prompts: ${Bn(w)}.${f}`}]}}o.length>0&&c.push("Entries in notFound matched no user prompt in this org. A flow referencing such a prompt plays silence there. Names are matched exactly (ignoring case), so check the spelling against the flow's `Prompt.` reference; if the reference is `PromptSystem.` it is a system prompt, which this tool does not return."),s.some(w=>w.resources.length===0)&&c.push(r?`A prompt with no resources has no audio or TTS for language "${r}"; Architect falls back to its languageDefault resource, which was filtered out of this response. Call again without \`language\` to see it.`:"A prompt with no resources has no audio or TTS in any language and plays silence wherever it is referenced.");let d=Hte(s);d.some(w=>w.promptsWithoutAudio>0)&&c.push("totalDurationSeconds counts recorded audio only. Prompts counted in promptsWithoutAudio play TTS (or silence) for that language, whose duration is not known, so the sequence's real play time is longer than the total.");let m={...i&&g?{flowId:i,configuration:g.source}:{},prompts:s,durationTotals:d,notFound:o,...l.length>0?{failed:l}:{},...c.length>0?{notes:c}:{}};return{content:[{type:"text",text:JSON.stringify(m)}]}}});var lz=100,uz=10,Mu=160,Wte=512;function zte(t,e,n){if(!e)return{ok:!0,query:t};try{return{ok:!0,query:new RegExp(t,n?"":"i")}}catch(i){let a=i instanceof Error?i.message:String(i);return{ok:!1,error:`Invalid regular expression "${t}": ${a}. Set regex to false for a literal substring search.`}}}function Dte(t,e,n){if(t.length<=Mu)return t;let i=e+Math.floor(n/2),a=Math.max(0,Math.min(i-Math.floor(Mu/2),t.length-Mu)),r=a+Mu;return`${a>0?"\u2026":""}${t.slice(a,r)}${r({config:{description:'Searches the raw Architect configuration of a Genesys Cloud Architect flow for text, and returns the actions containing it along with where in each action it matched. Answers "which actions reference X" \u2014 a queue name, a data action, a variable such as Flow.DNIS, a phrase in a prompt \u2014 in a single call. Use it instead of sweeping a flow with bulk flow_action lookups, which return whole action subtrees for actions that may not be relevant at all. Each returned actionId is an Architect GUID: it joins directly to flow_ir nodes whose kind is "action", and is accepted verbatim by flow_action. Search here to find the ids, then fetch those ids with flow_action when an excerpt is not enough. Matching is against string values only, never key names. A match in a wiring field locates text and is not a control-flow claim; flow_ir owns wiring.',annotations:{title:"Search In Flow",readOnlyHint:!0,destructiveHint:!1},inputSchema:Nte},handler:async({flowId:e,flowVersion:n,pattern:i,regex:a,caseSensitive:r})=>{let s=zte(i,a,r);if(!s.ok)return{isError:!0,content:[{type:"text",text:s.error}]};let o=await mt(t,e,n);if(!o.ok)return{isError:!0,content:[{type:"text",text:o.message}]};let l=o.configuration;if(!Gte(l))return{isError:!0,content:[{type:"text",text:`The ${Lh(o.source)} of flow "${e}" has no flowSequenceItemList to search \u2014 the flow type may be unsupported. Nothing was searched, so this is not a zero-match result.`}]};let c=Yy(l,s.query,{caseSensitive:r,maxMatchesPerAction:uz}),u=c.hasMatches?c.matches:[],p=u.slice(0,lz),h=p.map(d=>({...d,matchedPaths:d.matchedPaths.map(m=>({path:m.path,excerpt:Dte(m.value,m.matchIndex,m.matchLength)}))})),g=[];return u.length>p.length&&g.push(`${u.length} actions matched; only the first ${lz} are returned, in encounter order. Narrow the pattern to see the rest.`),p.some(d=>d.truncated)&&g.push(`Some actions matched in more than ${uz} places; matchedPaths is not exhaustive for entries marked truncated.`),p.some(d=>d.matchedPaths.some(m=>m.value.length>Mu))&&g.push("Excerpts are clipped windows around the match, not whole values; fetch the action with flow_action when the full text matters."),{content:[{type:"text",text:JSON.stringify({flowId:e,configuration:o.source,pattern:i,totalMatchedActions:u.length,matchedActions:h,...g.length>0?{notes:g}:{}})}]}}});var iP=new Map;function Ute(t){let{id:e,previousTurn:n,...i}=t;return i}async function pz(t,e,n){let i=[],a=n;for(;i.push(Ute(a)),iP.set(e,a.id),a.nextActionType==="NoOp";)a=await t.postTextbotsBotflowsSessionTurns(e,{previousTurn:{id:a.id},inputEventType:"NoOp",inputEventUserInput:{mode:"Text",alternatives:[{transcript:{text:""}}]}});let r=a.nextActionType;return(r==="Disconnect"||r==="Exit")&&iP.delete(e),{content:[{type:"text",text:JSON.stringify({sessionId:e,turns:i})}]}}var $te={flowId:K.string().optional().describe("The bot flow ID to test. Required when starting a new session."),sessionId:K.string().optional().describe("Session ID from a previous call. Required when continuing an existing conversation."),message:K.string().optional().describe("User message to send to the bot. Required when continuing a session.")},dz=({textbotsApi:t})=>({config:{description:"Tests a deployed Genesys Cloud Architect Bot Flow and Digital Bot Flow by simulating a text conversation. To start: provide flowId. To continue: provide the returned sessionId and a message. Turn tracking is managed server-side \u2014 only the sessionId is needed between calls. Returns { sessionId, turns[] } where each turn contains the raw API response (prompts with segments, outputLanguage, nextActionType, and action-specific data like modeConstraints or outputData). Multiple turns are returned when the flow sends consecutive messages (NoOp turns are automatically drained). nextActionType values: WaitForInput (send another message), Disconnect/Exit (conversation ended).",annotations:{title:"Test Bot Flow",readOnlyHint:!1,destructiveHint:!1},inputSchema:$te},handler:async({flowId:e,sessionId:n,message:i})=>{try{if(n&&e)return{isError:!0,content:[{type:"text",text:"Provide either flowId (to start) or sessionId (to continue), not both."}]};if(!n&&!e)return{isError:!0,content:[{type:"text",text:"Provide flowId to start a new session or sessionId to continue an existing one."}]};if(e){let s=await t.postTextbotsBotflowsSessions({flow:{id:e},externalSessionId:"",inputData:{variables:{}},channel:{inputModes:["Text"],outputModes:["Text"],name:"Messaging",userAgent:{name:"GenesysWebWidget"}},language:""}),o=await t.postTextbotsBotflowsSessionTurns(s.id,{inputEventType:"NoOp",inputEventUserInput:{mode:"Text",alternatives:[{transcript:{text:""}}]}});return pz(t,s.id,o)}if(!n||!i)return{isError:!0,content:[{type:"text",text:"A message is required when continuing an existing session."}]};let a=iP.get(n);if(!a)return{isError:!0,content:[{type:"text",text:`No active session found for ID "${n}". It may have expired or already ended. Start a new session with a flowId.`}]};let r=await t.postTextbotsBotflowsSessionTurns(n,{previousTurn:{id:a},inputEventType:"UserInput",inputEventUserInput:{mode:"Text",alternatives:[{transcript:{text:i}}]}});return pz(t,n,r)}catch(a){return{isError:!0,content:[{type:"text",text:`Bot flow test failed: ${a instanceof Error?a.message:JSON.stringify(a)}`}]}}}});var tP=K.object({GENESYS_REGION:K.string().min(1),GENESYS_CLIENT_ID:K.string().min(1),GENESYS_CLIENT_SECRET:K.string().min(1),DEPLOY_SCRIPT_PATH:K.string().min(1),PREVENT_LOGIN:K.enum(["TRUE","FALSE"]).default("FALSE").transform(t=>t==="TRUE")}).safeParse(process.env);if(!tP.success){let t=tP.error.issues.map(e=>e.path[0]).join(` `);console.error(`Missing required environment variables: - ${t}`),process.exit(1)}var za=tP.data,Hi=new Gp({name:"genesys-cloud-architect",version:"2.0.5"}),na=new Eu.default.ArchitectApi,Bte=new Eu.default.RoutingApi,hz=q1({architectApi:na});Hi.registerTool("find_flow",hz.config,hz.handler);var gz=R1({routingApi:Bte});Hi.registerTool("find_queue",gz.config,gz.handler);var mz=Y1({architectApi:na});Hi.registerTool("flow_dependencies",mz.config,mz.handler);var fz=az({architectApi:na});Hi.registerTool("flow_versions",fz.config,fz.handler);var wz=tz({architectApi:na});Hi.registerTool("flow_ir",wz.config,wz.handler);var vz=Q1({architectApi:na});Hi.registerTool("flow_action",vz.config,vz.handler);var Cz=cz({architectApi:na});Hi.registerTool("search_in_flow",Cz.config,Cz.handler);var Az=I1({architectApi:na});Hi.registerTool("find_flow_execution",Az.config,Az.handler);var bz=iz({architectApi:na});Hi.registerTool("flow_execution_data",bz.config,bz.handler);var xz=oz({architectApi:na});Hi.registerTool("get_prompts",xz.config,xz.handler);var yz=E1({region:za.GENESYS_REGION,clientId:za.GENESYS_CLIENT_ID,clientSecret:za.GENESYS_CLIENT_SECRET,deployScriptPath:za.DEPLOY_SCRIPT_PATH});Hi.registerTool("deploy_flow",yz.config,yz.handler);var Pz=dz({textbotsApi:new Eu.default.TextbotsApi});Hi.registerTool("test_bot_flow",Pz.config,Pz.handler);(async()=>{if(za.PREVENT_LOGIN)console.warn("Login for Platform API skipped. Calling tools will result in an auth failure.");else{let e=Eu.default.ApiClient.instance;e.setEnvironment(za.GENESYS_REGION),await e.loginClientCredentialsGrant(za.GENESYS_CLIENT_ID,za.GENESYS_CLIENT_SECRET)}let t=new Up;await Hi.connect(t)})().catch(t=>{console.error("Failed to start server:",t),process.exit(1)}); + ${t}`),process.exit(1)}var za=tP.data,Hi=new Gp({name:"genesys-cloud-architect",version:"2.0.6"}),na=new Eu.default.ArchitectApi,Bte=new Eu.default.RoutingApi,hz=q1({architectApi:na});Hi.registerTool("find_flow",hz.config,hz.handler);var gz=R1({routingApi:Bte});Hi.registerTool("find_queue",gz.config,gz.handler);var mz=Y1({architectApi:na});Hi.registerTool("flow_dependencies",mz.config,mz.handler);var fz=az({architectApi:na});Hi.registerTool("flow_versions",fz.config,fz.handler);var wz=tz({architectApi:na});Hi.registerTool("flow_ir",wz.config,wz.handler);var vz=Q1({architectApi:na});Hi.registerTool("flow_action",vz.config,vz.handler);var Cz=cz({architectApi:na});Hi.registerTool("search_in_flow",Cz.config,Cz.handler);var Az=I1({architectApi:na});Hi.registerTool("find_flow_execution",Az.config,Az.handler);var bz=iz({architectApi:na});Hi.registerTool("flow_execution_data",bz.config,bz.handler);var xz=oz({architectApi:na});Hi.registerTool("get_prompts",xz.config,xz.handler);var yz=E1({region:za.GENESYS_REGION,clientId:za.GENESYS_CLIENT_ID,clientSecret:za.GENESYS_CLIENT_SECRET,deployScriptPath:za.DEPLOY_SCRIPT_PATH});Hi.registerTool("deploy_flow",yz.config,yz.handler);var Pz=dz({textbotsApi:new Eu.default.TextbotsApi});Hi.registerTool("test_bot_flow",Pz.config,Pz.handler);(async()=>{if(za.PREVENT_LOGIN)console.warn("Login for Platform API skipped. Calling tools will result in an auth failure.");else{let e=Eu.default.ApiClient.instance;e.setEnvironment(za.GENESYS_REGION),await e.loginClientCredentialsGrant(za.GENESYS_CLIENT_ID,za.GENESYS_CLIENT_SECRET)}let t=new Up;await Hi.connect(t)})().catch(t=>{console.error("Failed to start server:",t),process.exit(1)}); /*! Bundled license information: mime-db/index.js: