@evolinkai/mcp 0.0.0-stage → 1.4.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/LICENSE +178 -0
- package/README.md +67 -2
- package/dist/core/src/branding.d.ts +3 -0
- package/dist/core/src/branding.d.ts.map +1 -0
- package/dist/core/src/branding.js +8 -0
- package/dist/core/src/branding.js.map +1 -0
- package/dist/core/src/config.d.ts +19 -0
- package/dist/core/src/config.d.ts.map +1 -0
- package/dist/core/src/config.js +90 -0
- package/dist/core/src/config.js.map +1 -0
- package/dist/core/src/data/model-params.d.ts +49 -0
- package/dist/core/src/data/model-params.d.ts.map +1 -0
- package/dist/core/src/data/model-params.generated.d.ts +2 -0
- package/dist/core/src/data/model-params.generated.d.ts.map +1 -0
- package/dist/core/src/data/model-params.generated.js +3 -0
- package/dist/core/src/data/model-params.generated.js.map +1 -0
- package/dist/core/src/data/model-params.js +22 -0
- package/dist/core/src/data/model-params.js.map +1 -0
- package/dist/core/src/request-context.d.ts +79 -0
- package/dist/core/src/request-context.d.ts.map +1 -0
- package/dist/core/src/request-context.js +52 -0
- package/dist/core/src/request-context.js.map +1 -0
- package/dist/core/src/server.d.ts +36 -0
- package/dist/core/src/server.d.ts.map +1 -0
- package/dist/core/src/server.js +123 -0
- package/dist/core/src/server.js.map +1 -0
- package/dist/core/src/services/api-client.d.ts +142 -0
- package/dist/core/src/services/api-client.d.ts.map +1 -0
- package/dist/core/src/services/api-client.js +179 -0
- package/dist/core/src/services/api-client.js.map +1 -0
- package/dist/core/src/services/error-handler.d.ts +51 -0
- package/dist/core/src/services/error-handler.d.ts.map +1 -0
- package/dist/core/src/services/error-handler.js +403 -0
- package/dist/core/src/services/error-handler.js.map +1 -0
- package/dist/core/src/services/file-client.d.ts +54 -0
- package/dist/core/src/services/file-client.d.ts.map +1 -0
- package/dist/core/src/services/file-client.js +131 -0
- package/dist/core/src/services/file-client.js.map +1 -0
- package/dist/core/src/services/http-policy.d.ts +40 -0
- package/dist/core/src/services/http-policy.d.ts.map +1 -0
- package/dist/core/src/services/http-policy.js +120 -0
- package/dist/core/src/services/http-policy.js.map +1 -0
- package/dist/core/src/services/media-preview.d.ts +24 -0
- package/dist/core/src/services/media-preview.d.ts.map +1 -0
- package/dist/core/src/services/media-preview.js +155 -0
- package/dist/core/src/services/media-preview.js.map +1 -0
- package/dist/core/src/services/model-catalog.d.ts +24 -0
- package/dist/core/src/services/model-catalog.d.ts.map +1 -0
- package/dist/core/src/services/model-catalog.js +45 -0
- package/dist/core/src/services/model-catalog.js.map +1 -0
- package/dist/core/src/services/param-validator.d.ts +21 -0
- package/dist/core/src/services/param-validator.d.ts.map +1 -0
- package/dist/core/src/services/param-validator.js +164 -0
- package/dist/core/src/services/param-validator.js.map +1 -0
- package/dist/core/src/services/preview-download.d.ts +11 -0
- package/dist/core/src/services/preview-download.d.ts.map +1 -0
- package/dist/core/src/services/preview-download.js +106 -0
- package/dist/core/src/services/preview-download.js.map +1 -0
- package/dist/core/src/services/pricing-client.d.ts +95 -0
- package/dist/core/src/services/pricing-client.d.ts.map +1 -0
- package/dist/core/src/services/pricing-client.js +396 -0
- package/dist/core/src/services/pricing-client.js.map +1 -0
- package/dist/core/src/services/upload-policy.d.ts +19 -0
- package/dist/core/src/services/upload-policy.d.ts.map +1 -0
- package/dist/core/src/services/upload-policy.js +168 -0
- package/dist/core/src/services/upload-policy.js.map +1 -0
- package/dist/core/src/services/upload-slots.d.ts +63 -0
- package/dist/core/src/services/upload-slots.d.ts.map +1 -0
- package/dist/core/src/services/upload-slots.js +24 -0
- package/dist/core/src/services/upload-slots.js.map +1 -0
- package/dist/core/src/services/utm.d.ts +29 -0
- package/dist/core/src/services/utm.d.ts.map +1 -0
- package/dist/core/src/services/utm.js +64 -0
- package/dist/core/src/services/utm.js.map +1 -0
- package/dist/core/src/tool-guidance.d.ts +6 -0
- package/dist/core/src/tool-guidance.d.ts.map +1 -0
- package/dist/core/src/tool-guidance.js +49 -0
- package/dist/core/src/tool-guidance.js.map +1 -0
- package/dist/core/src/tools/check-balance.d.ts +4 -0
- package/dist/core/src/tools/check-balance.d.ts.map +1 -0
- package/dist/core/src/tools/check-balance.js +82 -0
- package/dist/core/src/tools/check-balance.js.map +1 -0
- package/dist/core/src/tools/estimate-cost.d.ts +4 -0
- package/dist/core/src/tools/estimate-cost.d.ts.map +1 -0
- package/dist/core/src/tools/estimate-cost.js +131 -0
- package/dist/core/src/tools/estimate-cost.js.map +1 -0
- package/dist/core/src/tools/generate.d.ts +4 -0
- package/dist/core/src/tools/generate.d.ts.map +1 -0
- package/dist/core/src/tools/generate.js +221 -0
- package/dist/core/src/tools/generate.js.map +1 -0
- package/dist/core/src/tools/get-model.d.ts +5 -0
- package/dist/core/src/tools/get-model.d.ts.map +1 -0
- package/dist/core/src/tools/get-model.js +117 -0
- package/dist/core/src/tools/get-model.js.map +1 -0
- package/dist/core/src/tools/get-task.d.ts +7 -0
- package/dist/core/src/tools/get-task.d.ts.map +1 -0
- package/dist/core/src/tools/get-task.js +56 -0
- package/dist/core/src/tools/get-task.js.map +1 -0
- package/dist/core/src/tools/list-tasks.d.ts +6 -0
- package/dist/core/src/tools/list-tasks.d.ts.map +1 -0
- package/dist/core/src/tools/list-tasks.js +149 -0
- package/dist/core/src/tools/list-tasks.js.map +1 -0
- package/dist/core/src/tools/prepare-upload.d.ts +6 -0
- package/dist/core/src/tools/prepare-upload.d.ts.map +1 -0
- package/dist/core/src/tools/prepare-upload.js +134 -0
- package/dist/core/src/tools/prepare-upload.js.map +1 -0
- package/dist/core/src/tools/search-models.d.ts +5 -0
- package/dist/core/src/tools/search-models.d.ts.map +1 -0
- package/dist/core/src/tools/search-models.js +97 -0
- package/dist/core/src/tools/search-models.js.map +1 -0
- package/dist/core/src/tools/shared.d.ts +55 -0
- package/dist/core/src/tools/shared.d.ts.map +1 -0
- package/dist/core/src/tools/shared.js +137 -0
- package/dist/core/src/tools/shared.js.map +1 -0
- package/dist/core/src/tools/task-format.d.ts +48 -0
- package/dist/core/src/tools/task-format.d.ts.map +1 -0
- package/dist/core/src/tools/task-format.js +212 -0
- package/dist/core/src/tools/task-format.js.map +1 -0
- package/dist/core/src/tools/upload-file.d.ts +17 -0
- package/dist/core/src/tools/upload-file.d.ts.map +1 -0
- package/dist/core/src/tools/upload-file.js +134 -0
- package/dist/core/src/tools/upload-file.js.map +1 -0
- package/dist/core/src/version.d.ts +3 -0
- package/dist/core/src/version.d.ts.map +1 -0
- package/dist/core/src/version.js +3 -0
- package/dist/core/src/version.js.map +1 -0
- package/dist/evolink-media/src/index.d.ts +3 -0
- package/dist/evolink-media/src/index.d.ts.map +1 -0
- package/dist/evolink-media/src/index.js +18 -0
- package/dist/evolink-media/src/index.js.map +1 -0
- package/package.json +46 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship made available under
|
|
36
|
+
the License, as indicated by a copyright notice that is included in
|
|
37
|
+
or attached to the work (an example is provided in the Appendix below).
|
|
38
|
+
|
|
39
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
40
|
+
form, that is based on (or derived from) the Work and for which the
|
|
41
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
42
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
43
|
+
of this License, Derivative Works shall not include works that remain
|
|
44
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
45
|
+
the Work and the Derivative Works thereof.
|
|
46
|
+
|
|
47
|
+
"Contribution" shall mean, as submitted to the Licensor for inclusion
|
|
48
|
+
in the Work by the copyright owner or by an individual or Legal Entity
|
|
49
|
+
authorized to submit on behalf of the copyright owner. For the purposes
|
|
50
|
+
of this definition, "submitted" means any form of electronic, verbal,
|
|
51
|
+
or written communication sent to the Licensor or its representatives,
|
|
52
|
+
including but not limited to communication on electronic mailing lists,
|
|
53
|
+
source code control systems, and issue tracking systems that are managed
|
|
54
|
+
by, or on behalf of, the Licensor for the purpose of discussing and
|
|
55
|
+
improving the Work, but excluding communication that is conspicuously
|
|
56
|
+
marked or designated in writing by the copyright owner as "Not a
|
|
57
|
+
Contribution."
|
|
58
|
+
|
|
59
|
+
"Contributor" shall mean Licensor and any Legal Entity on behalf of
|
|
60
|
+
whom a Contribution has been received by the Licensor and included
|
|
61
|
+
within the Work.
|
|
62
|
+
|
|
63
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
64
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
65
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
66
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
67
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
68
|
+
Work and such Derivative Works in Source or Object form.
|
|
69
|
+
|
|
70
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
71
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
72
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
73
|
+
(except as stated in this section) patent license to make, have made,
|
|
74
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
75
|
+
where such license applies only to those patent claims licensable
|
|
76
|
+
by such Contributor that are necessarily infringed by their
|
|
77
|
+
Contribution(s) alone or by the combination of their Contribution(s)
|
|
78
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
79
|
+
institute patent litigation against any entity (including a cross-claim
|
|
80
|
+
or counterclaim in a lawsuit) alleging that the Work or any Contribution
|
|
81
|
+
embodied within the Work constitutes direct or contributory patent
|
|
82
|
+
infringement, then any patent licenses granted to You under this License
|
|
83
|
+
for that Work shall terminate as of the date such litigation is filed.
|
|
84
|
+
|
|
85
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
86
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
87
|
+
modifications, and in Source or Object form, provided that You
|
|
88
|
+
meet the following conditions:
|
|
89
|
+
|
|
90
|
+
(a) You must give any other recipients of the Work or Derivative Works
|
|
91
|
+
a copy of this License; and
|
|
92
|
+
|
|
93
|
+
(b) You must cause any modified files to carry prominent notices
|
|
94
|
+
stating that You changed the files; and
|
|
95
|
+
|
|
96
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
97
|
+
that You distribute, all copyright, patent, trademark, and
|
|
98
|
+
attribution notices from the Source form of the Work,
|
|
99
|
+
excluding those notices that do not pertain to any part of
|
|
100
|
+
the Derivative Works; and
|
|
101
|
+
|
|
102
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
103
|
+
distribution, You must include a readable copy of the
|
|
104
|
+
attribution notices contained within such NOTICE file, in
|
|
105
|
+
at least one of the following places: within a NOTICE text file
|
|
106
|
+
distributed as part of the Derivative Works; within the Source
|
|
107
|
+
form or documentation, if provided along with the Derivative Works;
|
|
108
|
+
or, within a display generated by the Derivative Works, if and
|
|
109
|
+
wherever such third-party notices normally appear. The contents
|
|
110
|
+
of the NOTICE file are for informational purposes only and
|
|
111
|
+
do not modify the License. You may add Your own attribution
|
|
112
|
+
notices within Derivative Works that You distribute, alongside
|
|
113
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
114
|
+
that such additional attribution notices cannot be construed
|
|
115
|
+
as modifying the License.
|
|
116
|
+
|
|
117
|
+
You may add Your own license statement for Your modifications and
|
|
118
|
+
may provide additional grant of rights to use, copy, modify, merge,
|
|
119
|
+
publish, distribute, sublicense, and/or sell copies of the
|
|
120
|
+
Contribution, either on an original or modified basis.
|
|
121
|
+
|
|
122
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
123
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
124
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
125
|
+
this License, without any additional terms or conditions.
|
|
126
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
127
|
+
the terms of any separate license agreement you may have executed
|
|
128
|
+
with Licensor regarding such Contributions.
|
|
129
|
+
|
|
130
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
131
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
132
|
+
except as required for reasonable and customary use in describing the
|
|
133
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
134
|
+
|
|
135
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
136
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
137
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
138
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
139
|
+
implied, including, without limitation, any warranties or conditions
|
|
140
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
141
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
142
|
+
appropriateness of using or reproducing the Work and assume any
|
|
143
|
+
risks associated with Your exercise of permissions under this License.
|
|
144
|
+
|
|
145
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
146
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
147
|
+
unless required by applicable law (such as deliberate and grossly
|
|
148
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
149
|
+
liable to You for damages, including any direct, indirect, special,
|
|
150
|
+
incidental, or exemplary damages of any character arising as a
|
|
151
|
+
result of this License or out of the use or inability to use the
|
|
152
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
153
|
+
work stoppage, computer failure or malfunction, or all other
|
|
154
|
+
commercial damages or losses), even if such Contributor has been
|
|
155
|
+
advised of the possibility of such damages.
|
|
156
|
+
|
|
157
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
158
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
159
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
160
|
+
or other liability obligations and/or rights consistent with this
|
|
161
|
+
License. However, in accepting such obligations, You may offer only
|
|
162
|
+
conditions that are completely consistent with this License.
|
|
163
|
+
|
|
164
|
+
END OF TERMS AND CONDITIONS
|
|
165
|
+
|
|
166
|
+
Copyright 2024 EvoLink AI
|
|
167
|
+
|
|
168
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
169
|
+
you may not use this file except in compliance with the License.
|
|
170
|
+
You may obtain a copy of the License at
|
|
171
|
+
|
|
172
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
173
|
+
|
|
174
|
+
Unless required by applicable law or agreed to in writing, software
|
|
175
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
176
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
177
|
+
See the License for the specific language governing permissions and
|
|
178
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -1,3 +1,68 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @evolinkai/mcp
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> Generate AI videos, images & music with one API key. 150+ models including Seedance, Kling, Veo, Sora, GPT Image, Suno, and more.
|
|
4
|
+
|
|
5
|
+
**EvoLink Media** is an MCP (Model Context Protocol) server that gives AI assistants like Claude the ability to generate multimedia content through a unified API.
|
|
6
|
+
|
|
7
|
+
## Quick Start
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npx @evolinkai/mcp
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Set your API key:
|
|
14
|
+
```bash
|
|
15
|
+
export EVOLINK_API_KEY="your-key-here"
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Get your API key at [evolink.ai/dashboard/keys](https://evolink.ai/dashboard/keys?utm_source=npm&utm_medium=referral&utm_campaign=mcp_local&utm_content=readme_keys).
|
|
19
|
+
|
|
20
|
+
## MCP Configuration
|
|
21
|
+
|
|
22
|
+
### Claude Desktop
|
|
23
|
+
|
|
24
|
+
```json
|
|
25
|
+
{
|
|
26
|
+
"mcpServers": {
|
|
27
|
+
"evolink-mcp": {
|
|
28
|
+
"command": "npx",
|
|
29
|
+
"args": ["-y", "@evolinkai/mcp@latest"],
|
|
30
|
+
"env": {
|
|
31
|
+
"EVOLINK_API_KEY": "your-key-here",
|
|
32
|
+
"EVOLINK_UPLOAD_ALLOWED_DIRS": "/absolute/path/to/media"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Cursor
|
|
40
|
+
|
|
41
|
+
Go to **Settings → MCP** and add:
|
|
42
|
+
- Command: `npx -y @evolinkai/mcp@latest`
|
|
43
|
+
- Environment: `EVOLINK_API_KEY=your-key-here`
|
|
44
|
+
|
|
45
|
+
## Available Tools
|
|
46
|
+
|
|
47
|
+
| Tool | Description | Cost |
|
|
48
|
+
|------|-------------|------|
|
|
49
|
+
| `search_models` | Find image, video and audio models by type and keywords | Free |
|
|
50
|
+
| `get_model` | A model's parameters, prices and an example input | Free |
|
|
51
|
+
| `estimate_cost` | Check an input and estimate its cost, without submitting | Free |
|
|
52
|
+
| `generate_image` | Generate or edit images (waits up to 40 s for the result) | Paid |
|
|
53
|
+
| `generate_video` | Generate a video (returns a task_id) | Paid |
|
|
54
|
+
| `generate_audio` | Generate music, songs or speech (returns a task_id) | Paid |
|
|
55
|
+
| `get_task` | Check a task, waiting up to 45 s; result links and final charge | Free |
|
|
56
|
+
| `list_tasks` | Read up to 50 tasks, or find recent ones | Free |
|
|
57
|
+
| `upload_file` | Turn a media file into a link for generation input | Free |
|
|
58
|
+
| `check_balance` | Account balance, this key's spend, top-up link | Free |
|
|
59
|
+
|
|
60
|
+
There is no server-side approval step: the generate tools are marked destructive so the client asks before running them, and the assistant is told to quote the price with `estimate_cost` first. `max_cost_usd` optionally caps one generation. Every submit carries an idempotency key; after a network error, repeating the call with the returned `client_request_id` cannot charge twice. Inputs are checked against the documented parameters before anything is sent, and errors are classified by the gateway's error code with a next step. Local upload paths must be inside `EVOLINK_UPLOAD_ALLOWED_DIRS`. CLI-managed installations may set `EVOLINK_CREDENTIAL_HELPER` instead of serializing `EVOLINK_API_KEY`.
|
|
61
|
+
|
|
62
|
+
## Models
|
|
63
|
+
|
|
64
|
+
150+ image, video and audio models (Seedance, Kling, Veo, Sora, Suno, GPT Image, Nano Banana and more). Use `search_models` to browse them with prices.
|
|
65
|
+
|
|
66
|
+
## License
|
|
67
|
+
|
|
68
|
+
Apache-2.0 — [EvoLink AI](https://evolink.ai/?utm_source=npm&utm_medium=referral&utm_campaign=mcp_local&utm_content=readme_home)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"branding.d.ts","sourceRoot":"","sources":["../../../../core/src/branding.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAI/D,eAAO,MAAM,aAAa,EAAE,IAAI,EAI9B,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Existing EvoLink favicon on a white tile, visible in both light and dark clients.
|
|
2
|
+
// Inline PNG avoids an extra CDN request and ships with both hosted and stdio editions.
|
|
3
|
+
export const EVOLINK_ICONS = [{
|
|
4
|
+
src: 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAGAAAABgCAYAAADimHc4AAAQAElEQVR4AeydZ7QVRbbH9x8TBswBzIFnzqMu4xJMo4LOUsGccETFBOhaRvSZMCsmMKFgHDCgS0efosusz/DMjgFHYcxZDJiF17+qW6er+/Q595zDvffw4bLu7h2ratfe3dXdVXWaLjM6/zU1Al2s819TI9CZgKaG36wzAZ0JaHIEmtx85xXQmYAmR6DJzXdeAZ0JaHIEmtz8LHEFTJ8+3f744492hz///NOSt64mhzzbfNMSQCC++OILe/zxx+2WW2+xq666ykaNGlWCkSNHOjpgdNBFEHQBYwMd4Morr7Srr7rarrvuOptw11325r/etN9++y0biSZxTUnAtGnT7M4777RjjjnG9t57bztowEE2eMhgO/bYY51s6NChhRj7Igj2sS6WQVP/EYcfYQfsv79dO3q0/fTTT00KebbZDk/Ad999Z5dccokL8Lhx4+zzzz83hqAZ02c47OgZM9xQwVVSC9Al7PJlYx56+ozpNs8889jaa69l3bp1o1jToUMTQJDuvfdeGz58uH388celgMdRkGSSh1hO2ZgPtCSXLHhJoBJInqesJFfvlltuafvuu6/NNttsJbtmEh2agHfeeccOT4aBX3/9tdRnyQdGkpMRLEdEB0kueEEkyZGSx45JDkVlE3Gp7KKLLmpnnHGGzTHHHIhnCeiwBDD07JecedOm/VjquOQDGAdO8md0LAu0lNpL5XaS19OAlNLwXbt2tVNPPdVWW2012FkGOiQBjL8XXHCBvfLqq6XhgqACIRKBDjjIA0YOxHygA471QQaWZDvvvLMdcsghsLMU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/ba0n2Tjh9is6uPHyDSdvCjmbipCWhmx2eVtjsT0ORMdCagMwFNjkCTm++8AjoT0OQINLn5ziugMwFNjkArzbe3+v8BAAD//5detWIAAAAGSURBVAMA3aRjBPWQA+sAAAAASUVORK5CYII=',
|
|
5
|
+
mimeType: 'image/png',
|
|
6
|
+
sizes: ['96x96'],
|
|
7
|
+
}];
|
|
8
|
+
//# sourceMappingURL=branding.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"branding.js","sourceRoot":"","sources":["../../../../core/src/branding.ts"],"names":[],"mappings":"AAEA,oFAAoF;AACpF,wFAAwF;AACxF,MAAM,CAAC,MAAM,aAAa,GAAW,CAAC;QACpC,GAAG,EAAE,o9OAAo9O;QACz9O,QAAQ,EAAE,WAAW;QACrB,KAAK,EAAE,CAAC,OAAO,CAAC;KACjB,CAAC,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface ServerConfig {
|
|
2
|
+
channel: 'official' | 'beta';
|
|
3
|
+
baseUrl: string;
|
|
4
|
+
}
|
|
5
|
+
export declare function createConfig(channel: 'official' | 'beta'): ServerConfig;
|
|
6
|
+
/**
|
|
7
|
+
* The User-Agent of the hosted service's gateway calls. EvoLink's own services
|
|
8
|
+
* use "<service>/<version>"; the gateway records whether a signed-in call came
|
|
9
|
+
* through this service (mcp_via_service) and never authenticates by it.
|
|
10
|
+
*/
|
|
11
|
+
export declare const MCP_SERVICE_USER_AGENT = "evolink-mcp-service/1.4.0";
|
|
12
|
+
/**
|
|
13
|
+
* Authentication headers for one gateway call. A signed-in hosted connection
|
|
14
|
+
* forwards its own Passport access token (key custody A) with the service
|
|
15
|
+
* User-Agent; everything else sends the caller's API key.
|
|
16
|
+
*/
|
|
17
|
+
export declare function gatewayAuthHeaders(): Record<string, string>;
|
|
18
|
+
export declare function getApiKey(): string;
|
|
19
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../../core/src/config.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,UAAU,GAAG,MAAM,CAAC;IAC7B,OAAO,EAAE,MAAM,CAAC;CACjB;AA6BD,wBAAgB,YAAY,CAAC,OAAO,EAAE,UAAU,GAAG,MAAM,GAAG,YAAY,CAKvE;AAED;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,8BAAuC,CAAC;AAE3E;;;;GAIG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAO3D;AAED,wBAAgB,SAAS,IAAI,MAAM,CA8BlC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { execFileSync } from 'node:child_process';
|
|
2
|
+
import { currentRequestCredentials, processCredentialsAllowed } from './request-context.js';
|
|
3
|
+
import { API_KEYS_URL } from './services/http-policy.js';
|
|
4
|
+
import { trackedLink } from './services/utm.js';
|
|
5
|
+
import { MCP_VERSION } from './version.js';
|
|
6
|
+
const BASE_URLS = {
|
|
7
|
+
official: 'https://api.evolink.ai',
|
|
8
|
+
beta: 'https://beta-api.evolink.ai',
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* EVOLINK_BASE_URL overrides the channel default so the same build can point
|
|
12
|
+
* at canary/staging gateways (e.g. https://t-api.evolink.ai) without patching
|
|
13
|
+
* dist. HTTPS is required except for loopback development hosts.
|
|
14
|
+
*/
|
|
15
|
+
function resolveBaseUrl(channel) {
|
|
16
|
+
const override = (process.env.EVOLINK_BASE_URL ?? '').trim().replace(/\/+$/, '');
|
|
17
|
+
if (!override)
|
|
18
|
+
return BASE_URLS[channel];
|
|
19
|
+
let parsed;
|
|
20
|
+
try {
|
|
21
|
+
parsed = new URL(override);
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
throw new Error(`EVOLINK_BASE_URL is not a valid URL: ${override}`);
|
|
25
|
+
}
|
|
26
|
+
const loopback = parsed.hostname === 'localhost' || parsed.hostname === '127.0.0.1';
|
|
27
|
+
if (parsed.protocol !== 'https:' && !(parsed.protocol === 'http:' && loopback)) {
|
|
28
|
+
throw new Error('EVOLINK_BASE_URL must use HTTPS (or HTTP on localhost).');
|
|
29
|
+
}
|
|
30
|
+
return override;
|
|
31
|
+
}
|
|
32
|
+
export function createConfig(channel) {
|
|
33
|
+
return {
|
|
34
|
+
channel,
|
|
35
|
+
baseUrl: resolveBaseUrl(channel),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* The User-Agent of the hosted service's gateway calls. EvoLink's own services
|
|
40
|
+
* use "<service>/<version>"; the gateway records whether a signed-in call came
|
|
41
|
+
* through this service (mcp_via_service) and never authenticates by it.
|
|
42
|
+
*/
|
|
43
|
+
export const MCP_SERVICE_USER_AGENT = `evolink-mcp-service/${MCP_VERSION}`;
|
|
44
|
+
/**
|
|
45
|
+
* Authentication headers for one gateway call. A signed-in hosted connection
|
|
46
|
+
* forwards its own Passport access token (key custody A) with the service
|
|
47
|
+
* User-Agent; everything else sends the caller's API key.
|
|
48
|
+
*/
|
|
49
|
+
export function gatewayAuthHeaders() {
|
|
50
|
+
const channel = currentRequestCredentials()?.serviceChannel;
|
|
51
|
+
if (!channel)
|
|
52
|
+
return { 'Authorization': `Bearer ${getApiKey()}` };
|
|
53
|
+
return {
|
|
54
|
+
'User-Agent': MCP_SERVICE_USER_AGENT,
|
|
55
|
+
'Authorization': `Bearer ${channel.accessToken}`,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export function getApiKey() {
|
|
59
|
+
const scoped = currentRequestCredentials();
|
|
60
|
+
if (scoped) {
|
|
61
|
+
if (scoped.apiKey)
|
|
62
|
+
return scoped.apiKey;
|
|
63
|
+
throw new Error(scoped.unavailableReason ?? 'No EvoLink credential is available for this request.');
|
|
64
|
+
}
|
|
65
|
+
if (!processCredentialsAllowed()) {
|
|
66
|
+
throw new Error('No EvoLink credential is available for this request.');
|
|
67
|
+
}
|
|
68
|
+
const configured = process.env.EVOLINK_API_KEY?.trim();
|
|
69
|
+
if (configured)
|
|
70
|
+
return configured;
|
|
71
|
+
const helper = process.env.EVOLINK_CREDENTIAL_HELPER?.trim() || 'evolink';
|
|
72
|
+
if (helper.includes('\0'))
|
|
73
|
+
throw new Error('EVOLINK_CREDENTIAL_HELPER is invalid');
|
|
74
|
+
try {
|
|
75
|
+
const key = execFileSync(helper, ['credential', 'get'], {
|
|
76
|
+
encoding: 'utf8',
|
|
77
|
+
timeout: 5_000,
|
|
78
|
+
maxBuffer: 64 * 1024,
|
|
79
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
80
|
+
}).trim();
|
|
81
|
+
if (key)
|
|
82
|
+
return key;
|
|
83
|
+
}
|
|
84
|
+
catch {
|
|
85
|
+
// Return one stable recovery message without echoing helper stderr or key material.
|
|
86
|
+
}
|
|
87
|
+
throw new Error(`No EvoLink API key is available. Set EVOLINK_API_KEY to a key from ${trackedLink(API_KEYS_URL, 'api_keys')}, ` +
|
|
88
|
+
'or run `evolink login` and keep the evolink CLI on PATH (or set EVOLINK_CREDENTIAL_HELPER to its absolute path).');
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../../../core/src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,yBAAyB,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AAC5F,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAO3C,MAAM,SAAS,GAAG;IAChB,QAAQ,EAAE,wBAAwB;IAClC,IAAI,EAAE,6BAA6B;CAC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AAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export type MediaKind = 'image' | 'video' | 'audio';
|
|
2
|
+
/** One request parameter as documented in the docs site OpenAPI (simplified). */
|
|
3
|
+
export interface ParamSpec {
|
|
4
|
+
type?: string;
|
|
5
|
+
description?: string;
|
|
6
|
+
enum?: Array<string | number | boolean>;
|
|
7
|
+
default?: unknown;
|
|
8
|
+
minimum?: number;
|
|
9
|
+
maximum?: number;
|
|
10
|
+
exclusiveMinimum?: number;
|
|
11
|
+
exclusiveMaximum?: number;
|
|
12
|
+
minLength?: number;
|
|
13
|
+
maxLength?: number;
|
|
14
|
+
minItems?: number;
|
|
15
|
+
maxItems?: number;
|
|
16
|
+
format?: string;
|
|
17
|
+
items?: {
|
|
18
|
+
type?: string;
|
|
19
|
+
enum?: Array<string | number | boolean>;
|
|
20
|
+
format?: string;
|
|
21
|
+
properties?: Record<string, ParamSpec>;
|
|
22
|
+
};
|
|
23
|
+
properties?: Record<string, ParamSpec>;
|
|
24
|
+
required?: boolean;
|
|
25
|
+
}
|
|
26
|
+
/** Everything get_model needs to explain one model's request. */
|
|
27
|
+
export interface ModelParams {
|
|
28
|
+
model: string;
|
|
29
|
+
kind: MediaKind;
|
|
30
|
+
/** Gateway endpoint, e.g. /v1/images/generations */
|
|
31
|
+
path: string;
|
|
32
|
+
title: string;
|
|
33
|
+
docs: string;
|
|
34
|
+
required: string[];
|
|
35
|
+
params: Record<string, ParamSpec>;
|
|
36
|
+
example?: Record<string, unknown>;
|
|
37
|
+
}
|
|
38
|
+
export interface ModelParamsMeta {
|
|
39
|
+
source: string;
|
|
40
|
+
commit: string;
|
|
41
|
+
files: number;
|
|
42
|
+
endpoints: number;
|
|
43
|
+
models: number;
|
|
44
|
+
}
|
|
45
|
+
export declare function modelParamsMeta(): ModelParamsMeta;
|
|
46
|
+
export declare function allModelParams(): ModelParams[];
|
|
47
|
+
/** Exact model ID first, then a case-insensitive match. */
|
|
48
|
+
export declare function findModelParams(model: string): ModelParams | undefined;
|
|
49
|
+
//# sourceMappingURL=model-params.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-params.d.ts","sourceRoot":"","sources":["../../../../../core/src/data/model-params.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,CAAC;AAEpD,iFAAiF;AACjF,MAAM,WAAW,SAAS;IACxB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;IACxC,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE;QACN,IAAI,CAAC,EAAE,MAAM,CAAC;QACd,IAAI,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;QACxC,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;KACxC,CAAC;IACF,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IACvC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,iEAAiE;AACjE,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,SAAS,CAAC;IAChB,oDAAoD;IACpD,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACnC;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB;AAcD,wBAAgB,eAAe,IAAI,eAAe,CAEjD;AAED,wBAAgB,cAAc,IAAI,WAAW,EAAE,CAE9C;AAED,2DAA2D;AAC3D,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAMtE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model-params.generated.d.ts","sourceRoot":"","sources":["../../../../../core/src/data/model-params.generated.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,iBAAiB,EAAE,MAAg3id,CAAC"}
|