@arki-moe/agent-ts 5.4.0 → 6.0.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 CHANGED
@@ -13,7 +13,6 @@ const getTimeTool: Tool = {
13
13
  name: "get_time",
14
14
  description: "Get the current time in ISO format",
15
15
  parameters: { type: "object", properties: {} },
16
- data: { category: "time" },
17
16
  execute: (_args, _agent) => new Date().toISOString(),
18
17
  };
19
18
 
@@ -82,7 +81,7 @@ When `apiKey` is not provided in config, adapters read from the corresponding en
82
81
 
83
82
  `onToolCall` receives parsed JSON args and can mutate them before execution. Returning `false` skips the tool call and does not emit a `ToolResult` message.
84
83
 
85
- `tool.data` is a local JSON metadata bag for your own use and is not sent to adapters.
84
+ `Role.ToolCall` supports an optional `data` field as a local JSON metadata bag for your own use and is not sent to adapters.
86
85
 
87
86
  `isAbort` is polled on the hot path (including streaming). When it returns `true`, `agent.run` stops and returns whatever messages it has so far. Streaming abort returns a partial AI message with `isPartial: true`.
88
87
 
package/dist/types.d.ts CHANGED
@@ -20,6 +20,7 @@ export type Message = {
20
20
  toolName: string;
21
21
  callId: string;
22
22
  argsText: string;
23
+ data?: Record<string, unknown>;
23
24
  } | {
24
25
  role: Role.ToolResult;
25
26
  callId: string;
@@ -46,7 +47,6 @@ export type Tool = {
46
47
  name: string;
47
48
  description: string;
48
49
  parameters: unknown;
49
- data?: Record<string, unknown>;
50
50
  execute: (args: unknown, agent: AgentLike) => Promise<unknown> | unknown;
51
51
  };
52
52
  export type AgentConfig = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arki-moe/agent-ts",
3
- "version": "5.4.0",
3
+ "version": "6.0.0",
4
4
  "description": "Minimal Agent library, zero dependencies",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",