mastracode 0.5.1 → 0.6.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 +70 -0
- package/dist/agents/memory.d.ts.map +1 -1
- package/dist/agents/model.d.ts +10 -4
- package/dist/agents/model.d.ts.map +1 -1
- package/dist/agents/tools.d.ts +10 -3
- package/dist/agents/tools.d.ts.map +1 -1
- package/dist/{chunk-MBPGUMYQ.cjs → chunk-DHWZYRP4.cjs} +160 -87
- package/dist/chunk-DHWZYRP4.cjs.map +1 -0
- package/dist/{chunk-JI4M5525.js → chunk-ERU7MGWJ.js} +79 -26
- package/dist/chunk-ERU7MGWJ.js.map +1 -0
- package/dist/{chunk-WKPHD54B.js → chunk-LJBYRJYF.js} +99 -27
- package/dist/chunk-LJBYRJYF.js.map +1 -0
- package/dist/{chunk-BQBVPJ6O.cjs → chunk-MILHEOOH.cjs} +806 -705
- package/dist/chunk-MILHEOOH.cjs.map +1 -0
- package/dist/{chunk-CC2724NI.js → chunk-MS5RYNRK.js} +4 -4
- package/dist/{chunk-CC2724NI.js.map → chunk-MS5RYNRK.js.map} +1 -1
- package/dist/{chunk-5KP5DITH.js → chunk-R5IR3YAY.js} +250 -149
- package/dist/chunk-R5IR3YAY.js.map +1 -0
- package/dist/{chunk-OEDRHUU5.cjs → chunk-R6JK3DE3.cjs} +4 -4
- package/dist/{chunk-OEDRHUU5.cjs.map → chunk-R6JK3DE3.cjs.map} +1 -1
- package/dist/{chunk-AJEYT7X3.cjs → chunk-UQPA3ZIP.cjs} +91 -39
- package/dist/chunk-UQPA3ZIP.cjs.map +1 -0
- package/dist/cli.cjs +12 -12
- package/dist/cli.js +3 -3
- package/dist/index.cjs +6 -2
- package/dist/index.d.ts +13 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/onboarding/settings.d.ts +4 -0
- package/dist/onboarding/settings.d.ts.map +1 -1
- package/dist/permissions-NRD36MYI.cjs +40 -0
- package/dist/{permissions-VGABAVGD.cjs.map → permissions-NRD36MYI.cjs.map} +1 -1
- package/dist/permissions-RC7CYR5H.js +3 -0
- package/dist/{permissions-S3LGXIDB.js.map → permissions-RC7CYR5H.js.map} +1 -1
- package/dist/providers/claude-max.d.ts +1 -1
- package/dist/providers/claude-max.d.ts.map +1 -1
- package/dist/providers/openai-codex.d.ts +1 -1
- package/dist/providers/openai-codex.d.ts.map +1 -1
- package/dist/schema.d.ts +4 -0
- package/dist/schema.d.ts.map +1 -1
- package/dist/tools/request-sandbox-access.d.ts +2 -2
- package/dist/tools/request-sandbox-access.d.ts.map +1 -1
- package/dist/tui/command-dispatch.d.ts.map +1 -1
- package/dist/tui/commands/index.d.ts +1 -0
- package/dist/tui/commands/index.d.ts.map +1 -1
- package/dist/tui/commands/models-pack.d.ts.map +1 -1
- package/dist/tui/commands/settings.d.ts.map +1 -1
- package/dist/tui/commands/think.d.ts.map +1 -1
- package/dist/tui/commands/update.d.ts +3 -0
- package/dist/tui/commands/update.d.ts.map +1 -0
- package/dist/tui/components/help-overlay.d.ts.map +1 -1
- package/dist/tui/handlers/prompts.d.ts +1 -1
- package/dist/tui/mastra-tui.d.ts +1 -0
- package/dist/tui/mastra-tui.d.ts.map +1 -1
- package/dist/tui/setup.d.ts.map +1 -1
- package/dist/tui.cjs +19 -19
- package/dist/tui.js +2 -2
- package/dist/utils/update-check.d.ts +1 -0
- package/dist/utils/update-check.d.ts.map +1 -1
- package/package.json +8 -8
- package/dist/chunk-5KP5DITH.js.map +0 -1
- package/dist/chunk-AJEYT7X3.cjs.map +0 -1
- package/dist/chunk-BQBVPJ6O.cjs.map +0 -1
- package/dist/chunk-JI4M5525.js.map +0 -1
- package/dist/chunk-MBPGUMYQ.cjs.map +0 -1
- package/dist/chunk-WKPHD54B.js.map +0 -1
- package/dist/permissions-S3LGXIDB.js +0 -3
- package/dist/permissions-VGABAVGD.cjs +0 -40
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,75 @@
|
|
|
1
1
|
# mastracode
|
|
2
2
|
|
|
3
|
+
## 0.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Added pre/post hook wrapping for tool execution via `HookManager`, exported `createAuthStorage` for standalone auth provider initialization, and fixed Anthropic/OpenAI auth routing to use stored credential type as the source of truth. ([#13611](https://github.com/mastra-ai/mastra/pull/13611))
|
|
8
|
+
|
|
9
|
+
**New API: `createAuthStorage`**
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
import { createAuthStorage } from 'mastracode';
|
|
13
|
+
|
|
14
|
+
const authStorage = createAuthStorage();
|
|
15
|
+
// authStorage is now wired into Claude Max and OpenAI Codex providers
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
- `disabledTools` config now also filters tools exposed to subagents, preventing bypass through delegation
|
|
19
|
+
- Auth routing uses `AuthStorage` credential type (`api_key` vs `oauth`) to correctly route API-key auth vs OAuth bearer auth
|
|
20
|
+
|
|
21
|
+
- Added /update slash command to check for and install updates directly from the TUI. Fixed update notifications logging repeatedly in the terminal — now only shown once per session. Update messages now reference /update instead of shell commands. ([#13787](https://github.com/mastra-ai/mastra/pull/13787))
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- Fixed thinking level persistence as a global preference. `/think`, Settings, and OpenAI model pack updates now save the selected level to `settings.json`, so it is kept across restarts and new threads. ([#13748](https://github.com/mastra-ai/mastra/pull/13748))
|
|
26
|
+
|
|
27
|
+
- Renamed `request_sandbox_access` tool to `request_access`. Fixed tilde paths (`~/.config/...`) not being expanded, which caused the tool to incorrectly report access as already granted. Fixed newly approved paths not being accessible until the next turn by calling `setAllowedPaths` immediately after approval. ([#13753](https://github.com/mastra-ai/mastra/pull/13753))
|
|
28
|
+
|
|
29
|
+
- Fix fatal "MASTRACODE_VERSION is not defined" error when running from source with tsx. The version constant is now gracefully resolved from package.json at runtime when the build-time define is unavailable. ([#13767](https://github.com/mastra-ai/mastra/pull/13767))
|
|
30
|
+
|
|
31
|
+
- Updated dependencies [[`41e48c1`](https://github.com/mastra-ai/mastra/commit/41e48c198eee846478e60c02ec432c19d322a517), [`82469d3`](https://github.com/mastra-ai/mastra/commit/82469d3135d5a49dd8dc8feec0ff398b4e0225a0), [`33e2fd5`](https://github.com/mastra-ai/mastra/commit/33e2fd5088f83666df17401e2da68c943dbc0448), [`7ef6e2c`](https://github.com/mastra-ai/mastra/commit/7ef6e2c61be5a42e26f55d15b5902866fc76634f), [`08072ec`](https://github.com/mastra-ai/mastra/commit/08072ec54b5dfe810ed66c0d583ae9d1a9103c11), [`ef9d0f0`](https://github.com/mastra-ai/mastra/commit/ef9d0f0fa98ff225b17afe071f5b84a9258dc142), [`b12d2a5`](https://github.com/mastra-ai/mastra/commit/b12d2a59a48be0477cabae66eb6cf0fc94a7d40d), [`9e21667`](https://github.com/mastra-ai/mastra/commit/9e2166746df81da8f1f933a918741fc52f922c70), [`fa37d39`](https://github.com/mastra-ai/mastra/commit/fa37d39910421feaf8847716292e3d65dd4f30c2), [`b12d2a5`](https://github.com/mastra-ai/mastra/commit/b12d2a59a48be0477cabae66eb6cf0fc94a7d40d), [`1391f22`](https://github.com/mastra-ai/mastra/commit/1391f227ff197080de185ac1073c1d1568c0631f), [`71c38bf`](https://github.com/mastra-ai/mastra/commit/71c38bf905905148ecd0e75c07c1f9825d299b76), [`f993c38`](https://github.com/mastra-ai/mastra/commit/f993c3848c97479b813231be872443bedeced6ab), [`f51849a`](https://github.com/mastra-ai/mastra/commit/f51849a568935122b5100b7ee69704e6d680cf7b), [`3ceb231`](https://github.com/mastra-ai/mastra/commit/3ceb2317aad7da36df5053e7c84f9381eeb68d11), [`9bf3a0d`](https://github.com/mastra-ai/mastra/commit/9bf3a0dac602787925f1762f1f0387d7b4a59620), [`cafa045`](https://github.com/mastra-ai/mastra/commit/cafa0453c9de141ad50c09a13894622dffdd9978), [`1fd9ddb`](https://github.com/mastra-ai/mastra/commit/1fd9ddbb3fe83b281b12bd2e27e426ae86288266), [`1391f22`](https://github.com/mastra-ai/mastra/commit/1391f227ff197080de185ac1073c1d1568c0631f), [`ef888d2`](https://github.com/mastra-ai/mastra/commit/ef888d23c77f85f4c202228b63f8fd9b6d9361af), [`e7a567c`](https://github.com/mastra-ai/mastra/commit/e7a567cfb3e65c955a07d0167cb1b4141f5bda01), [`3626623`](https://github.com/mastra-ai/mastra/commit/36266238eb7db78fce2ac34187194613f6f53733), [`6135ef4`](https://github.com/mastra-ai/mastra/commit/6135ef4f5288652bf45f616ec590607e4c95f443), [`d9d228c`](https://github.com/mastra-ai/mastra/commit/d9d228c0c6ae82ae6ce3b540a3a56b2b1c2b8d98), [`5576507`](https://github.com/mastra-ai/mastra/commit/55765071e360fb97e443aa0a91ccf7e1cd8d92aa), [`79d69c9`](https://github.com/mastra-ai/mastra/commit/79d69c9d5f842ff1c31352fb6026f04c1f6190f3), [`94f44b8`](https://github.com/mastra-ai/mastra/commit/94f44b827ce57b179e50f4916a84c0fa6e7f3b8c), [`13187db`](https://github.com/mastra-ai/mastra/commit/13187dbac880174232dedc5a501ff6c5d0fe59bc), [`2ae5311`](https://github.com/mastra-ai/mastra/commit/2ae531185fff66a80fa165c0999e3d801900e89d), [`6135ef4`](https://github.com/mastra-ai/mastra/commit/6135ef4f5288652bf45f616ec590607e4c95f443)]:
|
|
32
|
+
- @mastra/core@1.10.0
|
|
33
|
+
- @mastra/memory@1.6.1
|
|
34
|
+
- @mastra/mcp@1.1.0
|
|
35
|
+
- @mastra/libsql@1.6.4
|
|
36
|
+
- @mastra/pg@1.7.2
|
|
37
|
+
|
|
38
|
+
## 0.6.0-alpha.0
|
|
39
|
+
|
|
40
|
+
### Minor Changes
|
|
41
|
+
|
|
42
|
+
- Added pre/post hook wrapping for tool execution via `HookManager`, exported `createAuthStorage` for standalone auth provider initialization, and fixed Anthropic/OpenAI auth routing to use stored credential type as the source of truth. ([#13611](https://github.com/mastra-ai/mastra/pull/13611))
|
|
43
|
+
|
|
44
|
+
**New API: `createAuthStorage`**
|
|
45
|
+
|
|
46
|
+
```ts
|
|
47
|
+
import { createAuthStorage } from 'mastracode';
|
|
48
|
+
|
|
49
|
+
const authStorage = createAuthStorage();
|
|
50
|
+
// authStorage is now wired into Claude Max and OpenAI Codex providers
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
- `disabledTools` config now also filters tools exposed to subagents, preventing bypass through delegation
|
|
54
|
+
- Auth routing uses `AuthStorage` credential type (`api_key` vs `oauth`) to correctly route API-key auth vs OAuth bearer auth
|
|
55
|
+
|
|
56
|
+
- Added /update slash command to check for and install updates directly from the TUI. Fixed update notifications logging repeatedly in the terminal — now only shown once per session. Update messages now reference /update instead of shell commands. ([#13787](https://github.com/mastra-ai/mastra/pull/13787))
|
|
57
|
+
|
|
58
|
+
### Patch Changes
|
|
59
|
+
|
|
60
|
+
- Fixed thinking level persistence as a global preference. `/think`, Settings, and OpenAI model pack updates now save the selected level to `settings.json`, so it is kept across restarts and new threads. ([#13748](https://github.com/mastra-ai/mastra/pull/13748))
|
|
61
|
+
|
|
62
|
+
- Renamed `request_sandbox_access` tool to `request_access`. Fixed tilde paths (`~/.config/...`) not being expanded, which caused the tool to incorrectly report access as already granted. Fixed newly approved paths not being accessible until the next turn by calling `setAllowedPaths` immediately after approval. ([#13753](https://github.com/mastra-ai/mastra/pull/13753))
|
|
63
|
+
|
|
64
|
+
- Fix fatal "MASTRACODE_VERSION is not defined" error when running from source with tsx. The version constant is now gracefully resolved from package.json at runtime when the build-time define is unavailable. ([#13767](https://github.com/mastra-ai/mastra/pull/13767))
|
|
65
|
+
|
|
66
|
+
- Updated dependencies [[`41e48c1`](https://github.com/mastra-ai/mastra/commit/41e48c198eee846478e60c02ec432c19d322a517), [`82469d3`](https://github.com/mastra-ai/mastra/commit/82469d3135d5a49dd8dc8feec0ff398b4e0225a0), [`33e2fd5`](https://github.com/mastra-ai/mastra/commit/33e2fd5088f83666df17401e2da68c943dbc0448), [`7ef6e2c`](https://github.com/mastra-ai/mastra/commit/7ef6e2c61be5a42e26f55d15b5902866fc76634f), [`08072ec`](https://github.com/mastra-ai/mastra/commit/08072ec54b5dfe810ed66c0d583ae9d1a9103c11), [`ef9d0f0`](https://github.com/mastra-ai/mastra/commit/ef9d0f0fa98ff225b17afe071f5b84a9258dc142), [`b12d2a5`](https://github.com/mastra-ai/mastra/commit/b12d2a59a48be0477cabae66eb6cf0fc94a7d40d), [`9e21667`](https://github.com/mastra-ai/mastra/commit/9e2166746df81da8f1f933a918741fc52f922c70), [`fa37d39`](https://github.com/mastra-ai/mastra/commit/fa37d39910421feaf8847716292e3d65dd4f30c2), [`b12d2a5`](https://github.com/mastra-ai/mastra/commit/b12d2a59a48be0477cabae66eb6cf0fc94a7d40d), [`1391f22`](https://github.com/mastra-ai/mastra/commit/1391f227ff197080de185ac1073c1d1568c0631f), [`71c38bf`](https://github.com/mastra-ai/mastra/commit/71c38bf905905148ecd0e75c07c1f9825d299b76), [`f993c38`](https://github.com/mastra-ai/mastra/commit/f993c3848c97479b813231be872443bedeced6ab), [`f51849a`](https://github.com/mastra-ai/mastra/commit/f51849a568935122b5100b7ee69704e6d680cf7b), [`3ceb231`](https://github.com/mastra-ai/mastra/commit/3ceb2317aad7da36df5053e7c84f9381eeb68d11), [`9bf3a0d`](https://github.com/mastra-ai/mastra/commit/9bf3a0dac602787925f1762f1f0387d7b4a59620), [`cafa045`](https://github.com/mastra-ai/mastra/commit/cafa0453c9de141ad50c09a13894622dffdd9978), [`1fd9ddb`](https://github.com/mastra-ai/mastra/commit/1fd9ddbb3fe83b281b12bd2e27e426ae86288266), [`1391f22`](https://github.com/mastra-ai/mastra/commit/1391f227ff197080de185ac1073c1d1568c0631f), [`ef888d2`](https://github.com/mastra-ai/mastra/commit/ef888d23c77f85f4c202228b63f8fd9b6d9361af), [`e7a567c`](https://github.com/mastra-ai/mastra/commit/e7a567cfb3e65c955a07d0167cb1b4141f5bda01), [`3626623`](https://github.com/mastra-ai/mastra/commit/36266238eb7db78fce2ac34187194613f6f53733), [`6135ef4`](https://github.com/mastra-ai/mastra/commit/6135ef4f5288652bf45f616ec590607e4c95f443), [`d9d228c`](https://github.com/mastra-ai/mastra/commit/d9d228c0c6ae82ae6ce3b540a3a56b2b1c2b8d98), [`5576507`](https://github.com/mastra-ai/mastra/commit/55765071e360fb97e443aa0a91ccf7e1cd8d92aa), [`79d69c9`](https://github.com/mastra-ai/mastra/commit/79d69c9d5f842ff1c31352fb6026f04c1f6190f3), [`94f44b8`](https://github.com/mastra-ai/mastra/commit/94f44b827ce57b179e50f4916a84c0fa6e7f3b8c), [`13187db`](https://github.com/mastra-ai/mastra/commit/13187dbac880174232dedc5a501ff6c5d0fe59bc), [`2ae5311`](https://github.com/mastra-ai/mastra/commit/2ae531185fff66a80fa165c0999e3d801900e89d), [`6135ef4`](https://github.com/mastra-ai/mastra/commit/6135ef4f5288652bf45f616ec590607e4c95f443)]:
|
|
67
|
+
- @mastra/core@1.10.0-alpha.0
|
|
68
|
+
- @mastra/memory@1.6.1-alpha.0
|
|
69
|
+
- @mastra/mcp@1.1.0-alpha.0
|
|
70
|
+
- @mastra/libsql@1.6.4-alpha.0
|
|
71
|
+
- @mastra/pg@1.7.2-alpha.0
|
|
72
|
+
|
|
3
73
|
## 0.5.1
|
|
4
74
|
|
|
5
75
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../src/agents/memory.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAmCxC;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,oBAAoB,IACpD,oBAAoB;IAAE,cAAc,EAAE,cAAc,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"memory.d.ts","sourceRoot":"","sources":["../../src/agents/memory.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAmCxC;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,oBAAoB,IACpD,oBAAoB;IAAE,cAAc,EAAE,cAAc,CAAA;CAAE,YAyC/D"}
|
package/dist/agents/model.d.ts
CHANGED
|
@@ -1,22 +1,28 @@
|
|
|
1
1
|
import { createAnthropic } from '@ai-sdk/anthropic';
|
|
2
|
+
import { createOpenAI } from '@ai-sdk/openai';
|
|
2
3
|
import { ModelRouterLanguageModel } from '@mastra/core/llm';
|
|
3
4
|
import type { RequestContext } from '@mastra/core/request-context';
|
|
4
5
|
import { opencodeClaudeMaxProvider } from '../providers/claude-max.js';
|
|
5
6
|
import { openaiCodexProvider } from '../providers/openai-codex.js';
|
|
6
7
|
import type { ThinkingLevel } from '../providers/openai-codex.js';
|
|
7
|
-
type ResolvedModel = ReturnType<typeof openaiCodexProvider> | ReturnType<typeof opencodeClaudeMaxProvider> | ModelRouterLanguageModel | ReturnType<ReturnType<typeof createAnthropic>>;
|
|
8
|
+
type ResolvedModel = ReturnType<typeof openaiCodexProvider> | ReturnType<typeof opencodeClaudeMaxProvider> | ModelRouterLanguageModel | ReturnType<ReturnType<typeof createAnthropic>> | ReturnType<ReturnType<typeof createOpenAI>>;
|
|
8
9
|
export declare function remapOpenAIModelForCodexOAuth(modelId: string): string;
|
|
9
10
|
/**
|
|
10
|
-
* Resolve the Anthropic API key from
|
|
11
|
+
* Resolve the Anthropic API key from stored credentials.
|
|
11
12
|
* Returns the key if available, undefined otherwise.
|
|
12
13
|
*/
|
|
13
14
|
export declare function getAnthropicApiKey(): string | undefined;
|
|
15
|
+
/**
|
|
16
|
+
* Resolve the OpenAI API key from stored credentials.
|
|
17
|
+
* Returns the key if available, undefined otherwise.
|
|
18
|
+
*/
|
|
19
|
+
export declare function getOpenAIApiKey(): string | undefined;
|
|
14
20
|
/**
|
|
15
21
|
* Resolve a model ID to the correct provider instance.
|
|
16
22
|
* Shared by the main agent, observer, and reflector.
|
|
17
23
|
*
|
|
18
|
-
* - For anthropic/* models:
|
|
19
|
-
* - For openai/* models
|
|
24
|
+
* - For anthropic/* models: Uses stored OAuth credentials when present, otherwise direct API key
|
|
25
|
+
* - For openai/* models: Uses OAuth when configured, otherwise direct API key from AuthStorage
|
|
20
26
|
* - For moonshotai/* models: Uses Moonshot AI Anthropic-compatible endpoint
|
|
21
27
|
* - For all other providers: Uses Mastra's model router (models.dev gateway)
|
|
22
28
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/agents/model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/agents/model.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAG9C,OAAO,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAInE,OAAO,EAAE,yBAAyB,EAAyB,MAAM,4BAA4B,CAAC;AAC9F,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAelE,KAAK,aAAa,GACd,UAAU,CAAC,OAAO,mBAAmB,CAAC,GACtC,UAAU,CAAC,OAAO,yBAAyB,CAAC,GAC5C,wBAAwB,GACxB,UAAU,CAAC,UAAU,CAAC,OAAO,eAAe,CAAC,CAAC,GAC9C,UAAU,CAAC,UAAU,CAAC,OAAO,YAAY,CAAC,CAAC,CAAC;AAEhD,wBAAgB,6BAA6B,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAiBrE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,GAAG,SAAS,CAOvD;AAED;;;GAGG;AACH,wBAAgB,eAAe,IAAI,MAAM,GAAG,SAAS,CAMpD;AAyBD;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE;IAAE,aAAa,CAAC,EAAE,aAAa,CAAC;IAAC,kBAAkB,CAAC,EAAE,OAAO,CAAA;CAAE,GACxE,aAAa,CAyEf;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,EAAE,cAAc,EAAE,EAAE;IAAE,cAAc,EAAE,cAAc,CAAA;CAAE,GAAG,aAAa,CAWrG"}
|
package/dist/agents/tools.d.ts
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
1
|
import type { RequestContext } from '@mastra/core/request-context';
|
|
2
|
+
import type { HookManager } from '../hooks/index.js';
|
|
2
3
|
import type { McpManager } from '../mcp/index.js';
|
|
3
|
-
|
|
4
|
+
/** Minimal shape for tools passed to createDynamicTools. */
|
|
5
|
+
interface ToolLike {
|
|
6
|
+
execute?: (input: unknown, context?: unknown) => Promise<unknown> | unknown;
|
|
7
|
+
[key: string]: unknown;
|
|
8
|
+
}
|
|
9
|
+
export declare function createDynamicTools(mcpManager?: McpManager, extraTools?: Record<string, ToolLike> | ((ctx: {
|
|
4
10
|
requestContext: RequestContext;
|
|
5
|
-
}) => Record<string,
|
|
11
|
+
}) => Record<string, ToolLike>), hookManager?: HookManager, disabledTools?: string[]): ({ requestContext }: {
|
|
6
12
|
requestContext: RequestContext;
|
|
7
|
-
}) => Record<string,
|
|
13
|
+
}) => Record<string, ToolLike>;
|
|
14
|
+
export {};
|
|
8
15
|
//# sourceMappingURL=tools.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/agents/tools.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAIzC,wBAAgB,kBAAkB,CAChC,UAAU,CAAC,EAAE,UAAU,EACvB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/agents/tools.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAIzC,4DAA4D;AAC5D,UAAU,QAAQ;IAChB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,CAAC;IAC5E,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAmCD,wBAAgB,kBAAkB,CAChC,UAAU,CAAC,EAAE,UAAU,EACvB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE;IAAE,cAAc,EAAE,cAAc,CAAA;CAAE,KAAK,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,EAC/G,WAAW,CAAC,EAAE,WAAW,EACzB,aAAa,CAAC,EAAE,MAAM,EAAE,IAEQ,oBAAoB;IAAE,cAAc,EAAE,cAAc,CAAA;CAAE,8BA+DvF"}
|