@toolpack-sdk/agents 3.4.0 → 3.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +60 -7
- package/dist/{base-agent-BC0ipegO.d.ts → base-agent-5Dbq8iQi.d.ts} +11 -1
- package/dist/{base-agent-CxH_1lRG.d.cts → base-agent-YX0G2Ur3.d.cts} +11 -1
- package/dist/capabilities/index.cjs +22 -22
- package/dist/capabilities/index.d.cts +3 -3
- package/dist/capabilities/index.d.ts +3 -3
- package/dist/capabilities/index.js +22 -22
- package/dist/channels/index.d.cts +2 -2
- package/dist/channels/index.d.ts +2 -2
- package/dist/{eval-report-BANqvzJO.d.cts → eval-report-CqW2VrJ7.d.cts} +1 -1
- package/dist/{eval-report-D_1cxDHP.d.ts → eval-report-DO-9E5Kq.d.ts} +1 -1
- package/dist/{index-uq_VLU-x.d.ts → index-CaFts8va.d.ts} +1 -1
- package/dist/{index-B6QpyoLj.d.cts → index-DN3HGEJV.d.cts} +1 -1
- package/dist/index.cjs +28 -28
- package/dist/index.d.cts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +28 -28
- package/dist/{intent-classifier-agent-BugOILjt.d.cts → intent-classifier-agent-A4thJQ0z.d.cts} +2 -2
- package/dist/{intent-classifier-agent-aHbGLRct.d.ts → intent-classifier-agent-DXlxbZ_r.d.ts} +2 -2
- package/dist/interceptors/index.d.cts +4 -4
- package/dist/interceptors/index.d.ts +4 -4
- package/dist/testing/index.d.cts +3 -3
- package/dist/testing/index.d.ts +3 -3
- package/dist/{types-BZ4tAT_N.d.cts → types-C_2Rkpio.d.cts} +5 -1
- package/dist/{types-BZ4tAT_N.d.ts → types-C_2Rkpio.d.ts} +5 -1
- package/package.json +3 -3
package/dist/{intent-classifier-agent-BugOILjt.d.cts → intent-classifier-agent-A4thJQ0z.d.cts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BaseAgentOptions, A as AgentInput, a as AgentResult } from './types-
|
|
2
|
-
import { B as BaseAgent } from './base-agent-
|
|
1
|
+
import { B as BaseAgentOptions, A as AgentInput, a as AgentResult } from './types-C_2Rkpio.cjs';
|
|
2
|
+
import { B as BaseAgent } from './base-agent-YX0G2Ur3.cjs';
|
|
3
3
|
import { ModeConfig } from 'toolpack-sdk';
|
|
4
4
|
|
|
5
5
|
/**
|
package/dist/{intent-classifier-agent-aHbGLRct.d.ts → intent-classifier-agent-DXlxbZ_r.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { B as BaseAgentOptions, A as AgentInput, a as AgentResult } from './types-
|
|
2
|
-
import { B as BaseAgent } from './base-agent-
|
|
1
|
+
import { B as BaseAgentOptions, A as AgentInput, a as AgentResult } from './types-C_2Rkpio.js';
|
|
2
|
+
import { B as BaseAgent } from './base-agent-5Dbq8iQi.js';
|
|
3
3
|
import { ModeConfig } from 'toolpack-sdk';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { A as AgentInput, k as InterceptorResult, I as Interceptor, g as AgentInstance, C as ChannelInterface, d as IAgentRegistry, i as InterceptorChainConfig, a as AgentResult } from '../types-
|
|
2
|
-
export { j as InterceptorContext, N as NextFunction, S as SKIP_SENTINEL, l as isSkipSentinel, s as skip } from '../types-
|
|
1
|
+
import { A as AgentInput, k as InterceptorResult, I as Interceptor, g as AgentInstance, C as ChannelInterface, d as IAgentRegistry, i as InterceptorChainConfig, a as AgentResult } from '../types-C_2Rkpio.cjs';
|
|
2
|
+
export { j as InterceptorContext, N as NextFunction, S as SKIP_SENTINEL, l as isSkipSentinel, s as skip } from '../types-C_2Rkpio.cjs';
|
|
3
3
|
import { Participant, ConversationStore, ConversationScope, StoredMessage } from 'toolpack-sdk';
|
|
4
|
-
import { I as IntentClassification } from '../intent-classifier-agent-
|
|
4
|
+
import { I as IntentClassification } from '../intent-classifier-agent-A4thJQ0z.cjs';
|
|
5
5
|
import 'events';
|
|
6
|
-
import '../base-agent-
|
|
6
|
+
import '../base-agent-YX0G2Ur3.cjs';
|
|
7
7
|
import '@toolpack-sdk/knowledge';
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { A as AgentInput, k as InterceptorResult, I as Interceptor, g as AgentInstance, C as ChannelInterface, d as IAgentRegistry, i as InterceptorChainConfig, a as AgentResult } from '../types-
|
|
2
|
-
export { j as InterceptorContext, N as NextFunction, S as SKIP_SENTINEL, l as isSkipSentinel, s as skip } from '../types-
|
|
1
|
+
import { A as AgentInput, k as InterceptorResult, I as Interceptor, g as AgentInstance, C as ChannelInterface, d as IAgentRegistry, i as InterceptorChainConfig, a as AgentResult } from '../types-C_2Rkpio.js';
|
|
2
|
+
export { j as InterceptorContext, N as NextFunction, S as SKIP_SENTINEL, l as isSkipSentinel, s as skip } from '../types-C_2Rkpio.js';
|
|
3
3
|
import { Participant, ConversationStore, ConversationScope, StoredMessage } from 'toolpack-sdk';
|
|
4
|
-
import { I as IntentClassification } from '../intent-classifier-agent-
|
|
4
|
+
import { I as IntentClassification } from '../intent-classifier-agent-DXlxbZ_r.js';
|
|
5
5
|
import 'events';
|
|
6
|
-
import '../base-agent-
|
|
6
|
+
import '../base-agent-5Dbq8iQi.js';
|
|
7
7
|
import '@toolpack-sdk/knowledge';
|
|
8
8
|
|
|
9
9
|
/**
|
package/dist/testing/index.d.cts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as ChannelInterface, f as AgentOutput, A as AgentInput, B as BaseAgentOptions } from '../types-
|
|
1
|
+
import { C as ChannelInterface, f as AgentOutput, A as AgentInput, B as BaseAgentOptions } from '../types-C_2Rkpio.cjs';
|
|
2
2
|
import { Chunk, QueryOptions, QueryResult, Knowledge } from '@toolpack-sdk/knowledge';
|
|
3
3
|
import { Toolpack } from 'toolpack-sdk';
|
|
4
|
-
import { B as BaseAgent } from '../base-agent-
|
|
5
|
-
export { C as ContainsScorer, a as CustomScorer, E as EvalCase, b as EvalCaseResult, c as EvalDataset, d as EvalImprovement, e as EvalRegression, f as EvalReport, g as EvalRun, h as EvalRunner, i as EvalRunnerOptions, j as EvalScoredResult, k as EvalScoredRun, l as EvalScorer, m as EvalVerdict, n as ExactMatchScorer, L as LLMJudgeScorer, o as LLMJudgeScorerOptions, p as compareEvalRuns, q as formatEvalReport } from '../eval-report-
|
|
4
|
+
import { B as BaseAgent } from '../base-agent-YX0G2Ur3.cjs';
|
|
5
|
+
export { C as ContainsScorer, a as CustomScorer, E as EvalCase, b as EvalCaseResult, c as EvalDataset, d as EvalImprovement, e as EvalRegression, f as EvalReport, g as EvalRun, h as EvalRunner, i as EvalRunnerOptions, j as EvalScoredResult, k as EvalScoredRun, l as EvalScorer, m as EvalVerdict, n as ExactMatchScorer, L as LLMJudgeScorer, o as LLMJudgeScorerOptions, p as compareEvalRuns, q as formatEvalReport } from '../eval-report-CqW2VrJ7.cjs';
|
|
6
6
|
import 'events';
|
|
7
7
|
|
|
8
8
|
/**
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { C as ChannelInterface, f as AgentOutput, A as AgentInput, B as BaseAgentOptions } from '../types-
|
|
1
|
+
import { C as ChannelInterface, f as AgentOutput, A as AgentInput, B as BaseAgentOptions } from '../types-C_2Rkpio.js';
|
|
2
2
|
import { Chunk, QueryOptions, QueryResult, Knowledge } from '@toolpack-sdk/knowledge';
|
|
3
3
|
import { Toolpack } from 'toolpack-sdk';
|
|
4
|
-
import { B as BaseAgent } from '../base-agent-
|
|
5
|
-
export { C as ContainsScorer, a as CustomScorer, E as EvalCase, b as EvalCaseResult, c as EvalDataset, d as EvalImprovement, e as EvalRegression, f as EvalReport, g as EvalRun, h as EvalRunner, i as EvalRunnerOptions, j as EvalScoredResult, k as EvalScoredRun, l as EvalScorer, m as EvalVerdict, n as ExactMatchScorer, L as LLMJudgeScorer, o as LLMJudgeScorerOptions, p as compareEvalRuns, q as formatEvalReport } from '../eval-report-
|
|
4
|
+
import { B as BaseAgent } from '../base-agent-5Dbq8iQi.js';
|
|
5
|
+
export { C as ContainsScorer, a as CustomScorer, E as EvalCase, b as EvalCaseResult, c as EvalDataset, d as EvalImprovement, e as EvalRegression, f as EvalReport, g as EvalRun, h as EvalRunner, i as EvalRunnerOptions, j as EvalScoredResult, k as EvalScoredRun, l as EvalScorer, m as EvalVerdict, n as ExactMatchScorer, L as LLMJudgeScorer, o as LLMJudgeScorerOptions, p as compareEvalRuns, q as formatEvalReport } from '../eval-report-DO-9E5Kq.js';
|
|
6
6
|
import 'events';
|
|
7
7
|
|
|
8
8
|
/**
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as toolpack_sdk from 'toolpack-sdk';
|
|
1
2
|
import { ImagePart, FilePart, Participant, ModeConfig, ToolpackInitConfig, Toolpack } from 'toolpack-sdk';
|
|
2
3
|
import { EventEmitter } from 'events';
|
|
3
4
|
|
|
@@ -220,7 +221,7 @@ interface AgentInput<TIntent extends string = string> {
|
|
|
220
221
|
* Interceptors such as `participant-resolver` read and/or enrich this.
|
|
221
222
|
*/
|
|
222
223
|
participant?: Participant;
|
|
223
|
-
/** Optional abort signal
|
|
224
|
+
/** Optional abort signal: when aborted, the running LLM call stops at once and tools not yet started are not run. */
|
|
224
225
|
signal?: AbortSignal;
|
|
225
226
|
/** Called with each text delta as it is generated. When provided, the run uses streaming mode. */
|
|
226
227
|
onChunk?: (delta: string) => void;
|
|
@@ -257,6 +258,7 @@ interface AgentResult {
|
|
|
257
258
|
* Optional metadata for routing decisions or post-processing.
|
|
258
259
|
* `mindSaveError` is set by run() when the reply was produced but what the agent learned in
|
|
259
260
|
* the run could not be saved to its mind (the message of the failure).
|
|
261
|
+
* `aborted` is true when a streaming run was stopped by its signal: `output` is what had arrived.
|
|
260
262
|
*/
|
|
261
263
|
metadata?: Record<string, unknown>;
|
|
262
264
|
}
|
|
@@ -282,6 +284,8 @@ interface AgentRunOptions {
|
|
|
282
284
|
maxToolRounds?: number;
|
|
283
285
|
/** Hard cap on output tokens for this run. Maps directly to max_tokens on the provider request. */
|
|
284
286
|
maxTokens?: number;
|
|
287
|
+
/** Wraps every tool call of this run: it can stop a call or change its result. Passed to the request as `interceptTool`. */
|
|
288
|
+
interceptTool?: toolpack_sdk.ToolInterceptor;
|
|
285
289
|
/** Optional abort signal — propagated to the underlying AIClient stream/generate call. */
|
|
286
290
|
signal?: AbortSignal;
|
|
287
291
|
/** Called with each text delta as it is generated. When provided, the run uses streaming mode. */
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as toolpack_sdk from 'toolpack-sdk';
|
|
1
2
|
import { ImagePart, FilePart, Participant, ModeConfig, ToolpackInitConfig, Toolpack } from 'toolpack-sdk';
|
|
2
3
|
import { EventEmitter } from 'events';
|
|
3
4
|
|
|
@@ -220,7 +221,7 @@ interface AgentInput<TIntent extends string = string> {
|
|
|
220
221
|
* Interceptors such as `participant-resolver` read and/or enrich this.
|
|
221
222
|
*/
|
|
222
223
|
participant?: Participant;
|
|
223
|
-
/** Optional abort signal
|
|
224
|
+
/** Optional abort signal: when aborted, the running LLM call stops at once and tools not yet started are not run. */
|
|
224
225
|
signal?: AbortSignal;
|
|
225
226
|
/** Called with each text delta as it is generated. When provided, the run uses streaming mode. */
|
|
226
227
|
onChunk?: (delta: string) => void;
|
|
@@ -257,6 +258,7 @@ interface AgentResult {
|
|
|
257
258
|
* Optional metadata for routing decisions or post-processing.
|
|
258
259
|
* `mindSaveError` is set by run() when the reply was produced but what the agent learned in
|
|
259
260
|
* the run could not be saved to its mind (the message of the failure).
|
|
261
|
+
* `aborted` is true when a streaming run was stopped by its signal: `output` is what had arrived.
|
|
260
262
|
*/
|
|
261
263
|
metadata?: Record<string, unknown>;
|
|
262
264
|
}
|
|
@@ -282,6 +284,8 @@ interface AgentRunOptions {
|
|
|
282
284
|
maxToolRounds?: number;
|
|
283
285
|
/** Hard cap on output tokens for this run. Maps directly to max_tokens on the provider request. */
|
|
284
286
|
maxTokens?: number;
|
|
287
|
+
/** Wraps every tool call of this run: it can stop a call or change its result. Passed to the request as `interceptTool`. */
|
|
288
|
+
interceptTool?: toolpack_sdk.ToolInterceptor;
|
|
285
289
|
/** Optional abort signal — propagated to the underlying AIClient stream/generate call. */
|
|
286
290
|
signal?: AbortSignal;
|
|
287
291
|
/** Called with each text delta as it is generated. When provided, the run uses streaming mode. */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@toolpack-sdk/agents",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.0",
|
|
4
4
|
"description": "Production AI agents for Toolpack SDK — 8 channel integrations (Slack, Discord, Telegram, SMS, Email, Webhook, Scheduled, MCP), AgentMind persistent cognitive layer (goals, beliefs, reflections), interceptors, evals, and multi-agent coordination",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20"
|
|
@@ -89,11 +89,11 @@
|
|
|
89
89
|
},
|
|
90
90
|
"peerDependencies": {
|
|
91
91
|
"@opentelemetry/api": "^1.x",
|
|
92
|
-
"@toolpack-sdk/knowledge": "^3.
|
|
92
|
+
"@toolpack-sdk/knowledge": "^3.6.0",
|
|
93
93
|
"better-sqlite3": "^12.6.2",
|
|
94
94
|
"discord.js": "^14.x",
|
|
95
95
|
"nodemailer": "^6.x",
|
|
96
|
-
"toolpack-sdk": "^3.
|
|
96
|
+
"toolpack-sdk": "^3.6.0",
|
|
97
97
|
"twilio": "^5.x"
|
|
98
98
|
},
|
|
99
99
|
"peerDependenciesMeta": {
|