@minded-ai/mindedjs 3.1.44 → 3.1.46
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/nodes/addAppToolNode.d.ts.map +1 -1
- package/dist/nodes/addAppToolNode.js +2 -15
- package/dist/nodes/addAppToolNode.js.map +1 -1
- package/dist/nodes/addBrowserTaskNode.d.ts.map +1 -1
- package/dist/nodes/addBrowserTaskNode.js +36 -16
- package/dist/nodes/addBrowserTaskNode.js.map +1 -1
- package/dist/nodes/addToolNode.d.ts.map +1 -1
- package/dist/nodes/addToolNode.js +4 -17
- package/dist/nodes/addToolNode.js.map +1 -1
- package/dist/nodes/compilePrompt.d.ts +10 -0
- package/dist/nodes/compilePrompt.d.ts.map +1 -1
- package/dist/nodes/compilePrompt.js +67 -21
- package/dist/nodes/compilePrompt.js.map +1 -1
- package/dist/toolsLibrary/browserSessionPersistence.d.ts.map +1 -1
- package/dist/toolsLibrary/browserSessionPersistence.js +27 -8
- package/dist/toolsLibrary/browserSessionPersistence.js.map +1 -1
- package/dist/types/Flows.types.d.ts +1 -0
- package/dist/types/Flows.types.d.ts.map +1 -1
- package/dist/types/Flows.types.js.map +1 -1
- package/docs/api/knowledge.md +73 -14
- package/docs/platform/knowledge-bases.md +14 -2
- package/docs/tooling/document-processing.md +16 -2
- package/package.json +14 -5
- package/src/nodes/addAppToolNode.ts +7 -16
- package/src/nodes/addBrowserTaskNode.ts +44 -18
- package/src/nodes/addToolNode.ts +10 -19
- package/src/nodes/compilePrompt.ts +69 -23
- package/src/toolsLibrary/browserSessionPersistence.ts +60 -12
- package/src/types/Flows.types.ts +1 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Flows.types.d.ts","sourceRoot":"","sources":["../../src/types/Flows.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,eA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AAY,iBAAiB;IAC3B,OAAO,YAAY;IACnB,iBAAiB,sBAAsB;IACvC,aAAa,kBAAkB;CAChC;AAED,oBAAY,mBAAmB;IAC7B,iBAAiB,oBAAoB;IACrC,QAAQ,aAAa;IACrB,gBAAgB,oBAAoB;CACrC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Flows.types.js","sourceRoot":"","sources":["../../src/types/Flows.types.ts"],"names":[],"mappings":";;;AAGA,IAAY,QAQX;AARD,WAAY,QAAQ;IAClB,+BAAmB,CAAA;IACnB,iCAAqB,CAAA;IACrB,yBAAa,CAAA;IACb,gCAAoB,CAAA;IACpB,sCAA0B,CAAA;IAC1B,uCAA2B,CAAA;IAC3B,wCAA4B,CAAA;AAC9B,CAAC,EARW,QAAQ,wBAAR,QAAQ,QAQnB;AAED,IAAY,QAIX;AAJD,WAAY,QAAQ;IAClB,kDAAsC,CAAA;IACtC,gDAAoC,CAAA;IACpC,wCAA4B,CAAA;AAC9B,CAAC,EAJW,QAAQ,wBAAR,QAAQ,QAInB;AAUD,IAAY,WAOX;AAPD,WAAY,WAAW;IACrB,0BAAW,CAAA;IACX,kCAAmB,CAAA;IACnB,gCAAiB,CAAA;IACjB,8BAAe,CAAA;IACf,sCAAuB,CAAA;IACvB,oCAAqB,CAAA;AACvB,CAAC,EAPW,WAAW,2BAAX,WAAW,QAOtB;
|
|
1
|
+
{"version":3,"file":"Flows.types.js","sourceRoot":"","sources":["../../src/types/Flows.types.ts"],"names":[],"mappings":";;;AAGA,IAAY,QAQX;AARD,WAAY,QAAQ;IAClB,+BAAmB,CAAA;IACnB,iCAAqB,CAAA;IACrB,yBAAa,CAAA;IACb,gCAAoB,CAAA;IACpB,sCAA0B,CAAA;IAC1B,uCAA2B,CAAA;IAC3B,wCAA4B,CAAA;AAC9B,CAAC,EARW,QAAQ,wBAAR,QAAQ,QAQnB;AAED,IAAY,QAIX;AAJD,WAAY,QAAQ;IAClB,kDAAsC,CAAA;IACtC,gDAAoC,CAAA;IACpC,wCAA4B,CAAA;AAC9B,CAAC,EAJW,QAAQ,wBAAR,QAAQ,QAInB;AAUD,IAAY,WAOX;AAPD,WAAY,WAAW;IACrB,0BAAW,CAAA;IACX,kCAAmB,CAAA;IACnB,gCAAiB,CAAA;IACjB,8BAAe,CAAA;IACf,sCAAuB,CAAA;IACvB,oCAAqB,CAAA;AACvB,CAAC,EAPW,WAAW,2BAAX,WAAW,QAOtB;AAwJD,IAAY,aASX;AATD,WAAY,aAAa;IACvB,gCAAe,CAAA;IACf,8BAAa,CAAA;IACb,8BAAa,CAAA;IACb,0CAAyB,CAAA;IACzB,kCAAiB,CAAA;IACjB,gCAAe,CAAA;IACf,8BAAa,CAAA;IACb,8CAA6B,CAAA;AAC/B,CAAC,EATW,aAAa,6BAAb,aAAa,QASxB;AAgGD,IAAY,mBAEX;AAFD,WAAY,mBAAmB;IAC7B,2CAAoB,CAAA;AACtB,CAAC,EAFW,mBAAmB,mCAAnB,mBAAmB,QAE9B;AAsBD,IAAY,oBAQX;AARD,WAAY,oBAAoB;IAC9B,yCAAiB,CAAA;IACjB,yCAAiB,CAAA;IACjB,2CAAmB,CAAA;IACnB,2CAAmB,CAAA;IACnB,uCAAe,CAAA;IACf,yCAAiB,CAAA;IACjB,mCAAW,CAAA;AACb,CAAC,EARW,oBAAoB,oCAApB,oBAAoB,QAQ/B;AASD,IAAY,iBAIX;AAJD,WAAY,iBAAiB;IAC3B,wCAAmB,CAAA;IACnB,4DAAuC,CAAA;IACvC,oDAA+B,CAAA;AACjC,CAAC,EAJW,iBAAiB,iCAAjB,iBAAiB,QAI5B;AAED,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,4DAAqC,CAAA;IACrC,4CAAqB,CAAA;IACrB,2DAAoC,CAAA;AACtC,CAAC,EAJW,mBAAmB,mCAAnB,mBAAmB,QAI9B"}
|
package/docs/api/knowledge.md
CHANGED
|
@@ -84,6 +84,35 @@ Use labels to filter documents during retrieval (see [Knowledge Base RAG API](..
|
|
|
84
84
|
|
|
85
85
|
---
|
|
86
86
|
|
|
87
|
+
## Custom Metadata (customMeta1–4)
|
|
88
|
+
|
|
89
|
+
Documents also support up to **four free-form custom metadata fields** for attaching arbitrary string data.
|
|
90
|
+
|
|
91
|
+
- **`customMeta1`** through **`customMeta4`**: Any string value, no format restriction
|
|
92
|
+
|
|
93
|
+
```json
|
|
94
|
+
{
|
|
95
|
+
"customMeta1": "DOC-98765",
|
|
96
|
+
"customMeta2": "John Smith",
|
|
97
|
+
"customMeta3": "v2.1",
|
|
98
|
+
"customMeta4": "legal"
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
### Custom Metadata Requirements
|
|
103
|
+
|
|
104
|
+
- **Format**: Free-form string, any value is accepted
|
|
105
|
+
- **Max length**: 500 characters per field
|
|
106
|
+
- **Not filterable**: Custom metadata cannot be used as query filters (unlike `label1`/`label2`)
|
|
107
|
+
|
|
108
|
+
### How Custom Metadata is Returned
|
|
109
|
+
|
|
110
|
+
Custom metadata fields are returned in **every retrieved chunk** alongside the document's text. Consumers can read them from `result.metadata.minded_internal_meta1` through `result.metadata.minded_internal_meta4` in raw retrieval responses.
|
|
111
|
+
|
|
112
|
+
> **Tip**: Use custom metadata to attach source identifiers, version numbers, author names, or any context you want to surface alongside retrieved chunks — without the strict format requirements of filter labels.
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
87
116
|
## Endpoints
|
|
88
117
|
|
|
89
118
|
| Method | Endpoint | Description |
|
|
@@ -116,6 +145,10 @@ Generate a pre-signed URL to upload a new document.
|
|
|
116
145
|
| `fileName` | string | Yes | File name with extension (e.g., `policy.pdf`). If `.zip`, triggers batch import. |
|
|
117
146
|
| `label1` | string | No | Primary label in `namespace:value` format (e.g., `dept:support`) |
|
|
118
147
|
| `label2` | string | No | Secondary label in `namespace:value` format (e.g., `lang:en`) |
|
|
148
|
+
| `customMeta1` | string | No | Free-form custom metadata field 1 (max 500 chars) |
|
|
149
|
+
| `customMeta2` | string | No | Free-form custom metadata field 2 (max 500 chars) |
|
|
150
|
+
| `customMeta3` | string | No | Free-form custom metadata field 3 (max 500 chars) |
|
|
151
|
+
| `customMeta4` | string | No | Free-form custom metadata field 4 (max 500 chars) |
|
|
119
152
|
| `customDocumentId` | string | No | Your external identifier for this document |
|
|
120
153
|
|
|
121
154
|
### Request Example
|
|
@@ -128,6 +161,8 @@ Generate a pre-signed URL to upload a new document.
|
|
|
128
161
|
"fileName": "refund-policy.pdf",
|
|
129
162
|
"label1": "dept:support",
|
|
130
163
|
"label2": "lang:en",
|
|
164
|
+
"customMeta1": "DOC-98765",
|
|
165
|
+
"customMeta2": "John Smith",
|
|
131
166
|
"customDocumentId": "DOC-12345"
|
|
132
167
|
}
|
|
133
168
|
```
|
|
@@ -310,6 +345,10 @@ Generate a pre-signed URL to replace an existing document's content.
|
|
|
310
345
|
| `fileName` | string | Yes | New file name |
|
|
311
346
|
| `label1` | string | No | Updated primary label in `namespace:value` format |
|
|
312
347
|
| `label2` | string | No | Updated secondary label in `namespace:value` format |
|
|
348
|
+
| `customMeta1` | string | No | Free-form custom metadata field 1 (max 500 chars) |
|
|
349
|
+
| `customMeta2` | string | No | Free-form custom metadata field 2 (max 500 chars) |
|
|
350
|
+
| `customMeta3` | string | No | Free-form custom metadata field 3 (max 500 chars) |
|
|
351
|
+
| `customMeta4` | string | No | Free-form custom metadata field 4 (max 500 chars) |
|
|
313
352
|
|
|
314
353
|
> **Note**: Provide either `s3Key` or `customDocumentId`, not both.
|
|
315
354
|
|
|
@@ -323,7 +362,9 @@ Generate a pre-signed URL to replace an existing document's content.
|
|
|
323
362
|
"customDocumentId": "DOC-12345",
|
|
324
363
|
"fileName": "refund-policy-v2.pdf",
|
|
325
364
|
"label1": "dept:support",
|
|
326
|
-
"label2": "lang:en"
|
|
365
|
+
"label2": "lang:en",
|
|
366
|
+
"customMeta1": "DOC-98765",
|
|
367
|
+
"customMeta2": "John Smith"
|
|
327
368
|
}
|
|
328
369
|
```
|
|
329
370
|
|
|
@@ -384,7 +425,7 @@ Finalize document update and trigger reprocessing.
|
|
|
384
425
|
PATCH /knowledge/documents/metadata
|
|
385
426
|
```
|
|
386
427
|
|
|
387
|
-
Update document labels without re-uploading the file.
|
|
428
|
+
Update document labels and/or custom metadata without re-uploading the file.
|
|
388
429
|
|
|
389
430
|
### Request Body
|
|
390
431
|
|
|
@@ -397,6 +438,10 @@ Update document labels without re-uploading the file.
|
|
|
397
438
|
| `customDocumentId` | string | * | Your external document ID. Required if `s3Key` not provided. |
|
|
398
439
|
| `label1` | string | No | Updated primary label in `namespace:value` format |
|
|
399
440
|
| `label2` | string | No | Updated secondary label in `namespace:value` format |
|
|
441
|
+
| `customMeta1` | string | No | Updated free-form custom metadata field 1 (max 500 chars). Pass `null` to clear. |
|
|
442
|
+
| `customMeta2` | string | No | Updated free-form custom metadata field 2 (max 500 chars). Pass `null` to clear. |
|
|
443
|
+
| `customMeta3` | string | No | Updated free-form custom metadata field 3 (max 500 chars). Pass `null` to clear. |
|
|
444
|
+
| `customMeta4` | string | No | Updated free-form custom metadata field 4 (max 500 chars). Pass `null` to clear. |
|
|
400
445
|
|
|
401
446
|
### Request Example
|
|
402
447
|
|
|
@@ -407,7 +452,9 @@ Update document labels without re-uploading the file.
|
|
|
407
452
|
"knowledgeBaseId": "kb-abc123",
|
|
408
453
|
"s3Key": "agents/<agentId>/production/<kbId>/refund-policy.pdf",
|
|
409
454
|
"label1": "dept:support",
|
|
410
|
-
"label2": "status:reviewed"
|
|
455
|
+
"label2": "status:reviewed",
|
|
456
|
+
"customMeta1": "DOC-98765",
|
|
457
|
+
"customMeta2": "John Smith"
|
|
411
458
|
}
|
|
412
459
|
```
|
|
413
460
|
|
|
@@ -419,6 +466,10 @@ Update document labels without re-uploading the file.
|
|
|
419
466
|
"documentId": "document-uuid",
|
|
420
467
|
"label1": "dept:support",
|
|
421
468
|
"label2": "status:reviewed",
|
|
469
|
+
"customMeta1": "DOC-98765",
|
|
470
|
+
"customMeta2": "John Smith",
|
|
471
|
+
"customMeta3": null,
|
|
472
|
+
"customMeta4": null,
|
|
422
473
|
"updatedAt": "2026-01-16T14:00:00.000Z"
|
|
423
474
|
}
|
|
424
475
|
```
|
|
@@ -460,6 +511,10 @@ GET /knowledge/documents?agentId=your-agent-id&environment=production&knowledgeB
|
|
|
460
511
|
"fileSize": 204800,
|
|
461
512
|
"label1": "dept:support",
|
|
462
513
|
"label2": "lang:en",
|
|
514
|
+
"customMeta1": "DOC-98765",
|
|
515
|
+
"customMeta2": "John Smith",
|
|
516
|
+
"customMeta3": null,
|
|
517
|
+
"customMeta4": null,
|
|
463
518
|
"createdAt": "2026-01-15T12:00:00.000Z",
|
|
464
519
|
"updatedAt": "2026-01-16T14:00:00.000Z"
|
|
465
520
|
}
|
|
@@ -467,17 +522,21 @@ GET /knowledge/documents?agentId=your-agent-id&environment=production&knowledgeB
|
|
|
467
522
|
|
|
468
523
|
### Response Fields
|
|
469
524
|
|
|
470
|
-
| Field | Type
|
|
471
|
-
| ------------------ |
|
|
472
|
-
| `s3Key` | string
|
|
473
|
-
| `documentId` | string
|
|
474
|
-
| `status` | string
|
|
475
|
-
| `contentType` | string
|
|
476
|
-
| `fileSize` | number
|
|
477
|
-
| `label1` | string
|
|
478
|
-
| `label2` | string
|
|
479
|
-
| `
|
|
480
|
-
| `
|
|
525
|
+
| Field | Type | Description |
|
|
526
|
+
| ------------------ | ------------- | -------------------------------------------------------- |
|
|
527
|
+
| `s3Key` | string | Document path; use for subsequent operations |
|
|
528
|
+
| `documentId` | string | Document UUID (your `customDocumentId` if provided during upload, otherwise system-generated) |
|
|
529
|
+
| `status` | string | Processing status (see [Status Values](#document-status-values)) |
|
|
530
|
+
| `contentType` | string | MIME type of the document (e.g., `application/pdf`) |
|
|
531
|
+
| `fileSize` | number | File size in bytes |
|
|
532
|
+
| `label1` | string\|null | Primary label in `namespace:value` format |
|
|
533
|
+
| `label2` | string\|null | Secondary label in `namespace:value` format |
|
|
534
|
+
| `customMeta1` | string\|null | Free-form custom metadata field 1 |
|
|
535
|
+
| `customMeta2` | string\|null | Free-form custom metadata field 2 |
|
|
536
|
+
| `customMeta3` | string\|null | Free-form custom metadata field 3 |
|
|
537
|
+
| `customMeta4` | string\|null | Free-form custom metadata field 4 |
|
|
538
|
+
| `createdAt` | string | ISO 8601 creation timestamp |
|
|
539
|
+
| `updatedAt` | string | ISO 8601 last update timestamp |
|
|
481
540
|
|
|
482
541
|
---
|
|
483
542
|
|
|
@@ -27,7 +27,7 @@ Deleting a knowledge base removes it from the agent and triggers cleanup of its
|
|
|
27
27
|
|
|
28
28
|
## Upload and manage documents (UI)
|
|
29
29
|
|
|
30
|
-
From the knowledge base view, you can upload documents and set labels for filtering.
|
|
30
|
+
From the knowledge base view, you can upload documents and set labels and custom metadata for filtering and context enrichment.
|
|
31
31
|
|
|
32
32
|
### Document Labels
|
|
33
33
|
|
|
@@ -35,9 +35,21 @@ Each document supports two optional labels in `namespace:value` format:
|
|
|
35
35
|
- **label1**: Primary classification (e.g., `dept:support`, `topic:billing`)
|
|
36
36
|
- **label2**: Secondary classification (e.g., `lang:en`, `tier:premium`)
|
|
37
37
|
|
|
38
|
+
Labels can be used to **filter documents during retrieval** — only chunks from matching documents are returned.
|
|
39
|
+
|
|
40
|
+
### Custom Metadata
|
|
41
|
+
|
|
42
|
+
Each document also supports up to **four free-form custom metadata fields** (Custom Metadata 1–4). Unlike labels, these:
|
|
43
|
+
- Accept any string value (no namespace format required)
|
|
44
|
+
- Are limited to **500 characters** each
|
|
45
|
+
- Are **not filterable** — they cannot be used to restrict retrieval results
|
|
46
|
+
- Are **returned alongside every retrieved chunk** in the raw retrieval response
|
|
47
|
+
|
|
48
|
+
Use custom metadata to attach source identifiers, version numbers, author names, or other context you want available at retrieval time.
|
|
49
|
+
|
|
38
50
|
Typical flow:
|
|
39
51
|
|
|
40
|
-
- Upload a document (and optionally
|
|
52
|
+
- Upload a document (and optionally set labels and/or custom metadata)
|
|
41
53
|
- Wait for ingestion/sync to complete
|
|
42
54
|
- Use the platform “Query” / “Generate” actions to test retrieval and citations
|
|
43
55
|
|
|
@@ -24,6 +24,17 @@ DOCUMENT_PROCESSING_MODE=local
|
|
|
24
24
|
LLAMA_CLOUD_API_KEY=your_llama_cloud_api_key
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
+
## Document Quality
|
|
28
|
+
|
|
29
|
+
When using managed mode, you can control the quality of document parsing via the `quality` option. This maps to `DocumentQuality` exported from `@minded-ai/mindedjs`:
|
|
30
|
+
|
|
31
|
+
| Value | Credit cost | Description |
|
|
32
|
+
| ------------ | ----------- | ------------------------------------------------- |
|
|
33
|
+
| `'advanced'` | 3x | **Default.** High-quality OCR and parsing. Handles complex layouts, diagrams, images, scanned documents, and most document types with high accuracy. Recommended for production use. |
|
|
34
|
+
| `'standard'` | 1x | Faster processing, lower cost. Suitable for text-based documents. |
|
|
35
|
+
|
|
36
|
+
The `quality` option is available on both the `parseDocument` and `parseDocumentAndExtractStructuredData` functions, as well as on the `minded-parse-documents` flow node. It has no effect in local processing mode.
|
|
37
|
+
|
|
27
38
|
## Using in Flows
|
|
28
39
|
|
|
29
40
|
Document processing includes built-in AI extraction - use the node's `prompt` and `outputSchema` properties to specify what data to extract. No additional extraction tool is needed.
|
|
@@ -32,6 +43,7 @@ Document processing includes built-in AI extraction - use the node's `prompt` an
|
|
|
32
43
|
|
|
33
44
|
- `parameters.documentSource` (string or array, required): URL or file path to a single document, or array of URLs/file paths to process multiple documents. When an array is provided, documents are parsed and concatenated with double newlines.
|
|
34
45
|
- `parameters.returnStructuredOutput` (boolean, optional, default: `false`): Set to `true` to enable AI-powered extraction, `false` for raw text only. When `true`, requires either `prompt` or `outputSchema` (or both)
|
|
46
|
+
- `quality` (`'standard'` | `'advanced'`, optional, default: `'advanced'`): Controls OCR/parsing quality in managed mode. `'advanced'` (default) provides high-quality extraction supporting complex layouts, diagrams, and images at 3x the credit cost of `'standard'`. Use `'standard'` for simple, clean text-based documents where speed and cost matter. Has no effect in local processing mode.
|
|
35
47
|
- `prompt` (string, optional): Instructions for AI-powered extraction. Ignored when `returnStructuredOutput` is `false`
|
|
36
48
|
- `outputSchema` (schema object, optional): Define the structure of extracted data for structured extraction. Ignored when `returnStructuredOutput` is `false`
|
|
37
49
|
|
|
@@ -148,7 +160,8 @@ The SDK provides three main functions for document processing:
|
|
|
148
160
|
outputSchema?: ZodType<T>, // Optional: Zod schema for structured extraction
|
|
149
161
|
outputSchemaPrompt?: string, // Optional: Instructions for extraction
|
|
150
162
|
processingMode?: DocumentProcessingMode, // Optional: Processing mode (default: DocumentProcessingMode.MANAGED)
|
|
151
|
-
llamaCloudApiKey?: string
|
|
163
|
+
llamaCloudApiKey?: string, // Optional: API key for local mode
|
|
164
|
+
quality?: DocumentQuality, // Optional: 'standard' | 'advanced' (default: 'advanced'). Managed mode only.
|
|
152
165
|
}) => Promise<{
|
|
153
166
|
rawContent?: string, // Concatenated content when multiple documents provided
|
|
154
167
|
structuredContent?: T | string // Extracted from concatenated content when multiple documents provided
|
|
@@ -162,7 +175,8 @@ The SDK provides three main functions for document processing:
|
|
|
162
175
|
documentSource: string, // Required: URL or file path
|
|
163
176
|
sessionId: string, // Required: Session identifier
|
|
164
177
|
processingMode?: DocumentProcessingMode, // Optional: Processing mode (default: DocumentProcessingMode.MANAGED)
|
|
165
|
-
llamaCloudApiKey?: string
|
|
178
|
+
llamaCloudApiKey?: string, // Optional: API key for local mode
|
|
179
|
+
quality?: DocumentQuality, // Optional: 'standard' | 'advanced' (default: 'advanced'). Managed mode only.
|
|
166
180
|
}) => Promise<{
|
|
167
181
|
rawContent?: string,
|
|
168
182
|
metadata?: { fileSize?: number, fileType: string, processingTime: number, contentLength: number }
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@minded-ai/mindedjs",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.46",
|
|
4
4
|
"description": "MindedJS is a TypeScript library for building agents.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -34,18 +34,18 @@
|
|
|
34
34
|
"@types/chai": "^4.3.11",
|
|
35
35
|
"@types/ejs": "^3.1.5",
|
|
36
36
|
"@types/lodash": "^4.17.21",
|
|
37
|
-
"@types/mocha": "^10.0.
|
|
37
|
+
"@types/mocha": "^10.0.10",
|
|
38
38
|
"@types/node": "^20.11.19",
|
|
39
|
-
"@types/sinon": "^
|
|
39
|
+
"@types/sinon": "^21.0.0",
|
|
40
40
|
"@types/ws": "^8.18.1",
|
|
41
41
|
"chai": "^4.3.10",
|
|
42
42
|
"dotenv": "^16.4.5",
|
|
43
43
|
"eslint": "^9.27.0",
|
|
44
44
|
"globals": "^16.2.0",
|
|
45
|
-
"mocha": "^
|
|
45
|
+
"mocha": "^11.7.5",
|
|
46
46
|
"nodemon": "^3.1.10",
|
|
47
47
|
"prettier": "^3.7.4",
|
|
48
|
-
"sinon": "^
|
|
48
|
+
"sinon": "^21.0.2",
|
|
49
49
|
"ts-node": "^10.9.2",
|
|
50
50
|
"typedoc": "^0.28.5",
|
|
51
51
|
"typescript": "^5.3.3",
|
|
@@ -73,6 +73,15 @@
|
|
|
73
73
|
"zod": "^3.25.76",
|
|
74
74
|
"zod-to-json-schema": "^3.24.6"
|
|
75
75
|
},
|
|
76
|
+
"overrides": {
|
|
77
|
+
"mocha": {
|
|
78
|
+
"diff": "^8.0.3",
|
|
79
|
+
"serialize-javascript": "^7.0.4"
|
|
80
|
+
},
|
|
81
|
+
"sinon": {
|
|
82
|
+
"diff": "^8.0.3"
|
|
83
|
+
}
|
|
84
|
+
},
|
|
76
85
|
"peerDependencies": {
|
|
77
86
|
"playwright": "^1.55.0"
|
|
78
87
|
}
|
|
@@ -11,7 +11,7 @@ import { logger } from '../utils/logger';
|
|
|
11
11
|
import { createHistoryStep } from '../utils/history';
|
|
12
12
|
import { DefaultTool, Tool } from '../types/Tools.types';
|
|
13
13
|
import { combinePlaybooks } from '../playbooks/playbooks';
|
|
14
|
-
import {
|
|
14
|
+
import { compilePrompt, compileNodeParameters } from './compilePrompt';
|
|
15
15
|
import { ToolMessage } from '@langchain/core/messages';
|
|
16
16
|
import { AnalyticsEventName } from '../types/Analytics.types';
|
|
17
17
|
import { trackAnalyticsEvent } from '../internalTools/analytics';
|
|
@@ -51,20 +51,11 @@ export const addAppToolNode = async ({
|
|
|
51
51
|
},
|
|
52
52
|
state.sessionId,
|
|
53
53
|
);
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
if (value !== '') {
|
|
60
|
-
// If the value is a string, compile it to allow variable injection
|
|
61
|
-
if (typeof value === 'string') {
|
|
62
|
-
compiledParameters[key] = compileParameter(value, compileContext, key, appRunnerTool.input);
|
|
63
|
-
} else {
|
|
64
|
-
compiledParameters[key] = value;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
54
|
+
const compiledParameters = compileNodeParameters(
|
|
55
|
+
node.parameters,
|
|
56
|
+
{ state, memory: state.memory, env: process.env },
|
|
57
|
+
appRunnerTool.input,
|
|
58
|
+
);
|
|
68
59
|
|
|
69
60
|
// Validate each compiled parameter against the tool's Zod schema.
|
|
70
61
|
// If a parameter doesn't match, drop it so the LLM generates a valid value instead.
|
|
@@ -115,7 +106,7 @@ export const addAppToolNode = async ({
|
|
|
115
106
|
const compiledPlaybooks = compilePrompt(combinedPlaybooks, { state: state, memory: state.memory, env: process.env });
|
|
116
107
|
|
|
117
108
|
// Compile the prompt if it exists to allow variable injection
|
|
118
|
-
const compiledNodePrompt = node.prompt ? compilePrompt(node.prompt,
|
|
109
|
+
const compiledNodePrompt = node.prompt ? compilePrompt(node.prompt, { state, memory: state.memory, env: process.env }) : null;
|
|
119
110
|
|
|
120
111
|
// Check if any compiled parameter is too long (>1000 characters)
|
|
121
112
|
const hasLongParameters = Object.values(compiledParameters).some((value) => typeof value === 'string' && value.length > 1000);
|
|
@@ -10,7 +10,8 @@ import { Agent } from '../agent';
|
|
|
10
10
|
import { createBrowserSession } from '../browserTask/executeBrowserTask';
|
|
11
11
|
import { tool as langchainTool } from '@langchain/core/tools';
|
|
12
12
|
import { LLMProviders } from '../types/LLM.types';
|
|
13
|
-
import { compilePrompt } from './compilePrompt';
|
|
13
|
+
import { compilePrompt, compileNodeParameters } from './compilePrompt';
|
|
14
|
+
import { getSchemaForToolInference } from './utils/getSchemaForToolInference';
|
|
14
15
|
import { combinePlaybooks } from '../playbooks/playbooks';
|
|
15
16
|
import { BrowserTaskMode } from '../browserTask/types';
|
|
16
17
|
import { getConfig } from '../platform/config';
|
|
@@ -43,11 +44,23 @@ export const addBrowserTaskNode = async ({ graph, node, agent, llm }: AddBrowser
|
|
|
43
44
|
// Create Zod schema from inputSchema
|
|
44
45
|
const zodSchema = createZodSchemaFromFields(node.inputSchema);
|
|
45
46
|
|
|
47
|
+
const compiledParameters = compileNodeParameters(
|
|
48
|
+
node.parameters,
|
|
49
|
+
{ state, memory: state.memory, env: process.env },
|
|
50
|
+
zodSchema,
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
const { schemaForLLM, skipLLMCall } = getSchemaForToolInference({
|
|
54
|
+
inputSchema: zodSchema,
|
|
55
|
+
overriddenKeys: Object.keys(compiledParameters),
|
|
56
|
+
toolName: 'browser-task',
|
|
57
|
+
});
|
|
58
|
+
|
|
46
59
|
// Create langchain tool
|
|
47
60
|
const tool = langchainTool(() => {}, {
|
|
48
61
|
name: 'browser-task',
|
|
49
62
|
description: node.prompt,
|
|
50
|
-
schema:
|
|
63
|
+
schema: schemaForLLM as any,
|
|
51
64
|
});
|
|
52
65
|
|
|
53
66
|
const combinedPlaybooks = combinePlaybooks(agent.playbooks);
|
|
@@ -62,24 +75,37 @@ export const addBrowserTaskNode = async ({ graph, node, agent, llm }: AddBrowser
|
|
|
62
75
|
}
|
|
63
76
|
|
|
64
77
|
try {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
78
|
+
let AIToolCallMessage: AIMessage;
|
|
79
|
+
|
|
80
|
+
if (skipLLMCall) {
|
|
81
|
+
AIToolCallMessage = new AIMessage({
|
|
82
|
+
content: '',
|
|
83
|
+
tool_calls: [{ name: 'browser-task', args: compiledParameters, id: uuidv4() }],
|
|
84
|
+
});
|
|
85
|
+
} else {
|
|
86
|
+
// Use LLM to generate tool call, with retry when inferred args are schema-invalid
|
|
87
|
+
AIToolCallMessage = await inferToolCallWithRetry({
|
|
88
|
+
llm,
|
|
89
|
+
tool,
|
|
90
|
+
inputSchema: zodSchema as any,
|
|
91
|
+
messages: state.messages,
|
|
92
|
+
sessionId: state.sessionId,
|
|
93
|
+
mergeArgs: (args) => ({
|
|
94
|
+
...args,
|
|
95
|
+
...compiledParameters,
|
|
96
|
+
}),
|
|
97
|
+
onAfterAttempt: async () => {
|
|
98
|
+
await agent.interruptSessionManager.checkQueueAndInterrupt(state.sessionId);
|
|
99
|
+
},
|
|
100
|
+
toolNameForLogs: 'browser-task',
|
|
101
|
+
});
|
|
102
|
+
if (!AIToolCallMessage.tool_calls || AIToolCallMessage.tool_calls.length === 0) {
|
|
103
|
+
throw new Error('No tool calls generated by LLM');
|
|
104
|
+
}
|
|
79
105
|
}
|
|
80
106
|
|
|
81
|
-
const toolCall = AIToolCallMessage.tool_calls[0];
|
|
82
|
-
const inputParams = toolCall.args
|
|
107
|
+
const toolCall = AIToolCallMessage.tool_calls![0];
|
|
108
|
+
const inputParams = { ...toolCall.args, ...compiledParameters };
|
|
83
109
|
|
|
84
110
|
// Prepare parameters for prompt compilation
|
|
85
111
|
const promptParams = {
|
package/src/nodes/addToolNode.ts
CHANGED
|
@@ -10,7 +10,7 @@ import { Agent } from '../agent';
|
|
|
10
10
|
import { createHistoryStep } from '../utils/history';
|
|
11
11
|
import { HistoryStep } from '../types/Agent.types';
|
|
12
12
|
import { combinePlaybooks } from '../playbooks/playbooks';
|
|
13
|
-
import {
|
|
13
|
+
import { compilePrompt, compileNodeParameters } from './compilePrompt';
|
|
14
14
|
import { AnalyticsEventName } from '../types/Analytics.types';
|
|
15
15
|
import { trackAnalyticsEvent } from '../internalTools/analytics';
|
|
16
16
|
import { inferToolCallWithRetry } from './utils/inferToolCallWithRetry';
|
|
@@ -51,20 +51,11 @@ export const addToolNode = async ({
|
|
|
51
51
|
await agent.interruptSessionManager.checkQueueAndInterrupt(state.sessionId);
|
|
52
52
|
logger.debug({ msg: `[Node] Executing tool node`, node: toolNode.displayName });
|
|
53
53
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
if (value !== '') {
|
|
60
|
-
// If the value is a string, compile it to allow variable injection
|
|
61
|
-
if (typeof value === 'string') {
|
|
62
|
-
compiledParameters[key] = compileParameter(value, compileContext, key, matchedTool.input);
|
|
63
|
-
} else {
|
|
64
|
-
compiledParameters[key] = value;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
}
|
|
54
|
+
const compiledParameters = compileNodeParameters(
|
|
55
|
+
node.parameters,
|
|
56
|
+
{ state, memory: state.memory, env: process.env },
|
|
57
|
+
matchedTool.input,
|
|
58
|
+
);
|
|
68
59
|
|
|
69
60
|
const overriddenKeys = Object.keys(compiledParameters);
|
|
70
61
|
const { schemaForLLM, skipLLMCall } = getSchemaForToolInference({
|
|
@@ -73,7 +64,7 @@ export const addToolNode = async ({
|
|
|
73
64
|
toolName: matchedTool.name,
|
|
74
65
|
});
|
|
75
66
|
|
|
76
|
-
let AIToolCallMessage: AIMessage
|
|
67
|
+
let AIToolCallMessage: AIMessage;
|
|
77
68
|
|
|
78
69
|
if (skipLLMCall) {
|
|
79
70
|
// All parameters are overridden - create synthetic tool call without LLM
|
|
@@ -89,15 +80,15 @@ export const addToolNode = async ({
|
|
|
89
80
|
});
|
|
90
81
|
} else {
|
|
91
82
|
// Need LLM to infer remaining parameters
|
|
92
|
-
const tool = langchainTool(() => {
|
|
83
|
+
const tool = langchainTool(() => {}, {
|
|
93
84
|
name: matchedTool.name,
|
|
94
85
|
description: matchedTool.description,
|
|
95
86
|
schema: schemaForLLM as any, // Use filtered schema
|
|
96
87
|
});
|
|
97
88
|
|
|
98
89
|
const combinedPlaybooks = combinePlaybooks(agent.playbooks) || '';
|
|
99
|
-
const compiledNodePrompt = node.prompt ? compilePrompt(node.prompt,
|
|
100
|
-
const hasOverriddenParameters =
|
|
90
|
+
const compiledNodePrompt = node.prompt ? compilePrompt(node.prompt, { state, memory: state.memory, env: process.env }) : null;
|
|
91
|
+
const hasOverriddenParameters = Object.keys(compiledParameters).length > 0;
|
|
101
92
|
|
|
102
93
|
// Only build system message if there's actual content (playbooks, prompt, or overridden parameters)
|
|
103
94
|
if (combinedPlaybooks || compiledNodePrompt || hasOverriddenParameters) {
|