agent-bridge-aun 1.0.40 → 1.0.41
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 +2 -0
- package/config.schema.json +1 -1
- package/dist/src-ts/plugins/aun/index.js +1 -1
- package/dist/src-ts/plugins/aun/messages.js +1 -1
- package/dist/src-ts/plugins/aun/public/app.js +2 -1
- package/dist/src-ts/plugins/aun/public/index.html +1 -1
- package/package.json +1 -1
- package/plugin.json +1 -1
package/README.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
`agent-bridge-aun` 为 mu-agent-bridge 提供 AUN 消息通道,支持使用已有 AID 或通过管理 API 注册 AID,并将收到的文本交给指定 Agent 插件处理。
|
|
4
4
|
|
|
5
|
+
来源白名单默认留空,表示接受所有 AUN Peer。需要限制来源时,可在 ABWeb 的 AUN 通道设置中填写一个或多个 AID,并用英文逗号分隔;清空白名单也会恢复接受所有 Peer。
|
|
6
|
+
|
|
5
7
|
安装后在 ABWeb 的插件管理中启动 AUN 通道。收到的 AID 消息仅投递给用户在 AUN 身份页中明确关联的 Agent;未关联的 AID 消息会被忽略。旧配置中的 `agent_plugin` 字段不再作为默认路由。配置字段 `owner_aid` 是可选字符串,用作默认 Owner。AID 创建接口为 `POST /api/plugins/aun/aid`,请求内容为 `{"aid":"新AID.agentid.cn","owner_aid":"所有者AID.agentid.cn"}`。
|
|
6
8
|
|
|
7
9
|
创建使用 SDK 的兼容注册流程;Owner AID 只保存为本地归属配置,不代表 AUN 协议 Owner 关系已签名或激活。Gateway 信任根使用随插件提供并校验指纹的 AUN 根证书,不从 Gateway 下载未经验证的 CA 链。
|
package/config.schema.json
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"encryption_seed": { "type": "string" },
|
|
13
13
|
"verify_ssl": { "type": "boolean", "default": true },
|
|
14
14
|
"root_ca_path": { "type": "string" },
|
|
15
|
-
"allow_from": { "type": "string" },
|
|
15
|
+
"allow_from": { "type": "string", "default": "", "description": "留空接受所有 AUN Peer;填写 AID 后限制来源,可用英文逗号分隔。" },
|
|
16
16
|
"delivery_mode": { "enum": ["fanout", "queue"] }
|
|
17
17
|
},
|
|
18
18
|
"additionalProperties": false
|
|
@@ -13,7 +13,7 @@ const evolcore_1 = require("./evolcore");
|
|
|
13
13
|
const messages_1 = require("./messages");
|
|
14
14
|
const attachments_1 = require("./attachments");
|
|
15
15
|
const manifest = {
|
|
16
|
-
id: "aun", version: "1.0.
|
|
16
|
+
id: "aun", version: "1.0.41", type: "channel", displayName: "AUN 通道",
|
|
17
17
|
entry: "dist/src-ts/plugins/aun/index.js", apiVersion: "1", process: "in-process",
|
|
18
18
|
capabilities: ["channel", "channel.identity.create", "channel.receive", "channel.send", "health", "cli"],
|
|
19
19
|
configSchema: "config.schema.json",
|
|
@@ -10,7 +10,7 @@ function normalizeAunMessage(payload, selfAid, allowFrom) {
|
|
|
10
10
|
const data = payload;
|
|
11
11
|
const peerId = typeof data.from === "string" ? data.from.trim() : "";
|
|
12
12
|
const rules = (allowFrom ?? "").split(",").map((value) => value.trim()).filter(Boolean);
|
|
13
|
-
if (!peerId || peerId === selfAid || (rules.length > 0 && !rules.includes(peerId)))
|
|
13
|
+
if (!peerId || peerId === selfAid || (rules.length > 0 && !rules.includes("*") && !rules.includes(peerId)))
|
|
14
14
|
return undefined;
|
|
15
15
|
const body = data.payload && typeof data.payload === "object" ? data.payload : {};
|
|
16
16
|
// 对端的系统事件只作通知,转为任务回复会导致两个 Agent 循环互答。
|
|
@@ -29,7 +29,8 @@
|
|
|
29
29
|
agents = (plugins.plugins || []).filter((plugin) => plugin.type === "agent");
|
|
30
30
|
if (refreshForm) createForm.elements.ownerAid.value = config.owner_aid || "";
|
|
31
31
|
if (refreshForm) {
|
|
32
|
-
|
|
32
|
+
configForm.elements.allow_from.value = config.allow_from?.split(",").some(value => value.trim() === "*") ? "" : config.allow_from || "";
|
|
33
|
+
configForm.elements.aun_path.value = config.aun_path || "";
|
|
33
34
|
configForm.elements.encryption_seed.value = "";
|
|
34
35
|
}
|
|
35
36
|
list.replaceChildren();
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<p id="status" role="status"></p>
|
|
8
8
|
<div class="table-scroll"><table><thead><tr><th>AID</th><th>来源</th><th>已关联 Agent</th><th>操作</th></tr></thead><tbody id="identities"></tbody></table></div>
|
|
9
9
|
<form id="create-form"><h2>创建 AID</h2><div class="fields"><label>新 AID<input name="aid" required placeholder="例如:example.agentid.cn"></label><label>Owner AID<input name="ownerAid" placeholder="例如:owner.agentid.cn"><small class="hint">留空时使用已配置的默认 Owner;未配置时需填写。Owner 保存为本地归属配置;不代表 AUN 协议中的 Owner 关系已激活。</small></label></div><button type="submit">创建</button></form>
|
|
10
|
-
<form id="config-form"><h2>通道配置</h2><div class="fields"><label>允许的来源<input name="allow_from"></label><label>AUN 存储路径<input name="aun_path"></label><label>加密种子<input name="encryption_seed" type="password" autocomplete="new-password" placeholder="留空则不修改"></label></div><button type="submit">保存配置</button></form>
|
|
10
|
+
<form id="config-form"><h2>通道配置</h2><div class="fields"><label>允许的来源<input name="allow_from" placeholder="留空接受所有 Peer,填写 AID 后限制"></label><label>AUN 存储路径<input name="aun_path"></label><label>加密种子<input name="encryption_seed" type="password" autocomplete="new-password" placeholder="留空则不修改"></label></div><button type="submit">保存配置</button></form>
|
|
11
11
|
</main>
|
|
12
12
|
<script src="/abweb/channels/aun/app.js"></script>
|
|
13
13
|
</body>
|
package/package.json
CHANGED