@aalis/plugin-agent 0.15.2 → 0.17.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/dist/texts.js ADDED
@@ -0,0 +1,62 @@
1
+ // 本插件自己的原文字典:显示名与配置项,发到会话里的「[系统]」「[错误]」与 LLM 解析失败的说明,用量拆分表的分项名,按会话
2
+ // 字段的称呼与说明,/stop 的说明与回复,/model 与 /persona 的说明与分页回复
3
+ import { defineTexts } from '@aalis/schema-i18n';
4
+ import en from './locales/en.js';
5
+ const SOURCE = {
6
+ displayName: '默认 Agent',
7
+ systemPromptLabel: '行为准则提示词',
8
+ systemPromptDescription: '定义 Agent 的行为准则。当人设插件存在时,身份描述由人设提供,此处仅作为行为指令追加。',
9
+ memoryTokenBudgetLabel: '长期记忆预留 Token',
10
+ memoryTokenBudgetDescription: '注入的 system 消息(技能、摘要、记忆等)的 token 额度,只在硬裁剪丢完历史仍超预算时起作用:它们合计超过额度就按比例缩减,仍超时删除',
11
+ promptBuildTimeoutMsLabel: '提示词贡献构建超时 (ms)',
12
+ promptBuildTimeoutMsDescription: '单个 agent:prompt 贡献 build 的等待上限。挂死的构建(如网络检索卡住)超时后本轮缺席、其余照常,避免拖住每次 LLM 调用。0 表示不设限。',
13
+ toolResultMaxRatioLabel: '工具结果最大比例',
14
+ toolResultMaxRatioDescription: '单条工具结果占上下文窗口的最大比例 (0~1),超出则截断。例如 0.15 表示 15%',
15
+ trimThresholdRatioLabel: '裁剪触发比例',
16
+ trimThresholdRatioDescription: '裁剪预算 = 上下文长度 × 该比例 − 最大输出 token − 512 安全余量(下限 1024)。硬裁剪按它裁要发出的消息列表(只裁内存里的,不影响 DB):历史超过可用量(预算减去头部与四分之一预算)就成段丢,其余几步在估算超过预算时才做。默认 1.0 表示用满扣除输出预留后的可用窗口;调低可提前裁剪。压缩触发在会话设置里调:自动压缩线(摘要插件)与历史条数上限(本插件)。',
17
+ systemNotice: '[系统] {why}',
18
+ turnError: '[错误] {error}',
19
+ llmNoneErrored: '未找到任何具备 chat 能力的 LLM —— 以下 LLM 插件激活失败:{plugins, list}。可用 /doctor 查看原因(需要相应权限)。',
20
+ llmNone: '未找到任何具备 chat 能力的 LLM —— 请确认已安装并启用至少一个 LLM 提供者插件(如 @aalis/plugin-llm-deepseek)。',
21
+ llmNotFound: '配置指向的模型不存在:{wanted}。当前可用:{models, list}{more}。',
22
+ llmMore: ' 等 {count, number} 个(用 /model 查看全部)',
23
+ llmUnresolved: 'LLM 解析失败:能力过滤后有 {count, number} 个可用 entry,但解析时一个都没取到(服务可能正在装卸中,稍后重试)。',
24
+ partHistory: '历史消息',
25
+ partToolResults: '工具结果',
26
+ partToolDefs: '工具定义',
27
+ partPersona: '人设',
28
+ partMemorySummary: '对话摘要',
29
+ partMemoryVector: '向量记忆',
30
+ partSkills: '技能',
31
+ partPlatform: '平台提示',
32
+ partSubtask: '子任务',
33
+ partSystemOther: '其余系统提示',
34
+ llmLabel: '模型',
35
+ llmDescription: '这个会话用的对话模型。没设时跟随服务偏好:给本插件设了 llm 的服务偏好时用它,否则用全局偏好,都没有时用第一个可用的对话模型',
36
+ llmUnset: '跟随服务偏好',
37
+ thinkLabel: '深度思考',
38
+ thinkDescription: '可选的档位随所用的模型;没设或当前模型没有这一档时按模型的默认档',
39
+ thinkUnset: '按模型的默认档',
40
+ maxToolIterationsLabel: '最大工具迭代',
41
+ maxToolIterationsDescription: '一轮里工具调用循环的最大次数;没设即不限,卡在工具调用里的一轮只能手动停下',
42
+ maxToolIterationsUnset: '不限',
43
+ historyLimitLabel: '历史条数上限',
44
+ historyLimitDescription: '发给模型的会话历史不超过这么多条:超过时一次丢掉最早的一半,之后照常累积到这个条数再丢一段;丢掉的只是这一轮发给模型的,会话历史本身保留,压缩时照样进摘要。装了摘要插件时,会话的消息到这个条数就压缩。0 表示不按条数:发全部活跃历史,只按自动压缩线压缩',
45
+ stopDescription: '停下本会话在跑的一轮;排着的消息照常开下一轮。参与这一轮的人和 owner 能停',
46
+ stopped: '已停下这一轮',
47
+ stopIdle: '没有在跑的一轮',
48
+ stopDenied: '只有参与这一轮的人和 owner 能停',
49
+ modelDescription: '列出/搜索可用对话模型。分页显示,-p 翻页;如 /model grok',
50
+ personaDescription: '列出/搜索可用人设(分页,-p 翻页)',
51
+ pageOptionDescription: '页码(默认 1)',
52
+ modelsLabel: '可用模型',
53
+ personasLabel: '可用人设',
54
+ pagedNoMatch: '无匹配 "{keyword}" 的{label}',
55
+ pagedNone: '(无{label})',
56
+ pagedHeader: '{label}(共 {count, number} · 第 {page, number}/{pages, number} 页):',
57
+ pagedHeaderMatching: '{label}(含"{keyword}" 共 {count, number} · 第 {page, number}/{pages, number} 页):',
58
+ pagedHint: '—— 翻页:{command} -p {next} 搜索:{command} <关键词>',
59
+ pagedHintMatching: '—— 翻页:{command} {keyword} -p {next}',
60
+ };
61
+ export const t = defineTexts({ ns: '@aalis/plugin-agent', language: 'zh-CN', source: SOURCE, locales: { en } });
62
+ //# sourceMappingURL=texts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"texts.js","sourceRoot":"","sources":["../src/texts.ts"],"names":[],"mappings":"AAAA,mEAAmE;AACnE,mDAAmD;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAEjC,MAAM,MAAM,GAAG;IACb,WAAW,EAAE,UAAU;IACvB,iBAAiB,EAAE,SAAS;IAC5B,uBAAuB,EAAE,gDAAgD;IACzE,sBAAsB,EAAE,cAAc;IACtC,4BAA4B,EAC1B,2EAA2E;IAC7E,yBAAyB,EAAE,gBAAgB;IAC3C,+BAA+B,EAC7B,kFAAkF;IACpF,uBAAuB,EAAE,UAAU;IACnC,6BAA6B,EAAE,8CAA8C;IAC7E,uBAAuB,EAAE,QAAQ;IACjC,6BAA6B,EAC3B,kMAAkM;IACpM,YAAY,EAAE,YAAY;IAC1B,SAAS,EAAE,cAAc;IACzB,cAA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AAE,EAAE,CAAC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aalis/plugin-agent",
3
- "version": "0.15.2",
3
+ "version": "0.17.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -24,35 +24,40 @@
24
24
  "dist"
