@arcgis/ai-components 5.2.0-next.72 → 5.2.0-next.74
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent-utils/LLMAgent.d.ts +5 -2
- package/dist/agent-utils/LLMAgent.js +1 -1
- package/dist/agentic-workflow/jsonTypes.d.ts +8 -1
- package/dist/agentic-workflow/nodes/AgentNode.d.ts +2 -0
- package/dist/agentic-workflow/nodes/tools/ArcgisTool.d.ts +21 -0
- package/dist/cdn/253R5CBD.js +2 -0
- package/dist/cdn/2VBPA27M.js +18 -0
- package/dist/cdn/{DWYODVWW.js → 323DHVYA.js} +5 -5
- package/dist/cdn/34O57OGV.js +2 -0
- package/dist/cdn/{FSMHR7GK.js → 4HDDRBIY.js} +1 -1
- package/dist/cdn/4MFEKBKL.js +11 -0
- package/dist/cdn/{Y5UFOH54.js → 4NJ2FF7H.js} +1 -1
- package/dist/cdn/4YXYLX4H.js +2 -0
- package/dist/cdn/5DVRVY4L.js +2 -0
- package/dist/cdn/5PJXNTLZ.js +2 -0
- package/dist/cdn/5R6QUF5B.js +2 -0
- package/dist/cdn/5RVELJU4.js +36 -0
- package/dist/cdn/5WLNL4HZ.js +2 -0
- package/dist/cdn/66SKMECC.js +2 -0
- package/dist/cdn/6CLF7KIK.js +2 -0
- package/dist/cdn/{S6ZAQRC6.js → 6KFMRBAA.js} +1 -1
- package/dist/cdn/77QFSIWW.js +5 -0
- package/dist/cdn/7E2QMWK6.js +2 -0
- package/dist/cdn/{HO2YDJI2.js → 7M6VKBTK.js} +1 -1
- package/dist/cdn/{HJG7QM2R.js → 7VAQUCBU.js} +1 -1
- package/dist/cdn/ACJTJLZN.js +2 -0
- package/dist/cdn/AI6DYOKR.js +181 -0
- package/dist/cdn/AT4XVTJR.js +44 -0
- package/dist/cdn/BS2PFNU4.js +2 -0
- package/dist/cdn/CCC6LBMY.js +2 -0
- package/dist/cdn/CGXQAB3A.js +2 -0
- package/dist/cdn/{M3MRIGDZ.js → CP5BVGJU.js} +1 -1
- package/dist/cdn/CWD37QFT.js +2 -0
- package/dist/cdn/DY36ATOA.js +2 -0
- package/dist/cdn/DYASSC7Z.js +2 -0
- package/dist/cdn/EAEQONP7.js +2 -0
- package/dist/cdn/EMLOVMD4.js +2 -0
- package/dist/cdn/EWLXNGKH.js +208 -0
- package/dist/cdn/FAR3DFFK.js +2 -0
- package/dist/cdn/FDOMMK2M.js +2 -0
- package/dist/cdn/GRHIFCQX.js +2 -0
- package/dist/cdn/{S3XUYAUX.js → HHFNQR6Z.js} +1 -1
- package/dist/cdn/{WQKNV6KK.js → HMUWQCXU.js} +1 -1
- package/dist/cdn/HZ5ARNAM.js +2 -0
- package/dist/cdn/I6PD2HSL.js +2 -0
- package/dist/cdn/IDUC4CPV.js +2 -0
- package/dist/cdn/IRNSIUBT.js +2 -0
- package/dist/cdn/{OYNIFMCJ.js → J6SZIQJA.js} +1 -1
- package/dist/cdn/K335IAIE.js +2 -0
- package/dist/cdn/K33MZ726.js +2 -0
- package/dist/cdn/KA3FF3ZO.js +2 -0
- package/dist/cdn/{DBHLKLKM.js → KPO4XX6J.js} +1 -1
- package/dist/cdn/{I4L45WQS.js → L7XTRDFM.js} +1 -1
- package/dist/cdn/LCFIADOZ.js +2 -0
- package/dist/cdn/MDM2K3U7.js +2 -0
- package/dist/cdn/MM33KJPF.js +2 -0
- package/dist/cdn/NIY32GK2.js +2 -0
- package/dist/cdn/{3ZPPYCNL.js → ONMNQBPO.js} +1 -1
- package/dist/cdn/ONQ6JSBJ.js +2 -0
- package/dist/cdn/{6QJFOL6M.js → OWTGH34K.js} +1 -1
- package/dist/cdn/{XPTCV6YV.js → PSYRZMX2.js} +1 -1
- package/dist/cdn/Q4IQUEZN.js +14 -0
- package/dist/cdn/QNNGPA3Q.js +2 -0
- package/dist/cdn/QRHZXLZN.js +2 -0
- package/dist/cdn/QVOMX3R6.js +2 -0
- package/dist/cdn/QZ3NQTNQ.js +2 -0
- package/dist/cdn/RADWN4ZP.js +2 -0
- package/dist/cdn/RU2T7GUX.js +2 -0
- package/dist/cdn/S6OYR4VI.js +156 -0
- package/dist/cdn/T2GJLEYV.js +2 -0
- package/dist/cdn/TKYI5QRL.js +2 -0
- package/dist/cdn/{5SFZS2RD.js → TQXLSW4A.js} +2 -2
- package/dist/cdn/{NJJYZP3R.js → U6FBRUM4.js} +1 -1
- package/dist/cdn/UIXX3XEN.js +2 -0
- package/dist/cdn/UPWAOZXQ.js +2 -0
- package/dist/cdn/{5SF6DEMO.js → VNJMTA6O.js} +1 -1
- package/dist/cdn/VOKXKU7M.js +56 -0
- package/dist/cdn/{33BF35AO.js → VYTYVWR6.js} +4 -4
- package/dist/cdn/WMZ24LWS.js +2 -0
- package/dist/cdn/{JYVBCHR6.js → WP7ORLSB.js} +1 -1
- package/dist/cdn/WS3T73IY.js +2 -0
- package/dist/cdn/{UZL6UVE4.js → ZLWWWTH4.js} +1 -1
- package/dist/cdn/{PAUIFUMO.js → ZQMBJ6MI.js} +1 -1
- package/dist/cdn/agent-utils/index.js +1 -1
- package/dist/cdn/agent-utils/middlewares/humanInTheLoop.js +1 -1
- package/dist/cdn/agent-utils/middlewares/middleware.js +1 -1
- package/dist/cdn/agent-utils/middlewares/trace.js +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/adapter.js +938 -1938
- package/dist/chunks/adapter10.js +21 -0
- package/dist/chunks/adapter11.js +30 -0
- package/dist/chunks/adapter12.js +22 -0
- package/dist/chunks/adapter13.js +22 -0
- package/dist/chunks/adapter14.js +109 -0
- package/dist/chunks/adapter15.js +40 -0
- package/dist/chunks/adapter16.js +154 -0
- package/dist/chunks/adapter17.js +141 -0
- package/dist/chunks/adapter18.js +127 -0
- package/dist/chunks/adapter2.js +52 -0
- package/dist/chunks/adapter3.js +30 -0
- package/dist/chunks/adapter4.js +50 -0
- package/dist/chunks/adapter5.js +27 -0
- package/dist/chunks/adapter6.js +24 -0
- package/dist/chunks/adapter7.js +26 -0
- package/dist/chunks/adapter8.js +21 -0
- package/dist/chunks/adapter9.js +42 -0
- package/dist/chunks/arcgisKnowledgeGraph.js +5 -5
- package/dist/chunks/dataExplorationGraph.js +30 -27
- package/dist/chunks/fetchAgentContext.js +13 -0
- package/dist/chunks/fetchService.js +10 -0
- package/dist/chunks/formatFeatureAttributes.js +132 -0
- package/dist/chunks/generateLayerDescriptions.js +145 -148
- package/dist/chunks/helpGraph.js +11 -9
- package/dist/chunks/layerStylingGraph.js +22 -21
- package/dist/chunks/mergeWhereClauses.js +15 -0
- package/dist/chunks/navigationGraph.js +68 -57
- package/dist/chunks/types.js +59 -0
- package/dist/components/arcgis-assistant-agent/customElement.js +404 -279
- package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +15 -5
- package/dist/components/arcgis-assistant-help-agent/customElement.js +21 -5
- package/dist/components/arcgis-assistant-knowledge-agent/customElement.js +39 -22
- package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +22 -5
- package/dist/components/arcgis-assistant-navigation-agent/customElement.js +13 -5
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/types/stencil.d.ts +2 -2
- package/dist/utils/index.d.ts +4 -5
- package/dist/utils/index.js +19 -20
- package/package.json +8 -8
- package/dist/cdn/55M2HE4U.js +0 -2
- package/dist/cdn/5RZGG4F2.js +0 -2
- package/dist/cdn/BAB3MK4Y.js +0 -2
- package/dist/cdn/BMBV6Y2A.js +0 -2
- package/dist/cdn/D3RKQSWS.js +0 -2
- package/dist/cdn/E7KEOJZG.js +0 -208
- package/dist/cdn/IGQFAL3H.js +0 -2
- package/dist/cdn/LUY6V4TP.js +0 -181
- package/dist/cdn/NSXX2KYS.js +0 -2
- package/dist/cdn/OFRFP4BX.js +0 -2
- package/dist/cdn/OUFGJV3R.js +0 -2
- package/dist/cdn/RWM5T4XB.js +0 -180
- package/dist/cdn/SRFLL6ET.js +0 -2
- package/dist/cdn/WDOM6Z5O.js +0 -18
- package/dist/cdn/WZFC5HUX.js +0 -56
- package/dist/cdn/Z4XUJQ2I.js +0 -36
- package/dist/cdn/ZJEWP2ND.js +0 -44
package/dist/cdn/D3RKQSWS.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{b as D,c as M}from"./V6HOUZPZ.js";import"./3UEKINYC.js";import"./RLEHNAIA.js";import d from"./BMBV6Y2A.js";import"./M3MRIGDZ.js";import b from"./6QJFOL6M.js";import{a as R,b as q,e as L}from"./UZL6UVE4.js";import a from"./ZJEWP2ND.js";import{e as C}from"./HO2YDJI2.js";import{v as k,z as E}from"./6TA5KFAQ.js";import"./R74ZHFA6.js";import"./HJG7QM2R.js";import"./S3XUYAUX.js";import"./WZFC5HUX.js";import{W as A,ia as S}from"./E7KEOJZG.js";import"./LUY6V4TP.js";import"./VXFQANGJ.js";import{Dd as c}from"./MWYBF3F3.js";import"./UZLQALHY.js";export default $arcgis.t(([$,U,{property:a,subclass:h},b,J,,,,,,,W,T])=>{var V=Object.defineProperty,X=Object.getOwnPropertyDescriptor,f=(t,e,o,s)=>{for(var r=s>1?void 0:s?X(e,o):e,i=t.length-1,n;i>=0;i--)(n=t[i])&&(r=(s?n(e,o,r):n(r))||r);return s&&r&&V(e,o,r),r},p=class extends J{constructor(t){super(t)}static fromJSON(t){return new p({id:t.id,sourceAnchorId:t.source_anchor_id,sourceNodeId:t.source_node_id,targetAnchorId:t.target_anchor_id,targetNodeId:t.target_node_id})}};f([a()],p.prototype,"id",2);f([a()],p.prototype,"sourceAnchorId",2);f([a()],p.prototype,"sourceNodeId",2);f([a()],p.prototype,"targetAnchorId",2);f([a()],p.prototype,"targetNodeId",2);p=f([h("Edge")],p);var Y=Object.defineProperty,Z=Object.getOwnPropertyDescriptor,N=(t,e,o,s)=>{for(var r=s>1?void 0:s?Z(e,o):e,i=t.length-1,n;i>=0;i--)(n=t[i])&&(r=(s?n(e,o,r):n(r))||r);return s&&r&&Y(e,o,r),r},d=class extends J{constructor(t){super(t)}async load(){return await Promise.resolve(this)}compile(t){return{runtimeNode:this.createRuntimeNode(),edges:t.outgoingEdges.map(e=>({from:this.id,to:e.targetNodeId}))}}static fromJSON(t){throw new Error("BaseNode is abstract and cannot be instantiated directly.")}};N([a()],d.prototype,"id",2);N([a()],d.prototype,"label",2);N([a()],d.prototype,"type",2);d=N([h("BaseNode")],d);var tt=Object.defineProperty,et=Object.getOwnPropertyDescriptor,x=(t,e,o,s)=>{for(var r=s>1?void 0:s?et(e,o):e,i=t.length-1,n;i>=0;i--)(n=t[i])&&(r=(s?n(e,o,r):n(r))||r);return s&&r&&tt(e,o,r),r},m=class extends J{constructor(t){super(t),this.messages=[]}static fromJSON(t){let e=m._normalizeMessages(t.messages);return new m({id:t.id,messages:e})}static _normalizeMessages(t){return Array.isArray(t)?t.filter(e=>typeof e.content=="string").map(e=>({content:e.content,role:e.role??"system"})):[]}};x([a()],m.prototype,"id",2);x([a()],m.prototype,"messages",2);m=x([h("Prompt")],m);function z(t){let e=new Set(t.required),o=Object.fromEntries(Object.entries(t.properties).map(([s,r])=>{let i=G(r);return[s,e.has(s)?i:i.optional()]}));return c.object(o)}function G(t){let e;switch(t.type){case"array":e=c.array(t.items?G(t.items):c.unknown());break;case"boolean":e=c.boolean();break;case"number":e=c.number();break;case"object":e=z({properties:t.properties??{},required:t.required});break;case"string":e=t.enum?.length?c.enum(t.enum):c.string();break}return t.description?e.describe(t.description):e}var rt=Object.defineProperty,ot=Object.getOwnPropertyDescriptor,B=t=>{throw TypeError(t)},O=(t,e,o,s)=>{for(var r=s>1?void 0:s?ot(e,o):e,i=t.length-1,n;i>=0;i--)(n=t[i])&&(r=(s?n(e,o,r):n(r))||r);return s&&r&&rt(e,o,r),r},st=(t,e,o)=>e.has(t)||B("Cannot "+o),it=(t,e,o)=>e.has(t)?B("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,o),nt=(t,e,o)=>(st(t,e,"access private method"),o),_,F,u=class extends d{constructor(t){super(t),it(this,_),this.type="agent-node"}createRuntimeNode(){return async(t,e)=>{let o=await nt(this,_,F).call(this).run(t,e),s=this.outputSchema?.safeParse(o);if(s&&!s.success)throw s.error;let r=s?.data,i=r??o.outputMessage;return{agentExecutionContext:o.agentExecutionContext,...r?{}:{outputMessage:o.outputMessage},status:o.status,summary:o.summary,nodes:{[this.id]:{output:i}}}}}compile(t){let e=t.outgoingEdges[0]?.targetNodeId;return{runtimeNode:this.createRuntimeNode(),edges:[{from:this.id,decide:o=>o.status==="failed"?void 0:e}],schemas:[c.object({output:this.outputSchema??c.string()})]}}static fromJSON(t){let e=new u({id:t.id,label:t.label,type:"agent-node"});return t.prompt&&(typeof t.prompt=="string"?e.prompt=m.fromJSON({id:`prompt_${t.id}`,type:"plain_text",messages:[{content:t.prompt,role:"system"}]}):e.prompt=m.fromJSON(t.prompt)),t.structured_output&&(e.outputSchema=z(t.structured_output)),e}};_=new WeakSet;F=function(){let t=this.prompt?.messages?.[0].content;if(!t?.trim())throw new Error(`WebAgent agent node "${this.id}" requires a prompt.`);return new T({name:this.id,outputSchema:this.outputSchema,prompt:t})};O([a()],u.prototype,"type",2);O([a()],u.prototype,"prompt",2);O([a()],u.prototype,"outputSchema",2);u=O([h("AgentNode")],u);var at=Object.defineProperty,ct=Object.getOwnPropertyDescriptor,I=(t,e,o,s)=>{for(var r=s>1?void 0:s?ct(e,o):e,i=t.length-1,n;i>=0;i--)(n=t[i])&&(r=(s?n(e,o,r):n(r))||r);return s&&r&&at(e,o,r),r},l=class extends d{constructor(t){super(t),this.type="end-message-node"}createRuntimeNode(){return async t=>{let e=await A.fromTemplate(this.message,{templateFormat:"mustache"}).format(t);return{outputMessage:e,status:"success",summary:e}}}compile(t){return{runtimeNode:this.createRuntimeNode(),edges:[]}}static fromJSON(t){let e=new l({id:t.id,label:t.label,type:"end-message-node"});return e.message=t.message,e}};I([a()],l.prototype,"type",2);I([a()],l.prototype,"message",2);l=I([h("EndMessageNode")],l);var pt=Object.defineProperty,dt=Object.getOwnPropertyDescriptor,H=(t,e,o,s)=>{for(var r=s>1?void 0:s?dt(e,o):e,i=t.length-1,n;i>=0;i--)(n=t[i])&&(r=(s?n(e,o,r):n(r))||r);return s&&r&&pt(e,o,r),r},y=class extends d{constructor(t){super(t),this.type="start-node"}createRuntimeNode(){return t=>({question:t.agentExecutionContext.userRequest})}static fromJSON(t){return new y({id:t.id,label:t.label,type:"start-node"})}};H([a()],y.prototype,"type",2);y=H([h("StartNode")],y);function mt(t){switch(t.type){case"agent_node":return u.fromJSON(t);case"end_message_node":return l.fromJSON(t);case"start_node":return y.fromJSON(t);default:throw new Error(`WebAgent node "${t.id}" uses unsupported type "${t.type}".`)}}function ut(t={}){let e=Object.keys(t);if(R(e),e.includes("nodes"))throw new Error("node state cannot define reserved field: nodes.");let o=q(t);return S.Root({...o,nodes:S({reducer:(s,r)=>({...s,...r}),default:()=>({})}),...C()})}function K(t){let e=new Set;for(let s of t)for(let r of Object.keys(s.shape??{}))r!=="nodes"&&e.add(r);let o=Object.fromEntries([...e].map(s=>[s,void 0]));return ut(o)}var v=class t{constructor(e,o,s){this.sourceJSON=e,this.edges=o,this.nodes=s,this._loaded=!1}static fromJSON(e){return new t(e,e.graph.edges.map(o=>p.fromJSON(o)),e.graph.nodes.map(o=>mt(o)))}async load(){return this._loadPromise??=Promise.all(this.nodes.map(async e=>await e.load())).then(()=>{this._loaded=!0}),await this._loadPromise,this}getSchemas(){let e=Object.fromEntries(this._getNodeCompilations().flatMap((o,s)=>{let r=this.nodes[s];return o.schemas?.map(i=>[r.id,i])??[]}));return[c.object({loopCounts:c.record(c.string(),c.number()).optional(),nodes:c.object(e).partial().optional(),question:c.string().optional()})]}generate(){this._assertLoaded(),this._nodeCompilations=void 0;let e=this._getNodeCompilations(),o=K(this.getSchemas()),s=this.nodes.find(n=>n.type==="start-node")?.id,r={},i=[];for(let[n,Q]of this.nodes.entries()){let w=e[n];w&&(w.runtimeNode&&(r[Q.id]=w.runtimeNode),i.push(...w.edges))}return{createGraph:()=>L(r,i,o,{entryNode:s}),workspace:o}}_assertLoaded(){if(!this._loaded)throw new Error("AgenticWorkflowRuntime must be loaded before it can generate a graph.")}_getNodeCompilations(){return this._assertLoaded(),this._nodeCompilations??=this.nodes.map(e=>e.compile({outgoingEdges:this.edges.filter(o=>o.sourceNodeId===e.id)}))}},ht=Object.defineProperty,lt=Object.getOwnPropertyDescriptor,P=(t,e,o,s)=>{for(var r=s>1?void 0:s?lt(e,o):e,i=t.length-1,n;i>=0;i--)(n=t[i])&&(r=(s?n(e,o,r):n(r))||r);return s&&r&&ht(e,o,r),r},gt=()=>{throw new Error("WebAgent must be loaded before it can run.")},g=class extends W{constructor(t){super(t)}async load(){if(this.portalItem){try{await this.portalItem.load()}catch(o){throw new b("web-agent:load-portal-item","Failed to load portal item",{error:o})}let e=await this.portalItem.fetchData();if(this.sourceJSON=e,!this.portalItem.title)throw new b("web-agent:missing-title","The portal item is missing a title")}if(!this.sourceJSON)throw new b("web-agent:missing-source-json","The source JSON is missing");if(!this.sourceJSON.description)throw new b("web-agent:missing-description","The source JSON is missing a description");let t=v.fromJSON(this.sourceJSON);return await t.load(),this._runtime=t,this.description=this.sourceJSON.description,this.name=this.portalItem?.title??`web-agent-${Date.now()}`,this.generate(),this}getSchemas(){return this._runtime?.getSchemas()??[]}generate(){if(!this._runtime){this._set("workspace",K([])),this._set("createGraph",gt);return}let{createGraph:t,workspace:e}=this._runtime.generate();this._set("workspace",e),this._set("createGraph",t)}};P([a({type:$})],g.prototype,"portalItem",2);P([a()],g.prototype,"sourceJSON",2);g=P([h("WebAgent")],g);var j=class extends k{static{this.properties={agent:0,context:0,itemId:1,workflow:0}}#t;async getContext(){return D(this.context)?await this.context():this.context}async load(){let e;if(this.itemId){let o=U.getDefault();e=new g({portalItem:new $({id:this.itemId,portal:o})})}else this.workflow&&(e=new g({sourceJSON:this.workflow}));if(e&&(await e.load(),this.agent=e.registration),!this.agent)throw new Error("Failed to initialize the assistant agent because the agent registration is missing.");this.#t=M(this)}disconnectedCallback(){this.#t?.unregister(this.agent.id),super.disconnectedCallback()}};E("arcgis-assistant-agent",j);return j},"portal/PortalItem","portal/Portal","core/accessorSupport/decorators","core/Error","core/Accessor","identity/IdentityManager","request","config","core/reactiveUtils","layers/FeatureLayer",a,b,d)
|