@minded-ai/mindedjs 2.0.36-beta.3 → 2.0.36-beta.4

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.
@@ -23,7 +23,8 @@ Trigger nodes are entry points that start your flows and initialize them with me
23
23
  ```yaml
24
24
  - type: trigger
25
25
  triggerType: manual
26
- name: Customer Support Request
26
+ name: customer-support-request
27
+ displayName: Customer Support Request
27
28
  ```
28
29
 
29
30
  #### App Trigger
@@ -31,7 +32,8 @@ Trigger nodes are entry points that start your flows and initialize them with me
31
32
  ```yaml
32
33
  - type: trigger
33
34
  triggerType: app
34
- name: Zendesk Ticket Created
35
+ name: zendesk-ticket-created
36
+ displayName: Zendesk Ticket Created
35
37
  appTriggerId: zendesk-new-ticket
36
38
  ```
37
39
 
@@ -40,7 +42,8 @@ Trigger nodes are entry points that start your flows and initialize them with me
40
42
  ```yaml
41
43
  - type: trigger
42
44
  triggerType: webhook
43
- name: Payment Failed Notification
45
+ name: payment-failed-notification
46
+ displayName: Payment Failed Notification
44
47
  ```
45
48
 
46
49
  ### Trigger Implementation
@@ -50,7 +53,7 @@ import { events } from 'mindedjs/src/index';
50
53
  import { HumanMessage } from '@langchain/core/messages';
51
54
 
