@alint-js/agent-apeira 0.0.8 → 0.0.9
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/index.d.mts +4 -3
- package/dist/index.mjs +11 -11
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Runner } from "apeira";
|
|
1
|
+
import { Runner, Tool } from "apeira";
|
|
2
2
|
import { ResolvedModel } from "@alint-js/core";
|
|
3
|
-
import { AgentAdapter } from "@alint-js/core/agent";
|
|
3
|
+
import { AgentAdapter, AgentTool } from "@alint-js/core/agent";
|
|
4
4
|
|
|
5
5
|
//#region src/index.d.ts
|
|
6
6
|
interface ApeiraAdapterOptions {
|
|
@@ -8,5 +8,6 @@ interface ApeiraAdapterOptions {
|
|
|
8
8
|
}
|
|
9
9
|
declare function createApeiraAdapter(options?: Partial<ApeiraAdapterOptions>): AgentAdapter;
|
|
10
10
|
declare function createApeiraRunner(model: ResolvedModel): Runner;
|
|
11
|
+
declare function toRunnerTools(tools: AgentTool[]): Tool[];
|
|
11
12
|
//#endregion
|
|
12
|
-
export { ApeiraAdapterOptions, createApeiraAdapter, createApeiraRunner };
|
|
13
|
+
export { ApeiraAdapterOptions, createApeiraAdapter, createApeiraRunner, toRunnerTools };
|
package/dist/index.mjs
CHANGED
|
@@ -20,6 +20,16 @@ function createApeiraRunner(model) {
|
|
|
20
20
|
stopWhen: stepCountAtLeast(maxSteps)
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
|
+
function toRunnerTools(tools) {
|
|
24
|
+
return tools.map((agentTool) => rawTool({
|
|
25
|
+
description: agentTool.description,
|
|
26
|
+
execute: async (input) => {
|
|
27
|
+
return await agentTool.execute(input) ?? "";
|
|
28
|
+
},
|
|
29
|
+
name: agentTool.name,
|
|
30
|
+
parameters: agentTool.parameters
|
|
31
|
+
}));
|
|
32
|
+
}
|
|
23
33
|
function buildRunnerContext(request) {
|
|
24
34
|
return {
|
|
25
35
|
channel: noopChannel(),
|
|
@@ -50,15 +60,5 @@ function noopChannel() {
|
|
|
50
60
|
subscribe: () => () => {}
|
|
51
61
|
};
|
|
52
62
|
}
|
|
53
|
-
function toRunnerTools(tools) {
|
|
54
|
-
return tools.map((agentTool) => rawTool({
|
|
55
|
-
description: agentTool.description,
|
|
56
|
-
execute: async (input) => {
|
|
57
|
-
return await agentTool.execute(input) ?? "";
|
|
58
|
-
},
|
|
59
|
-
name: agentTool.name,
|
|
60
|
-
parameters: agentTool.parameters
|
|
61
|
-
}));
|
|
62
|
-
}
|
|
63
63
|
//#endregion
|
|
64
|
-
export { createApeiraAdapter, createApeiraRunner };
|
|
64
|
+
export { createApeiraAdapter, createApeiraRunner, toRunnerTools };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alint-js/agent-apeira",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.9",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
7
|
"types": "./dist/index.d.mts",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"dist"
|
|
14
14
|
],
|
|
15
15
|
"peerDependencies": {
|
|
16
|
-
"@alint-js/core": "0.0.
|
|
16
|
+
"@alint-js/core": "0.0.9"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"apeira": "^0.0.6",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"tsdown": "^0.22.3",
|
|
25
25
|
"typescript": "^6.0.3",
|
|
26
26
|
"vitest": "^4.1.9",
|
|
27
|
-
"@alint-js/core": "0.0.
|
|
27
|
+
"@alint-js/core": "0.0.9"
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
30
|
"build": "tsdown",
|