@minded-ai/mindedjs 1.0.29 → 1.0.30

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.
Files changed (173) hide show
  1. package/dist/agent.d.ts +1 -0
  2. package/dist/agent.d.ts.map +1 -0
  3. package/dist/checkpointer/checkpointSaverFactory.d.ts +1 -0
  4. package/dist/checkpointer/checkpointSaverFactory.d.ts.map +1 -0
  5. package/dist/cli/index.d.ts +1 -0
  6. package/dist/cli/index.d.ts.map +1 -0
  7. package/dist/cli/index.js +0 -0
  8. package/dist/edges/createDirectEdge.d.ts +1 -0
  9. package/dist/edges/createDirectEdge.d.ts.map +1 -0
  10. package/dist/edges/createLogicalRouter.d.ts +1 -0
  11. package/dist/edges/createLogicalRouter.d.ts.map +1 -0
  12. package/dist/edges/createPromptRouter.d.ts +1 -0
  13. package/dist/edges/createPromptRouter.d.ts.map +1 -0
  14. package/dist/edges/edgeFactory.d.ts +1 -0
  15. package/dist/edges/edgeFactory.d.ts.map +1 -0
  16. package/dist/events/AgentEvents.d.ts +1 -0
  17. package/dist/events/AgentEvents.d.ts.map +1 -0
  18. package/dist/events/index.d.ts +1 -0
  19. package/dist/events/index.d.ts.map +1 -0
  20. package/dist/index.d.ts +1 -0
  21. package/dist/index.d.ts.map +1 -0
  22. package/dist/llm/createLlmInstance.d.ts +1 -0
  23. package/dist/llm/createLlmInstance.d.ts.map +1 -0
  24. package/dist/nodes/addHumanInTheLoopNode.d.ts +1 -0
  25. package/dist/nodes/addHumanInTheLoopNode.d.ts.map +1 -0
  26. package/dist/nodes/addPromptNode.d.ts +1 -0
  27. package/dist/nodes/addPromptNode.d.ts.map +1 -0
  28. package/dist/nodes/addToolNode.d.ts +1 -0
  29. package/dist/nodes/addToolNode.d.ts.map +1 -0
  30. package/dist/nodes/addTriggerNode.d.ts +1 -0
  31. package/dist/nodes/addTriggerNode.d.ts.map +1 -0
  32. package/dist/nodes/nodeFactory.d.ts +1 -0
  33. package/dist/nodes/nodeFactory.d.ts.map +1 -0
  34. package/dist/platform/config.d.ts +1 -0
  35. package/dist/platform/config.d.ts.map +1 -0
  36. package/dist/platform/mindedChatOpenAI.d.ts +1 -0
  37. package/dist/platform/mindedChatOpenAI.d.ts.map +1 -0
  38. package/dist/platform/mindedCheckpointSaver.d.ts +1 -0
  39. package/dist/platform/mindedCheckpointSaver.d.ts.map +1 -0
  40. package/dist/platform/mindedConnection.d.ts +1 -0
  41. package/dist/platform/mindedConnection.d.ts.map +1 -0
  42. package/dist/platform/mindedConnectionTypes.d.ts +1 -0
  43. package/dist/platform/mindedConnectionTypes.d.ts.map +1 -0
  44. package/dist/platform/mindedRequest.js +2 -2
  45. package/dist/platform/mindedRequest.js.map +1 -1
  46. package/dist/triggers/triggerTypeToDefaultMessage.d.ts +1 -0
  47. package/dist/triggers/triggerTypeToDefaultMessage.d.ts.map +1 -0
  48. package/dist/types/Agent.types.d.ts +1 -0
  49. package/dist/types/Agent.types.d.ts.map +1 -0
  50. package/dist/types/Flows.types.d.ts +1 -0
  51. package/dist/types/Flows.types.d.ts.map +1 -0
  52. package/dist/types/LLM.types.d.ts +1 -0
  53. package/dist/types/LLM.types.d.ts.map +1 -0
  54. package/dist/types/LangGraph.types.d.ts +1 -0
  55. package/dist/types/LangGraph.types.d.ts.map +1 -0
  56. package/dist/types/Tools.types.d.ts +1 -0
  57. package/dist/types/Tools.types.d.ts.map +1 -0
  58. package/dist/types/Triggers.types.d.ts +1 -0
  59. package/dist/types/Triggers.types.js +3 -0
  60. package/dist/types/Triggers.types.js.map +1 -0
  61. package/package.json +6 -2
  62. package/.github/workflows/CI.yml +0 -34
  63. package/.prettierrc +0 -8
  64. package/dist/internalTools/appActionRunnerTool.d.ts +0 -6
  65. package/dist/internalTools/appActionRunnerTool.js +0 -55
  66. package/dist/internalTools/appActionRunnerTool.js.map +0 -1
  67. package/dist/nodes/actionRunnerTool.d.ts +0 -11
  68. package/dist/nodes/actionRunnerTool.js +0 -84
  69. package/dist/nodes/actionRunnerTool.js.map +0 -1
  70. package/dist/nodes/addAppTool.d.ts +0 -8
  71. package/dist/nodes/addAppTool.js +0 -12
  72. package/dist/nodes/addAppTool.js.map +0 -1
  73. package/dist/nodes/addAppToolNode.d.ts +0 -8
  74. package/dist/nodes/addAppToolNode.js +0 -29
  75. package/dist/nodes/addAppToolNode.js.map +0 -1
  76. package/dist/nodes/callTool.d.ts +0 -10
  77. package/dist/nodes/callTool.js +0 -57
  78. package/dist/nodes/callTool.js.map +0 -1
  79. package/dist/nodes/toolNodeRunner.d.ts +0 -15
  80. package/dist/nodes/toolNodeRunner.js +0 -79
  81. package/dist/nodes/toolNodeRunner.js.map +0 -1
  82. package/dist/tools/appToolRunner.d.ts +0 -30
  83. package/dist/tools/appToolRunner.js +0 -35
  84. package/dist/tools/appToolRunner.js.map +0 -1
  85. package/dist/tools/parser.d.ts +0 -14
  86. package/dist/tools/parser.js +0 -17
  87. package/dist/tools/parser.js.map +0 -1
  88. package/dist/tools/triggerTypeToDefaultMessage.d.ts +0 -3
  89. package/dist/tools/triggerTypeToDefaultMessage.js +0 -10
  90. package/dist/tools/triggerTypeToDefaultMessage.js.map +0 -1
  91. package/docs/.gitbook/assets/image.png +0 -0
  92. package/docs/README.md +0 -51
  93. package/docs/SUMMARY.md +0 -23
  94. package/docs/api-reference/.nojekyll +0 -1
  95. package/docs/api-reference/assets/hierarchy.js +0 -1
  96. package/docs/api-reference/assets/highlight.css +0 -120
  97. package/docs/api-reference/assets/icons.js +0 -18
  98. package/docs/api-reference/assets/icons.svg +0 -1
  99. package/docs/api-reference/assets/main.js +0 -60
  100. package/docs/api-reference/assets/navigation.js +0 -1
  101. package/docs/api-reference/assets/search.js +0 -1
  102. package/docs/api-reference/assets/style.css +0 -1640
  103. package/docs/api-reference/classes/index.Agent.html +0 -4
  104. package/docs/api-reference/enums/index.EdgeType.html +0 -4
  105. package/docs/api-reference/enums/index.NodeType.html +0 -6
  106. package/docs/api-reference/enums/index.TriggerType.html +0 -4
  107. package/docs/api-reference/enums/index.events.html +0 -3
  108. package/docs/api-reference/hierarchy.html +0 -1
  109. package/docs/api-reference/index.html +0 -310
  110. package/docs/api-reference/interfaces/index.AppToolNode.html +0 -5
  111. package/docs/api-reference/interfaces/index.AppTriggerNode.html +0 -6
  112. package/docs/api-reference/interfaces/index.Flow.html +0 -4
  113. package/docs/api-reference/interfaces/index.JunctionNode.html +0 -4
  114. package/docs/api-reference/interfaces/index.LogicalConditionEdge.html +0 -5
  115. package/docs/api-reference/interfaces/index.ManualTriggerNode.html +0 -5
  116. package/docs/api-reference/interfaces/index.PromptConditionEdge.html +0 -5
  117. package/docs/api-reference/interfaces/index.PromptNode.html +0 -6
  118. package/docs/api-reference/interfaces/index.StepForwardEdge.html +0 -4
  119. package/docs/api-reference/interfaces/index.Tool.html +0 -6
  120. package/docs/api-reference/interfaces/index.ToolNode.html +0 -5
  121. package/docs/api-reference/modules/index-1.html +0 -1
  122. package/docs/api-reference/modules/index.html +0 -1
  123. package/docs/api-reference/modules.html +0 -1
  124. package/docs/api-reference/types/index.Edge.html +0 -1
  125. package/docs/api-reference/types/index.Node.html +0 -1
  126. package/docs/api-reference/types/index.TriggerNode.html +0 -1
  127. package/docs/core-concepts/edges.md +0 -299
  128. package/docs/core-concepts/events.md +0 -165
  129. package/docs/core-concepts/flows.md +0 -74
  130. package/docs/core-concepts/memory-types.md +0 -208
  131. package/docs/core-concepts/nodes.md +0 -257
  132. package/docs/core-concepts/tools.md +0 -225
  133. package/docs/core-concepts/triggers.md +0 -87
  134. package/docs/examples/order-refund-flow.md +0 -560
  135. package/docs/getting-started/environment-configuration.md +0 -117
  136. package/docs/getting-started/installation.md +0 -40
  137. package/docs/getting-started/quick-start.md +0 -264
  138. package/docs-structure.md +0 -144
  139. package/eslint.config.js +0 -68
  140. package/examples/orderRefundAgent/flows/orderRefundFlow.yaml +0 -26
  141. package/examples/orderRefundAgent/minded.json +0 -10
  142. package/examples/orderRefundAgent/orderRefundAgent.ts +0 -64
  143. package/examples/orderRefundAgent/schema.ts +0 -7
  144. package/examples/orderRefundAgent/tools/escalateConversation.ts +0 -28
  145. package/examples/orderRefundAgent/tools/index.ts +0 -4
  146. package/examples/orderRefundAgent/tools/refundOrder.ts +0 -27
  147. package/test/can-stay-on-node/can-stay-on-node.test.ts +0 -154
  148. package/test/can-stay-on-node/flows/test-flow.yaml +0 -25
  149. package/test/cannot-stay-on-node/cannot-stay-on-node.test.ts +0 -209
  150. package/test/cannot-stay-on-node/flows/test-flow.yaml +0 -34
  151. package/test/checkpoint-saver/minded-checkpoint-saver-list.test.ts +0 -140
  152. package/test/checkpoint-saver/minded-checkpoint-saver.test.ts +0 -100
  153. package/test/edge-priority/edge-priority.test.ts +0 -182
  154. package/test/edge-priority/flows/all-three-edges/test-flow.yaml +0 -35
  155. package/test/edge-priority/flows/logical-prompt-edges/test-flow.yaml +0 -26
  156. package/test/edge-priority/flows/stepforward-logical-edges/test-flow.yaml +0 -25
  157. package/test/edge-priority/flows/stepforward-prompt-edges/test-flow.yaml +0 -25
  158. package/test/human-in-the-loop-node/flows/test-flow.yaml +0 -23
  159. package/test/human-in-the-loop-node/human-in-the-loop-node.test.ts +0 -94
  160. package/test/logical-edges/flows/logical-edge-test-flow.yaml +0 -24
  161. package/test/logical-edges/logical-edges.test.ts +0 -68
  162. package/test/no-human-in-the-loop-node/flows/test-flow.yaml +0 -23
  163. package/test/no-human-in-the-loop-node/no-human-in-the-loop-node.test.ts +0 -81
  164. package/test/prompt-edges/flows/test-flow.yaml +0 -24
  165. package/test/prompt-edges/prompt-edges.test.ts +0 -92
  166. package/test/prompt-node/flows/test-flow.yaml +0 -24
  167. package/test/prompt-node/prompt-node.test.ts +0 -88
  168. package/test/setup.ts +0 -5
  169. package/test/tool-node/flows/test-flow.yaml +0 -14
  170. package/test/tool-node/tool-node.test.ts +0 -68
  171. package/test/trigger/flows/test-flow.yaml +0 -7
  172. package/test/trigger/trigger.test.ts +0 -185
  173. package/tsconfig.json +0 -17
