@aalis/api-tools 0.5.1
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/LICENSE +21 -0
- package/README.md +25 -0
- package/dist/index.d.ts +144 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +55 -0
- package/dist/index.js.map +1 -0
- package/package.json +43 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ace Nyan <ace@acenyan.com>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# @aalis/api-tools
|
|
2
|
+
|
|
3
|
+
类型/接口/能力声明包(只导出 `type` 与 `*Capabilities`,不含运行时逻辑)
|
|
4
|
+
|
|
5
|
+
## 角色
|
|
6
|
+
|
|
7
|
+
类型/接口/能力声明包(只导出 `type` 与 `*Capabilities`,不含运行时逻辑)
|
|
8
|
+
|
|
9
|
+
## 安装
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
pnpm add @aalis/api-tools
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## 使用
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import type { /* ... */ } from '@aalis/api-tools';
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
本包为 *-api 类型包;实现见对应的运行时插件。
|
|
22
|
+
|
|
23
|
+
## 许可
|
|
24
|
+
|
|
25
|
+
见仓库根目录 LICENSE。
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import type { CapabilityConfirm, CapabilityRisk, CapabilityVisibility, ExecutionGuard } from '@aalis/api-authority';
|
|
2
|
+
import type { Context } from '@aalis/core';
|
|
3
|
+
export interface ToolFunction {
|
|
4
|
+
name: string;
|
|
5
|
+
strict?: boolean;
|
|
6
|
+
description: string;
|
|
7
|
+
parameters: {
|
|
8
|
+
type: 'object';
|
|
9
|
+
properties: Record<string, unknown>;
|
|
10
|
+
required?: string[];
|
|
11
|
+
additionalProperties?: boolean;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export interface ToolDefinition {
|
|
15
|
+
type: 'function';
|
|
16
|
+
function: ToolFunction;
|
|
17
|
+
}
|
|
18
|
+
export interface ToolCallContext {
|
|
19
|
+
sessionId: string;
|
|
20
|
+
userId?: string;
|
|
21
|
+
platform?: string;
|
|
22
|
+
/** 当前平台启用的工具分组(供 search_tools 等工具过滤用) */
|
|
23
|
+
enabledGroups?: string[];
|
|
24
|
+
}
|
|
25
|
+
/** 工具调用状态通知(WebUI 等前端订阅展示用) */
|
|
26
|
+
export interface ToolExecuteMessage {
|
|
27
|
+
sessionId: string;
|
|
28
|
+
platform?: string;
|
|
29
|
+
/** 工具名称 */
|
|
30
|
+
toolName: string;
|
|
31
|
+
/** 传入工具的参数 */
|
|
32
|
+
args: Record<string, unknown>;
|
|
33
|
+
/** 'start' = 开始调用, 'end' = 调用完成 */
|
|
34
|
+
phase: 'start' | 'end';
|
|
35
|
+
/** 工具返回结果(仅在 phase='end' 时存在) */
|
|
36
|
+
result?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* 已注册的工具:函数声明 + 处理器 + 能力可见性/分组元信息。
|
|
40
|
+
*/
|
|
41
|
+
export interface RegisteredTool {
|
|
42
|
+
definition: ToolDefinition;
|
|
43
|
+
handler: (args: Record<string, unknown>, ctx: ToolCallContext) => Promise<string>;
|
|
44
|
+
pluginName: string;
|
|
45
|
+
/** 主能力默认可见性(轴 A;缺省 public);restricted 须被 owner/委托授予 */
|
|
46
|
+
visibility?: CapabilityVisibility;
|
|
47
|
+
/** 确认要求(轴 B,与 visibility 正交、owner 也生效):'session'/'always';缺省=不确认 */
|
|
48
|
+
confirm?: CapabilityConfirm;
|
|
49
|
+
/** 风险等级(声明糖):展开为 (visibility, confirm) 默认;显式 visibility/confirm 覆盖 */
|
|
50
|
+
risk?: CapabilityRisk;
|
|
51
|
+
/** 工具所属分组(用于按平台筛选,未设置时始终可用) */
|
|
52
|
+
groups?: string[];
|
|
53
|
+
}
|
|
54
|
+
/** 工具摘要(不含 handler,用于搜索展示) */
|
|
55
|
+
export interface ToolSummary {
|
|
56
|
+
name: string;
|
|
57
|
+
description: string;
|
|
58
|
+
groups?: string[];
|
|
59
|
+
}
|
|
60
|
+
/** 工具分组信息 */
|
|
61
|
+
export interface ToolGroupInfo {
|
|
62
|
+
/** 分组标识(如 'system'、'onebot'、'search') */
|
|
63
|
+
name: string;
|
|
64
|
+
/** 显示名称(如 '系统工具'、'OneBot 工具') */
|
|
65
|
+
label: string;
|
|
66
|
+
/** 分组描述 */
|
|
67
|
+
description?: string;
|
|
68
|
+
/** 注册该分组的插件 */
|
|
69
|
+
pluginName: string;
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* 工具服务接口
|
|
73
|
+
*
|
|
74
|
+
* 管理 AI 可调用的工具的注册、查询、执行。
|
|
75
|
+
* 由 plugin-tools 创建 ToolRegistry 并注册为服务。
|
|
76
|
+
*/
|
|
77
|
+
export interface ToolService {
|
|
78
|
+
register(tool: Omit<RegisteredTool, 'pluginName'>, pluginName: string): () => void;
|
|
79
|
+
/**
|
|
80
|
+
* 获取工具定义列表
|
|
81
|
+
* @param filter 可选过滤条件
|
|
82
|
+
* - groups: 仅返回属于指定分组的工具(无 groups 的工具始终包含)
|
|
83
|
+
*/
|
|
84
|
+
getDefinitions(filter?: {
|
|
85
|
+
groups?: string[];
|
|
86
|
+
}): ToolDefinition[];
|
|
87
|
+
getSummaries(filter?: {
|
|
88
|
+
groups?: string[];
|
|
89
|
+
}): ToolSummary[];
|
|
90
|
+
getAll(): Array<{
|
|
91
|
+
name: string;
|
|
92
|
+
description: string;
|
|
93
|
+
pluginName: string;
|
|
94
|
+
/** 主能力默认可见性(缺省 public);可被 authority 配置的 authorityOverrides 调整 */
|
|
95
|
+
visibility: CapabilityVisibility;
|
|
96
|
+
/** 生效确认要求(轴 B);缺省=不确认 */
|
|
97
|
+
confirm?: CapabilityConfirm;
|
|
98
|
+
/** 原始风险声明(透传,供 authority 派生 minTier:safe→访客/sensitive→朋友/dangerous→信任) */
|
|
99
|
+
risk?: CapabilityRisk;
|
|
100
|
+
groups?: string[];
|
|
101
|
+
}>;
|
|
102
|
+
execute(toolName: string, args: Record<string, unknown>, callCtx: ToolCallContext): Promise<string>;
|
|
103
|
+
/** 注入执行守卫,用于能力裁决与 restricted 二次确认 */
|
|
104
|
+
setExecutionGuard(guard: ExecutionGuard): void;
|
|
105
|
+
unregisterByPlugin(pluginName: string): void;
|
|
106
|
+
/** 注册工具分组 */
|
|
107
|
+
registerGroup(group: Omit<ToolGroupInfo, 'pluginName'>, pluginName: string): () => void;
|
|
108
|
+
/** 获取所有已注册的工具分组 */
|
|
109
|
+
getGroups(): ToolGroupInfo[];
|
|
110
|
+
}
|
|
111
|
+
/** ToolService 绑定到当前 Context 的便捷视图(pluginName 自动填充) */
|
|
112
|
+
export interface ScopedToolService {
|
|
113
|
+
/** 注册工具。服务未就绪时通过 whenService 自动延迟到就绪后执行(与原 mixin 语义一致)。 */
|
|
114
|
+
register(tool: Omit<RegisteredTool, 'pluginName'>): () => void;
|
|
115
|
+
/** 注册工具分组。服务未就绪时通过 whenService 自动延迟。 */
|
|
116
|
+
registerGroup(group: Omit<ToolGroupInfo, 'pluginName'>): () => void;
|
|
117
|
+
getDefinitions: ToolService['getDefinitions'];
|
|
118
|
+
getSummaries: ToolService['getSummaries'];
|
|
119
|
+
getAll: ToolService['getAll'];
|
|
120
|
+
getGroups: ToolService['getGroups'];
|
|
121
|
+
execute: ToolService['execute'];
|
|
122
|
+
setExecutionGuard: ToolService['setExecutionGuard'];
|
|
123
|
+
/** 原始 ToolService 引用(服务未就绪时为 undefined) */
|
|
124
|
+
readonly raw: ToolService | undefined;
|
|
125
|
+
}
|
|
126
|
+
export declare function useToolService(ctx: Context): ScopedToolService;
|
|
127
|
+
/**
|
|
128
|
+
* 返回一个 ScopedToolService 的视图,其 `register` 会自动为工具
|
|
129
|
+
* 追加给定 groups(合并而不是覆盖原 tool.groups)。
|
|
130
|
+
*
|
|
131
|
+
* 用于一组工具想共享相同分组的场景(如某游戏插件的 'game' 分组)。
|
|
132
|
+
*/
|
|
133
|
+
export declare function toolsWithGroups(tools: ScopedToolService, groups: string[]): ScopedToolService;
|
|
134
|
+
declare module '@aalis/core' {
|
|
135
|
+
interface AalisEvents {
|
|
136
|
+
'tool:execute': [info: ToolExecuteMessage];
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
declare module '@aalis/core' {
|
|
140
|
+
interface ServiceTypeMap {
|
|
141
|
+
tools: ToolService;
|
|
142
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AAC,CAAC;IACpC,OAAO,EAAE,WAAW,CAAC,SAAS,CAAC,CAAC;IAChC,iBAAiB,EAAE,WAAW,CAAC,mBAAmB,CAAC,CAAC;IACpD,2CAA2C;IAC3C,QAAQ,CAAC,GAAG,EAAE,WAAW,GAAG,SAAS,CAAC;CACvC;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,iBAAiB,CA2B9D;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,iBAAiB,CAS7F;AAID,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,WAAW;QACnB,cAAc,EAAE,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC;KAC5C;CACF;AAOD,OAAO,QAAQ,aAAa,CAAC;IAC3B,UAAU,cAAc;QACtB,KAAK,EAAE,WAAW,CAAC;KACpB;CACF"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
// ===== 工具服务接口与契约类型 =====
|
|
2
|
+
//
|
|
3
|
+
// 本包提供工具系统的全部"非实现"契约:
|
|
4
|
+
// - LLM 函数声明协议类型(ToolDefinition / ToolFunction)
|
|
5
|
+
// - 工具/分组数据结构(RegisteredTool / ToolGroupInfo / ToolSummary)
|
|
6
|
+
// - 工具调用上下文(ToolCallContext)—— 平台/会话语义
|
|
7
|
+
// - 工具执行通知(ToolExecuteMessage)
|
|
8
|
+
// - 服务接口(ToolService)
|
|
9
|
+
// - useToolService(ctx) helper(M2 后取代 ctx.registerTool mixin)
|
|
10
|
+
// - 通过 declaration merging 向 AalisEvents 注入 'tool:execute'
|
|
11
|
+
//
|
|
12
|
+
// 注:`ToolCall`(assistant 消息携带的调用载荷)位于 @aalis/schema-message,
|
|
13
|
+
// 与 Message 同源同生命周期。本包不依赖 message-api(双向解耦)。
|
|
14
|
+
//
|
|
15
|
+
// 实现见 @aalis/plugin-tool-system。
|
|
16
|
+
export function useToolService(ctx) {
|
|
17
|
+
const pluginName = ctx.id;
|
|
18
|
+
/** 用于读 API:服务未就绪时抛错。 */
|
|
19
|
+
function need() {
|
|
20
|
+
const s = ctx.getService('tools');
|
|
21
|
+
if (!s) {
|
|
22
|
+
throw new Error(`useToolService: 'tools' 服务不可用。请在插件 manifest 的 inject 中声明 'tools',或确认 plugin-agent-tools 已激活。`);
|
|
23
|
+
}
|
|
24
|
+
return s;
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
register: tool => ctx.whenService('tools', s => s.register(tool, pluginName)),
|
|
28
|
+
registerGroup: group => ctx.whenService('tools', s => s.registerGroup(group, pluginName)),
|
|
29
|
+
getDefinitions: (...args) => need().getDefinitions(...args),
|
|
30
|
+
getSummaries: (...args) => need().getSummaries(...args),
|
|
31
|
+
getAll: (...args) => need().getAll(...args),
|
|
32
|
+
getGroups: (...args) => need().getGroups(...args),
|
|
33
|
+
execute: (...args) => need().execute(...args),
|
|
34
|
+
setExecutionGuard: (...args) => need().setExecutionGuard(...args),
|
|
35
|
+
get raw() {
|
|
36
|
+
return ctx.getService('tools');
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* 返回一个 ScopedToolService 的视图,其 `register` 会自动为工具
|
|
42
|
+
* 追加给定 groups(合并而不是覆盖原 tool.groups)。
|
|
43
|
+
*
|
|
44
|
+
* 用于一组工具想共享相同分组的场景(如某游戏插件的 'game' 分组)。
|
|
45
|
+
*/
|
|
46
|
+
export function toolsWithGroups(tools, groups) {
|
|
47
|
+
return {
|
|
48
|
+
...tools,
|
|
49
|
+
register: tool => tools.register({
|
|
50
|
+
...tool,
|
|
51
|
+
groups: [...(tool.groups ?? []), ...groups],
|
|
52
|
+
}),
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../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EAAE,CAAC,IAAI,EAAE,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC;QACjD,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC;QAC7C,iBAAiB,EAAE,CAAC,GAAG,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,iBAAiB,CAAC,GAAG,IAAI,CAAC;QACjE,IAAI,GAAG;YACL,OAAO,GAAG,CAAC,UAAU,CAAc,OAAO,CAAC,CAAC;QAC9C,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,KAAwB,EAAE,MAAgB;IACxE,OAAO;QACL,GAAG,KAAK;QACR,QAAQ,EAAE,IAAI,CAAC,EAAE,CACf,KAAK,CAAC,QAAQ,CAAC;YACb,GAAG,IAAI;YACP,MAAM,EAAE,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,IAAI,EAAE,CAAC,EAAE,GAAG,MAAM,CAAC;SAC5C,CAAC;KACL,CAAC;AACJ,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@aalis/api-tools",
|
|
3
|
+
"version": "0.5.1",
|
|
4
|
+
"license": "MIT",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "git+https://github.com/AalisLabs/Aalis.git",
|
|
8
|
+
"directory": "packages/api-tools"
|
|
9
|
+
},
|
|
10
|
+
"author": "Ace Nyan <ace@acenyan.com>",
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/AalisLabs/Aalis/issues"
|
|
13
|
+
},
|
|
14
|
+
"homepage": "https://github.com/AalisLabs/Aalis#readme",
|
|
15
|
+
"type": "module",
|
|
16
|
+
"main": "dist/index.js",
|
|
17
|
+
"types": "dist/index.d.ts",
|
|
18
|
+
"files": [
|
|
19
|
+
"dist"
|
|
20
|
+
],
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@aalis/api-authority": ">=0.5.0 <1.0.0"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@types/node": "^22.0.0",
|
|
26
|
+
"typescript": "^5.7.0",
|
|
27
|
+
"@aalis/core": "0.10.0"
|
|
28
|
+
},
|
|
29
|
+
"aalis": {
|
|
30
|
+
"types": true
|
|
31
|
+
},
|
|
32
|
+
"peerDependencies": {
|
|
33
|
+
"@aalis/core": ">=0.2.0 <1.0.0"
|
|
34
|
+
},
|
|
35
|
+
"keywords": [
|
|
36
|
+
"aalis",
|
|
37
|
+
"aalis-api"
|
|
38
|
+
],
|
|
39
|
+
"scripts": {
|
|
40
|
+
"build": "tsc",
|
|
41
|
+
"dev": "tsc --watch"
|
|
42
|
+
}
|
|
43
|
+
}
|