PageSourceSearch

https://bruce.tools/_app/immutable/nodes/20.CfXNViBv.js

js bruce.tools collected 2026-10-09 23:01:18 UTC 3,601 bytes, 1 lines download raw bytes

1import"../chunks/Bzak7iHL.js";import"../chunks/Cu8yTRT6.js";import{a as S,o as R}from"../chunks/CJiKnhUz.js";import{aG as V,a9 as j,aR as i,a7 as t,x as l,aD as q,a1 as z,a6 as _,ay as c,$ as E,K as v,a_ as J,aL as g,aA as L,b6 as N,b5 as Q,aV as W,O as P,a4 as T}from"../chunks/tHWzkC21.js";import{i as d}from"../chunks/DnNrPkI4.js";import{h as X}from"../chunks/ClIHA1yg.js";import{i as Z}from"../chunks/D40owyCa.js";import{m as ee}from"../chunks/DWnqiti6.js";import{D as w}from"../chunks/Bo_wyH0a.js";import{g as te}from"../chunks/DklAihfp.js";import{g as ae}from"../chunks/BNewVKxj.js";import{g as oe}from"../chunks/CbGxyczz.js";import{H as O}from"../chunks/CkwJwLyB.js";var se=_('<meta name="description" content="Create a agent"/>'),ie=_('<div class="error-message"><h4>No Team Selected</h4> <p>You must select a team before creating an agent. <a href="/teams">Select Team</a></p></div>'),re=_('<div class="error-message"><h4>Too Many Actions</h4> <p>You have too many actions. Please upgrade to add more. <a href="/pricing">Upgrade Now</a></p></div>'),ne=_('<section class="main-section"><main><div class="box"><div class="main-form"><!> <!></div></div></main></section>');function xe(Y,k){V(k,!1);let m=c(null),f=c(0),p=c([]),h=[],B=j("userData"),r=c(),x=c(!1),A=c(!1);S(()=>{setTimeout(()=>{t(r).isLoggedIn===!1&&oe("/user/login")},250)});const G=B.subscribe(e=>{i(r,e),t(r).session.ent_context&&i(x,!0),t(r).session.current_team!==""&&i(A,!0)});R(()=>{G()}),S(async()=>{i(p,await ae()||[]),h=await te()||[],i(m,{method:"POST",submitButtonText:"Create Agent",submitButtonClass:"",location:"/api/agents",redirLocation:"/agents",fields:{name:{label:"Descriptive Name",tooltip:"A descriptive name, this is used in the UI only",type:"text",value:"",validators:[ee(2)]},scope:{label:"Scope",type:"hidden",value:"personal",validators:[]},owner:{label:"Owner",type:"hidden",value:"",validators:[]},success_action:{label:"Successful Action",type:"select",tooltip:"Please select an action to perform on successful run",options:t(p),validators:[]},failure_action:{label:"Failed Action",type:"select",tooltip:"Please select an action to perform on failed run",options:t(p),validators:[]},success_notifications:{label:"Notifications on Success",type:"checkboxGroup",tooltip:"You may select one or more configured notifications as targets",options:h,validators:[]},failure_notifications:{label:"Notifications on Failure",type:"checkboxGroup",tooltip:"You may select one or more configured notifications as targets",options:h,validators:[]}}})}),Z();var b=ne();X("6onrgc",e=>{var o=se();z(()=>{E.title="Bruce - Create a Agent"}),l(e,o)});var C=v(b),D=v(C),$=v(D),F=v($);{var H=e=>{O(e,{get subtitle(){return`Creating an agent for team: ${t(r).session.current_team_name??""}`},children:(o,u)=>{L();var n=N();Q(()=>W(n,t(r).session.current_org_name)),l(o,n)},$$slots:{default:!0}})},I=e=>{O(e,{children:(o,u)=>{L();var n=N("Create a personal agent");l(o,n)},$$slots:{default:!0}})};d(F,e=>{t(r).session.ent_context?e(H):e(I,-1)})}var M=J(F,2);{var U=e=>{var o=P(),u=T(o);{var n=a=>{w(a,{get numFailures(){return t(f)},set numFailures(s){i(f,s)},get config(){return t(m)},set config(s){i(m,s)},$$legacy:!0})},y=a=>{var s=ie();l(a,s)};d(u,a=>{t(A)?a(n):a(y,-1)})}l(e,o)},K=e=>{var o=P(),u=T(o);{var n=a=>{var s=re();l(a,s)},y=a=>{w(a,{get numFailures(){return t(f)},set numFailures(s){i(f,s)},get config(){return t(m)},set config(s){i(m,s)},$$legacy:!0})};d(u,a=>{t(p).length>=t(r).session.total_actions?a(n):a(y,-1)})}l(e,o)};d(M,e=>{t(x)?e(U):e(K,-1)})}g($),g(D),g(C),g(b),l(Y,b),q()}export{xe as component};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.