@vibesdotdev/integrations-cohere 0.0.0-stage → 1.0.0-rc.1
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 +126 -0
- package/README.md +39 -2
- package/dist/ai/index.d.ts +3 -0
- package/dist/ai/index.d.ts.map +1 -0
- package/dist/ai/index.js +3 -0
- package/dist/ai/index.js.map +1 -0
- package/dist/ai/metadata/assets/logos/providers/cohere-wordmark.svg +13 -0
- package/dist/ai/metadata/assets/logos/providers/cohere.svg +14 -0
- package/dist/ai/metadata/providers/cohere.json +31 -0
- package/dist/ai/provider.plugin.d.ts +6 -0
- package/dist/ai/provider.plugin.d.ts.map +1 -0
- package/dist/ai/provider.plugin.js +106 -0
- package/dist/ai/provider.plugin.js.map +1 -0
- package/dist/ai/providers/cloud/api/cohere/config/config.cohere.descriptor.d.ts +4194 -0
- package/dist/ai/providers/cloud/api/cohere/config/config.cohere.descriptor.d.ts.map +1 -0
- package/dist/ai/providers/cloud/api/cohere/config/config.cohere.descriptor.js +43 -0
- package/dist/ai/providers/cloud/api/cohere/config/config.cohere.descriptor.js.map +1 -0
- package/dist/ai/providers/cloud/api/cohere/config/schemas/index.d.ts +13 -0
- package/dist/ai/providers/cloud/api/cohere/config/schemas/index.d.ts.map +1 -0
- package/dist/ai/providers/cloud/api/cohere/config/schemas/index.js +9 -0
- package/dist/ai/providers/cloud/api/cohere/config/schemas/index.js.map +1 -0
- package/dist/ai/providers/cloud/api/cohere/index.d.ts +3 -0
- package/dist/ai/providers/cloud/api/cohere/index.d.ts.map +1 -0
- package/dist/ai/providers/cloud/api/cohere/index.js +3 -0
- package/dist/ai/providers/cloud/api/cohere/index.js.map +1 -0
- package/dist/ai/providers/cloud/api/cohere/provider.cohere.descriptor.d.ts +183 -0
- package/dist/ai/providers/cloud/api/cohere/provider.cohere.descriptor.d.ts.map +1 -0
- package/dist/ai/providers/cloud/api/cohere/provider.cohere.descriptor.js +55 -0
- package/dist/ai/providers/cloud/api/cohere/provider.cohere.descriptor.js.map +1 -0
- package/dist/ai/providers/cohere/cohere.provider.impl.d.ts +19 -0
- package/dist/ai/providers/cohere/cohere.provider.impl.d.ts.map +1 -0
- package/dist/ai/providers/cohere/cohere.provider.impl.js +143 -0
- package/dist/ai/providers/cohere/cohere.provider.impl.js.map +1 -0
- package/dist/ai/providers/cohere/detection/index.d.ts +2 -0
- package/dist/ai/providers/cohere/detection/index.d.ts.map +1 -0
- package/dist/ai/providers/cohere/detection/index.js +2 -0
- package/dist/ai/providers/cohere/detection/index.js.map +1 -0
- package/dist/ai/providers/cohere/detection/system.d.ts +4 -0
- package/dist/ai/providers/cohere/detection/system.d.ts.map +1 -0
- package/dist/ai/providers/cohere/detection/system.js +16 -0
- package/dist/ai/providers/cohere/detection/system.js.map +1 -0
- package/dist/ai/providers/cohere/index.d.ts +4 -0
- package/dist/ai/providers/cohere/index.d.ts.map +1 -0
- package/dist/ai/providers/cohere/index.js +4 -0
- package/dist/ai/providers/cohere/index.js.map +1 -0
- package/dist/ai/providers/cohere/recommendations.d.ts +23 -0
- package/dist/ai/providers/cohere/recommendations.d.ts.map +1 -0
- package/dist/ai/providers/cohere/recommendations.js +20 -0
- package/dist/ai/providers/cohere/recommendations.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -0
- package/package.json +71 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
Business Source License 1.1
|
|
2
|
+
|
|
3
|
+
Parameters
|
|
4
|
+
|
|
5
|
+
Licensor: VIBES DEV LLC
|
|
6
|
+
Licensed Work: @vibesdotdev/integrations-cohere
|
|
7
|
+
The Licensed Work is (c) 2026 VIBES DEV LLC.
|
|
8
|
+
Additional Use Grant: In this grant, "Vibes Platform" means the hosted services VIBES DEV LLC
|
|
9
|
+
operates at vibes.dev and its subdomains.
|
|
10
|
+
|
|
11
|
+
You may make production use of the Licensed Work, including commercial
|
|
12
|
+
use, subject to the limits below. Permitted production use includes:
|
|
13
|
+
building, operating and selling your own applications, agents and services
|
|
14
|
+
on or with the Vibes Platform; self-hosting the Licensed Work for use inside
|
|
15
|
+
your own organization; and providing consulting, integration or development
|
|
16
|
+
services to clients who build on the Vibes Platform.
|
|
17
|
+
|
|
18
|
+
The production use permitted above does not include use that:
|
|
19
|
+
|
|
20
|
+
(a) offers third parties a hosted, managed or embedded service that
|
|
21
|
+
substitutes for the Vibes Platform or a material part of it (including
|
|
22
|
+
agent hosting; fleet, sandbox or container provisioning; package
|
|
23
|
+
registry; source hosting and continuous integration; and managed AI,
|
|
24
|
+
storage, secrets or messaging), where the Licensed Work provides a
|
|
25
|
+
material part of that service's value and that service earns more than
|
|
26
|
+
US$1,000,000 in gross revenue in any twelve-month period;
|
|
27
|
+
(b) sells, rents, sublicenses or white-labels the Licensed Work, or access
|
|
28
|
+
to Vibes Platform functionality, as a product in its own right;
|
|
29
|
+
(c) removes, disables or works around entitlement checks, usage metering,
|
|
30
|
+
quotas or plan limits, or reaches Vibes Platform features the user's
|
|
31
|
+
account is not entitled to;
|
|
32
|
+
(d) scrapes, bulk-exports or harvests data or content from the Vibes
|
|
33
|
+
Platform or its users other than through documented interfaces and
|
|
34
|
+
within their terms, or uses outputs or data obtained from the Vibes
|
|
35
|
+
Platform to train or improve a product that competes with it;
|
|
36
|
+
(e) violates applicable law, infringes anyone's rights, commits fraud or
|
|
37
|
+
deception, conducts unlawful surveillance or harassment, distributes
|
|
38
|
+
malware, or accesses systems without authorization; or
|
|
39
|
+
(f) violates applicable antitrust or competition law.
|
|
40
|
+
|
|
41
|
+
A written permission from the Licensor extends this grant.
|
|
42
|
+
Change Date: Four years from the date the Licensed Work is published.
|
|
43
|
+
Change License: MIT
|
|
44
|
+
|
|
45
|
+
For information about alternative licensing arrangements for the Licensed Work,
|
|
46
|
+
contact VIBES DEV LLC through https://vibes.dev.
|
|
47
|
+
|
|
48
|
+
Notice
|
|
49
|
+
|
|
50
|
+
The Business Source License (this document, or the "License") is not an Open
|
|
51
|
+
Source license. However, the Licensed Work will eventually be made available
|
|
52
|
+
under an Open Source License, as stated in this License.
|
|
53
|
+
|
|
54
|
+
-----------------------------------------------------------------------------
|
|
55
|
+
|
|
56
|
+
Business Source License 1.1
|
|
57
|
+
|
|
58
|
+
License text copyright © 2017 MariaDB Corporation Ab, All Rights Reserved.
|
|
59
|
+
"Business Source License" is a trademark of MariaDB Corporation Ab.
|
|
60
|
+
|
|
61
|
+
Terms
|
|
62
|
+
|
|
63
|
+
The Licensor hereby grants you the right to copy, modify, create derivative
|
|
64
|
+
works, redistribute, and make non-production use of the Licensed Work. The
|
|
65
|
+
Licensor may make an Additional Use Grant, above, permitting limited
|
|
66
|
+
production use.
|
|
67
|
+
|
|
68
|
+
Effective on the Change Date, or the fourth anniversary of the first publicly
|
|
69
|
+
available distribution of a specific version of the Licensed Work under this
|
|
70
|
+
License, whichever comes first, the Licensor hereby grants you rights under
|
|
71
|
+
the terms of the Change License, and the rights granted in the paragraph
|
|
72
|
+
above terminate.
|
|
73
|
+
|
|
74
|
+
If your use of the Licensed Work does not comply with the requirements
|
|
75
|
+
currently in effect as described in this License, you must purchase a
|
|
76
|
+
commercial license from the Licensor, its affiliated entities, or authorized
|
|
77
|
+
resellers, or you must refrain from using the Licensed Work.
|
|
78
|
+
|
|
79
|
+
All copies of the original and modified Licensed Work, and derivative works
|
|
80
|
+
of the Licensed Work, are subject to this License. This License applies
|
|
81
|
+
separately for each version of the Licensed Work and the Change Date may vary
|
|
82
|
+
for each version of the Licensed Work released by Licensor.
|
|
83
|
+
|
|
84
|
+
You must conspicuously display this License on each original or modified copy
|
|
85
|
+
of the Licensed Work. If you receive the Licensed Work in original or
|
|
86
|
+
modified form from a third party, the terms and conditions set forth in this
|
|
87
|
+
License apply to your use of that work.
|
|
88
|
+
|
|
89
|
+
Any use of the Licensed Work in violation of this License will automatically
|
|
90
|
+
terminate your rights under this License for the current and all other
|
|
91
|
+
versions of the Licensed Work.
|
|
92
|
+
|
|
93
|
+
This License does not grant you any right in any trademark or logo of
|
|
94
|
+
Licensor or its affiliates (provided that you may use a trademark or logo of
|
|
95
|
+
Licensor as expressly required by this License).
|
|
96
|
+
|
|
97
|
+
TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON
|
|
98
|
+
AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS,
|
|
99
|
+
EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF
|
|
100
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND
|
|
101
|
+
TITLE.
|
|
102
|
+
|
|
103
|
+
MariaDB hereby grants you permission to use this License’s text to license
|
|
104
|
+
your works, and to refer to it using the trademark “Business Source License”,
|
|
105
|
+
as long as you comply with the Covenants of Licensor below.
|
|
106
|
+
|
|
107
|
+
Covenants of Licensor
|
|
108
|
+
|
|
109
|
+
In consideration of the right to use this License’s text and the “Business
|
|
110
|
+
Source License” name and trademark, Licensor covenants to MariaDB, and to all
|
|
111
|
+
other recipients of the licensed work to be provided by Licensor:
|
|
112
|
+
|
|
113
|
+
1. To specify as the Change License the GPL Version 2.0 or any later version,
|
|
114
|
+
or a license that is compatible with GPL Version 2.0 or a later version,
|
|
115
|
+
where “compatible” means that software provided under the Change License can
|
|
116
|
+
be included in a program with software provided under GPL Version 2.0 or a
|
|
117
|
+
later version. Licensor may specify additional Change Licenses without
|
|
118
|
+
limitation.
|
|
119
|
+
|
|
120
|
+
2. To either: (a) specify an additional grant of rights to use that does not
|
|
121
|
+
impose any additional restriction on the right granted in this License, as
|
|
122
|
+
the Additional Use Grant; or (b) insert the text “None”.
|
|
123
|
+
|
|
124
|
+
3. To specify a Change Date.
|
|
125
|
+
|
|
126
|
+
4. Not to modify this License in any other way.
|
package/README.md
CHANGED
|
@@ -1,3 +1,40 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Cohere for Vibes
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Compose `@vibesdotdev/integrations-cohere/ai/plugin` alongside the host's AI
|
|
4
|
+
plugin and its prerequisites. Resolve provider, detection and recommendation
|
|
5
|
+
implementations through the runtime; use AI's `runtime/client:ai` for generation.
|
|
6
|
+
A matching AI executor and runtime credential store are required.
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
import { cohereConnectionSchema } from '@vibesdotdev/integrations-cohere';
|
|
10
|
+
|
|
11
|
+
const configuration = cohereConnectionSchema.parse({
|
|
12
|
+
apiKey: { source: 'secret', key: 'MY_COHERE_KEY' }
|
|
13
|
+
});
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
The default endpoint is `https://api.cohere.ai/compatibility/v1`; the default
|
|
17
|
+
deadline is 60000 ms. Custom `baseUrl` values must expose the compatibility API.
|
|
18
|
+
Both text and embedding variants use that endpoint and the selected credential
|
|
19
|
+
reference. The earlier native `/v1` default is replaced because the executable
|
|
20
|
+
chat spec uses the compatibility dialect. Explicit native endpoint settings
|
|
21
|
+
should be updated to the corresponding compatibility endpoint.
|
|
22
|
+
|
|
23
|
+
Text, streaming, tool calls and text embeddings use AI-owned specs/transports.
|
|
24
|
+
Recommendations order preferences without admitting or excluding model IDs.
|
|
25
|
+
Detection treats an unset credential as absence and propagates store failures.
|
|
26
|
+
Health probes `{baseUrl}/models` with lifecycle cancellation and a configured
|
|
27
|
+
deadline; failures retain typed codes/reasons and value-free causes.
|
|
28
|
+
|
|
29
|
+
The root and `./ai` expose schemas and plugins. Compatibility implementation
|
|
30
|
+
access remains under `./ai/providers/cohere/index` and its explicit modules.
|
|
31
|
+
Resolve recommendations through `ai/provider-recommendation:cohere`; the former
|
|
32
|
+
ambient recommendation instance is replaced by runtime-owned construction.
|
|
33
|
+
|
|
34
|
+
See [SPEC.md](./SPEC.md) for refusal codes, prerequisites and the full contract.
|
|
35
|
+
Run `bun run check`, `bun run test`, `bun run build`, workspace-rules, and the
|
|
36
|
+
configured oxlint ratchet. Tests use disposable composed runtimes and fake only
|
|
37
|
+
HTTP and credential-store boundaries. Production emission excludes tests and
|
|
38
|
+
Svelte source while preserving metadata assets.
|
|
39
|
+
|
|
40
|
+
Protocol reference: [Cohere compatibility API](https://docs.cohere.com/v2/docs/compatibility-api).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/ai/index.ts"],"names":[],"mappings":"AAAA,cAAc,sDAAsD,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC"}
|
package/dist/ai/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ai/index.ts"],"names":[],"mappings":"AAAA,cAAc,sDAAsD,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<svg width="118" height="20" viewBox="0 0 118 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g clip-path="url(#clip0_3176_6183)">
|
|
3
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M6.81969 11.9081C7.34472 11.9081 8.3891 11.8785 9.8327 11.2692C11.5149 10.559 14.8619 9.2699 17.2762 7.94576C18.9648 7.01963 19.7049 5.79474 19.7049 4.14523C19.705 1.85589 17.8949 0 15.6621 0H6.30704C3.09989 0 0.5 2.66571 0.5 5.95406C0.5 9.2424 2.93427 11.9081 6.81969 11.9081Z" fill="#355146"/>
|
|
4
|
+
<path fill-rule="evenodd" clip-rule="evenodd" d="M8.40234 16.0108C8.40234 14.3989 9.34877 12.9456 10.8008 12.3277L13.7469 11.0741C16.7269 9.80599 20.0069 12.0514 20.0069 15.3595C20.0069 17.9226 17.9801 20.0001 15.4803 19.9994L12.2906 19.9985C10.143 19.998 8.40234 18.2128 8.40234 16.0108Z" fill="#D18EE2"/>
|
|
5
|
+
<path d="M3.8476 12.6914H3.84753C1.99874 12.6914 0.5 14.2281 0.5 16.1237V16.5683C0.5 18.4639 1.99874 20.0005 3.84753 20.0005H3.8476C5.69639 20.0005 7.19513 18.4639 7.19513 16.5683V16.1237C7.19513 14.2281 5.69639 12.6914 3.8476 12.6914Z" fill="#FF7759"/>
|
|
6
|
+
</g>
|
|
7
|
+
<path d="M33.1859 19.996C36.0834 19.996 38.6193 18.5105 39.6218 15.5114C39.8164 14.9108 39.5373 14.5117 38.981 14.5117H37.8939C37.3926 14.5117 37.0584 14.7395 36.8343 15.2252C35.9714 16.9687 34.7723 17.5955 33.2685 17.5955C30.5931 17.5955 28.9497 15.6807 28.9497 12.4821C28.9497 9.28348 30.6501 7.36874 33.2115 7.36874C34.7723 7.36874 36.0539 8.05402 36.8619 9.68256C37.1135 10.1683 37.4182 10.396 37.9214 10.396H39.0085C39.5648 10.396 39.8439 10.0252 39.6493 9.481C38.4797 6.22392 35.8593 4.96826 33.1859 4.96826C29.1463 4.96826 26.1367 8.0258 26.1367 12.4821C26.1367 16.9384 29.0067 19.996 33.1859 19.996ZM106.098 11.168C106.459 8.73929 108.075 7.22564 110.277 7.22564C112.479 7.22564 114.122 8.76751 114.316 11.168H106.098ZM110.389 19.996C112.952 19.996 115.516 18.7685 116.77 15.9972C117.076 15.3401 116.797 14.8826 116.241 14.8826H115.211C114.71 14.8826 114.403 15.1103 114.151 15.5679C113.316 17.0815 111.867 17.7104 110.391 17.7104C107.855 17.7104 106.212 15.9387 106.017 13.0545H116.243C116.799 13.0545 117.163 12.7401 117.163 12.1395C117.051 7.65494 114.21 4.97027 110.281 4.97027C106.351 4.97027 103.232 7.88471 103.232 12.4841C103.232 17.0835 106.269 19.998 110.393 19.998L110.389 19.996ZM94.1734 12.855H95.0934C95.6497 12.855 95.9564 12.5406 96.0409 11.9399C96.5716 8.08022 98.7752 7.56828 101.118 7.68316C101.62 7.70735 102.031 7.3123 102.031 6.79633V5.91152C102.031 5.34113 101.751 4.99647 101.195 4.96826C99.1212 4.88763 97.2714 5.61725 96.2021 7.68316C96.1431 7.79603 95.978 7.7658 95.9642 7.63882L95.7912 6.08082C95.7362 5.51043 95.4295 5.22423 94.8713 5.22423H90.6646C90.1731 5.22423 89.7721 5.63338 89.7721 6.13927V6.62501C89.7721 7.12889 90.1711 7.54006 90.6646 7.54006H92.3924C92.8839 7.54006 93.2849 7.94921 93.2849 8.4551V11.9399C93.2849 12.4438 93.6839 12.855 94.1773 12.855H94.1734ZM90.4129 19.7118H99.133C99.6893 19.7118 100.025 19.3691 100.025 18.7967V18.311C100.025 17.7406 99.6913 17.3959 99.133 17.3959H96.9038C96.3475 17.3959 96.0114 17.0533 96.0114 16.4809V14.9088C96.0114 14.3384 95.6772 13.9938 95.1189 13.9938H94.1714C93.6151 13.9938 93.279 14.3364 93.279 14.9088V16.4809C93.279 17.0513 92.9448 17.3959 92.3866 17.3959H90.409C89.8527 17.3959 89.5165 17.7386 89.5165 18.311V18.7967C89.5165 19.3671 89.8507 19.7118 90.409 19.7118H90.4129ZM76.9554 11.17C77.3171 8.74131 78.9329 7.22765 81.1346 7.22765C83.3362 7.22765 84.9796 8.76952 85.1742 11.17H76.9554ZM81.2466 19.998C83.81 19.998 86.3733 18.7705 87.6275 15.9992C87.9341 15.3421 87.655 14.8846 87.0987 14.8846H86.0686C85.5673 14.8846 85.2607 15.1124 85.0091 15.5699C84.1736 17.0835 82.7249 17.7124 81.2486 17.7124C78.7128 17.7124 77.0694 15.9407 76.8748 13.0565H87.1006C87.6569 13.0565 88.0206 12.7421 88.0206 12.1415C87.9086 7.65696 85.068 4.97229 81.1385 4.97229C77.209 4.97229 74.0893 7.88673 74.0893 12.4861C74.0893 17.0856 77.1264 20 81.2505 20L81.2466 19.998ZM49.0122 19.998C53.1914 19.998 56.1734 16.8276 56.1734 12.4841C56.1734 8.14068 53.1914 4.97027 49.0122 4.97027C44.833 4.97027 41.851 8.19913 41.851 12.4841C41.851 13.4838 42.018 14.5984 42.5193 15.8259C42.7709 16.4265 43.2447 16.5111 43.7459 16.1403L44.5539 15.5397C44.9726 15.2252 45.0827 14.8544 44.9431 14.3122C44.721 13.5987 44.6639 12.9699 44.6639 12.4277C44.6639 9.4286 46.4194 7.37075 49.0102 7.37075C51.6011 7.37075 53.3565 9.39837 53.3565 12.4841C53.3565 15.5699 51.6286 17.5975 49.0653 17.5975C48.1728 17.5975 47.3374 17.4262 46.3348 16.6542C45.9161 16.3116 45.5269 16.2552 45.0807 16.5978L44.4674 17.0553C43.9661 17.4262 43.9111 17.9401 44.3828 18.3412C45.8316 19.5405 47.5025 19.998 49.0083 19.998H49.0122ZM59.7098 19.7118H60.6298C61.1212 19.7118 61.5222 19.3026 61.5222 18.7967V11.9702C61.5222 9.08596 63.0261 7.37075 65.3673 7.37075C67.4844 7.37075 68.711 8.79976 68.711 11.428V18.7987C68.711 19.3026 69.1101 19.7138 69.6035 19.7138H70.551C71.0424 19.7138 71.4434 19.3046 71.4434 18.7987V10.9705C71.4434 7.11478 69.5209 4.97229 66.2617 4.97229C64.0423 4.97229 62.7312 5.90346 61.7522 7.19944C61.6775 7.2982 61.5262 7.24378 61.5262 7.12083V0.915046C61.5203 0.40915 61.1212 0 60.6298 0H59.7098C59.2184 0 58.8174 0.40915 58.8174 0.915046V18.7967C58.8174 19.3006 59.2164 19.7118 59.7098 19.7118Z" fill="#355146"/>
|
|
8
|
+
<defs>
|
|
9
|
+
<clipPath id="clip0_3176_6183">
|
|
10
|
+
<rect width="19.5062" height="20" fill="white" transform="translate(0.5)"/>
|
|
11
|
+
</clipPath>
|
|
12
|
+
</defs>
|
|
13
|
+
</svg>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<svg width="33" height="22" viewBox="0 0 33 22" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g clip-path="url(#clip0_2388_1361)">
|
|
3
|
+
<path d="M0.919774 0.333984H8.91897C9.46825 0.333984 9.78182 0.961122 9.45225 1.40054L8.65233 2.4671C8.40049 2.8028 8.00547 3.00038 7.58577 3.00038H0.919774C0.551677 3.00038 0.253174 2.70188 0.253174 2.33378V1.00058C0.253174 0.632488 0.551677 0.333984 0.919774 0.333984Z" fill="#222222"/>
|
|
4
|
+
<path d="M32.2504 1.00058V2.33378C32.2504 2.70188 31.9519 3.00038 31.5838 3.00038H12.919C12.3697 3.00038 12.0562 2.37325 12.3857 1.93382L13.3856 0.600624C13.5115 0.432774 13.7091 0.333984 13.9189 0.333984H31.5838C31.9519 0.333984 32.2504 0.632488 32.2504 1.00058Z" fill="#222222"/>
|
|
5
|
+
<path d="M31.5834 9.66602H0.919774C0.551621 9.66602 0.253174 9.96446 0.253174 10.3326V11.6658C0.253174 12.034 0.551621 12.3324 0.919774 12.3324H31.5834C31.9515 12.3324 32.25 12.034 32.25 11.6658V10.3326C32.25 9.96446 31.9515 9.66602 31.5834 9.66602Z" fill="#222222"/>
|
|
6
|
+
<path d="M0.919774 18.998H19.5846C20.1339 18.998 20.4474 19.6252 20.1179 20.0646L19.3179 21.1312C19.0661 21.4669 18.6711 21.6644 18.2514 21.6644H0.919774C0.551677 21.6644 0.253174 21.3659 0.253174 20.9978V19.6646C0.253174 19.2966 0.551677 18.998 0.919774 18.998Z" fill="#222222"/>
|
|
7
|
+
<path d="M32.2508 19.6666V20.9998C32.2508 21.3679 31.9523 21.6664 31.5842 21.6664H23.585C23.0358 21.6664 22.7222 21.0393 23.0518 20.5998L23.8517 19.5333C24.1035 19.1976 24.4985 19 24.9182 19H31.5842C31.9523 19 32.2508 19.2985 32.2508 19.6666Z" fill="#222222"/>
|
|
8
|
+
</g>
|
|
9
|
+
<defs>
|
|
10
|
+
<clipPath id="clip0_2388_1361">
|
|
11
|
+
<rect width="31.9968" height="21.3312" fill="white" transform="translate(0.253174 0.333984)"/>
|
|
12
|
+
</clipPath>
|
|
13
|
+
</defs>
|
|
14
|
+
</svg>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "cohere",
|
|
3
|
+
"name": "Cohere",
|
|
4
|
+
"baseUrl": "https://api.cohere.ai/compatibility/v1",
|
|
5
|
+
"compatibleKindId": "cohere-compatible",
|
|
6
|
+
"branding": {
|
|
7
|
+
"logo": {
|
|
8
|
+
"kind": "mark",
|
|
9
|
+
"format": "svg",
|
|
10
|
+
"path": "./assets/logos/providers/cohere.svg",
|
|
11
|
+
"sourceUrl": "https://cohere.com/nav_icon.svg",
|
|
12
|
+
"sourcePageUrl": "https://cohere.com/",
|
|
13
|
+
"source": "official-homepage-inline",
|
|
14
|
+
"theme": "any"
|
|
15
|
+
},
|
|
16
|
+
"wordmark": {
|
|
17
|
+
"kind": "wordmark",
|
|
18
|
+
"format": "svg",
|
|
19
|
+
"path": "./assets/logos/providers/cohere-wordmark.svg",
|
|
20
|
+
"sourceUrl": "https://cohere.com/logo.svg",
|
|
21
|
+
"sourcePageUrl": "https://cohere.com/",
|
|
22
|
+
"source": "official-homepage-inline",
|
|
23
|
+
"theme": "any"
|
|
24
|
+
},
|
|
25
|
+
"sourcePageUrl": "https://cohere.com/"
|
|
26
|
+
},
|
|
27
|
+
"docsUrl": "https://docs.cohere.com/",
|
|
28
|
+
"sourceUrls": [
|
|
29
|
+
"https://cohere.com/"
|
|
30
|
+
]
|
|
31
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { type RuntimePlugin } from '@vibesdotdev/kernel';
|
|
2
|
+
/** Complete runtime boundary for Cohere-owned AI capabilities. */
|
|
3
|
+
export declare function createCohereAIPlugin(): RuntimePlugin;
|
|
4
|
+
export declare const cohereAIPlugin: RuntimePlugin;
|
|
5
|
+
export default cohereAIPlugin;
|
|
6
|
+
//# sourceMappingURL=provider.plugin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.plugin.d.ts","sourceRoot":"","sources":["../../src/ai/provider.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAuB,KAAK,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAkE9E,kEAAkE;AAClE,wBAAgB,oBAAoB,IAAI,aAAa,CAqDpD;AAED,eAAO,MAAM,cAAc,EAAE,aAAsC,CAAC;AACpE,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { createRuntimePlugin } from '@vibesdotdev/kernel';
|
|
2
|
+
import { AI_PROVIDER_SCHEMA_KIND } from '@vibesdotdev/ai/providers-runtime';
|
|
3
|
+
import { AI_PROVIDER_RECOMMENDATION_KIND, createAIProviderRecommendationDescriptor } from '@vibesdotdev/ai/recommendations';
|
|
4
|
+
import cohereProviderDescriptor from "./providers/cloud/api/cohere/provider.cohere.descriptor.js";
|
|
5
|
+
import cohereProviderConfigDescriptor from "./providers/cloud/api/cohere/config/config.cohere.descriptor.js";
|
|
6
|
+
import { cohereConnectionSchema as schema0 } from "./providers/cloud/api/cohere/config/schemas/index.js";
|
|
7
|
+
import provider_cohere from './metadata/providers/cohere.json' with { type: 'json' };
|
|
8
|
+
import { AIProviderMetadataSchema, decorateProviderDescriptor } from '@vibesdotdev/ai/metadata';
|
|
9
|
+
const providerMetadata = AIProviderMetadataSchema.parse(provider_cohere);
|
|
10
|
+
const providerDetectionDescriptor = {
|
|
11
|
+
id: 'cohere',
|
|
12
|
+
kind: 'ai/provider-detection',
|
|
13
|
+
providerId: 'cohere',
|
|
14
|
+
description: `System detection loader for ${'cohere'}`
|
|
15
|
+
};
|
|
16
|
+
const providerRecommendationDescriptor = createAIProviderRecommendationDescriptor({
|
|
17
|
+
id: 'cohere',
|
|
18
|
+
providerType: 'cohere',
|
|
19
|
+
displayName: 'Cohere',
|
|
20
|
+
name: 'Cohere provider recommendation',
|
|
21
|
+
description: 'Scores Cohere without embedding vendor policy in Framework',
|
|
22
|
+
hardware: ['consumer', 'cloud'],
|
|
23
|
+
enabled: true,
|
|
24
|
+
tags: ['cohere', 'cloud', 'rag']
|
|
25
|
+
});
|
|
26
|
+
const providerDocsDescriptor = {
|
|
27
|
+
kind: 'docs/topic',
|
|
28
|
+
id: 'ai.providers.cohere',
|
|
29
|
+
title: 'Cohere provider',
|
|
30
|
+
summary: 'Configure Cohere text generation and embeddings over the OpenAI-compatible endpoint through runtime-owned credentials.',
|
|
31
|
+
body: {
|
|
32
|
+
type: 'markdown',
|
|
33
|
+
sourceType: 'raw',
|
|
34
|
+
source: '# Cohere provider\n\nUse `COHERE_API_KEY` through a CredentialReference. Framework owns neutral AI kinds; this package owns Cohere identity, policy, and detection.\n'
|
|
35
|
+
},
|
|
36
|
+
tags: ['ai', 'providers', 'cohere'],
|
|
37
|
+
parent: 'ai.providers',
|
|
38
|
+
order: 20,
|
|
39
|
+
surfaces: ['cli', 'web', 'in-app'],
|
|
40
|
+
hardware: ['consumer', 'cloud'],
|
|
41
|
+
enabled: true
|
|
42
|
+
};
|
|
43
|
+
const providerSchemaDescriptor = {
|
|
44
|
+
id: 'integrations/cohere/ai/cohere',
|
|
45
|
+
kind: AI_PROVIDER_SCHEMA_KIND,
|
|
46
|
+
providerId: 'cohere',
|
|
47
|
+
schemaKind: 'connection',
|
|
48
|
+
sourcePath: 'integrations/cohere/src/ai/providers/cloud/api/cohere/config/schemas/index.ts',
|
|
49
|
+
version: '0.1.0-rc.0',
|
|
50
|
+
name: 'Cohere',
|
|
51
|
+
description: cohereProviderDescriptor.description
|
|
52
|
+
};
|
|
53
|
+
/** Complete runtime boundary for Cohere-owned AI capabilities. */
|
|
54
|
+
export function createCohereAIPlugin() {
|
|
55
|
+
return createRuntimePlugin({
|
|
56
|
+
id: 'integrations-cohere/ai',
|
|
57
|
+
name: 'Cohere AI Integration',
|
|
58
|
+
description: 'Registers Cohere-owned AI descriptors and lazy implementations',
|
|
59
|
+
dependencies: ['ai/providers'],
|
|
60
|
+
onRegister(runtime) {
|
|
61
|
+
runtime.registerDescriptor('ai/provider', decorateProviderDescriptor(cohereProviderDescriptor, providerMetadata));
|
|
62
|
+
runtime.registerDescriptor('config/manifest', cohereProviderConfigDescriptor);
|
|
63
|
+
runtime.registerDescriptor('ai/provider-detection', providerDetectionDescriptor);
|
|
64
|
+
runtime.registerDescriptor(AI_PROVIDER_SCHEMA_KIND, providerSchemaDescriptor);
|
|
65
|
+
runtime.registerDescriptor(AI_PROVIDER_RECOMMENDATION_KIND, providerRecommendationDescriptor);
|
|
66
|
+
if (runtime.hasKind('docs/topic'))
|
|
67
|
+
runtime.registerDescriptor('docs/topic', providerDocsDescriptor);
|
|
68
|
+
},
|
|
69
|
+
onActivate(runtime) {
|
|
70
|
+
runtime.registerLoader('ai/provider', 'cohere', async () => ({
|
|
71
|
+
meta: { id: 'cohere', kind: 'ai/provider', priority: 0 },
|
|
72
|
+
impl: (await import("./providers/cohere/cohere.provider.impl.js")).CohereProviderType
|
|
73
|
+
}));
|
|
74
|
+
runtime.registerLoader('ai/provider-detection', 'cohere', async () => ({
|
|
75
|
+
meta: { id: 'cohere', kind: 'ai/provider-detection', priority: 0 },
|
|
76
|
+
impl: {
|
|
77
|
+
detect: async () => (await import("./providers/cohere/detection/system.js")).detectCohereSystem(runtime)
|
|
78
|
+
}
|
|
79
|
+
}));
|
|
80
|
+
runtime.registerLoader(AI_PROVIDER_SCHEMA_KIND, providerSchemaDescriptor.id, async () => ({
|
|
81
|
+
meta: { id: providerSchemaDescriptor.id, kind: AI_PROVIDER_SCHEMA_KIND, priority: 0 },
|
|
82
|
+
impl: {
|
|
83
|
+
connectionSchema: schema0,
|
|
84
|
+
metadata: {
|
|
85
|
+
name: 'Cohere',
|
|
86
|
+
description: cohereProviderDescriptor.description,
|
|
87
|
+
category: 'cloud',
|
|
88
|
+
capabilities: ['text', 'embedding', 'connection'],
|
|
89
|
+
fields: []
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}));
|
|
93
|
+
runtime.registerLoader(AI_PROVIDER_RECOMMENDATION_KIND, providerRecommendationDescriptor.id, async () => ({
|
|
94
|
+
meta: {
|
|
95
|
+
id: providerRecommendationDescriptor.id,
|
|
96
|
+
kind: AI_PROVIDER_RECOMMENDATION_KIND,
|
|
97
|
+
priority: providerRecommendationDescriptor.priority ?? 0
|
|
98
|
+
},
|
|
99
|
+
impl: (await import("./providers/cohere/recommendations.js")).CohereRecommendation
|
|
100
|
+
}));
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
export const cohereAIPlugin = createCohereAIPlugin();
|
|
105
|
+
export default cohereAIPlugin;
|
|
106
|
+
//# sourceMappingURL=provider.plugin.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.plugin.js","sourceRoot":"","sources":["../../src/ai/provider.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAsB,MAAM,qBAAqB,CAAC;AAC9E,OAAO,EACN,uBAAuB,EAEvB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EACN,+BAA+B,EAC/B,wCAAwC,EACxC,MAAM,iCAAiC,CAAC;AAIzC,OAAO,wBAAwB,MAAM,4DAA4D,CAAC;AAClG,OAAO,8BAA8B,MAAM,iEAAiE,CAAC;AAC7G,OAAO,EAAE,sBAAsB,IAAI,OAAO,EAAE,MAAM,sDAAsD,CAAC;AACzG,OAAO,eAAe,MAAM,kCAAkC,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AACrF,OAAO,EAAE,wBAAwB,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AAEhG,MAAM,gBAAgB,GAAG,wBAAwB,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;AAEzE,MAAM,2BAA2B,GAAkC;IAClE,EAAE,EAAE,QAAQ;IACZ,IAAI,EAAE,uBAAuB;IAC7B,UAAU,EAAE,QAAQ;IACpB,WAAW,EAAE,+BAA+B,QAAQ,EAAE;CACtD,CAAC;AACF,MAAM,gCAAgC,GAAG,wCAAwC,CAAC;IACjF,EAAE,EAAE,QAAQ;IACZ,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