@dexto/server 1.3.0 → 1.5.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.
Files changed (109) hide show
  1. package/dist/approval/manual-approval-handler.cjs +23 -15
  2. package/dist/approval/manual-approval-handler.d.ts.map +1 -1
  3. package/dist/approval/manual-approval-handler.js +23 -15
  4. package/dist/events/webhook-subscriber.cjs +1 -1
  5. package/dist/events/webhook-subscriber.d.ts.map +1 -1
  6. package/dist/events/webhook-subscriber.js +1 -1
  7. package/dist/hono/__tests__/test-fixtures.cjs +3 -3
  8. package/dist/hono/__tests__/test-fixtures.d.ts.map +1 -1
  9. package/dist/hono/__tests__/test-fixtures.js +3 -3
  10. package/dist/hono/index.cjs +46 -5
  11. package/dist/hono/index.d.ts +928 -584
  12. package/dist/hono/index.d.ts.map +1 -1
  13. package/dist/hono/index.js +46 -5
  14. package/dist/hono/middleware/error.d.ts.map +1 -1
  15. package/dist/hono/routes/a2a-jsonrpc.cjs +3 -3
  16. package/dist/hono/routes/a2a-jsonrpc.d.ts +4 -1
  17. package/dist/hono/routes/a2a-jsonrpc.d.ts.map +1 -1
  18. package/dist/hono/routes/a2a-jsonrpc.js +3 -3
  19. package/dist/hono/routes/a2a-tasks.cjs +5 -5
  20. package/dist/hono/routes/a2a-tasks.d.ts +13 -10
  21. package/dist/hono/routes/a2a-tasks.d.ts.map +1 -1
  22. package/dist/hono/routes/a2a-tasks.js +5 -5
  23. package/dist/hono/routes/agents.cjs +30 -42
  24. package/dist/hono/routes/agents.d.ts +7 -401
  25. package/dist/hono/routes/agents.d.ts.map +1 -1
  26. package/dist/hono/routes/agents.js +32 -42
  27. package/dist/hono/routes/approvals.cjs +53 -2
  28. package/dist/hono/routes/approvals.d.ts +29 -1
  29. package/dist/hono/routes/approvals.d.ts.map +1 -1
  30. package/dist/hono/routes/approvals.js +53 -2
  31. package/dist/hono/routes/discovery.cjs +67 -0
  32. package/dist/hono/routes/discovery.d.ts +44 -0
  33. package/dist/hono/routes/discovery.d.ts.map +1 -0
  34. package/dist/hono/routes/discovery.js +43 -0
  35. package/dist/hono/routes/greeting.cjs +2 -2
  36. package/dist/hono/routes/greeting.d.ts +2 -2
  37. package/dist/hono/routes/greeting.d.ts.map +1 -1
  38. package/dist/hono/routes/greeting.js +2 -2
  39. package/dist/hono/routes/health.d.ts +2 -2
  40. package/dist/hono/routes/health.d.ts.map +1 -1
  41. package/dist/hono/routes/key.cjs +110 -0
  42. package/dist/hono/routes/key.d.ts +48 -0
  43. package/dist/hono/routes/key.d.ts.map +1 -0
  44. package/dist/hono/routes/key.js +90 -0
  45. package/dist/hono/routes/llm.cjs +119 -62
  46. package/dist/hono/routes/llm.d.ts +242 -42
  47. package/dist/hono/routes/llm.d.ts.map +1 -1
  48. package/dist/hono/routes/llm.js +118 -58
  49. package/dist/hono/routes/mcp.cjs +16 -12
  50. package/dist/hono/routes/mcp.d.ts +6 -3
  51. package/dist/hono/routes/mcp.d.ts.map +1 -1
  52. package/dist/hono/routes/mcp.js +17 -13
  53. package/dist/hono/routes/memory.cjs +5 -5
  54. package/dist/hono/routes/memory.d.ts +5 -2
  55. package/dist/hono/routes/memory.d.ts.map +1 -1
  56. package/dist/hono/routes/memory.js +5 -5
  57. package/dist/hono/routes/messages.cjs +58 -66
  58. package/dist/hono/routes/messages.d.ts +99 -55
  59. package/dist/hono/routes/messages.d.ts.map +1 -1
  60. package/dist/hono/routes/messages.js +59 -67
  61. package/dist/hono/routes/models.cjs +319 -0
  62. package/dist/hono/routes/models.d.ts +107 -0
  63. package/dist/hono/routes/models.d.ts.map +1 -0
  64. package/dist/hono/routes/models.js +305 -0
  65. package/dist/hono/routes/openrouter.cjs +153 -0
  66. package/dist/hono/routes/openrouter.d.ts +54 -0
  67. package/dist/hono/routes/openrouter.d.ts.map +1 -0
  68. package/dist/hono/routes/openrouter.js +134 -0
  69. package/dist/hono/routes/prompts.cjs +5 -5
  70. package/dist/hono/routes/prompts.d.ts +10 -7
  71. package/dist/hono/routes/prompts.d.ts.map +1 -1
  72. package/dist/hono/routes/prompts.js +5 -5
  73. package/dist/hono/routes/queue.cjs +202 -0
  74. package/dist/hono/routes/queue.d.ts +174 -0
  75. package/dist/hono/routes/queue.d.ts.map +1 -0
  76. package/dist/hono/routes/queue.js +178 -0
  77. package/dist/hono/routes/resources.cjs +3 -3
  78. package/dist/hono/routes/resources.d.ts +3 -3
  79. package/dist/hono/routes/resources.d.ts.map +1 -1
  80. package/dist/hono/routes/resources.js +3 -3
  81. package/dist/hono/routes/search.cjs +2 -2
  82. package/dist/hono/routes/search.d.ts +39 -10
  83. package/dist/hono/routes/search.d.ts.map +1 -1
  84. package/dist/hono/routes/search.js +2 -2
  85. package/dist/hono/routes/sessions.cjs +74 -20
  86. package/dist/hono/routes/sessions.d.ts +25 -4
  87. package/dist/hono/routes/sessions.d.ts.map +1 -1
  88. package/dist/hono/routes/sessions.js +74 -20
  89. package/dist/hono/routes/tools.cjs +126 -0
  90. package/dist/hono/routes/tools.d.ts +42 -0
  91. package/dist/hono/routes/tools.d.ts.map +1 -0
  92. package/dist/hono/routes/tools.js +102 -0
  93. package/dist/hono/routes/webhooks.cjs +4 -4
  94. package/dist/hono/routes/webhooks.d.ts +4 -1
  95. package/dist/hono/routes/webhooks.d.ts.map +1 -1
  96. package/dist/hono/routes/webhooks.js +4 -4
  97. package/dist/hono/schemas/responses.cjs +24 -5
  98. package/dist/hono/schemas/responses.d.ts +838 -120
  99. package/dist/hono/schemas/responses.d.ts.map +1 -1
  100. package/dist/hono/schemas/responses.js +24 -10
  101. package/dist/hono/start-server.cjs +102 -0
  102. package/dist/hono/start-server.d.ts +61 -0
  103. package/dist/hono/start-server.d.ts.map +1 -0
  104. package/dist/hono/start-server.js +78 -0
  105. package/dist/index.cjs +2 -0
  106. package/dist/index.d.ts +1 -0
  107. package/dist/index.d.ts.map +1 -1
  108. package/dist/index.js +1 -0
  109. package/package.json +5 -4
