@composio/core 0.6.6 → 0.6.8

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.
Files changed (29) hide show
  1. package/dist/{CustomTool-B3_zC62q.mjs → CustomTool-AYNimqhf.mjs} +10 -0
  2. package/dist/{CustomTool-CrOHWVUC.d.cts → CustomTool-B0B7kvyW.d.cts} +11 -1
  3. package/dist/{CustomTool-CMTb-q46.cjs → CustomTool-Cyo1aJ2l.cjs} +10 -0
  4. package/dist/{CustomTool-Bl7vtddU.d.mts → CustomTool-nLGl-RUg.d.mts} +11 -1
  5. package/dist/{composio-Cgg0LHCQ.d.cts → composio-C9ZY8W1y.d.cts} +180 -180
  6. package/dist/{composio-DyBF5dV-.d.mts → composio-DILWMxRU.d.mts} +180 -180
  7. package/dist/{customTool.types-CA8_4pl5.d.mts → customTool.types-B-4lZeSS.d.mts} +18 -12
  8. package/dist/{customTool.types-C3S5Q0_6.d.cts → customTool.types-CfFdeYee.d.cts} +18 -12
  9. package/dist/experimental/index.cjs +1 -1
  10. package/dist/experimental/index.d.cts +2 -2
  11. package/dist/experimental/index.d.mts +3 -3
  12. package/dist/experimental/index.mjs +1 -1
  13. package/dist/index.cjs +40 -17
  14. package/dist/index.d.cts +5 -5
  15. package/dist/index.d.mts +5 -5
  16. package/dist/index.mjs +40 -17
  17. package/dist/{tool.types-Ci7pnud8.d.cts → tool.types-BWc7GUrD.d.cts} +18 -18
  18. package/dist/{tool.types-G0Kzw_GF.d.mts → tool.types-bencsexi.d.mts} +18 -18
  19. package/dist/{types-CyDYfq9G.d.mts → types-CKcBI3lc.d.mts} +2 -2
  20. package/dist/{types-DStxAk8G.d.cts → types-CpfFMvWX.d.cts} +2 -2
  21. package/dist/utils/config-defaults/ConfigDefaults.node.d.cts +2 -2
  22. package/dist/utils/config-defaults/ConfigDefaults.node.d.mts +4 -4
  23. package/dist/utils/config-defaults/ConfigDefaults.workerd.d.cts +2 -2
  24. package/dist/utils/config-defaults/ConfigDefaults.workerd.d.mts +4 -4
  25. package/dist/utils/modifiers/FileToolModifier.node.d.cts +1 -1
  26. package/dist/utils/modifiers/FileToolModifier.node.d.mts +1 -1
  27. package/dist/utils/modifiers/FileToolModifier.workerd.d.cts +1 -1
  28. package/dist/utils/modifiers/FileToolModifier.workerd.d.mts +1 -1
  29. package/package.json +1 -1
