@mastra/core 1.16.1-alpha.0 → 1.17.0-alpha.2
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/CHANGELOG.md +128 -0
- package/dist/agent/index.cjs +8 -8
- package/dist/agent/index.js +1 -1
- package/dist/{chunk-XKOCRXCP.js → chunk-4UTQD6B5.js} +3 -3
- package/dist/{chunk-XKOCRXCP.js.map → chunk-4UTQD6B5.js.map} +1 -1
- package/dist/{chunk-WJEUD4JG.js → chunk-5TKRQNGW.js} +4 -4
- package/dist/{chunk-WJEUD4JG.js.map → chunk-5TKRQNGW.js.map} +1 -1
- package/dist/{chunk-BEDQJNIR.cjs → chunk-6HSR64XA.cjs} +15 -5
- package/dist/chunk-6HSR64XA.cjs.map +1 -0
- package/dist/{chunk-LFZXBZR5.cjs → chunk-76NWBCBU.cjs} +9 -9
- package/dist/{chunk-LFZXBZR5.cjs.map → chunk-76NWBCBU.cjs.map} +1 -1
- package/dist/{chunk-J3NJXIJ4.js → chunk-ABA3KD3X.js} +524 -246
- package/dist/chunk-ABA3KD3X.js.map +1 -0
- package/dist/{chunk-SNASZNHI.js → chunk-AGEYVARR.js} +2 -2
- package/dist/{chunk-SNASZNHI.js.map → chunk-AGEYVARR.js.map} +1 -1
- package/dist/{chunk-RQBBPR64.cjs → chunk-AH2ZNH4Y.cjs} +30 -28
- package/dist/chunk-AH2ZNH4Y.cjs.map +1 -0
- package/dist/{chunk-EXIQD6L3.cjs → chunk-AX5EPGND.cjs} +51 -51
- package/dist/{chunk-EXIQD6L3.cjs.map → chunk-AX5EPGND.cjs.map} +1 -1
- package/dist/{chunk-BSMSIRKQ.js → chunk-E7L2JB4A.js} +8 -8
- package/dist/{chunk-BSMSIRKQ.js.map → chunk-E7L2JB4A.js.map} +1 -1
- package/dist/{chunk-RLAMKAFZ.js → chunk-FLW4344C.js} +3 -3
- package/dist/{chunk-RLAMKAFZ.js.map → chunk-FLW4344C.js.map} +1 -1
- package/dist/{chunk-DKQA3ER2.cjs → chunk-I2Z4GKQ6.cjs} +15 -15
- package/dist/{chunk-DKQA3ER2.cjs.map → chunk-I2Z4GKQ6.cjs.map} +1 -1
- package/dist/{chunk-LO7V2FG6.cjs → chunk-ID5X55KA.cjs} +7 -7
- package/dist/{chunk-LO7V2FG6.cjs.map → chunk-ID5X55KA.cjs.map} +1 -1
- package/dist/{chunk-53YOAG3E.js → chunk-JMYTEYXJ.js} +5 -5
- package/dist/{chunk-53YOAG3E.js.map → chunk-JMYTEYXJ.js.map} +1 -1
- package/dist/{chunk-5TZP6NN4.js → chunk-K76OKOAK.js} +3 -3
- package/dist/{chunk-5TZP6NN4.js.map → chunk-K76OKOAK.js.map} +1 -1
- package/dist/{chunk-ZJMETLCP.js → chunk-LOGX3EQD.js} +30 -28
- package/dist/chunk-LOGX3EQD.js.map +1 -0
- package/dist/{chunk-BLBX5SP3.js → chunk-MNIWCQYZ.js} +4 -4
- package/dist/{chunk-BLBX5SP3.js.map → chunk-MNIWCQYZ.js.map} +1 -1
- package/dist/{chunk-DSFXGE5Y.cjs → chunk-O54IMECL.cjs} +185 -185
- package/dist/{chunk-DSFXGE5Y.cjs.map → chunk-O54IMECL.cjs.map} +1 -1
- package/dist/{chunk-OC5SNZ6R.cjs → chunk-OBHOUEDZ.cjs} +83 -83
- package/dist/{chunk-OC5SNZ6R.cjs.map → chunk-OBHOUEDZ.cjs.map} +1 -1
- package/dist/{chunk-OTQY4UJ4.js → chunk-OIZT4TON.js} +476 -27
- package/dist/chunk-OIZT4TON.js.map +1 -0
- package/dist/{chunk-LIVMJB3N.cjs → chunk-P54SNCAD.cjs} +3 -3
- package/dist/{chunk-LIVMJB3N.cjs.map → chunk-P54SNCAD.cjs.map} +1 -1
- package/dist/{chunk-DXRM6H35.js → chunk-PICHLY3C.js} +4 -4
- package/dist/{chunk-DXRM6H35.js.map → chunk-PICHLY3C.js.map} +1 -1
- package/dist/{chunk-7L2ICIDI.cjs → chunk-PQ4CVQXD.cjs} +6 -6
- package/dist/{chunk-7L2ICIDI.cjs.map → chunk-PQ4CVQXD.cjs.map} +1 -1
- package/dist/{chunk-O7JQYUXP.cjs → chunk-PTRJHO2K.cjs} +7 -7
- package/dist/{chunk-O7JQYUXP.cjs.map → chunk-PTRJHO2K.cjs.map} +1 -1
- package/dist/{chunk-SQACXTWK.cjs → chunk-QVQ3PGG2.cjs} +2 -2
- package/dist/{chunk-SQACXTWK.cjs.map → chunk-QVQ3PGG2.cjs.map} +1 -1
- package/dist/{chunk-XW4B2RAG.cjs → chunk-QVVWKMFM.cjs} +525 -248
- package/dist/chunk-QVVWKMFM.cjs.map +1 -0
- package/dist/{chunk-5S7MQ37C.cjs → chunk-R47HLGU7.cjs} +512 -61
- package/dist/chunk-R47HLGU7.cjs.map +1 -0
- package/dist/{chunk-R67VVUDR.cjs → chunk-SDSIVJMT.cjs} +16 -16
- package/dist/{chunk-R67VVUDR.cjs.map → chunk-SDSIVJMT.cjs.map} +1 -1
- package/dist/{chunk-UGXRRSSU.js → chunk-UOCBF4IP.js} +3 -3
- package/dist/{chunk-UGXRRSSU.js.map → chunk-UOCBF4IP.js.map} +1 -1
- package/dist/{chunk-GVHOPNRI.js → chunk-X234OVG3.js} +14 -4
- package/dist/chunk-X234OVG3.js.map +1 -0
- package/dist/{chunk-XVP3C4KW.cjs → chunk-XTN63GKI.cjs} +7 -7
- package/dist/{chunk-XVP3C4KW.cjs.map → chunk-XTN63GKI.cjs.map} +1 -1
- package/dist/{chunk-NJONWVEJ.js → chunk-YBNI2A6Y.js} +8 -8
- package/dist/{chunk-NJONWVEJ.js.map → chunk-YBNI2A6Y.js.map} +1 -1
- package/dist/{chunk-UXFQJJQG.js → chunk-ZT26XXEB.js} +5 -5
- package/dist/{chunk-UXFQJJQG.js.map → chunk-ZT26XXEB.js.map} +1 -1
- package/dist/datasets/index.cjs +17 -17
- package/dist/datasets/index.js +2 -2
- package/dist/docs/SKILL.md +4 -1
- package/dist/docs/assets/SOURCE_MAP.json +364 -354
- package/dist/docs/references/docs-memory-observational-memory.md +7 -5
- package/dist/docs/references/docs-observability-tracing-bridges-otel.md +3 -3
- package/dist/docs/references/docs-workspace-lsp.md +116 -0
- package/dist/docs/references/docs-workspace-overview.md +15 -1
- package/dist/docs/references/guides-agent-frameworks-ai-sdk.md +3 -3
- package/dist/docs/references/reference-ai-sdk-with-mastra.md +2 -2
- package/dist/docs/references/reference-auth-okta.md +162 -0
- package/dist/docs/references/reference-client-js-agents.md +2 -2
- package/dist/docs/references/reference-harness-harness-class.md +2 -0
- package/dist/docs/references/reference-memory-observational-memory.md +2 -2
- package/dist/docs/references/reference-observability-tracing-interfaces.md +1 -1
- package/dist/docs/references/reference-processors-message-history-processor.md +1 -1
- package/dist/docs/references/reference-processors-processor-interface.md +3 -3
- package/dist/docs/references/reference-processors-semantic-recall-processor.md +1 -1
- package/dist/docs/references/reference-processors-skill-search-processor.md +93 -0
- package/dist/docs/references/reference-processors-tool-call-filter.md +2 -2
- package/dist/docs/references/reference-processors-working-memory-processor.md +1 -1
- package/dist/docs/references/reference-tools-mcp-client.md +1 -1
- package/dist/docs/references/reference.md +2 -0
- package/dist/evals/index.cjs +20 -20
- package/dist/evals/index.js +3 -3
- package/dist/evals/scoreTraces/index.cjs +5 -5
- package/dist/evals/scoreTraces/index.js +2 -2
- package/dist/harness/harness.d.ts +4 -5
- package/dist/harness/harness.d.ts.map +1 -1
- package/dist/harness/index.cjs +44 -12
- package/dist/harness/index.cjs.map +1 -1
- package/dist/harness/index.d.ts +1 -1
- package/dist/harness/index.d.ts.map +1 -1
- package/dist/harness/index.js +39 -7
- package/dist/harness/index.js.map +1 -1
- package/dist/harness/types.d.ts +18 -4
- package/dist/harness/types.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/dist/llm/index.cjs +16 -16
- package/dist/llm/index.js +5 -5
- package/dist/llm/model/provider-types.generated.d.ts +5 -0
- package/dist/loop/index.cjs +14 -14
- package/dist/loop/index.js +1 -1
- package/dist/mastra/index.cjs +2 -2
- package/dist/mastra/index.js +1 -1
- package/dist/memory/index.cjs +14 -14
- package/dist/memory/index.js +1 -1
- package/dist/memory/types.d.ts +4 -0
- package/dist/memory/types.d.ts.map +1 -1
- package/dist/models-dev-DYILKQKY.js +3 -0
- package/dist/{models-dev-DMH6Y26P.js.map → models-dev-DYILKQKY.js.map} +1 -1
- package/dist/models-dev-EX67IAAF.cjs +12 -0
- package/dist/{models-dev-YEVVUBSG.cjs.map → models-dev-EX67IAAF.cjs.map} +1 -1
- package/dist/netlify-EDK4WKCW.cjs +12 -0
- package/dist/{netlify-CQVRCF2F.cjs.map → netlify-EDK4WKCW.cjs.map} +1 -1
- package/dist/netlify-RQLBHLLX.js +3 -0
- package/dist/{netlify-IAN7GQOF.js.map → netlify-RQLBHLLX.js.map} +1 -1
- package/dist/processor-provider/index.cjs +10 -10
- package/dist/processor-provider/index.js +1 -1
- package/dist/processors/index.cjs +50 -42
- package/dist/processors/index.js +1 -1
- package/dist/processors/processors/index.d.ts +2 -0
- package/dist/processors/processors/index.d.ts.map +1 -1
- package/dist/processors/processors/skill-search.d.ts +111 -0
- package/dist/processors/processors/skill-search.d.ts.map +1 -0
- package/dist/processors/tool-result-reminder.d.ts +32 -0
- package/dist/processors/tool-result-reminder.d.ts.map +1 -0
- package/dist/provider-registry-3RCP7DTQ.js +3 -0
- package/dist/{provider-registry-PBDYA2JQ.js.map → provider-registry-3RCP7DTQ.js.map} +1 -1
- package/dist/provider-registry-MBXOBTD4.cjs +40 -0
- package/dist/{provider-registry-CCLGCN3B.cjs.map → provider-registry-MBXOBTD4.cjs.map} +1 -1
- package/dist/provider-registry.json +10 -0
- package/dist/relevance/index.cjs +3 -3
- package/dist/relevance/index.js +1 -1
- package/dist/storage/constants.cjs +56 -56
- package/dist/storage/constants.js +1 -1
- package/dist/storage/index.cjs +160 -160
- package/dist/storage/index.js +2 -2
- package/dist/storage/types.d.ts +2 -0
- package/dist/storage/types.d.ts.map +1 -1
- package/dist/stream/index.cjs +8 -8
- package/dist/stream/index.js +1 -1
- package/dist/test-utils/llm-mock.cjs +4 -4
- package/dist/test-utils/llm-mock.js +1 -1
- package/dist/tool-loop-agent/index.cjs +4 -4
- package/dist/tool-loop-agent/index.js +1 -1
- package/dist/tools/tool-builder/builder.d.ts.map +1 -1
- package/dist/utils.cjs +23 -23
- package/dist/utils.js +1 -1
- package/dist/vector/index.cjs +7 -7
- package/dist/vector/index.js +1 -1
- package/dist/workflows/evented/index.cjs +10 -10
- package/dist/workflows/evented/index.js +1 -1
- package/dist/workflows/index.cjs +24 -24
- package/dist/workflows/index.js +1 -1
- package/dist/workspace/constants/index.d.ts +4 -1
- package/dist/workspace/constants/index.d.ts.map +1 -1
- package/dist/workspace/index.cjs +68 -68
- package/dist/workspace/index.js +1 -1
- package/dist/workspace/lsp/client.d.ts +30 -0
- package/dist/workspace/lsp/client.d.ts.map +1 -1
- package/dist/workspace/lsp/manager.d.ts +11 -0
- package/dist/workspace/lsp/manager.d.ts.map +1 -1
- package/dist/workspace/tools/index.d.ts +1 -0
- package/dist/workspace/tools/index.d.ts.map +1 -1
- package/dist/workspace/tools/lsp-inspect.d.ts +13 -0
- package/dist/workspace/tools/lsp-inspect.d.ts.map +1 -0
- package/dist/workspace/tools/tools.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/llm/model/provider-types.generated.d.ts +5 -0
- package/dist/chunk-5S7MQ37C.cjs.map +0 -1
- package/dist/chunk-BEDQJNIR.cjs.map +0 -1
- package/dist/chunk-GVHOPNRI.js.map +0 -1
- package/dist/chunk-J3NJXIJ4.js.map +0 -1
- package/dist/chunk-OTQY4UJ4.js.map +0 -1
- package/dist/chunk-RQBBPR64.cjs.map +0 -1
- package/dist/chunk-XW4B2RAG.cjs.map +0 -1
- package/dist/chunk-ZJMETLCP.js.map +0 -1
- package/dist/models-dev-DMH6Y26P.js +0 -3
- package/dist/models-dev-YEVVUBSG.cjs +0 -12
- package/dist/netlify-CQVRCF2F.cjs +0 -12
- package/dist/netlify-IAN7GQOF.js +0 -3
- package/dist/provider-registry-CCLGCN3B.cjs +0 -40
- package/dist/provider-registry-PBDYA2JQ.js +0 -3
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkR47HLGU7_cjs = require('../chunk-R47HLGU7.cjs');
|
|
4
4
|
var v4 = require('zod/v4');
|
|
5
5
|
|
|
6
6
|
// src/processor-provider/types.ts
|
|
@@ -67,7 +67,7 @@ var unicodeNormalizerProvider = {
|
|
|
67
67
|
}),
|
|
68
68
|
availablePhases: ["processInput"],
|
|
69
69
|
createProcessor(config) {
|
|
70
|
-
return new
|
|
70
|
+
return new chunkR47HLGU7_cjs.UnicodeNormalizer(config);
|
|
71
71
|
}
|
|
72
72
|
};
|
|
73
73
|
var tokenLimiterProvider = {
|
|
@@ -83,7 +83,7 @@ var tokenLimiterProvider = {
|
|
|
83
83
|
}),
|
|
84
84
|
availablePhases: ["processInput", "processOutputStream", "processOutputResult"],
|
|
85
85
|
createProcessor(config) {
|
|
86
|
-
return new
|
|
86
|
+
return new chunkR47HLGU7_cjs.TokenLimiterProcessor(
|
|
87
87
|
config
|
|
88
88
|
);
|
|
89
89
|
}
|
|
@@ -99,7 +99,7 @@ var toolCallFilterProvider = {
|
|
|
99
99
|
}),
|
|
100
100
|
availablePhases: ["processInput"],
|
|
101
101
|
createProcessor(config) {
|
|
102
|
-
return new
|
|
102
|
+
return new chunkR47HLGU7_cjs.ToolCallFilter(config);
|
|
103
103
|
}
|
|
104
104
|
};
|
|
105
105
|
var batchPartsProvider = {
|
|
@@ -115,7 +115,7 @@ var batchPartsProvider = {
|
|
|
115
115
|
}),
|
|
116
116
|
availablePhases: ["processOutputStream"],
|
|
117
117
|
createProcessor(config) {
|
|
118
|
-
return new
|
|
118
|
+
return new chunkR47HLGU7_cjs.BatchPartsProcessor(config);
|
|
119
119
|
}
|
|
120
120
|
};
|
|
121
121
|
var moderationProvider = {
|
|
@@ -137,7 +137,7 @@ var moderationProvider = {
|
|
|
137
137
|
}),
|
|
138
138
|
availablePhases: ["processInput", "processOutputResult", "processOutputStream"],
|
|
139
139
|
createProcessor(config) {
|
|
140
|
-
return new
|
|
140
|
+
return new chunkR47HLGU7_cjs.ModerationProcessor(config);
|
|
141
141
|
}
|
|
142
142
|
};
|
|
143
143
|
var promptInjectionDetectorProvider = {
|
|
@@ -158,7 +158,7 @@ var promptInjectionDetectorProvider = {
|
|
|
158
158
|
}),
|
|
159
159
|
availablePhases: ["processInput"],
|
|
160
160
|
createProcessor(config) {
|
|
161
|
-
return new
|
|
161
|
+
return new chunkR47HLGU7_cjs.PromptInjectionDetector(config);
|
|
162
162
|
}
|
|
163
163
|
};
|
|
164
164
|
var piiDetectorProvider = {
|
|
@@ -181,7 +181,7 @@ var piiDetectorProvider = {
|
|
|
181
181
|
}),
|
|
182
182
|
availablePhases: ["processInput"],
|
|
183
183
|
createProcessor(config) {
|
|
184
|
-
return new
|
|
184
|
+
return new chunkR47HLGU7_cjs.PIIDetector(config);
|
|
185
185
|
}
|
|
186
186
|
};
|
|
187
187
|
var languageDetectorProvider = {
|
|
@@ -204,7 +204,7 @@ var languageDetectorProvider = {
|
|
|
204
204
|
}),
|
|
205
205
|
availablePhases: ["processInput"],
|
|
206
206
|
createProcessor(config) {
|
|
207
|
-
return new
|
|
207
|
+
return new chunkR47HLGU7_cjs.LanguageDetector(config);
|
|
208
208
|
}
|
|
209
209
|
};
|
|
210
210
|
var systemPromptScrubberProvider = {
|
|
@@ -225,7 +225,7 @@ var systemPromptScrubberProvider = {
|
|
|
225
225
|
}),
|
|
226
226
|
availablePhases: ["processOutputStream", "processOutputResult"],
|
|
227
227
|
createProcessor(config) {
|
|
228
|
-
return new
|
|
228
|
+
return new chunkR47HLGU7_cjs.SystemPromptScrubber(config);
|
|
229
229
|
}
|
|
230
230
|
};
|
|
231
231
|
var BUILT_IN_PROCESSOR_PROVIDERS = {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { UnicodeNormalizer, TokenLimiterProcessor, ToolCallFilter, BatchPartsProcessor, ModerationProcessor, PromptInjectionDetector, PIIDetector, LanguageDetector, SystemPromptScrubber } from '../chunk-
|
|
1
|
+
import { UnicodeNormalizer, TokenLimiterProcessor, ToolCallFilter, BatchPartsProcessor, ModerationProcessor, PromptInjectionDetector, PIIDetector, LanguageDetector, SystemPromptScrubber } from '../chunk-OIZT4TON.js';
|
|
2
2
|
import { z } from 'zod/v4';
|
|
3
3
|
|
|
4
4
|
// src/processor-provider/types.ts
|
|
@@ -1,172 +1,180 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkR47HLGU7_cjs = require('../chunk-R47HLGU7.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
|
+
Object.defineProperty(exports, "AgentsMDInjector", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return chunkR47HLGU7_cjs.AgentsMDInjector; }
|
|
10
|
+
});
|
|
7
11
|
Object.defineProperty(exports, "BaseProcessor", {
|
|
8
12
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkR47HLGU7_cjs.BaseProcessor; }
|
|
10
14
|
});
|
|
11
15
|
Object.defineProperty(exports, "BatchPartsProcessor", {
|
|
12
16
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkR47HLGU7_cjs.BatchPartsProcessor; }
|
|
14
18
|
});
|
|
15
19
|
Object.defineProperty(exports, "FilePartSchema", {
|
|
16
20
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkR47HLGU7_cjs.FilePartSchema; }
|
|
18
22
|
});
|
|
19
23
|
Object.defineProperty(exports, "ImagePartSchema", {
|
|
20
24
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkR47HLGU7_cjs.ImagePartSchema; }
|
|
22
26
|
});
|
|
23
27
|
Object.defineProperty(exports, "LanguageDetector", {
|
|
24
28
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkR47HLGU7_cjs.LanguageDetector; }
|
|
26
30
|
});
|
|
27
31
|
Object.defineProperty(exports, "MessageContentSchema", {
|
|
28
32
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkR47HLGU7_cjs.MessageContentSchema; }
|
|
30
34
|
});
|
|
31
35
|
Object.defineProperty(exports, "MessageHistory", {
|
|
32
36
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkR47HLGU7_cjs.MessageHistory; }
|
|
34
38
|
});
|
|
35
39
|
Object.defineProperty(exports, "MessagePartSchema", {
|
|
36
40
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkR47HLGU7_cjs.MessagePartSchema; }
|
|
38
42
|
});
|
|
39
43
|
Object.defineProperty(exports, "ModerationProcessor", {
|
|
40
44
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkR47HLGU7_cjs.ModerationProcessor; }
|
|
42
46
|
});
|
|
43
47
|
Object.defineProperty(exports, "PIIDetector", {
|
|
44
48
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkR47HLGU7_cjs.PIIDetector; }
|
|
46
50
|
});
|
|
47
51
|
Object.defineProperty(exports, "ProcessorInputPhaseSchema", {
|
|
48
52
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunkR47HLGU7_cjs.ProcessorInputPhaseSchema; }
|
|
50
54
|
});
|
|
51
55
|
Object.defineProperty(exports, "ProcessorInputStepPhaseSchema", {
|
|
52
56
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunkR47HLGU7_cjs.ProcessorInputStepPhaseSchema; }
|
|
54
58
|
});
|
|
55
59
|
Object.defineProperty(exports, "ProcessorMessageContentSchema", {
|
|
56
60
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunkR47HLGU7_cjs.ProcessorMessageContentSchema; }
|
|
58
62
|
});
|
|
59
63
|
Object.defineProperty(exports, "ProcessorMessageSchema", {
|
|
60
64
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunkR47HLGU7_cjs.ProcessorMessageSchema; }
|
|
62
66
|
});
|
|
63
67
|
Object.defineProperty(exports, "ProcessorOutputResultPhaseSchema", {
|
|
64
68
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
69
|
+
get: function () { return chunkR47HLGU7_cjs.ProcessorOutputResultPhaseSchema; }
|
|
66
70
|
});
|
|
67
71
|
Object.defineProperty(exports, "ProcessorOutputStepPhaseSchema", {
|
|
68
72
|
enumerable: true,
|
|
69
|
-
get: function () { return
|
|
73
|
+
get: function () { return chunkR47HLGU7_cjs.ProcessorOutputStepPhaseSchema; }
|
|
70
74
|
});
|
|
71
75
|
Object.defineProperty(exports, "ProcessorOutputStreamPhaseSchema", {
|
|
72
76
|
enumerable: true,
|
|
73
|
-
get: function () { return
|
|
77
|
+
get: function () { return chunkR47HLGU7_cjs.ProcessorOutputStreamPhaseSchema; }
|
|
74
78
|
});
|
|
75
79
|
Object.defineProperty(exports, "ProcessorRunner", {
|
|
76
80
|
enumerable: true,
|
|
77
|
-
get: function () { return
|
|
81
|
+
get: function () { return chunkR47HLGU7_cjs.ProcessorRunner; }
|
|
78
82
|
});
|
|
79
83
|
Object.defineProperty(exports, "ProcessorState", {
|
|
80
84
|
enumerable: true,
|
|
81
|
-
get: function () { return
|
|
85
|
+
get: function () { return chunkR47HLGU7_cjs.ProcessorState; }
|
|
82
86
|
});
|
|
83
87
|
Object.defineProperty(exports, "ProcessorStepInputSchema", {
|
|
84
88
|
enumerable: true,
|
|
85
|
-
get: function () { return
|
|
89
|
+
get: function () { return chunkR47HLGU7_cjs.ProcessorStepInputSchema; }
|
|
86
90
|
});
|
|
87
91
|
Object.defineProperty(exports, "ProcessorStepOutputSchema", {
|
|
88
92
|
enumerable: true,
|
|
89
|
-
get: function () { return
|
|
93
|
+
get: function () { return chunkR47HLGU7_cjs.ProcessorStepOutputSchema; }
|
|
90
94
|
});
|
|
91
95
|
Object.defineProperty(exports, "ProcessorStepSchema", {
|
|
92
96
|
enumerable: true,
|
|
93
|
-
get: function () { return
|
|
97
|
+
get: function () { return chunkR47HLGU7_cjs.ProcessorStepSchema; }
|
|
94
98
|
});
|
|
95
99
|
Object.defineProperty(exports, "PromptInjectionDetector", {
|
|
96
100
|
enumerable: true,
|
|
97
|
-
get: function () { return
|
|
101
|
+
get: function () { return chunkR47HLGU7_cjs.PromptInjectionDetector; }
|
|
98
102
|
});
|
|
99
103
|
Object.defineProperty(exports, "ReasoningPartSchema", {
|
|
100
104
|
enumerable: true,
|
|
101
|
-
get: function () { return
|
|
105
|
+
get: function () { return chunkR47HLGU7_cjs.ReasoningPartSchema; }
|
|
102
106
|
});
|
|
103
107
|
Object.defineProperty(exports, "SemanticRecall", {
|
|
104
108
|
enumerable: true,
|
|
105
|
-
get: function () { return
|
|
109
|
+
get: function () { return chunkR47HLGU7_cjs.SemanticRecall; }
|
|
110
|
+
});
|
|
111
|
+
Object.defineProperty(exports, "SkillSearchProcessor", {
|
|
112
|
+
enumerable: true,
|
|
113
|
+
get: function () { return chunkR47HLGU7_cjs.SkillSearchProcessor; }
|
|
106
114
|
});
|
|
107
115
|
Object.defineProperty(exports, "SkillsProcessor", {
|
|
108
116
|
enumerable: true,
|
|
109
|
-
get: function () { return
|
|
117
|
+
get: function () { return chunkR47HLGU7_cjs.SkillsProcessor; }
|
|
110
118
|
});
|
|
111
119
|
Object.defineProperty(exports, "SourcePartSchema", {
|
|
112
120
|
enumerable: true,
|
|
113
|
-
get: function () { return
|
|
121
|
+
get: function () { return chunkR47HLGU7_cjs.SourcePartSchema; }
|
|
114
122
|
});
|
|
115
123
|
Object.defineProperty(exports, "StepStartPartSchema", {
|
|
116
124
|
enumerable: true,
|
|
117
|
-
get: function () { return
|
|
125
|
+
get: function () { return chunkR47HLGU7_cjs.StepStartPartSchema; }
|
|
118
126
|
});
|
|
119
127
|
Object.defineProperty(exports, "StructuredOutputProcessor", {
|
|
120
128
|
enumerable: true,
|
|
121
|
-
get: function () { return
|
|
129
|
+
get: function () { return chunkR47HLGU7_cjs.StructuredOutputProcessor; }
|
|
122
130
|
});
|
|
123
131
|
Object.defineProperty(exports, "SystemPromptScrubber", {
|
|
124
132
|
enumerable: true,
|
|
125
|
-
get: function () { return
|
|
133
|
+
get: function () { return chunkR47HLGU7_cjs.SystemPromptScrubber; }
|
|
126
134
|
});
|
|
127
135
|
Object.defineProperty(exports, "TextPartSchema", {
|
|
128
136
|
enumerable: true,
|
|
129
|
-
get: function () { return
|
|
137
|
+
get: function () { return chunkR47HLGU7_cjs.TextPartSchema; }
|
|
130
138
|
});
|
|
131
139
|
Object.defineProperty(exports, "TokenLimiter", {
|
|
132
140
|
enumerable: true,
|
|
133
|
-
get: function () { return
|
|
141
|
+
get: function () { return chunkR47HLGU7_cjs.TokenLimiterProcessor; }
|
|
134
142
|
});
|
|
135
143
|
Object.defineProperty(exports, "TokenLimiterProcessor", {
|
|
136
144
|
enumerable: true,
|
|
137
|
-
get: function () { return
|
|
145
|
+
get: function () { return chunkR47HLGU7_cjs.TokenLimiterProcessor; }
|
|
138
146
|
});
|
|
139
147
|
Object.defineProperty(exports, "ToolCallFilter", {
|
|
140
148
|
enumerable: true,
|
|
141
|
-
get: function () { return
|
|
149
|
+
get: function () { return chunkR47HLGU7_cjs.ToolCallFilter; }
|
|
142
150
|
});
|
|
143
151
|
Object.defineProperty(exports, "ToolInvocationPartSchema", {
|
|
144
152
|
enumerable: true,
|
|
145
|
-
get: function () { return
|
|
153
|
+
get: function () { return chunkR47HLGU7_cjs.ToolInvocationPartSchema; }
|
|
146
154
|
});
|
|
147
155
|
Object.defineProperty(exports, "ToolSearchProcessor", {
|
|
148
156
|
enumerable: true,
|
|
149
|
-
get: function () { return
|
|
157
|
+
get: function () { return chunkR47HLGU7_cjs.ToolSearchProcessor; }
|
|
150
158
|
});
|
|
151
159
|
Object.defineProperty(exports, "UnicodeNormalizer", {
|
|
152
160
|
enumerable: true,
|
|
153
|
-
get: function () { return
|
|
161
|
+
get: function () { return chunkR47HLGU7_cjs.UnicodeNormalizer; }
|
|
154
162
|
});
|
|
155
163
|
Object.defineProperty(exports, "WorkingMemory", {
|
|
156
164
|
enumerable: true,
|
|
157
|
-
get: function () { return
|
|
165
|
+
get: function () { return chunkR47HLGU7_cjs.WorkingMemory; }
|
|
158
166
|
});
|
|
159
167
|
Object.defineProperty(exports, "WorkspaceInstructionsProcessor", {
|
|
160
168
|
enumerable: true,
|
|
161
|
-
get: function () { return
|
|
169
|
+
get: function () { return chunkR47HLGU7_cjs.WorkspaceInstructionsProcessor; }
|
|
162
170
|
});
|
|
163
171
|
Object.defineProperty(exports, "globalEmbeddingCache", {
|
|
164
172
|
enumerable: true,
|
|
165
|
-
get: function () { return
|
|
173
|
+
get: function () { return chunkR47HLGU7_cjs.globalEmbeddingCache; }
|
|
166
174
|
});
|
|
167
175
|
Object.defineProperty(exports, "isProcessorWorkflow", {
|
|
168
176
|
enumerable: true,
|
|
169
|
-
get: function () { return
|
|
177
|
+
get: function () { return chunkR47HLGU7_cjs.isProcessorWorkflow; }
|
|
170
178
|
});
|
|
171
179
|
//# sourceMappingURL=index.cjs.map
|
|
172
180
|
//# sourceMappingURL=index.cjs.map
|
package/dist/processors/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { BaseProcessor, BatchPartsProcessor, FilePartSchema, ImagePartSchema, LanguageDetector, MessageContentSchema, MessageHistory, MessagePartSchema, ModerationProcessor, PIIDetector, ProcessorInputPhaseSchema, ProcessorInputStepPhaseSchema, ProcessorMessageContentSchema, ProcessorMessageSchema, ProcessorOutputResultPhaseSchema, ProcessorOutputStepPhaseSchema, ProcessorOutputStreamPhaseSchema, ProcessorRunner, ProcessorState, ProcessorStepInputSchema, ProcessorStepOutputSchema, ProcessorStepSchema, PromptInjectionDetector, ReasoningPartSchema, SemanticRecall, SkillsProcessor, SourcePartSchema, StepStartPartSchema, StructuredOutputProcessor, SystemPromptScrubber, TextPartSchema, TokenLimiterProcessor as TokenLimiter, TokenLimiterProcessor, ToolCallFilter, ToolInvocationPartSchema, ToolSearchProcessor, UnicodeNormalizer, WorkingMemory, WorkspaceInstructionsProcessor, globalEmbeddingCache, isProcessorWorkflow } from '../chunk-
|
|
1
|
+
export { AgentsMDInjector, BaseProcessor, BatchPartsProcessor, FilePartSchema, ImagePartSchema, LanguageDetector, MessageContentSchema, MessageHistory, MessagePartSchema, ModerationProcessor, PIIDetector, ProcessorInputPhaseSchema, ProcessorInputStepPhaseSchema, ProcessorMessageContentSchema, ProcessorMessageSchema, ProcessorOutputResultPhaseSchema, ProcessorOutputStepPhaseSchema, ProcessorOutputStreamPhaseSchema, ProcessorRunner, ProcessorState, ProcessorStepInputSchema, ProcessorStepOutputSchema, ProcessorStepSchema, PromptInjectionDetector, ReasoningPartSchema, SemanticRecall, SkillSearchProcessor, SkillsProcessor, SourcePartSchema, StepStartPartSchema, StructuredOutputProcessor, SystemPromptScrubber, TextPartSchema, TokenLimiterProcessor as TokenLimiter, TokenLimiterProcessor, ToolCallFilter, ToolInvocationPartSchema, ToolSearchProcessor, UnicodeNormalizer, WorkingMemory, WorkspaceInstructionsProcessor, globalEmbeddingCache, isProcessorWorkflow } from '../chunk-OIZT4TON.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -8,7 +8,9 @@ export { BatchPartsProcessor, type BatchPartsOptions, type BatchPartsState } fro
|
|
|
8
8
|
export { TokenLimiterProcessor, TokenLimiterProcessor as TokenLimiter, type TokenLimiterOptions, } from './token-limiter.js';
|
|
9
9
|
export { SystemPromptScrubber, type SystemPromptScrubberOptions, type SystemPromptDetectionResult, type SystemPromptDetection, } from './system-prompt-scrubber.js';
|
|
10
10
|
export { ToolCallFilter } from './tool-call-filter.js';
|
|
11
|
+
export { AgentsMDInjector, type ToolResultReminderOptions } from '../tool-result-reminder.js';
|
|
11
12
|
export { ToolSearchProcessor, type ToolSearchProcessorOptions } from './tool-search.js';
|
|
12
13
|
export { SkillsProcessor, type SkillsProcessorOptions } from './skills.js';
|
|
14
|
+
export { SkillSearchProcessor, type SkillSearchProcessorOptions } from './skill-search.js';
|
|
13
15
|
export { WorkspaceInstructionsProcessor, type WorkspaceInstructionsProcessorOptions } from './workspace-instructions.js';
|
|
14
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/processors/processors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,KAAK,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AACxF,OAAO,EACL,mBAAmB,EACnB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,GAC9B,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,uBAAuB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,6BAA6B,GACnC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,WAAW,EACX,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,YAAY,GAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,gBAAgB,EAChB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,GACvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,yBAAyB,EAAE,KAAK,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9F,OAAO,EAAE,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAClG,OAAO,EACL,qBAAqB,EACrB,qBAAqB,IAAI,YAAY,EACrC,KAAK,mBAAmB,GACzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,oBAAoB,EACpB,KAAK,2BAA2B,EAChC,KAAK,2BAA2B,EAChC,KAAK,qBAAqB,GAC3B,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,mBAAmB,EAAE,KAAK,0BAA0B,EAAE,MAAM,eAAe,CAAC;AACrF,OAAO,EAAE,eAAe,EAAE,KAAK,sBAAsB,EAAE,MAAM,UAAU,CAAC;AACxE,OAAO,EAAE,8BAA8B,EAAE,KAAK,qCAAqC,EAAE,MAAM,0BAA0B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/processors/processors/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,KAAK,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AACxF,OAAO,EACL,mBAAmB,EACnB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,GAC9B,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,uBAAuB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,qBAAqB,EAC1B,KAAK,6BAA6B,GACnC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,WAAW,EACX,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,YAAY,GAClB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,gBAAgB,EAChB,KAAK,uBAAuB,EAC5B,KAAK,uBAAuB,EAC5B,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,GACvB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,yBAAyB,EAAE,KAAK,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAC9F,OAAO,EAAE,mBAAmB,EAAE,KAAK,iBAAiB,EAAE,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAClG,OAAO,EACL,qBAAqB,EACrB,qBAAqB,IAAI,YAAY,EACrC,KAAK,mBAAmB,GACzB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,oBAAoB,EACpB,KAAK,2BAA2B,EAChC,KAAK,2BAA2B,EAChC,KAAK,qBAAqB,GAC3B,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,gBAAgB,EAAE,KAAK,yBAAyB,EAAE,MAAM,yBAAyB,CAAC;AAE3F,OAAO,EAAE,mBAAmB,EAAE,KAAK,0BAA0B,EAAE,MAAM,eAAe,CAAC;AACrF,OAAO,EAAE,eAAe,EAAE,KAAK,sBAAsB,EAAE,MAAM,UAAU,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,KAAK,2BAA2B,EAAE,MAAM,gBAAgB,CAAC;AACxF,OAAO,EAAE,8BAA8B,EAAE,KAAK,qCAAqC,EAAE,MAAM,0BAA0B,CAAC"}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import type { Workspace } from '../../workspace/workspace.js';
|
|
2
|
+
import type { ProcessInputStepArgs, Processor } from '../index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Configuration options for SkillSearchProcessor
|
|
5
|
+
*/
|
|
6
|
+
export interface SkillSearchProcessorOptions {
|
|
7
|
+
/**
|
|
8
|
+
* Workspace instance containing skills.
|
|
9
|
+
* Skills are accessed via workspace.skills.
|
|
10
|
+
*/
|
|
11
|
+
workspace: Workspace;
|
|
12
|
+
/**
|
|
13
|
+
* Configuration for the search behavior
|
|
14
|
+
*/
|
|
15
|
+
search?: {
|
|
16
|
+
/**
|
|
17
|
+
* Maximum number of skills to return in search results
|
|
18
|
+
* @default 5
|
|
19
|
+
*/
|
|
20
|
+
topK?: number;
|
|
21
|
+
/**
|
|
22
|
+
* Minimum relevance score for including a skill in search results
|
|
23
|
+
* @default 0
|
|
24
|
+
*/
|
|
25
|
+
minScore?: number;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Time-to-live for thread state in milliseconds.
|
|
29
|
+
* After this duration of inactivity, thread state will be eligible for cleanup.
|
|
30
|
+
* Set to 0 to disable TTL cleanup.
|
|
31
|
+
* @default 3600000 (1 hour)
|
|
32
|
+
*/
|
|
33
|
+
ttl?: number;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Processor that enables on-demand skill discovery and loading.
|
|
37
|
+
*
|
|
38
|
+
* Instead of injecting all skill metadata upfront, this processor:
|
|
39
|
+
* 1. Gives the agent two meta-tools: search_skills and load_skill
|
|
40
|
+
* 2. Agent searches for relevant skills using keywords
|
|
41
|
+
* 3. Agent loads specific skills into the conversation on demand
|
|
42
|
+
* 4. Loaded skill instructions appear as system messages
|
|
43
|
+
*
|
|
44
|
+
* This pattern reduces context usage when workspaces have many skills.
|
|
45
|
+
*/
|
|
46
|
+
export declare class SkillSearchProcessor implements Processor<'skill-search'> {
|
|
47
|
+
readonly id = "skill-search";
|
|
48
|
+
readonly name = "Skill Search Processor";
|
|
49
|
+
readonly description = "Enables on-demand skill discovery and loading via search";
|
|
50
|
+
private readonly workspace;
|
|
51
|
+
private readonly searchConfig;
|
|
52
|
+
private readonly ttl;
|
|
53
|
+
private cleanupIntervalId?;
|
|
54
|
+
/**
|
|
55
|
+
* Thread-scoped state management for loaded skills with TTL support.
|
|
56
|
+
* Maps threadId -> ThreadState (skills + timestamp)
|
|
57
|
+
*/
|
|
58
|
+
private threadLoadedSkills;
|
|
59
|
+
constructor(options: SkillSearchProcessorOptions);
|
|
60
|
+
/**
|
|
61
|
+
* Dispose of this processor, clearing the cleanup interval and all thread state.
|
|
62
|
+
* Call this when the processor is no longer needed to prevent timer leaks.
|
|
63
|
+
*/
|
|
64
|
+
dispose(): void;
|
|
65
|
+
/**
|
|
66
|
+
* Get the workspace skills interface
|
|
67
|
+
*/
|
|
68
|
+
private get skills();
|
|
69
|
+
/**
|
|
70
|
+
* Get the thread ID from the request context, or use 'default' as fallback.
|
|
71
|
+
*/
|
|
72
|
+
private getThreadId;
|
|
73
|
+
/**
|
|
74
|
+
* Get or create thread state for the given thread.
|
|
75
|
+
* Updates the lastAccessed timestamp for TTL management.
|
|
76
|
+
*/
|
|
77
|
+
private getThreadState;
|
|
78
|
+
/**
|
|
79
|
+
* Clear loaded skills for a specific thread.
|
|
80
|
+
*/
|
|
81
|
+
clearState(threadId?: string): void;
|
|
82
|
+
/**
|
|
83
|
+
* Clear all thread state for this processor instance.
|
|
84
|
+
*/
|
|
85
|
+
clearAllState(): void;
|
|
86
|
+
/**
|
|
87
|
+
* Clean up stale thread state based on TTL.
|
|
88
|
+
* @returns Number of threads cleaned up
|
|
89
|
+
*/
|
|
90
|
+
private cleanupStaleState;
|
|
91
|
+
/**
|
|
92
|
+
* Schedule periodic cleanup of stale thread state.
|
|
93
|
+
*/
|
|
94
|
+
private scheduleCleanup;
|
|
95
|
+
/**
|
|
96
|
+
* Get statistics about current thread state.
|
|
97
|
+
*/
|
|
98
|
+
getStateStats(): {
|
|
99
|
+
threadCount: number;
|
|
100
|
+
oldestAccessTime: number | null;
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* Manually trigger cleanup of stale state.
|
|
104
|
+
* @returns Number of threads cleaned up
|
|
105
|
+
*/
|
|
106
|
+
cleanupNow(): number;
|
|
107
|
+
processInputStep(args: ProcessInputStepArgs): Promise<{
|
|
108
|
+
tools: Record<string, unknown> | undefined;
|
|
109
|
+
}>;
|
|
110
|
+
}
|
|
111
|
+
//# sourceMappingURL=skill-search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-search.d.ts","sourceRoot":"","sources":["../../../src/processors/processors/skill-search.ts"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAWhE;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C;;;OAGG;IACH,SAAS,EAAE,SAAS,CAAC;IAErB;;OAEG;IACH,MAAM,CAAC,EAAE;QACP;;;WAGG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;QAEd;;;WAGG;QACH,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;IAEF;;;;;OAKG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;GAUG;AACH,qBAAa,oBAAqB,YAAW,SAAS,CAAC,cAAc,CAAC;IACpE,QAAQ,CAAC,EAAE,kBAAkB;IAC7B,QAAQ,CAAC,IAAI,4BAA4B;IACzC,QAAQ,CAAC,WAAW,8DAA8D;IAElF,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAY;IACtC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAqC;IAClE,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAS;IAC7B,OAAO,CAAC,iBAAiB,CAAC,CAAiC;IAE3D;;;OAGG;IACH,OAAO,CAAC,kBAAkB,CAAkC;gBAEhD,OAAO,EAAE,2BAA2B;IAahD;;;OAGG;IACI,OAAO,IAAI,IAAI;IAQtB;;OAEG;IACH,OAAO,KAAK,MAAM,GAEjB;IAED;;OAEG;IACH,OAAO,CAAC,WAAW;IAInB;;;OAGG;IACH,OAAO,CAAC,cAAc;IAYtB;;OAEG;IACI,UAAU,CAAC,QAAQ,GAAE,MAAkB,GAAG,IAAI;IAIrD;;OAEG;IACI,aAAa,IAAI,IAAI;IAI5B;;;OAGG;IACH,OAAO,CAAC,iBAAiB;IAgBzB;;OAEG;IACH,OAAO,CAAC,eAAe;IAWvB;;OAEG;IACI,aAAa,IAAI;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAA;KAAE;IAkBhF;;;OAGG;IACI,UAAU,IAAI,MAAM;IAIrB,gBAAgB,CAAC,IAAI,EAAE,oBAAoB;;;CAoKlD"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { MessageList, MastraDBMessage } from '../agent/message-list/index.js';
|
|
2
|
+
import type { ProcessInputStepArgs, Processor } from './index.js';
|
|
3
|
+
export interface ToolResultReminderOptions {
|
|
4
|
+
reminderText?: string;
|
|
5
|
+
pathExists?: (path: string) => boolean;
|
|
6
|
+
isDirectory?: (path: string) => boolean;
|
|
7
|
+
readFile?: (path: string) => string;
|
|
8
|
+
getIgnoredInstructionPaths?: (args: ProcessInputStepArgs) => string[];
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Injects a persisted UI-visible reminder when the agent just interacted with
|
|
12
|
+
* a path whose directory ancestry contains an instruction file such as AGENTS.md.
|
|
13
|
+
*/
|
|
14
|
+
export declare class AgentsMDInjector implements Processor<'agents-md-injector'> {
|
|
15
|
+
id: "agents-md-injector";
|
|
16
|
+
name: string;
|
|
17
|
+
description: string;
|
|
18
|
+
processorIndex: number;
|
|
19
|
+
private readonly reminderText?;
|
|
20
|
+
private readonly pathExists;
|
|
21
|
+
private readonly isDirectory;
|
|
22
|
+
private readonly readFile;
|
|
23
|
+
private readonly getIgnoredInstructionPaths?;
|
|
24
|
+
constructor(options: ToolResultReminderOptions);
|
|
25
|
+
processInputStep(args: ProcessInputStepArgs): Promise<MessageList | MastraDBMessage[]>;
|
|
26
|
+
private getReminderText;
|
|
27
|
+
private isIgnoredInstructionPath;
|
|
28
|
+
private findReferencedInstructionPath;
|
|
29
|
+
private findInstructionPathInInvocation;
|
|
30
|
+
private hasReminderAlready;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=tool-result-reminder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-result-reminder.d.ts","sourceRoot":"","sources":["../../src/processors/tool-result-reminder.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAE1E,OAAO,KAAK,EAAE,oBAAoB,EAAE,SAAS,EAAgB,MAAM,SAAS,CAAC;AA8B7E,MAAM,WAAW,yBAAyB;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IACvC,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IACxC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACpC,0BAA0B,CAAC,EAAE,CAAC,IAAI,EAAE,oBAAoB,KAAK,MAAM,EAAE,CAAC;CACvE;AAuHD;;;GAGG;AACH,qBAAa,gBAAiB,YAAW,SAAS,CAAC,oBAAoB,CAAC;IACtE,EAAE,EAAG,oBAAoB,CAAU;IACnC,IAAI,SAAwB;IAC5B,WAAW,SAA+E;IAC1F,cAAc,SAAK;IAEnB,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAS;IACvC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA4B;IACvD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAA4B;IACxD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA2B;IACpD,OAAO,CAAC,QAAQ,CAAC,0BAA0B,CAAC,CAA2C;gBAE3E,OAAO,EAAE,yBAAyB;IAgBxC,gBAAgB,CAAC,IAAI,EAAE,oBAAoB,GAAG,OAAO,CAAC,WAAW,GAAG,eAAe,EAAE,CAAC;IAsC5F,OAAO,CAAC,eAAe;IAavB,OAAO,CAAC,wBAAwB;IAMhC,OAAO,CAAC,6BAA6B;IAerC,OAAO,CAAC,+BAA+B;IAyBvC,OAAO,CAAC,kBAAkB;CAG3B"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { GatewayRegistry, PROVIDER_MODELS, PROVIDER_REGISTRY, getProviderConfig, getRegisteredProviders, isProviderRegistered, isValidModelId, parseModelString } from './chunk-X234OVG3.js';
|
|
2
|
+
//# sourceMappingURL=provider-registry-3RCP7DTQ.js.map
|
|
3
|
+
//# sourceMappingURL=provider-registry-3RCP7DTQ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"provider-registry-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"provider-registry-3RCP7DTQ.js"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk6HSR64XA_cjs = require('./chunk-6HSR64XA.cjs');
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
Object.defineProperty(exports, "GatewayRegistry", {
|
|
8
|
+
enumerable: true,
|
|
9
|
+
get: function () { return chunk6HSR64XA_cjs.GatewayRegistry; }
|
|
10
|
+
});
|
|
11
|
+
Object.defineProperty(exports, "PROVIDER_MODELS", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return chunk6HSR64XA_cjs.PROVIDER_MODELS; }
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "PROVIDER_REGISTRY", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return chunk6HSR64XA_cjs.PROVIDER_REGISTRY; }
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports, "getProviderConfig", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () { return chunk6HSR64XA_cjs.getProviderConfig; }
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports, "getRegisteredProviders", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function () { return chunk6HSR64XA_cjs.getRegisteredProviders; }
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(exports, "isProviderRegistered", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
get: function () { return chunk6HSR64XA_cjs.isProviderRegistered; }
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(exports, "isValidModelId", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function () { return chunk6HSR64XA_cjs.isValidModelId; }
|
|
34
|
+
});
|
|
35
|
+
Object.defineProperty(exports, "parseModelString", {
|
|
36
|
+
enumerable: true,
|
|
37
|
+
get: function () { return chunk6HSR64XA_cjs.parseModelString; }
|
|
38
|
+
});
|
|
39
|
+
//# sourceMappingURL=provider-registry-MBXOBTD4.cjs.map
|
|
40
|
+
//# sourceMappingURL=provider-registry-MBXOBTD4.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":"","file":"provider-registry-
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"provider-registry-MBXOBTD4.cjs"}
|
|
@@ -37,6 +37,7 @@
|
|
|
37
37
|
"glm-4.6v",
|
|
38
38
|
"glm-4.7",
|
|
39
39
|
"glm-4.7-flash",
|
|
40
|
+
"glm-4.7-flashx",
|
|
40
41
|
"glm-5",
|
|
41
42
|
"glm-5-turbo"
|
|
42
43
|
],
|
|
@@ -1643,6 +1644,8 @@
|
|
|
1643
1644
|
"glm-4.6v",
|
|
1644
1645
|
"glm-4.6v-flash",
|
|
1645
1646
|
"glm-4.7",
|
|
1647
|
+
"glm-4.7-flash",
|
|
1648
|
+
"glm-4.7-flashx",
|
|
1646
1649
|
"glm-5",
|
|
1647
1650
|
"glm-5-turbo"
|
|
1648
1651
|
],
|
|
@@ -1740,6 +1743,7 @@
|
|
|
1740
1743
|
"mistralai/devstral-small-2507",
|
|
1741
1744
|
"mistralai/mistral-medium-3",
|
|
1742
1745
|
"mistralai/mistral-medium-3.1",
|
|
1746
|
+
"mistralai/mistral-small-2603",
|
|
1743
1747
|
"mistralai/mistral-small-3.1-24b-instruct",
|
|
1744
1748
|
"mistralai/mistral-small-3.2-24b-instruct",
|
|
1745
1749
|
"moonshotai/kimi-k2",
|
|
@@ -2095,6 +2099,7 @@
|
|
|
2095
2099
|
"glm-4.6v",
|
|
2096
2100
|
"glm-4.7",
|
|
2097
2101
|
"glm-4.7-flash",
|
|
2102
|
+
"glm-4.7-flashx",
|
|
2098
2103
|
"glm-5"
|
|
2099
2104
|
],
|
|
2100
2105
|
"docUrl": "https://docs.z.ai/guides/overview/pricing",
|
|
@@ -4271,6 +4276,7 @@
|
|
|
4271
4276
|
"glm-4.6v",
|
|
4272
4277
|
"glm-4.7",
|
|
4273
4278
|
"glm-4.7-flash",
|
|
4279
|
+
"glm-4.7-flashx",
|
|
4274
4280
|
"glm-5",
|
|
4275
4281
|
"glm-5-turbo"
|
|
4276
4282
|
],
|
|
@@ -5505,6 +5511,8 @@
|
|
|
5505
5511
|
"glm-4.6v",
|
|
5506
5512
|
"glm-4.6v-flash",
|
|
5507
5513
|
"glm-4.7",
|
|
5514
|
+
"glm-4.7-flash",
|
|
5515
|
+
"glm-4.7-flashx",
|
|
5508
5516
|
"glm-5",
|
|
5509
5517
|
"glm-5-turbo"
|
|
5510
5518
|
],
|
|
@@ -5580,6 +5588,7 @@
|
|
|
5580
5588
|
"mistralai/devstral-small-2507",
|
|
5581
5589
|
"mistralai/mistral-medium-3",
|
|
5582
5590
|
"mistralai/mistral-medium-3.1",
|
|
5591
|
+
"mistralai/mistral-small-2603",
|
|
5583
5592
|
"mistralai/mistral-small-3.1-24b-instruct",
|
|
5584
5593
|
"mistralai/mistral-small-3.2-24b-instruct",
|
|
5585
5594
|
"moonshotai/kimi-k2",
|
|
@@ -5868,6 +5877,7 @@
|
|
|
5868
5877
|
"glm-4.6v",
|
|
5869
5878
|
"glm-4.7",
|
|
5870
5879
|
"glm-4.7-flash",
|
|
5880
|
+
"glm-4.7-flashx",
|
|
5871
5881
|
"glm-5"
|
|
5872
5882
|
],
|
|
5873
5883
|
"nova": ["nova-2-lite-v1", "nova-2-pro-v1"],
|
package/dist/relevance/index.cjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkR47HLGU7_cjs = require('../chunk-R47HLGU7.cjs');
|
|
4
4
|
|
|
5
5
|
// src/relevance/relevance-score-provider.ts
|
|
6
6
|
function createSimilarityPrompt(query, text) {
|
|
@@ -17,7 +17,7 @@ Relevance score (0-1):`;
|
|
|
17
17
|
var MastraAgentRelevanceScorer = class {
|
|
18
18
|
agent;
|
|
19
19
|
constructor(name, model) {
|
|
20
|
-
this.agent = new
|
|
20
|
+
this.agent = new chunkR47HLGU7_cjs.Agent({
|
|
21
21
|
id: `relevance-scorer-${name}`,
|
|
22
22
|
name: `Relevance Scorer ${name}`,
|
|
23
23
|
instructions: `You are a specialized agent for evaluating the relevance of text to queries.
|
|
@@ -37,7 +37,7 @@ Always return just the number, no explanation.`,
|
|
|
37
37
|
const prompt = createSimilarityPrompt(query, text);
|
|
38
38
|
const model = await this.agent.getModel();
|
|
39
39
|
let response;
|
|
40
|
-
if (
|
|
40
|
+
if (chunkR47HLGU7_cjs.isSupportedLanguageModel(model)) {
|
|
41
41
|
const responseText = await this.agent.generate(prompt);
|
|
42
42
|
response = responseText.text;
|
|
43
43
|
} else {
|
package/dist/relevance/index.js
CHANGED