25
25
  ],
26
26
  "dependencies": {
27
- "@aalis/api-agent": ">=0.9.0 <1.0.0",
28
- "@aalis/api-commands": ">=0.7.0 <1.0.0",
29
- "@aalis/api-gateway": ">=0.7.0 <1.0.0",
30
- "@aalis/api-llm": ">=0.13.0 <1.0.0",
31
- "@aalis/api-media": ">=0.11.0 <1.0.0",
32
- "@aalis/api-memory": ">=0.7.0 <1.0.0",
33
- "@aalis/api-message-archive": ">=0.7.0 <1.0.0",
34
- "@aalis/api-persona": ">=0.8.0 <1.0.0",
35
- "@aalis/api-platform": ">=0.8.0 <1.0.0",
36
- "@aalis/api-session-manager": ">=0.10.0 <1.0.0",
37
- "@aalis/api-storage": ">=0.7.0 <1.0.0",
38
- "@aalis/api-tools": ">=0.10.0 <1.0.0",
39
- "@aalis/schema-config": ">=0.14.0 <1.0.0",
40
- "@aalis/schema-message": ">=0.9.0 <1.0.0",
41
- "@aalis/util-text-normalize": ">=0.5.2 <1.0.0",
42
- "@aalis/api-hooks": ">=0.1.0 <1.0.0",
43
- "@aalis/api-contributions": ">=0.1.0 <1.0.0"
27
+ "@aalis/api-agent": ">=0.11.0 <1.0.0",
28
+ "@aalis/api-authority": ">=0.12.0 <1.0.0",
29
+ "@aalis/api-commands": ">=0.9.0 <1.0.0",
30
+ "@aalis/api-gateway": ">=0.10.0 <1.0.0",
31
+ "@aalis/api-llm": ">=0.15.0 <1.0.0",
32
+ "@aalis/api-media": ">=0.13.0 <1.0.0",
33
+ "@aalis/api-memory": ">=0.9.0 <1.0.0",
34
+ "@aalis/api-message-archive": ">=0.9.0 <1.0.0",
35
+ "@aalis/api-persona": ">=0.10.0 <1.0.0",
36
+ "@aalis/api-platform": ">=0.11.0 <1.0.0",
37
+ "@aalis/api-session-manager": ">=0.12.0 <1.0.0",
38
+ "@aalis/api-storage": ">=0.9.0 <1.0.0",
39
+ "@aalis/api-tools": ">=0.12.0 <1.0.0",
40
+ "@aalis/schema-config": ">=0.16.0 <1.0.0",
41
+ "@aalis/schema-i18n": ">=0.1.0 <1.0.0",
42
+ "@aalis/schema-message": ">=0.11.0 <1.0.0",
43
+ "@aalis/util-text-normalize": ">=0.6.0 <1.0.0",
44
+ "@aalis/api-hooks": ">=0.3.0 <1.0.0",
45
+ "@aalis/api-contributions": ">=0.2.0 <1.0.0",
46
+ "@aalis/api-host-config": ">=0.3.0 <1.0.0",
47
+ "@aalis/api-session-settings": ">=0.1.0 <1.0.0"
44
48
  },
45
49
  "devDependencies": {
46
50
  "@types/node": "^22.0.0",
47
51
  "typescript": "^5.7.0",
48
- "@aalis/core": "0.19.1"
52
+ "@aalis/core": "0.21.0"
49
53
  },
50
54
  "peerDependencies": {
51
- "@aalis/core": ">=0.18.0 <1.0.0"
55
+ "@aalis/core": ">=0.21.0 <1.0.0"
52
56
  },
53
57
  "aalis": {
54
58
  "service": {
55
59
  "optional": [
60
+ "authority",
56
61
  "commands",
57
62
  "gateway",
58
63
  "llm",
@@ -64,7 +69,9 @@
64
69
  "plugins",
65
70
  "session-manager",
66
71
  "storage",
67
- "tools"
72
+ "tools",
73
+ "host-config",
74
+ "session-settings"
68
75
  ],
69
76
  "provides": [
70
77
  "agent"