@composio/core 0.1.6-alpha.0 → 0.1.9-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/README.md +3 -3
- package/dist/index.cjs +1271 -757
- package/dist/index.d.cts +598 -347
- package/dist/index.d.ts +598 -347
- package/dist/index.js +1239 -727
- package/package.json +4 -6
- package/src/index.ts +23 -0
package/README.md
CHANGED
|
@@ -70,7 +70,7 @@ Schema modifiers allow you to transform tool schemas before they are used:
|
|
|
70
70
|
|
|
71
71
|
```typescript
|
|
72
72
|
const tool = await composio.tools.get('user123', 'HACKERNEWS_SEARCH_POSTS', {
|
|
73
|
-
modifyToolSchema: (toolSlug: string, tool: Tool) => ({
|
|
73
|
+
modifyToolSchema: (toolSlug: string, toolkitSlug: string, tool: Tool) => ({
|
|
74
74
|
...tool,
|
|
75
75
|
description: 'Enhanced HackerNews search with additional features',
|
|
76
76
|
inputParameters: {
|
|
@@ -92,7 +92,7 @@ For agentic toolsets (like Vercel AI and Langchain), you can also modify tool ex
|
|
|
92
92
|
```typescript
|
|
93
93
|
const tool = await composio.tools.get('user123', 'HACKERNEWS_SEARCH_POSTS', {
|
|
94
94
|
// Transform input before execution
|
|
95
|
-
beforeToolExecute: (toolSlug: string, params: ToolExecuteParams) => ({
|
|
95
|
+
beforeToolExecute: (toolSlug: string, toolkitSlug: string, params: ToolExecuteParams) => ({
|
|
96
96
|
...params,
|
|
97
97
|
arguments: {
|
|
98
98
|
...params.arguments,
|
|
@@ -101,7 +101,7 @@ const tool = await composio.tools.get('user123', 'HACKERNEWS_SEARCH_POSTS', {
|
|
|
101
101
|
}),
|
|
102
102
|
|
|
103
103
|
// Transform output after execution
|
|
104
|
-
afterToolExecute: (toolSlug: string, response: ToolExecuteResponse) => ({
|
|
104
|
+
afterToolExecute: (toolSlug: string, toolkitSlug: string, response: ToolExecuteResponse) => ({
|
|
105
105
|
...response,
|
|
106
106
|
data: {
|
|
107
107
|
...response.data,
|