@artinet/sdk 0.6.10 → 0.6.12

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.
@@ -0,0 +1,352 @@
1
+ /**
2
+ * Copyright 2025 The Artinet Project
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ */
5
+ /**
6
+ * @fileoverview Agent Factory
7
+ *
8
+ * This module provides a fluent builder API for constructing A2A agents and
9
+ * execution engines. It enables declarative definition of multi-step agent
10
+ * workflows with type-safe step composition and automatic execution orchestration.
11
+ *
12
+ * **Key Features:**
13
+ * - Fluent API with method chaining (`.text()`, `.data()`, `.file()`, etc.)
14
+ * - Type-safe argument passing between steps via `args` carry pattern
15
+ * - Multiple output types: text, file, data, message, artifact, status, task
16
+ * - Agent-to-agent orchestration via `.sendMessage()`
17
+ * - Static value shortcuts for simple steps
18
+ * - Step skipping via `skip()` function
19
+ *
20
+ * @module AgentFactory
21
+ * @version 0.6
22
+ * @since 0.5.6
23
+ * @author The Artinet Project
24
+ */
25
+ import { A2A } from "../types/index.js";
26
+ import * as transform from './transform.js';
27
+ import { createAgent as createAgentImpl } from '../services/a2a/factory/service.js';
28
+ import { describe } from './index.js';
29
+ import { logger } from "../config/index.js";
30
+ import { v4 as uuidv4 } from 'uuid';
31
+ import { createStepEngine, } from './create.js';
32
+ const toFunction = (function_or_ret) => {
33
+ return typeof function_or_ret === 'function'
34
+ ? function_or_ret
35
+ : () => function_or_ret;
36
+ };
37
+ /**
38
+ * Fluent builder for constructing A2A agent execution engines.
39
+ *
40
+ * AgentFactory provides a type-safe, fluent API for composing multi-step
41
+ * agent workflows. It supports method chaining to build complex agent behaviors
42
+ * from individual processing steps, with automatic type inference for carried
43
+ * arguments between steps.
44
+ *
45
+ * @template I - The arguments type received from previous steps (inferred automatically)
46
+ *
47
+ * @example
48
+ * ```typescript
49
+ * // Basic agent with text steps
50
+ * const agent = cr8("MyAgent")
51
+ * .text(({ content }) => `You said: ${content}`)
52
+ * .agent;
53
+ *
54
+ * // Agent with carried args between steps
55
+ * const agent = cr8("AnalysisAgent")
56
+ * .text(({ content }) => ({
57
+ * reply: `Analyzing: ${content}`,
58
+ * args: { originalContent: content }
59
+ * }))
60
+ * .data(({ args }) => ({
61
+ * wordCount: args?.originalContent?.split(' ').length,
62
+ * timestamp: Date.now()
63
+ * }))
64
+ * .text(({ args }) => `Analysis complete: ${args?.wordCount} words`)
65
+ * .agent;
66
+ *
67
+ * // Agent-to-agent orchestration
68
+ * const orchestrator = cr8("Orchestrator")
69
+ * .text("Starting multi-agent workflow...")
70
+ * .sendMessage({ agent: otherAgent, message: "Process this" })
71
+ * .text(({ args }) => `Got result: ${args?.task?.status.state}`)
72
+ * .agent;
73
+ * ```
74
+ *
75
+ * @public
76
+ * @since 0.5.6
77
+ */
78
+ export class AgentFactory {
79
+ _agentCard;
80
+ _params;
81
+ _steps;
82
+ _serve;
83
+ /**
84
+ * Protected constructor to enforce factory method usage.
85
+ * @param agentCard - The agent card to use
86
+ * @param params - The parameters to use
87
+ * @param steps - Initial steps array
88
+ */
89
+ constructor(_agentCard, _params,
90
+ //@typescript-eslint/no-explicit-any
91
+ _steps = [], _serve = () => {
92
+ throw new Error('Serve function not provided');
93
+ }) {
94
+ this._agentCard = _agentCard;
95
+ this._params = _params;
96
+ this._steps = _steps;
97
+ this._serve = _serve;
98
+ }
99
+ /**
100
+ * Builds the step list for the workflow.
101
+ *
102
+ * @returns Array of workflow steps
103
+ * @throws Error if no steps have been added
104
+ *
105
+ * @example
106
+ * ```typescript
107
+ * const steps = cr8.steps;
108
+ * ```
109
+ */
110
+ //@typescript-eslint/no-explicit-any
111
+ get steps() {
112
+ return this._steps;
113
+ }
114
+ /**
115
+ * The {@link A2A.AgentCard} to use
116
+ * @returns The {@link A2A.AgentCard}
117
+ */
118
+ get agentCard() {
119
+ return this._agentCard;
120
+ }
121
+ /**
122
+ * The {@link FactoryParams} to use
123
+ * @returns The {@link FactoryParams}
124
+ */
125
+ get params() {
126
+ return this._params;
127
+ }
128
+ /**
129
+ * Creates an agent execution engine from the built workflow.
130
+ *
131
+ * @returns The {@link A2A.Engine}
132
+ *
133
+ * @example
134
+ * ```typescript
135
+ * const engine = builder.engine;
136
+ * // Use engine with service execution
137
+ * ```
138
+ */
139
+ get engine() {
140
+ return createStepEngine(this.steps);
141
+ }
142
+ /**
143
+ * Creates a complete A2A agent using the built workflow.
144
+ *
145
+ * @param params - The {@link ServiceParams} to use
146
+ * @returns The {@link Service}
147
+ *
148
+ * @example
149
+ * ```typescript
150
+ * const agent = cr8({
151
+ * id: 'my-agent',
152
+ * name: 'Assistant Agent',
153
+ * capabilities: ['text-processing']
154
+ * }).agent;
155
+ * ```
156
+ */
157
+ get agent() {
158
+ return createAgentImpl({
159
+ ...this._params,
160
+ agentCard: this._agentCard,
161
+ engine: this.engine,
162
+ });
163
+ }
164
+ get server() {
165
+ return this._serve({
166
+ agent: this.agent,
167
+ serverParams: this._params,
168
+ });
169
+ }
170
+ from(engine = this.engine) {
171
+ return createAgentImpl({
172
+ ...this._params,
173
+ agentCard: this._agentCard,
174
+ engine: engine,
175
+ });
176
+ }
177
+ serve(engine = this.engine) {
178
+ return this._serve({
179
+ agent: this.from(engine),
180
+ serverParams: this._params,
181
+ });
182
+ }
183
+ addStep(step) {
184
+ return new AgentFactory(this._agentCard, this._params, [...this.steps, step], this._serve);
185
+ }
186
+ text(step_or_text) {
187
+ const stepFn = toFunction(step_or_text);
188
+ return this.addStep({
189
+ id: uuidv4(),
190
+ step: stepFn,
191
+ kind: A2A.Kind['text'],
192
+ handler: transform.Parts('text'),
193
+ });
194
+ }
195
+ file(step_or_file) {
196
+ const stepFn = toFunction(step_or_file);
197
+ return this.addStep({
198
+ id: uuidv4(),
199
+ step: stepFn,
200
+ kind: A2A.Kind['file'],
201
+ handler: transform.Parts('file'),
202
+ });
203
+ }
204
+ data(step_or_data) {
205
+ const stepFn = toFunction(step_or_data);
206
+ return this.addStep({
207
+ id: uuidv4(),
208
+ step: stepFn,
209
+ kind: A2A.Kind['data'],
210
+ handler: transform.Parts('data'),
211
+ });
212
+ }
213
+ message(step_or_message) {
214
+ const stepFn = toFunction(step_or_message);
215
+ return this.addStep({
216
+ id: uuidv4(),
217
+ step: stepFn,
218
+ kind: A2A.Kind['message'],
219
+ handler: transform.Message(),
220
+ });
221
+ }
222
+ artifact(step_or_artifact) {
223
+ const stepFn = toFunction(step_or_artifact);
224
+ return this.addStep({
225
+ id: uuidv4(),
226
+ step: stepFn,
227
+ kind: A2A.Kind['artifact-update'],
228
+ handler: transform.Artifact(),
229
+ });
230
+ }
231
+ status(step_or_status) {
232
+ const stepFn = toFunction(step_or_status);
233
+ return this.addStep({
234
+ id: uuidv4(),
235
+ step: stepFn,
236
+ kind: A2A.Kind['status-update'],
237
+ handler: transform.Status(),
238
+ });
239
+ }
240
+ task(step_or_task_or_string) {
241
+ const stepFn = toFunction(step_or_task_or_string);
242
+ return this.addStep({
243
+ id: uuidv4(),
244
+ step: stepFn,
245
+ kind: 'task',
246
+ handler: transform.Task(),
247
+ });
248
+ }
249
+ /**
250
+ * Adds an agent-to-agent orchestration step to the workflow.
251
+ *
252
+ * This step sends a message to another agent (local Service or remote A2A Server)
253
+ * and yields the response as a task. Enables multi-agent workflows where one
254
+ * agent delegates work to others.
255
+ *
256
+ * **Note:** This is currently a blocking call. Streaming responses are not
257
+ * yet supported in orchestration steps.
258
+ * @note Args passed from the previous step are inserted, by default,
259
+ * (`unshift`) as `DataPart`s onto the forwarded `Message`.`Parts`.
260
+ *
261
+ * @param agent - The target agent (Agent or AgentMessenger)
262
+ * @param message - Message to send (defaults to context.userMessage)
263
+ * @returns New builder instance with task carry args (args.task)
264
+ *
265
+ * @example
266
+ * ```typescript
267
+ * // Delegate to another agent
268
+ * const orchestrator = cr8("Orchestrator")
269
+ * .text("Starting workflow...")
270
+ * .sendMessage({ agent: analysisAgent, message: "Analyze this data" })
271
+ * .text(({ args }) => `Analysis result: ${args?.task?.status.state}`)
272
+ * .agent;
273
+ *
274
+ * // Chain multiple agents
275
+ * const pipeline = cr8("Pipeline")
276
+ * .sendMessage({ agent: preprocessor })
277
+ * .sendMessage({ agent: analyzer })
278
+ * .sendMessage({ agent: postprocessor })
279
+ * .text(({ args }) => `Final result: ${args?.task?.status.message}`)
280
+ * .agent;
281
+ *
282
+ * // Forward user's message to another agent
283
+ * const proxy = cr8("Proxy")
284
+ * .sendMessage({ agent: targetAgent }) // uses context.userMessage
285
+ * .agent;
286
+ * ```
287
+ */
288
+ sendMessage(agent_and_message) {
289
+ const stepFn = async ({ context, args }) => {
290
+ logger.info('sendMessage: Sending message: ', {
291
+ agent: agent_and_message.agent.constructor.name,
292
+ });
293
+ const messageSendParams = describe.messageSendParams(agent_and_message.message ?? structuredClone(context.userMessage));
294
+ if (args) {
295
+ /**We extract the parts of the first A2A protocol object we encounter in the args */
296
+ if (args.task || args.message || args.update) {
297
+ const parts = [];
298
+ if (args.message) {
299
+ parts.push(...(A2A.MessageSchema.safeParse(args.message).data?.parts ?? []));
300
+ }
301
+ if (args.task) {
302
+ parts.push(...(A2A.TaskSchema.safeParse(args.task).data?.status?.message?.parts ?? []));
303
+ }
304
+ if (args.update) {
305
+ parts.push(...(A2A.TaskStatusUpdateEventSchema.safeParse(args.update).data?.status?.message?.parts ??
306
+ []));
307
+ parts.push(...(A2A.TaskArtifactUpdateEventSchema.safeParse(args.update).data?.artifact?.parts ?? []));
308
+ }
309
+ parts.forEach((part) => {
310
+ messageSendParams.message.parts.unshift(part);
311
+ });
312
+ }
313
+ else {
314
+ messageSendParams.message.parts.unshift(describe.part.data({ ...args }));
315
+ }
316
+ }
317
+ const response = await agent_and_message.agent
318
+ .sendMessage(messageSendParams)
319
+ .catch((error) => {
320
+ logger.error('sendMessage: Error sending message: ', error);
321
+ return null;
322
+ });
323
+ if (!response) {
324
+ logger.warn('sendMessage: No response from agent');
325
+ }
326
+ const task = response
327
+ ? describe.task({
328
+ ...response,
329
+ taskId: context.taskId,
330
+ contextId: context.contextId,
331
+ })
332
+ : describe.task({
333
+ taskId: context.taskId,
334
+ contextId: context.contextId,
335
+ state: A2A.TaskState.working,
336
+ message: describe.message('No response from agent'),
337
+ });
338
+ return {
339
+ reply: task,
340
+ args: {
341
+ task,
342
+ },
343
+ };
344
+ };
345
+ return this.addStep({
346
+ id: uuidv4(),
347
+ step: stepFn,
348
+ kind: 'task',
349
+ handler: transform.Task(),
350
+ });
351
+ }
352
+ }
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
- export * from "./types/index.js";
2
- export * from "./messenger/index.js";
3
- export * from "./server/index.js";
4
- export * from "./services/index.js";
5
- export * from "./storage/index.js";
6
- export * from "./config/index.js";
7
- export * from "./config/default.js";
8
- export * from "./create/create.js";
9
- export * from "./create/index.js";
10
- export * from "./utils/index.js";
1
+ export * from './types/index.js';
2
+ export * from './messenger/index.js';
3
+ export * from './server/index.js';
4
+ export * from './services/index.js';
5
+ export * from './storage/index.js';
6
+ export * from './config/index.js';
7
+ export * from './config/default.js';
8
+ export * from './server/express/create.js';
9
+ export * from './create/index.js';
10
+ export * from './utils/index.js';
package/dist/index.js CHANGED
@@ -1,10 +1,11 @@
1
- export * from "./types/index.js";
2
- export * from "./messenger/index.js";
3
- export * from "./server/index.js";
4
- export * from "./services/index.js";
5
- export * from "./storage/index.js";
6
- export * from "./config/index.js";
7
- export * from "./config/default.js";
8
- export * from "./create/create.js";
9
- export * from "./create/index.js";
10
- export * from "./utils/index.js";
1
+ export * from './types/index.js';
2
+ export * from './messenger/index.js';
3
+ export * from './server/index.js';
4
+ export * from './services/index.js';
5
+ export * from './storage/index.js';
6
+ export * from './config/index.js';
7
+ export * from './config/default.js';
8
+ // Maintaining Express as the default for backwards compatibility
9
+ export * from './server/express/create.js';
10
+ export * from './create/index.js';
11
+ export * from './utils/index.js';
@@ -93,7 +93,7 @@ class Messenger {
93
93
  interceptors: [...(config?.interceptors ?? []), new HeaderInterceptor(() => this.headers)],
94
94
  },
