@naylence/agent-sdk 0.3.12 → 0.3.13
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/README.md +30 -0
- package/dist/browser/index.js +1167 -439
- package/dist/browser/index.js.map +1 -1
- package/dist/cjs/naylence/agent/agent-proxy.js.map +1 -1
- package/dist/cjs/naylence/agent/agent.js.map +1 -1
- package/dist/cjs/naylence/agent/background-task-agent.js.map +1 -1
- package/dist/cjs/naylence/agent/base-agent.js.map +1 -1
- package/dist/cjs/public-api.d.ts +7 -0
- package/dist/cjs/public-api.js +26 -0
- package/dist/cjs/public-api.js.map +1 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/naylence/agent/agent-proxy.d.ts +148 -0
- package/dist/esm/naylence/agent/agent-proxy.js +130 -0
- package/dist/esm/naylence/agent/agent-proxy.js.map +1 -1
- package/dist/esm/naylence/agent/agent.d.ts +194 -2
- package/dist/esm/naylence/agent/agent.js +123 -0
- package/dist/esm/naylence/agent/agent.js.map +1 -1
- package/dist/esm/naylence/agent/background-task-agent.d.ts +164 -0
- package/dist/esm/naylence/agent/background-task-agent.js +150 -0
- package/dist/esm/naylence/agent/background-task-agent.js.map +1 -1
- package/dist/esm/naylence/agent/base-agent.d.ts +171 -0
- package/dist/esm/naylence/agent/base-agent.js +170 -1
- package/dist/esm/naylence/agent/base-agent.js.map +1 -1
- package/dist/esm/public-api.d.ts +15 -0
- package/dist/esm/public-api.js +16 -0
- package/dist/esm/public-api.js.map +1 -0
- package/dist/esm/version.d.ts +1 -1
- package/dist/esm/version.js +2 -2
- package/dist/types/naylence/agent/agent-proxy.d.ts +148 -0
- package/dist/types/naylence/agent/agent-proxy.d.ts.map +1 -1
- package/dist/types/naylence/agent/agent.d.ts +194 -2
- package/dist/types/naylence/agent/agent.d.ts.map +1 -1
- package/dist/types/naylence/agent/background-task-agent.d.ts +164 -0
- package/dist/types/naylence/agent/background-task-agent.d.ts.map +1 -1
- package/dist/types/naylence/agent/base-agent.d.ts +171 -0
- package/dist/types/naylence/agent/base-agent.d.ts.map +1 -1
- package/dist/types/public-api.d.ts +16 -0
- package/dist/types/public-api.d.ts.map +1 -0
- package/dist/types/version.d.ts +1 -1
- package/package.json +7 -2
|
@@ -1,36 +1,200 @@
|
|
|
1
1
|
import { type Artifact, type Message, Task, type TaskArtifactUpdateEvent, TaskIdParams, type TaskQueryParams, TaskSendParams, TaskState, type TaskStatusUpdateEvent } from './a2a-types.js';
|
|
2
2
|
import { BaseAgent, type BaseAgentOptions, type BaseAgentState } from './base-agent.js';
|
|
3
|
+
/** @internal */
|
|
3
4
|
type TaskEvent = TaskStatusUpdateEvent | TaskArtifactUpdateEvent;
|
|
5
|
+
/**
|
|
6
|
+
* Configuration options for {@link BackgroundTaskAgent}.
|
|
7
|
+
*/
|
|
4
8
|
export interface BackgroundTaskAgentOptions<StateT extends BaseAgentState> extends BaseAgentOptions<StateT> {
|
|
9
|
+
/** Maximum number of events buffered per task. Defaults to 1000. */
|
|
5
10
|
maxQueueSize?: number;
|
|
11
|
+
/**
|
|
12
|
+
* Maximum task execution time in milliseconds.
|
|
13
|
+
* Tasks exceeding this limit are automatically canceled. Null disables the limit.
|
|
14
|
+
*/
|
|
6
15
|
maxTaskLifetimeMs?: number | null;
|
|
16
|
+
/** Maximum number of completed tasks to cache. Defaults to 100. */
|
|
7
17
|
completedCacheSize?: number;
|
|
18
|
+
/** Time-to-live for cached completed tasks in seconds. Defaults to 300. */
|
|
8
19
|
completedCacheTtlSec?: number;
|
|
9
20
|
}
|
|
21
|
+
/**
|
|
22
|
+
* Base class for agents that execute long-running background tasks.
|
|
23
|
+
*
|
|
24
|
+
* Unlike {@link BaseAgent} which runs tasks synchronously in startTask,
|
|
25
|
+
* BackgroundTaskAgent starts tasks in the background and streams status
|
|
26
|
+
* updates to subscribers. This is ideal for work that takes significant time.
|
|
27
|
+
*
|
|
28
|
+
* @remarks
|
|
29
|
+
* Lifecycle:
|
|
30
|
+
* 1. Client calls startTask, which returns immediately with WORKING status
|
|
31
|
+
* 2. runBackgroundTask executes asynchronously
|
|
32
|
+
* 3. Status updates are queued and delivered to subscribers
|
|
33
|
+
* 4. Task completes with COMPLETED, FAILED, or CANCELED status
|
|
34
|
+
*
|
|
35
|
+
* Completed tasks are cached briefly for late subscribers to retrieve final status.
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```typescript
|
|
39
|
+
* import {
|
|
40
|
+
* BackgroundTaskAgent,
|
|
41
|
+
* TaskSendParams,
|
|
42
|
+
* TaskState,
|
|
43
|
+
* } from '@naylence/agent-sdk';
|
|
44
|
+
*
|
|
45
|
+
* class SlowAgent extends BackgroundTaskAgent {
|
|
46
|
+
* protected async runBackgroundTask(params: TaskSendParams): Promise<string> {
|
|
47
|
+
* // Report progress
|
|
48
|
+
* await this.updateTaskState(params.id, TaskState.WORKING);
|
|
49
|
+
*
|
|
50
|
+
* // Do expensive work
|
|
51
|
+
* await someSlowOperation();
|
|
52
|
+
*
|
|
53
|
+
* // Return value becomes the task result
|
|
54
|
+
* return 'done';
|
|
55
|
+
* }
|
|
56
|
+
* }
|
|
57
|
+
*
|
|
58
|
+
* const agent = new SlowAgent('slow-worker', {
|
|
59
|
+
* maxTaskLifetimeMs: 60_000, // 1 minute timeout
|
|
60
|
+
* });
|
|
61
|
+
* await agent.serve('fame://slow-worker');
|
|
62
|
+
* ```
|
|
63
|
+
*
|
|
64
|
+
* @typeParam StateT - The state model type, defaults to {@link BaseAgentState}.
|
|
65
|
+
*/
|
|
10
66
|
export declare abstract class BackgroundTaskAgent<StateT extends BaseAgentState = BaseAgentState> extends BaseAgent<StateT> {
|
|
67
|
+
/** @internal */
|
|
11
68
|
private readonly maxQueueSize;
|
|
69
|
+
/** @internal */
|
|
12
70
|
private readonly maxTaskLifetimeMs;
|
|
71
|
+
/** @internal */
|
|
13
72
|
private readonly taskStatuses;
|
|
73
|
+
/** @internal */
|
|
14
74
|
private readonly taskEventQueues;
|
|
75
|
+
/** @internal */
|
|
15
76
|
private readonly completed;
|
|
77
|
+
/** @internal */
|
|
16
78
|
private readonly completedCacheSize;
|
|
79
|
+
/** @internal */
|
|
17
80
|
private readonly completedCacheTtlSec;
|
|
81
|
+
/** @internal */
|
|
18
82
|
private readonly statusLock;
|
|
83
|
+
/**
|
|
84
|
+
* Creates a new BackgroundTaskAgent.
|
|
85
|
+
*
|
|
86
|
+
* @param name - Agent name. Defaults to snake_case of the class name.
|
|
87
|
+
* @param options - Configuration options for task execution and caching.
|
|
88
|
+
*/
|
|
19
89
|
protected constructor(name?: string | null, options?: BackgroundTaskAgentOptions<StateT>);
|
|
90
|
+
/** @internal */
|
|
20
91
|
private isTerminalTaskState;
|
|
92
|
+
/**
|
|
93
|
+
* Starts a background task.
|
|
94
|
+
*
|
|
95
|
+
* Returns immediately with WORKING status. The task executes asynchronously
|
|
96
|
+
* via {@link BackgroundTaskAgent.runBackgroundTask}.
|
|
97
|
+
*
|
|
98
|
+
* @param params - Task parameters.
|
|
99
|
+
* @returns The task with initial WORKING status.
|
|
100
|
+
*/
|
|
21
101
|
startTask(params: TaskSendParams): Promise<Task>;
|
|
102
|
+
/** @internal */
|
|
22
103
|
private enforceMaxLifetime;
|
|
104
|
+
/** @internal */
|
|
23
105
|
private runBackgroundTaskInternal;
|
|
106
|
+
/**
|
|
107
|
+
* Override to implement background task execution logic.
|
|
108
|
+
*
|
|
109
|
+
* This method runs asynchronously after startTask returns. The return value
|
|
110
|
+
* becomes the task's completion message. Throwing an error fails the task.
|
|
111
|
+
*
|
|
112
|
+
* @remarks
|
|
113
|
+
* Call {@link BackgroundTaskAgent.updateTaskState} to report progress.
|
|
114
|
+
* Call {@link BackgroundTaskAgent.updateTaskArtifact} to emit artifacts.
|
|
115
|
+
*
|
|
116
|
+
* @param params - The original task parameters.
|
|
117
|
+
* @returns The task result, which is included in the completion message.
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
* ```typescript
|
|
121
|
+
* protected async runBackgroundTask(params: TaskSendParams): Promise<unknown> {
|
|
122
|
+
* for (let i = 0; i < 10; i++) {
|
|
123
|
+
* await this.updateTaskState(params.id, TaskState.WORKING);
|
|
124
|
+
* await doStep(i);
|
|
125
|
+
* }
|
|
126
|
+
* return { steps: 10 };
|
|
127
|
+
* }
|
|
128
|
+
* ```
|
|
129
|
+
*/
|
|
24
130
|
protected abstract runBackgroundTask(params: TaskSendParams): Promise<unknown>;
|
|
131
|
+
/**
|
|
132
|
+
* Gets the current state of a task.
|
|
133
|
+
*
|
|
134
|
+
* @param taskId - The task identifier.
|
|
135
|
+
* @returns The current task state, or UNKNOWN if not found.
|
|
136
|
+
*/
|
|
25
137
|
getTaskState(taskId: string): Promise<TaskState>;
|
|
138
|
+
/**
|
|
139
|
+
* Retrieves the full status of a task.
|
|
140
|
+
*
|
|
141
|
+
* @param params - Query parameters including the task ID.
|
|
142
|
+
* @returns The task with current status.
|
|
143
|
+
* @throws Error if the task is unknown or expired.
|
|
144
|
+
*/
|
|
26
145
|
getTaskStatus(params: TaskQueryParams): Promise<Task>;
|
|
146
|
+
/**
|
|
147
|
+
* Updates the state of a running task.
|
|
148
|
+
*
|
|
149
|
+
* Call this from {@link BackgroundTaskAgent.runBackgroundTask} to report progress.
|
|
150
|
+
* Status updates are delivered to subscribers.
|
|
151
|
+
*
|
|
152
|
+
* @param taskId - The task identifier.
|
|
153
|
+
* @param state - The new task state.
|
|
154
|
+
* @param message - Optional message with details.
|
|
155
|
+
* @returns True if the update was applied, false if the task is already terminal.
|
|
156
|
+
*/
|
|
27
157
|
updateTaskState(taskId: string, state: TaskState, message?: Message | null): Promise<boolean>;
|
|
158
|
+
/** @internal */
|
|
28
159
|
private addToCompleted;
|
|
160
|
+
/**
|
|
161
|
+
* Emits an artifact for a running task.
|
|
162
|
+
*
|
|
163
|
+
* Artifacts are delivered to subscribers as TaskArtifactUpdateEvents.
|
|
164
|
+
*
|
|
165
|
+
* @param taskId - The task identifier.
|
|
166
|
+
* @param artifact - The artifact to emit.
|
|
167
|
+
*/
|
|
29
168
|
updateTaskArtifact(taskId: string, artifact: Artifact): Promise<void>;
|
|
169
|
+
/**
|
|
170
|
+
* Subscribes to updates for a task.
|
|
171
|
+
*
|
|
172
|
+
* Returns an async iterable that yields status and artifact events.
|
|
173
|
+
* For completed tasks, yields the cached final status if still available.
|
|
174
|
+
*
|
|
175
|
+
* @param params - Task parameters including the task ID.
|
|
176
|
+
* @returns Async iterable of task events.
|
|
177
|
+
*/
|
|
30
178
|
subscribeToTaskUpdates(params: TaskSendParams): AsyncIterable<TaskEvent>;
|
|
179
|
+
/**
|
|
180
|
+
* Cancels a task subscription.
|
|
181
|
+
*
|
|
182
|
+
* @param params - Parameters including the task ID.
|
|
183
|
+
*/
|
|
31
184
|
unsubscribeTask(params: TaskIdParams): Promise<void>;
|
|
185
|
+
/**
|
|
186
|
+
* Cancels a running task.
|
|
187
|
+
*
|
|
188
|
+
* Sets the task state to CANCELED. Does not interrupt runBackgroundTask,
|
|
189
|
+
* but prevents further state updates.
|
|
190
|
+
*
|
|
191
|
+
* @param params - Parameters including the task ID.
|
|
192
|
+
* @returns The task with CANCELED status.
|
|
193
|
+
*/
|
|
32
194
|
cancelTask(params: TaskIdParams): Promise<Task>;
|
|
195
|
+
/** @internal */
|
|
33
196
|
private purgeCompletedAfterTtl;
|
|
197
|
+
/** @internal */
|
|
34
198
|
private normalizeResultPayload;
|
|
35
199
|
}
|
|
36
200
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"background-task-agent.d.ts","sourceRoot":"","sources":["../../../../src/naylence/agent/background-task-agent.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"background-task-agent.d.ts","sourceRoot":"","sources":["../../../../src/naylence/agent/background-task-agent.ts"],"names":[],"mappings":"AAmBA,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,OAAO,EACZ,IAAI,EACJ,KAAK,uBAAuB,EAC5B,YAAY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B;CAY/B"}
|
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base class for implementing agents.
|
|
3
|
+
*
|
|
4
|
+
* {@link BaseAgent} provides the standard implementation of the {@link Agent} protocol
|
|
5
|
+
* with built-in support for state management, message handling, and task execution.
|
|
6
|
+
*
|
|
7
|
+
* @remarks
|
|
8
|
+
* Extend this class for request-response style agents. For long-running background
|
|
9
|
+
* work, consider extending {@link BackgroundTaskAgent} instead.
|
|
10
|
+
*
|
|
11
|
+
* @module
|
|
12
|
+
*/
|
|
1
13
|
import { type FameDeliveryContext, type FameEnvelope, type FameMessageResponse } from '@naylence/core';
|
|
2
14
|
import { FameAddress, FameFabric, NodeLike, Registerable, type StorageProvider } from '@naylence/runtime';
|
|
3
15
|
import { z } from 'zod';
|
|
@@ -5,6 +17,7 @@ import { Agent, type Payload } from './agent.js';
|
|
|
5
17
|
import { type AgentCard, Task, type TaskArtifactUpdateEvent, TaskIdParams, TaskPushNotificationConfig, TaskQueryParams, TaskSendParams, TaskStatusUpdateEvent } from './a2a-types.js';
|
|
6
18
|
import { TERMINAL_TASK_STATES } from './task-states.js';
|
|
7
19
|
export { TERMINAL_TASK_STATES };
|
|
20
|
+
/** @internal */
|
|
8
21
|
declare class StateContext<StateT extends BaseAgentState> {
|
|
9
22
|
private readonly acquireLock;
|
|
10
23
|
private readonly loadState;
|
|
@@ -133,16 +146,73 @@ export declare class BaseAgentState {
|
|
|
133
146
|
*/
|
|
134
147
|
clone(): this;
|
|
135
148
|
}
|
|
149
|
+
/** @internal */
|
|
136
150
|
type StateModelCtor<T extends BaseAgentState> = new () => T;
|
|
151
|
+
/**
|
|
152
|
+
* Configuration options for {@link BaseAgent}.
|
|
153
|
+
*/
|
|
137
154
|
export interface BaseAgentOptions<StateT extends BaseAgentState> {
|
|
155
|
+
/** State model class for typed state management. */
|
|
138
156
|
stateModel?: StateModelCtor<StateT> | null;
|
|
157
|
+
/** Namespace for state storage. Defaults to agent name. */
|
|
139
158
|
stateNamespace?: string | null;
|
|
159
|
+
/** Key under which state is stored. Defaults to 'state'. */
|
|
140
160
|
stateKey?: string;
|
|
161
|
+
/** Factory function to create initial state. */
|
|
141
162
|
stateFactory?: (() => StateT) | null;
|
|
163
|
+
/** Custom storage provider for state persistence. */
|
|
142
164
|
storageProvider?: StorageProvider | null;
|
|
143
165
|
}
|
|
166
|
+
/**
|
|
167
|
+
* Standard implementation of the {@link Agent} protocol.
|
|
168
|
+
*
|
|
169
|
+
* Provides built-in state management, message handling, and task lifecycle support.
|
|
170
|
+
* Extend this class and override {@link BaseAgent.runTask} to implement your agent logic.
|
|
171
|
+
*
|
|
172
|
+
* @remarks
|
|
173
|
+
* BaseAgent handles:
|
|
174
|
+
* - JSON-RPC message routing
|
|
175
|
+
* - State persistence with optional Zod validation
|
|
176
|
+
* - Task creation from runTask results
|
|
177
|
+
* - Graceful shutdown via SIGINT/SIGTERM
|
|
178
|
+
*
|
|
179
|
+
* For background/async task execution, use {@link BackgroundTaskAgent} instead.
|
|
180
|
+
*
|
|
181
|
+
* @example
|
|
182
|
+
* ```typescript
|
|
183
|
+
* import { BaseAgent, Payload, BaseAgentState } from '@naylence/agent-sdk';
|
|
184
|
+
* import { z } from 'zod';
|
|
185
|
+
*
|
|
186
|
+
* const CounterSchema = z.object({ count: z.number() });
|
|
187
|
+
*
|
|
188
|
+
* class CounterState extends BaseAgentState {
|
|
189
|
+
* static readonly schema = CounterSchema;
|
|
190
|
+
* count = 0;
|
|
191
|
+
* }
|
|
192
|
+
*
|
|
193
|
+
* class CounterAgent extends BaseAgent<CounterState> {
|
|
194
|
+
* static STATE_MODEL = CounterState;
|
|
195
|
+
*
|
|
196
|
+
* async runTask(payload: Payload): Promise<number> {
|
|
197
|
+
* return await this.withState(async (state) => {
|
|
198
|
+
* state.count += 1;
|
|
199
|
+
* return state.count;
|
|
200
|
+
* });
|
|
201
|
+
* }
|
|
202
|
+
* }
|
|
203
|
+
*
|
|
204
|
+
* const agent = new CounterAgent('counter');
|
|
205
|
+
* await agent.serve('fame://counter');
|
|
206
|
+
* ```
|
|
207
|
+
*
|
|
208
|
+
* @typeParam StateT - The state model type, defaults to {@link BaseAgentState}.
|
|
209
|
+
*/
|
|
144
210
|
export declare class BaseAgent<StateT extends BaseAgentState = BaseAgentState> extends Agent implements Registerable {
|
|
145
211
|
#private;
|
|
212
|
+
/**
|
|
213
|
+
* Default state model class. Override in subclasses to set state type.
|
|
214
|
+
* @internal
|
|
215
|
+
*/
|
|
146
216
|
static STATE_MODEL: StateModelCtor<BaseAgentState> | null;
|
|
147
217
|
private _name;
|
|
148
218
|
private _address;
|
|
@@ -158,12 +228,29 @@ export declare class BaseAgent<StateT extends BaseAgentState = BaseAgentState> e
|
|
|
158
228
|
private _fabric;
|
|
159
229
|
private _stateStore;
|
|
160
230
|
private _stateCache;
|
|
231
|
+
/**
|
|
232
|
+
* Creates a new BaseAgent.
|
|
233
|
+
*
|
|
234
|
+
* @param name - Agent name. Defaults to snake_case of the class name.
|
|
235
|
+
* @param options - Configuration options for state and storage.
|
|
236
|
+
*/
|
|
161
237
|
constructor(name?: string | null, options?: BaseAgentOptions<StateT>);
|
|
238
|
+
/**
|
|
239
|
+
* Capabilities advertised by this agent.
|
|
240
|
+
* Includes the standard agent capability by default.
|
|
241
|
+
*/
|
|
162
242
|
get capabilities(): string[];
|
|
243
|
+
/** The agent's name. */
|
|
163
244
|
get name(): string | null;
|
|
164
245
|
get spec(): Record<string, unknown>;
|
|
246
|
+
/** The address this agent is registered at. */
|
|
165
247
|
get address(): FameAddress | null;
|
|
248
|
+
/** @internal */
|
|
166
249
|
set address(value: FameAddress | null);
|
|
250
|
+
/**
|
|
251
|
+
* Storage provider for state persistence.
|
|
252
|
+
* @throws Error if no storage provider is available.
|
|
253
|
+
*/
|
|
167
254
|
get storageProvider(): StorageProvider;
|
|
168
255
|
/**
|
|
169
256
|
* Returns the fabric this agent is registered with.
|
|
@@ -172,21 +259,74 @@ export declare class BaseAgent<StateT extends BaseAgentState = BaseAgentState> e
|
|
|
172
259
|
*/
|
|
173
260
|
protected get fabric(): FameFabric | null;
|
|
174
261
|
onRegister?(node: NodeLike): Promise<void>;
|
|
262
|
+
/** @internal */
|
|
175
263
|
protected acquireStateLock(): Promise<() => void>;
|
|
264
|
+
/** @internal */
|
|
176
265
|
private ensureStateModel;
|
|
266
|
+
/** @internal */
|
|
177
267
|
private ensureStateStore;
|
|
268
|
+
/** @internal */
|
|
178
269
|
private defaultStateNamespace;
|
|
270
|
+
/** @internal */
|
|
179
271
|
protected loadStateInternal(): Promise<StateT>;
|
|
272
|
+
/** @internal */
|
|
180
273
|
protected saveStateInternal(state: StateT): Promise<void>;
|
|
274
|
+
/**
|
|
275
|
+
* State context for lock-protected state access.
|
|
276
|
+
*
|
|
277
|
+
* @remarks
|
|
278
|
+
* Prefer using {@link BaseAgent.withState} for simpler access patterns.
|
|
279
|
+
*
|
|
280
|
+
* @throws Error if no state model is configured.
|
|
281
|
+
*/
|
|
181
282
|
get state(): StateContext<StateT>;
|
|
283
|
+
/**
|
|
284
|
+
* Executes a callback with exclusive access to the agent's state.
|
|
285
|
+
*
|
|
286
|
+
* State changes are automatically persisted after the callback completes.
|
|
287
|
+
*
|
|
288
|
+
* @param callback - Function receiving the current state.
|
|
289
|
+
* @returns The callback's return value.
|
|
290
|
+
*
|
|
291
|
+
* @example
|
|
292
|
+
* ```typescript
|
|
293
|
+
* const count = await this.withState(async (state) => {
|
|
294
|
+
* state.count += 1;
|
|
295
|
+
* return state.count;
|
|
296
|
+
* });
|
|
297
|
+
* ```
|
|
298
|
+
*/
|
|
182
299
|
withState<T>(callback: (state: StateT) => Promise<T>): Promise<T>;
|
|
300
|
+
/**
|
|
301
|
+
* Retrieves a snapshot of the current state.
|
|
302
|
+
*
|
|
303
|
+
* @remarks
|
|
304
|
+
* Returns a point-in-time copy. For modifications, use {@link BaseAgent.withState}.
|
|
305
|
+
*/
|
|
183
306
|
getState(): Promise<StateT>;
|
|
307
|
+
/**
|
|
308
|
+
* Deletes all persisted state for this agent.
|
|
309
|
+
*/
|
|
184
310
|
clearState(): Promise<void>;
|
|
311
|
+
/** @internal */
|
|
185
312
|
private static isRpcRequest;
|
|
313
|
+
/** @internal */
|
|
186
314
|
handleMessage(envelope: FameEnvelope, _context?: FameDeliveryContext): Promise<FameMessageResponse | AsyncIterable<FameMessageResponse> | null | void>;
|
|
315
|
+
/**
|
|
316
|
+
* Override to handle non-RPC messages.
|
|
317
|
+
*
|
|
318
|
+
* Called when the agent receives a message that is not a JSON-RPC request.
|
|
319
|
+
* The default implementation logs a warning and returns null.
|
|
320
|
+
*
|
|
321
|
+
* @param message - The decoded message payload.
|
|
322
|
+
* @returns Optional response to send back.
|
|
323
|
+
*/
|
|
187
324
|
onMessage(message: unknown): Promise<FameMessageResponse | null | void>;
|
|
325
|
+
/** @internal */
|
|
188
326
|
private handleRpcMessage;
|
|
327
|
+
/** @internal */
|
|
189
328
|
private startSubscriptionTask;
|
|
329
|
+
/** @internal */
|
|
190
330
|
private streamSendSubscribe;
|
|
191
331
|
authenticate(_credentials: unknown): boolean;
|
|
192
332
|
registerPushEndpoint(_config: TaskPushNotificationConfig): Promise<TaskPushNotificationConfig>;
|
|
@@ -196,7 +336,38 @@ export declare class BaseAgent<StateT extends BaseAgentState = BaseAgentState> e
|
|
|
196
336
|
cancelTask(_params: TaskIdParams): Promise<Task>;
|
|
197
337
|
getAgentCard(): Promise<AgentCard>;
|
|
198
338
|
getTaskStatus(_params: TaskQueryParams): Promise<Task>;
|
|
339
|
+
/**
|
|
340
|
+
* Override to implement task execution logic.
|
|
341
|
+
*
|
|
342
|
+
* This is the primary extension point for agent behavior. Return the task result
|
|
343
|
+
* or throw an error to fail the task.
|
|
344
|
+
*
|
|
345
|
+
* @param _payload - The task payload.
|
|
346
|
+
* @param _id - Optional task identifier.
|
|
347
|
+
* @returns The task result.
|
|
348
|
+
* @throws UnsupportedOperationException if not overridden.
|
|
349
|
+
*
|
|
350
|
+
* @example
|
|
351
|
+
* ```typescript
|
|
352
|
+
* async runTask(payload: Payload): Promise<string> {
|
|
353
|
+
* const input = typeof payload === 'string' ? payload : '';
|
|
354
|
+
* return `Hello, ${input}!`;
|
|
355
|
+
* }
|
|
356
|
+
* ```
|
|
357
|
+
*/
|
|
199
358
|
runTask(_payload: Payload, _id: string | null): Promise<unknown>;
|
|
359
|
+
/**
|
|
360
|
+
* Initiates a task and returns its status.
|
|
361
|
+
*
|
|
362
|
+
* @remarks
|
|
363
|
+
* If you override {@link BaseAgent.runTask}, this method automatically
|
|
364
|
+
* creates a Task from the result. Override this method for custom
|
|
365
|
+
* task lifecycle management.
|
|
366
|
+
*
|
|
367
|
+
* @param params - Task parameters including message and metadata.
|
|
368
|
+
* @returns The completed task with result.
|
|
369
|
+
* @throws Error if neither startTask nor runTask is implemented.
|
|
370
|
+
*/
|
|
200
371
|
startTask(params: TaskSendParams): Promise<Task>;
|
|
201
372
|
aserve(address: FameAddress | string, options?: Parameters<Agent['aserve']>[1]): Promise<void>;
|
|
202
373
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-agent.d.ts","sourceRoot":"","sources":["../../../../src/naylence/agent/base-agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACzB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAEL,WAAW,EACX,UAAU,EAIV,QAAQ,EACR,YAAY,EAEZ,KAAK,eAAe,EACrB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACL,KAAK,EAEL,KAAK,OAAO,EAEb,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,KAAK,SAAS,EACd,IAAI,EACJ,KAAK,uBAAuB,EAC5B,YAAY,EACZ,0BAA0B,EAC1B,eAAe,EACf,cAAc,EAEd,qBAAqB,EAEtB,MAAM,gBAAgB,CAAC;AACxB,OA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AAO,GAAG,OAAO;IAKtC,oBAAoB,CACxB,OAAO,EAAE,0BAA0B,GAClC,OAAO,CAAC,0BAA0B,CAAC;IAKhC,yBAAyB,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,0BAA0B,CAAC;IAKpF,sBAAsB,CAC3B,MAAM,EAAE,cAAc,GACrB,aAAa,CAAC,qBAAqB,GAAG,uBAAuB,CAAC;IA4B3D,eAAe,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC;IAOxD,UAAU,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAKhD,YAAY,IAAI,OAAO,CAAC,SAAS,CAAC;IAMlC,aAAa,CAAC,OAAO,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAO5D;;;;;;;;;;;;;;;;;;OAkBG;IACG,OAAO,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC;IAQtE;;;;;;;;;;;OAWG;IACG,SAAS,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAkDhD,MAAM,CACV,OAAO,EAAE,WAAW,GAAG,MAAM,EAC7B,OAAO,GAAE,UAAU,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAM,GAC3C,OAAO,CAAC,IAAI,CAAC;CAMjB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Public API entrypoint for documentation generation.
|
|
3
|
+
*
|
|
4
|
+
* This file exports only the curated public surface of the Naylence Agent SDK.
|
|
5
|
+
* It is used by TypeDoc to generate API reference documentation.
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
export * from './naylence/agent/a2a-types.js';
|
|
10
|
+
export * from './naylence/agent/agent.js';
|
|
11
|
+
export * from './naylence/agent/base-agent.js';
|
|
12
|
+
export * from './naylence/agent/background-task-agent.js';
|
|
13
|
+
export { AgentProxy } from './naylence/agent/agent-proxy.js';
|
|
14
|
+
export * from './naylence/agent/errors.js';
|
|
15
|
+
export * from './naylence/agent/configs.js';
|
|
16
|
+
//# sourceMappingURL=public-api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"public-api.d.ts","sourceRoot":"","sources":["../../src/public-api.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,cAAc,+BAA+B,CAAC;AAC9C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,gCAAgC,CAAC;AAC/C,cAAc,2CAA2C,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,cAAc,4BAA4B,CAAC;AAC3C,cAAc,6BAA6B,CAAC"}
|
package/dist/types/version.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@naylence/agent-sdk",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.13",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Naylence Agent SDK for TypeScript",
|
|
6
6
|
"author": "Naylence Dev <naylencedev@gmail.com>",
|
|
@@ -71,13 +71,16 @@
|
|
|
71
71
|
"lint:fix": "eslint src/**/*.ts --fix",
|
|
72
72
|
"format": "prettier --write \"src/**/*.ts\"",
|
|
73
73
|
"dev": "tsc --watch --outDir dist/esm",
|
|
74
|
+
"docs:clean": "rimraf docs/reference/ts/_generated",
|
|
75
|
+
"docs:gen": "typedoc",
|
|
76
|
+
"docs": "npm run docs:clean && npm run docs:gen",
|
|
74
77
|
"inject-version": "node ./scripts/inject-version.js",
|
|
75
78
|
"prebuild": "npm run inject-version",
|
|
76
79
|
"predev": "npm run inject-version",
|
|
77
80
|
"prepublishOnly": "npm run build && npm test"
|
|
78
81
|
},
|
|
79
82
|
"dependencies": {
|
|
80
|
-
"@naylence/runtime": "^0.3.
|
|
83
|
+
"@naylence/runtime": "^0.3.16",
|
|
81
84
|
"zod": "^4.1.11"
|
|
82
85
|
},
|
|
83
86
|
"peerDependencies": {
|
|
@@ -107,6 +110,8 @@
|
|
|
107
110
|
"ts-jest": "^29.4.4",
|
|
108
111
|
"tslib": "^2.6.2",
|
|
109
112
|
"tsx": "^4.20.6",
|
|
113
|
+
"typedoc": "^0.28.15",
|
|
114
|
+
"typedoc-plugin-markdown": "^4.9.0",
|
|
110
115
|
"typescript": "^5.3.2"
|
|
111
116
|
},
|
|
112
117
|
"engines": {
|