@@ -558,6 +558,11 @@ function validateSlugLength(toolSlug, toolkitSlug, context) {
558
558
  * Just return the result data from `execute`, or throw an error.
559
559
  * The SDK wraps it into the standard response format internally.
560
560
  *
561
+ * **Slug naming:** The slug you provide is automatically prefixed with `LOCAL_` when
562
+ * exposed to the agent (e.g. `'GREP'` becomes `LOCAL_GREP`). If the tool is inside a
563
+ * custom toolkit, the toolkit slug is also included (e.g. `LOCAL_DEV_TOOLS_GREP`).
564
+ * The `LOCAL_` prefix is reserved and cannot be used in your slug.
565
+ *
561
566
  * @param slug - Unique tool identifier (alphanumeric, underscores, hyphens; no LOCAL_ or COMPOSIO_ prefix)
562
567
  * @param options - Tool definition including name, schema, and execute function
563
568
  * @returns A CustomTool to pass to session creation
@@ -580,6 +585,7 @@ function validateSlugLength(toolSlug, toolkitSlug, context) {
580
585
  * extendsToolkit: 'gmail',
581
586
  * inputParams: z.object({ limit: z.number().default(10) }),
582
587
  * execute: async (input, ctx) => {
588
+ * // Same response shape as session.execute(): { data, error, logId }
583
589
  * const result = await ctx.execute('GMAIL_SEARCH', { query: 'is:important' });
584
590
  * return { emails: result.data };
585
591
  * },
@@ -619,6 +625,10 @@ function createCustomTool(slug, options) {
619
625
  *
620
626
  * Tools passed here must NOT have `extendsToolkit` set — they inherit the toolkit identity instead.
621
627
  *
628
+ * **Slug naming:** The toolkit slug becomes part of the final tool slug exposed to the agent.
629
+ * For example, a toolkit `'DEV_TOOLS'` with a tool `'GREP'` produces `LOCAL_DEV_TOOLS_GREP`.
630
+ * The `LOCAL_` prefix is reserved and cannot be used in your slug.
631
+ *
622
632
  * @param slug - Unique toolkit identifier (alphanumeric, underscores, hyphens; no LOCAL_ or COMPOSIO_ prefix)
623
633
  * @param options - Toolkit definition including name, description, and tools
624
634
  * @returns A CustomToolkit to pass to session creation
@@ -1,4 +1,4 @@
1
- import { a as CustomTool, i as CreateCustomToolkitParams, m as CustomToolkit, n as CreateCustomToolParams } from "./customTool.types-C3S5Q0_6.cjs";
1
+ import { a as CustomTool, i as CreateCustomToolkitParams, m as CustomToolkit, n as CreateCustomToolParams } from "./customTool.types-CfFdeYee.cjs";
2
2
  import { z } from "zod/v3";
3
3
  import { SessionCreateResponse } from "@composio/client/resources/tool-router/session/session.mjs";
4
4
 
@@ -14,6 +14,11 @@ import { SessionCreateResponse } from "@composio/client/resources/tool-router/se
14
14
  * Just return the result data from `execute`, or throw an error.
15
15
  * The SDK wraps it into the standard response format internally.
16
16
  *
17
+ * **Slug naming:** The slug you provide is automatically prefixed with `LOCAL_` when
18
+ * exposed to the agent (e.g. `'GREP'` becomes `LOCAL_GREP`). If the tool is inside a
19
+ * custom toolkit, the toolkit slug is also included (e.g. `LOCAL_DEV_TOOLS_GREP`).
20
+ * The `LOCAL_` prefix is reserved and cannot be used in your slug.
21
+ *
17
22
  * @param slug - Unique tool identifier (alphanumeric, underscores, hyphens; no LOCAL_ or COMPOSIO_ prefix)
18
23
  * @param options - Tool definition including name, schema, and execute function
19
24
  * @returns A CustomTool to pass to session creation
@@ -36,6 +41,7 @@ import { SessionCreateResponse } from "@composio/client/resources/tool-router/se
36
41
  * extendsToolkit: 'gmail',
37
42
  * inputParams: z.object({ limit: z.number().default(10) }),
38
43
  * execute: async (input, ctx) => {
44
+ * // Same response shape as session.execute(): { data, error, logId }
39
45
  * const result = await ctx.execute('GMAIL_SEARCH', { query: 'is:important' });
40
46
  * return { emails: result.data };
41
47
  * },
@@ -48,6 +54,10 @@ declare function createCustomTool<T extends z.ZodType>(slug: string, options: Cr
48
54
  *
49
55
  * Tools passed here must NOT have `extendsToolkit` set — they inherit the toolkit identity instead.
50
56
  *
57
+ * **Slug naming:** The toolkit slug becomes part of the final tool slug exposed to the agent.
58
+ * For example, a toolkit `'DEV_TOOLS'` with a tool `'GREP'` produces `LOCAL_DEV_TOOLS_GREP`.
59
+ * The `LOCAL_` prefix is reserved and cannot be used in your slug.
60
+ *
51
61
  * @param slug - Unique toolkit identifier (alphanumeric, underscores, hyphens; no LOCAL_ or COMPOSIO_ prefix)
52
62
  * @param options - Toolkit definition including name, description, and tools
53
63
  * @returns A CustomToolkit to pass to session creation
@@ -560,6 +560,11 @@ function validateSlugLength(toolSlug, toolkitSlug, context) {
560
560
  * Just return the result data from `execute`, or throw an error.
561
561
  * The SDK wraps it into the standard response format internally.
562
562
  *
563
+ * **Slug naming:** The slug you provide is automatically prefixed with `LOCAL_` when
564
+ * exposed to the agent (e.g. `'GREP'` becomes `LOCAL_GREP`). If the tool is inside a
565
+ * custom toolkit, the toolkit slug is also included (e.g. `LOCAL_DEV_TOOLS_GREP`).
566
+ * The `LOCAL_` prefix is reserved and cannot be used in your slug.
567
+ *
563
568
  * @param slug - Unique tool identifier (alphanumeric, underscores, hyphens; no LOCAL_ or COMPOSIO_ prefix)
564
569
  * @param options - Tool definition including name, schema, and execute function
565
570
  * @returns A CustomTool to pass to session creation
@@ -582,6 +587,7 @@ function validateSlugLength(toolSlug, toolkitSlug, context) {
582
587
  * extendsToolkit: 'gmail',
583
588
  * inputParams: z.object({ limit: z.number().default(10) }),
584
589
  * execute: async (input, ctx) => {
590
+ * // Same response shape as session.execute(): { data, error, logId }
585
591
  * const result = await ctx.execute('GMAIL_SEARCH', { query: 'is:important' });
586
592
  * return { emails: result.data };
587
593
  * },
@@ -621,6 +627,10 @@ function createCustomTool(slug, options) {
621
627
  *
622
628
  * Tools passed here must NOT have `extendsToolkit` set — they inherit the toolkit identity instead.
623
629
  *
630
+ * **Slug naming:** The toolkit slug becomes part of the final tool slug exposed to the agent.
631
+ * For example, a toolkit `'DEV_TOOLS'` with a tool `'GREP'` produces `LOCAL_DEV_TOOLS_GREP`.
632
+ * The `LOCAL_` prefix is reserved and cannot be used in your slug.
633
+ *
624
634
  * @param slug - Unique toolkit identifier (alphanumeric, underscores, hyphens; no LOCAL_ or COMPOSIO_ prefix)
625
635
  * @param options - Toolkit definition including name, description, and tools
626
636
  * @returns A CustomToolkit to pass to session creation
@@ -1,4 +1,4 @@
1
- import { a as CustomTool, i as CreateCustomToolkitParams, m as CustomToolkit, n as CreateCustomToolParams } from "./customTool.types-CA8_4pl5.mjs";
1
+ import { a as CustomTool, i as CreateCustomToolkitParams, m as CustomToolkit, n as CreateCustomToolParams } from "./customTool.types-B-4lZeSS.mjs";
2
2
  import { z as z$1 } from "zod/v3";
3
3
  import { SessionCreateResponse } from "@composio/client/resources/tool-router/session/session.mjs";
4
4
 
@@ -14,6 +14,11 @@ import { SessionCreateResponse } from "@composio/client/resources/tool-router/se
14
14
  * Just return the result data from `execute`, or throw an error.
15
15
  * The SDK wraps it into the standard response format internally.
16
16
  *
17
+ * **Slug naming:** The slug you provide is automatically prefixed with `LOCAL_` when
18
+ * exposed to the agent (e.g. `'GREP'` becomes `LOCAL_GREP`). If the tool is inside a
19
+ * custom toolkit, the toolkit slug is also included (e.g. `LOCAL_DEV_TOOLS_GREP`).
20
+ * The `LOCAL_` prefix is reserved and cannot be used in your slug.
21
+ *
17
22
  * @param slug - Unique tool identifier (alphanumeric, underscores, hyphens; no LOCAL_ or COMPOSIO_ prefix)
18
23
  * @param options - Tool definition including name, schema, and execute function
19
24
  * @returns A CustomTool to pass to session creation
@@ -36,6 +41,7 @@ import { SessionCreateResponse } from "@composio/client/resources/tool-router/se
36
41
  * extendsToolkit: 'gmail',
37
42
  * inputParams: z.object({ limit: z.number().default(10) }),
38
43
  * execute: async (input, ctx) => {
44
+ * // Same response shape as session.execute(): { data, error, logId }
39
45
  * const result = await ctx.execute('GMAIL_SEARCH', { query: 'is:important' });
40
46
  * return { emails: result.data };
41
47
  * },
@@ -48,6 +54,10 @@ declare function createCustomTool<T extends z$1.ZodType>(slug: string, options:
48
54
  *
49
55
  * Tools passed here must NOT have `extendsToolkit` set — they inherit the toolkit identity instead.
50
56
  *
57
+ * **Slug naming:** The toolkit slug becomes part of the final tool slug exposed to the agent.
58
+ * For example, a toolkit `'DEV_TOOLS'` with a tool `'GREP'` produces `LOCAL_DEV_TOOLS_GREP`.
59
+ * The `LOCAL_` prefix is reserved and cannot be used in your slug.
60
+ *
51
61
  * @param slug - Unique toolkit identifier (alphanumeric, underscores, hyphens; no LOCAL_ or COMPOSIO_ prefix)
52
62
  * @param options - Toolkit definition including name, description, and tools
53
63
  * @returns A CustomToolkit to pass to session creation