@mastra/core 1.22.0-alpha.3 → 1.23.0-alpha.0
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 +95 -0
- package/dist/agent/agent.d.ts.map +1 -1
- package/dist/agent/index.cjs +8 -8
- package/dist/agent/index.js +1 -1
- package/dist/browser/index.cjs +2 -2
- package/dist/browser/index.js +1 -1
- package/dist/channels/index.cjs +4 -4
- package/dist/channels/index.js +1 -1
- package/dist/{chunk-WJ3ST7LO.js → chunk-2RUQ6WLT.js} +3 -3
- package/dist/{chunk-WJ3ST7LO.js.map → chunk-2RUQ6WLT.js.map} +1 -1
- package/dist/{chunk-D37I4J42.js → chunk-33TK5IJV.js} +3 -3
- package/dist/{chunk-D37I4J42.js.map → chunk-33TK5IJV.js.map} +1 -1
- package/dist/{chunk-6HVVLZ5K.js → chunk-4J2OKODY.js} +3 -3
- package/dist/{chunk-6HVVLZ5K.js.map → chunk-4J2OKODY.js.map} +1 -1
- package/dist/{chunk-TK2OZUMB.js → chunk-5UMYIPAN.js} +4 -4
- package/dist/{chunk-TK2OZUMB.js.map → chunk-5UMYIPAN.js.map} +1 -1
- package/dist/{chunk-WMZI4HMZ.cjs → chunk-7VTVEVCQ.cjs} +6 -6
- package/dist/{chunk-WMZI4HMZ.cjs.map → chunk-7VTVEVCQ.cjs.map} +1 -1
- package/dist/{chunk-2FNBSEMA.js → chunk-A2L5N4VL.js} +3 -3
- package/dist/{chunk-2FNBSEMA.js.map → chunk-A2L5N4VL.js.map} +1 -1
- package/dist/{chunk-TNE5WKUC.js → chunk-BKIU77ZJ.js} +3 -3
- package/dist/{chunk-TNE5WKUC.js.map → chunk-BKIU77ZJ.js.map} +1 -1
- package/dist/{chunk-BJV6VYV3.cjs → chunk-BNDFOTCS.cjs} +7 -7
- package/dist/{chunk-BJV6VYV3.cjs.map → chunk-BNDFOTCS.cjs.map} +1 -1
- package/dist/{chunk-EEQKSBYC.cjs → chunk-CH4EKSQP.cjs} +64 -20
- package/dist/chunk-CH4EKSQP.cjs.map +1 -0
- package/dist/{chunk-VNIQTIMT.cjs → chunk-CXNNDMLF.cjs} +9 -9
- package/dist/{chunk-VNIQTIMT.cjs.map → chunk-CXNNDMLF.cjs.map} +1 -1
- package/dist/{chunk-HZ7XJDLZ.js → chunk-EV5XAPDO.js} +4 -4
- package/dist/{chunk-HZ7XJDLZ.js.map → chunk-EV5XAPDO.js.map} +1 -1
- package/dist/{chunk-A67TNS6N.cjs → chunk-HIC3WGQU.cjs} +75 -30
- package/dist/chunk-HIC3WGQU.cjs.map +1 -0
- package/dist/{chunk-2ZSSN77Q.js → chunk-IRNYM55C.js} +9 -9
- package/dist/{chunk-2ZSSN77Q.js.map → chunk-IRNYM55C.js.map} +1 -1
- package/dist/{chunk-LHL5KG4Z.js → chunk-J5QMVI5J.js} +51 -7
- package/dist/chunk-J5QMVI5J.js.map +1 -0
- package/dist/{chunk-U552IBW4.cjs → chunk-JLGX4VZB.cjs} +77 -77
- package/dist/{chunk-U552IBW4.cjs.map → chunk-JLGX4VZB.cjs.map} +1 -1
- package/dist/{chunk-I5Q335YQ.cjs → chunk-MQSONVAO.cjs} +185 -185
- package/dist/{chunk-I5Q335YQ.cjs.map → chunk-MQSONVAO.cjs.map} +1 -1
- package/dist/{chunk-FVY55BYY.cjs → chunk-OY6GCNBU.cjs} +48 -48
- package/dist/{chunk-FVY55BYY.cjs.map → chunk-OY6GCNBU.cjs.map} +1 -1
- package/dist/{chunk-YKCIQLOD.cjs → chunk-P4Q7BSKN.cjs} +17 -17
- package/dist/{chunk-YKCIQLOD.cjs.map → chunk-P4Q7BSKN.cjs.map} +1 -1
- package/dist/{chunk-M7O57C2Y.js → chunk-PGXL3YYH.js} +72 -27
- package/dist/chunk-PGXL3YYH.js.map +1 -0
- package/dist/{chunk-GCCEBBVQ.cjs → chunk-QGLY25ND.cjs} +20 -20
- package/dist/{chunk-GCCEBBVQ.cjs.map → chunk-QGLY25ND.cjs.map} +1 -1
- package/dist/{chunk-2C4MPIWQ.cjs → chunk-SKWXGIIH.cjs} +3 -3
- package/dist/{chunk-2C4MPIWQ.cjs.map → chunk-SKWXGIIH.cjs.map} +1 -1
- package/dist/{chunk-T3BJCDHJ.js → chunk-TAEBGE3H.js} +6 -6
- package/dist/{chunk-T3BJCDHJ.js.map → chunk-TAEBGE3H.js.map} +1 -1
- package/dist/{chunk-UFIFQ3FR.js → chunk-VFCMAAIK.js} +8 -8
- package/dist/{chunk-UFIFQ3FR.js.map → chunk-VFCMAAIK.js.map} +1 -1
- package/dist/{chunk-ROZCRV4Y.cjs → chunk-XCNL4BNL.cjs} +5 -5
- package/dist/{chunk-ROZCRV4Y.cjs.map → chunk-XCNL4BNL.cjs.map} +1 -1
- package/dist/datasets/index.cjs +11 -11
- package/dist/datasets/index.js +1 -1
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +154 -154
- package/dist/docs/references/docs-workspace-overview.md +35 -7
- package/dist/evals/index.cjs +5 -5
- package/dist/evals/index.js +2 -2
- package/dist/evals/scoreTraces/index.cjs +3 -3
- package/dist/evals/scoreTraces/index.js +1 -1
- package/dist/harness/index.cjs +18 -11
- package/dist/harness/index.cjs.map +1 -1
- package/dist/harness/index.js +14 -7
- package/dist/harness/index.js.map +1 -1
- package/dist/harness/tools.d.ts.map +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.js +1 -1
- package/dist/llm/index.cjs +20 -20
- package/dist/llm/index.js +5 -5
- package/dist/loop/index.cjs +14 -14
- package/dist/loop/index.js +1 -1
- package/dist/loop/workflows/agentic-execution/tool-call-step.d.ts.map +1 -1
- package/dist/mastra/index.cjs +2 -2
- package/dist/mastra/index.js +1 -1
- package/dist/mastra-6PTZVLRU.cjs +12 -0
- package/dist/{mastra-SD5JK5YO.cjs.map → mastra-6PTZVLRU.cjs.map} +1 -1
- package/dist/mastra-PL2TINKB.js +3 -0
- package/dist/{mastra-P7HM4EN2.js.map → mastra-PL2TINKB.js.map} +1 -1
- package/dist/memory/index.cjs +17 -17
- package/dist/memory/index.js +1 -1
- package/dist/models-dev-LB2MHSPK.js +3 -0
- package/dist/{models-dev-47QGZPKZ.js.map → models-dev-LB2MHSPK.js.map} +1 -1
- package/dist/models-dev-RNN2XIDN.cjs +12 -0
- package/dist/{models-dev-DULD6ZB3.cjs.map → models-dev-RNN2XIDN.cjs.map} +1 -1
- package/dist/netlify-7YIJ54SJ.cjs +12 -0
- package/dist/{netlify-RRQ5LJRU.cjs.map → netlify-7YIJ54SJ.cjs.map} +1 -1
- package/dist/netlify-IAZEAHV7.js +3 -0
- package/dist/{netlify-26DD6OAQ.js.map → netlify-IAZEAHV7.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 +44 -44
- package/dist/processors/index.js +1 -1
- package/dist/provider-registry-3AI2NIS7.js +3 -0
- package/dist/{provider-registry-ZR2NTKVJ.js.map → provider-registry-3AI2NIS7.js.map} +1 -1
- package/dist/provider-registry-MGQGWIDH.cjs +40 -0
- package/dist/{provider-registry-B5A6S7H2.cjs.map → provider-registry-MGQGWIDH.cjs.map} +1 -1
- package/dist/relevance/index.cjs +3 -3
- package/dist/relevance/index.js +1 -1
- package/dist/stream/index.cjs +8 -8
- package/dist/stream/index.js +1 -1
- package/dist/tool-loop-agent/index.cjs +4 -4
- package/dist/tool-loop-agent/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/index.cjs +68 -68
- package/dist/workspace/index.d.ts +1 -1
- package/dist/workspace/index.d.ts.map +1 -1
- package/dist/workspace/index.js +1 -1
- package/dist/workspace/tools/index.d.ts +1 -1
- package/dist/workspace/tools/index.d.ts.map +1 -1
- package/dist/workspace/tools/tools.d.ts +18 -10
- package/dist/workspace/tools/tools.d.ts.map +1 -1
- package/dist/workspace/tools/types.d.ts +51 -7
- package/dist/workspace/tools/types.d.ts.map +1 -1
- package/package.json +9 -9
- package/dist/chunk-A67TNS6N.cjs.map +0 -1
- package/dist/chunk-EEQKSBYC.cjs.map +0 -1
- package/dist/chunk-LHL5KG4Z.js.map +0 -1
- package/dist/chunk-M7O57C2Y.js.map +0 -1
- package/dist/mastra-P7HM4EN2.js +0 -3
- package/dist/mastra-SD5JK5YO.cjs +0 -12
- package/dist/models-dev-47QGZPKZ.js +0 -3
- package/dist/models-dev-DULD6ZB3.cjs +0 -12
- package/dist/netlify-26DD6OAQ.js +0 -3
- package/dist/netlify-RRQ5LJRU.cjs +0 -12
- package/dist/provider-registry-B5A6S7H2.cjs +0 -40
- package/dist/provider-registry-ZR2NTKVJ.js +0 -3
package/dist/workspace/index.cjs
CHANGED
|
@@ -1,276 +1,276 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkHIC3WGQU_cjs = require('../chunk-HIC3WGQU.cjs');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
Object.defineProperty(exports, "CompositeFilesystem", {
|
|
8
8
|
enumerable: true,
|
|
9
|
-
get: function () { return
|
|
9
|
+
get: function () { return chunkHIC3WGQU_cjs.CompositeFilesystem; }
|
|
10
10
|
});
|
|
11
11
|
Object.defineProperty(exports, "CompositeVersionedSkillSource", {
|
|
12
12
|
enumerable: true,
|
|
13
|
-
get: function () { return
|
|
13
|
+
get: function () { return chunkHIC3WGQU_cjs.CompositeVersionedSkillSource; }
|
|
14
14
|
});
|
|
15
15
|
Object.defineProperty(exports, "DirectoryNotEmptyError", {
|
|
16
16
|
enumerable: true,
|
|
17
|
-
get: function () { return
|
|
17
|
+
get: function () { return chunkHIC3WGQU_cjs.DirectoryNotEmptyError; }
|
|
18
18
|
});
|
|
19
19
|
Object.defineProperty(exports, "DirectoryNotFoundError", {
|
|
20
20
|
enumerable: true,
|
|
21
|
-
get: function () { return
|
|
21
|
+
get: function () { return chunkHIC3WGQU_cjs.DirectoryNotFoundError; }
|
|
22
22
|
});
|
|
23
23
|
Object.defineProperty(exports, "FileExistsError", {
|
|
24
24
|
enumerable: true,
|
|
25
|
-
get: function () { return
|
|
25
|
+
get: function () { return chunkHIC3WGQU_cjs.FileExistsError; }
|
|
26
26
|
});
|
|
27
27
|
Object.defineProperty(exports, "FileNotFoundError", {
|
|
28
28
|
enumerable: true,
|
|
29
|
-
get: function () { return
|
|
29
|
+
get: function () { return chunkHIC3WGQU_cjs.FileNotFoundError; }
|
|
30
30
|
});
|
|
31
31
|
Object.defineProperty(exports, "FileReadRequiredError", {
|
|
32
32
|
enumerable: true,
|
|
33
|
-
get: function () { return
|
|
33
|
+
get: function () { return chunkHIC3WGQU_cjs.FileReadRequiredError; }
|
|
34
34
|
});
|
|
35
35
|
Object.defineProperty(exports, "FilesystemError", {
|
|
36
36
|
enumerable: true,
|
|
37
|
-
get: function () { return
|
|
37
|
+
get: function () { return chunkHIC3WGQU_cjs.FilesystemError; }
|
|
38
38
|
});
|
|
39
39
|
Object.defineProperty(exports, "FilesystemNotAvailableError", {
|
|
40
40
|
enumerable: true,
|
|
41
|
-
get: function () { return
|
|
41
|
+
get: function () { return chunkHIC3WGQU_cjs.FilesystemNotAvailableError; }
|
|
42
42
|
});
|
|
43
43
|
Object.defineProperty(exports, "FilesystemNotMountableError", {
|
|
44
44
|
enumerable: true,
|
|
45
|
-
get: function () { return
|
|
45
|
+
get: function () { return chunkHIC3WGQU_cjs.FilesystemNotMountableError; }
|
|
46
46
|
});
|
|
47
47
|
Object.defineProperty(exports, "FilesystemNotReadyError", {
|
|
48
48
|
enumerable: true,
|
|
49
|
-
get: function () { return
|
|
49
|
+
get: function () { return chunkHIC3WGQU_cjs.FilesystemNotReadyError; }
|
|
50
50
|
});
|
|
51
51
|
Object.defineProperty(exports, "IsDirectoryError", {
|
|
52
52
|
enumerable: true,
|
|
53
|
-
get: function () { return
|
|
53
|
+
get: function () { return chunkHIC3WGQU_cjs.IsDirectoryError; }
|
|
54
54
|
});
|
|
55
55
|
Object.defineProperty(exports, "IsolationUnavailableError", {
|
|
56
56
|
enumerable: true,
|
|
57
|
-
get: function () { return
|
|
57
|
+
get: function () { return chunkHIC3WGQU_cjs.IsolationUnavailableError; }
|
|
58
58
|
});
|
|
59
59
|
Object.defineProperty(exports, "LocalFilesystem", {
|
|
60
60
|
enumerable: true,
|
|
61
|
-
get: function () { return
|
|
61
|
+
get: function () { return chunkHIC3WGQU_cjs.LocalFilesystem; }
|
|
62
62
|
});
|
|
63
63
|
Object.defineProperty(exports, "LocalSandbox", {
|
|
64
64
|
enumerable: true,
|
|
65
|
-
get: function () { return
|
|
65
|
+
get: function () { return chunkHIC3WGQU_cjs.LocalSandbox; }
|
|
66
66
|
});
|
|
67
67
|
Object.defineProperty(exports, "LocalSkillSource", {
|
|
68
68
|
enumerable: true,
|
|
69
|
-
get: function () { return
|
|
69
|
+
get: function () { return chunkHIC3WGQU_cjs.LocalSkillSource; }
|
|
70
70
|
});
|
|
71
71
|
Object.defineProperty(exports, "MastraFilesystem", {
|
|
72
72
|
enumerable: true,
|
|
73
|
-
get: function () { return
|
|
73
|
+
get: function () { return chunkHIC3WGQU_cjs.MastraFilesystem; }
|
|
74
74
|
});
|
|
75
75
|
Object.defineProperty(exports, "MastraSandbox", {
|
|
76
76
|
enumerable: true,
|
|
77
|
-
get: function () { return
|
|
77
|
+
get: function () { return chunkHIC3WGQU_cjs.MastraSandbox; }
|
|
78
78
|
});
|
|
79
79
|
Object.defineProperty(exports, "MountError", {
|
|
80
80
|
enumerable: true,
|
|
81
|
-
get: function () { return
|
|
81
|
+
get: function () { return chunkHIC3WGQU_cjs.MountError; }
|
|
82
82
|
});
|
|
83
83
|
Object.defineProperty(exports, "MountManager", {
|
|
84
84
|
enumerable: true,
|
|
85
|
-
get: function () { return
|
|
85
|
+
get: function () { return chunkHIC3WGQU_cjs.MountManager; }
|
|
86
86
|
});
|
|
87
87
|
Object.defineProperty(exports, "MountNotSupportedError", {
|
|
88
88
|
enumerable: true,
|
|
89
|
-
get: function () { return
|
|
89
|
+
get: function () { return chunkHIC3WGQU_cjs.MountNotSupportedError; }
|
|
90
90
|
});
|
|
91
91
|
Object.defineProperty(exports, "NotDirectoryError", {
|
|
92
92
|
enumerable: true,
|
|
93
|
-
get: function () { return
|
|
93
|
+
get: function () { return chunkHIC3WGQU_cjs.NotDirectoryError; }
|
|
94
94
|
});
|
|
95
95
|
Object.defineProperty(exports, "PermissionError", {
|
|
96
96
|
enumerable: true,
|
|
97
|
-
get: function () { return
|
|
97
|
+
get: function () { return chunkHIC3WGQU_cjs.PermissionError; }
|
|
98
98
|
});
|
|
99
99
|
Object.defineProperty(exports, "ProcessHandle", {
|
|
100
100
|
enumerable: true,
|
|
101
|
-
get: function () { return
|
|
101
|
+
get: function () { return chunkHIC3WGQU_cjs.ProcessHandle; }
|
|
102
102
|
});
|
|
103
103
|
Object.defineProperty(exports, "SandboxError", {
|
|
104
104
|
enumerable: true,
|
|
105
|
-
get: function () { return
|
|
105
|
+
get: function () { return chunkHIC3WGQU_cjs.SandboxError; }
|
|
106
106
|
});
|
|
107
107
|
Object.defineProperty(exports, "SandboxExecutionError", {
|
|
108
108
|
enumerable: true,
|
|
109
|
-
get: function () { return
|
|
109
|
+
get: function () { return chunkHIC3WGQU_cjs.SandboxExecutionError; }
|
|
110
110
|
});
|
|
111
111
|
Object.defineProperty(exports, "SandboxFeatureNotSupportedError", {
|
|
112
112
|
enumerable: true,
|
|
113
|
-
get: function () { return
|
|
113
|
+
get: function () { return chunkHIC3WGQU_cjs.SandboxFeatureNotSupportedError; }
|
|
114
114
|
});
|
|
115
115
|
Object.defineProperty(exports, "SandboxNotAvailableError", {
|
|
116
116
|
enumerable: true,
|
|
117
|
-
get: function () { return
|
|
117
|
+
get: function () { return chunkHIC3WGQU_cjs.SandboxNotAvailableError; }
|
|
118
118
|
});
|
|
119
119
|
Object.defineProperty(exports, "SandboxNotReadyError", {
|
|
120
120
|
enumerable: true,
|
|
121
|
-
get: function () { return
|
|
121
|
+
get: function () { return chunkHIC3WGQU_cjs.SandboxNotReadyError; }
|
|
122
122
|
});
|
|
123
123
|
Object.defineProperty(exports, "SandboxProcessManager", {
|
|
124
124
|
enumerable: true,
|
|
125
|
-
get: function () { return
|
|
125
|
+
get: function () { return chunkHIC3WGQU_cjs.SandboxProcessManager; }
|
|
126
126
|
});
|
|
127
127
|
Object.defineProperty(exports, "SandboxTimeoutError", {
|
|
128
128
|
enumerable: true,
|
|
129
|
-
get: function () { return
|
|
129
|
+
get: function () { return chunkHIC3WGQU_cjs.SandboxTimeoutError; }
|
|
130
130
|
});
|
|
131
131
|
Object.defineProperty(exports, "SearchNotAvailableError", {
|
|
132
132
|
enumerable: true,
|
|
133
|
-
get: function () { return
|
|
133
|
+
get: function () { return chunkHIC3WGQU_cjs.SearchNotAvailableError; }
|
|
134
134
|
});
|
|
135
135
|
Object.defineProperty(exports, "StaleFileError", {
|
|
136
136
|
enumerable: true,
|
|
137
|
-
get: function () { return
|
|
137
|
+
get: function () { return chunkHIC3WGQU_cjs.StaleFileError; }
|
|
138
138
|
});
|
|
139
139
|
Object.defineProperty(exports, "VersionedSkillSource", {
|
|
140
140
|
enumerable: true,
|
|
141
|
-
get: function () { return
|
|
141
|
+
get: function () { return chunkHIC3WGQU_cjs.VersionedSkillSource; }
|
|
142
142
|
});
|
|
143
143
|
Object.defineProperty(exports, "WORKSPACE_TOOLS", {
|
|
144
144
|
enumerable: true,
|
|
145
|
-
get: function () { return
|
|
145
|
+
get: function () { return chunkHIC3WGQU_cjs.WORKSPACE_TOOLS; }
|
|
146
146
|
});
|
|
147
147
|
Object.defineProperty(exports, "WORKSPACE_TOOLS_PREFIX", {
|
|
148
148
|
enumerable: true,
|
|
149
|
-
get: function () { return
|
|
149
|
+
get: function () { return chunkHIC3WGQU_cjs.WORKSPACE_TOOLS_PREFIX; }
|
|
150
150
|
});
|
|
151
151
|
Object.defineProperty(exports, "Workspace", {
|
|
152
152
|
enumerable: true,
|
|
153
|
-
get: function () { return
|
|
153
|
+
get: function () { return chunkHIC3WGQU_cjs.Workspace; }
|
|
154
154
|
});
|
|
155
155
|
Object.defineProperty(exports, "WorkspaceError", {
|
|
156
156
|
enumerable: true,
|
|
157
|
-
get: function () { return
|
|
157
|
+
get: function () { return chunkHIC3WGQU_cjs.WorkspaceError; }
|
|
158
158
|
});
|
|
159
159
|
Object.defineProperty(exports, "WorkspaceNotAvailableError", {
|
|
160
160
|
enumerable: true,
|
|
161
|
-
get: function () { return
|
|
161
|
+
get: function () { return chunkHIC3WGQU_cjs.WorkspaceNotAvailableError; }
|
|
162
162
|
});
|
|
163
163
|
Object.defineProperty(exports, "WorkspaceNotReadyError", {
|
|
164
164
|
enumerable: true,
|
|
165
|
-
get: function () { return
|
|
165
|
+
get: function () { return chunkHIC3WGQU_cjs.WorkspaceNotReadyError; }
|
|
166
166
|
});
|
|
167
167
|
Object.defineProperty(exports, "WorkspaceReadOnlyError", {
|
|
168
168
|
enumerable: true,
|
|
169
|
-
get: function () { return
|
|
169
|
+
get: function () { return chunkHIC3WGQU_cjs.WorkspaceReadOnlyError; }
|
|
170
170
|
});
|
|
171
171
|
Object.defineProperty(exports, "callLifecycle", {
|
|
172
172
|
enumerable: true,
|
|
173
|
-
get: function () { return
|
|
173
|
+
get: function () { return chunkHIC3WGQU_cjs.callLifecycle; }
|
|
174
174
|
});
|
|
175
175
|
Object.defineProperty(exports, "collectSkillForPublish", {
|
|
176
176
|
enumerable: true,
|
|
177
|
-
get: function () { return
|
|
177
|
+
get: function () { return chunkHIC3WGQU_cjs.collectSkillForPublish; }
|
|
178
178
|
});
|
|
179
179
|
Object.defineProperty(exports, "createGlobMatcher", {
|
|
180
180
|
enumerable: true,
|
|
181
|
-
get: function () { return
|
|
181
|
+
get: function () { return chunkHIC3WGQU_cjs.createGlobMatcher; }
|
|
182
182
|
});
|
|
183
183
|
Object.defineProperty(exports, "createSkillTools", {
|
|
184
184
|
enumerable: true,
|
|
185
|
-
get: function () { return
|
|
185
|
+
get: function () { return chunkHIC3WGQU_cjs.createSkillTools; }
|
|
186
186
|
});
|
|
187
187
|
Object.defineProperty(exports, "createWorkspaceTools", {
|
|
188
188
|
enumerable: true,
|
|
189
|
-
get: function () { return
|
|
189
|
+
get: function () { return chunkHIC3WGQU_cjs.createWorkspaceTools; }
|
|
190
190
|
});
|
|
191
191
|
Object.defineProperty(exports, "deleteFileTool", {
|
|
192
192
|
enumerable: true,
|
|
193
|
-
get: function () { return
|
|
193
|
+
get: function () { return chunkHIC3WGQU_cjs.deleteFileTool; }
|
|
194
194
|
});
|
|
195
195
|
Object.defineProperty(exports, "detectIsolation", {
|
|
196
196
|
enumerable: true,
|
|
197
|
-
get: function () { return
|
|
197
|
+
get: function () { return chunkHIC3WGQU_cjs.detectIsolation; }
|
|
198
198
|
});
|
|
199
199
|
Object.defineProperty(exports, "editFileTool", {
|
|
200
200
|
enumerable: true,
|
|
201
|
-
get: function () { return
|
|
201
|
+
get: function () { return chunkHIC3WGQU_cjs.editFileTool; }
|
|
202
202
|
});
|
|
203
203
|
Object.defineProperty(exports, "executeCommandTool", {
|
|
204
204
|
enumerable: true,
|
|
205
|
-
get: function () { return
|
|
205
|
+
get: function () { return chunkHIC3WGQU_cjs.executeCommandTool; }
|
|
206
206
|
});
|
|
207
207
|
Object.defineProperty(exports, "extractGlobBase", {
|
|
208
208
|
enumerable: true,
|
|
209
|
-
get: function () { return
|
|
209
|
+
get: function () { return chunkHIC3WGQU_cjs.extractGlobBase; }
|
|
210
210
|
});
|
|
211
211
|
Object.defineProperty(exports, "fileStatTool", {
|
|
212
212
|
enumerable: true,
|
|
213
|
-
get: function () { return
|
|
213
|
+
get: function () { return chunkHIC3WGQU_cjs.fileStatTool; }
|
|
214
214
|
});
|
|
215
215
|
Object.defineProperty(exports, "getRecommendedIsolation", {
|
|
216
216
|
enumerable: true,
|
|
217
|
-
get: function () { return
|
|
217
|
+
get: function () { return chunkHIC3WGQU_cjs.getRecommendedIsolation; }
|
|
218
218
|
});
|
|
219
219
|
Object.defineProperty(exports, "indexContentTool", {
|
|
220
220
|
enumerable: true,
|
|
221
|
-
get: function () { return
|
|
221
|
+
get: function () { return chunkHIC3WGQU_cjs.indexContentTool; }
|
|
222
222
|
});
|
|
223
223
|
Object.defineProperty(exports, "isGlobPattern", {
|
|
224
224
|
enumerable: true,
|
|
225
|
-
get: function () { return
|
|
225
|
+
get: function () { return chunkHIC3WGQU_cjs.isGlobPattern; }
|
|
226
226
|
});
|
|
227
227
|
Object.defineProperty(exports, "isIsolationAvailable", {
|
|
228
228
|
enumerable: true,
|
|
229
|
-
get: function () { return
|
|
229
|
+
get: function () { return chunkHIC3WGQU_cjs.isIsolationAvailable; }
|
|
230
230
|
});
|
|
231
231
|
Object.defineProperty(exports, "listFilesTool", {
|
|
232
232
|
enumerable: true,
|
|
233
|
-
get: function () { return
|
|
233
|
+
get: function () { return chunkHIC3WGQU_cjs.listFilesTool; }
|
|
234
234
|
});
|
|
235
235
|
Object.defineProperty(exports, "matchGlob", {
|
|
236
236
|
enumerable: true,
|
|
237
|
-
get: function () { return
|
|
237
|
+
get: function () { return chunkHIC3WGQU_cjs.matchGlob; }
|
|
238
238
|
});
|
|
239
239
|
Object.defineProperty(exports, "mkdirTool", {
|
|
240
240
|
enumerable: true,
|
|
241
|
-
get: function () { return
|
|
241
|
+
get: function () { return chunkHIC3WGQU_cjs.mkdirTool; }
|
|
242
242
|
});
|
|
243
243
|
Object.defineProperty(exports, "publishSkillFromSource", {
|
|
244
244
|
enumerable: true,
|
|
245
|
-
get: function () { return
|
|
245
|
+
get: function () { return chunkHIC3WGQU_cjs.publishSkillFromSource; }
|
|
246
246
|
});
|
|
247
247
|
Object.defineProperty(exports, "readFileTool", {
|
|
248
248
|
enumerable: true,
|
|
249
|
-
get: function () { return
|
|
249
|
+
get: function () { return chunkHIC3WGQU_cjs.readFileTool; }
|
|
250
250
|
});
|
|
251
251
|
Object.defineProperty(exports, "requireFilesystem", {
|
|
252
252
|
enumerable: true,
|
|
253
|
-
get: function () { return
|
|
253
|
+
get: function () { return chunkHIC3WGQU_cjs.requireFilesystem; }
|
|
254
254
|
});
|
|
255
255
|
Object.defineProperty(exports, "requireSandbox", {
|
|
256
256
|
enumerable: true,
|
|
257
|
-
get: function () { return
|
|
257
|
+
get: function () { return chunkHIC3WGQU_cjs.requireSandbox; }
|
|
258
258
|
});
|
|
259
259
|
Object.defineProperty(exports, "requireWorkspace", {
|
|
260
260
|
enumerable: true,
|
|
261
|
-
get: function () { return
|
|
261
|
+
get: function () { return chunkHIC3WGQU_cjs.requireWorkspace; }
|
|
262
262
|
});
|
|
263
263
|
Object.defineProperty(exports, "resolveToolConfig", {
|
|
264
264
|
enumerable: true,
|
|
265
|
-
get: function () { return
|
|
265
|
+
get: function () { return chunkHIC3WGQU_cjs.resolveToolConfig; }
|
|
266
266
|
});
|
|
267
267
|
Object.defineProperty(exports, "searchTool", {
|
|
268
268
|
enumerable: true,
|
|
269
|
-
get: function () { return
|
|
269
|
+
get: function () { return chunkHIC3WGQU_cjs.searchTool; }
|
|
270
270
|
});
|
|
271
271
|
Object.defineProperty(exports, "writeFileTool", {
|
|
272
272
|
enumerable: true,
|
|
273
|
-
get: function () { return
|
|
273
|
+
get: function () { return chunkHIC3WGQU_cjs.writeFileTool; }
|
|
274
274
|
});
|
|
275
275
|
//# sourceMappingURL=index.cjs.map
|
|
276
276
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -7,7 +7,7 @@ export { MastraFilesystem, type FilesystemLifecycleHook, type MastraFilesystemOp
|
|
|
7
7
|
export { MastraSandbox, SandboxProcessManager, ProcessHandle } from './sandbox/index.js';
|
|
8
8
|
export * from './errors.js';
|
|
9
9
|
export { SandboxError, SandboxExecutionError, SandboxTimeoutError, SandboxNotReadyError, IsolationUnavailableError, MountError, MountNotSupportedError, FilesystemNotMountableError, type SandboxOperation, } from './sandbox/index.js';
|
|
10
|
-
export { createWorkspaceTools, resolveToolConfig, type WorkspaceToolConfig, type WorkspaceToolsConfig, type ExecuteCommandToolConfig, type BackgroundProcessConfig, type BackgroundProcessMeta, type BackgroundProcessExitMeta, readFileTool, writeFileTool, editFileTool, listFilesTool, deleteFileTool, fileStatTool, mkdirTool, searchTool, indexContentTool, executeCommandTool, requireWorkspace, requireFilesystem, requireSandbox, } from './tools/index.js';
|
|
10
|
+
export { createWorkspaceTools, resolveToolConfig, type WorkspaceToolConfig, type WorkspaceToolsConfig, type ExecuteCommandToolConfig, type BackgroundProcessConfig, type BackgroundProcessMeta, type BackgroundProcessExitMeta, type ToolConfigContext, type ToolConfigWithArgsContext, type DynamicToolConfigValue, type ResolvedToolConfig, readFileTool, writeFileTool, editFileTool, listFilesTool, deleteFileTool, fileStatTool, mkdirTool, searchTool, indexContentTool, executeCommandTool, requireWorkspace, requireFilesystem, requireSandbox, } from './tools/index.js';
|
|
11
11
|
export * from './lifecycle.js';
|
|
12
12
|
export type { WorkspaceFilesystem, FileContent, FileStat, FileEntry, FilesystemInfo, ReadOptions, WriteOptions, ListOptions, RemoveOptions, CopyOptions, } from './filesystem/index.js';
|
|
13
13
|
export type { FilesystemMountConfig, MountResult, FilesystemIcon } from './filesystem/index.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/workspace/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAC;AAG5B,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG9F,OAAO,EAAE,eAAe,EAAE,KAAK,sBAAsB,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,KAAK,yBAAyB,EAAE,MAAM,cAAc,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,KAAK,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAGnE,OAAO,EAAE,gBAAgB,EAAE,KAAK,uBAA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AE,MAAM,aAAa,CAAC;AAG9F,YAAY,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAGlD,OAAO,EACL,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,SAAS,EACT,KAAK,WAAW,EAChB,KAAK,kBAAkB,GACxB,MAAM,QAAQ,CAAC;AAGhB,YAAY,EACV,WAAW,EACX,aAAa,EACb,KAAK,EACL,iBAAiB,EACjB,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,aAAa,GACd,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG5C,YAAY,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAG1E,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC/E,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAChD,OAAO,EAAE,6BAA6B,EAAE,KAAK,mBAAmB,EAAE,MAAM,UAAU,CAAC"}
|
package/dist/workspace/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { CompositeFilesystem, CompositeVersionedSkillSource, DirectoryNotEmptyError, DirectoryNotFoundError, FileExistsError, FileNotFoundError, FileReadRequiredError, FilesystemError, FilesystemNotAvailableError, FilesystemNotMountableError, FilesystemNotReadyError, IsDirectoryError, IsolationUnavailableError, LocalFilesystem, LocalSandbox, LocalSkillSource, MastraFilesystem, MastraSandbox, MountError, MountManager, MountNotSupportedError, NotDirectoryError, PermissionError, ProcessHandle, SandboxError, SandboxExecutionError, SandboxFeatureNotSupportedError, SandboxNotAvailableError, SandboxNotReadyError, SandboxProcessManager, SandboxTimeoutError, SearchNotAvailableError, StaleFileError, VersionedSkillSource, WORKSPACE_TOOLS, WORKSPACE_TOOLS_PREFIX, Workspace, WorkspaceError, WorkspaceNotAvailableError, WorkspaceNotReadyError, WorkspaceReadOnlyError, callLifecycle, collectSkillForPublish, createGlobMatcher, createSkillTools, createWorkspaceTools, deleteFileTool, detectIsolation, editFileTool, executeCommandTool, extractGlobBase, fileStatTool, getRecommendedIsolation, indexContentTool, isGlobPattern, isIsolationAvailable, listFilesTool, matchGlob, mkdirTool, publishSkillFromSource, readFileTool, requireFilesystem, requireSandbox, requireWorkspace, resolveToolConfig, searchTool, writeFileTool } from '../chunk-
|
|
1
|
+
export { CompositeFilesystem, CompositeVersionedSkillSource, DirectoryNotEmptyError, DirectoryNotFoundError, FileExistsError, FileNotFoundError, FileReadRequiredError, FilesystemError, FilesystemNotAvailableError, FilesystemNotMountableError, FilesystemNotReadyError, IsDirectoryError, IsolationUnavailableError, LocalFilesystem, LocalSandbox, LocalSkillSource, MastraFilesystem, MastraSandbox, MountError, MountManager, MountNotSupportedError, NotDirectoryError, PermissionError, ProcessHandle, SandboxError, SandboxExecutionError, SandboxFeatureNotSupportedError, SandboxNotAvailableError, SandboxNotReadyError, SandboxProcessManager, SandboxTimeoutError, SearchNotAvailableError, StaleFileError, VersionedSkillSource, WORKSPACE_TOOLS, WORKSPACE_TOOLS_PREFIX, Workspace, WorkspaceError, WorkspaceNotAvailableError, WorkspaceNotReadyError, WorkspaceReadOnlyError, callLifecycle, collectSkillForPublish, createGlobMatcher, createSkillTools, createWorkspaceTools, deleteFileTool, detectIsolation, editFileTool, executeCommandTool, extractGlobBase, fileStatTool, getRecommendedIsolation, indexContentTool, isGlobPattern, isIsolationAvailable, listFilesTool, matchGlob, mkdirTool, publishSkillFromSource, readFileTool, requireFilesystem, requireSandbox, requireWorkspace, resolveToolConfig, searchTool, writeFileTool } from '../chunk-PGXL3YYH.js';
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from './types.js';
|
|
2
|
-
export { createWorkspaceTools, resolveToolConfig } from './tools.js';
|
|
2
|
+
export { createWorkspaceTools, resolveToolConfig, type ResolvedToolConfig } from './tools.js';
|
|
3
3
|
export { readFileTool } from './read-file.js';
|
|
4
4
|
export { writeFileTool } from './write-file.js';
|
|
5
5
|
export { editFileTool } from './edit-file.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/workspace/tools/index.ts"],"names":[],"mappings":"AACA,cAAc,SAAS,CAAC;AAGxB,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/workspace/tools/index.ts"],"names":[],"mappings":"AACA,cAAc,SAAS,CAAC;AAGxB,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,KAAK,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAG3F,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EACL,kBAAkB,EAClB,gCAAgC,EAChC,yBAAyB,EACzB,kCAAkC,GACnC,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAG/C,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,WAAW,CAAC;AACvG,OAAO,EACL,SAAS,EACT,eAAe,EACf,uBAAuB,EACvB,cAAc,EACd,yBAAyB,EACzB,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAG1B,cAAc,kBAAkB,CAAC"}
|
|
@@ -8,8 +8,16 @@
|
|
|
8
8
|
*/
|
|
9
9
|
import type { WorkspaceToolName } from '../constants/index.js';
|
|
10
10
|
import type { Workspace } from '../workspace.js';
|
|
11
|
-
import type { WorkspaceToolsConfig } from './types.js';
|
|
12
|
-
export type { WorkspaceToolConfig, WorkspaceToolsConfig, ExecuteCommandToolConfig, BackgroundProcessConfig, BackgroundProcessMeta, BackgroundProcessExitMeta, } from './types.js';
|
|
11
|
+
import type { WorkspaceToolsConfig, DynamicToolConfigValue, ToolConfigContext, ToolConfigWithArgsContext } from './types.js';
|
|
12
|
+
export type { WorkspaceToolConfig, WorkspaceToolsConfig, ExecuteCommandToolConfig, BackgroundProcessConfig, BackgroundProcessMeta, BackgroundProcessExitMeta, ToolConfigContext, ToolConfigWithArgsContext, DynamicToolConfigValue, } from './types.js';
|
|
13
|
+
/** Resolved tool config with `enabled` as a boolean and execution-time values as raw config. */
|
|
14
|
+
export interface ResolvedToolConfig {
|
|
15
|
+
enabled: boolean;
|
|
16
|
+
requireApproval: DynamicToolConfigValue<ToolConfigWithArgsContext>;
|
|
17
|
+
requireReadBeforeWrite?: DynamicToolConfigValue<ToolConfigWithArgsContext>;
|
|
18
|
+
maxOutputTokens?: number;
|
|
19
|
+
name?: string;
|
|
20
|
+
}
|
|
13
21
|
/**
|
|
14
22
|
* Resolves the effective configuration for a specific tool.
|
|
15
23
|
*
|
|
@@ -17,19 +25,19 @@ export type { WorkspaceToolConfig, WorkspaceToolsConfig, ExecuteCommandToolConfi
|
|
|
17
25
|
* 1. Built-in defaults (enabled: true, requireApproval: false)
|
|
18
26
|
* 2. Top-level config (tools.enabled, tools.requireApproval)
|
|
19
27
|
* 3. Per-tool config (tools[toolName].enabled, tools[toolName].requireApproval)
|
|
28
|
+
*
|
|
29
|
+
* `enabled` is resolved to a boolean immediately (requires context if dynamic).
|
|
30
|
+
* `requireApproval` and `requireReadBeforeWrite` are passed through as-is
|
|
31
|
+
* for execution-time evaluation (they may need args).
|
|
20
32
|
*/
|
|
21
|
-
export declare function resolveToolConfig(toolsConfig: WorkspaceToolsConfig | undefined, toolName: WorkspaceToolName):
|
|
22
|
-
enabled: boolean;
|
|
23
|
-
requireApproval: boolean;
|
|
24
|
-
requireReadBeforeWrite?: boolean;
|
|
25
|
-
maxOutputTokens?: number;
|
|
26
|
-
name?: string;
|
|
27
|
-
};
|
|
33
|
+
export declare function resolveToolConfig(toolsConfig: WorkspaceToolsConfig | undefined, toolName: WorkspaceToolName, context?: ToolConfigContext): Promise<ResolvedToolConfig>;
|
|
28
34
|
/**
|
|
29
35
|
* Creates workspace tools that will be auto-injected into agents.
|
|
30
36
|
*
|
|
31
37
|
* @param workspace - The workspace instance to bind tools to
|
|
32
38
|
* @returns Record of workspace tools
|
|
33
39
|
*/
|
|
34
|
-
export declare function createWorkspaceTools(workspace: Workspace
|
|
40
|
+
export declare function createWorkspaceTools(workspace: Workspace, configContext?: Omit<ToolConfigContext, 'requestContext'> & {
|
|
41
|
+
requestContext?: unknown;
|
|
42
|
+
}): Promise<Record<string, any>>;
|
|
35
43
|
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/workspace/tools/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAKtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAe9C,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/workspace/tools/tools.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAKtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAe9C,OAAO,KAAK,EACV,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,yBAAyB,EAC1B,MAAM,SAAS,CAAC;AACjB,YAAY,EACV,mBAAmB,EACnB,oBAAoB,EACpB,wBAAwB,EACxB,uBAAuB,EACvB,qBAAqB,EACrB,yBAAyB,EACzB,iBAAiB,EACjB,yBAAyB,EACzB,sBAAsB,GACvB,MAAM,SAAS,CAAC;AAsCjB,gGAAgG;AAChG,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,OAAO,CAAC;IACjB,eAAe,EAAE,sBAAsB,CAAC,yBAAyB,CAAC,CAAC;IACnE,sBAAsB,CAAC,EAAE,sBAAsB,CAAC,yBAAyB,CAAC,CAAC;IAC3E,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,iBAAiB,CACrC,WAAW,EAAE,oBAAoB,GAAG,SAAS,EAC7C,QAAQ,EAAE,iBAAiB,EAC3B,OAAO,CAAC,EAAE,iBAAiB,GAC1B,OAAO,CAAC,kBAAkB,CAAC,CAuC7B;AAwGD;;;;;GAKG;AACH,wBAAsB,oBAAoB,CACxC,SAAS,EAAE,SAAS,EACpB,aAAa,CAAC,EAAE,IAAI,CAAC,iBAAiB,EAAE,gBAAgB,CAAC,GAAG;IAAE,cAAc,CAAC,EAAE,OAAO,CAAA;CAAE,gCA2IzF"}
|
|
@@ -7,15 +7,58 @@
|
|
|
7
7
|
* and do not import any Node.js dependencies.
|
|
8
8
|
*/
|
|
9
9
|
import type { WorkspaceToolName, WORKSPACE_TOOLS } from '../constants/index.js';
|
|
10
|
+
/**
|
|
11
|
+
* Context available to dynamic tool config functions evaluated at tool-listing time.
|
|
12
|
+
* Does not include `args` since the tool hasn't been called yet.
|
|
13
|
+
*/
|
|
14
|
+
export interface ToolConfigContext {
|
|
15
|
+
requestContext: Record<string, unknown>;
|
|
16
|
+
/** The Workspace instance. Typed loosely here for browser safety — at runtime this is a full Workspace object. */
|
|
17
|
+
workspace: object;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Context available to dynamic tool config functions evaluated at execution time.
|
|
21
|
+
* Includes `args` since the tool is being called with specific arguments.
|
|
22
|
+
*/
|
|
23
|
+
export interface ToolConfigWithArgsContext extends ToolConfigContext {
|
|
24
|
+
args: Record<string, unknown>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* A config value that can be a static boolean or a dynamic async function.
|
|
28
|
+
* Functions receive context and return a boolean to enable context-aware behavior.
|
|
29
|
+
*
|
|
30
|
+
* @example
|
|
31
|
+
* ```typescript
|
|
32
|
+
* // Static
|
|
33
|
+
* requireApproval: true,
|
|
34
|
+
*
|
|
35
|
+
* // Dynamic - based on request context
|
|
36
|
+
* requireApproval: async ({ requestContext }) => {
|
|
37
|
+
* return requestContext['userTier'] !== 'admin';
|
|
38
|
+
* },
|
|
39
|
+
*
|
|
40
|
+
* // Dynamic - based on args (execution-time only)
|
|
41
|
+
* requireReadBeforeWrite: async ({ args }) => {
|
|
42
|
+
* return (args.path as string).startsWith('/protected');
|
|
43
|
+
* },
|
|
44
|
+
* ```
|
|
45
|
+
*/
|
|
46
|
+
export type DynamicToolConfigValue<TContext = ToolConfigContext> = boolean | ((context: TContext) => boolean | Promise<boolean>);
|
|
10
47
|
/**
|
|
11
48
|
* Configuration for a single workspace tool.
|
|
12
49
|
* All fields are optional; unspecified fields inherit from top-level defaults.
|
|
13
50
|
*/
|
|
14
51
|
export interface WorkspaceToolConfig {
|
|
15
|
-
/**
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
52
|
+
/**
|
|
53
|
+
* Whether the tool is enabled (default: true).
|
|
54
|
+
* When a function, evaluated at tool-listing time with requestContext and workspace.
|
|
55
|
+
*/
|
|
56
|
+
enabled?: DynamicToolConfigValue;
|
|
57
|
+
/**
|
|
58
|
+
* Whether the tool requires user approval before execution (default: false).
|
|
59
|
+
* When a function, evaluated at execution time with requestContext, workspace, and args.
|
|
60
|
+
*/
|
|
61
|
+
requireApproval?: DynamicToolConfigValue<ToolConfigWithArgsContext>;
|
|
19
62
|
/**
|
|
20
63
|
* Custom name to expose this tool as to the LLM.
|
|
21
64
|
* When set, the tool is registered under this name instead of the default
|
|
@@ -34,8 +77,9 @@ export interface WorkspaceToolConfig {
|
|
|
34
77
|
/**
|
|
35
78
|
* For write tools only: require reading a file before writing to it.
|
|
36
79
|
* Prevents accidental overwrites when the agent hasn't seen the current content.
|
|
80
|
+
* When a function, evaluated at execution time with requestContext, workspace, and args.
|
|
37
81
|
*/
|
|
38
|
-
requireReadBeforeWrite?:
|
|
82
|
+
requireReadBeforeWrite?: DynamicToolConfigValue<ToolConfigWithArgsContext>;
|
|
39
83
|
/**
|
|
40
84
|
* Maximum tokens for tool output (default: 3000).
|
|
41
85
|
* Output exceeding this limit is truncated. Uses tiktoken for accurate counting.
|
|
@@ -121,9 +165,9 @@ export interface ExecuteCommandToolConfig extends WorkspaceToolConfig {
|
|
|
121
165
|
*/
|
|
122
166
|
export type WorkspaceToolsConfig = {
|
|
123
167
|
/** Default: whether all tools are enabled (default: true if not specified) */
|
|
124
|
-
enabled?:
|
|
168
|
+
enabled?: DynamicToolConfigValue;
|
|
125
169
|
/** Default: whether all tools require user approval (default: false if not specified) */
|
|
126
|
-
requireApproval?:
|
|
170
|
+
requireApproval?: DynamicToolConfigValue<ToolConfigWithArgsContext>;
|
|
127
171
|
} & {
|
|
128
172
|
[K in typeof WORKSPACE_TOOLS.SANDBOX.EXECUTE_COMMAND]?: ExecuteCommandToolConfig;
|
|
129
173
|
} & Partial<Record<Exclude<WorkspaceToolName, typeof WORKSPACE_TOOLS.SANDBOX.EXECUTE_COMMAND>, WorkspaceToolConfig>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/workspace/tools/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAMvE;;;GAGG;AACH,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/workspace/tools/types.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAMvE;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,cAAc,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC,kHAAkH;IAClH,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,yBAA0B,SAAQ,iBAAiB;IAClE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC/B;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,MAAM,sBAAsB,CAAC,QAAQ,GAAG,iBAAiB,IAC3D,OAAO,GACP,CAAC,CAAC,OAAO,EAAE,QAAQ,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC;AAMxD;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,OAAO,CAAC,EAAE,sBAAsB,CAAC;IAEjC;;;OAGG;IACH,eAAe,CAAC,EAAE,sBAAsB,CAAC,yBAAyB,CAAC,CAAC;IAEpE;;;;;;;;;;;;;OAaG;IACH,IAAI,CAAC,EAA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C,eAAe,CAAC,CAAC,EAAE,wBAAwB;CACjF,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,CAAC,iBAAiB,EAAE,OAAO,eAAe,CAAC,OAAO,CAAC,eAAe,CAAC,EAAE,mBAAmB,CAAC,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/core",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.23.0-alpha.0",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -289,15 +289,15 @@
|
|
|
289
289
|
"vscode-jsonrpc": "^8.2.1",
|
|
290
290
|
"vscode-languageserver-protocol": "^3.17.5",
|
|
291
291
|
"zod": "^4.3.6",
|
|
292
|
-
"@internal/ai-sdk-
|
|
293
|
-
"@internal/ai-sdk-v5": "0.0.25",
|
|
294
|
-
"@internal/ai-v6": "0.0.25",
|
|
295
|
-
"@internal/lint": "0.0.78",
|
|
292
|
+
"@internal/ai-sdk-v5": "0.0.26",
|
|
296
293
|
"@internal/core": "0.0.0",
|
|
297
|
-
"@internal/external-types": "0.0.
|
|
298
|
-
"@internal/
|
|
299
|
-
"@internal/
|
|
300
|
-
"@internal/
|
|
294
|
+
"@internal/external-types": "0.0.29",
|
|
295
|
+
"@internal/ai-sdk-v4": "0.0.26",
|
|
296
|
+
"@internal/lint": "0.0.79",
|
|
297
|
+
"@internal/ai-v6": "0.0.26",
|
|
298
|
+
"@internal/llm-recorder": "0.0.15",
|
|
299
|
+
"@internal/types-builder": "0.0.54",
|
|
300
|
+
"@internal/test-utils": "0.0.15"
|
|
301
301
|
},
|
|
302
302
|
"engines": {
|
|
303
303
|
"node": ">=22.13.0"
|