@@ -1 +1 @@
1
- {"version":3,"file":"responses.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C,OAAO,sBAAsB,CAAC,CAAC;AAEvE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAae,CAAC;AAE7C,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE3D,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;EAYO,CAAC;AAEjC,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,YAAY,CAAC,CAAC;AAOnD,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAS,CAAC,CAAC,UAAU,EAAE,YAAY,CAAC;;;;;;;;;iEAO1B,CAAC;AAG7C,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAaG,CAAC;AAEpC,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAGjE,eAAO,MAAM,oBAAoB;;;;;;;;;EAMD,CAAC;AAEjC,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAGnE,eAAO,MAAM,oBAAoB;;;;;;;;;EAMS,CAAC;AAE3C,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC"}
@@ -1,9 +1,5 @@
1
1
  import { z } from "zod";
2
- import {
3
- LLMConfigBaseSchema as CoreLLMConfigBaseSchema,
4
- LLM_PROVIDERS,
5
- LLM_ROUTERS
6
- } from "@dexto/core";
2
+ import { LLMConfigBaseSchema as CoreLLMConfigBaseSchema, LLM_PROVIDERS } from "@dexto/core";
7
3
  import { MemorySchema } from "@dexto/core";
8
4
  import { LLMConfigBaseSchema } from "@dexto/core";
