@open-wa/api 5.11.0 → 5.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.
- package/dist/index.cjs +1 -29
- package/package.json +4 -4
- package/src/routes/agent-discovery.ts +1 -31
package/dist/index.cjs
CHANGED
|
@@ -217,7 +217,7 @@ function createApiMiddleware(clientSource, options) {
|
|
|
217
217
|
//#endregion
|
|
218
218
|
//#region src/version.ts
|
|
219
219
|
/** Version of the API package running the Easy API server. */
|
|
220
|
-
const API_VERSION = "5.
|
|
220
|
+
const API_VERSION = "5.12.0";
|
|
221
221
|
//#endregion
|
|
222
222
|
//#region src/docs/openapi.ts
|
|
223
223
|
function schemaToOpenApi(schema) {
|
|
@@ -5991,34 +5991,6 @@ Sitemap: ${joinPath(origin, "sitemap.xml")}
|
|
|
5991
5991
|
status: [{ href: joinPath(origin, "health") }]
|
|
5992
5992
|
}] });
|
|
5993
5993
|
});
|
|
5994
|
-
app.get("/.well-known/oauth-authorization-server", (c) => {
|
|
5995
|
-
const origin = new URL(c.req.url).origin;
|
|
5996
|
-
return c.json({
|
|
5997
|
-
issuer: origin,
|
|
5998
|
-
authorization_endpoint: joinPath(origin, "api"),
|
|
5999
|
-
token_endpoint: joinPath(origin, "api"),
|
|
6000
|
-
grant_types_supported: ["client_credentials"],
|
|
6001
|
-
note: "Easy API uses X-API-Key headers strictly for authentication."
|
|
6002
|
-
});
|
|
6003
|
-
});
|
|
6004
|
-
app.get("/.well-known/openid-configuration", (c) => {
|
|
6005
|
-
const origin = new URL(c.req.url).origin;
|
|
6006
|
-
return c.json({
|
|
6007
|
-
issuer: origin,
|
|
6008
|
-
authorization_endpoint: joinPath(origin, "api"),
|
|
6009
|
-
token_endpoint: joinPath(origin, "api"),
|
|
6010
|
-
grant_types_supported: ["client_credentials"],
|
|
6011
|
-
note: "Easy API uses X-API-Key headers strictly for authentication."
|
|
6012
|
-
});
|
|
6013
|
-
});
|
|
6014
|
-
app.get("/.well-known/oauth-protected-resource", (c) => {
|
|
6015
|
-
const origin = new URL(c.req.url).origin;
|
|
6016
|
-
return c.json({
|
|
6017
|
-
resource: joinPath(origin, "api"),
|
|
6018
|
-
authorization_servers: [origin],
|
|
6019
|
-
scopes_supported: ["all"]
|
|
6020
|
-
});
|
|
6021
|
-
});
|
|
6022
5994
|
app.get("/.well-known/mcp/server-card.json", (c) => {
|
|
6023
5995
|
const endpoint = options.config.mcp?.path || "/mcp";
|
|
6024
5996
|
return c.json({
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@open-wa/api",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.12.0",
|
|
4
4
|
"description": "Reusable Easy API transport and runtime explorer layer for open-wa",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"types": "./dist/index.d.cts",
|
|
@@ -19,9 +19,9 @@
|
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@elastic/elasticsearch": "^9.5.1",
|
|
21
21
|
"@hono/node-server": "^2.1.1",
|
|
22
|
-
"@open-wa/mcp": "5.
|
|
23
|
-
"@open-wa/schema": "5.
|
|
24
|
-
"@open-wa/screencaster": "5.
|
|
22
|
+
"@open-wa/mcp": "5.12.0",
|
|
23
|
+
"@open-wa/schema": "5.12.0",
|
|
24
|
+
"@open-wa/screencaster": "5.12.0",
|
|
25
25
|
"hono": "^4.13.9",
|
|
26
26
|
"tree-kill": "^1.2.2",
|
|
27
27
|
"ws": "^8.22.0"
|
|
@@ -83,37 +83,7 @@ Sitemap: ${sitemapUrl}
|
|
|
83
83
|
});
|
|
84
84
|
});
|
|
85
85
|
|
|
86
|
-
|
|
87
|
-
const origin = new URL(c.req.url).origin;
|
|
88
|
-
return c.json({
|
|
89
|
-
issuer: origin,
|
|
90
|
-
authorization_endpoint: joinPath(origin, 'api'),
|
|
91
|
-
token_endpoint: joinPath(origin, 'api'),
|
|
92
|
-
grant_types_supported: ["client_credentials"],
|
|
93
|
-
note: "Easy API uses X-API-Key headers strictly for authentication."
|
|
94
|
-
});
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
app.get('/.well-known/openid-configuration', (c: any) => {
|
|
98
|
-
// Alias for OAuth Auth Server
|
|
99
|
-
const origin = new URL(c.req.url).origin;
|
|
100
|
-
return c.json({
|
|
101
|
-
issuer: origin,
|
|
102
|
-
authorization_endpoint: joinPath(origin, 'api'),
|
|
103
|
-
token_endpoint: joinPath(origin, 'api'),
|
|
104
|
-
grant_types_supported: ["client_credentials"],
|
|
105
|
-
note: "Easy API uses X-API-Key headers strictly for authentication."
|
|
106
|
-
});
|
|
107
|
-
});
|
|
108
|
-
|
|
109
|
-
app.get('/.well-known/oauth-protected-resource', (c: any) => {
|
|
110
|
-
const origin = new URL(c.req.url).origin;
|
|
111
|
-
return c.json({
|
|
112
|
-
resource: joinPath(origin, 'api'),
|
|
113
|
-
authorization_servers: [origin],
|
|
114
|
-
scopes_supported: ["all"],
|
|
115
|
-
});
|
|
116
|
-
});
|
|
86
|
+
// OAuth metadata is served by the MCP adapter when MCP is enabled; the REST API itself uses X-API-Key.
|
|
117
87
|
|
|
118
88
|
app.get('/.well-known/mcp/server-card.json', (c: any) => {
|
|
119
89
|
const endpoint = options.config.mcp?.path || '/mcp';
|