@agent-smith/task 0.3.0 → 0.3.2
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/dist/interfaces.d.ts +1 -0
- package/dist/task.js +7 -1
- package/package.json +6 -10
package/dist/interfaces.d.ts
CHANGED
|
@@ -42,6 +42,7 @@ interface TaskConf {
|
|
|
42
42
|
onToolsTurnEnd?: (tr: Array<ToolTurn>) => void;
|
|
43
43
|
onTurnEnd?: (ht: HistoryTurn) => void;
|
|
44
44
|
onAssistant?: (txt: string) => void;
|
|
45
|
+
onThink?: (txt: string) => void;
|
|
45
46
|
}
|
|
46
47
|
/**
|
|
47
48
|
* Represents a template specification for a language model task.
|
package/dist/task.js
CHANGED
|
@@ -60,6 +60,9 @@ class Task {
|
|
|
60
60
|
if (conf?.onAssistant) {
|
|
61
61
|
options.onAssistant = conf.onAssistant;
|
|
62
62
|
}
|
|
63
|
+
if (conf?.onThink) {
|
|
64
|
+
options.onThink = conf.onThink;
|
|
65
|
+
}
|
|
63
66
|
let hasTools = false;
|
|
64
67
|
// add task tools to the agent
|
|
65
68
|
if (this.def?.tools) {
|
|
@@ -125,7 +128,10 @@ class Task {
|
|
|
125
128
|
// cut debug here. TODO: debug log levels
|
|
126
129
|
options.debug = false;
|
|
127
130
|
}
|
|
128
|
-
|
|
131
|
+
let isRoutingAgent = false;
|
|
132
|
+
if (this.def?.description) {
|
|
133
|
+
isRoutingAgent = this.def.description.includes("routing agent");
|
|
134
|
+
}
|
|
129
135
|
if (isRoutingAgent) {
|
|
130
136
|
options.isToolsRouter = true;
|
|
131
137
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-smith/task",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "A toolkit to create human friendly agents: the language model tasks module",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,26 +14,22 @@
|
|
|
14
14
|
"docs": "typedoc --entryPointStrategy expand"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"@agent-smith/agent": "^0.3.
|
|
17
|
+
"@agent-smith/agent": "^0.3.2",
|
|
18
18
|
"@agent-smith/tfm": "^0.2.0",
|
|
19
|
-
"modprompt": "^0.14.
|
|
19
|
+
"modprompt": "^0.14.1",
|
|
20
20
|
"yaml": "^2.8.2"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"@locallm/api": "^0.7.3",
|
|
24
|
-
"openai": "6.
|
|
25
|
-
"@locallm/types": "^0.7.
|
|
24
|
+
"openai": "6.25.0",
|
|
25
|
+
"@locallm/types": "^0.7.1",
|
|
26
26
|
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
27
27
|
"@rollup/plugin-terser": "^0.4.4",
|
|
28
28
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
29
|
-
"@types/node": "^25.3.
|
|
30
|
-
"markdown-it-replace-link": "^1.2.2",
|
|
29
|
+
"@types/node": "^25.3.1",
|
|
31
30
|
"restmix": "^0.6.1",
|
|
32
31
|
"rollup": "^4.59.0",
|
|
33
32
|
"tslib": "^2.8.1",
|
|
34
|
-
"typedoc": "^0.28.17",
|
|
35
|
-
"typedoc-plugin-markdown": "^4.10.0",
|
|
36
|
-
"typedoc-plugin-rename-defaults": "^0.7.3",
|
|
37
33
|
"typescript": "^5.9.3"
|
|
38
34
|
},
|
|
39
35
|
"files": [
|