@composio/core 0.11.0 → 0.12.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.
Files changed (69) hide show
  1. package/dist/{BaseProvider-CVbQxTNa.d.cts → BaseProvider-BBnsv9kS.d.mts} +139 -92
  2. package/dist/CustomTool-DEB4BQPl.mjs +468 -0
  3. package/dist/{CustomTool-C-IUByoU.d.cts → CustomTool-DH18rVQu.d.mts} +2 -4
  4. package/dist/{FileModifierErrors-C7z16Dfi.mjs → FileModifierErrors-3fSwIWoa.mjs} +35 -36
  5. package/dist/{Telemetry-DQax33Gh.mjs → Telemetry-DhGI_J4G.mjs} +15 -15
  6. package/dist/{composio-pcA13w87.d.cts → composio-CHnEggnv.d.mts} +394 -349
  7. package/dist/{customTool.types-QtkAZQma.d.cts → customTool.types-DpIdOJjL.d.mts} +171 -192
  8. package/dist/{CustomTool-D5s-aADw.mjs → errors-D5f4pfvI.mjs} +70 -457
  9. package/dist/experimental/index.d.mts +2 -3
  10. package/dist/experimental/index.mjs +1 -3
  11. package/dist/{fileUtils.node-Dq7ebZPC.mjs → fileUtils.node-BiO1JQsJ.mjs} +26 -25
  12. package/dist/index.d.mts +1685 -2400
  13. package/dist/index.mjs +2238 -1912
  14. package/dist/jsonSchema-daqF3S3d.mjs +251 -0
  15. package/dist/models/Files.node.d.mts +1 -2
  16. package/dist/models/Files.node.mjs +3 -4
  17. package/dist/models/Files.workerd.d.mts +0 -1
  18. package/dist/platform/node.d.mts +1 -2
  19. package/dist/platform/workerd.d.mts +1 -2
  20. package/dist/{chunk-CWQeghP5.mjs → rolldown-runtime-w6R9maHv.mjs} +3 -5
  21. package/dist/{types-J2KCXP8R.d.mts → types-CaI5Z4PA.d.mts} +2 -3
  22. package/dist/utils/config-defaults/ConfigDefaults.node.d.mts +1 -4
  23. package/dist/utils/config-defaults/ConfigDefaults.workerd.d.mts +1 -4
  24. package/dist/utils/config-defaults/ConfigDefaults.workerd.mjs +3 -0
  25. package/dist/utils/json-schema.d.mts +2 -0
  26. package/dist/utils/json-schema.mjs +3 -0
  27. package/dist/utils/modifiers/FileToolModifier.node.d.mts +3 -1
  28. package/dist/utils/modifiers/FileToolModifier.node.mjs +44 -24
  29. package/dist/utils/modifiers/FileToolModifier.workerd.d.mts +3 -1
  30. package/dist/utils/modifiers/FileToolModifier.workerd.mjs +1 -1
  31. package/package.json +39 -88
  32. package/dist/BaseProvider-BvHvJLXc.d.mts +0 -29378
  33. package/dist/CustomTool-CChQSp44.d.mts +0 -76
  34. package/dist/CustomTool-D3-NreIm.cjs +0 -1341
  35. package/dist/FileModifierErrors-BYJBHiay.cjs +0 -554
  36. package/dist/FileToolModifier.utils.neutral-DSBQs9-i.cjs +0 -96
  37. package/dist/Telemetry-BQ_pl5AK.cjs +0 -360
  38. package/dist/buffer-BjWptbNH.cjs +0 -63
  39. package/dist/chunk-CQwRTUmo.cjs +0 -53
  40. package/dist/composio-BlASKqjQ.d.mts +0 -5437
  41. package/dist/customTool.types-DLIORcYN.d.mts +0 -2475
  42. package/dist/experimental/index.cjs +0 -5
  43. package/dist/experimental/index.d.cts +0 -3
  44. package/dist/fileUtils.node-DtnSRMWa.cjs +0 -462
  45. package/dist/files.types-lo4zZd87.d.cts +0 -17
  46. package/dist/index.cjs +0 -8523
  47. package/dist/index.d.cts +0 -6065
  48. package/dist/models/Files.node.cjs +0 -55
  49. package/dist/models/Files.node.d.cts +0 -56
  50. package/dist/models/Files.workerd.cjs +0 -29
  51. package/dist/models/Files.workerd.d.cts +0 -13
  52. package/dist/platform/node.cjs +0 -55
  53. package/dist/platform/node.d.cts +0 -11
  54. package/dist/platform/workerd.cjs +0 -42
  55. package/dist/platform/workerd.d.cts +0 -12
  56. package/dist/types-DRG5qLxI.d.cts +0 -13
  57. package/dist/types-pDNm1lYs.d.cts +0 -69
  58. package/dist/utils/config-defaults/ConfigDefaults.node.cjs +0 -10
  59. package/dist/utils/config-defaults/ConfigDefaults.node.d.cts +0 -7
  60. package/dist/utils/config-defaults/ConfigDefaults.workerd.cjs +0 -10
  61. package/dist/utils/config-defaults/ConfigDefaults.workerd.d.cts +0 -7
  62. package/dist/utils/modifiers/FileToolModifier.node.cjs +0 -224
  63. package/dist/utils/modifiers/FileToolModifier.node.d.cts +0 -22
  64. package/dist/utils/modifiers/FileToolModifier.workerd.cjs +0 -27
  65. package/dist/utils/modifiers/FileToolModifier.workerd.d.cts +0 -20
  66. /package/dist/{FileToolModifier.utils.neutral-BpSceNK8.mjs → FileToolModifier.utils.neutral-B5rT711M.mjs} +0 -0
  67. /package/dist/{buffer-yOtEsT4J.mjs → buffer-PcbMMsgm.mjs} +0 -0
  68. /package/dist/{files.types-BXDWA_zS.d.mts → files.types-DeMC_mAW.d.mts} +0 -0
  69. /package/dist/{types-HpJQ8K9l.d.mts → types-DdoCRzLj.d.mts} +0 -0