9
5
  const TextPartSchema = z.object({
@@ -21,7 +17,26 @@ const FilePartSchema = z.object({
21
17
  mimeType: z.string().describe("MIME type of the file"),
22
18
  filename: z.string().optional().describe("Optional filename")
23
19
  }).strict().describe("File content part");
24
- const ContentPartSchema = z.discriminatedUnion("type", [TextPartSchema, ImagePartSchema, FilePartSchema]).describe("Message content part (text, image, or file)");
20
+ const UIResourcePartSchema = z.object({
21
+ type: z.literal("ui-resource").describe("Part type: ui-resource"),
22
+ uri: z.string().describe("URI identifying the UI resource (must start with ui://)"),
23
+ mimeType: z.string().describe("MIME type: text/html, text/uri-list, or application/vnd.mcp-ui.remote-dom"),
24
+ content: z.string().optional().describe("Inline HTML content or URL"),
25
+ blob: z.string().optional().describe("Base64-encoded content (alternative to content)"),
26
+ metadata: z.object({
27
+ title: z.string().optional().describe("Display title for the UI resource"),
28
+ preferredSize: z.object({
29
+ width: z.number().describe("Preferred width in pixels"),
30
+ height: z.number().describe("Preferred height in pixels")
31
+ }).strict().optional().describe("Preferred rendering size")
32
+ }).strict().optional().describe("Optional metadata for the UI resource")
33
+ }).strict().describe("UI Resource content part for MCP-UI interactive components");
34
+ const ContentPartSchema = z.discriminatedUnion("type", [
35
+ TextPartSchema,
36
+ ImagePartSchema,
37
+ FilePartSchema,
38
+ UIResourcePartSchema
39
+ ]).describe("Message content part (text, image, file, or UI resource)");
25
40
  const ToolCallSchema = z.object({
26
41
  id: z.string().describe("Unique identifier for this tool call"),
27
42
  type: z.literal("function").describe("Tool call type (currently only function is supported)"),
@@ -45,10 +60,10 @@ const InternalMessageSchema = z.object({
45
60
  tokenUsage: TokenUsageSchema.optional().describe("Optional token usage accounting"),
46
61
  model: z.string().optional().describe("Model identifier for assistant messages"),
47
62
  provider: z.enum(LLM_PROVIDERS).optional().describe("Provider identifier for assistant messages"),
48
- router: z.enum(LLM_ROUTERS).optional().describe("Router metadata for assistant messages"),
49
63
  toolCalls: z.array(ToolCallSchema).optional().describe("Tool calls made by the assistant"),
50
64
  toolCallId: z.string().optional().describe("ID of the tool call this message responds to"),
51
- name: z.string().optional().describe("Name of the tool that produced this result")
65
+ name: z.string().optional().describe("Name of the tool that produced this result"),
66
+ success: z.boolean().optional().describe("Whether tool execution succeeded (present for role=tool messages)")
52
67
  }).strict().describe("Internal message representation");
53
68
  const LLMConfigResponseSchema = CoreLLMConfigBaseSchema.omit({ apiKey: true }).extend({
54
69
  hasApiKey: z.boolean().optional().describe("Whether an API key is configured")
@@ -112,7 +127,6 @@ const CatalogModelInfoSchema = z.object({
112
127
  maxInputTokens: z.number().int().positive().describe("Maximum input tokens"),
113
128
  default: z.boolean().optional().describe("Whether this is a default model"),
114
129
  supportedFileTypes: z.array(z.enum(["audio", "pdf", "image"])).describe("File types this model supports"),
115
- supportedRouters: z.array(z.enum(["vercel", "in-built"])).optional().describe("Routing strategies this model supports"),
116
130
  displayName: z.string().optional().describe("Human-readable display name"),
117
131
  pricing: z.object({
118
132
  inputPerM: z.number().describe("Input cost per million tokens (USD)"),
@@ -127,7 +141,6 @@ const ProviderCatalogSchema = z.object({
127
141
  name: z.string().describe("Provider display name"),
128
142
  hasApiKey: z.boolean().describe("Whether API key is configured"),
129
143
  primaryEnvVar: z.string().describe("Primary environment variable for API key"),
130
- supportedRouters: z.array(z.enum(["vercel", "in-built"])).describe("Routing strategies supported by this provider"),
131
144
  supportsBaseURL: z.boolean().describe("Whether custom base URLs are supported"),
132
145
  models: z.array(CatalogModelInfoSchema).describe("Models available from this provider"),
133
146
  supportedFileTypes: z.array(z.enum(["audio", "pdf", "image"])).describe("Provider-level file type support")
@@ -243,5 +256,6 @@ export {
243
256
  ToolCallSchema,
244
257
  ToolConfirmationConfigSchema,
245
258
  ToolSchema,
259
+ UIResourcePartSchema,
246
260
  WebhookSchema
247
261
  };
@@ -0,0 +1,102 @@
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 start_server_exports = {};
20
+ __export(start_server_exports, {
21
+ startDextoServer: () => startDextoServer
22
+ });
23
+ module.exports = __toCommonJS(start_server_exports);
24
+ var import_core = require("@dexto/core");
25
+ var import_index = require("./index.js");
26
+ var import_node = require("./node/index.js");
27
+ var import_webhook_subscriber = require("../events/webhook-subscriber.js");
28
+ var import_a2a_sse_subscriber = require("../events/a2a-sse-subscriber.js");
29
+ var import_approval_coordinator = require("../approval/approval-coordinator.js");
30
+ var import_manual_approval_handler = require("../approval/manual-approval-handler.js");
31
+ async function startDextoServer(agent, options = {}) {
32
+ const {
33
+ port: requestedPort,
34
+ hostname = "0.0.0.0",
35
+ agentCard: agentCardOverride = {},
36
+ webRoot,
37
+ webUIConfig,
38
+ baseUrl: baseUrlOverride
39
+ } = options;
40
+ const resolvedPort = requestedPort ?? (process.env.PORT ? Number(process.env.PORT) : 3e3);
41
+ const baseUrl = baseUrlOverride ?? `http://localhost:${resolvedPort}`;
42
+ import_core.logger.info(`Initializing Dexto server on ${hostname}:${resolvedPort}...`);
43
+ const agentCard = (0, import_core.createAgentCard)(
44
+ {
45
+ defaultName: agentCardOverride.name ?? "dexto-agent",
46
+ defaultVersion: agentCardOverride.version ?? "1.0.0",
47
+ defaultBaseUrl: baseUrl
48
+ },
49
+ agentCardOverride
50
+ );
51
+ import_core.logger.debug("Creating event infrastructure...");
52
+ const webhookSubscriber = new import_webhook_subscriber.WebhookEventSubscriber();
53
+ const sseSubscriber = new import_a2a_sse_subscriber.A2ASseEventSubscriber();
54
+ const approvalCoordinator = new import_approval_coordinator.ApprovalCoordinator();
55
+ import_core.logger.debug("Creating Hono application...");
56
+ const app = (0, import_index.createDextoApp)({
57
+ getAgent: (_ctx) => agent,
58
+ getAgentCard: () => agentCard,
59
+ approvalCoordinator,
60
+ webhookSubscriber,
61
+ sseSubscriber,
62
+ ...webRoot ? { webRoot } : {},
63
+ ...webUIConfig ? { webUIConfig } : {}
64
+ });
65
+ import_core.logger.debug("Creating Node.js HTTP server...");
66
+ const { server, webhookSubscriber: bridgeWebhookSubscriber } = (0, import_node.createNodeServer)(app, {
67
+ getAgent: () => agent,
68
+ port: resolvedPort,
69
+ hostname
70
+ });
71
+ if (bridgeWebhookSubscriber) {
72
+ import_core.logger.debug("Registering webhook subscriber with agent...");
73
+ agent.registerSubscriber(bridgeWebhookSubscriber);
74
+ }
75
+ const needsHandler = agent.config.toolConfirmation?.mode === "manual" || agent.config.elicitation.enabled;
76
+ if (needsHandler) {
77
+ import_core.logger.debug("Setting up manual approval handler...");
78
+ const handler = (0, import_manual_approval_handler.createManualApprovalHandler)(approvalCoordinator);
79
+ agent.setApprovalHandler(handler);
80
+ }
81
+ import_core.logger.debug("Wiring event subscribers to agent...");
82
+ webhookSubscriber.subscribe(agent.agentEventBus);
83
+ sseSubscriber.subscribe(agent.agentEventBus);
84
+ import_core.logger.info("Starting agent...");
85
+ await agent.start();
86
+ import_core.logger.info(`Server running at http://${hostname}:${resolvedPort}`, null, "green");
87
+ return {
88
+ server,
89
+ app,
90
+ agentCard,
91
+ stop: async () => {
92
+ import_core.logger.info("Stopping Dexto server...");
93
+ await agent.stop();
94
+ server.close();
95
+ import_core.logger.info("Server stopped", null, "yellow");
96
+ }
97
+ };
98
+ }
99
+ // Annotate the CommonJS export names for ESM import in node:
100
+ 0 && (module.exports = {
101
+ startDextoServer
102
+ });
@@ -0,0 +1,61 @@
1
+ import type { Server } from 'node:http';
2
+ import type { DextoAgent, AgentCard } from '@dexto/core';
3
+ import type { DextoApp } from './types.js';
4
+ import type { WebUIRuntimeConfig } from './routes/static.js';
5
+ export type StartDextoServerOptions = {
6
+ /** Port to listen on. Defaults to 3000 or process.env.PORT */
7
+ port?: number;
8
+ /** Hostname to bind to. Defaults to 0.0.0.0 */
9
+ hostname?: string;
10
+ /** Override agent card metadata (name, version, etc.) */
11
+ agentCard?: Partial<AgentCard>;
12
+ /** Absolute path to WebUI build output. If provided, static files will be served. */
13
+ webRoot?: string;
14
+ /** Runtime configuration to inject into WebUI (analytics, etc.) */
15
+ webUIConfig?: WebUIRuntimeConfig;
16
+ /** Base URL for agent card. Defaults to http://localhost:{port} */
17
+ baseUrl?: string;
18
+ };
19
+ export type StartDextoServerResult = {
20
+ /** HTTP server instance */
21
+ server: Server;
22
+ /** Hono app instance */
23
+ app: DextoApp;
24
+ /** Stop the server and agent gracefully */
25
+ stop: () => Promise<void>;
26
+ /** Agent card with resolved metadata */
27
+ agentCard: AgentCard;
28
+ };
29
+ /**
30
+ * Start a Dexto server with minimal configuration.
31
+ *
32
+ * This is a high-level helper that:
33
+ * 1. Creates event subscribers and approval coordinator
34
+ * 2. Creates and configures the Hono app
35
+ * 3. Wires up all the infrastructure (SSE, webhooks, approvals)
36
+ * 4. Starts the agent
37
+ * 5. Starts the HTTP server
38
+ *
39
+ * @example
40
+ * ```typescript
41
+ * // Register providers (filesystem-tools, process-tools, etc.)
42
+ * import '@dexto/image-local';
43
+ *
44
+ * import { DextoAgent } from '@dexto/core';
45
+ * import { loadAgentConfig } from '@dexto/agent-management';
46
+ * import { startDextoServer } from '@dexto/server';
47
+ *
48
+ * const config = await loadAgentConfig('./agents/default.yml');
49
+ * const agent = new DextoAgent(config, './agents/default.yml');
50
+ *
51
+ * const { server, stop } = await startDextoServer(agent, {
52
+ * port: 3000,
53
+ * agentCard: { name: 'My Agent' }
54
+ * });
55
+ *
56
+ * // Server is now running at http://localhost:3000
57
+ * // To stop: await stop();
58
+ * ```
59
+ */
60
+ export declare function startDextoServer(agent: DextoAgent, options?: StartDextoServerOptions): Promise<StartDextoServerResult>;
61
+ //# sourceMappingURL=start-server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"start-server.d.ts","sourceRoot":"","sources":["../../src/hono/start-server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAExC,OAAO,KAAK,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAIzD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAM7D,MAAM,MAAM,uBAAuB,GAAG;IAClC,8DAA8D;IAC9D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,+CAA+C;IAC/C,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yDAAyD;IACzD,SAAS,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,CAAC;IAC/B,qFAAqF;IACrF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mEAAmE;IACnE,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC,mEAAmE;IACnE,OAAO,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACjC,2BAA2B;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,wBAAwB;IACxB,GAAG,EAAE,QAAQ,CAAC;IACd,2CAA2C;IAC3C,IAAI,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B,wCAAwC;IACxC,SAAS,EAAE,SAAS,CAAC;CACxB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,wBAAsB,gBAAgB,CAClC,KAAK,EAAE,UAAU,EACjB,OAAO,GAAE,uBAA4B,GACtC,OAAO,CAAC,sBAAsB,CAAC,CA2FjC"}
@@ -0,0 +1,78 @@
1
+ import { createAgentCard, logger } from "@dexto/core";
2
+ import { createDextoApp } from "./index.js";
3
+ import { createNodeServer } from "./node/index.js";
4
+ import { WebhookEventSubscriber } from "../events/webhook-subscriber.js";
5
+ import { A2ASseEventSubscriber } from "../events/a2a-sse-subscriber.js";
6
+ import { ApprovalCoordinator } from "../approval/approval-coordinator.js";
7
+ import { createManualApprovalHandler } from "../approval/manual-approval-handler.js";
8
+ async function startDextoServer(agent, options = {}) {
9
+ const {
10
+ port: requestedPort,
11
+ hostname = "0.0.0.0",
12
+ agentCard: agentCardOverride = {},
13
+ webRoot,
14
+ webUIConfig,
15
+ baseUrl: baseUrlOverride
16
+ } = options;
17
+ const resolvedPort = requestedPort ?? (process.env.PORT ? Number(process.env.PORT) : 3e3);
18
+ const baseUrl = baseUrlOverride ?? `http://localhost:${resolvedPort}`;
19
+ logger.info(`Initializing Dexto server on ${hostname}:${resolvedPort}...`);
20
+ const agentCard = createAgentCard(
21
+ {
22
+ defaultName: agentCardOverride.name ?? "dexto-agent",
23
+ defaultVersion: agentCardOverride.version ?? "1.0.0",
24
+ defaultBaseUrl: baseUrl
25
+ },
26
+ agentCardOverride
27
+ );
28
+ logger.debug("Creating event infrastructure...");
29
+ const webhookSubscriber = new WebhookEventSubscriber();
30
+ const sseSubscriber = new A2ASseEventSubscriber();
31
+ const approvalCoordinator = new ApprovalCoordinator();
32
+ logger.debug("Creating Hono application...");
33
+ const app = createDextoApp({
34
+ getAgent: (_ctx) => agent,
35
+ getAgentCard: () => agentCard,
36
+ approvalCoordinator,
37
+ webhookSubscriber,
38
+ sseSubscriber,
39
+ ...webRoot ? { webRoot } : {},
40
+ ...webUIConfig ? { webUIConfig } : {}
41
+ });
42
+ logger.debug("Creating Node.js HTTP server...");
43
+ const { server, webhookSubscriber: bridgeWebhookSubscriber } = createNodeServer(app, {
44
+ getAgent: () => agent,
45
+ port: resolvedPort,
46
+ hostname
47
+ });
48
+ if (bridgeWebhookSubscriber) {
49
+ logger.debug("Registering webhook subscriber with agent...");
50
+ agent.registerSubscriber(bridgeWebhookSubscriber);
51
+ }
52
+ const needsHandler = agent.config.toolConfirmation?.mode === "manual" || agent.config.elicitation.enabled;
53
+ if (needsHandler) {
54
+ logger.debug("Setting up manual approval handler...");
55
+ const handler = createManualApprovalHandler(approvalCoordinator);
56
+ agent.setApprovalHandler(handler);
57
+ }
58
+ logger.debug("Wiring event subscribers to agent...");
59
+ webhookSubscriber.subscribe(agent.agentEventBus);
60
+ sseSubscriber.subscribe(agent.agentEventBus);
61
+ logger.info("Starting agent...");
62
+ await agent.start();
63
+ logger.info(`Server running at http://${hostname}:${resolvedPort}`, null, "green");
64
+ return {
65
+ server,
66
+ app,
67
+ agentCard,
68
+ stop: async () => {
69
+ logger.info("Stopping Dexto server...");
70
+ await agent.stop();
71
+ server.close();
72
+ logger.info("Server stopped", null, "yellow");
73
+ }
74
+ };
75
+ }
76
+ export {
77
+ startDextoServer
78
+ };
package/dist/index.cjs CHANGED
@@ -17,6 +17,7 @@ var index_exports = {};
17
17
  module.exports = __toCommonJS(index_exports);
18
18
  __reExport(index_exports, require("./hono/index.js"), module.exports);
19
19
  __reExport(index_exports, require("./hono/node/index.js"), module.exports);
20
+ __reExport(index_exports, require("./hono/start-server.js"), module.exports);
20
21
  __reExport(index_exports, require("./events/webhook-subscriber.js"), module.exports);
21
22
  __reExport(index_exports, require("./events/a2a-sse-subscriber.js"), module.exports);
22
23
  __reExport(index_exports, require("./events/webhook-types.js"), module.exports);
@@ -28,6 +29,7 @@ __reExport(index_exports, require("./approval/approval-coordinator.js"), module.
28
29
  0 && (module.exports = {
29
30
  ...require("./hono/index.js"),
30
31
  ...require("./hono/node/index.js"),
32
+ ...require("./hono/start-server.js"),
31
33
  ...require("./events/webhook-subscriber.js"),
32
34
  ...require("./events/a2a-sse-subscriber.js"),
33
35
  ...require("./events/webhook-types.js"),
package/dist/index.d.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from './hono/index.js';
2
2
  export * from './hono/node/index.js';
3
+ export * from './hono/start-server.js';
3
4
  export type { DextoApp } from './hono/types.js';
4
5
  export * from './events/webhook-subscriber.js';
5
6
  export * from './events/a2a-sse-subscriber.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,YAAY,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uCAAuC,CAAC;AACtD,cAAc,oCAAoC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,YAAY,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAChD,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,uCAAuC,CAAC;AACtD,cAAc,oCAAoC,CAAC"}
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  export * from "./hono/index.js";
2
2
  export * from "./hono/node/index.js";
3
+ export * from "./hono/start-server.js";
3
4
  export * from "./events/webhook-subscriber.js";
4
5
  export * from "./events/a2a-sse-subscriber.js";
5
6
  export * from "./events/webhook-types.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dexto/server",
3
- "version": "1.3.0",
3
+ "version": "1.5.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -30,9 +30,10 @@
30
30
  "hono": "^4.6.8",
31
31
  "ws": "^8.18.1",
32
32
  "yaml": "^2.7.1",
33
- "@modelcontextprotocol/sdk": "^1.17.2",
34
- "@dexto/agent-management": "1.3.0",
35
- "@dexto/core": "1.3.0"
33
+ "@modelcontextprotocol/sdk": "^1.25.2",
34
+ "@dexto/agent-management": "1.5.0",
35
+ "@dexto/core": "1.5.0",
36
+ "@dexto/image-local": "1.5.0"
36
37
  },
37
38
  "files": [
38
39
  "dist",