@alint-js/agent-apeira 0.0.7 → 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 CHANGED
@@ -1,6 +1,6 @@
1
- import { Runner } from "apeira";
2
- import { AgentAdapter } from "@alint-js/agent";
1
+ import { Runner, Tool } from "apeira";
3
2
  import { ResolvedModel } from "@alint-js/core";
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.7",
4
+ "version": "0.0.9",
5
5
  "exports": {
6
6
  ".": {
7
7
  "types": "./dist/index.d.mts",
@@ -13,19 +13,18 @@
13
13
  "dist"
14
14
  ],
15
15
  "peerDependencies": {
16
- "@alint-js/core": "0.0.7"
16
+ "@alint-js/core": "0.0.9"
17
17
  },
18
18
  "dependencies": {
19
19
  "apeira": "^0.0.6",
20
- "xsai": "^0.5.0-beta.6",
21
- "@alint-js/agent": "0.0.7"
20
+ "xsai": "^0.5.0-beta.6"
22
21
  },
23
22
  "devDependencies": {
24
23
  "@types/node": "^26.0.1",
25
24
  "tsdown": "^0.22.3",
26
25
  "typescript": "^6.0.3",
27
26
  "vitest": "^4.1.9",
28
- "@alint-js/core": "0.0.7"
27
+ "@alint-js/core": "0.0.9"
29
28
  },
30
29
  "scripts": {
31
30
  "build": "tsdown",