openclaw-openagent 1.0.13 → 1.0.14
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/src/messaging/executor.d.ts +2 -3
- package/dist/src/messaging/executor.js +4 -31
- package/dist/src/plugin-ui/assets/openagent-override.js +4 -5
- package/dist/src/runtime/update-checker.d.ts +1 -1
- package/dist/src/runtime/update-checker.js +9 -46
- package/package.json +1 -3
- package/src/app/channel-tools.ts +0 -249
- package/src/app/discovery-tools.ts +0 -273
- package/src/app/download-file-tool.ts +0 -133
- package/src/app/hooks.ts +0 -144
- package/src/app/index.ts +0 -84
- package/src/app/messaging-tools.ts +0 -79
- package/src/app/ops-tools.ts +0 -155
- package/src/app/remote-agent-tool.ts +0 -762
- package/src/app/types.ts +0 -68
- package/src/app/upload-file-tool.ts +0 -411
- package/src/app/verbose-preflight.ts +0 -190
- package/src/auth/config.ts +0 -266
- package/src/auth/credential-manager.ts +0 -146
- package/src/auth/index.ts +0 -24
- package/src/auth/verify.ts +0 -99
- package/src/channel.ts +0 -566
- package/src/compat.ts +0 -94
- package/src/config/config-schema.ts +0 -45
- package/src/messaging/aggregator.ts +0 -120
- package/src/messaging/collector.ts +0 -89
- package/src/messaging/executor.ts +0 -72
- package/src/messaging/inbound.ts +0 -150
- package/src/messaging/index.ts +0 -11
- package/src/messaging/mention-protocol.ts +0 -94
- package/src/messaging/process-c2c-request.ts +0 -564
- package/src/messaging/process-message.ts +0 -373
- package/src/messaging/scheduler.ts +0 -55
- package/src/messaging/types.ts +0 -38
- package/src/plugin-ui/adapters/oc-2026-04.js +0 -103
- package/src/plugin-ui/adapters/oc-2026-05.js +0 -125
- package/src/plugin-ui/adapters/oc-2026-06.js +0 -125
- package/src/plugin-ui/adapters/oc-unknown.js +0 -48
- package/src/plugin-ui/assets/agentbook-icon.svg +0 -5
- package/src/plugin-ui/assets/bg.png +0 -0
- package/src/plugin-ui/assets/icon.png +0 -0
- package/src/plugin-ui/assets/magic.svg +0 -5
- package/src/plugin-ui/assets/openagent-override.js +0 -11263
- package/src/plugin-ui/build.cjs +0 -463
- package/src/plugin-ui/index.ts +0 -18
- package/src/plugin-ui/modules/agent-book/panel/agent-book.js +0 -570
- package/src/plugin-ui/modules/agent-book/panel/agent-card.js +0 -170
- package/src/plugin-ui/modules/agent-book/panel/agent-data.js +0 -643
- package/src/plugin-ui/modules/agent-book/panel/inject-ui.js +0 -665
- package/src/plugin-ui/modules/agent-book/panel/mention-state.js +0 -206
- package/src/plugin-ui/modules/agent-book/panel/styles.js +0 -832
- package/src/plugin-ui/modules/agent-book/panel/theme-adapter.js +0 -86
- package/src/plugin-ui/modules/agent-book/remote-agent-tool/components-core.js +0 -295
- package/src/plugin-ui/modules/agent-book/remote-agent-tool/thought-chain-card.js +0 -211
- package/src/plugin-ui/modules/agent-book/scanner.js +0 -131
- package/src/plugin-ui/modules/agent-book/travelcard/travel-cards.js +0 -500
- package/src/plugin-ui/modules/agent-book/travelcard/travel-engine.js +0 -652
- package/src/plugin-ui/modules/agent-book/travelcard/travel-styles.js +0 -262
- package/src/plugin-ui/modules/loader/bootstrap.js +0 -133
- package/src/plugin-ui/modules/loader/shared-state.js +0 -838
- package/src/plugin-ui/modules/loader/ws-intercept.js +0 -199
- package/src/plugin-ui/modules/remote-agent/chunk-parser.js +0 -161
- package/src/plugin-ui/modules/remote-agent/execution-card.js +0 -530
- package/src/plugin-ui/modules/remote-agent/markdown-renderer.js +0 -256
- package/src/plugin-ui/modules/remote-agent/media-links.js +0 -151
- package/src/plugin-ui/modules/remote-agent/native-style-adapter.js +0 -134
- package/src/plugin-ui/modules/remote-agent/output-card.js +0 -342
- package/src/plugin-ui/modules/remote-agent/progress-store.js +0 -363
- package/src/plugin-ui/modules/remote-agent/render-hooks.js +0 -1700
- package/src/plugin-ui/modules/remote-agent/styles.js +0 -903
- package/src/plugin-ui/modules/remote-agent/tool-card-model.js +0 -130
- package/src/plugin-ui/postinstall-deploy.cjs +0 -52
- package/src/plugin-ui/ui-extension-loader/backup.ts +0 -92
- package/src/plugin-ui/ui-extension-loader/index.ts +0 -276
- package/src/plugin-ui/ui-extension-loader/locator.ts +0 -152
- package/src/plugin-ui/ui-extension-loader/manifest.ts +0 -57
- package/src/plugin-ui/ui-extension-loader/registry-regex.ts +0 -944
- package/src/plugin-ui/ui-extension-loader/removed-extensions.ts +0 -70
- package/src/plugin-ui/ui-extension-loader/types.ts +0 -72
- package/src/proxy/auth-proxy.ts +0 -414
- package/src/runtime/account.ts +0 -549
- package/src/runtime/index.ts +0 -7
- package/src/runtime/plugin-runtime.ts +0 -94
- package/src/runtime/registry.ts +0 -71
- package/src/runtime/update-checker.ts +0 -286
- package/src/sdk/CLASS_MAP.md +0 -143
- package/src/sdk/index.d.ts +0 -126
- package/src/sdk/index.js +0 -23990
- package/src/sdk/modules/cloud-search-module.js +0 -1117
- package/src/sdk/modules/follow-module.js +0 -1069
- package/src/sdk/modules/group-module.js +0 -7397
- package/src/sdk/modules/relationship-module.js +0 -2269
- package/src/sdk/modules/signaling-module.js +0 -1468
- package/src/sdk/modules/tim-upload-plugin.js +0 -730
- package/src/sdk/node-env/http-request.js +0 -90
- package/src/sdk/node-env/index.js +0 -57
- package/src/sdk/node-env/storage.js +0 -114
- package/src/sdk/package.json +0 -10
- package/src/sdk/tsconfig.json +0 -16
- package/src/state/pending-invocation-store.ts +0 -43
- package/src/state/store.ts +0 -756
- package/src/tim/c2c.ts +0 -451
- package/src/tim/channels.ts +0 -364
- package/src/tim/client.ts +0 -330
- package/src/tim/index.ts +0 -18
- package/src/tim/messages.ts +0 -166
- package/src/tim/sdk-logger-init.ts +0 -50
- package/src/tools.ts +0 -10
- package/src/transport/factory.ts +0 -95
- package/src/transport/oasn/index.ts +0 -17
- package/src/transport/oasn/oasn-agent-card.ts +0 -111
- package/src/transport/oasn/oasn-discovery.ts +0 -108
- package/src/transport/oasn/oasn-files.ts +0 -210
- package/src/transport/oasn/oasn-http.ts +0 -529
- package/src/transport/oasn/oasn-invocation.ts +0 -604
- package/src/transport/oasn/oasn-normalize.ts +0 -133
- package/src/transport/oasn/oasn-register.ts +0 -33
- package/src/transport/oasn/oasn-transport.ts +0 -318
- package/src/transport/oasn/oasn-types.ts +0 -404
- package/src/transport/tim/index.ts +0 -8
- package/src/transport/tim/tim-transport.ts +0 -515
- package/src/transport/types.ts +0 -538
- package/src/types/openclaw-plugin-sdk-media-store.d.ts +0 -9
- package/src/types/openclaw.d.ts +0 -97
- package/src/types/tencentcloud-chat.d.ts +0 -15
- package/src/util/http.ts +0 -113
- package/src/util/logger.ts +0 -131
- package/src/util/url-resolver.ts +0 -77
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
// ── AgentCard 统一组件 ──
|
|
2
|
-
//
|
|
3
|
-
// 用法:AgentCard(agent, { mode, onAction, actionLabel })
|
|
4
|
-
// mode: 'mention' — 空 @ 默认面板的分类卡片
|
|
5
|
-
// 'search' — 有搜索词时的旧式搜索结果行
|
|
6
|
-
// 'inline' — 聊天消息中的内嵌卡片
|
|
7
|
-
// onAction: 按钮点击回调
|
|
8
|
-
// actionLabel: 按钮文案(默认 mention='Try', inline='@ Chat')
|
|
9
|
-
|
|
10
|
-
function AgentCard(agent, opts = {}) {
|
|
11
|
-
const { mode = 'inline', onAction, actionLabel } = opts;
|
|
12
|
-
const card = _el('div', `agent-card agent-card--${mode}`);
|
|
13
|
-
|
|
14
|
-
if (mode === 'mention') {
|
|
15
|
-
// ── Figma 结构:──
|
|
16
|
-
// Agent item (grid cell)
|
|
17
|
-
// └── avart 实例
|
|
18
|
-
// └── 第一行 (row)
|
|
19
|
-
// ├── 内容组 (avatar 60 + info)
|
|
20
|
-
// │ └── 信息列:名称 / 简介 / 统计
|
|
21
|
-
// └── @Try 按钮
|
|
22
|
-
|
|
23
|
-
// avart 外壳
|
|
24
|
-
const avart = _el('div', 'agent-card__avart');
|
|
25
|
-
|
|
26
|
-
// ── 第一行:内容组 + @Try ──
|
|
27
|
-
const row1 = _el('div', 'agent-card__row1');
|
|
28
|
-
|
|
29
|
-
// 内容组:头像 + 信息列
|
|
30
|
-
const contentGroup = _el('div', 'agent-card__content-group');
|
|
31
|
-
|
|
32
|
-
// 头像
|
|
33
|
-
const avatar = document.createElement('img');
|
|
34
|
-
avatar.className = 'agent-card__avatar';
|
|
35
|
-
avatar.src = avatarUrl(agent);
|
|
36
|
-
avatar.alt = agent.name || '';
|
|
37
|
-
avatar.addEventListener('error', () => {
|
|
38
|
-
avatar.src = `https://ui-avatars.com/api/?name=${encodeURIComponent(agent.name)}&background=6366f1&color=fff&size=112`;
|
|
39
|
-
}, { once: true });
|
|
40
|
-
contentGroup.appendChild(avatar);
|
|
41
|
-
|
|
42
|
-
// 信息列:名称 + 简介
|
|
43
|
-
const info = _el('div', 'agent-card__info');
|
|
44
|
-
info.appendChild(_text('div', 'agent-card__name', agent.name || ''));
|
|
45
|
-
info.appendChild(_text('div', 'agent-card__bio', agent.bio || '暂无简介'));
|
|
46
|
-
const stats = _el('div', 'agent-card__stats');
|
|
47
|
-
// 星标 + 数字 紧密组合(Figma gap 1.5px)
|
|
48
|
-
const statGroup = _el('span', 'agent-card__stat-group');
|
|
49
|
-
var starIcon = _el('span', 'agent-card__stat-icon');
|
|
50
|
-
starIcon.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none"><path d="M5.94531 0.525391C6.08953 0.525551 6.20334 0.604267 6.25098 0.701172L7.59668 3.43262L7.71875 3.68066L7.99121 3.7207L11.0859 4.16992V4.1709H11.0869C11.1865 4.18536 11.2656 4.2375 11.3135 4.30371L11.3506 4.37402C11.3752 4.44422 11.3691 4.52183 11.3301 4.58984L11.2803 4.6543L9.01172 6.86914L8.81543 7.06152L8.86133 7.33301L9.3877 10.4043C9.40428 10.501 9.36472 10.6085 9.26172 10.6797C9.20158 10.7197 9.13 10.7412 9.05762 10.7412C9.00017 10.7412 8.94132 10.7275 8.8877 10.7002L6.18945 9.2793L5.94531 9.15039L5.7002 9.2793L3.00684 10.6982C2.95198 10.7266 2.89097 10.7412 2.83203 10.7412C2.77821 10.7412 2.72454 10.7298 2.67578 10.707L2.62891 10.6797C2.52556 10.6083 2.48649 10.5012 2.50293 10.4053V10.4043L3.0293 7.33301L3.0752 7.06152L2.87793 6.86914L0.611328 4.6543L0.610352 4.65332L0.560547 4.58984C0.521516 4.522 0.515166 4.44401 0.540039 4.37305L0.539062 4.37207C0.573747 4.27569 0.671018 4.18999 0.803711 4.1709L0.804688 4.16992L3.89844 3.7207L4.17188 3.68066L4.29395 3.43262L5.63867 0.702148C5.68788 0.603278 5.80274 0.525391 5.94531 0.525391Z" stroke="#666666" stroke-width="1.05"/></svg>';
|
|
51
|
-
statGroup.appendChild(starIcon);
|
|
52
|
-
statGroup.appendChild(_text('span', 'agent-card__stat agent-card__stat--claws', formatNumber(agent.claws)));
|
|
53
|
-
stats.appendChild(statGroup);
|
|
54
|
-
if (agent.owner) {
|
|
55
|
-
stats.appendChild(_text('span', 'agent-card__stat agent-card__stat--owner', ` · ${agent.owner}`));
|
|
56
|
-
}
|
|
57
|
-
info.appendChild(stats);
|
|
58
|
-
contentGroup.appendChild(info);
|
|
59
|
-
|
|
60
|
-
row1.appendChild(contentGroup);
|
|
61
|
-
|
|
62
|
-
// @召唤 按钮
|
|
63
|
-
const defaultLabel = '@召唤';
|
|
64
|
-
const btn = _text('button', 'agent-card__action', actionLabel || defaultLabel);
|
|
65
|
-
if (onAction) {
|
|
66
|
-
btn.addEventListener('click', (e) => {
|
|
67
|
-
e.stopPropagation();
|
|
68
|
-
console.log('[openagent] Try button clicked for:', agent.name);
|
|
69
|
-
onAction(agent);
|
|
70
|
-
});
|
|
71
|
-
card.addEventListener('click', (e) => {
|
|
72
|
-
e.stopPropagation();
|
|
73
|
-
console.log('[openagent] Card clicked for:', agent.name);
|
|
74
|
-
onAction(agent);
|
|
75
|
-
});
|
|
76
|
-
card.style.cursor = 'pointer';
|
|
77
|
-
}
|
|
78
|
-
row1.appendChild(btn);
|
|
79
|
-
|
|
80
|
-
avart.appendChild(row1);
|
|
81
|
-
|
|
82
|
-
card.appendChild(avart);
|
|
83
|
-
|
|
84
|
-
} else if (mode === 'search') {
|
|
85
|
-
const avatar = document.createElement('img');
|
|
86
|
-
avatar.className = 'agent-card__avatar';
|
|
87
|
-
avatar.src = avatarUrl(agent);
|
|
88
|
-
avatar.alt = agent.name || '';
|
|
89
|
-
avatar.addEventListener('error', () => {
|
|
90
|
-
avatar.src = `https://ui-avatars.com/api/?name=${encodeURIComponent(agent.name)}&background=6366f1&color=fff&size=112`;
|
|
91
|
-
}, { once: true });
|
|
92
|
-
card.appendChild(avatar);
|
|
93
|
-
|
|
94
|
-
const body = _el('div', 'agent-card__body');
|
|
95
|
-
body.appendChild(_text('div', 'agent-card__name', agent.name || ''));
|
|
96
|
-
body.appendChild(_text('div', 'agent-card__bio', agent.bio || '暂无简介'));
|
|
97
|
-
|
|
98
|
-
const stats = _el('div', 'agent-card__stats');
|
|
99
|
-
const statGroup = _el('span', 'agent-card__stat-group');
|
|
100
|
-
var starIcon = _el('span', 'agent-card__stat-icon');
|
|
101
|
-
starIcon.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none"><path d="M5.94531 0.525391C6.08953 0.525551 6.20334 0.604267 6.25098 0.701172L7.59668 3.43262L7.71875 3.68066L7.99121 3.7207L11.0859 4.16992V4.1709H11.0869C11.1865 4.18536 11.2656 4.2375 11.3135 4.30371L11.3506 4.37402C11.3752 4.44422 11.3691 4.52183 11.3301 4.58984L11.2803 4.6543L9.01172 6.86914L8.81543 7.06152L8.86133 7.33301L9.3877 10.4043C9.40428 10.501 9.36472 10.6085 9.26172 10.6797C9.20158 10.7197 9.13 10.7412 9.05762 10.7412C9.00017 10.7412 8.94132 10.7275 8.8877 10.7002L6.18945 9.2793L5.94531 9.15039L5.7002 9.2793L3.00684 10.6982C2.95198 10.7266 2.89097 10.7412 2.83203 10.7412C2.77821 10.7412 2.72454 10.7298 2.67578 10.707L2.62891 10.6797C2.52556 10.6083 2.48649 10.5012 2.50293 10.4053V10.4043L3.0293 7.33301L3.0752 7.06152L2.87793 6.86914L0.611328 4.6543L0.610352 4.65332L0.560547 4.58984C0.521516 4.522 0.515166 4.44401 0.540039 4.37305L0.539062 4.37207C0.573747 4.27569 0.671018 4.18999 0.803711 4.1709L0.804688 4.16992L3.89844 3.7207L4.17188 3.68066L4.29395 3.43262L5.63867 0.702148C5.68788 0.603278 5.80274 0.525391 5.94531 0.525391Z" stroke="#666666" stroke-width="1.05"/></svg>';
|
|
102
|
-
statGroup.appendChild(starIcon);
|
|
103
|
-
statGroup.appendChild(_text('span', 'agent-card__stat agent-card__stat--claws', formatNumber(agent.claws)));
|
|
104
|
-
stats.appendChild(statGroup);
|
|
105
|
-
if (agent.owner) {
|
|
106
|
-
stats.appendChild(_text('span', 'agent-card__stat agent-card__stat--owner', ` · ${agent.owner}`));
|
|
107
|
-
}
|
|
108
|
-
body.appendChild(stats);
|
|
109
|
-
card.appendChild(body);
|
|
110
|
-
|
|
111
|
-
const btn = _text('button', 'agent-card__action', actionLabel || '@召唤');
|
|
112
|
-
if (onAction) {
|
|
113
|
-
btn.addEventListener('click', (e) => {
|
|
114
|
-
e.stopPropagation();
|
|
115
|
-
console.log('[openagent] Try button clicked for:', agent.name);
|
|
116
|
-
onAction(agent);
|
|
117
|
-
});
|
|
118
|
-
card.addEventListener('click', (e) => {
|
|
119
|
-
e.stopPropagation();
|
|
120
|
-
console.log('[openagent] Card clicked for:', agent.name);
|
|
121
|
-
onAction(agent);
|
|
122
|
-
});
|
|
123
|
-
card.style.cursor = 'pointer';
|
|
124
|
-
}
|
|
125
|
-
card.appendChild(btn);
|
|
126
|
-
|
|
127
|
-
} else {
|
|
128
|
-
// ── mode: inline(聊天内嵌卡片)— 保持原结构 ──
|
|
129
|
-
const avatar = document.createElement('img');
|
|
130
|
-
avatar.className = 'agent-card__avatar';
|
|
131
|
-
avatar.src = avatarUrl(agent);
|
|
132
|
-
avatar.alt = agent.name || '';
|
|
133
|
-
avatar.addEventListener('error', () => {
|
|
134
|
-
avatar.src = `https://ui-avatars.com/api/?name=${encodeURIComponent(agent.name)}&background=6366f1&color=fff&size=112`;
|
|
135
|
-
}, { once: true });
|
|
136
|
-
card.appendChild(avatar);
|
|
137
|
-
|
|
138
|
-
const body = _el('div', 'agent-card__body');
|
|
139
|
-
const nameLine = _el('div', 'agent-card__name-line');
|
|
140
|
-
nameLine.appendChild(_text('span', 'agent-card__name', agent.name || ''));
|
|
141
|
-
if (agent.tag) {
|
|
142
|
-
nameLine.appendChild(_text('span', 'agent-card__tag', `@${agent.tag}`));
|
|
143
|
-
}
|
|
144
|
-
body.appendChild(nameLine);
|
|
145
|
-
body.appendChild(_text('div', 'agent-card__bio', agent.bio || '暂无简介'));
|
|
146
|
-
|
|
147
|
-
const stats = _el('div', 'agent-card__stats');
|
|
148
|
-
const statGroup = _el('span', 'agent-card__stat-group');
|
|
149
|
-
var starIcon = _el('span', 'agent-card__stat-icon');
|
|
150
|
-
starIcon.innerHTML = '<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none"><path d="M5.94531 0.525391C6.08953 0.525551 6.20334 0.604267 6.25098 0.701172L7.59668 3.43262L7.71875 3.68066L7.99121 3.7207L11.0859 4.16992V4.1709H11.0869C11.1865 4.18536 11.2656 4.2375 11.3135 4.30371L11.3506 4.37402C11.3752 4.44422 11.3691 4.52183 11.3301 4.58984L11.2803 4.6543L9.01172 6.86914L8.81543 7.06152L8.86133 7.33301L9.3877 10.4043C9.40428 10.501 9.36472 10.6085 9.26172 10.6797C9.20158 10.7197 9.13 10.7412 9.05762 10.7412C9.00017 10.7412 8.94132 10.7275 8.8877 10.7002L6.18945 9.2793L5.94531 9.15039L5.7002 9.2793L3.00684 10.6982C2.95198 10.7266 2.89097 10.7412 2.83203 10.7412C2.77821 10.7412 2.72454 10.7298 2.67578 10.707L2.62891 10.6797C2.52556 10.6083 2.48649 10.5012 2.50293 10.4053V10.4043L3.0293 7.33301L3.0752 7.06152L2.87793 6.86914L0.611328 4.6543L0.610352 4.65332L0.560547 4.58984C0.521516 4.522 0.515166 4.44401 0.540039 4.37305L0.539062 4.37207C0.573747 4.27569 0.671018 4.18999 0.803711 4.1709L0.804688 4.16992L3.89844 3.7207L4.17188 3.68066L4.29395 3.43262L5.63867 0.702148C5.68788 0.603278 5.80274 0.525391 5.94531 0.525391Z" stroke="#666666" stroke-width="1.05"/></svg>';
|
|
151
|
-
statGroup.appendChild(starIcon);
|
|
152
|
-
statGroup.appendChild(_text('span', 'agent-card__stat agent-card__stat--claws', formatNumber(agent.claws)));
|
|
153
|
-
stats.appendChild(statGroup);
|
|
154
|
-
if (agent.owner) {
|
|
155
|
-
stats.appendChild(_text('span', 'agent-card__stat agent-card__stat--owner', ` · ${agent.owner}`));
|
|
156
|
-
}
|
|
157
|
-
body.appendChild(stats);
|
|
158
|
-
card.appendChild(body);
|
|
159
|
-
|
|
160
|
-
const btn = _text('button', 'agent-card__action', actionLabel || '@召唤');
|
|
161
|
-
if (onAction) {
|
|
162
|
-
btn.addEventListener('click', (e) => { e.stopPropagation(); onAction(agent); });
|
|
163
|
-
card.addEventListener('click', (e) => { e.stopPropagation(); onAction(agent); });
|
|
164
|
-
card.style.cursor = 'pointer';
|
|
165
|
-
}
|
|
166
|
-
card.appendChild(btn);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
return card;
|
|
170
|
-
}
|