Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 21, 03:37 UTC
| 1 | import { Schema } from 'effect'; |
| 2 | import { pythonVersion } from './channel'; |
| 3 | |
| 4 | export const Language = Schema.Literals(['typescript', 'python']); |
| 5 | export type Language = typeof Language.Type; |
| 6 | export const LANGUAGES = Language.literals; |
| 7 | export const NPM_REGISTRY = 'https://registry.npmjs.org'; |
| 8 | |
| 9 | /** Private workspace package whose Changesets version drives the synchronized Python train. */ |
| 10 | export const PYTHON_RELEASE_MARKER = '@composio/python-sdk'; |
| 11 | |
| 12 | export const languageOf = (name: string): Language => |
| 13 | name === PYTHON_RELEASE_MARKER ? 'python' : 'typescript'; |
| 14 | |
| 15 | /** Packages a maintenance release bumps when a language has no recorded change. */ |
| 16 | export const PRIMARY_TARGETS: Record<Language, ReadonlyArray<string>> = { |
| 17 | typescript: ['@composio/core', '@composio/slim'], |
| 18 | python: [PYTHON_RELEASE_MARKER], |
| 19 | }; |
| 20 | |
| 21 | /** How each language's registry spells a planned version. */ |
| 22 | export const REGISTRY_VERSION: Record<Language, (version: string) => string> = { |
| 23 | typescript: version => version, |
| 24 | python: pythonVersion, |
| 25 | }; |
| 26 | |
| 27 | /** Where each language's registry serves metadata and files. */ |
| 28 | export const REGISTRY_LANES: Record< |
| 29 | Language, |
| 30 | { |
| 31 | /** Host that serves the lane's public distribution files. */ |
| 32 | readonly downloadHost: string; |
| 33 | /** Public metadata URL for one package version. */ |
| 34 | readonly versionUrl: (name: string, version: string) => string; |
| 35 | } |
| 36 | > = { |
| 37 | typescript: { |
| 38 | downloadHost: 'registry.npmjs.org', |
| 39 | versionUrl: (name, version) => `${NPM_REGISTRY}/${encodeURIComponent(name)}/${version}`, |
| 40 | }, |
| 41 | python: { |
| 42 | downloadHost: 'files.pythonhosted.org', |
| 43 | versionUrl: (name, version) => `https://pypi.org/pypi/${name}/${version}/json`, |
| 44 | }, |
| 45 | }; |