@toolpack-sdk/agents 2.0.0-alpha.1
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 +827 -0
- package/dist/base-agent-CjrUlo6Y.d.cts +189 -0
- package/dist/base-agent-Cx2kWzLF.d.ts +189 -0
- package/dist/capabilities/index.cjs +17 -0
- package/dist/capabilities/index.d.cts +74 -0
- package/dist/capabilities/index.d.ts +74 -0
- package/dist/capabilities/index.js +17 -0
- package/dist/channels/index.cjs +3 -0
- package/dist/channels/index.d.cts +616 -0
- package/dist/channels/index.d.ts +616 -0
- package/dist/channels/index.js +3 -0
- package/dist/index.cjs +20 -0
- package/dist/index.d.cts +334 -0
- package/dist/index.d.ts +334 -0
- package/dist/index.js +20 -0
- package/dist/intent-classifier-agent-BLXXcbNJ.d.cts +45 -0
- package/dist/intent-classifier-agent-BLpDwKVf.d.ts +45 -0
- package/dist/interceptors/index.cjs +1 -0
- package/dist/interceptors/index.d.cts +539 -0
- package/dist/interceptors/index.d.ts +539 -0
- package/dist/interceptors/index.js +1 -0
- package/dist/registry/index.cjs +1 -0
- package/dist/registry/index.d.cts +159 -0
- package/dist/registry/index.d.ts +159 -0
- package/dist/registry/index.js +1 -0
- package/dist/testing/index.cjs +3 -0
- package/dist/testing/index.d.cts +389 -0
- package/dist/testing/index.d.ts +389 -0
- package/dist/testing/index.js +3 -0
- package/dist/types-BWoRx1ZE.d.cts +395 -0
- package/dist/types-BWoRx1ZE.d.ts +395 -0
- package/package.json +121 -0
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
import { Participant, ModeConfig, Toolpack } from 'toolpack-sdk';
|
|
2
|
+
import { EventEmitter } from 'events';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Sentinel value indicating the interceptor chain should end silently.
|
|
6
|
+
* When returned by an interceptor, the registry must not call `channel.send`.
|
|
7
|
+
*/
|
|
8
|
+
declare const SKIP_SENTINEL: unique symbol;
|
|
9
|
+
/**
|
|
10
|
+
* Result from an interceptor or the chain.
|
|
11
|
+
* - `AgentResult`: Normal result, send to channel
|
|
12
|
+
* - `SkipSentinel`: Silent skip, do not send
|
|
13
|
+
*/
|
|
14
|
+
type InterceptorResult = AgentResult | typeof SKIP_SENTINEL;
|
|
15
|
+
/**
|
|
16
|
+
* Check if a result is the skip sentinel.
|
|
17
|
+
*/
|
|
18
|
+
declare function isSkipSentinel(result: InterceptorResult): result is typeof SKIP_SENTINEL;
|
|
19
|
+
/**
|
|
20
|
+
* Helper function to create a skip sentinel result.
|
|
21
|
+
* Use this in interceptors to signal "do not reply".
|
|
22
|
+
*/
|
|
23
|
+
declare function skip(): typeof SKIP_SENTINEL;
|
|
24
|
+
/**
|
|
25
|
+
* Context available to each interceptor during chain execution.
|
|
26
|
+
*/
|
|
27
|
+
interface InterceptorContext {
|
|
28
|
+
/** The agent instance the chain wraps */
|
|
29
|
+
agent: AgentInstance;
|
|
30
|
+
/** The channel that triggered this invocation */
|
|
31
|
+
channel: ChannelInterface;
|
|
32
|
+
/** The registry for agent lookup and delegation. Null in standalone (single-agent) mode. */
|
|
33
|
+
registry: IAgentRegistry | null;
|
|
34
|
+
/** Current invocation depth (0 = top-level) */
|
|
35
|
+
invocationDepth: number;
|
|
36
|
+
/**
|
|
37
|
+
* Delegate to another agent synchronously (depth-aware).
|
|
38
|
+
* Increments invocation depth. Rejects if past depth cap.
|
|
39
|
+
*/
|
|
40
|
+
delegateAndWait(agentName: string, input: Partial<AgentInput>): Promise<AgentResult>;
|
|
41
|
+
/**
|
|
42
|
+
* Signal that the chain should end silently.
|
|
43
|
+
* Returns the skip sentinel - use `return ctx.skip()` to short-circuit.
|
|
44
|
+
*/
|
|
45
|
+
skip: () => typeof SKIP_SENTINEL;
|
|
46
|
+
/** Optional structured logger (wired by registry) */
|
|
47
|
+
logger?: {
|
|
48
|
+
debug: (message: string, meta?: Record<string, unknown>) => void;
|
|
49
|
+
info: (message: string, meta?: Record<string, unknown>) => void;
|
|
50
|
+
warn: (message: string, meta?: Record<string, unknown>) => void;
|
|
51
|
+
error: (message: string, meta?: Record<string, unknown>) => void;
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Next function in the interceptor chain.
|
|
56
|
+
* Call this to continue to the next interceptor or the final agent invocation.
|
|
57
|
+
*
|
|
58
|
+
* Optionally pass a modified input to downstream interceptors/agents.
|
|
59
|
+
* If no input is provided, the original input is used.
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* ```ts
|
|
63
|
+
* // Pass modified input downstream
|
|
64
|
+
* const modifiedInput = { ...input, context: { ...input.context, annotated: true } };
|
|
65
|
+
* return await next(modifiedInput);
|
|
66
|
+
*
|
|
67
|
+
* // Or pass original input unchanged
|
|
68
|
+
* return await next();
|
|
69
|
+
* ```
|
|
70
|
+
*/
|
|
71
|
+
type NextFunction = (input?: AgentInput) => Promise<InterceptorResult>;
|
|
72
|
+
/**
|
|
73
|
+
* Interceptor function signature.
|
|
74
|
+
* Middleware-style pattern: inspect/transform input, optionally continue.
|
|
75
|
+
*
|
|
76
|
+
* @param input The incoming agent input
|
|
77
|
+
* @param ctx Context with agent, channel, registry, helpers
|
|
78
|
+
* @param next Continue to next interceptor/agent
|
|
79
|
+
* @returns Result (or skip sentinel to end silently)
|
|
80
|
+
*
|
|
81
|
+
* @example
|
|
82
|
+
* ```ts
|
|
83
|
+
* const myInterceptor: Interceptor = async (input, ctx, next) => {
|
|
84
|
+
* // Pre-processing
|
|
85
|
+
* if (shouldIgnore(input)) {
|
|
86
|
+
* return ctx.skip(); // Short-circuit silently
|
|
87
|
+
* }
|
|
88
|
+
*
|
|
89
|
+
* // Continue chain
|
|
90
|
+
* const result = await next();
|
|
91
|
+
*
|
|
92
|
+
* // Post-processing (optional)
|
|
93
|
+
* if (!isSkipSentinel(result)) {
|
|
94
|
+
* result.metadata = { ...result.metadata, intercepted: true };
|
|
95
|
+
* }
|
|
96
|
+
*
|
|
97
|
+
* return result;
|
|
98
|
+
* };
|
|
99
|
+
* ```
|
|
100
|
+
*/
|
|
101
|
+
type Interceptor = (input: AgentInput, ctx: InterceptorContext, next: NextFunction) => Promise<InterceptorResult>;
|
|
102
|
+
/**
|
|
103
|
+
* Configuration for the interceptor chain.
|
|
104
|
+
*/
|
|
105
|
+
interface InterceptorChainConfig {
|
|
106
|
+
/** Maximum invocation depth for delegation (default: 5) */
|
|
107
|
+
maxInvocationDepth?: number;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Options for constructing a BaseAgent.
|
|
112
|
+
*
|
|
113
|
+
* - `{ apiKey, provider?, model? }` — agent creates and owns its own Toolpack instance.
|
|
114
|
+
* The instance is initialised lazily in `start()`.
|
|
115
|
+
* - `{ toolpack }` — agent uses a shared Toolpack instance (e.g. passed from AgentRegistry
|
|
116
|
+
* for multi-agent setups where API client and config are shared).
|
|
117
|
+
*/
|
|
118
|
+
type BaseAgentOptions = {
|
|
119
|
+
apiKey: string;
|
|
120
|
+
provider?: string;
|
|
121
|
+
model?: string;
|
|
122
|
+
} | {
|
|
123
|
+
toolpack: Toolpack;
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* Input structure for agent invocation.
|
|
127
|
+
* Channels normalize external events into this format.
|
|
128
|
+
*/
|
|
129
|
+
interface AgentInput<TIntent extends string = string> {
|
|
130
|
+
/** Typed intent for routing decisions - compile-time safe when using generics */
|
|
131
|
+
intent?: TIntent;
|
|
132
|
+
/** Natural language message from the user */
|
|
133
|
+
message?: string;
|
|
134
|
+
/** Structured payload from the channel */
|
|
135
|
+
data?: unknown;
|
|
136
|
+
/** Additional context for the agent */
|
|
137
|
+
context?: Record<string, unknown>;
|
|
138
|
+
/** Channel-agnostic thread/session identifier for conversation continuity */
|
|
139
|
+
conversationId?: string;
|
|
140
|
+
/**
|
|
141
|
+
* The participant who produced this message, as populated by the channel
|
|
142
|
+
* during `normalize()` or resolved later via `channel.resolveParticipant`.
|
|
143
|
+
* Interceptors such as `participant-resolver` read and/or enrich this.
|
|
144
|
+
*/
|
|
145
|
+
participant?: Participant;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Represents a step in a workflow execution.
|
|
149
|
+
* This is a simplified interface that captures essential step information.
|
|
150
|
+
*/
|
|
151
|
+
interface WorkflowStep {
|
|
152
|
+
/** Step number (1-indexed) */
|
|
153
|
+
number: number;
|
|
154
|
+
/** Human-readable description of the step */
|
|
155
|
+
description: string;
|
|
156
|
+
/** Step execution status */
|
|
157
|
+
status: 'pending' | 'in_progress' | 'completed' | 'failed' | 'skipped';
|
|
158
|
+
/** Result after completion (if available) */
|
|
159
|
+
result?: {
|
|
160
|
+
success: boolean;
|
|
161
|
+
output?: string;
|
|
162
|
+
error?: string;
|
|
163
|
+
toolsUsed?: string[];
|
|
164
|
+
duration?: number;
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* Result structure returned by agents.
|
|
169
|
+
*/
|
|
170
|
+
interface AgentResult {
|
|
171
|
+
/** The agent's response/output */
|
|
172
|
+
output: string;
|
|
173
|
+
/** Workflow steps taken during execution (populated by run()) */
|
|
174
|
+
steps?: WorkflowStep[];
|
|
175
|
+
/** Optional metadata for routing decisions or post-processing */
|
|
176
|
+
metadata?: Record<string, unknown>;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Output structure sent to channels.
|
|
180
|
+
*/
|
|
181
|
+
interface AgentOutput {
|
|
182
|
+
output: string;
|
|
183
|
+
metadata?: Record<string, unknown>;
|
|
184
|
+
}
|
|
185
|
+
/**
|
|
186
|
+
* Options for a single agent run.
|
|
187
|
+
*/
|
|
188
|
+
interface AgentRunOptions {
|
|
189
|
+
/** One-off workflow override for this specific run */
|
|
190
|
+
workflow?: Record<string, unknown>;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* Agent instance interface - shape of a BaseAgent instance.
|
|
194
|
+
* This represents the public API surface of any agent.
|
|
195
|
+
*/
|
|
196
|
+
interface AgentInstance<TIntent extends string = string> extends EventEmitter {
|
|
197
|
+
/** Unique name of the agent */
|
|
198
|
+
name: string;
|
|
199
|
+
/** Human-readable description of the agent's purpose */
|
|
200
|
+
description: string;
|
|
201
|
+
/** LLM mode used by this agent (full ModeConfig or a registered mode name) */
|
|
202
|
+
mode: ModeConfig | string;
|
|
203
|
+
/** Channels this agent listens on and sends responses to */
|
|
204
|
+
channels: ChannelInterface[];
|
|
205
|
+
/** Interceptors applied to every inbound message before invokeAgent is called */
|
|
206
|
+
interceptors: Interceptor[];
|
|
207
|
+
/**
|
|
208
|
+
* Main entry point for agent execution.
|
|
209
|
+
* @param input The input containing message, intent, context, etc.
|
|
210
|
+
* @returns The agent's result including output and metadata
|
|
211
|
+
*/
|
|
212
|
+
invokeAgent(input: AgentInput<TIntent>): Promise<AgentResult>;
|
|
213
|
+
/**
|
|
214
|
+
* Start the agent: initialise Toolpack (if not provided), bind message handlers
|
|
215
|
+
* to all configured channels, and begin listening.
|
|
216
|
+
*/
|
|
217
|
+
start(): Promise<void>;
|
|
218
|
+
/** Stop all channels and release owned resources. */
|
|
219
|
+
stop(): Promise<void>;
|
|
220
|
+
/**
|
|
221
|
+
* Ensure the internal Toolpack instance is ready.
|
|
222
|
+
* Called by AgentRegistry before start() so the toolpack is available
|
|
223
|
+
* when _registry is set.
|
|
224
|
+
*/
|
|
225
|
+
_ensureToolpack(): Promise<void>;
|
|
226
|
+
/** Internal reference to the agent registry (set before start() by AgentRegistry) */
|
|
227
|
+
_registry?: IAgentRegistry;
|
|
228
|
+
/** Name of the channel that triggered this agent */
|
|
229
|
+
_triggeringChannel?: string;
|
|
230
|
+
/** Conversation ID for maintaining context across interactions */
|
|
231
|
+
_conversationId?: string;
|
|
232
|
+
/** Whether the triggering channel is a trigger channel (no human recipient) */
|
|
233
|
+
_isTriggerChannel?: boolean;
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* Channel interface for connecting agents to external systems.
|
|
237
|
+
* Channels normalize incoming messages to AgentInput and send AgentOutput back.
|
|
238
|
+
*/
|
|
239
|
+
interface ChannelInterface {
|
|
240
|
+
/** Optional channel name for identification */
|
|
241
|
+
name?: string;
|
|
242
|
+
/**
|
|
243
|
+
* Whether this is a trigger channel (no human recipient).
|
|
244
|
+
* Trigger channels cannot use ask() - they must be fire-and-forget.
|
|
245
|
+
*/
|
|
246
|
+
isTriggerChannel: boolean;
|
|
247
|
+
/**
|
|
248
|
+
* Start listening for incoming messages.
|
|
249
|
+
* Called by AgentRegistry when the system starts.
|
|
250
|
+
*/
|
|
251
|
+
listen(): void;
|
|
252
|
+
/**
|
|
253
|
+
* Send output back to the external system.
|
|
254
|
+
* @param output The output to send
|
|
255
|
+
*/
|
|
256
|
+
send(output: AgentOutput): Promise<void>;
|
|
257
|
+
/**
|
|
258
|
+
* Normalize raw incoming data to AgentInput format.
|
|
259
|
+
* @param incoming Raw data from the external system
|
|
260
|
+
* @returns Normalized AgentInput
|
|
261
|
+
*/
|
|
262
|
+
normalize(incoming: unknown): AgentInput;
|
|
263
|
+
/**
|
|
264
|
+
* Register a handler for incoming messages.
|
|
265
|
+
* @param handler Function to process incoming AgentInput
|
|
266
|
+
*/
|
|
267
|
+
onMessage(handler: (input: AgentInput) => Promise<void>): void;
|
|
268
|
+
/**
|
|
269
|
+
* Optional hook to resolve richer `Participant` details (e.g. display name)
|
|
270
|
+
* for a normalized input.
|
|
271
|
+
*
|
|
272
|
+
* Design:
|
|
273
|
+
* - **Lazy.** Called at render/interceptor time, not during `normalize()`,
|
|
274
|
+
* so capture stays cheap.
|
|
275
|
+
* - **Cacheable.** Implementations should cache per-process and invalidate
|
|
276
|
+
* on explicit platform signals (e.g. Slack `user_change`).
|
|
277
|
+
* - **Fallback-safe.** If resolution fails, return `undefined` so the
|
|
278
|
+
* pipeline can fall back to the id. Must never throw on miss.
|
|
279
|
+
*
|
|
280
|
+
* The returned participant is merged into `input.participant` by the
|
|
281
|
+
* `participant-resolver` interceptor. If the channel cannot resolve
|
|
282
|
+
* anything, it should return `undefined`.
|
|
283
|
+
*/
|
|
284
|
+
resolveParticipant?(input: AgentInput): Promise<Participant | undefined> | Participant | undefined;
|
|
285
|
+
}
|
|
286
|
+
/**
|
|
287
|
+
* Represents a pending human-in-the-loop question.
|
|
288
|
+
* Stored in-memory in PendingAsksStore (inside AgentRegistry).
|
|
289
|
+
*/
|
|
290
|
+
interface PendingAsk {
|
|
291
|
+
/** Unique identifier for this ask */
|
|
292
|
+
id: string;
|
|
293
|
+
/** Ties ask to the conversation thread */
|
|
294
|
+
conversationId: string;
|
|
295
|
+
/** Agent that created this ask */
|
|
296
|
+
agentName: string;
|
|
297
|
+
/** The question sent to the human */
|
|
298
|
+
question: string;
|
|
299
|
+
/** Developer-stored state needed to continue */
|
|
300
|
+
context: Record<string, unknown>;
|
|
301
|
+
/** Current status of the ask */
|
|
302
|
+
status: 'pending' | 'answered' | 'expired';
|
|
303
|
+
/** The human's answer (if status is 'answered') */
|
|
304
|
+
answer?: string;
|
|
305
|
+
/** Number of times this ask has been retried */
|
|
306
|
+
retries: number;
|
|
307
|
+
/** Maximum retry attempts before giving up */
|
|
308
|
+
maxRetries: number;
|
|
309
|
+
/** When the ask was created */
|
|
310
|
+
askedAt: Date;
|
|
311
|
+
/** Optional expiration time */
|
|
312
|
+
expiresAt?: Date;
|
|
313
|
+
/** Channel name to send follow-up questions to (required for auto-send) */
|
|
314
|
+
channelName: string;
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* Interface for the AgentRegistry.
|
|
318
|
+
* Manages agent instances, channels, pending asks, and agent-to-agent communication.
|
|
319
|
+
*/
|
|
320
|
+
interface IAgentRegistry {
|
|
321
|
+
/**
|
|
322
|
+
* Start all registered agents and their channels.
|
|
323
|
+
* Each agent initialises its own Toolpack instance (or uses the shared one it was
|
|
324
|
+
* constructed with) before channels begin listening.
|
|
325
|
+
*/
|
|
326
|
+
start(): Promise<void>;
|
|
327
|
+
/**
|
|
328
|
+
* Send output to a specific channel by name.
|
|
329
|
+
* @param channelName The name of the channel to send to
|
|
330
|
+
* @param output The output to send
|
|
331
|
+
*/
|
|
332
|
+
sendTo(channelName: string, output: AgentOutput): Promise<void>;
|
|
333
|
+
/**
|
|
334
|
+
* Get an agent instance by name.
|
|
335
|
+
* @param name The agent name
|
|
336
|
+
* @returns The agent instance or undefined if not found
|
|
337
|
+
*/
|
|
338
|
+
getAgent(name: string): AgentInstance | undefined;
|
|
339
|
+
/**
|
|
340
|
+
* Get all registered agent instances.
|
|
341
|
+
* @returns Array of all agent instances
|
|
342
|
+
*/
|
|
343
|
+
getAllAgents(): AgentInstance[];
|
|
344
|
+
/**
|
|
345
|
+
* Get a registered channel by name.
|
|
346
|
+
* @param name The channel name
|
|
347
|
+
* @returns The channel interface or undefined if not found
|
|
348
|
+
*/
|
|
349
|
+
getChannel(name: string): ChannelInterface | undefined;
|
|
350
|
+
/**
|
|
351
|
+
* Invoke an agent by name through the transport layer.
|
|
352
|
+
* Used internally by delegate() and delegateAndWait() on BaseAgent.
|
|
353
|
+
* @param agentName The target agent's name
|
|
354
|
+
* @param input The invocation input
|
|
355
|
+
* @returns The agent's result
|
|
356
|
+
*/
|
|
357
|
+
invoke(agentName: string, input: AgentInput): Promise<AgentResult>;
|
|
358
|
+
/**
|
|
359
|
+
* Get a pending ask for a conversation.
|
|
360
|
+
* @param conversationId The conversation ID
|
|
361
|
+
* @returns The pending ask or undefined
|
|
362
|
+
*/
|
|
363
|
+
getPendingAsk(conversationId: string): PendingAsk | undefined;
|
|
364
|
+
/**
|
|
365
|
+
* Add a new pending ask to the store.
|
|
366
|
+
* @param ask The ask data (without auto-generated fields)
|
|
367
|
+
* @returns The created PendingAsk with generated fields
|
|
368
|
+
*/
|
|
369
|
+
addPendingAsk(ask: Omit<PendingAsk, 'id' | 'askedAt' | 'retries' | 'status'>): PendingAsk;
|
|
370
|
+
/**
|
|
371
|
+
* Resolve a pending ask with an answer.
|
|
372
|
+
* @param id The ask ID
|
|
373
|
+
* @param answer The human's answer
|
|
374
|
+
*/
|
|
375
|
+
resolvePendingAsk(id: string, answer: string): Promise<void>;
|
|
376
|
+
/**
|
|
377
|
+
* Check if a conversation has pending asks.
|
|
378
|
+
* @param conversationId The conversation ID
|
|
379
|
+
* @returns True if there are pending asks
|
|
380
|
+
*/
|
|
381
|
+
hasPendingAsks(conversationId: string): boolean;
|
|
382
|
+
/**
|
|
383
|
+
* Increment the retry count for a pending ask.
|
|
384
|
+
* @param id The ask ID
|
|
385
|
+
* @returns The new retry count or undefined if ask not found
|
|
386
|
+
*/
|
|
387
|
+
incrementRetries(id: string): number | undefined;
|
|
388
|
+
/**
|
|
389
|
+
* Clean up expired pending asks.
|
|
390
|
+
* @returns Number of asks cleaned up
|
|
391
|
+
*/
|
|
392
|
+
cleanupExpiredAsks(): number;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
export { type AgentInput as A, type BaseAgentOptions as B, type ChannelInterface as C, type Interceptor as I, type NextFunction as N, type PendingAsk as P, SKIP_SENTINEL as S, type WorkflowStep as W, type AgentResult as a, type IAgentRegistry as b, type AgentRunOptions as c, type AgentOutput as d, type AgentInstance as e, type InterceptorChainConfig as f, type InterceptorContext as g, type InterceptorResult as h, isSkipSentinel as i, skip as s };
|
package/package.json
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@toolpack-sdk/agents",
|
|
3
|
+
"version": "2.0.0-alpha.1",
|
|
4
|
+
"description": "Agent layer for the Toolpack SDK - build, compose, and deploy AI agents with a consistent, extensible pattern",
|
|
5
|
+
"engines": {
|
|
6
|
+
"node": ">=20"
|
|
7
|
+
},
|
|
8
|
+
"type": "module",
|
|
9
|
+
"main": "dist/index.cjs",
|
|
10
|
+
"module": "dist/index.js",
|
|
11
|
+
"exports": {
|
|
12
|
+
".": {
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"import": "./dist/index.js",
|
|
15
|
+
"require": "./dist/index.cjs"
|
|
16
|
+
},
|
|
17
|
+
"./channels": {
|
|
18
|
+
"types": "./dist/channels/index.d.ts",
|
|
19
|
+
"import": "./dist/channels/index.js",
|
|
20
|
+
"require": "./dist/channels/index.cjs"
|
|
21
|
+
},
|
|
22
|
+
"./testing": {
|
|
23
|
+
"types": "./dist/testing/index.d.ts",
|
|
24
|
+
"import": "./dist/testing/index.js",
|
|
25
|
+
"require": "./dist/testing/index.cjs"
|
|
26
|
+
},
|
|
27
|
+
"./registry": {
|
|
28
|
+
"types": "./dist/registry/index.d.ts",
|
|
29
|
+
"import": "./dist/registry/index.js",
|
|
30
|
+
"require": "./dist/registry/index.cjs"
|
|
31
|
+
},
|
|
32
|
+
"./capabilities": {
|
|
33
|
+
"types": "./dist/capabilities/index.d.ts",
|
|
34
|
+
"import": "./dist/capabilities/index.js",
|
|
35
|
+
"require": "./dist/capabilities/index.cjs"
|
|
36
|
+
},
|
|
37
|
+
"./interceptors": {
|
|
38
|
+
"types": "./dist/interceptors/index.d.ts",
|
|
39
|
+
"import": "./dist/interceptors/index.js",
|
|
40
|
+
"require": "./dist/interceptors/index.cjs"
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"types": "dist/index.d.ts",
|
|
44
|
+
"files": [
|
|
45
|
+
"dist",
|
|
46
|
+
"README.md"
|
|
47
|
+
],
|
|
48
|
+
"publishConfig": {
|
|
49
|
+
"tag": "alpha",
|
|
50
|
+
"access": "public"
|
|
51
|
+
},
|
|
52
|
+
"scripts": {
|
|
53
|
+
"build": "tsup",
|
|
54
|
+
"build:dev": "tsup",
|
|
55
|
+
"test": "vitest run",
|
|
56
|
+
"test:watch": "vitest",
|
|
57
|
+
"watch": "tsup --watch",
|
|
58
|
+
"lint": "eslint src/**",
|
|
59
|
+
"publish:npm": "npm run build && npm run test && npm publish"
|
|
60
|
+
},
|
|
61
|
+
"keywords": [
|
|
62
|
+
"ai",
|
|
63
|
+
"llm",
|
|
64
|
+
"agent",
|
|
65
|
+
"ai-agent",
|
|
66
|
+
"slack",
|
|
67
|
+
"telegram",
|
|
68
|
+
"webhook",
|
|
69
|
+
"cron",
|
|
70
|
+
"scheduler",
|
|
71
|
+
"typescript",
|
|
72
|
+
"sdk",
|
|
73
|
+
"toolpack"
|
|
74
|
+
],
|
|
75
|
+
"author": "Sajeer (https://sajeerzeji.com)",
|
|
76
|
+
"license": "Apache-2.0",
|
|
77
|
+
"repository": {
|
|
78
|
+
"type": "git",
|
|
79
|
+
"url": "git+https://github.com/toolpack-ai/toolpack-sdk.git"
|
|
80
|
+
},
|
|
81
|
+
"homepage": "https://toolpacksdk.com",
|
|
82
|
+
"bugs": {
|
|
83
|
+
"url": "https://github.com/toolpack-ai/toolpack-sdk/issues"
|
|
84
|
+
},
|
|
85
|
+
"peerDependencies": {
|
|
86
|
+
"@toolpack-sdk/knowledge": "^2.0.0-alpha.1",
|
|
87
|
+
"better-sqlite3": "^11.x",
|
|
88
|
+
"discord.js": "^14.x",
|
|
89
|
+
"nodemailer": "^6.x",
|
|
90
|
+
"toolpack-sdk": "^2.0.0-alpha.1",
|
|
91
|
+
"twilio": "^5.x"
|
|
92
|
+
},
|
|
93
|
+
"peerDependenciesMeta": {
|
|
94
|
+
"@toolpack-sdk/knowledge": {
|
|
95
|
+
"optional": true
|
|
96
|
+
},
|
|
97
|
+
"better-sqlite3": {
|
|
98
|
+
"optional": true
|
|
99
|
+
},
|
|
100
|
+
"discord.js": {
|
|
101
|
+
"optional": true
|
|
102
|
+
},
|
|
103
|
+
"nodemailer": {
|
|
104
|
+
"optional": true
|
|
105
|
+
},
|
|
106
|
+
"twilio": {
|
|
107
|
+
"optional": true
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
"devDependencies": {
|
|
111
|
+
"@types/node": "^25.3.2",
|
|
112
|
+
"@types/nodemailer": "^6.4.23",
|
|
113
|
+
"discord.js": "^14.26.2",
|
|
114
|
+
"twilio": "^5.13.1",
|
|
115
|
+
"typescript": "^5.9.3",
|
|
116
|
+
"vitest": "^4.0.18"
|
|
117
|
+
},
|
|
118
|
+
"dependencies": {
|
|
119
|
+
"cron-parser": "^5.5.0"
|
|
120
|
+
}
|
|
121
|
+
}
|