@dexto/server 1.5.6 → 1.5.8
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/hono/index.cjs +6 -1
- package/dist/hono/index.d.ts +127 -22
- package/dist/hono/index.d.ts.map +1 -1
- package/dist/hono/index.js +6 -1
- package/dist/hono/middleware/error.cjs +6 -2
- package/dist/hono/middleware/error.d.ts.map +1 -1
- package/dist/hono/middleware/error.js +6 -2
- package/dist/hono/routes/a2a-tasks.d.ts +5 -5
- package/dist/hono/routes/dexto-auth.cjs +72 -0
- package/dist/hono/routes/dexto-auth.d.ts +21 -0
- package/dist/hono/routes/dexto-auth.d.ts.map +1 -0
- package/dist/hono/routes/dexto-auth.js +52 -0
- package/dist/hono/routes/key.d.ts +4 -4
- package/dist/hono/routes/llm.cjs +75 -5
- package/dist/hono/routes/llm.d.ts +97 -8
- package/dist/hono/routes/llm.d.ts.map +1 -1
- package/dist/hono/routes/llm.js +80 -6
- package/dist/hono/routes/mcp.d.ts +1 -1
- package/dist/hono/routes/messages.d.ts +1 -1
- package/dist/hono/routes/queue.cjs +9 -3
- package/dist/hono/routes/queue.d.ts +3 -0
- package/dist/hono/routes/queue.d.ts.map +1 -1
- package/dist/hono/routes/queue.js +9 -3
- package/dist/hono/routes/search.d.ts +2 -2
- package/dist/hono/routes/sessions.d.ts +1 -1
- package/dist/hono/schemas/responses.d.ts +41 -41
- package/dist/hono/start-server.cjs +1 -0
- package/dist/hono/start-server.d.ts.map +1 -1
- package/dist/hono/start-server.js +2 -1
- package/dist/mcp/mcp-handler.cjs +0 -1
- package/dist/mcp/mcp-handler.d.ts.map +1 -1
- package/dist/mcp/mcp-handler.js +0 -1
- package/package.json +4 -4
package/dist/hono/index.cjs
CHANGED
|
@@ -45,6 +45,7 @@ var import_key = require("./routes/key.js");
|
|
|
45
45
|
var import_tools = require("./routes/tools.js");
|
|
46
46
|
var import_discovery = require("./routes/discovery.js");
|
|
47
47
|
var import_models = require("./routes/models.js");
|
|
48
|
+
var import_dexto_auth = require("./routes/dexto-auth.js");
|
|
48
49
|
var import_static = require("./routes/static.js");
|
|
49
50
|
var import_error = require("./middleware/error.js");
|
|
50
51
|
var import_redaction = require("./middleware/redaction.js");
|
|
@@ -102,7 +103,7 @@ function createDextoApp(options) {
|
|
|
102
103
|
app.use(middlewarePattern, import_redaction.prettyJsonMiddleware);
|
|
103
104
|
app.use(middlewarePattern, import_redaction.redactionMiddleware);
|
|
104
105
|
const routePrefix = normalizedPrefix;
|
|
105
|
-
const fullApp = app.route("/health", (0, import_health.createHealthRouter)(getAgent)).route("/", (0, import_a2a.createA2aRouter)(getAgentCard)).route("/", (0, import_a2a_jsonrpc.createA2AJsonRpcRouter)(getAgent, sseSubscriber)).route("/", (0, import_a2a_tasks.createA2ATasksRouter)(getAgent, sseSubscriber)).route(routePrefix, (0, import_greeting.createGreetingRouter)(getAgent)).route(routePrefix, (0, import_messages.createMessagesRouter)(getAgent, approvalCoordinator)).route(routePrefix, (0, import_llm.createLlmRouter)(getAgent)).route(routePrefix, (0, import_sessions.createSessionsRouter)(getAgent)).route(routePrefix, (0, import_search.createSearchRouter)(getAgent)).route(routePrefix, (0, import_mcp.createMcpRouter)(getAgent)).route(routePrefix, (0, import_webhooks.createWebhooksRouter)(getAgent, webhookSubscriber)).route(routePrefix, (0, import_prompts.createPromptsRouter)(getAgent)).route(routePrefix, (0, import_resources.createResourcesRouter)(getAgent)).route(routePrefix, (0, import_memory.createMemoryRouter)(getAgent)).route(routePrefix, (0, import_approvals.createApprovalsRouter)(getAgent, approvalCoordinator)).route(routePrefix, (0, import_agents.createAgentsRouter)(getAgent, agentsContext || dummyAgentsContext)).route(routePrefix, (0, import_queue.createQueueRouter)(getAgent)).route(routePrefix, (0, import_openrouter.createOpenRouterRouter)()).route(routePrefix, (0, import_key.createKeyRouter)()).route(routePrefix, (0, import_tools.createToolsRouter)(getAgent)).route(routePrefix, (0, import_discovery.createDiscoveryRouter)()).route(routePrefix, (0, import_models.createModelsRouter)());
|
|
106
|
+
const fullApp = app.route("/health", (0, import_health.createHealthRouter)(getAgent)).route("/", (0, import_a2a.createA2aRouter)(getAgentCard)).route("/", (0, import_a2a_jsonrpc.createA2AJsonRpcRouter)(getAgent, sseSubscriber)).route("/", (0, import_a2a_tasks.createA2ATasksRouter)(getAgent, sseSubscriber)).route(routePrefix, (0, import_greeting.createGreetingRouter)(getAgent)).route(routePrefix, (0, import_messages.createMessagesRouter)(getAgent, approvalCoordinator)).route(routePrefix, (0, import_llm.createLlmRouter)(getAgent)).route(routePrefix, (0, import_sessions.createSessionsRouter)(getAgent)).route(routePrefix, (0, import_search.createSearchRouter)(getAgent)).route(routePrefix, (0, import_mcp.createMcpRouter)(getAgent)).route(routePrefix, (0, import_webhooks.createWebhooksRouter)(getAgent, webhookSubscriber)).route(routePrefix, (0, import_prompts.createPromptsRouter)(getAgent)).route(routePrefix, (0, import_resources.createResourcesRouter)(getAgent)).route(routePrefix, (0, import_memory.createMemoryRouter)(getAgent)).route(routePrefix, (0, import_approvals.createApprovalsRouter)(getAgent, approvalCoordinator)).route(routePrefix, (0, import_agents.createAgentsRouter)(getAgent, agentsContext || dummyAgentsContext)).route(routePrefix, (0, import_queue.createQueueRouter)(getAgent)).route(routePrefix, (0, import_openrouter.createOpenRouterRouter)()).route(routePrefix, (0, import_key.createKeyRouter)()).route(routePrefix, (0, import_tools.createToolsRouter)(getAgent)).route(routePrefix, (0, import_discovery.createDiscoveryRouter)()).route(routePrefix, (0, import_models.createModelsRouter)()).route(routePrefix, (0, import_dexto_auth.createDextoAuthRouter)(getAgent));
|
|
106
107
|
fullApp.doc("/openapi.json", {
|
|
107
108
|
openapi: "3.0.0",
|
|
108
109
|
info: {
|
|
@@ -198,6 +199,10 @@ function createDextoApp(options) {
|
|
|
198
199
|
{
|
|
199
200
|
name: "models",
|
|
200
201
|
description: "List and manage local GGUF models and Ollama models"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
name: "auth",
|
|
205
|
+
description: "Dexto authentication status and management"
|
|
201
206
|
}
|
|
202
207
|
]
|
|
203
208
|
});
|
package/dist/hono/index.d.ts
CHANGED
|
@@ -26,6 +26,19 @@ export type CreateDextoAppOptions = {
|
|
|
26
26
|
disableAuth?: boolean;
|
|
27
27
|
};
|
|
28
28
|
export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIHono<import("hono").Env, import("hono/types").MergeSchemaPath<{
|
|
29
|
+
"/dexto-auth/status": {
|
|
30
|
+
$get: {
|
|
31
|
+
input: {};
|
|
32
|
+
output: {
|
|
33
|
+
enabled: boolean;
|
|
34
|
+
authenticated: boolean;
|
|
35
|
+
canUse: boolean;
|
|
36
|
+
};
|
|
37
|
+
outputFormat: "json";
|
|
38
|
+
status: 200;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
}, "/api"> & import("hono/types").MergeSchemaPath<{
|
|
29
42
|
"/models/local": {
|
|
30
43
|
$get: {
|
|
31
44
|
input: {};
|
|
@@ -213,11 +226,11 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
|
|
|
213
226
|
$get: {
|
|
214
227
|
input: {
|
|
215
228
|
param: {
|
|
216
|
-
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama";
|
|
229
|
+
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
217
230
|
};
|
|
218
231
|
};
|
|
219
232
|
output: {
|
|
220
|
-
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama";
|
|
233
|
+
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
221
234
|
hasKey: boolean;
|
|
222
235
|
envVar: string;
|
|
223
236
|
keyValue?: string | undefined;
|
|
@@ -231,12 +244,12 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
|
|
|
231
244
|
$post: {
|
|
232
245
|
input: {
|
|
233
246
|
json: {
|
|
234
|
-
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama";
|
|
247
|
+
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
235
248
|
apiKey: string;
|
|
236
249
|
};
|
|
237
250
|
};
|
|
238
251
|
output: {
|
|
239
|
-
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama";
|
|
252
|
+
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
240
253
|
ok: true;
|
|
241
254
|
envVar: string;
|
|
242
255
|
};
|
|
@@ -335,6 +348,7 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
|
|
|
335
348
|
metadata?: {
|
|
336
349
|
[x: string]: import("hono/utils/types").JSONValue;
|
|
337
350
|
} | undefined;
|
|
351
|
+
kind?: "default" | "background" | undefined;
|
|
338
352
|
}[];
|
|
339
353
|
count: number;
|
|
340
354
|
};
|
|
@@ -364,6 +378,7 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
|
|
|
364
378
|
data: string;
|
|
365
379
|
filename?: string | undefined;
|
|
366
380
|
})[];
|
|
381
|
+
kind?: "default" | "background" | undefined;
|
|
367
382
|
};
|
|
368
383
|
};
|
|
369
384
|
output: {};
|
|
@@ -389,6 +404,7 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
|
|
|
389
404
|
data: string;
|
|
390
405
|
filename?: string | undefined;
|
|
391
406
|
})[];
|
|
407
|
+
kind?: "default" | "background" | undefined;
|
|
392
408
|
};
|
|
393
409
|
};
|
|
394
410
|
output: {
|
|
@@ -1325,7 +1341,7 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
|
|
|
1325
1341
|
input: {};
|
|
1326
1342
|
output: {
|
|
1327
1343
|
servers: {
|
|
1328
|
-
status: "error" | "connected" | "disconnected";
|
|
1344
|
+
status: "error" | "connected" | "disconnected" | "auth-required";
|
|
1329
1345
|
id: string;
|
|
1330
1346
|
name: string;
|
|
1331
1347
|
}[];
|
|
@@ -1578,7 +1594,7 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
|
|
|
1578
1594
|
totalTokens?: number | undefined;
|
|
1579
1595
|
} | undefined;
|
|
1580
1596
|
model?: string | undefined;
|
|
1581
|
-
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | undefined;
|
|
1597
|
+
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova" | undefined;
|
|
1582
1598
|
toolCalls?: {
|
|
1583
1599
|
function: {
|
|
1584
1600
|
name: string;
|
|
@@ -1660,7 +1676,7 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
|
|
|
1660
1676
|
totalTokens?: number | undefined;
|
|
1661
1677
|
} | undefined;
|
|
1662
1678
|
model?: string | undefined;
|
|
1663
|
-
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | undefined;
|
|
1679
|
+
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova" | undefined;
|
|
1664
1680
|
toolCalls?: {
|
|
1665
1681
|
function: {
|
|
1666
1682
|
name: string;
|
|
@@ -1793,7 +1809,7 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
|
|
|
1793
1809
|
totalTokens?: number | undefined;
|
|
1794
1810
|
} | undefined;
|
|
1795
1811
|
model?: string | undefined;
|
|
1796
|
-
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | undefined;
|
|
1812
|
+
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova" | undefined;
|
|
1797
1813
|
toolCalls?: {
|
|
1798
1814
|
function: {
|
|
1799
1815
|
name: string;
|
|
@@ -1943,7 +1959,7 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
|
|
|
1943
1959
|
output: {
|
|
1944
1960
|
config: {
|
|
1945
1961
|
model: string;
|
|
1946
|
-
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama";
|
|
1962
|
+
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
1947
1963
|
maxIterations?: number | undefined;
|
|
1948
1964
|
baseURL?: string | undefined;
|
|
1949
1965
|
maxInputTokens?: number | undefined;
|
|
@@ -1954,6 +1970,9 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
|
|
|
1954
1970
|
hasApiKey?: boolean | undefined;
|
|
1955
1971
|
displayName?: string | undefined;
|
|
1956
1972
|
};
|
|
1973
|
+
routing: {
|
|
1974
|
+
viaDexto: boolean;
|
|
1975
|
+
};
|
|
1957
1976
|
};
|
|
1958
1977
|
outputFormat: "json";
|
|
1959
1978
|
status: 200;
|
|
@@ -1965,6 +1984,8 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
|
|
|
1965
1984
|
input: {
|
|
1966
1985
|
query: {
|
|
1967
1986
|
provider?: string | string[] | undefined;
|
|
1987
|
+
scope?: "curated" | "all" | undefined;
|
|
1988
|
+
includeModels?: "0" | "1" | "true" | "false" | undefined;
|
|
1968
1989
|
hasKey?: "0" | "1" | "true" | "false" | undefined;
|
|
1969
1990
|
fileType?: "image" | "audio" | "pdf" | undefined;
|
|
1970
1991
|
defaultOnly?: "0" | "1" | "true" | "false" | undefined;
|
|
@@ -2127,6 +2148,50 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
|
|
|
2127
2148
|
} | undefined;
|
|
2128
2149
|
}[];
|
|
2129
2150
|
} | undefined;
|
|
2151
|
+
minimax?: {
|
|
2152
|
+
name: string;
|
|
2153
|
+
hasApiKey: boolean;
|
|
2154
|
+
supportedFileTypes: ("image" | "audio" | "pdf")[];
|
|
2155
|
+
primaryEnvVar: string;
|
|
2156
|
+
supportsBaseURL: boolean;
|
|
2157
|
+
models: {
|
|
2158
|
+
name: string;
|
|
2159
|
+
maxInputTokens: number;
|
|
2160
|
+
supportedFileTypes: ("image" | "audio" | "pdf")[];
|
|
2161
|
+
default?: boolean | undefined;
|
|
2162
|
+
displayName?: string | undefined;
|
|
2163
|
+
pricing?: {
|
|
2164
|
+
inputPerM: number;
|
|
2165
|
+
outputPerM: number;
|
|
2166
|
+
cacheReadPerM?: number | undefined;
|
|
2167
|
+
cacheWritePerM?: number | undefined;
|
|
2168
|
+
currency?: "USD" | undefined;
|
|
2169
|
+
unit?: "per_million_tokens" | undefined;
|
|
2170
|
+
} | undefined;
|
|
2171
|
+
}[];
|
|
2172
|
+
} | undefined;
|
|
2173
|
+
glm?: {
|
|
2174
|
+
name: string;
|
|
2175
|
+
hasApiKey: boolean;
|
|
2176
|
+
supportedFileTypes: ("image" | "audio" | "pdf")[];
|
|
2177
|
+
primaryEnvVar: string;
|
|
2178
|
+
supportsBaseURL: boolean;
|
|
2179
|
+
models: {
|
|
2180
|
+
name: string;
|
|
2181
|
+
maxInputTokens: number;
|
|
2182
|
+
supportedFileTypes: ("image" | "audio" | "pdf")[];
|
|
2183
|
+
default?: boolean | undefined;
|
|
2184
|
+
displayName?: string | undefined;
|
|
2185
|
+
pricing?: {
|
|
2186
|
+
inputPerM: number;
|
|
2187
|
+
outputPerM: number;
|
|
2188
|
+
cacheReadPerM?: number | undefined;
|
|
2189
|
+
cacheWritePerM?: number | undefined;
|
|
2190
|
+
currency?: "USD" | undefined;
|
|
2191
|
+
unit?: "per_million_tokens" | undefined;
|
|
2192
|
+
} | undefined;
|
|
2193
|
+
}[];
|
|
2194
|
+
} | undefined;
|
|
2130
2195
|
openrouter?: {
|
|
2131
2196
|
name: string;
|
|
2132
2197
|
hasApiKey: boolean;
|
|
@@ -2281,6 +2346,28 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
|
|
|
2281
2346
|
} | undefined;
|
|
2282
2347
|
}[];
|
|
2283
2348
|
} | undefined;
|
|
2349
|
+
"dexto-nova"?: {
|
|
2350
|
+
name: string;
|
|
2351
|
+
hasApiKey: boolean;
|
|
2352
|
+
supportedFileTypes: ("image" | "audio" | "pdf")[];
|
|
2353
|
+
primaryEnvVar: string;
|
|
2354
|
+
supportsBaseURL: boolean;
|
|
2355
|
+
models: {
|
|
2356
|
+
name: string;
|
|
2357
|
+
maxInputTokens: number;
|
|
2358
|
+
supportedFileTypes: ("image" | "audio" | "pdf")[];
|
|
2359
|
+
default?: boolean | undefined;
|
|
2360
|
+
displayName?: string | undefined;
|
|
2361
|
+
pricing?: {
|
|
2362
|
+
inputPerM: number;
|
|
2363
|
+
outputPerM: number;
|
|
2364
|
+
cacheReadPerM?: number | undefined;
|
|
2365
|
+
cacheWritePerM?: number | undefined;
|
|
2366
|
+
currency?: "USD" | undefined;
|
|
2367
|
+
unit?: "per_million_tokens" | undefined;
|
|
2368
|
+
} | undefined;
|
|
2369
|
+
}[];
|
|
2370
|
+
} | undefined;
|
|
2284
2371
|
};
|
|
2285
2372
|
} | {
|
|
2286
2373
|
models: {
|
|
@@ -2310,15 +2397,15 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
|
|
|
2310
2397
|
input: {
|
|
2311
2398
|
json: {
|
|
2312
2399
|
model?: string | undefined;
|
|
2313
|
-
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | undefined;
|
|
2400
|
+
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova" | undefined;
|
|
2314
2401
|
apiKey?: string | undefined;
|
|
2402
|
+
maxInputTokens?: number | undefined;
|
|
2315
2403
|
maxIterations?: number | undefined;
|
|
2316
2404
|
baseURL?: string | undefined;
|
|
2317
|
-
maxInputTokens?: number | undefined;
|
|
2318
2405
|
maxOutputTokens?: number | undefined;
|
|
2319
2406
|
temperature?: number | undefined;
|
|
2320
2407
|
allowedMediaTypes?: string[] | undefined;
|
|
2321
|
-
reasoningEffort?: "
|
|
2408
|
+
reasoningEffort?: "low" | "none" | "minimal" | "medium" | "high" | "xhigh" | undefined;
|
|
2322
2409
|
} & {
|
|
2323
2410
|
sessionId?: string | undefined;
|
|
2324
2411
|
};
|
|
@@ -2326,7 +2413,7 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
|
|
|
2326
2413
|
output: {
|
|
2327
2414
|
config: {
|
|
2328
2415
|
model: string;
|
|
2329
|
-
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama";
|
|
2416
|
+
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
2330
2417
|
maxIterations?: number | undefined;
|
|
2331
2418
|
baseURL?: string | undefined;
|
|
2332
2419
|
maxInputTokens?: number | undefined;
|
|
@@ -2349,7 +2436,7 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
|
|
|
2349
2436
|
output: {
|
|
2350
2437
|
models: {
|
|
2351
2438
|
name: string;
|
|
2352
|
-
provider: "openai-compatible" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama";
|
|
2439
|
+
provider: "openai-compatible" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
2353
2440
|
apiKey?: string | undefined | undefined;
|
|
2354
2441
|
baseURL?: string | undefined | undefined;
|
|
2355
2442
|
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined | undefined;
|
|
@@ -2369,7 +2456,7 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
|
|
|
2369
2456
|
input: {
|
|
2370
2457
|
json: {
|
|
2371
2458
|
name: string;
|
|
2372
|
-
provider?: "openai-compatible" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | undefined;
|
|
2459
|
+
provider?: "openai-compatible" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova" | undefined;
|
|
2373
2460
|
apiKey?: string | undefined;
|
|
2374
2461
|
baseURL?: string | undefined;
|
|
2375
2462
|
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
|
|
@@ -2382,7 +2469,7 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
|
|
|
2382
2469
|
output: {
|
|
2383
2470
|
model: {
|
|
2384
2471
|
name: string;
|
|
2385
|
-
provider: "openai-compatible" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama";
|
|
2472
|
+
provider: "openai-compatible" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
2386
2473
|
apiKey?: string | undefined | undefined;
|
|
2387
2474
|
baseURL?: string | undefined | undefined;
|
|
2388
2475
|
reasoningEffort?: "none" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined | undefined;
|
|
@@ -2425,6 +2512,24 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
|
|
|
2425
2512
|
status: 404;
|
|
2426
2513
|
};
|
|
2427
2514
|
};
|
|
2515
|
+
} & {
|
|
2516
|
+
"/llm/capabilities": {
|
|
2517
|
+
$get: {
|
|
2518
|
+
input: {
|
|
2519
|
+
query: {
|
|
2520
|
+
model: string;
|
|
2521
|
+
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
2522
|
+
};
|
|
2523
|
+
};
|
|
2524
|
+
output: {
|
|
2525
|
+
model: string;
|
|
2526
|
+
provider: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova";
|
|
2527
|
+
supportedFileTypes: ("image" | "audio" | "pdf")[];
|
|
2528
|
+
};
|
|
2529
|
+
outputFormat: "json";
|
|
2530
|
+
status: 200;
|
|
2531
|
+
};
|
|
2532
|
+
};
|
|
2428
2533
|
}, "/api"> & import("hono/types").MergeSchemaPath<{
|
|
2429
2534
|
"/message": {
|
|
2430
2535
|
$post: {
|
|
@@ -2530,7 +2635,7 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
|
|
|
2530
2635
|
totalTokens?: number | undefined;
|
|
2531
2636
|
} | undefined;
|
|
2532
2637
|
model?: string | undefined;
|
|
2533
|
-
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | undefined;
|
|
2638
|
+
provider?: "openai" | "openai-compatible" | "anthropic" | "google" | "groq" | "xai" | "cohere" | "minimax" | "glm" | "openrouter" | "litellm" | "glama" | "vertex" | "bedrock" | "local" | "ollama" | "dexto-nova" | undefined;
|
|
2534
2639
|
};
|
|
2535
2640
|
outputFormat: "json";
|
|
2536
2641
|
status: 200;
|
|
@@ -2692,7 +2797,7 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
|
|
|
2692
2797
|
};
|
|
2693
2798
|
output: {
|
|
2694
2799
|
status: {
|
|
2695
|
-
state: "unknown" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "failed" | "rejected"
|
|
2800
|
+
state: "unknown" | "auth-required" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "failed" | "rejected";
|
|
2696
2801
|
message?: {
|
|
2697
2802
|
role: "user" | "agent";
|
|
2698
2803
|
kind: "message";
|
|
@@ -2794,7 +2899,7 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
|
|
|
2794
2899
|
$get: {
|
|
2795
2900
|
input: {
|
|
2796
2901
|
query: {
|
|
2797
|
-
status?: "unknown" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "failed" | "rejected" |
|
|
2902
|
+
status?: "unknown" | "auth-required" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "failed" | "rejected" | undefined;
|
|
2798
2903
|
contextId?: string | undefined;
|
|
2799
2904
|
pageSize?: string | undefined;
|
|
2800
2905
|
historyLength?: string | undefined;
|
|
@@ -2806,7 +2911,7 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
|
|
|
2806
2911
|
output: {
|
|
2807
2912
|
tasks: {
|
|
2808
2913
|
status: {
|
|
2809
|
-
state: "unknown" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "failed" | "rejected"
|
|
2914
|
+
state: "unknown" | "auth-required" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "failed" | "rejected";
|
|
2810
2915
|
message?: {
|
|
2811
2916
|
role: "user" | "agent";
|
|
2812
2917
|
kind: "message";
|
|
@@ -2926,7 +3031,7 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
|
|
|
2926
3031
|
};
|
|
2927
3032
|
output: {
|
|
2928
3033
|
status: {
|
|
2929
|
-
state: "unknown" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "failed" | "rejected"
|
|
3034
|
+
state: "unknown" | "auth-required" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "failed" | "rejected";
|
|
2930
3035
|
message?: {
|
|
2931
3036
|
role: "user" | "agent";
|
|
2932
3037
|
kind: "message";
|
|
@@ -3042,7 +3147,7 @@ export declare function createDextoApp(options: CreateDextoAppOptions): OpenAPIH
|
|
|
3042
3147
|
};
|
|
3043
3148
|
output: {
|
|
3044
3149
|
status: {
|
|
3045
|
-
state: "unknown" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "failed" | "rejected"
|
|
3150
|
+
state: "unknown" | "auth-required" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "failed" | "rejected";
|
|
3046
3151
|
message?: {
|
|
3047
3152
|
role: "user" | "agent";
|
|
3048
3153
|
kind: "message";
|
package/dist/hono/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hono/index.ts"],"names":[],"mappings":"AAAA,OAA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBA4M5D;AAID,MAAM,MAAM,OAAO,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAGxD,YAAY,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC"}
|
package/dist/hono/index.js
CHANGED
|
@@ -22,6 +22,7 @@ import { createKeyRouter } from "./routes/key.js";
|
|
|
22
22
|
import { createToolsRouter } from "./routes/tools.js";
|
|
23
23
|
import { createDiscoveryRouter } from "./routes/discovery.js";
|
|
24
24
|
import { createModelsRouter } from "./routes/models.js";
|
|
25
|
+
import { createDextoAuthRouter } from "./routes/dexto-auth.js";
|
|
25
26
|
import {
|
|
26
27
|
createStaticRouter,
|
|
27
28
|
createSpaFallbackHandler
|
|
@@ -81,7 +82,7 @@ function createDextoApp(options) {
|
|
|
81
82
|
app.use(middlewarePattern, prettyJsonMiddleware);
|
|
82
83
|
app.use(middlewarePattern, redactionMiddleware);
|
|
83
84
|
const routePrefix = normalizedPrefix;
|
|
84
|
-
const fullApp = app.route("/health", createHealthRouter(getAgent)).route("/", createA2aRouter(getAgentCard)).route("/", createA2AJsonRpcRouter(getAgent, sseSubscriber)).route("/", createA2ATasksRouter(getAgent, sseSubscriber)).route(routePrefix, createGreetingRouter(getAgent)).route(routePrefix, createMessagesRouter(getAgent, approvalCoordinator)).route(routePrefix, createLlmRouter(getAgent)).route(routePrefix, createSessionsRouter(getAgent)).route(routePrefix, createSearchRouter(getAgent)).route(routePrefix, createMcpRouter(getAgent)).route(routePrefix, createWebhooksRouter(getAgent, webhookSubscriber)).route(routePrefix, createPromptsRouter(getAgent)).route(routePrefix, createResourcesRouter(getAgent)).route(routePrefix, createMemoryRouter(getAgent)).route(routePrefix, createApprovalsRouter(getAgent, approvalCoordinator)).route(routePrefix, createAgentsRouter(getAgent, agentsContext || dummyAgentsContext)).route(routePrefix, createQueueRouter(getAgent)).route(routePrefix, createOpenRouterRouter()).route(routePrefix, createKeyRouter()).route(routePrefix, createToolsRouter(getAgent)).route(routePrefix, createDiscoveryRouter()).route(routePrefix, createModelsRouter());
|
|
85
|
+
const fullApp = app.route("/health", createHealthRouter(getAgent)).route("/", createA2aRouter(getAgentCard)).route("/", createA2AJsonRpcRouter(getAgent, sseSubscriber)).route("/", createA2ATasksRouter(getAgent, sseSubscriber)).route(routePrefix, createGreetingRouter(getAgent)).route(routePrefix, createMessagesRouter(getAgent, approvalCoordinator)).route(routePrefix, createLlmRouter(getAgent)).route(routePrefix, createSessionsRouter(getAgent)).route(routePrefix, createSearchRouter(getAgent)).route(routePrefix, createMcpRouter(getAgent)).route(routePrefix, createWebhooksRouter(getAgent, webhookSubscriber)).route(routePrefix, createPromptsRouter(getAgent)).route(routePrefix, createResourcesRouter(getAgent)).route(routePrefix, createMemoryRouter(getAgent)).route(routePrefix, createApprovalsRouter(getAgent, approvalCoordinator)).route(routePrefix, createAgentsRouter(getAgent, agentsContext || dummyAgentsContext)).route(routePrefix, createQueueRouter(getAgent)).route(routePrefix, createOpenRouterRouter()).route(routePrefix, createKeyRouter()).route(routePrefix, createToolsRouter(getAgent)).route(routePrefix, createDiscoveryRouter()).route(routePrefix, createModelsRouter()).route(routePrefix, createDextoAuthRouter(getAgent));
|
|
85
86
|
fullApp.doc("/openapi.json", {
|
|
86
87
|
openapi: "3.0.0",
|
|
87
88
|
info: {
|
|
@@ -177,6 +178,10 @@ function createDextoApp(options) {
|
|
|
177
178
|
{
|
|
178
179
|
name: "models",
|
|
179
180
|
description: "List and manage local GGUF models and Ollama models"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
name: "auth",
|
|
184
|
+
description: "Dexto authentication status and management"
|
|
180
185
|
}
|
|
181
186
|
]
|
|
182
187
|
});
|
|
@@ -30,12 +30,16 @@ const mapErrorTypeToStatus = (type) => {
|
|
|
30
30
|
switch (type) {
|
|
31
31
|
case import_core.ErrorType.USER:
|
|
32
32
|
return 400;
|
|
33
|
-
case import_core.ErrorType.
|
|
34
|
-
return
|
|
33
|
+
case import_core.ErrorType.PAYMENT_REQUIRED:
|
|
34
|
+
return 402;
|
|
35
35
|
case import_core.ErrorType.FORBIDDEN:
|
|
36
36
|
return 403;
|
|
37
|
+
case import_core.ErrorType.NOT_FOUND:
|
|
38
|
+
return 404;
|
|
37
39
|
case import_core.ErrorType.TIMEOUT:
|
|
38
40
|
return 408;
|
|
41
|
+
case import_core.ErrorType.CONFLICT:
|
|
42
|
+
return 409;
|
|
39
43
|
case import_core.ErrorType.RATE_LIMIT:
|
|
40
44
|
return 429;
|
|
41
45
|
case import_core.ErrorType.SYSTEM:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../src/hono/middleware/error.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2C,SAAS,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAc9F,eAAO,MAAM,oBAAoB,GAAI,MAAM,SAAS,KAAG,
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../src/hono/middleware/error.ts"],"names":[],"mappings":"AAAA,OAAO,EAA2C,SAAS,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAc9F,eAAO,MAAM,oBAAoB,GAAI,MAAM,SAAS,KAAG,MAwBtD,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,QAAQ,UAAU,CAAC,OAAO,WAAW,CAAC,KAAG,MAI5E,CAAC;AAEF,wBAAgB,eAAe,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,OAkFrD"}
|
|
@@ -5,12 +5,16 @@ const mapErrorTypeToStatus = (type) => {
|
|
|
5
5
|
switch (type) {
|
|
6
6
|
case ErrorType.USER:
|
|
7
7
|
return 400;
|
|
8
|
-
case ErrorType.
|
|
9
|
-
return
|
|
8
|
+
case ErrorType.PAYMENT_REQUIRED:
|
|
9
|
+
return 402;
|
|
10
10
|
case ErrorType.FORBIDDEN:
|
|
11
11
|
return 403;
|
|
12
|
+
case ErrorType.NOT_FOUND:
|
|
13
|
+
return 404;
|
|
12
14
|
case ErrorType.TIMEOUT:
|
|
13
15
|
return 408;
|
|
16
|
+
case ErrorType.CONFLICT:
|
|
17
|
+
return 409;
|
|
14
18
|
case ErrorType.RATE_LIMIT:
|
|
15
19
|
return 429;
|
|
16
20
|
case ErrorType.SYSTEM:
|
|
@@ -81,7 +81,7 @@ export declare function createA2ATasksRouter(getAgent: GetAgentFn, sseSubscriber
|
|
|
81
81
|
};
|
|
82
82
|
output: {
|
|
83
83
|
status: {
|
|
84
|
-
state: "unknown" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "failed" | "rejected"
|
|
84
|
+
state: "unknown" | "auth-required" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "failed" | "rejected";
|
|
85
85
|
message?: {
|
|
86
86
|
role: "user" | "agent";
|
|
87
87
|
kind: "message";
|
|
@@ -183,7 +183,7 @@ export declare function createA2ATasksRouter(getAgent: GetAgentFn, sseSubscriber
|
|
|
183
183
|
$get: {
|
|
184
184
|
input: {
|
|
185
185
|
query: {
|
|
186
|
-
status?: "unknown" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "failed" | "rejected" |
|
|
186
|
+
status?: "unknown" | "auth-required" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "failed" | "rejected" | undefined;
|
|
187
187
|
contextId?: string | undefined;
|
|
188
188
|
pageSize?: string | undefined;
|
|
189
189
|
historyLength?: string | undefined;
|
|
@@ -195,7 +195,7 @@ export declare function createA2ATasksRouter(getAgent: GetAgentFn, sseSubscriber
|
|
|
195
195
|
output: {
|
|
196
196
|
tasks: {
|
|
197
197
|
status: {
|
|
198
|
-
state: "unknown" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "failed" | "rejected"
|
|
198
|
+
state: "unknown" | "auth-required" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "failed" | "rejected";
|
|
199
199
|
message?: {
|
|
200
200
|
role: "user" | "agent";
|
|
201
201
|
kind: "message";
|
|
@@ -315,7 +315,7 @@ export declare function createA2ATasksRouter(getAgent: GetAgentFn, sseSubscriber
|
|
|
315
315
|
};
|
|
316
316
|
output: {
|
|
317
317
|
status: {
|
|
318
|
-
state: "unknown" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "failed" | "rejected"
|
|
318
|
+
state: "unknown" | "auth-required" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "failed" | "rejected";
|
|
319
319
|
message?: {
|
|
320
320
|
role: "user" | "agent";
|
|
321
321
|
kind: "message";
|
|
@@ -431,7 +431,7 @@ export declare function createA2ATasksRouter(getAgent: GetAgentFn, sseSubscriber
|
|
|
431
431
|
};
|
|
432
432
|
output: {
|
|
433
433
|
status: {
|
|
434
|
-
state: "unknown" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "failed" | "rejected"
|
|
434
|
+
state: "unknown" | "auth-required" | "submitted" | "working" | "input-required" | "completed" | "canceled" | "failed" | "rejected";
|
|
435
435
|
message?: {
|
|
436
436
|
role: "user" | "agent";
|
|
437
437
|
kind: "message";
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var dexto_auth_exports = {};
|
|
20
|
+
__export(dexto_auth_exports, {
|
|
21
|
+
createDextoAuthRouter: () => createDextoAuthRouter
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(dexto_auth_exports);
|
|
24
|
+
var import_zod_openapi = require("@hono/zod-openapi");
|
|
25
|
+
var import_agent_management = require("@dexto/agent-management");
|
|
26
|
+
function createDextoAuthRouter(_getAgent) {
|
|
27
|
+
const app = new import_zod_openapi.OpenAPIHono();
|
|
28
|
+
const statusRoute = (0, import_zod_openapi.createRoute)({
|
|
29
|
+
method: "get",
|
|
30
|
+
path: "/dexto-auth/status",
|
|
31
|
+
summary: "Dexto Auth Status",
|
|
32
|
+
description: "Returns dexto authentication status. Used by Web UI to check if user can use dexto features.",
|
|
33
|
+
tags: ["auth"],
|
|
34
|
+
responses: {
|
|
35
|
+
200: {
|
|
36
|
+
description: "Dexto auth status",
|
|
37
|
+
content: {
|
|
38
|
+
"application/json": {
|
|
39
|
+
schema: import_zod_openapi.z.object({
|
|
40
|
+
enabled: import_zod_openapi.z.boolean().describe("Whether dexto auth feature is enabled"),
|
|
41
|
+
authenticated: import_zod_openapi.z.boolean().describe("Whether user is authenticated with dexto"),
|
|
42
|
+
canUse: import_zod_openapi.z.boolean().describe(
|
|
43
|
+
"Whether user can use dexto (authenticated AND has API key)"
|
|
44
|
+
)
|
|
45
|
+
})
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
return app.openapi(statusRoute, async (c) => {
|
|
52
|
+
const enabled = (0, import_agent_management.isDextoAuthEnabled)();
|
|
53
|
+
if (!enabled) {
|
|
54
|
+
return c.json({
|
|
55
|
+
enabled: false,
|
|
56
|
+
authenticated: false,
|
|
57
|
+
canUse: false
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
const authenticated = await (0, import_agent_management.isDextoAuthenticated)();
|
|
61
|
+
const canUse = await (0, import_agent_management.canUseDextoProvider)();
|
|
62
|
+
return c.json({
|
|
63
|
+
enabled,
|
|
64
|
+
authenticated,
|
|
65
|
+
canUse
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
70
|
+
0 && (module.exports = {
|
|
71
|
+
createDextoAuthRouter
|
|
72
|
+
});
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { OpenAPIHono } from '@hono/zod-openapi';
|
|
2
|
+
import type { GetAgentFn } from '../index.js';
|
|
3
|
+
/**
|
|
4
|
+
* Dexto authentication status routes.
|
|
5
|
+
* Provides endpoints to check dexto auth status for Web UI.
|
|
6
|
+
*/
|
|
7
|
+
export declare function createDextoAuthRouter(_getAgent: GetAgentFn): OpenAPIHono<import("hono").Env, {
|
|
8
|
+
"/dexto-auth/status": {
|
|
9
|
+
$get: {
|
|
10
|
+
input: {};
|
|
11
|
+
output: {
|
|
12
|
+
enabled: boolean;
|
|
13
|
+
authenticated: boolean;
|
|
14
|
+
canUse: boolean;
|
|
15
|
+
};
|
|
16
|
+
outputFormat: "json";
|
|
17
|
+
status: 200;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
}, "/">;
|
|
21
|
+
//# sourceMappingURL=dexto-auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dexto-auth.d.ts","sourceRoot":"","sources":["../../../src/hono/routes/dexto-auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAkB,MAAM,mBAAmB,CAAC;AAChE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAO9C;;;GAGG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,UAAU;;;;;;;;;;;;;QAoD1D"}
|