@@ -1,8 +0,0 @@
1
- import { BaseLanguageModel } from "@langchain/core/language_models/base";
2
- import { AppToolNode } from "../types/Flows.types";
3
- import { PreCompiledGraph } from "../types/LangGraph.types";
4
- export declare const addAppToolNode: ({ graph, node, llm, }: {
5
- graph: PreCompiledGraph;
6
- node: AppToolNode;
7
- llm: BaseLanguageModel;
8
- }) => void;
@@ -1,29 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.addAppToolNode = void 0;
7
- const actionRunnerTool_1 = __importDefault(require("./actionRunnerTool"));
8
- const appActionRunnerTool_1 = require("../internalTools/appActionRunnerTool");
9
- const addAppToolNode = ({ graph, node, llm, }) => {
10
- const appRunnerTool = (0, appActionRunnerTool_1.getAppActionRunnerTool)(node.appName, node.metadata.name);
11
- const addedPrompt = `
12
- You are executing the app tool "${node.appName}" with action "${node.metadata.name}".
13
- The tool requires the following parameters:
14
- ${node.metadata.schema.map(param => `
15
- - ${param.name} (${param.type}): ${param.description}
16
- ${param.example ? `Example: ${param.example}` : ''}
17
- ${param.enum ? `Allowed values: ${param.enum.join(', ')}` : ''}
18
- ${param.items ? `Array items type: ${param.items.type}` : ''}
19
- `).join('\n')}
20
-
21
- Please analyze the conversation context and workflow memory to determine the appropriate values for these parameters.
22
- Ensure all required parameters are provided and values match the specified types and constraints.
23
- If any parameter is unclear from the context, ask for clarification.
24
- `;
25
- const callback = (0, actionRunnerTool_1.default)(appRunnerTool, node, llm, addedPrompt);
26
- graph.addNode(node.name, callback);
27
- };
28
- exports.addAppToolNode = addAppToolNode;
29
- //# sourceMappingURL=addAppToolNode.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"addAppToolNode.js","sourceRoot":"","sources":["../../src/nodes/addAppToolNode.ts"],"names":[],"mappings":";;;;;;AAIA,0EAAkD;AAClD,8EAA8E;AAEvE,MAAM,cAAc,GAAG,CAAC,EAC3B,KAAK,EACL,IAAI,EACJ,GAAG,GAKN,EAAE,EAAE;IACD,MAAM,aAAa,GAAG,IAAA,4CAAsB,EAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC/E,MAAM,WAAW,GAAG;kCACU,IAAI,CAAC,OAAO,kBAAkB,IAAI,CAAC,QAAQ,CAAC,IAAI;;EAEhF,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;IAChC,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,MAAM,KAAK,CAAC,WAAW;IAChD,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,YAAY,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE;IAChD,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,mBAAmB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE;IAC5D,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,qBAAqB,KAAK,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE;CAC7D,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;;;;;CAKZ,CAAA;IACG,MAAM,QAAQ,GAAiB,IAAA,0BAAgB,EAAC,aAAa,EAAE,IAAI,EAAE,GAAG,EAAE,WAAW,CAAC,CAAC;IACvF,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AACvC,CAAC,CAAC;AA1BW,QAAA,cAAc,kBA0BzB"}
@@ -1,10 +0,0 @@
1
- import { BaseLanguageModel } from "@langchain/core/language_models/base";
2
- import { ToolNode } from "../types/Flows.types";
3
- import { Tool } from "@langchain/core/tools";
4
- import { PreCompiledGraph } from "../types/LangGraph.types";
5
- export declare const callToolRunner: (tool: Tool, toolNode: ToolNode, { graph, node, tools, llm }: {
6
- graph: PreCompiledGraph;
7
- node: ToolNode;
8
- tools: Tool[];
9
- llm: BaseLanguageModel;
10
- }) => void;
@@ -1,57 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.callToolRunner = void 0;
4
- const prebuilt_1 = require("@langchain/langgraph/prebuilt");
5
- // export const callToolRunner = (toolNode: ToolNode) => {
6
- // return async (input: any) => {
7
- // console.log(`Calling tool ${toolNode.name} with input ${JSON.stringify(input)}`);
8
- // };
9
- // };
10
- const callToolRunner = (tool, toolNode, { graph, node, tools, llm }) => {
11
- const callback = async (state) => {
12
- try {
13
- console.log(`Executing tool node ${toolNode.name}`);
14
- const executeWrapper = async (input) => {
15
- try {
16
- const response = await toolNode.execute({ input, memory: state.memory, triggerInvocations: state.triggerInvocations });
17
- return response || {};
18
- }
19
- catch (error) {
20
- console.error('Error executing tool', error);
21
- throw error;
22
- }
23
- };
24
- const tool = langchainTool(executeWrapper, {
25
- name: toolNode.name,
26
- description: toolNode.description,
27
- schema: toolNode.input,
28
- });
29
- const prompt = `
30
- Context:
31
- messages: ${JSON.stringify(state.messages)}
32
- workflow memory: ${JSON.stringify(state.memory)}
33
- Instructions:
34
- Call immediately tool ${tool.name}(...)
35
- ${toolNode.prompt && `Tool execution instructions: ${toolNode.prompt}`}
36
- `;
37
- const toolCallingAgent = (0, prebuilt_1.createReactAgent)({
38
- llm,
39
- tools: [tool],
40
- });
41
- const response = await toolCallingAgent.invoke({ messages: [new SystemMessage(prompt)] });
42
- const toolCallMessage = getLastToolCallMessage(response.messages);
43
- const toolResponseMessage = getLastToolMessage(response.messages);
44
- if (!toolCallMessage || !toolResponseMessage) {
45
- throw new Error('Tool call or tool response message not found');
46
- }
47
- const toolMemory = extractToolMemoryResponse(toolResponseMessage);
48
- return { memory: toolMemory, messages: [toolCallMessage, toolResponseMessage], triggerInvocations: state.triggerInvocations };
49
- }
50
- catch (error) {
51
- console.error('Error executing tool node', error);
52
- throw error;
53
- }
54
- };
55
- };
56
- exports.callToolRunner = callToolRunner;
57
- //# sourceMappingURL=callTool.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"callTool.js","sourceRoot":"","sources":["../../src/nodes/callTool.ts"],"names":[],"mappings":";;;AAIA,4DAAiE;AAGjE,0DAA0D;AAC1D,mCAAmC;AACnC,wFAAwF;AACxF,OAAO;AACP,KAAK;AAEE,MAAM,cAAc,GAAG,CAAC,IAAU,EAAE,QAAkB,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,EAAsF,EAAE,EAAE;IAC9K,MAAM,QAAQ,GAAiB,KAAK,EAAE,KAAmC,EAAE,EAAE;QACzE,IAAI,CAAC;YACD,OAAO,CAAC,GAAG,CAAC,uBAAuB,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;YAEpD,MAAM,cAAc,GAAG,KAAK,EAAE,KAAqC,EAAE,EAAE;gBACnE,IAAI,CAAC;oBACD,MAAM,QAAQ,GAAG,MAAM,QAAQ,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,kBAAkB,EAAE,KAAK,CAAC,kBAAkB,EAAE,CAAC,CAAC;oBACvH,OAAO,QAAQ,IAAI,EAAE,CAAC;gBAC1B,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACb,OAAO,CAAC,KAAK,CAAC,sBAAsB,EAAE,KAAK,CAAC,CAAC;oBAC7C,MAAM,KAAK,CAAC;gBAChB,CAAC;YACL,CAAC,CAAC;YACF,MAAM,IAAI,GAAG,aAAa,CAAC,cAAc,EAAE;gBACvC,IAAI,EAAE,QAAQ,CAAC,IAAI;gBACnB,WAAW,EAAE,QAAQ,CAAC,WAAW;gBACjC,MAAM,EAAE,QAAQ,CAAC,KAAK;aACzB,CAAC,CAAC;YACH,MAAM,MAAM,GAAG;;oBAEP,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC;2BACvB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC;;gCAEvB,IAAI,CAAC,IAAI;UAC/B,QAAQ,CAAC,MAAM,IAAI,gCAAgC,QAAQ,CAAC,MAAM,EAAE;OACvE,CAAC;YACI,MAAM,gBAAgB,GAAG,IAAA,2BAAgB,EAAC;gBACtC,GAAG;gBACH,KAAK,EAAE,CAAC,IAAI,CAAC;aAChB,CAAC,CAAC;YACH,MAAM,QAAQ,GAAG,MAAM,gBAAgB,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC,IAAI,aAAa,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC;YAC1F,MAAM,eAAe,GAAG,sBAAsB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YAClE,MAAM,mBAAmB,GAAG,kBAAkB,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;YAClE,IAAI,CAAC,eAAe,IAAI,CAAC,mBAAmB,EAAE,CAAC;gBAC3C,MAAM,IAAI,KAAK,CAAC,8CAA8C,CAAC,CAAC;YACpE,CAAC;YACD,MAAM,UAAU,GAAG,yBAAyB,CAAS,mBAAmB,CAAC,CAAC;YAC1E,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAAQ,EAAE,CAAC,eAAe,EAAE,mBAAmB,CAAC,EAAE,kBAAkB,EAAE,KAAK,CAAC,kBAAkB,EAAE,CAAC;QAClI,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACb,OAAO,CAAC,KAAK,CAAC,2BAA2B,EAAE,KAAK,CAAC,CAAC;YAClD,MAAM,KAAK,CAAC;QAChB,CAAC;IACL,CAAC,CAAC;AACN,CAAC,CAAC;AA5CW,QAAA,cAAc,kBA4CzB"}
@@ -1,15 +0,0 @@
1
- import { BaseLanguageModel } from "@langchain/core/language_models/base";
2
- import { AppToolNode, ToolNode } from "../types/Flows.types";
3
- import { Tool } from "../types/Tools.types";
4
- import { stateAnnotation } from "../types/LangGraph.types";
5
- import { BaseMessage } from "@langchain/core/messages";
6
- import { ToolMessage } from "@langchain/core/messages";
7
- export declare const getToolNodeRunner: <Memory>(toolNode: ToolNode | AppToolNode, matchedTool: Tool<any, any>, llm: BaseLanguageModel) => (state: typeof stateAnnotation.State) => Promise<{
8
- memory: Partial<Memory>;
9
- messages: (BaseMessage | ToolMessage)[];
10
- triggerInvocations: {
11
- appName: string;
12
- triggerName: string;
13
- triggerBody: any;
14
- }[];
15
- }>;
@@ -1,79 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getToolNodeRunner = void 0;
4
- const tools_1 = require("@langchain/core/tools");
5
- const messages_1 = require("@langchain/core/messages");
6
- const prebuilt_1 = require("@langchain/langgraph/prebuilt");
7
- const langgraph_1 = require("@langchain/langgraph");
8
- const uuid_1 = require("uuid");
9
- const getToolNodeRunner = (toolNode, matchedTool, llm) => {
10
- return async (state) => {
11
- try {
12
- console.log(`Executing tool node ${toolNode.name}`);
13
- const executeWrapper = async (input) => {
14
- try {
15
- const response = await matchedTool.execute({ input, memory: state.memory, triggerInvocations: state.triggerInvocations });
16
- return response || {};
17
- }
18
- catch (error) {
19
- console.error('Error executing tool', error);
20
- throw error;
21
- }
22
- };
23
- const tool = (0, tools_1.tool)(executeWrapper, {
24
- name: matchedTool.name,
25
- description: matchedTool.description,
26
- schema: matchedTool.input,
27
- });
28
- const prompt = `
29
- Context:
30
- messages: ${JSON.stringify(state.messages)}
31
- workflow memory: ${JSON.stringify(state.memory)}
32
- Instructions:
33
- Call immediately tool ${tool.name}(...)
34
- ${toolNode.prompt && `Tool execution instructions: ${toolNode.prompt}`}
35
- `;
36
- const toolCallingAgent = (0, prebuilt_1.createReactAgent)({
37
- checkpointer: new langgraph_1.MemorySaver(),
38
- llm,
39
- tools: [tool],
40
- });
41
- const response = await toolCallingAgent.invoke({ messages: [new messages_1.SystemMessage(prompt)] }, { configurable: { thread_id: (0, uuid_1.v4)() } });
42
- const toolCallMessage = getLastToolCallMessage(response.messages);
43
- const toolResponseMessage = getLastToolMessage(response.messages);
44
- if (!toolCallMessage || !toolResponseMessage) {
45
- throw new Error('Tool call or tool response message not found');
46
- }
47
- const toolMemory = extractToolMemoryResponse(toolResponseMessage);
48
- return { memory: toolMemory, messages: [toolCallMessage, toolResponseMessage], triggerInvocations: state.triggerInvocations };
49
- }
50
- catch (error) {
51
- console.error('Error executing tool node', error);
52
- throw error;
53
- }
54
- };
55
- };
56
- exports.getToolNodeRunner = getToolNodeRunner;
57
- const getLastToolCallMessage = (messages) => {
58
- const toolCallMessages = messages.filter((message) => { var _a; return ((_a = message.tool_calls) === null || _a === void 0 ? void 0 : _a.length) || 0 > 0; });
59
- const lastToolCallMessage = toolCallMessages[toolCallMessages.length - 1];
60
- return lastToolCallMessage;
61
- };
62
- const getLastToolMessage = (messages) => {
63
- const toolMessages = messages.filter((message) => message.getType() === 'tool');
64
- const lastToolMessage = toolMessages[toolMessages.length - 1];
65
- return lastToolMessage;
66
- };
67
- const extractToolMemoryResponse = (toolMessage) => {
68
- try {
69
- const parsed = JSON.parse(toolMessage.content);
70
- if (typeof parsed === 'object' && parsed !== null && 'memory' in parsed) {
71
- return parsed.memory;
72
- }
73
- }
74
- catch (error) {
75
- console.error('Error parsing tool memory response', error);
76
- }
77
- return {};
78
- };
79
- //# sourceMappingURL=toolNodeRunner.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"toolNodeRunner.js","sourceRoot":"","sources":["../../src/nodes/toolNodeRunner.ts"],"names":[],"mappings":"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"}
@@ -1,30 +0,0 @@
1
- import { z } from "zod";
2
- import { Tool } from "../types/Tools.types";
3
- declare const schema: z.ZodObject<{
4
- appName: z.ZodString;
5
- actionName: z.ZodString;
6
- parameters: z.ZodRecord<z.ZodString, z.ZodString>;
7
- }, "strip", z.ZodTypeAny, {
8
- appName: string;
9
- actionName: string;
10
- parameters: Record<string, string>;
11
- }, {
12
- appName: string;
13
- actionName: string;
14
- parameters: Record<string, string>;
15
- }>;
16
- declare const memorySchema: z.ZodObject<{
17
- appName: z.ZodString;
18
- actionName: z.ZodString;
19
- output: z.ZodAny;
20
- }, "strip", z.ZodTypeAny, {
21
- appName: string;
22
- actionName: string;
23
- output?: any;
24
- }, {
25
- appName: string;
26
- actionName: string;
27
- output?: any;
28
- }>;
29
- export declare const appToolRunnerTool: Tool<typeof schema, typeof memorySchema>;
30
- export {};
@@ -1,35 +0,0 @@
1
- "use strict";
2
- // import { z } from 'zod';
3
- // import memorySchema from '../src/schema';
4
- // import { Tool } from '@minded-ai/mindedjs';
5
- // type Memory = z.infer<typeof memorySchema>;
6
- Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.appToolRunnerTool = void 0;
8
- const zod_1 = require("zod");
9
- const schema = zod_1.z.object({
10
- appName: zod_1.z.string(),
11
- actionName: zod_1.z.string(),
12
- parameters: zod_1.z.record(zod_1.z.string(), zod_1.z.string()),
13
- });
14
- const memorySchema = zod_1.z.object({
15
- appName: zod_1.z.string(),
16
- actionName: zod_1.z.string(),
17
- output: zod_1.z.any(),
18
- });
19
- exports.appToolRunnerTool = {
20
- name: 'appToolRunner',
21
- description: 'Run an app tool',
22
- input: schema,
23
- execute: async ({ input, memory }) => {
24
- console.log("will run app tool", input, memory);
25
- // call server to run the app tool
26
- return {
27
- // memory: {
28
- // issue: input.issue,
29
- // orderId: input.orderId,
30
- // customerName: input.customerName,
31
- // },
32
- };
33
- },
34
- };
35
- //# sourceMappingURL=appToolRunner.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"appToolRunner.js","sourceRoot":"","sources":["../../src/tools/appToolRunner.ts"],"names":[],"mappings":";AAAA,2BAA2B;AAC3B,4CAA4C;AAC5C,8CAA8C;AAC9C,8CAA8C;;;AAE9C,6BAAwB;AAGxB,MAAM,MAAM,GAAG,OAAC,CAAC,MAAM,CAAC;IACpB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;IACnB,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;IACtB,UAAU,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,MAAM,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC;CAC/C,CAAC,CAAC;AAEH,MAAM,YAAY,GAAG,OAAC,CAAC,MAAM,CAAC;IAC1B,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;IACnB,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;IACtB,MAAM,EAAE,OAAC,CAAC,GAAG,EAAE;CAClB,CAAC,CAAC;AAEU,QAAA,iBAAiB,GAA6C;IACvE,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,iBAAiB;IAC9B,KAAK,EAAE,MAAM;IACb,OAAO,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE;QACjC,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,KAAK,EAAE,MAAM,CAAC,CAAC;QAChD,kCAAkC;QAClC,OAAO;QACH,YAAY;QACZ,0BAA0B;QAC1B,8BAA8B;QAC9B,wCAAwC;QACxC,KAAK;SACR,CAAC;IACN,CAAC;CACJ,CAAC"}
@@ -1,14 +0,0 @@
1
- export declare class ToolParser {
2
- qualify({ name, payload }: {
3
- name: string;
4
- payload: any;
5
- }): Promise<boolean>;
6
- transform({ name, payload }: {
7
- name: string;
8
- payload: any;
9
- }): Promise<any>;
10
- matchesTool({ name, source }: {
11
- name: string;
12
- source?: string;
13
- }): Promise<boolean>;
14
- }
@@ -1,17 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ToolParser = void 0;
4
- /* eslint-disable @typescript-eslint/no-unused-vars */
5
- class ToolParser {
6
- async qualify({ name, payload }) {
7
- return true;
8
- }
9
- async transform({ name, payload }) {
10
- return payload;
11
- }
12
- async matchesTool({ name, source }) {
13
- return false;
14
- }
15
- }
16
- exports.ToolParser = ToolParser;
17
- //# sourceMappingURL=parser.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"parser.js","sourceRoot":"","sources":["../../src/tools/parser.ts"],"names":[],"mappings":";;;AAAA,sDAAsD;AACtD,MAAa,UAAU;IACZ,KAAK,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,OAAO,EAAkC;QAClE,OAAO,IAAI,CAAC;IAChB,CAAC;IACM,KAAK,CAAC,SAAS,CAAC,EAAE,IAAI,EAAE,OAAO,EAAkC;QACpE,OAAO,OAAO,CAAA;IAClB,CAAC;IAEM,KAAK,CAAC,WAAW,CAAC,EAAE,IAAI,EAAE,MAAM,EAAqC;QACxE,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ;AAXD,gCAWC"}
@@ -1,3 +0,0 @@
1
- import { BaseMessage } from "@langchain/core/messages";
2
- declare const triggerTypeToDefaultMessage: Record<string, Record<string, (triggerBody: any) => Array<BaseMessage>>>;
3
- export default triggerTypeToDefaultMessage;
@@ -1,10 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const messages_1 = require("@langchain/core/messages");
4
- const triggerTypeToDefaultMessage = {
5
- ["Slack"]: {
6
- "New Direct Message (Instant)": (triggerBody) => [new messages_1.HumanMessage({ content: triggerBody.text })],
7
- }
8
- };
9
- exports.default = triggerTypeToDefaultMessage;
10
- //# sourceMappingURL=triggerTypeToDefaultMessage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"triggerTypeToDefaultMessage.js","sourceRoot":"","sources":["../../src/tools/triggerTypeToDefaultMessage.ts"],"names":[],"mappings":";;AAAA,uDAAqE;AAErE,MAAM,2BAA2B,GAA6E;IAC1G,CAAC,OAAO,CAAC,EAAE;QACP,8BAA8B,EAAE,CAAC,WAAgB,EAAE,EAAE,CAAC,CAAC,IAAI,uBAAY,CAAC,EAAE,OAAO,EAAE,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC;KAC1G;CACJ,CAAC;AAEF,kBAAe,2BAA2B,CAAC"}
Binary file
package/docs/README.md DELETED
@@ -1,51 +0,0 @@
1
- # Introduction
2
-
3
- Compose, run, and extend AI-first agents with a few lines of code.
4
-
5
- ***
6
-
7
- ## ✨ Why MindedJS?
8
-
9
- * **SDK with no-code platform** – Define Agent as Code or use the visual no-code editor on top.&#x20;
10
-
11
- <figure><img src=".gitbook/assets/image.png" alt=""><figcaption></figcaption></figure>
12
- * **Declarative flows** – Define complex, multi-step conversational flows.
13
- * **Type-safe tooling** – Tools & events are fully typed, giving you autocomplete and compile-time safety.
14
- * **Language-model agnostic** – Bring your own LLM model (OpenAI, Anthropic, Groq, …).
15
- * **Local-first** – Run fully in-memory for development and testing.
16
- * **Out of the box Integrations** - plug into 2000+ apps with a single click
17
-
18
- ***
19
-
20
-
21
-
22
- ## 🚀 Get Started
23
-
24
- Ready to build your first AI agent? Start with our [Quick Start Guide](getting-started/quick-start.md) to create a working agent in minutes.
25
-
26
- ### What You'll Learn
27
-
28
- 1. [**Installation**](getting-started/installation.md) - Set up MindedJS in your project
29
- 2. [**Quick Start**](getting-started/quick-start.md) - Build your first refund processing agent
30
- 3. [**Core Concepts**](core-concepts/flows.md) - Understand flows, nodes, edges, and memory
31
-
32
- ### Key Concepts
33
-
34
- * [**Flows**](core-concepts/flows.md) - Directed graphs of nodes connected by edges
35
- * [**Nodes**](core-concepts/nodes.md) - Processing units (triggers, prompts, tools, junctions)
36
- * [**Edges**](core-concepts/edges.md) - Routing logic between nodes
37
- * [**Tools**](core-concepts/tools.md) - Strongly-typed functions for LLMs to call
38
- * [**Memory**](core-concepts/memory-types.md) - Type-safe state management across your flow
39
-
40
- ***
41
-
42
- ## 📚 Documentation
43
-
44
- This documentation is organized to help you learn progressively:
45
-
46
- * **New to MindedJS?** Start with [Installation](getting-started/installation.md) and [Quick Start](getting-started/quick-start.md)
47
- * **Understanding concepts?** Explore [Core Concepts](core-concepts/flows.md)
48
- * **Ready to build?** Check out [Implementation Examples](implementation-examples/node-examples.md)
49
- * **Need reference?** Browse the [API Reference](api-reference/agent-class.md)
50
-
51
- Let's build something amazing! 🚀
package/docs/SUMMARY.md DELETED
@@ -1,23 +0,0 @@
1
- # Table of contents
2
-
3
- - [Introduction](README.md)
4
-
5
- ## Getting Started
6
-
7
- - [Installation](getting-started/installation.md)
8
- - [Environment Configuration](getting-started/environment-configuration.md)
9
- - [Quick Start](getting-started/quick-start.md)
10
-
11
- ## Core Concepts
12
-
13
- - [Memory](core-concepts/memory-types.md)
14
- - [Flows](core-concepts/flows.md)
15
- - [Nodes](core-concepts/nodes.md)
16
- - [Edges](core-concepts/edges.md)
17
- - [Tools](core-concepts/tools.md)
18
- - [Events](core-concepts/events.md)
19
- - [Triggers](core-concepts/triggers.md)
20
-
21
- ## Implementation Examples
22
-
23
- - [Order Refund Flow](examples/order-refund-flow.md)
@@ -1 +0,0 @@
1
- TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
@@ -1 +0,0 @@
1
- window.hierarchyData = "eJyrVirKzy8pVrKKjtVRKkpNy0lNLsnMzwMKVNfWAgCbHgqm"
@@ -1,120 +0,0 @@
1
- :root {
2
- --light-hl-0: #795E26;
3
- --dark-hl-0: #DCDCAA;
4
- --light-hl-1: #000000;
5
- --dark-hl-1: #D4D4D4;
6
- --light-hl-2: #A31515;
7
- --dark-hl-2: #CE9178;
8
- --light-hl-3: #0451A5;
9
- --dark-hl-3: #9CDCFE;
10
- --light-hl-4: #800000;
11
- --dark-hl-4: #569CD6;
12
- --light-hl-5: #0000FF;
13
- --dark-hl-5: #CE9178;
14
- --light-hl-6: #AF00DB;
15
- --dark-hl-6: #C586C0;
16
- --light-hl-7: #001080;
17
- --dark-hl-7: #9CDCFE;
18
- --light-hl-8: #0000FF;
19
- --dark-hl-8: #569CD6;
20
- --light-hl-9: #267F99;
21
- --dark-hl-9: #4EC9B0;
22
- --light-hl-10: #0070C1;
23
- --dark-hl-10: #4FC1FF;
24
- --light-hl-11: #000000FF;
25
- --dark-hl-11: #D4D4D4;
26
- --light-hl-12: #008000;
27
- --dark-hl-12: #6A9955;
28
- --light-hl-13: #098658;
29
- --dark-hl-13: #B5CEA8;
30
- --light-code-background: #FFFFFF;
31
- --dark-code-background: #1E1E1E;
32
- }
33
-
34
- @media (prefers-color-scheme: light) { :root {
35
- --hl-0: var(--light-hl-0);
36
- --hl-1: var(--light-hl-1);
37
- --hl-2: var(--light-hl-2);
38
- --hl-3: var(--light-hl-3);
39
- --hl-4: var(--light-hl-4);
40
- --hl-5: var(--light-hl-5);
41
- --hl-6: var(--light-hl-6);
42
- --hl-7: var(--light-hl-7);
43
- --hl-8: var(--light-hl-8);
44
- --hl-9: var(--light-hl-9);
45
- --hl-10: var(--light-hl-10);
46
- --hl-11: var(--light-hl-11);
47
- --hl-12: var(--light-hl-12);
48
- --hl-13: var(--light-hl-13);
49
- --code-background: var(--light-code-background);
50
- } }
51
-
52
- @media (prefers-color-scheme: dark) { :root {
53
- --hl-0: var(--dark-hl-0);
54
- --hl-1: var(--dark-hl-1);
55
- --hl-2: var(--dark-hl-2);
56
- --hl-3: var(--dark-hl-3);
57
- --hl-4: var(--dark-hl-4);
58
- --hl-5: var(--dark-hl-5);
59
- --hl-6: var(--dark-hl-6);
60
- --hl-7: var(--dark-hl-7);
61
- --hl-8: var(--dark-hl-8);
62
- --hl-9: var(--dark-hl-9);
63
- --hl-10: var(--dark-hl-10);
64
- --hl-11: var(--dark-hl-11);
65
- --hl-12: var(--dark-hl-12);
66
- --hl-13: var(--dark-hl-13);
67
- --code-background: var(--dark-code-background);
68
- } }
69
-
70
- :root[data-theme='light'] {
71
- --hl-0: var(--light-hl-0);
72
- --hl-1: var(--light-hl-1);
73
- --hl-2: var(--light-hl-2);
74
- --hl-3: var(--light-hl-3);
75
- --hl-4: var(--light-hl-4);
76
- --hl-5: var(--light-hl-5);
77
- --hl-6: var(--light-hl-6);
78
- --hl-7: var(--light-hl-7);
79
- --hl-8: var(--light-hl-8);
80
- --hl-9: var(--light-hl-9);
81
- --hl-10: var(--light-hl-10);
82
- --hl-11: var(--light-hl-11);
83
- --hl-12: var(--light-hl-12);
84
- --hl-13: var(--light-hl-13);
85
- --code-background: var(--light-code-background);
86
- }
87
-
88
- :root[data-theme='dark'] {
89
- --hl-0: var(--dark-hl-0);
90
- --hl-1: var(--dark-hl-1);
91
- --hl-2: var(--dark-hl-2);
92
- --hl-3: var(--dark-hl-3);
93
- --hl-4: var(--dark-hl-4);
94
- --hl-5: var(--dark-hl-5);
95
- --hl-6: var(--dark-hl-6);
96
- --hl-7: var(--dark-hl-7);
97
- --hl-8: var(--dark-hl-8);
98
- --hl-9: var(--dark-hl-9);
99
- --hl-10: var(--dark-hl-10);
100
- --hl-11: var(--dark-hl-11);
101
- --hl-12: var(--dark-hl-12);
102
- --hl-13: var(--dark-hl-13);
103
- --code-background: var(--dark-code-background);
104
- }
105
-
106
- .hl-0 { color: var(--hl-0); }
107
- .hl-1 { color: var(--hl-1); }
108
- .hl-2 { color: var(--hl-2); }
109
- .hl-3 { color: var(--hl-3); }
110
- .hl-4 { color: var(--hl-4); }
111
- .hl-5 { color: var(--hl-5); }
112
- .hl-6 { color: var(--hl-6); }
113
- .hl-7 { color: var(--hl-7); }
114
- .hl-8 { color: var(--hl-8); }
115
- .hl-9 { color: var(--hl-9); }
116
- .hl-10 { color: var(--hl-10); }
117
- .hl-11 { color: var(--hl-11); }
118
- .hl-12 { color: var(--hl-12); }
119
- .hl-13 { color: var(--hl-13); }
120
- pre, code { background: var(--code-background); }
@@ -1,18 +0,0 @@
1
- (function() {
2
- addIcons();
3
- function addIcons() {
4
- if (document.readyState === "loading") return document.addEventListener("DOMContentLoaded", addIcons);
5
- const svg = document.body.appendChild(document.createElementNS("http://www.w3.org/2000/svg", "svg"));
6
- svg.innerHTML = `<g id="icon-1" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-module)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">M</text></g><g id="icon-2" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-module)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">M</text></g><g id="icon-4" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-namespace)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">N</text></g><g id="icon-8" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-enum)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">E</text></g><g id="icon-16" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-32" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-variable)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">V</text></g><g id="icon-64" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">F</text></g><g id="icon-128" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-class)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">C</text></g><g id="icon-256" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-interface)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">I</text></g><g id="icon-512" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-constructor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">C</text></g><g id="icon-1024" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-2048" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-method)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">M</text></g><g id="icon-4096" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-function)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">F</text></g><g id="icon-8192" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-16384" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-constructor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">C</text></g><g id="icon-32768" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-property)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">P</text></g><g id="icon-65536" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">T</text></g><g id="icon-131072" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">T</text></g><g id="icon-262144" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-accessor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">A</text></g><g id="icon-524288" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-accessor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">A</text></g><g id="icon-1048576" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-accessor)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">A</text></g><g id="icon-2097152" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-type-alias)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">T</text></g><g id="icon-4194304" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-ts-reference)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="12"></rect><text fill="var(--color-icon-text)" x="50%" y="50%" dominant-baseline="central" text-anchor="middle">R</text></g><g id="icon-8388608" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-document)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><g stroke="var(--color-icon-text)" fill="none" stroke-width="1.5"><polygon points="6,5 6,19 18,19, 18,10 13,5"></polygon><line x1="9" y1="9" x2="13" y2="9"></line><line x1="9" y1="12" x2="15" y2="12"></line><line x1="9" y1="15" x2="15" y2="15"></line></g></g><g id="icon-folder" class="tsd-no-select"><rect fill="var(--color-icon-background)" stroke="var(--color-document)" stroke-width="1.5" x="1" y="1" width="22" height="22" rx="6"></rect><g stroke="var(--color-icon-text)" fill="none" stroke-width="1.5"><polygon points="5,5 10,5 12,8 19,8 19,18 5,18"></polygon></g></g><g id="icon-chevronDown" class="tsd-no-select"><path d="M4.93896 8.531L12 15.591L19.061 8.531L16.939 6.409L12 11.349L7.06098 6.409L4.93896 8.531Z" fill="var(--color-icon-text)"></path></g><g id="icon-chevronSmall" class="tsd-no-select"><path d="M1.5 5.50969L8 11.6609L14.5 5.50969L12.5466 3.66086L8 7.96494L3.45341 3.66086L1.5 5.50969Z" fill="var(--color-icon-text)"></path></g><g id="icon-checkbox" class="tsd-no-select"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></g><g id="icon-menu" class="tsd-no-select"><rect x="1" y="3" width="14" height="2" fill="var(--color-icon-text)"></rect><rect x="1" y="7" width="14" height="2" fill="var(--color-icon-text)"></rect><rect x="1" y="11" width="14" height="2" fill="var(--color-icon-text)"></rect></g><g id="icon-search" class="tsd-no-select"><path d="M15.7824 13.833L12.6666 10.7177C12.5259 10.5771 12.3353 10.499 12.1353 10.499H11.6259C12.4884 9.39596 13.001 8.00859 13.001 6.49937C13.001 2.90909 10.0914 0 6.50048 0C2.90959 0 0 2.90909 0 6.49937C0 10.0896 2.90959 12.9987 6.50048 12.9987C8.00996 12.9987 9.39756 12.4863 10.5008 11.6239V12.1332C10.5008 12.3332 10.5789 12.5238 10.7195 12.6644L13.8354 15.7797C14.1292 16.0734 14.6042 16.0734 14.8948 15.7797L15.7793 14.8954C16.0731 14.6017 16.0731 14.1267 15.7824 13.833ZM6.50048 10.499C4.29094 10.499 2.50018 8.71165 2.50018 6.49937C2.50018 4.29021 4.28781 2.49976 6.50048 2.49976C8.71001 2.49976 10.5008 4.28708 10.5008 6.49937C10.5008 8.70852 8.71314 10.499 6.50048 10.499Z" fill="var(--color-icon-text)"></path></g><g id="icon-anchor" class="tsd-no-select"><g stroke-width="2" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"></path><path d="M10 14a3.5 3.5 0 0 0 5 0l4 -4a3.5 3.5 0 0 0 -5 -5l-.5 .5"></path><path d="M14 10a3.5 3.5 0 0 0 -5 0l-4 4a3.5 3.5 0 0 0 5 5l.5 -.5"></path></g></g><g id="icon-alertNote" class="tsd-no-select"><path fill="var(--color-alert-note)" d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8Zm8-6.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13ZM6.5 7.75A.75.75 0 0 1 7.25 7h1a.75.75 0 0 1 .75.75v2.75h.25a.75.75 0 0 1 0 1.5h-2a.75.75 0 0 1 0-1.5h.25v-2h-.25a.75.75 0 0 1-.75-.75ZM8 6a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></g><g id="icon-alertTip" class="tsd-no-select"><path fill="var(--color-alert-tip)" d="M8 1.5c-2.363 0-4 1.69-4 3.75 0 .984.424 1.625.984 2.304l.214.253c.223.264.47.556.673.848.284.411.537.896.621 1.49a.75.75 0 0 1-1.484.211c-.04-.282-.163-.547-.37-.847a8.456 8.456 0 0 0-.542-.68c-.084-.1-.173-.205-.268-.32C3.201 7.75 2.5 6.766 2.5 5.25 2.5 2.31 4.863 0 8 0s5.5 2.31 5.5 5.25c0 1.516-.701 2.5-1.328 3.259-.095.115-.184.22-.268.319-.207.245-.383.453-.541.681-.208.3-.33.565-.37.847a.751.751 0 0 1-1.485-.212c.084-.593.337-1.078.621-1.489.203-.292.45-.584.673-.848.075-.088.147-.173.213-.253.561-.679.985-1.32.985-2.304 0-2.06-1.637-3.75-4-3.75ZM5.75 12h4.5a.75.75 0 0 1 0 1.5h-4.5a.75.75 0 0 1 0-1.5ZM6 15.25a.75.75 0 0 1 .75-.75h2.5a.75.75 0 0 1 0 1.5h-2.5a.75.75 0 0 1-.75-.75Z"></path></g><g id="icon-alertImportant" class="tsd-no-select"><path fill="var(--color-alert-important)" d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v9.5A1.75 1.75 0 0 1 14.25 13H8.06l-2.573 2.573A1.458 1.458 0 0 1 3 14.543V13H1.75A1.75 1.75 0 0 1 0 11.25Zm1.75-.25a.25.25 0 0 0-.25.25v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25Zm7 2.25v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 9a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></g><g id="icon-alertWarning" class="tsd-no-select"><path fill="var(--color-alert-warning)" d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></g><g id="icon-alertCaution" class="tsd-no-select"><path fill="var(--color-alert-caution)" d="M4.47.22A.749.749 0 0 1 5 0h6c.199 0 .389.079.53.22l4.25 4.25c.141.14.22.331.22.53v6a.749.749 0 0 1-.22.53l-4.25 4.25A.749.749 0 0 1 11 16H5a.749.749 0 0 1-.53-.22L.22 11.53A.749.749 0 0 1 0 11V5c0-.199.079-.389.22-.53Zm.84 1.28L1.5 5.31v5.38l3.81 3.81h5.38l3.81-3.81V5.31L10.69 1.5ZM8 4a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 4Zm0 8a1 1 0 1 1 0-2 1 1 0 0 1 0 2Z"></path></g>`;
7
- svg.style.display = "none";
8
- if (location.protocol === "file:") updateUseElements();
9
- }
10
-
11
- function updateUseElements() {
12
- document.querySelectorAll("use").forEach(el => {
13
- if (el.getAttribute("href").includes("#icon-")) {
14
- el.setAttribute("href", el.getAttribute("href").replace(/.*#/, "#"));
15
- }
16
- });
17
- }
18
- })()