95
95
  }));
96
- //RAII
96
+ //RAII: to try and maintain backwards compatibility with the old client?
97
97
  this.clientPromise = this.reset(this._baseUrl, this._fallbackPath);
98
98
  }
99
99
  async reset(baseUrl = this._baseUrl, fallbackPath = this._fallbackPath) {
@@ -0,0 +1,113 @@
1
+ /**
2
+ * SPDX-License-Identifier: Apache-2.0
3
+ */
4
+ import { FactoryParams as BaseFactoryParams } from '../../create/create.js';
5
+ import { BaseArgs, EmptyArgs } from '../../create/agent-builder.js';
6
+ import { AgentFactory as BaseAgentFactory } from '../../create/factory.js';
7
+ import { describe } from '../../create/index.js';
8
+ import { ServerParams as ExpressServerParams, ExpressAgentServer } from './server.js';
9
+ export type FactoryParams = BaseFactoryParams<ExpressServerParams>;
10
+ /**
11
+ * Fluent builder for constructing A2A agent execution engines.
12
+ *
13
+ * AgentFactory provides a type-safe, fluent API for composing multi-step
14
+ * agent workflows. It supports method chaining to build complex agent behaviors
15
+ * from individual processing steps, with automatic type inference for carried
16
+ * arguments between steps.
17
+ *
18
+ * @template InputArguments - The arguments type received from previous steps (inferred automatically)
19
+ *
20
+ * @example
21
+ * ```typescript
22
+ * // Basic agent with text steps
23
+ * const agent = cr8("MyAgent")
24
+ * .text(({ content }) => `You said: ${content}`)
25
+ * .agent;
26
+ *
27
+ * // Agent with carried args between steps
28
+ * const agent = cr8("AnalysisAgent")
29
+ * .text(({ content }) => ({
30
+ * reply: `Analyzing: ${content}`,
31
+ * args: { originalContent: content }
32
+ * }))
33
+ * .data(({ args }) => ({
34
+ * wordCount: args?.originalContent?.split(' ').length,
35
+ * timestamp: Date.now()
36
+ * }))
37
+ * .text(({ args }) => `Analysis complete: ${args?.wordCount} words`)
38
+ * .agent;
39
+ *
40
+ * // Agent-to-agent orchestration
41
+ * const orchestrator = cr8("Orchestrator")
42
+ * .text("Starting multi-agent workflow...")
43
+ * .sendMessage({ agent: otherAgent, message: "Process this" })
44
+ * .text(({ args }) => `Got result: ${args?.task?.status.state}`)
45
+ * .agent;
46
+ * ```
47
+ *
48
+ * @public
49
+ * @since 0.5.6
50
+ */
51
+ export declare class AgentFactory<InputArguments extends BaseArgs = EmptyArgs> extends BaseAgentFactory<ExpressServerParams, ExpressAgentServer, InputArguments> {
52
+ /**
53
+ * Creates a new AgentFactory instance.
54
+ *
55
+ * @template Input - The initial arguments type
56
+ * @returns A new AgentFactory instance
57
+ *
58
+ * @example
59
+ * ```typescript
60
+ * const factory = AgentFactory.create(myCard, { params });
61
+ * ```
62
+ */
63
+ static create(agentCard: describe.AgentCardParams, params?: FactoryParams): AgentFactory<EmptyArgs>;
64
+ }
65
+ /**
66
+ * Creates a new AgentFactory instance for building agent workflows.
67
+ *
68
+ * This is the primary entry point for the fluent builder API. Accepts an
69
+ * agent card (or name string) and optional factory parameters.
70
+ *
71
+ * @param agentCard - Agent card object or name string
72
+ * @param params - Optional factory parameters (basePath, port, etc.)
73
+ * @returns New AgentFactory instance
74
+ *
75
+ * @example
76
+ * ```typescript
77
+ * // Simple agent with name string
78
+ * const agent = cr8("MyAgent")
79
+ * .text(({ content }) => `Echo: ${content}`)
80
+ * .agent;
81
+ *
82
+ * // Agent with full card and params
83
+ * const agent = cr8(myAgentCard, { basePath: "/api" })
84
+ * .text("Hello!")
85
+ * .data(({ content }) => analyzeContent(content))
86
+ * .agent;
87
+ *
88
+ * // Get the engine directly
89
+ * const engine = cr8("Processor")
90
+ * .text("Processing...")
91
+ * .engine;
92
+ *
93
+ * // Create and start server
94
+ * const server = cr8("ServerAgent", { port: 3000 })
95
+ * .text("Ready to serve!")
96
+ * .server.start();
97
+ * ```
98
+ *
99
+ * @public
100
+ * @since 0.6.0
101
+ */
102
+ export declare const cr8: typeof AgentFactory.create;
103
+ /**
104
+ * @deprecated Use {@link cr8} instead
105
+ * @note This export exists only to alert users that `AgentBuilder` is deprecated.
106
+ * `AgentBuilder` no longer comes with the `createAgent` method.
107
+ * @since 0.6.0
108
+ */
109
+ export declare class AgentBuilder extends AgentFactory {
110
+ constructor(agentCard?: describe.AgentCardParams | string, params?: FactoryParams);
111
+ }
112
+ export type { textStep, fileStep, dataStep, messageStep, artifactStep, statusStep, taskStep, MessageSender, } from "../../create/create.js";
113
+ export { createStepEngine } from "../../create/create.js";
@@ -0,0 +1,113 @@
1
+ /**
2
+ * SPDX-License-Identifier: Apache-2.0
3
+ */
4
+ import { AgentFactory as BaseAgentFactory } from '../../create/factory.js';
5
+ import { describe } from '../../create/index.js';
6
+ import { serve } from './server.js';
7
+ /**
8
+ * Fluent builder for constructing A2A agent execution engines.
9
+ *
10
+ * AgentFactory provides a type-safe, fluent API for composing multi-step
11
+ * agent workflows. It supports method chaining to build complex agent behaviors
12
+ * from individual processing steps, with automatic type inference for carried
13
+ * arguments between steps.
14
+ *
15
+ * @template InputArguments - The arguments type received from previous steps (inferred automatically)
16
+ *
17
+ * @example
18
+ * ```typescript
19
+ * // Basic agent with text steps
20
+ * const agent = cr8("MyAgent")
21
+ * .text(({ content }) => `You said: ${content}`)
22
+ * .agent;
23
+ *
24
+ * // Agent with carried args between steps
25
+ * const agent = cr8("AnalysisAgent")
26
+ * .text(({ content }) => ({
27
+ * reply: `Analyzing: ${content}`,
28
+ * args: { originalContent: content }
29
+ * }))
30
+ * .data(({ args }) => ({
31
+ * wordCount: args?.originalContent?.split(' ').length,
32
+ * timestamp: Date.now()
33
+ * }))
34
+ * .text(({ args }) => `Analysis complete: ${args?.wordCount} words`)
35
+ * .agent;
36
+ *
37
+ * // Agent-to-agent orchestration
38
+ * const orchestrator = cr8("Orchestrator")
39
+ * .text("Starting multi-agent workflow...")
40
+ * .sendMessage({ agent: otherAgent, message: "Process this" })
41
+ * .text(({ args }) => `Got result: ${args?.task?.status.state}`)
42
+ * .agent;
43
+ * ```
44
+ *
45
+ * @public
46
+ * @since 0.5.6
47
+ */
48
+ export class AgentFactory extends BaseAgentFactory {
49
+ /**
50
+ * Creates a new AgentFactory instance.
51
+ *
52
+ * @template Input - The initial arguments type
53
+ * @returns A new AgentFactory instance
54
+ *
55
+ * @example
56
+ * ```typescript
57
+ * const factory = AgentFactory.create(myCard, { params });
58
+ * ```
59
+ */
60
+ static create(agentCard, params) {
61
+ return new AgentFactory(describe.card(agentCard), params, [], ({ agent, serverParams }) => serve({ agent, ...serverParams }));
62
+ }
63
+ }
64
+ /**
65
+ * Creates a new AgentFactory instance for building agent workflows.
66
+ *
67
+ * This is the primary entry point for the fluent builder API. Accepts an
68
+ * agent card (or name string) and optional factory parameters.
69
+ *
70
+ * @param agentCard - Agent card object or name string
71
+ * @param params - Optional factory parameters (basePath, port, etc.)
72
+ * @returns New AgentFactory instance
73
+ *
74
+ * @example
75
+ * ```typescript
76
+ * // Simple agent with name string
77
+ * const agent = cr8("MyAgent")
78
+ * .text(({ content }) => `Echo: ${content}`)
79
+ * .agent;
80
+ *
81
+ * // Agent with full card and params
82
+ * const agent = cr8(myAgentCard, { basePath: "/api" })
83
+ * .text("Hello!")
84
+ * .data(({ content }) => analyzeContent(content))
85
+ * .agent;
86
+ *
87
+ * // Get the engine directly
88
+ * const engine = cr8("Processor")
89
+ * .text("Processing...")
90
+ * .engine;
91
+ *
92
+ * // Create and start server
93
+ * const server = cr8("ServerAgent", { port: 3000 })
94
+ * .text("Ready to serve!")
95
+ * .server.start();
96
+ * ```
97
+ *
98
+ * @public
99
+ * @since 0.6.0
100
+ */
101
+ export const cr8 = AgentFactory.create;
102
+ /**
103
+ * @deprecated Use {@link cr8} instead
104
+ * @note This export exists only to alert users that `AgentBuilder` is deprecated.
105
+ * `AgentBuilder` no longer comes with the `createAgent` method.
106
+ * @since 0.6.0
107
+ */
108
+ export class AgentBuilder extends AgentFactory {
109
+ constructor(agentCard = 'default', params) {
110
+ super(describe.card(typeof agentCard === 'string' ? { name: agentCard } : agentCard), params);
111
+ }
112
+ }
113
+ export { createStepEngine } from "../../create/create.js";
@@ -0,0 +1,2 @@
1
+ export * from './server.js';
2
+ export { cr8 } from './create.js';
@@ -0,0 +1,2 @@
1
+ export * from './server.js';
2
+ export { cr8 } from './create.js';
@@ -5,8 +5,8 @@
5
5
  * @archive Helper utilities for express servers.
6
6
  * @note We recommend using the @a2a-js/sdk/express middleware instead as these utilities will no longer be robustly maintained.
7
7
  */
8
- import { type ErrorRequestHandler } from "express";
9
- import express from "express";
8
+ import { type ErrorRequestHandler } from 'express';
9
+ import express from 'express';
10
10
  export declare function rpcParser(req: express.Request, res: express.Response, next: express.NextFunction): void;
11
11
  /**
12
12
  * Express error handler middleware.