@@ -1,76 +0,0 @@
1
- import { a as CustomTool, d as CustomToolkit, i as CreateCustomToolkitParams, n as CreateCustomToolParams } from "./customTool.types-DLIORcYN.mjs";
2
- import { z as z$1 } from "zod/v3";
3
- import { SessionCreateResponse } from "@composio/client/resources/tool-router/session/session.mjs";
4
-
5
- //#region src/models/CustomTool.d.ts
6
-
7
- /**
8
- * Create a custom tool for use in tool router sessions.
9
- *
10
- * The returned object is a lightweight reference containing the tool's metadata
11
- * and execute function. Pass it to `composio.create(userId, { experimental: { customTools: [...] } })`
12
- * to bind it to a session.
13
- *
14
- * Just return the result data from `execute`, or throw an error.
15
- * The SDK wraps it into the standard response format internally.
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
- *
22
- * @param slug - Unique tool identifier (alphanumeric, underscores, hyphens; no LOCAL_ or COMPOSIO_ prefix)
23
- * @param options - Tool definition including name, schema, and execute function
24
- * @returns A CustomTool to pass to session creation
25
- *
26
- * @example Standalone tool (no auth)
27
- * ```typescript
28
- * const grep = createCustomTool('GREP', {
29
- * name: 'Grep Search',
30
- * description: 'Search for patterns in files',
31
- * inputParams: z.object({ pattern: z.string(), path: z.string() }),
32
- * execute: async (input) => ({ matches: [] }),
33
- * });
34
- * ```
35
- *
36
- * @example Tool extending a Composio toolkit (inherits auth)
37
- * ```typescript
38
- * const getImportant = createCustomTool('GET_IMPORTANT_EMAILS', {
39
- * name: 'Get Important Emails',
40
- * description: 'Fetch high-priority emails',
41
- * extendsToolkit: 'gmail',
42
- * inputParams: z.object({ limit: z.number().default(10) }),
43
- * execute: async (input, ctx) => {
44
- * // Same response shape as session.execute(): { data, error, logId }
45
- * const result = await ctx.execute('GMAIL_SEARCH', { query: 'is:important' });
46
- * return { emails: result.data };
47
- * },
48
- * });
49
- * ```
50
- */
51
- declare function createCustomTool<T extends z$1.ZodType>(slug: string, options: CreateCustomToolParams<T>): CustomTool;
52
- /**
53
- * Create a custom toolkit that groups related tools.
54
- *
55
- * Tools passed here must NOT have `extendsToolkit` set — they inherit the toolkit identity instead.
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
- *
61
- * @param slug - Unique toolkit identifier (alphanumeric, underscores, hyphens; no LOCAL_ or COMPOSIO_ prefix)
62
- * @param options - Toolkit definition including name, description, and tools
63
- * @returns A CustomToolkit to pass to session creation
64
- *
65
- * @example
66
- * ```typescript
67
- * const devTools = createCustomToolkit('DEV_TOOLS', {
68
- * name: 'Dev Tools',
69
- * description: 'Local dev utilities',
70
- * tools: [grepTool, sedTool],
71
- * });
72
- * ```
73
- */
74
- declare function createCustomToolkit(slug: string, options: CreateCustomToolkitParams): CustomToolkit;
75
- //#endregion
76
- export { createCustomToolkit as n, createCustomTool as t };