52
55
  agent.on(events.TRIGGER_EVENT, async ({ triggerName, triggerBody }) => {
53
- if (triggerName === 'Customer Support Request') {
56
+ if (triggerName === 'customer-support-request') {
54
57
  return {
55
58
  memory: {
56
59
  customerQuery: triggerBody,
@@ -95,12 +98,14 @@ Prompt nodes process input through LLM to generate intelligent responses or invo
95
98
 
96
99
  ```yaml
97
100
  - type: promptNode
98
- name: Content Reviewer
101
+ name: content-reviewer
102
+ displayName: Content Reviewer
99
103
  prompt: 'Ask user to review the content and approve or request changes.'
100
104
  humanInTheLoop: true # Pause for human approval before proceeding
101
105
 
102
106
  - type: promptNode
103
- name: Research Assistant
107
+ name: research-assistant
108
+ displayName: Research Assistant
104
109
  prompt: 'Request user for more information until you have gathered all necessary information.'
105
110
  canStayOnNode: true # Allow iterative research until complete
106
111
  humanInTheLoop: true # Pause for human approval before proceeding
@@ -110,7 +115,8 @@ Prompt nodes process input through LLM to generate intelligent responses or invo
110
115
 
111
116
  ```yaml
112
117
  - type: promptNode
113
- name: Customer Service Agent
118
+ name: customer-service-agent
119
+ displayName: Customer Service Agent
114
120
  prompt: |
115
121
  You are a helpful customer service representative.
116
122
  Respond to customer inquiries professionally.
@@ -162,7 +168,8 @@ Tool nodes execute functions to perform actions like API calls or database queri
162
168
 
163
169
  ```yaml
164
170
  - type: tool
165
- name: Lookup Customer Order
171
+ name: lookup-customer-order
172
+ displayName: Lookup Customer Order
166
173
  toolName: lookupOrder
167
174
  ```
168
175
 
@@ -209,7 +216,8 @@ Junction nodes provide flow control without processing, useful for organizing ro
209
216
 
210
217
  ```yaml
211
218
  - type: junction
212
- name: Customer Routing Hub
219
+ name: customer-routing-hub
220
+ displayName: Customer Routing Hub
213
221
  ```
214
222
 
215
223
  ### Routing Example
@@ -217,20 +225,23 @@ Junction nodes provide flow control without processing, useful for organizing ro
217
225
  ```yaml
218
226
  nodes:
219
227
  - type: junction
220
- name: Route Customer Request
228
+ name: route-customer-request
229
+ displayName: Route Customer Request
221
230
  - type: promptNode
222
- name: VIP Support
231
+ name: vip-support
232
+ displayName: VIP Support
223
233
  - type: promptNode
224
- name: Standard Support
234
+ name: standard-support
235
+ displayName: Standard Support
225
236
 
226
237
  edges:
227
- - source: Route Customer Request
228
- target: VIP Support
238
+ - source: route-customer-request
239
+ target: vip-support
229
240
  type: logicalCondition
230
241
  condition: "({ memory }) => memory.customerTier === 'premium'"
231
242
 
232
- - source: Route Customer Request
233
- target: Standard Support
243
+ - source: route-customer-request
244
+ target: standard-support
234
245
  type: logicalCondition
235
246
  condition: "({ memory }) => memory.customerTier === 'standard'"
236
247
  ```
@@ -243,8 +254,9 @@ Jump To nodes provide direct navigation to specific nodes, enabling flow transit
243
254
 
244
255
  ```yaml
245
256
  - type: jumpToNode
246
- name: Go To Order Processing
247
- targetNodeId: Process Customer Order
257
+ name: go-to-order-processing
258
+ displayName: Go To Order Processing
259
+ targetNodeId: process-customer-order
248
260
  ```
249
261
 
250
262
  ### Subflow Navigation
@@ -254,12 +266,14 @@ Jump To nodes are particularly useful for organizing complex workflows into mult
254
266
  ```yaml
255
267
  # Main flow
256
268
  - type: jumpToNode
257
- name: Jump To Refund Subflow
258
- targetNodeId: Refund Processing Trigger
269
+ name: jump-to-refund-subflow
270
+ displayName: Jump To Refund Subflow
271
+ targetNodeId: refund-processing-trigger
259
272
 
260
273
  # In refund subflow
261
274
  - type: trigger
262
- name: Refund Processing Trigger
275
+ name: refund-processing-trigger
276
+ displayName: Refund Processing Trigger
263
277
  triggerType: manual
264
278
  ```
265
279
 
@@ -269,27 +283,32 @@ Jump To nodes are particularly useful for organizing complex workflows into mult
269
283
  # flows/mainFlow.yaml
270
284
  nodes:
271
285
  - type: trigger
272
- name: Customer Request
286
+ name: customer-request
287
+ displayName: Customer Request
273
288
  triggerType: manual
274
289
 
275
290
  - type: promptNode
276
- name: Classify Request
291
+ name: classify-request
292
+ displayName: Classify Request
277
293
  prompt: |
278
294
  Classify the customer request as either 'refund' or 'support'.
279
295
  Customer message: {{messages.last.content}}
280
296
 
281
297
  - type: jumpToNode
282
- name: Go To Refund Flow
283
- targetNodeId: Refund Processor
298
+ name: go-to-refund-flow
299
+ displayName: Go To Refund Flow
300
+ targetNodeId: refund-processor
284
301
 
285
302
  # flows/refundFlow.yaml
286
303
  nodes:
287
304
  - type: trigger
288
- name: Refund Processor
305
+ name: refund-processor
306
+ displayName: Refund Processor
289
307
  triggerType: manual
290
308
 
291
309
  - type: tool
292
- name: Process Refund
310
+ name: process-refund
311
+ displayName: Process Refund
293
312
  toolName: processRefund
294
313
  ```
295
314
 
@@ -307,11 +326,13 @@ nodes:
307
326
  ```yaml
308
327
  # ✅ Good
309
328
  - type: promptNode
310
- name: Technical Support Specialist
329
+ name: technical-support-specialist
330
+ displayName: Technical Support Specialist
311
331
 
312
332
  # ❌ Avoid
313
333
  - type: promptNode
314
- name: Agent 1
334
+ name: agent-1
335
+ displayName: Agent 1
315
336
  ```
316
337
 
317
338
  ### Keep Prompts Focused
@@ -319,7 +340,8 @@ nodes:
319
340
  ```yaml
320
341
  # ✅ Good - Specific role and context
321
342
  - type: promptNode
322
- name: Order Refund Processor
343
+ name: order-refund-processor
344
+ displayName: Order Refund Processor
323
345
  prompt: |
324
346
  You process customer refund requests for e-commerce orders.
325
347
  Order ID: {{memory.orderId}}
@@ -327,7 +349,8 @@ nodes:
327
349
 
328
350
  # ❌ Avoid - Too broad
329
351
  - type: promptNode
330
- name: General Assistant
352
+ name: general-assistant
353
+ displayName: General Assistant
331
354
  prompt: 'Help the customer with anything they need'
332
355
  ```
333
356
 
@@ -339,7 +362,7 @@ Browser task nodes allow your agent to interact with web pages using AI-powered
339
362
 
340
363
  ```yaml
341
364
  - type: browserTask
342
- name: search_products
365
+ name: search-products
343
366
  displayName: Search Products
344
367
  prompt: 'Go to amazon.com and search for wireless headphones under $100'
345
368
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@minded-ai/mindedjs",
3
- "version": "2.0.36-beta.3",
3
+ "version": "2.0.36-beta.4",
4
4
  "description": "MindedJS is a TypeScript library for building agents.",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",