@arcgis/ai-components 5.2.0-next.110 → 5.2.0-next.111
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/BaseAgent.js +1 -1
- package/dist/agent-utils/FunctionAgent.js +1 -1
- package/dist/agent-utils/LLMAgent.d.ts +4 -5
- package/dist/agent-utils/LLMAgent.js +59 -59
- package/dist/agent-utils/WorkflowAgent.js +1 -1
- package/dist/agent-utils/index.js +1 -1
- package/dist/agent-utils/middlewares/humanInTheLoop.js +1 -1
- package/dist/agent-utils/middlewares/middleware.js +1 -1
- package/dist/agent-utils/middlewares/trace.js +6 -6
- package/dist/agent-utils/middlewares/types.js +1 -1
- package/dist/agent-utils/tools/FunctionTool.js +1 -1
- package/dist/agent-utils/workflows/ConditionalWorkflow.js +1 -1
- package/dist/agent-utils/workflows/LoopWorkflow.js +1 -1
- package/dist/agent-utils/workflows/ParallelWorkflow.js +1 -1
- package/dist/agent-utils/workflows/RouterWorkflow.js +1 -1
- package/dist/agent-utils/workflows/SequentialWorkflow.js +1 -1
- package/dist/agent-utils/workflows/SwitchWorkflow.js +1 -1
- package/dist/agentic-workflow/jsonTypes.d.ts +48 -8
- package/dist/agentic-workflow/nodes/HumanInTheLoopNode.d.ts +37 -0
- package/dist/agentic-workflow/types.d.ts +1 -1
- package/dist/agents/runtime/skill/createSkillAgent.d.ts +0 -1
- package/dist/agents/runtime/skill/createSkillAgent.js +50 -50
- package/dist/agents/runtime/skill/types.d.ts +2 -10
- package/dist/agents/runtime/skill/types.js +1 -1
- package/dist/agents/tools/filter/clearFilters/adapter.js +1 -1
- package/dist/agents/tools/filter/resetMap/adapter.js +1 -1
- package/dist/agents/tools/filter/setFeatureEffect/adapter.js +1 -1
- package/dist/agents/tools/help/listFields/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToAddress/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToBookmark/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToFeatures/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToFullExtent/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToHomeExtent/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToLayer/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToScale/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToViewpoint/adapter.js +1 -1
- package/dist/agents/tools/navigation/goToZoom/adapter.js +1 -1
- package/dist/agents/tools/query/getAttribute/adapter.js +1 -1
- package/dist/agents/tools/query/getStatistics/adapter.js +1 -1
- package/dist/agents/tools/query/getTopFeatures/adapter.js +1 -1
- package/dist/agents/tools/query/queryFeatures/adapter.js +1 -1
- package/dist/agents/tools/search/findRelevantFields/adapter.js +1 -1
- package/dist/agents/tools/search/findRelevantLayers/adapter.js +1 -1
- package/dist/agents/tools/shared/resolveToolArtifact.js +1 -1
- package/dist/agents/tools/shared/types.js +1 -1
- package/dist/cdn/2BNQ6A6J.js +2 -0
- package/dist/cdn/{FV6FHLYW.js → 2MWUBKWI.js} +2 -2
- package/dist/cdn/{GW3IVAAZ.js → 2O4DON37.js} +2 -2
- package/dist/cdn/{LL324IL6.js → 2W7LK4HA.js} +2 -2
- package/dist/cdn/33PB7ALY.js +2 -0
- package/dist/cdn/{FK2CVSXW.js → 33SFAZQG.js} +4 -4
- package/dist/cdn/{LLY5A2E2.js → 34O57OGV.js} +1 -1
- package/dist/cdn/{OALQBAZR.js → 3UEKINYC.js} +2 -2
- package/dist/cdn/434TAA3J.js +2 -0
- package/dist/cdn/{ZWIKFBOU.js → 4IU63OWQ.js} +2 -2
- package/dist/cdn/{XRVGYRXL.js → 5A355PGH.js} +2 -2
- package/dist/cdn/{TB2GJALS.js → 5HBAJ57P.js} +2 -2
- package/dist/cdn/{7Y43R7QJ.js → 5MK44FNO.js} +2 -2
- package/dist/cdn/{LXIKAXUT.js → 5Q2XRQS6.js} +2 -2
- package/dist/cdn/{UAZPINUQ.js → 6ECRQVHY.js} +2 -2
- package/dist/cdn/{BBEGLIZC.js → 6OOZSZRJ.js} +2 -2
- package/dist/cdn/6OUIUXAJ.js +2 -0
- package/dist/cdn/{Y4TYL2AL.js → 6P44KOKX.js} +2 -2
- package/dist/cdn/{LBTGOMCT.js → 73TMZQI5.js} +2 -2
- package/dist/cdn/{BJMGT6GV.js → 74CVYM72.js} +2 -2
- package/dist/cdn/{PJPP6LOS.js → 7EHOFQ2P.js} +2 -2
- package/dist/cdn/{24EIZVUM.js → 7KSFIRXB.js} +2 -2
- package/dist/cdn/{STOGCXJH.js → AHCXG7XF.js} +2 -2
- package/dist/cdn/{VLPELJUS.js → AOVJ34QE.js} +2 -2
- package/dist/cdn/{3KNLFIM3.js → APFZY4PI.js} +2 -2
- package/dist/cdn/{KBSXHSBX.js → AVRS6UCQ.js} +2 -2
- package/dist/cdn/{YOW3YKWR.js → AVZ5Y6BK.js} +2 -2
- package/dist/cdn/{477I66FH.js → AXTQU5YL.js} +11 -11
- package/dist/cdn/BBPD2AS7.js +2 -0
- package/dist/cdn/{HV7MVIQV.js → BFZ5S7NF.js} +2 -2
- package/dist/cdn/{HMMYCSOK.js → BL273EGZ.js} +2 -2
- package/dist/cdn/C7JPWFZE.js +2 -0
- package/dist/cdn/{KKCLHXHG.js → CCC6LBMY.js} +1 -1
- package/dist/cdn/{NNPA3NLK.js → CEKOEHB3.js} +2 -2
- package/dist/cdn/{W54XYT2A.js → CFAC4FN3.js} +2 -2
- package/dist/cdn/{53KIFJFA.js → COH3QXWG.js} +2 -2
- package/dist/cdn/{CX2HJ67C.js → DB2TFPIO.js} +2 -2
- package/dist/cdn/{EYGZJKVD.js → DE26DAW5.js} +2 -2
- package/dist/cdn/DG27JEYG.js +50 -0
- package/dist/cdn/DKA6PSYN.js +2 -0
- package/dist/cdn/{65LCK3GG.js → DQ2Z65UO.js} +2 -2
- package/dist/cdn/DWH23NJN.js +2 -0
- package/dist/cdn/EDXTPEEU.js +2 -0
- package/dist/cdn/{6KWGSXIN.js → ENM3L4AC.js} +2 -2
- package/dist/cdn/{XV7RMYLR.js → EVMIYZWD.js} +2 -2
- package/dist/cdn/{FHBRXZLV.js → EYOWRGDP.js} +2 -2
- package/dist/cdn/{45BDE3MG.js → EYY367WR.js} +2 -2
- package/dist/cdn/{27CK3JHY.js → F5NIRETW.js} +2 -2
- package/dist/cdn/{TFAJNKBC.js → FCI6M62J.js} +2 -2
- package/dist/cdn/{V4PJMCJZ.js → FDOMMK2M.js} +1 -1
- package/dist/cdn/{4OI4QEV7.js → FS7GXTTQ.js} +2 -2
- package/dist/cdn/{IHUWQOMK.js → FYZATVB3.js} +2 -2
- package/dist/cdn/{3PPXAIRE.js → H6P3WP5D.js} +2 -2
- package/dist/cdn/HHP5YLUI.js +2 -0
- package/dist/cdn/HIAQARIQ.js +2 -0
- package/dist/cdn/HMIDFTEI.js +2 -0
- package/dist/cdn/{4CFCV47G.js → HMNBUGH2.js} +2 -2
- package/dist/cdn/HR6GWPKX.js +2 -0
- package/dist/cdn/{V266DJ5V.js → ICBIUFK7.js} +2 -2
- package/dist/cdn/{BTOBEN7Q.js → IH26MIYY.js} +2 -2
- package/dist/cdn/{QAX6UF4L.js → IHP25JWI.js} +2 -2
- package/dist/cdn/{M2U456J5.js → IYLFJCJ2.js} +4 -4
- package/dist/cdn/{JMXXRRKQ.js → J6A4AS7E.js} +2 -2
- package/dist/cdn/{QTEPFTAU.js → JEBRN3EU.js} +2 -2
- package/dist/cdn/{G24MNC7D.js → JICNSK6Y.js} +2 -2
- package/dist/cdn/JQYLMTDP.js +2 -0
- package/dist/cdn/{275FFTBE.js → K5JVB6FU.js} +2 -2
- package/dist/cdn/K7XWGSLN.js +2 -0
- package/dist/cdn/{M3KKORBG.js → K7YQIJFT.js} +2 -2
- package/dist/cdn/KH4V4I3W.js +2 -0
- package/dist/cdn/KMLJS2VW.js +2 -0
- package/dist/cdn/{HNTSDY3J.js → LAVFUDUG.js} +2 -2
- package/dist/cdn/{L3BTURBA.js → LK7ZIQW6.js} +2 -2
- package/dist/cdn/{ZJWR4W2S.js → LOQ2PKV5.js} +58 -58
- package/dist/cdn/{X42ACC66.js → LXPGQNXQ.js} +2 -2
- package/dist/cdn/{TXZQZR3I.js → MJSIYEWN.js} +2 -2
- package/dist/cdn/{CSE6BHOJ.js → MWYBF3F3.js} +2 -2
- package/dist/cdn/{FDRAKF5D.js → MXTXJKFE.js} +2 -2
- package/dist/cdn/{7DOYUO7L.js → NEV6OZN3.js} +2 -2
- package/dist/cdn/{NBDOPGSN.js → O4NVW75A.js} +2 -2
- package/dist/cdn/{ZA7ZU2F7.js → OKVLGJAG.js} +2 -2
- package/dist/cdn/{SUC2MIGE.js → OMF6ITSG.js} +2 -2
- package/dist/cdn/{A6LBMS7A.js → ONQ6JSBJ.js} +1 -1
- package/dist/cdn/{CKUUYQLO.js → OZAZ277H.js} +2 -2
- package/dist/cdn/{2UJPYWWZ.js → P4GFYBBO.js} +2 -2
- package/dist/cdn/{XNUWVZN7.js → P4XZMBU5.js} +2 -2
- package/dist/cdn/{L2HLFWCV.js → POL6HKCG.js} +3 -3
- package/dist/cdn/{AP3KPOHN.js → POZYDAU2.js} +2 -2
- package/dist/cdn/{FTTLFIBV.js → PQ2DPOFM.js} +2 -2
- package/dist/cdn/{JUNMTIB3.js → PYGX4HN7.js} +2 -2
- package/dist/cdn/{ZY3JQCZQ.js → QNXI3WOF.js} +36 -36
- package/dist/cdn/{4VBOTWC3.js → QRMRID2M.js} +2 -2
- package/dist/cdn/{TLPZELG3.js → R74ZHFA6.js} +1 -1
- package/dist/cdn/{CAOMMQSY.js → RFVZ7KCG.js} +1 -1
- package/dist/cdn/{OF3TAARW.js → RHYNE5OE.js} +1 -1
- package/dist/cdn/{4YOG5F3W.js → RLEHNAIA.js} +1 -1
- package/dist/cdn/{RSM7MEVT.js → ROQGPAR5.js} +2 -2
- package/dist/cdn/RXF2NUOL.js +2 -0
- package/dist/cdn/{MZUDIQQH.js → SDWWUWAF.js} +2 -2
- package/dist/cdn/SHI76XUV.js +2 -0
- package/dist/cdn/SITY6L4S.js +2 -0
- package/dist/cdn/STHBRTTD.js +2 -0
- package/dist/cdn/{7UBTNDV6.js → SXM4NUT5.js} +2 -2
- package/dist/cdn/{XVJFPZTW.js → SZRJTQ54.js} +2 -2
- package/dist/cdn/TO2NY7EA.js +2 -0
- package/dist/cdn/{4IWDBEMN.js → TPULIO6I.js} +2 -2
- package/dist/cdn/TVEEQSMF.js +2 -0
- package/dist/cdn/TWU3QXAS.js +2 -0
- package/dist/cdn/{EGRRZTF6.js → TYATJUNF.js} +2 -2
- package/dist/cdn/UCTC4JN4.js +3 -0
- package/dist/cdn/{HI3XKFHD.js → UDRKUVZP.js} +2 -2
- package/dist/cdn/{JYNHWJUZ.js → UHEYPSOR.js} +2 -2
- package/dist/cdn/{VGLBH473.js → UHICISBZ.js} +2 -2
- package/dist/cdn/UO5PBOQR.js +2 -0
- package/dist/cdn/{BVUCNXC5.js → UZLQALHY.js} +1 -1
- package/dist/cdn/{SNG3WODY.js → V6HOUZPZ.js} +2 -2
- package/dist/cdn/{V52GSTOC.js → V7Y22FRP.js} +2 -2
- package/dist/cdn/{I72ST4JR.js → VAXH6RUQ.js} +2 -2
- package/dist/cdn/{NV7CL4S3.js → VNLSYVPE.js} +2 -2
- package/dist/cdn/VR3CF3ZY.js +2 -0
- package/dist/cdn/{VK6CCPTG.js → VWP2B4LB.js} +2 -2
- package/dist/cdn/VXFQANGJ.js +2 -0
- package/dist/cdn/WKZHFSH3.js +2 -0
- package/dist/cdn/{OXC2WP7W.js → WSWB3B7B.js} +2 -2
- package/dist/cdn/{EK3PM4L5.js → WVP73XWD.js} +2 -2
- package/dist/cdn/{SJMAKF4P.js → WXQ26G5Q.js} +2 -2
- package/dist/cdn/{2F4TPWZQ.js → XQ3NBBQ3.js} +1 -1
- package/dist/cdn/{VXLKTQ36.js → YHWYTHID.js} +2 -2
- package/dist/cdn/{XOTPSCNF.js → YIZ7PR2G.js} +2 -2
- package/dist/cdn/{T6W6F4TF.js → Z5XQLSYH.js} +2 -2
- package/dist/cdn/{Y6CV2NZR.js → ZFOG3KXV.js} +2 -2
- package/dist/cdn/{FPH52WOH.js → ZU2FHVNK.js} +2 -2
- package/dist/cdn/agent-utils/index.js +2 -2
- package/dist/cdn/agent-utils/middlewares/humanInTheLoop.js +2 -3
- package/dist/cdn/agent-utils/middlewares/middleware.js +2 -2
- package/dist/cdn/agent-utils/middlewares/trace.js +2 -2
- package/dist/cdn/index.js +2 -2
- package/dist/chunks/BaseWorkflow.js +1 -1
- package/dist/chunks/SKILL.js +1 -1
- package/dist/chunks/SKILL2.js +1 -1
- package/dist/chunks/SKILL3.js +1 -1
- package/dist/chunks/SKILL4.js +1 -1
- package/dist/chunks/adapter.js +1 -1
- package/dist/chunks/aiFactory.js +56 -50
- package/dist/chunks/arcgisKnowledgeGraph.js +2 -2
- package/dist/chunks/arcgisToolRegistry.js +1 -1
- package/dist/chunks/arcgis_knowledge_current_lc_context.js +1 -1
- package/dist/chunks/arcgis_knowledge_current_map_context.js +1 -1
- package/dist/chunks/arcgis_knowledge_cypher_query_prompt.js +1 -1
- package/dist/chunks/arcgis_knowledge_lucene_generation_prompt.js +1 -1
- package/dist/chunks/arcgis_knowledge_summarize_result_prompt.js +1 -1
- package/dist/chunks/arcgis_knowledge_tool_prompt.js +1 -1
- package/dist/chunks/baseAgentState.js +1 -1
- package/dist/chunks/converterUtils.js +1 -1
- package/dist/chunks/dataExplorationAgent.js +1 -1
- package/dist/chunks/data_explore_filter_prompt.js +1 -1
- package/dist/chunks/data_explore_query_prompt.js +1 -1
- package/dist/chunks/embeddings.worker.js +1 -1
- package/dist/chunks/fetchAgentContext.js +1 -1
- package/dist/chunks/fetchService.js +1 -1
- package/dist/chunks/fieldStatistics.js +1 -1
- package/dist/chunks/field_descriptions_prompt.js +1 -1
- package/dist/chunks/formatFeatureAttributes.js +1 -1
- package/dist/chunks/generateLayerDescriptions.js +60 -63
- package/dist/chunks/graph.js +1 -1
- package/dist/chunks/helpAgent.js +1 -1
- package/dist/chunks/help_prompt.js +1 -1
- package/dist/chunks/index.js +1 -1
- package/dist/chunks/intent_prompt.js +1 -1
- package/dist/chunks/layerStylingGraph.js +1 -1
- package/dist/chunks/layer_descriptions_prompt.js +1 -1
- package/dist/chunks/layer_styling_prompt.js +1 -1
- package/dist/chunks/mergeWhereClauses.js +1 -1
- package/dist/chunks/navigationAgent.js +1 -1
- package/dist/chunks/navigation_intent_prompt.js +1 -1
- package/dist/chunks/navigation_tool_prompt.js +1 -1
- package/dist/chunks/orchestrator.js +1 -1
- package/dist/chunks/requireAgentServices.js +1 -1
- package/dist/chunks/resolvePointGeometryFilter.js +1 -1
- package/dist/chunks/runtime.js +1 -1
- package/dist/chunks/slottableRequestUtils.js +1 -1
- package/dist/chunks/state.js +26 -26
- package/dist/chunks/summarize_query_response_prompt.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/chunks/utils.js +1 -1
- package/dist/chunks/utils2.js +1 -1
- package/dist/chunks/utils3.js +1 -1
- package/dist/components/arcgis-assistant/customElement.js +1 -1
- package/dist/components/arcgis-assistant-agent/customElement.js +362 -220
- package/dist/components/arcgis-assistant-chat/customElement.js +1 -1
- package/dist/components/arcgis-assistant-chat-entry/customElement.js +1 -1
- package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +1 -1
- package/dist/components/arcgis-assistant-help-agent/customElement.js +1 -1
- package/dist/components/arcgis-assistant-interrupt/customElement.js +1 -1
- package/dist/components/arcgis-assistant-interrupt-preview/customElement.js +1 -1
- package/dist/components/arcgis-assistant-knowledge-agent/customElement.js +1 -1
- package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-block/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-feedback/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-footer/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-loading/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-log/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-read-aloud/customElement.js +1 -1
- package/dist/components/arcgis-assistant-message-text/customElement.js +1 -1
- package/dist/components/arcgis-assistant-navigation-agent/customElement.js +1 -1
- package/dist/components/arcgis-assistant-speech-input/customElement.js +1 -1
- package/dist/components/arcgis-assistant-suggested-prompts/customElement.js +1 -1
- package/dist/components/arcgis-assistant-user-message/customElement.js +1 -1
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/dist/index.js +1 -1
- package/dist/loader.js +1 -1
- package/dist/utils/index.js +3 -3
- package/package.json +9 -9
- package/dist/cdn/25MBI4PD.js +0 -2
- package/dist/cdn/2LVYAXHG.js +0 -44
- package/dist/cdn/2WXXSZP5.js +0 -2
- package/dist/cdn/5X23DDDZ.js +0 -2
- package/dist/cdn/AUCKEB52.js +0 -2
- package/dist/cdn/B3HXSEBN.js +0 -2
- package/dist/cdn/BTTCBEPW.js +0 -2
- package/dist/cdn/EXMEB4X2.js +0 -2
- package/dist/cdn/FLUI6GCU.js +0 -2
- package/dist/cdn/FRYS2PZJ.js +0 -2
- package/dist/cdn/FSLQCZRN.js +0 -2
- package/dist/cdn/HKIA5PWU.js +0 -2
- package/dist/cdn/I3SUE2TR.js +0 -2
- package/dist/cdn/KAX4A7SF.js +0 -2
- package/dist/cdn/LIRT72WY.js +0 -2
- package/dist/cdn/M5B6X46F.js +0 -2
- package/dist/cdn/NGR5NVZE.js +0 -2
- package/dist/cdn/PUZ6RAFQ.js +0 -2
- package/dist/cdn/ROS22KOA.js +0 -2
- package/dist/cdn/SBNNJ5WA.js +0 -2
- package/dist/cdn/SDX46GZY.js +0 -2
- package/dist/cdn/SI22EJLC.js +0 -2
- package/dist/cdn/SXYKNDOF.js +0 -2
- package/dist/cdn/SZ2L5556.js +0 -2
- package/dist/cdn/UGIHS7OA.js +0 -2
- package/dist/cdn/VT5EWFH7.js +0 -2
- package/dist/cdn/XZF7Y6B2.js +0 -2
- package/dist/cdn/Y4ZOB6UH.js +0 -2
- package/dist/cdn/YIXASZUW.js +0 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import m from "@arcgis/core/core/Accessor.js";
|
|
3
3
|
import { property as i, subclass as l } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
4
4
|
import { a as u } from "../chunks/state.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { property as u, subclass as p } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
3
3
|
import { isGraphInterrupt as m } from "@langchain/langgraph/web";
|
|
4
4
|
import { BaseAgent as d } from "./BaseAgent.js";
|
|
@@ -14,9 +14,8 @@ export type LLMAgentTool = FunctionToolLike | StructuredToolInterface;
|
|
|
14
14
|
export class LLMAgent<TInput extends AgentData = AgentData, TOutput extends AgentData = AgentData> extends BaseAgent<AgentCustomState<TInput, TOutput>> {
|
|
15
15
|
constructor(properties?: LLMAgentConstructProperties<TInput, TOutput>);
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* state for prompt formatting.
|
|
17
|
+
* Defines the structured input fields available in the agent's graph state.
|
|
18
|
+
* Prompt variables are resolved directly from graph state and do not need to be declared in this schema.
|
|
20
19
|
*/
|
|
21
20
|
accessor inputSchema: ZodObjectSchema<TInput> | undefined;
|
|
22
21
|
/**
|
|
@@ -33,10 +32,10 @@ export class LLMAgent<TInput extends AgentData = AgentData, TOutput extends Agen
|
|
|
33
32
|
accessor outputSchema: ZodObjectSchema<TOutput> | undefined;
|
|
34
33
|
/**
|
|
35
34
|
* Defines the prompt template the agent will use to generate its output.
|
|
36
|
-
* This prompt can include variables that are populated from the agent's state at runtime
|
|
35
|
+
* This prompt can include variables that are populated directly from the agent's state at runtime,
|
|
37
36
|
* allowing for dynamic and context-aware responses from the language model.
|
|
38
37
|
*
|
|
39
|
-
* In this example below, {location} and {weather} would be variables extracted from the agent's state
|
|
38
|
+
* In this example below, {location} and {weather} would be variables extracted from the agent's state.
|
|
40
39
|
*
|
|
41
40
|
* @example "Generate a weather report for {location} based on the current {weather} conditions."
|
|
42
41
|
* @required
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import "@arcgis/core/identity/IdentityManager.js";
|
|
3
3
|
import "@arcgis/core/portal/Portal.js";
|
|
4
4
|
import "@arcgis/core/request.js";
|
|
@@ -8,23 +8,23 @@ import "../chunks/generateLayerDescriptions.js";
|
|
|
8
8
|
import "@langchain/core/messages";
|
|
9
9
|
import "@langchain/core/callbacks/dispatch/web";
|
|
10
10
|
import "@langchain/core/callbacks/base";
|
|
11
|
-
import { c
|
|
11
|
+
import { c } from "../chunks/aiFactory.js";
|
|
12
12
|
import { watch as w } from "@arcgis/core/core/reactiveUtils.js";
|
|
13
13
|
import "@arcgis/core/layers/FeatureLayer.js";
|
|
14
|
-
import { ChatPromptTemplate as
|
|
15
|
-
import { property as
|
|
16
|
-
import { createAgent as h } from "langchain";
|
|
17
|
-
import { BaseAgent as
|
|
14
|
+
import { ChatPromptTemplate as u } from "@langchain/core/prompts";
|
|
15
|
+
import { property as n, subclass as v } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
16
|
+
import { createAgent as h, providerStrategy as _ } from "langchain";
|
|
17
|
+
import { BaseAgent as S } from "./BaseAgent.js";
|
|
18
18
|
import { convertToLangChainMiddlewares as l } from "./middlewares/middleware.js";
|
|
19
|
-
import { c as
|
|
20
|
-
import { c as
|
|
21
|
-
import { c as d, h as
|
|
22
|
-
var
|
|
23
|
-
for (var o =
|
|
24
|
-
(
|
|
25
|
-
return
|
|
19
|
+
import { c as T } from "../chunks/graph.js";
|
|
20
|
+
import { c as y } from "../chunks/state.js";
|
|
21
|
+
import { c as d, h as x } from "../chunks/utils.js";
|
|
22
|
+
var M = Object.defineProperty, P = Object.getOwnPropertyDescriptor, m = (t, e, r, s) => {
|
|
23
|
+
for (var o = s > 1 ? void 0 : s ? P(e, r) : e, p = t.length - 1, a; p >= 0; p--)
|
|
24
|
+
(a = t[p]) && (o = (s ? a(e, r, o) : a(o)) || o);
|
|
25
|
+
return s && o && M(e, r, o), o;
|
|
26
26
|
};
|
|
27
|
-
let
|
|
27
|
+
let i = class extends S {
|
|
28
28
|
//#region Lifecycle
|
|
29
29
|
constructor(t) {
|
|
30
30
|
super(t), this.modelTier = "default";
|
|
@@ -54,13 +54,16 @@ let a = class extends v {
|
|
|
54
54
|
return [this.inputSchema, this.outputSchema].filter(Boolean);
|
|
55
55
|
}
|
|
56
56
|
generate() {
|
|
57
|
-
const t =
|
|
58
|
-
|
|
59
|
-
|
|
57
|
+
const t = this.prompt ? u.fromTemplate(this.prompt).inputVariables : [], e = y(
|
|
58
|
+
this.getSchemas(),
|
|
59
|
+
t
|
|
60
|
+
);
|
|
61
|
+
this._set("workspace", e);
|
|
62
|
+
const r = this.id, s = { [r]: this._invoke.bind(this) }, o = [{ from: r, decide: () => {
|
|
60
63
|
} }];
|
|
61
64
|
this._set(
|
|
62
65
|
"createGraph",
|
|
63
|
-
() =>
|
|
66
|
+
() => T(s, o, e, {
|
|
64
67
|
agent: this,
|
|
65
68
|
entryNode: r,
|
|
66
69
|
middlewares: this.middlewares
|
|
@@ -69,74 +72,71 @@ let a = class extends v {
|
|
|
69
72
|
}
|
|
70
73
|
//#endregion
|
|
71
74
|
//#region Private Methods
|
|
72
|
-
async _invoke(t,
|
|
75
|
+
async _invoke(t, e) {
|
|
73
76
|
try {
|
|
74
|
-
return this.outputSchema ? await this._invokeStructured(t,
|
|
75
|
-
} catch (
|
|
76
|
-
if (f(
|
|
77
|
-
throw
|
|
78
|
-
const
|
|
79
|
-
return d({ outputMessage:
|
|
77
|
+
return this.outputSchema ? await this._invokeStructured(t, e) : await this._invokeUnstructured(t, e);
|
|
78
|
+
} catch (r) {
|
|
79
|
+
if (f(r))
|
|
80
|
+
throw r;
|
|
81
|
+
const s = r instanceof Error ? r.message : String(r);
|
|
82
|
+
return d({ outputMessage: s }, "failed", s);
|
|
80
83
|
}
|
|
81
84
|
}
|
|
82
|
-
async _invokeStructured(t,
|
|
85
|
+
async _invokeStructured(t, e) {
|
|
83
86
|
if (!this.outputSchema)
|
|
84
87
|
throw new Error("Output schema is required for structured invocation.");
|
|
85
|
-
const
|
|
86
|
-
model: await
|
|
88
|
+
const s = await h({
|
|
89
|
+
model: await c({ modelTier: this.modelTier }),
|
|
87
90
|
systemPrompt: await this._getPromptWithInputVariables(t),
|
|
88
91
|
tools: this._getTools(),
|
|
89
92
|
checkpointer: !0,
|
|
90
93
|
middleware: l(this.middlewares),
|
|
91
|
-
responseFormat: this.outputSchema
|
|
92
|
-
}).invoke({ messages: t.agentExecutionContext.messages },
|
|
93
|
-
if (!("structuredResponse" in
|
|
94
|
+
responseFormat: _(this.outputSchema)
|
|
95
|
+
}).invoke({ messages: t.agentExecutionContext.messages }, e);
|
|
96
|
+
if (!("structuredResponse" in s) || s.structuredResponse === void 0)
|
|
94
97
|
throw new Error("LLMAgent did not receive structured output from createAgent.");
|
|
95
|
-
return
|
|
98
|
+
return x(s.structuredResponse, this.outputSchema, s.messages);
|
|
96
99
|
}
|
|
97
|
-
async _invokeUnstructured(t,
|
|
100
|
+
async _invokeUnstructured(t, e) {
|
|
98
101
|
const o = (await h({
|
|
99
|
-
model: await
|
|
102
|
+
model: await c({ modelTier: this.modelTier }),
|
|
100
103
|
systemPrompt: await this._getPromptWithInputVariables(t),
|
|
101
104
|
tools: this._getTools(),
|
|
102
105
|
checkpointer: !0,
|
|
103
106
|
middleware: l(this.middlewares)
|
|
104
|
-
}).invoke({ messages: t.agentExecutionContext.messages },
|
|
107
|
+
}).invoke({ messages: t.agentExecutionContext.messages }, e)).messages, a = o.at(-1)?.text ?? "", g = a.trim() || "LLMAgent completed.";
|
|
105
108
|
return d(
|
|
106
|
-
{ agentExecutionContext: { ...t.agentExecutionContext, messages: o }, outputMessage:
|
|
109
|
+
{ agentExecutionContext: { ...t.agentExecutionContext, messages: o }, outputMessage: a },
|
|
107
110
|
"success",
|
|
108
111
|
g
|
|
109
112
|
);
|
|
110
113
|
}
|
|
111
114
|
async _getPromptWithInputVariables(t) {
|
|
112
|
-
|
|
113
|
-
for (const { outputKey: e } of this.middlewares)
|
|
114
|
-
e && (r[String(e)] = t[e]);
|
|
115
|
-
return await S.fromTemplate(this.prompt).format(r);
|
|
115
|
+
return await u.fromTemplate(this.prompt).format(t);
|
|
116
116
|
}
|
|
117
117
|
_getTools() {
|
|
118
118
|
return this.tools?.map((t) => "getTool" in t ? t.getTool() : t) ?? [];
|
|
119
119
|
}
|
|
120
120
|
//#endregion
|
|
121
121
|
};
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
],
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
],
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
],
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
],
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
],
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
],
|
|
122
|
+
m([
|
|
123
|
+
n()
|
|
124
|
+
], i.prototype, "prompt", 2);
|
|
125
|
+
m([
|
|
126
|
+
n()
|
|
127
|
+
], i.prototype, "tools", 2);
|
|
128
|
+
m([
|
|
129
|
+
n()
|
|
130
|
+
], i.prototype, "inputSchema", 2);
|
|
131
|
+
m([
|
|
132
|
+
n()
|
|
133
|
+
], i.prototype, "outputSchema", 2);
|
|
134
|
+
m([
|
|
135
|
+
n()
|
|
136
|
+
], i.prototype, "modelTier", 2);
|
|
137
|
+
i = m([
|
|
138
|
+
v("LLMAgent")
|
|
139
|
+
], i);
|
|
140
140
|
export {
|
|
141
|
-
|
|
141
|
+
i as LLMAgent
|
|
142
142
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { property as h, subclass as c } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
3
3
|
import { watch as l } from "@arcgis/core/core/reactiveUtils.js";
|
|
4
4
|
import { BaseAgent as m } from "./BaseAgent.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { NodeInterrupt as s } from "@langchain/langgraph/web";
|
|
3
3
|
import { createAgentMiddleware as f, createToolMiddleware as I } from "./middleware.js";
|
|
4
4
|
const m = "human-in-the-loop", w = "Agent execution requires approval", p = "Agent execution rejected by the user.", h = "human-in-the-loop-tool", y = "Tool execution requires approval";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
2
|
-
import { s as
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
+
import { s as n } from "../../chunks/index.js";
|
|
3
3
|
import { AIMessage as i, ToolMessage as s } from "@langchain/core/messages";
|
|
4
4
|
import { createAgentMiddleware as c, createToolMiddleware as d } from "./middleware.js";
|
|
5
5
|
const g = "agent-trace", f = "tool-trace";
|
|
@@ -9,9 +9,9 @@ function p() {
|
|
|
9
9
|
const t = await a(e), o = e.runtime, l = m(t);
|
|
10
10
|
return await Promise.all(
|
|
11
11
|
l.map(
|
|
12
|
-
async (
|
|
12
|
+
async (r) => await n(
|
|
13
13
|
{
|
|
14
|
-
text: `LLM requested tool call "${
|
|
14
|
+
text: `LLM requested tool call "${r.name}" with arguments: ${JSON.stringify(r.args, null, 2)}`
|
|
15
15
|
},
|
|
16
16
|
o
|
|
17
17
|
)
|
|
@@ -24,9 +24,9 @@ function T() {
|
|
|
24
24
|
return d(f, {
|
|
25
25
|
wrapToolCall: async (e, a) => {
|
|
26
26
|
const t = await a(e), o = e.config;
|
|
27
|
-
return await
|
|
27
|
+
return await n(
|
|
28
28
|
{
|
|
29
|
-
text: `Finished executing tool: ${s.isInstance(t) ? t.
|
|
29
|
+
text: `Finished executing tool: ${s.isInstance(t) ? t.text : typeof t == "string" ? t : e.tool.name}`
|
|
30
30
|
},
|
|
31
31
|
o
|
|
32
32
|
), t;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import c from "@arcgis/core/core/Accessor.js";
|
|
3
3
|
import { property as a, subclass as p } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
4
4
|
import { tool as d } from "@langchain/core/tools";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { property as u, subclass as f } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
3
3
|
import { B as p, g as c } from "../../chunks/BaseWorkflow.js";
|
|
4
4
|
var g = Object.defineProperty, w = Object.getOwnPropertyDescriptor, a = (e, r, n, t) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { property as u, subclass as w } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
3
3
|
import { c as f } from "../../chunks/graph.js";
|
|
4
4
|
import { B as h } from "../../chunks/BaseWorkflow.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { property as A, subclass as I } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
3
3
|
import { c as U } from "../../chunks/graph.js";
|
|
4
4
|
import { a as W } from "../../chunks/state.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { property as h, subclass as g } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
3
3
|
import { B as v, g as l } from "../../chunks/BaseWorkflow.js";
|
|
4
4
|
var w = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, f = (e) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { property as p, subclass as f } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
3
3
|
import { B as c, g as i, a as m } from "../../chunks/BaseWorkflow.js";
|
|
4
4
|
var d = Object.defineProperty, w = Object.getOwnPropertyDescriptor, u = (e, o, r, t) => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* COPYRIGHT Esri - https://js.arcgis.com/
|
|
1
|
+
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { property as u, subclass as _ } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
3
3
|
import { B as y, g as v } from "../../chunks/BaseWorkflow.js";
|
|
4
4
|
var A = Object.defineProperty, N = Object.getOwnPropertyDescriptor, g = (e) => {
|
|
@@ -15,7 +15,7 @@ export type AgenticWorkflowEdgeJson = AgenticWorkflowJsonObject
|
|
|
15
15
|
readonly target_node_id: AgenticWorkflowNodeIdJson;
|
|
16
16
|
};
|
|
17
17
|
|
|
18
|
-
export type AgenticWorkflowNodeTypeJson = "agent_node" | "end_message_node" | "guardrails_node" | "
|
|
18
|
+
export type AgenticWorkflowNodeTypeJson = "agent_node" | "end_message_node" | "guardrails_node" | "human_in_the_loop_node" | "loop_node" | "start_node";
|
|
19
19
|
|
|
20
20
|
export type AgenticWorkflowBaseNodeJson<TType extends AgenticWorkflowNodeTypeJson> = AgenticWorkflowJsonObject
|
|
21
21
|
& {
|
|
@@ -39,6 +39,13 @@ export type AgenticWorkflowAgentNodeJson = AgenticWorkflowBaseNodeJson<"agent_no
|
|
|
39
39
|
readonly llm_model?: AgenticWorkflowLLMModelJson;
|
|
40
40
|
};
|
|
41
41
|
|
|
42
|
+
export type AgenticWorkflowHumanInTheLoopNodeJson = AgenticWorkflowBaseNodeJson<"human_in_the_loop_node">
|
|
43
|
+
& {
|
|
44
|
+
readonly conditions?: AgenticWorkflowConditionJson[];
|
|
45
|
+
readonly message?: AgenticWorkflowHumanInTheLoopMessageJson;
|
|
46
|
+
readonly response?: AgenticWorkflowHumanInTheLoopResponseJson;
|
|
47
|
+
};
|
|
48
|
+
|
|
42
49
|
export type AgenticWorkflowArcgisToolJson = AgenticWorkflowJsonObject
|
|
43
50
|
& {
|
|
44
51
|
readonly type: "arcgis_tool";
|
|
@@ -69,7 +76,7 @@ export type AgenticWorkflowGraphJson = AgenticWorkflowJsonObject
|
|
|
69
76
|
|
|
70
77
|
export type AgenticWorkflowNodeIdJson = `${string}_node_${number}`;
|
|
71
78
|
|
|
72
|
-
export type AgenticWorkflowSourceAnchorIdJson =
|
|
79
|
+
export type AgenticWorkflowSourceAnchorIdJson = string;
|
|
73
80
|
|
|
74
81
|
export type AgenticWorkflowNodeJson = AgenticWorkflowAgentNodeJson | AgenticWorkflowEndMessageNodeJson | AgenticWorkflowGuardrailsNodeJson | AgenticWorkflowHumanInTheLoopNodeJson | AgenticWorkflowLoopNodeJson | AgenticWorkflowStartNodeJson;
|
|
75
82
|
|
|
@@ -85,12 +92,44 @@ export type AgenticWorkflowGuardrailsNodeJson = AgenticWorkflowBaseNodeJson<"gua
|
|
|
85
92
|
readonly llm_model?: AgenticWorkflowLLMModelJson;
|
|
86
93
|
};
|
|
87
94
|
|
|
88
|
-
export type
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
95
|
+
export type AgenticWorkflowHumanInTheLoopMessageJson = {
|
|
96
|
+
readonly content: string;
|
|
97
|
+
readonly source: "fixed";
|
|
98
|
+
} | {
|
|
99
|
+
readonly generationInstructions: string;
|
|
100
|
+
readonly model?: AgenticWorkflowLLMModelJson;
|
|
101
|
+
readonly source: "generated";
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
export type AgenticWorkflowHumanInTheLoopResponseJson = {
|
|
105
|
+
readonly choices: AgenticWorkflowHumanInTheLoopChoicesJson;
|
|
106
|
+
readonly freeTextInput?: AgenticWorkflowHumanInTheLoopFreeTextJson;
|
|
107
|
+
readonly type: "multipleSelect" | "singleSelect";
|
|
108
|
+
} | {
|
|
109
|
+
readonly freeTextInput: AgenticWorkflowHumanInTheLoopFreeTextJson;
|
|
110
|
+
readonly type: "textInput";
|
|
111
|
+
} | {
|
|
112
|
+
readonly freeTextInput?: AgenticWorkflowHumanInTheLoopFreeTextJson;
|
|
113
|
+
readonly negativeActionLabel?: string;
|
|
114
|
+
readonly positiveActionLabel?: string;
|
|
115
|
+
readonly type: "confirmation";
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
export type AgenticWorkflowHumanInTheLoopChoicesJson = {
|
|
119
|
+
readonly items: {
|
|
120
|
+
readonly label: string;
|
|
121
|
+
readonly value: string;
|
|
122
|
+
}[];
|
|
123
|
+
readonly source: "fixed";
|
|
124
|
+
} | {
|
|
125
|
+
readonly reference: string;
|
|
126
|
+
readonly source: "reference";
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
export type AgenticWorkflowHumanInTheLoopFreeTextJson = {
|
|
130
|
+
readonly enabled: boolean;
|
|
131
|
+
readonly maxLength?: number;
|
|
132
|
+
readonly placeholder?: string;
|
|
94
133
|
};
|
|
95
134
|
|
|
96
135
|
export type AgenticWorkflowLoopNodeJson = AgenticWorkflowBaseNodeJson<"loop_node">
|
|
@@ -101,6 +140,7 @@ export type AgenticWorkflowLoopNodeJson = AgenticWorkflowBaseNodeJson<"loop_node
|
|
|
101
140
|
|
|
102
141
|
export type AgenticWorkflowConditionJson = AgenticWorkflowJsonObject
|
|
103
142
|
& {
|
|
143
|
+
readonly optionValue?: boolean | number | string;
|
|
104
144
|
readonly preset?: "process" | "reject";
|
|
105
145
|
readonly source_anchor_id: AgenticWorkflowSourceAnchorIdJson;
|
|
106
146
|
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { AgenticWorkflowHumanInTheLoopNodeJson } from "../jsonTypes.js";
|
|
2
|
+
import type { AgentData } from "../../agent-utils/types.js";
|
|
3
|
+
import type { RuntimeNode, NodeCompilation, NodeCompilationContext } from "../types.js";
|
|
4
|
+
import type { BaseNode } from "./BaseNode.js";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Pauses a workflow and requests a response from the user.
|
|
8
|
+
*
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export class HumanInTheLoopNode extends BaseNode {
|
|
12
|
+
/** @param json */
|
|
13
|
+
static fromJSON(json: AgenticWorkflowHumanInTheLoopNodeJson): HumanInTheLoopNode;
|
|
14
|
+
constructor(properties?: HumanInTheLoopNodeConstructProperties);
|
|
15
|
+
accessor conditions: HumanInTheLoopCondition[];
|
|
16
|
+
accessor message: AgenticWorkflowHumanInTheLoopNodeJson["message"] | undefined;
|
|
17
|
+
accessor response: HumanInTheLoopResponseConfig | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* The type of this node, which can be used to categorize or differentiate nodes within the agent's workflow.
|
|
20
|
+
*
|
|
21
|
+
* @default "human-in-the-loop-node"
|
|
22
|
+
* @required
|
|
23
|
+
*/
|
|
24
|
+
accessor type: "human-in-the-loop-node";
|
|
25
|
+
/** @param context */
|
|
26
|
+
compile<TCustomState extends AgentData>(context: NodeCompilationContext): NodeCompilation<TCustomState>;
|
|
27
|
+
createRuntimeNode<TCustomState extends AgentData>(): RuntimeNode<TCustomState>;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export type HumanInTheLoopNodeConstructProperties = Pick<HumanInTheLoopNode, "id" | "label" | "type">;
|
|
31
|
+
|
|
32
|
+
export type HumanInTheLoopResponseConfig = NonNullable<AgenticWorkflowHumanInTheLoopNodeJson["response"]>;
|
|
33
|
+
|
|
34
|
+
export type HumanInTheLoopCondition = {
|
|
35
|
+
optionValue?: boolean | number | string;
|
|
36
|
+
sourceAnchorId: string;
|
|
37
|
+
};
|
|
@@ -25,5 +25,5 @@ export type AgentNodeGraphUpdate = Partial<AgentRuntimeState & GraphNodeResultsS
|
|
|
25
25
|
export type WebAgentRuntimeState<TCustomState extends AgentData> = AgentGraphState<GraphNodeResultsState & Omit<TCustomState, "nodes">>;
|
|
26
26
|
|
|
27
27
|
export type GraphNodeResult<TOutput extends AgentData = AgentData> = {
|
|
28
|
-
output: Omit<TOutput, keyof AgentRuntimeState | "output"> | string;
|
|
28
|
+
output: Omit<TOutput, keyof AgentRuntimeState | "output"> | string[] | boolean | string;
|
|
29
29
|
};
|
|
@@ -7,7 +7,6 @@ import type { ToolLoaders, RuntimeContextLoaderOptions } from "./types.js";
|
|
|
7
7
|
* Creates an agent registration that loads and runs bundled skills.
|
|
8
8
|
*
|
|
9
9
|
* @param parameter0
|
|
10
|
-
* @internal
|
|
11
10
|
*/
|
|
12
11
|
export function createSkillAgent(parameter0: SkillAgentOptions): AgentRegistration;
|
|
13
12
|
|