@dexto/server 1.2.6 → 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/dist/approval/manual-approval-handler.cjs +23 -15
- package/dist/approval/manual-approval-handler.d.ts.map +1 -1
- package/dist/approval/manual-approval-handler.js +23 -15
- package/dist/events/webhook-subscriber.cjs +1 -1
- package/dist/events/webhook-subscriber.d.ts.map +1 -1
- package/dist/events/webhook-subscriber.js +1 -1
- package/dist/hono/__tests__/test-fixtures.cjs +2 -2
- package/dist/hono/__tests__/test-fixtures.d.ts.map +1 -1
- package/dist/hono/__tests__/test-fixtures.js +2 -2
- package/dist/hono/index.cjs +14 -2
- package/dist/hono/index.d.ts +486 -132
- package/dist/hono/index.d.ts.map +1 -1
- package/dist/hono/index.js +17 -2
- package/dist/hono/middleware/error.d.ts.map +1 -1
- package/dist/hono/routes/agents.cjs +8 -10
- package/dist/hono/routes/agents.d.ts +15 -8
- package/dist/hono/routes/agents.d.ts.map +1 -1
- package/dist/hono/routes/agents.js +10 -10
- package/dist/hono/routes/approvals.cjs +52 -1
- package/dist/hono/routes/approvals.d.ts +25 -0
- package/dist/hono/routes/approvals.d.ts.map +1 -1
- package/dist/hono/routes/approvals.js +52 -1
- package/dist/hono/routes/llm.cjs +110 -31
- package/dist/hono/routes/llm.d.ts +89 -37
- package/dist/hono/routes/llm.d.ts.map +1 -1
- package/dist/hono/routes/llm.js +108 -25
- package/dist/hono/routes/mcp.cjs +8 -4
- package/dist/hono/routes/mcp.d.ts +4 -1
- package/dist/hono/routes/mcp.d.ts.map +1 -1
- package/dist/hono/routes/mcp.js +9 -5
- package/dist/hono/routes/memory.d.ts +1 -1
- package/dist/hono/routes/messages.cjs +56 -64
- package/dist/hono/routes/messages.d.ts +101 -57
- package/dist/hono/routes/messages.d.ts.map +1 -1
- package/dist/hono/routes/messages.js +57 -65
- package/dist/hono/routes/prompts.cjs +2 -2
- package/dist/hono/routes/prompts.d.ts +7 -7
- package/dist/hono/routes/prompts.js +2 -2
- package/dist/hono/routes/queue.cjs +202 -0
- package/dist/hono/routes/queue.d.ts +171 -0
- package/dist/hono/routes/queue.d.ts.map +1 -0
- package/dist/hono/routes/queue.js +178 -0
- package/dist/hono/routes/resources.d.ts +1 -1
- package/dist/hono/routes/search.cjs +2 -24
- package/dist/hono/routes/search.d.ts +43 -15
- package/dist/hono/routes/search.d.ts.map +1 -1
- package/dist/hono/routes/search.js +3 -25
- package/dist/hono/routes/sessions.cjs +65 -11
- package/dist/hono/routes/sessions.d.ts +27 -5
- package/dist/hono/routes/sessions.d.ts.map +1 -1
- package/dist/hono/routes/sessions.js +65 -11
- package/dist/hono/routes/static.cjs +77 -0
- package/dist/hono/routes/static.d.ts +41 -0
- package/dist/hono/routes/static.d.ts.map +1 -0
- package/dist/hono/routes/static.js +52 -0
- package/dist/hono/schemas/responses.cjs +67 -25
- package/dist/hono/schemas/responses.d.ts +2076 -354
- package/dist/hono/schemas/responses.d.ts.map +1 -1
- package/dist/hono/schemas/responses.js +69 -35
- package/package.json +3 -3
|
@@ -27,23 +27,28 @@ function createManualApprovalHandler(coordinator) {
|
|
|
27
27
|
const handleApproval = (request) => {
|
|
28
28
|
return new Promise((resolve) => {
|
|
29
29
|
const effectiveTimeout = request.timeout;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
30
|
+
let timer;
|
|
31
|
+
if (effectiveTimeout !== void 0) {
|
|
32
|
+
timer = setTimeout(() => {
|
|
33
|
+
cleanup();
|
|
34
|
+
pendingApprovals.delete(request.approvalId);
|
|
35
|
+
const timeoutResponse = {
|
|
36
|
+
approvalId: request.approvalId,
|
|
37
|
+
status: import_core.ApprovalStatus.CANCELLED,
|
|
38
|
+
sessionId: request.sessionId,
|
|
39
|
+
reason: import_core.DenialReason.TIMEOUT,
|
|
40
|
+
message: `Approval request timed out after ${effectiveTimeout}ms`,
|
|
41
|
+
timeoutMs: effectiveTimeout
|
|
42
|
+
};
|
|
43
|
+
coordinator.emitResponse(timeoutResponse);
|
|
44
|
+
resolve(timeoutResponse);
|
|
45
|
+
}, effectiveTimeout);
|
|
46
|
+
}
|
|
44
47
|
let cleanupListener = null;
|
|
45
48
|
const cleanup = () => {
|
|
46
|
-
|
|
49
|
+
if (timer !== void 0) {
|
|
50
|
+
clearTimeout(timer);
|
|
51
|
+
}
|
|
47
52
|
if (cleanupListener) {
|
|
48
53
|
cleanupListener();
|
|
49
54
|
cleanupListener = null;
|
|
@@ -90,6 +95,9 @@ function createManualApprovalHandler(coordinator) {
|
|
|
90
95
|
},
|
|
91
96
|
getPending: () => {
|
|
92
97
|
return Array.from(pendingApprovals.keys());
|
|
98
|
+
},
|
|
99
|
+
getPendingRequests: () => {
|
|
100
|
+
return Array.from(pendingApprovals.values()).map((p) => p.request);
|
|
93
101
|
}
|
|
94
102
|
});
|
|
95
103
|
return handler;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manual-approval-handler.d.ts","sourceRoot":"","sources":["../../src/approval/manual-approval-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAqC,MAAM,aAAa,CAAC;AAEtF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAErE;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,2BAA2B,CAAC,WAAW,EAAE,mBAAmB,GAAG,eAAe,
|
|
1
|
+
{"version":3,"file":"manual-approval-handler.d.ts","sourceRoot":"","sources":["../../src/approval/manual-approval-handler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAqC,MAAM,aAAa,CAAC;AAEtF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAErE;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,2BAA2B,CAAC,WAAW,EAAE,mBAAmB,GAAG,eAAe,CA2H7F"}
|
|
@@ -4,23 +4,28 @@ function createManualApprovalHandler(coordinator) {
|
|
|
4
4
|
const handleApproval = (request) => {
|
|
5
5
|
return new Promise((resolve) => {
|
|
6
6
|
const effectiveTimeout = request.timeout;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
7
|
+
let timer;
|
|
8
|
+
if (effectiveTimeout !== void 0) {
|
|
9
|
+
timer = setTimeout(() => {
|
|
10
|
+
cleanup();
|
|
11
|
+
pendingApprovals.delete(request.approvalId);
|
|
12
|
+
const timeoutResponse = {
|
|
13
|
+
approvalId: request.approvalId,
|
|
14
|
+
status: ApprovalStatus.CANCELLED,
|
|
15
|
+
sessionId: request.sessionId,
|
|
16
|
+
reason: DenialReason.TIMEOUT,
|
|
17
|
+
message: `Approval request timed out after ${effectiveTimeout}ms`,
|
|
18
|
+
timeoutMs: effectiveTimeout
|
|
19
|
+
};
|
|
20
|
+
coordinator.emitResponse(timeoutResponse);
|
|
21
|
+
resolve(timeoutResponse);
|
|
22
|
+
}, effectiveTimeout);
|
|
23
|
+
}
|
|
21
24
|
let cleanupListener = null;
|
|
22
25
|
const cleanup = () => {
|
|
23
|
-
|
|
26
|
+
if (timer !== void 0) {
|
|
27
|
+
clearTimeout(timer);
|
|
28
|
+
}
|
|
24
29
|
if (cleanupListener) {
|
|
25
30
|
cleanupListener();
|
|
26
31
|
cleanupListener = null;
|
|
@@ -67,6 +72,9 @@ function createManualApprovalHandler(coordinator) {
|
|
|
67
72
|
},
|
|
68
73
|
getPending: () => {
|
|
69
74
|
return Array.from(pendingApprovals.keys());
|
|
75
|
+
},
|
|
76
|
+
getPendingRequests: () => {
|
|
77
|
+
return Array.from(pendingApprovals.values()).map((p) => p.request);
|
|
70
78
|
}
|
|
71
79
|
});
|
|
72
80
|
return handler;
|
|
@@ -61,7 +61,7 @@ class WebhookEventSubscriber {
|
|
|
61
61
|
this.abortController?.abort();
|
|
62
62
|
this.abortController = new AbortController();
|
|
63
63
|
const { signal } = this.abortController;
|
|
64
|
-
const MAX_SHARED_SIGNAL_LISTENERS =
|
|
64
|
+
const MAX_SHARED_SIGNAL_LISTENERS = 50;
|
|
65
65
|
(0, import_events.setMaxListeners)(MAX_SHARED_SIGNAL_LISTENERS, signal);
|
|
66
66
|
import_core.INTEGRATION_EVENTS.forEach((eventName) => {
|
|
67
67
|
eventBus.on(
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook-subscriber.d.ts","sourceRoot":"","sources":["../../src/events/webhook-subscriber.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,aAAa,EAIhB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EACH,KAAK,aAAa,EAElB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC9B,MAAM,oBAAoB,CAAC;AAW5B;;GAEG;AACH,qBAAa,sBAAuB,YAAW,eAAe;IAC1D,OAAO,CAAC,QAAQ,CAAyC;IACzD,OAAO,CAAC,eAAe,CAAC,CAAkB;IAC1C,OAAO,CAAC,eAAe,CAAmC;IAC1D,OAAO,CAAC,OAAO,CAA0B;gBAE7B,EACR,OAAO,EACP,GAAG,eAAe,EACrB,GAAE,sBAAsB,GAAG;QAAE,OAAO,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAA;KAAO;IAOtE;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI;
|
|
1
|
+
{"version":3,"file":"webhook-subscriber.d.ts","sourceRoot":"","sources":["../../src/events/webhook-subscriber.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,aAAa,EAIhB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAC7C,OAAO,EACH,KAAK,aAAa,EAElB,KAAK,qBAAqB,EAC1B,KAAK,sBAAsB,EAC9B,MAAM,oBAAoB,CAAC;AAW5B;;GAEG;AACH,qBAAa,sBAAuB,YAAW,eAAe;IAC1D,OAAO,CAAC,QAAQ,CAAyC;IACzD,OAAO,CAAC,eAAe,CAAC,CAAkB;IAC1C,OAAO,CAAC,eAAe,CAAmC;IAC1D,OAAO,CAAC,OAAO,CAA0B;gBAE7B,EACR,OAAO,EACP,GAAG,eAAe,EACrB,GAAE,sBAAsB,GAAG;QAAE,OAAO,CAAC,EAAE,OAAO,UAAU,CAAC,KAAK,CAAA;KAAO;IAOtE;;OAEG;IACH,SAAS,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI;IA6BxC;;OAEG;IACH,UAAU,CAAC,OAAO,EAAE,aAAa,GAAG,IAAI;IAKxC;;OAEG;IACH,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO;IAUzC;;OAEG;IACH,WAAW,IAAI,aAAa,EAAE;IAI9B;;OAEG;IACH,UAAU,CAAC,SAAS,EAAE,MAAM,GAAG,aAAa,GAAG,SAAS;IAIxD;;OAEG;IACG,WAAW,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAoBpE;;OAEG;IACH,OAAO,IAAI,IAAI;IAUf;;OAEG;IACH,WAAW,IAAI,IAAI;IAsBnB;;OAEG;YACW,YAAY;IA+C1B;;OAEG;YACW,gBAAgB;IAoD9B;;OAEG;YACW,kBAAkB;IA+DhC;;OAEG;IACH,OAAO,CAAC,iBAAiB;CAK5B"}
|
|
@@ -30,7 +30,7 @@ class WebhookEventSubscriber {
|
|
|
30
30
|
this.abortController?.abort();
|
|
31
31
|
this.abortController = new AbortController();
|
|
32
32
|
const { signal } = this.abortController;
|
|
33
|
-
const MAX_SHARED_SIGNAL_LISTENERS =
|
|
33
|
+
const MAX_SHARED_SIGNAL_LISTENERS = 50;
|
|
34
34
|
setMaxListeners(MAX_SHARED_SIGNAL_LISTENERS, signal);
|
|
35
35
|
INTEGRATION_EVENTS.forEach((eventName) => {
|
|
36
36
|
eventBus.on(
|
|
@@ -47,7 +47,6 @@ function createTestAgentConfig() {
|
|
|
47
47
|
model: "gpt-5-nano",
|
|
48
48
|
apiKey: "test-key-123",
|
|
49
49
|
// Mock key for testing
|
|
50
|
-
router: "vercel",
|
|
51
50
|
maxIterations: 10
|
|
52
51
|
},
|
|
53
52
|
mcpServers: {},
|
|
@@ -57,7 +56,8 @@ function createTestAgentConfig() {
|
|
|
57
56
|
blob: { type: "local", storePath: "/tmp/test-blobs" }
|
|
58
57
|
},
|
|
59
58
|
sessions: {
|
|
60
|
-
maxSessions:
|
|
59
|
+
maxSessions: 50,
|
|
60
|
+
// Increased to accommodate all integration tests
|
|
61
61
|
sessionTTL: 3600
|
|
62
62
|
},
|
|
63
63
|
toolConfirmation: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-fixtures.d.ts","sourceRoot":"","sources":["../../../src/hono/__tests__/test-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,aAAa,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,WAAW,CAAC;AAEtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAoB,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEzD;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,WAAW,
|
|
1
|
+
{"version":3,"file":"test-fixtures.d.ts","sourceRoot":"","sources":["../../../src/hono/__tests__/test-fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAmB,MAAM,aAAa,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC1D,OAAO,KAAK,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,WAAW,CAAC;AAEtD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAoB,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEzD;;;GAGG;AACH,wBAAgB,qBAAqB,IAAI,WAAW,CA4BnD;AAED;;;GAGG;AACH,wBAAsB,eAAe,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CAK/E;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACvB,MAAM,EAAE,UAAU,CAAC;IACnB,GAAG,EAAE,QAAQ,CAAC;IACd,MAAM,EAAE,gBAAgB,CAAC;IACzB,KAAK,EAAE,UAAU,CAAC;IAClB,SAAS,EAAE,SAAS,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAChC;AAED;;;;;;GAMG;AACH,wBAAsB,eAAe,CACjC,KAAK,EAAE,UAAU,EACjB,IAAI,CAAC,EAAE,MAAM,EACb,aAAa,CAAC,EAAE,qBAAqB,CAAC,eAAe,CAAC,GACvD,OAAO,CAAC,UAAU,CAAC,CAwFrB;AAmCD;;GAEG;AACH,wBAAsB,WAAW,CAC7B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,IAAI,CAAC,EAAE,OAAO,EACd,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GACjC,OAAO,CAAC;IACP,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CAChB,CAAC,CAmCD;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACnC,IAAI,EAAE,OAAO,EACb,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAC,GACpD,IAAI,CAgBN;AAED;;GAEG;AACH,eAAO,MAAM,UAAU;oBACH,OAAO,KAAG,OAAO;oBACjB,OAAO,KAAG,OAAO;qBAChB,OAAO,KAAG,OAAO;mBACnB,OAAO,KAAG,OAAO;oBAChB,OAAO,KAAG,OAAO;4BAET,OAAO,KAAG,OAAO;4BACjB,OAAO,KAAG,OAAO;2BAClB,OAAO,KAAG,OAAO;4BAChB,OAAO,KAAG,OAAO;CAG5C,CAAC"}
|
|
@@ -9,7 +9,6 @@ function createTestAgentConfig() {
|
|
|
9
9
|
model: "gpt-5-nano",
|
|
10
10
|
apiKey: "test-key-123",
|
|
11
11
|
// Mock key for testing
|
|
12
|
-
router: "vercel",
|
|
13
12
|
maxIterations: 10
|
|
14
13
|
},
|
|
15
14
|
mcpServers: {},
|
|
@@ -19,7 +18,8 @@ function createTestAgentConfig() {
|
|
|
19
18
|
blob: { type: "local", storePath: "/tmp/test-blobs" }
|
|
20
19
|
},
|
|
21
20
|
sessions: {
|
|
22
|
-
maxSessions:
|
|
21
|
+
maxSessions: 50,
|
|
22
|
+
// Increased to accommodate all integration tests
|
|
23
23
|
sessionTTL: 3600
|
|
24
24
|
},
|
|
25
25
|
toolConfirmation: {
|
package/dist/hono/index.cjs
CHANGED
|
@@ -38,6 +38,8 @@ var import_resources = require("./routes/resources.js");
|
|
|
38
38
|
var import_memory = require("./routes/memory.js");
|
|
39
39
|
var import_agents = require("./routes/agents.js");
|
|
40
40
|
var import_approvals = require("./routes/approvals.js");
|
|
41
|
+
var import_queue = require("./routes/queue.js");
|
|
42
|
+
var import_static = require("./routes/static.js");
|
|
41
43
|
var import_error = require("./middleware/error.js");
|
|
42
44
|
var import_redaction = require("./middleware/redaction.js");
|
|
43
45
|
var import_cors = require("./middleware/cors.js");
|
|
@@ -70,7 +72,9 @@ function createDextoApp(options) {
|
|
|
70
72
|
approvalCoordinator,
|
|
71
73
|
webhookSubscriber,
|
|
72
74
|
sseSubscriber,
|
|
73
|
-
agentsContext
|
|
75
|
+
agentsContext,
|
|
76
|
+
webRoot,
|
|
77
|
+
webUIConfig
|
|
74
78
|
} = options;
|
|
75
79
|
const app = new import_zod_openapi.OpenAPIHono({ strict: false });
|
|
76
80
|
app.use("*", (0, import_cors.createCorsMiddleware)());
|
|
@@ -78,7 +82,7 @@ function createDextoApp(options) {
|
|
|
78
82
|
app.onError((err, ctx) => (0, import_error.handleHonoError)(ctx, err));
|
|
79
83
|
app.use("/api/*", import_redaction.prettyJsonMiddleware);
|
|
80
84
|
app.use("/api/*", import_redaction.redactionMiddleware);
|
|
81
|
-
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("/api", (0, import_greeting.createGreetingRouter)(getAgent)).route("/api", (0, import_messages.createMessagesRouter)(getAgent, approvalCoordinator)).route("/api", (0, import_llm.createLlmRouter)(getAgent)).route("/api", (0, import_sessions.createSessionsRouter)(getAgent)).route("/api", (0, import_search.createSearchRouter)(getAgent)).route("/api", (0, import_mcp.createMcpRouter)(getAgent)).route("/api", (0, import_webhooks.createWebhooksRouter)(getAgent, webhookSubscriber)).route("/api", (0, import_prompts.createPromptsRouter)(getAgent)).route("/api", (0, import_resources.createResourcesRouter)(getAgent)).route("/api", (0, import_memory.createMemoryRouter)(getAgent)).route("/api", (0, import_approvals.createApprovalsRouter)(getAgent, approvalCoordinator)).route("/api", (0, import_agents.createAgentsRouter)(getAgent, agentsContext || dummyAgentsContext));
|
|
85
|
+
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("/api", (0, import_greeting.createGreetingRouter)(getAgent)).route("/api", (0, import_messages.createMessagesRouter)(getAgent, approvalCoordinator)).route("/api", (0, import_llm.createLlmRouter)(getAgent)).route("/api", (0, import_sessions.createSessionsRouter)(getAgent)).route("/api", (0, import_search.createSearchRouter)(getAgent)).route("/api", (0, import_mcp.createMcpRouter)(getAgent)).route("/api", (0, import_webhooks.createWebhooksRouter)(getAgent, webhookSubscriber)).route("/api", (0, import_prompts.createPromptsRouter)(getAgent)).route("/api", (0, import_resources.createResourcesRouter)(getAgent)).route("/api", (0, import_memory.createMemoryRouter)(getAgent)).route("/api", (0, import_approvals.createApprovalsRouter)(getAgent, approvalCoordinator)).route("/api", (0, import_agents.createAgentsRouter)(getAgent, agentsContext || dummyAgentsContext)).route("/api", (0, import_queue.createQueueRouter)(getAgent));
|
|
82
86
|
fullApp.doc("/openapi.json", {
|
|
83
87
|
openapi: "3.0.0",
|
|
84
88
|
info: {
|
|
@@ -154,9 +158,17 @@ function createDextoApp(options) {
|
|
|
154
158
|
{
|
|
155
159
|
name: "agents",
|
|
156
160
|
description: "Install, switch, and manage agent configurations"
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
name: "queue",
|
|
164
|
+
description: "Manage message queue for busy sessions"
|
|
157
165
|
}
|
|
158
166
|
]
|
|
159
167
|
});
|
|
168
|
+
if (webRoot) {
|
|
169
|
+
fullApp.route("/", (0, import_static.createStaticRouter)(webRoot));
|
|
170
|
+
fullApp.notFound((0, import_static.createSpaFallbackHandler)(webRoot, webUIConfig));
|
|
171
|
+
}
|
|
160
172
|
Object.assign(fullApp, { webhookSubscriber });
|
|
161
173
|
return fullApp;
|
|
162
174
|
}
|