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.
Files changed (128) hide show
  1. package/dist/src/messaging/executor.d.ts +2 -3
  2. package/dist/src/messaging/executor.js +4 -31
  3. package/dist/src/plugin-ui/assets/openagent-override.js +4 -5
  4. package/dist/src/runtime/update-checker.d.ts +1 -1
  5. package/dist/src/runtime/update-checker.js +9 -46
  6. package/package.json +1 -3
  7. package/src/app/channel-tools.ts +0 -249
  8. package/src/app/discovery-tools.ts +0 -273
  9. package/src/app/download-file-tool.ts +0 -133
  10. package/src/app/hooks.ts +0 -144
  11. package/src/app/index.ts +0 -84
  12. package/src/app/messaging-tools.ts +0 -79
  13. package/src/app/ops-tools.ts +0 -155
  14. package/src/app/remote-agent-tool.ts +0 -762
  15. package/src/app/types.ts +0 -68
  16. package/src/app/upload-file-tool.ts +0 -411
  17. package/src/app/verbose-preflight.ts +0 -190
  18. package/src/auth/config.ts +0 -266
  19. package/src/auth/credential-manager.ts +0 -146
  20. package/src/auth/index.ts +0 -24
  21. package/src/auth/verify.ts +0 -99
  22. package/src/channel.ts +0 -566
  23. package/src/compat.ts +0 -94
  24. package/src/config/config-schema.ts +0 -45
  25. package/src/messaging/aggregator.ts +0 -120
  26. package/src/messaging/collector.ts +0 -89
  27. package/src/messaging/executor.ts +0 -72
  28. package/src/messaging/inbound.ts +0 -150
  29. package/src/messaging/index.ts +0 -11
  30. package/src/messaging/mention-protocol.ts +0 -94
  31. package/src/messaging/process-c2c-request.ts +0 -564
  32. package/src/messaging/process-message.ts +0 -373
  33. package/src/messaging/scheduler.ts +0 -55
  34. package/src/messaging/types.ts +0 -38
  35. package/src/plugin-ui/adapters/oc-2026-04.js +0 -103
  36. package/src/plugin-ui/adapters/oc-2026-05.js +0 -125
  37. package/src/plugin-ui/adapters/oc-2026-06.js +0 -125
  38. package/src/plugin-ui/adapters/oc-unknown.js +0 -48
  39. package/src/plugin-ui/assets/agentbook-icon.svg +0 -5
  40. package/src/plugin-ui/assets/bg.png +0 -0
  41. package/src/plugin-ui/assets/icon.png +0 -0
  42. package/src/plugin-ui/assets/magic.svg +0 -5
  43. package/src/plugin-ui/assets/openagent-override.js +0 -11263
  44. package/src/plugin-ui/build.cjs +0 -463
  45. package/src/plugin-ui/index.ts +0 -18
  46. package/src/plugin-ui/modules/agent-book/panel/agent-book.js +0 -570
  47. package/src/plugin-ui/modules/agent-book/panel/agent-card.js +0 -170
  48. package/src/plugin-ui/modules/agent-book/panel/agent-data.js +0 -643
  49. package/src/plugin-ui/modules/agent-book/panel/inject-ui.js +0 -665
  50. package/src/plugin-ui/modules/agent-book/panel/mention-state.js +0 -206
  51. package/src/plugin-ui/modules/agent-book/panel/styles.js +0 -832
  52. package/src/plugin-ui/modules/agent-book/panel/theme-adapter.js +0 -86
  53. package/src/plugin-ui/modules/agent-book/remote-agent-tool/components-core.js +0 -295
  54. package/src/plugin-ui/modules/agent-book/remote-agent-tool/thought-chain-card.js +0 -211
  55. package/src/plugin-ui/modules/agent-book/scanner.js +0 -131
  56. package/src/plugin-ui/modules/agent-book/travelcard/travel-cards.js +0 -500
  57. package/src/plugin-ui/modules/agent-book/travelcard/travel-engine.js +0 -652
  58. package/src/plugin-ui/modules/agent-book/travelcard/travel-styles.js +0 -262
  59. package/src/plugin-ui/modules/loader/bootstrap.js +0 -133
  60. package/src/plugin-ui/modules/loader/shared-state.js +0 -838
  61. package/src/plugin-ui/modules/loader/ws-intercept.js +0 -199
  62. package/src/plugin-ui/modules/remote-agent/chunk-parser.js +0 -161
  63. package/src/plugin-ui/modules/remote-agent/execution-card.js +0 -530
  64. package/src/plugin-ui/modules/remote-agent/markdown-renderer.js +0 -256
  65. package/src/plugin-ui/modules/remote-agent/media-links.js +0 -151
  66. package/src/plugin-ui/modules/remote-agent/native-style-adapter.js +0 -134
  67. package/src/plugin-ui/modules/remote-agent/output-card.js +0 -342
  68. package/src/plugin-ui/modules/remote-agent/progress-store.js +0 -363
  69. package/src/plugin-ui/modules/remote-agent/render-hooks.js +0 -1700
  70. package/src/plugin-ui/modules/remote-agent/styles.js +0 -903
  71. package/src/plugin-ui/modules/remote-agent/tool-card-model.js +0 -130
  72. package/src/plugin-ui/postinstall-deploy.cjs +0 -52
  73. package/src/plugin-ui/ui-extension-loader/backup.ts +0 -92
  74. package/src/plugin-ui/ui-extension-loader/index.ts +0 -276
  75. package/src/plugin-ui/ui-extension-loader/locator.ts +0 -152
  76. package/src/plugin-ui/ui-extension-loader/manifest.ts +0 -57
  77. package/src/plugin-ui/ui-extension-loader/registry-regex.ts +0 -944
  78. package/src/plugin-ui/ui-extension-loader/removed-extensions.ts +0 -70
  79. package/src/plugin-ui/ui-extension-loader/types.ts +0 -72
  80. package/src/proxy/auth-proxy.ts +0 -414
  81. package/src/runtime/account.ts +0 -549
  82. package/src/runtime/index.ts +0 -7
  83. package/src/runtime/plugin-runtime.ts +0 -94
  84. package/src/runtime/registry.ts +0 -71
  85. package/src/runtime/update-checker.ts +0 -286
  86. package/src/sdk/CLASS_MAP.md +0 -143
  87. package/src/sdk/index.d.ts +0 -126
  88. package/src/sdk/index.js +0 -23990
  89. package/src/sdk/modules/cloud-search-module.js +0 -1117
  90. package/src/sdk/modules/follow-module.js +0 -1069
  91. package/src/sdk/modules/group-module.js +0 -7397
  92. package/src/sdk/modules/relationship-module.js +0 -2269
  93. package/src/sdk/modules/signaling-module.js +0 -1468
  94. package/src/sdk/modules/tim-upload-plugin.js +0 -730
  95. package/src/sdk/node-env/http-request.js +0 -90
  96. package/src/sdk/node-env/index.js +0 -57
  97. package/src/sdk/node-env/storage.js +0 -114
  98. package/src/sdk/package.json +0 -10
  99. package/src/sdk/tsconfig.json +0 -16
  100. package/src/state/pending-invocation-store.ts +0 -43
  101. package/src/state/store.ts +0 -756
  102. package/src/tim/c2c.ts +0 -451
  103. package/src/tim/channels.ts +0 -364
  104. package/src/tim/client.ts +0 -330
  105. package/src/tim/index.ts +0 -18
  106. package/src/tim/messages.ts +0 -166
  107. package/src/tim/sdk-logger-init.ts +0 -50
  108. package/src/tools.ts +0 -10
  109. package/src/transport/factory.ts +0 -95
  110. package/src/transport/oasn/index.ts +0 -17
  111. package/src/transport/oasn/oasn-agent-card.ts +0 -111
  112. package/src/transport/oasn/oasn-discovery.ts +0 -108
  113. package/src/transport/oasn/oasn-files.ts +0 -210
  114. package/src/transport/oasn/oasn-http.ts +0 -529
  115. package/src/transport/oasn/oasn-invocation.ts +0 -604
  116. package/src/transport/oasn/oasn-normalize.ts +0 -133
  117. package/src/transport/oasn/oasn-register.ts +0 -33
  118. package/src/transport/oasn/oasn-transport.ts +0 -318
  119. package/src/transport/oasn/oasn-types.ts +0 -404
  120. package/src/transport/tim/index.ts +0 -8
  121. package/src/transport/tim/tim-transport.ts +0 -515
  122. package/src/transport/types.ts +0 -538
  123. package/src/types/openclaw-plugin-sdk-media-store.d.ts +0 -9
  124. package/src/types/openclaw.d.ts +0 -97
  125. package/src/types/tencentcloud-chat.d.ts +0 -15
  126. package/src/util/http.ts +0 -113
  127. package/src/util/logger.ts +0 -131
  128. package/src/util/url-resolver.ts +0 -77
@@ -1,903 +0,0 @@
1
- // ── OpenAgent Remote Agent Card Styles ──
2
- //
3
- // 补充样式。核心样式(.cl-thought-chain, .cl-agent-pill, .cl-tools-collapse-*)
4
- // 已由 thought-chain-card.js 注入,此处只补新增的类。
5
- //
6
- // 注意:不使用 .chat-tool-card 类名,避免 scanner.js 误匹配。
7
-
8
- (function _clInjectRemoteAgentStyles() {
9
- var oldStyle = document.getElementById('cl-remote-agent-styles');
10
- if (oldStyle) oldStyle.remove();
11
- var style = document.createElement('style');
12
- style.id = 'cl-remote-agent-styles';
13
- style.setAttribute('data-openagent-style', 'remote-agent');
14
- style.setAttribute('data-openagent-host-version', CL.hostVersion || 'unknown');
15
- style.setAttribute('data-openagent-host-adapter', (CL.hostAdapter && CL.hostAdapter.id) || 'oc-unknown');
16
- var hostCss = (CL.hostAdapter && CL.hostAdapter.css) || {};
17
- function _clSelectorList(selectors) {
18
- if (!selectors) return '';
19
- if (Array.isArray(selectors)) return selectors.filter(Boolean).join(',\n');
20
- return String(selectors || '');
21
- }
22
- function _clRule(selectors, declarations) {
23
- var selectorText = _clSelectorList(selectors);
24
- if (!selectorText) return '';
25
- return selectorText + ' {\n' + declarations.join('\n') + '\n}';
26
- }
27
- style.textContent = [
28
- // ── 隐藏宿主上下文用量提示 ──
29
- '.context-notice.context-notice--usage,',
30
- '.context-notice .context-notice--usage {',
31
- ' display: none !important;',
32
- '}',
33
-
34
- // ── RenderHook 远端 Agent 卡片接管 native tool header ──
35
- _clRule(hostCss.remoteShell, [
36
- ' width: 100% !important;',
37
- ' max-width: 100% !important;',
38
- ' min-width: 0 !important;',
39
- ' box-sizing: border-box !important;',
40
- ' border: 0 !important;',
41
- ' background: transparent !important;',
42
- ' box-shadow: none !important;',
43
- ]),
44
- '/* Align output host shells with execution shells. Keep v4 msg-collapse',
45
- ' separate from newer tools-collapse so modern spacing never leaks into',
46
- ' the 2026.4 DOM. Move the host shell, not the inner OpenAgent card. */',
47
- _clRule(hostCss.outputHostMargin, [
48
- ' margin-left: 12px !important;',
49
- ]),
50
- _clRule(hostCss.outputHostMarginReset, [
51
- ' margin-left: 0 !important;',
52
- ]),
53
- _clRule(hostCss.summaryHidden, [
54
- ' display: none !important;',
55
- ]),
56
- _clRule(hostCss.hostShellRawText, [
57
- ' display: none !important;',
58
- ]),
59
- '.cl-remote-agent-raw-hidden > .chat-text,',
60
- '.cl-remote-agent-raw-hidden.chat-bubble > .chat-text {',
61
- ' display: none !important;',
62
- '}',
63
- '/* Phase A: 不依赖 host-shell class,用 :has() 直接隐藏宿主 raw text */',
64
- _clRule(hostCss.rawTextCardHosts, [
65
- ' display: none !important;',
66
- ]),
67
- _clRule(hostCss.rawTextPlaceholderHosts, [
68
- ' display: none !important;',
69
- ]),
70
- _clRule(hostCss.hostBody, [
71
- ' border: 0 !important;',
72
- ' outline: 0 !important;',
73
- ' background: transparent !important;',
74
- ' box-shadow: none !important;',
75
- ' padding: 0 !important;',
76
- ' margin: 0 !important;',
77
- ' width: 100% !important;',
78
- ' max-width: 100% !important;',
79
- ' min-width: 0 !important;',
80
- ' box-sizing: border-box !important;',
81
- ]),
82
- '.chat-bubble:has(.cl-remote-agent-card) {',
83
- ' border: 0 !important;',
84
- ' background: transparent !important;',
85
- ' box-shadow: none !important;',
86
- ' padding: 10px 0 !important;',
87
- ' width: 100%;',
88
- ' max-width: 100% !important;',
89
- ' min-width: 0 !important;',
90
- ' overflow: hidden !important;',
91
- ' box-sizing: border-box !important;',
92
- '}',
93
- '.chat-split-container:has(.cl-output-card),',
94
- '.chat-main:has(.cl-output-card),',
95
- '.chat-sidebar:has(.cl-output-card),',
96
- '.chat-side-result:has(.cl-output-card),',
97
- '.chat-side-result__body:has(.cl-output-card) {',
98
- ' min-width: 0 !important;',
99
- ' max-width: 100% !important;',
100
- ' box-sizing: border-box !important;',
101
- '}',
102
- _clRule(hostCss.manualOpenReset, [
103
- ' margin-left: 0 !important;',
104
- ]),
105
- // ── 外层活动组容器 ──
106
- '.chat-activity-group__body:has(.cl-remote-agent-card) {',
107
- ' border-radius: 14px;',
108
- ' border: 1px solid #E5E5EA;',
109
- ' background: #F8F9FA;',
110
- ' margin: 8px;',
111
- ' padding-bottom: 0 !important;',
112
- '}',
113
- '.chat-bubble:has(.cl-remote-agent-card) > .chat-text,',
114
- '.chat-bubble:has(.cl-remote-agent-output-placeholder) > .chat-text {',
115
- ' display: none !important;',
116
- '}',
117
- '.cl-remote-agent-host-shell {',
118
- ' width: min(100%, 912px) !important;',
119
- ' max-width: 100% !important;',
120
- ' min-width: 0 !important;',
121
- ' box-sizing: border-box !important;',
122
- '}',
123
- _clRule(hostCss.hostShellReset, [
124
- ' border: 0 !important;',
125
- ' outline: 0 !important;',
126
- ' background: transparent !important;',
127
- ' box-shadow: none !important;',
128
- ]),
129
- _clRule(hostCss.hostShellSummary, [
130
- ' display: none !important;',
131
- ]),
132
- // ── 新卡片容器 ──
133
- // 覆盖 OpenClaw .chat-tool-card 的 max-height: 120px 限制
134
- '.cl-remote-agent-card {',
135
- ' max-height: none;',
136
- ' overflow: visible;',
137
- ' width: 100%;',
138
- ' max-width: 100%;',
139
- ' border: 1px solid rgba(0,0,0,0.05);',
140
- ' border-radius: 14px;',
141
- ' background: #fff;',
142
- ' display: flex;',
143
- ' flex-direction: column;',
144
- ' box-sizing: border-box;',
145
- '}',
146
- _clRule(hostCss.modernCardLayout ? ['.cl-remote-agent-card'] : [], [
147
- ' overflow: hidden;',
148
- ' min-width: 0;',
149
- ' gap: 0;',
150
- ' padding: 15px;',
151
- ]),
152
-
153
- // ── 顶部 OpenAgent 标题条 ──
154
- '.cl-openagent-header {',
155
- ' max-width: 100%;',
156
- ' display: flex;',
157
- ' align-items: center;',
158
- ' gap: 6px;',
159
- ' height: 34px;',
160
- ' padding: 6px 0;',
161
- ' border-radius: 10px;',
162
- ' box-sizing: border-box;',
163
- ' border: none;',
164
- ' background: transparent;',
165
- ' font-family: "PingFang SC", sans-serif;',
166
- '}',
167
- '.cl-openagent-header:hover {',
168
- '}',
169
- _clRule(!hostCss.modernCardLayout ? ['.cl-openagent-header'] : [], [
170
- ' height: auto;',
171
- ' padding: 16px 25px;',
172
- ]),
173
- _clRule(hostCss.modernCardLayout ? ['.cl-openagent-header'] : [], [
174
- ' gap: 0;',
175
- ' height: auto;',
176
- ' padding: 15px;',
177
- ]),
178
- '/* Output mode (Figma 373:12082) */',
179
- '.cl-exec-v2 .cl-openagent-header--output {',
180
- ' border-radius: 10px 10px 0 0 !important;',
181
- ' border: 1px solid rgba(229, 229, 234, 0.75) !important;',
182
- ' background: linear-gradient(90deg, rgba(220, 38, 38, 0.09) 0%, rgba(220, 38, 38, 0) 34%),',
183
- ' linear-gradient(90deg, rgb(253, 253, 254) 0%, rgb(253, 253, 254) 100%) !important;',
184
- ' box-shadow: 0px 8px 11px rgba(0, 0, 0, 0.12);',
185
- ' padding: 8px 6px !important;',
186
- '}',
187
- '.cl-exec-v2 .cl-openagent-header--output .cl-openagent-agent {',
188
- ' display: none;',
189
- '}',
190
- '.cl-exec-v2 .cl-openagent-header--output:hover {',
191
- ' border-color: rgba(0,0,0,0.1);',
192
- '}',
193
- '.cl-openagent-expand-icon {',
194
- ' display: flex;',
195
- ' align-items: center;',
196
- ' justify-content: center;',
197
- ' width: 15px;',
198
- ' height: 15px;',
199
- ' flex-shrink: 0;',
200
- ' transition: transform 0.2s ease;',
201
- '}',
202
- '.cl-openagent-expand-icon.cl-openagent-expanded {',
203
- ' transform: rotate(180deg);',
204
- '}',
205
- '.cl-openagent-badge {',
206
- ' width: 14px;',
207
- ' height: 14px;',
208
- ' border-radius: 14px;',
209
- ' background: url(./icon.png) center / contain no-repeat;',
210
- ' flex-shrink: 0;',
211
- ' overflow: hidden;',
212
- '}',
213
- _clRule(hostCss.modernCardLayout ? ['.cl-openagent-badge'] : [], [
214
- ' background: url(./icon.png) center/cover no-repeat;',
215
- ' margin: 0 6px;',
216
- ]),
217
- '.cl-openagent-text-row {',
218
- ' display: flex;',
219
- ' align-items: center;',
220
- ' gap: 6px;',
221
- ' min-width: 0;',
222
- ' line-height: 1.32;',
223
- '}',
224
- '.cl-openagent-label {',
225
- ' font-size: 12px;',
226
- ' font-weight: 500;',
227
- ' color: #333;',
228
- ' white-space: nowrap;',
229
- '}',
230
- '.cl-openagent-agent {',
231
- ' font-size: 12px;',
232
- ' font-weight: 500;',
233
- ' color: #333;',
234
- ' white-space: nowrap;',
235
- '}',
236
- '.cl-openagent-status {',
237
- ' font-size: 11px;',
238
- ' font-weight: 400;',
239
- ' color: #666;',
240
- ' white-space: nowrap;',
241
- '}',
242
- // ── Execution detail card (Figma 346:181) ──
243
- '.cl-thought-chain-content {',
244
- ' display: flex;',
245
- ' flex-direction: column;',
246
- ' gap: 16px;',
247
- ' min-width: 0;',
248
- ' max-width: 100%;',
249
- ' box-sizing: border-box;',
250
- '}',
251
- _clRule(!hostCss.modernCardLayout ? ['.cl-thought-chain-content.cl-thought-chain-content--execution'] : [], [
252
- ' padding: 0 15px 15px;',
253
- ]),
254
- _clRule(hostCss.modernCardLayout ? ['.cl-thought-chain-content'] : [], [
255
- ' margin-left: 0;',
256
- ' width: 100%;',
257
- ' min-width: 0;',
258
- ' box-sizing: border-box;',
259
- ' overflow: hidden;',
260
- ]),
261
- '.cl-exec-detail-card {',
262
- ' padding: 8px 16px 8px 12px;',
263
- ' border-radius: 8px;',
264
- ' background: #f8f8f8 url(./bg.png) no-repeat;',
265
- ' background-size: 100% 100%;',
266
- ' background-position: center;',
267
- ' width: 460px;',
268
- ' max-width: 100%;',
269
- ' box-sizing: border-box;',
270
- '}',
271
- '.cl-exec-detail-row {',
272
- ' display: flex;',
273
- ' align-items: center;',
274
- ' gap: 16px;',
275
- '}',
276
- '.cl-exec-agent-avatar {',
277
- ' width: 68px;',
278
- ' height: 68px;',
279
- ' object-fit: contain;',
280
- ' flex-shrink: 0;',
281
- '}',
282
- '.cl-exec-detail-info {',
283
- ' display: flex;',
284
- ' flex-direction: column;',
285
- ' gap: 6px;',
286
- ' flex: 1;',
287
- ' min-width: 0;',
288
- '}',
289
- '.cl-exec-name-row {',
290
- ' display: flex;',
291
- ' align-items: center;',
292
- ' justify-content: space-between;',
293
- ' gap: 8px;',
294
- ' margin-bottom: 6px;',
295
- '}',
296
- '.cl-exec-agent-name {',
297
- ' font-family: "PingFang SC", sans-serif;',
298
- ' font-size: 17px;',
299
- ' font-weight: 500;',
300
- ' color: #000;',
301
- ' margin: 0;',
302
- ' line-height: 1;',
303
- '}',
304
- '.cl-exec-star-badge {',
305
- ' display: flex;',
306
- ' align-items: center;',
307
- ' gap: 2px;',
308
- ' padding: 2px 10px 2px 8px;',
309
- ' border-radius: 30px;',
310
- ' background: #ebebeb;',
311
- ' flex-shrink: 0;',
312
- '}',
313
- ,
314
- ,
315
- ,
316
- '.cl-exec-star-count {',
317
- ' font-family: "PingFang SC", sans-serif;',
318
- ' font-size: 11px;',
319
- ' font-weight: 500;',
320
- ' color: #555;',
321
- ' white-space: nowrap;',
322
- '}',
323
- '.cl-exec-agent-bio {',
324
- ' font-family: "PingFang SC", sans-serif;',
325
- ' font-size: 14px;',
326
- ' font-weight: 400;',
327
- ' color: #555;',
328
- ' margin: 0;',
329
- ' line-height: 1;',
330
- '}',
331
- _clRule(!hostCss.modernCardLayout ? ['.cl-exec-agent-bio'] : [], [
332
- ' width: 250px;',
333
- ' max-width: 100%;',
334
- ' min-width: 0;',
335
- ' box-sizing: border-box;',
336
- ' overflow: hidden;',
337
- ' text-overflow: ellipsis;',
338
- ' display: -webkit-box;',
339
- ' -webkit-line-clamp: 2;',
340
- ' -webkit-box-orient: vertical;',
341
- ]),
342
-
343
- // ── Progress text (Figma 346:253) ──
344
- '.cl-thought-chain-content.cl-content-collapsed {',
345
- ' display: none;',
346
- '}',
347
- ,
348
- '.cl-exec-progress-row {',
349
- ' display: flex;',
350
- ' align-items: center;',
351
- ' gap: 2px;',
352
- '}',
353
- '.cl-exec-progress-text {',
354
- ' font-family: "PingFang SC", sans-serif;',
355
- ' font-size: 14px;',
356
- ' font-weight: 400;',
357
- ' line-height: 1.2;',
358
- ' margin: 0;',
359
- ' white-space: nowrap;',
360
- ' background-image: linear-gradient(90deg, #555 0%, #555 36%, #eee 55%, #555 77%, #555 100%);',
361
- ' background-size: 200% 100%;',
362
- ' -webkit-background-clip: text;',
363
- ' background-clip: text;',
364
- ' -webkit-text-fill-color: transparent;',
365
- ' animation: cl-progress-shimmer 2.5s ease-in-out infinite;',
366
- '}',
367
- '.cl-exec-progress-arrow {',
368
- ' display: flex;',
369
- ' align-items: center;',
370
- ' flex-shrink: 0;',
371
- '}',
372
-
373
-
374
- // ── Progress shimmer keyframes ──
375
- '@keyframes cl-progress-shimmer {',
376
- ' 0% { background-position: 200% 0; }',
377
- ' 100% { background-position: -200% 0; }',
378
- '}',
379
-
380
- // ── Output card(Figma 160:6681) ──
381
- '.cl-output-card {',
382
- ' background: #fff !important;',
383
- ' border: 1.2px solid rgba(47,47,51,0.1) !important;',
384
- ' border-radius: 24px !important;',
385
- ' padding: 10px 15px !important;',
386
- ' width: 100% !important;',
387
- ' max-width: 100% !important;',
388
- ' min-width: 0 !important;',
389
- ' box-sizing: border-box !important;',
390
- ' overflow: hidden;',
391
- '}',
392
- _clRule(hostCss.modernCardLayout ? ['.cl-output-card'] : [], [
393
- ' gap: 10px !important;',
394
- ]),
395
- _clRule(!hostCss.modernCardLayout ? ['.cl-output-card'] : [], [
396
- ' border-radius: 14px !important;',
397
- ]),
398
- _clRule(!hostCss.modernCardLayout ? ['.cl-remote-agent-card.cl-thought-chain.cl-output-card'] : [], [
399
- ' padding: 0 !important;',
400
- ]),
401
- '.cl-output-card > .cl-thought-chain-content {',
402
- ' background: #fff;',
403
- ' border: 1px solid #f4f4f4;',
404
- ' border-radius: 12px;',
405
- ' padding: 20px 30px;',
406
- ' overflow: hidden;',
407
- ' width: 100%;',
408
- ' max-width: 100%;',
409
- ' min-width: 0;',
410
- ' box-sizing: border-box;',
411
- '}',
412
- _clRule(!hostCss.modernCardLayout ? ['.cl-output-card > .cl-thought-chain-content'] : [], [
413
- ' margin: 10px 15px;',
414
- ' width: calc(100% - 30px);',
415
- ]),
416
- '.cl-output-card .cl-output-result {',
417
- ' width: 100%;',
418
- ' max-width: 100%;',
419
- ' min-width: 0;',
420
- ' box-sizing: border-box;',
421
- ' overflow-wrap: anywhere;',
422
- ' word-break: break-word;',
423
- '}',
424
- '.cl-output-card > .cl-thought-chain-content * {',
425
- ' max-width: 100%;',
426
- ' min-width: 0;',
427
- ' box-sizing: border-box;',
428
- '}',
429
- '.cl-output-card > .cl-thought-chain-content p,',
430
- '.cl-output-card > .cl-thought-chain-content li,',
431
- '.cl-output-card > .cl-thought-chain-content a {',
432
- ' overflow-wrap: anywhere;',
433
- ' word-break: break-word;',
434
- '}',
435
- '.cl-output-card > .cl-thought-chain-content hr {',
436
- ' border: 0;',
437
- ' border-top: 1px solid #bdbdbd;',
438
- '}',
439
- '.cl-output-card > .cl-thought-chain-content pre,',
440
- '.cl-output-card > .cl-thought-chain-content code {',
441
- ' overflow-x: auto;',
442
- ' white-space: pre-wrap;',
443
- ' word-break: break-all;',
444
- ' scrollbar-width: none;',
445
- ' -ms-overflow-style: none;',
446
- '}',
447
- '.cl-output-card > .cl-thought-chain-content pre::-webkit-scrollbar,',
448
- '.cl-output-card > .cl-thought-chain-content code::-webkit-scrollbar {',
449
- ' width: 0;',
450
- ' height: 0;',
451
- ' display: none;',
452
- '}',
453
- // V2 output card:统一 border/padding 与 execution card 一致
454
- '.cl-exec-v2.cl-output-card {',
455
- ' border: 1px solid rgba(0,0,0,0.05) !important;',
456
- ' border-radius: 14px !important;',
457
- ' padding: 0 !important;',
458
- '}',
459
- // V2 output card:去掉 content 区多余的内边距,detail card 自带动间距
460
- '.cl-exec-v2.cl-output-card > .cl-thought-chain-content {',
461
- ' background: transparent;',
462
- ' border: none;',
463
- ' border-radius: 0;',
464
- ' padding: 0 14px !important;',
465
- '}',
466
-
467
- // ── Collapsed state(Figma 145:3466) ──
468
- '.cl-remote-agent-card:has(.cl-content-collapsed) {',
469
- ' padding: 0 !important;',
470
- '}',
471
- // ── Output card Footer(Figma 131:2091) ──
472
- '.cl-output-footer {',
473
- ' display: flex;',
474
- ' align-items: center;',
475
- ' gap: 4px;',
476
- ' font-family: "PingFang SC", sans-serif;',
477
- ' font-size: 14px;',
478
- ' color: #999;',
479
- '}',
480
- _clRule(!hostCss.modernCardLayout ? ['.cl-output-footer'] : [], [
481
- ' padding: 10px 15px;',
482
- ' line-height: 22px;',
483
- ]),
484
- '.cl-output-footer-text {',
485
- ' white-space: nowrap;',
486
- '}',
487
- '.cl-output-footer-star {',
488
- ' display: flex;',
489
- ' align-items: center;',
490
- ' flex-shrink: 0;',
491
- '}',
492
- '.cl-output-footer-count {',
493
- ' font-weight: 500;',
494
- ' white-space: nowrap;',
495
- '}',
496
-
497
- /* ── Sidebar 面板(Figma 145:5712) ── */
498
- '.chat-sidebar {',
499
- ' background: #fff !important;',
500
- ' border: 1px solid rgba(0,0,0,0.05) !important;',
501
- ' border-radius: 14px !important;',
502
- ' padding: 16px 20px !important;',
503
- ' box-sizing: border-box !important;',
504
- ' min-width: 0 !important;',
505
- ' max-width: 100% !important;',
506
- ' overflow-x: hidden !important;',
507
- ' display: flex !important;',
508
- ' flex-direction: column !important;',
509
- ' gap: 16px !important;',
510
- '}',
511
- '.chat-sidebar > .sidebar-panel {',
512
- ' display: flex !important;',
513
- ' flex-direction: column !important;',
514
- ' gap: 16px !important;',
515
- ' width: 100% !important;',
516
- ' min-width: 0 !important;',
517
- ' max-width: 100% !important;',
518
- ' overflow-x: hidden !important;',
519
- ' box-sizing: border-box !important;',
520
- ' background: transparent !important;',
521
- '}',
522
- '.chat-sidebar .sidebar-header {',
523
- ' display: flex !important;',
524
- ' align-items: center !important;',
525
- ' justify-content: space-between !important;',
526
- ' padding: 6px 0 !important;',
527
- ' border-radius: 10px !important;',
528
- ' width: 100% !important;',
529
- ' border: none !important;',
530
- ' background: transparent !important;',
531
- '}',
532
- '.chat-sidebar .sidebar-title {',
533
- ' font-family: "PingFang SC", sans-serif !important;',
534
- ' font-weight: 500 !important;',
535
- ' font-size: 18px !important;',
536
- ' color: #333 !important;',
537
- ' line-height: 1.32 !important;',
538
- '}',
539
- '.chat-sidebar .sidebar-header button {',
540
- ' width: 16px !important;',
541
- ' height: 16px !important;',
542
- ' padding: 0 !important;',
543
- ' border: none !important;',
544
- ' background: transparent !important;',
545
- ' cursor: pointer !important;',
546
- ' flex-shrink: 0 !important;',
547
- '}',
548
- '.chat-sidebar .sidebar-content {',
549
- ' font-family: "PingFang SC", sans-serif !important;',
550
- ' font-size: 14px !important;',
551
- ' font-weight: 400 !important;',
552
- ' line-height: 1.8 !important;',
553
- ' color: #333 !important;',
554
- ' width: 100% !important;',
555
- ' min-width: 0 !important;',
556
- ' max-width: 100% !important;',
557
- ' padding: 0 !important;',
558
- ' overflow-x: hidden !important;',
559
- ' box-sizing: border-box !important;',
560
- ' overflow-wrap: anywhere !important;',
561
- '}',
562
- '.chat-sidebar .sidebar-markdown {',
563
- ' font-family: "PingFang SC", sans-serif !important;',
564
- ' font-size: 14px !important;',
565
- ' font-weight: 400 !important;',
566
- ' line-height: 1.8 !important;',
567
- ' color: #333 !important;',
568
- ' background: transparent !important;',
569
- ' border: none !important;',
570
- ' padding: 0 !important;',
571
- ' min-width: 0 !important;',
572
- ' max-width: 100% !important;',
573
- ' overflow-x: hidden !important;',
574
- ' box-sizing: border-box !important;',
575
- ' overflow-wrap: anywhere !important;',
576
- '}',
577
- '.chat-sidebar .sidebar-markdown * {',
578
- ' max-width: 100% !important;',
579
- ' min-width: 0 !important;',
580
- ' box-sizing: border-box !important;',
581
- '}',
582
- '.chat-sidebar .sidebar-markdown pre,',
583
- '.chat-sidebar .sidebar-markdown code {',
584
- ' white-space: pre-wrap !important;',
585
- ' word-break: break-word !important;',
586
- '}',
587
- // 隐藏宿主 sidebar 自带的 "Rendered Markdown / View Raw Text" 工具栏
588
- '.chat-sidebar .sidebar-markdown-shell__toolbar {',
589
- ' display: none !important;',
590
- '}',
591
- // ═══════════════════════════════════════════════════════════════
592
- // V2 执行卡片样式(2026.6.9+ 新版 UI)
593
- // 所有 V2 样式在 .cl-exec-v2 下隔离,不影响旧版
594
- // ═══════════════════════════════════════════════════════════════
595
-
596
- // ── V2 容器 ──
597
- '.cl-exec-v2 {',
598
- ' position: relative;',
599
- ' gap: 10px;',
600
- ' padding: 0;',
601
- '}',
602
-
603
- // ── V2 Header(Figma 371:6987 — 红晕渐变背景 + 独立边框)──
604
- '.cl-exec-v2 .cl-openagent-header-v2 {',
605
- ' background: linear-gradient(90deg, rgba(220, 38, 38, 0.09) 0%, rgba(220, 38, 38, 0) 34%),',
606
- ' linear-gradient(90deg, rgb(253, 253, 254) 0%, rgb(253, 253, 254) 100%) !important;',
607
- ' border-bottom: 1px solid rgba(229, 229, 234, 0.75) !important;',
608
- ' padding: 8px 6px !important;',
609
- ' margin: 0 !important;',
610
- ' border-radius: 10px 10px 0 0;',
611
- ' height: auto !important;',
612
- ' min-height: auto !important;',
613
- ' gap: 6px;',
614
- ' box-sizing: border-box;',
615
- '}',
616
- '.cl-exec-v2 .cl-openagent-header-v2:hover {',
617
- ' background: linear-gradient(90deg, rgba(220, 38, 38, 0.12) 0%, rgba(220, 38, 38, 0) 34%),',
618
- ' linear-gradient(90deg, rgb(250, 250, 251) 0%, rgb(250, 250, 251) 100%) !important;',
619
- '}',
620
-
621
- // ── V2 圆形灰色头像(替代小徽章)──
622
- '.cl-exec-v2 .cl-openagent-avatar-v2 {',
623
- ' display: inline-block;',
624
- ' width: 24px;',
625
- ' height: 24px;',
626
- ' border-radius: 50%;',
627
- ' background: #d0d0d0;',
628
- ' flex-shrink: 0;',
629
- ' margin-right: 4px;',
630
- '}',
631
-
632
- // ── V2 隐藏旧版 OASN 小徽章和 @agentName ──
633
- '.cl-exec-v2 .cl-openagent-badge,',
634
- '.cl-exec-v2 .cl-openagent-agent {',
635
- ' display: none !important;',
636
- '}',
637
- // ── V2 隐藏步骤标题栏(▼ + "思考中..."),保留进度文字行 ──
638
- '.cl-exec-v2 .cl-tools-collapse-header-v2 {',
639
- ' display: none !important;',
640
- '}',
641
-
642
- // ── V2 Detail Card(大头像 + 右置星级 + 网格点背景)──
643
- '.cl-exec-v2 .cl-exec-detail-card-v2 {',
644
- ' max-width: 488px !important;',
645
- ' width: 100% !important;',
646
- ' padding: 8px 16px 8px 12px !important;',
647
- ' padding-right: 90px !important;',
648
- ' border-radius: 12px !important;',
649
- ' background: #f7f7f8 !important;',
650
- ' margin: 12px 14px 14px 14px !important;',
651
- ' margin-top: 0 !important;',
652
- ' margin-left: 0 !important;',
653
- ' position: relative;',
654
- ' overflow: hidden;',
655
- ' box-sizing: border-box;',
656
- '}',
657
- /* 四角网格点装饰 */
658
- '.cl-exec-v2 .cl-exec-detail-card-v2::before,',
659
- '.cl-exec-v2 .cl-exec-detail-card-v2::after {',
660
- ' content: "";',
661
- ' position: absolute;',
662
- ' width: 40px;',
663
- ' height: 40px;',
664
- ' background-image: radial-gradient(circle, #ddd 1px, transparent 1px);',
665
- ' background-size: 8px 8px;',
666
- ' opacity: 0.5;',
667
- '}',
668
- '.cl-exec-v2 .cl-exec-detail-card-v2::before {',
669
- ' top: 8px;',
670
- ' left: 8px;',
671
- '}',
672
- '.cl-exec-v2 .cl-exec-detail-card-v2::after {',
673
- ' bottom: 8px;',
674
- ' right: 8px;',
675
- '}',
676
-
677
- '.cl-exec-v2 .cl-exec-detail-row-v2 {',
678
- ' display: flex;',
679
- ' gap: 16px;',
680
- '}',
681
-
682
- '.cl-exec-v2 .cl-exec-detail-info-v2 {',
683
- ' display: flex;',
684
- ' flex-direction: column;',
685
- ' gap: 6px;',
686
- ' flex: 1;',
687
- ' min-width: 0;',
688
- '}',
689
-
690
- // ── V2 大头像 68×68 ──
691
- '.cl-exec-v2 .cl-exec-agent-avatar-v2 {',
692
- ' width: 68px !important;',
693
- ' height: 68px !important;',
694
- ' object-fit: contain;',
695
- ' flex-shrink: 0;',
696
- '}',
697
-
698
- // ── V2 名称 ~20px/600/黑色 ──
699
- '.cl-exec-v2 .cl-exec-agent-name-v2 {',
700
- ' font-family: "PingFang SC", sans-serif;',
701
- ' font-size: 20px !important;',
702
- ' font-weight: 600 !important;',
703
- ' color: #000 !important;',
704
- ' margin: 0;',
705
- ' line-height: 1.3;',
706
- '}',
707
-
708
- // ── V2 描述 ~14px/400/灰色 ──
709
- '.cl-exec-v2 .cl-exec-agent-bio-v2 {',
710
- ' font-family: "PingFang SC", sans-serif;',
711
- ' font-size: 14px !important;',
712
- ' font-weight: 400;',
713
- ' color: #888 !important;',
714
- ' margin: 0;',
715
- ' line-height: 1.4;',
716
- '}',
717
-
718
- // ── V2 星级右置到卡片右上角 ──
719
- '.cl-exec-v2 .cl-exec-star-badge-v2 {',
720
- ' position: absolute;',
721
- ' right: 24px;',
722
- ' top: 20px;',
723
- ' display: flex;',
724
- ' align-items: center;',
725
- ' gap: 4px;',
726
- ' padding: 4px 12px;',
727
- ' border-radius: 30px;',
728
- ' background: #ebebeb;',
729
- ' z-index: 1;',
730
- '}',
731
- '.cl-exec-v2 .cl-exec-star-count-v2 {',
732
- ' font-family: "PingFang SC", sans-serif;',
733
- ' font-size: 13px;',
734
- ' font-weight: 500;',
735
- ' color: #555;',
736
- ' white-space: nowrap;',
737
- '}',
738
-
739
- // ── V2 Progress Row(Figma 373:9765 — shimmer 渐变文字 + 箭头)──
740
- '.cl-exec-v2 .cl-exec-progress-row-v2 {',
741
- ' display: flex;',
742
- ' align-items: center;',
743
- ' gap: 2px;',
744
- ' margin-top: 16px;',
745
- ' padding: 0 4px;',
746
- '}',
747
- '.cl-exec-v2 .cl-exec-progress-row-v2 .cl-exec-progress-text {',
748
- ' font-family: "PingFang SC", sans-serif;',
749
- ' font-size: 14px;',
750
- ' font-weight: 400;',
751
- ' line-height: 1.2;',
752
- ' margin: 0;',
753
- ' white-space: nowrap;',
754
- ' background-image: linear-gradient(90deg, #555 0%, #555 36%, #eee 55%, #555 77%, #555 100%);',
755
- ' background-size: 200% 100%;',
756
- ' -webkit-background-clip: text;',
757
- ' background-clip: text;',
758
- ' -webkit-text-fill-color: transparent;',
759
- ' animation: cl-progress-shimmer 2.5s ease-in-out infinite;',
760
- '}',
761
- '.cl-exec-v2 .cl-exec-progress-row-v2 .cl-exec-progress-arrow {',
762
- ' display: flex;',
763
- ' align-items: center;',
764
- ' flex-shrink: 0;',
765
- ' opacity: 1;',
766
- '}',
767
-
768
- // ── V2 隐藏旧版 name-row(星级原来在名称旁边)──
769
- '.cl-exec-v2 .cl-exec-name-row,',
770
- '.cl-exec-v2 .cl-exec-star-badge:not(.cl-exec-star-badge-v2) {',
771
- ' display: none !important;',
772
- '}',
773
-
774
- // ─ V2 步骤列表样式(覆盖 thought-chain-card.js 默认值)──
775
- '.cl-exec-v2 .cl-tools-collapse-body-v2 {',
776
- ' padding: 4px 0 8px;',
777
- '}',
778
- '.cl-exec-v2 .cl-tools-collapse-step {',
779
- ' padding: 5px 0;',
780
- ' gap: 10px;',
781
- '}',
782
- '.cl-exec-v2 .cl-tools-collapse-step-title {',
783
- ' font-size: 13px;',
784
- ' color: #555;',
785
- '}',
786
- '.cl-exec-v2 .cl-tools-collapse-step-check {',
787
- ' width: 12px;',
788
- ' height: 12px;',
789
- ' background: #ccc;',
790
- '}',
791
- '.cl-exec-v2 .cl-tools-collapse-step-dot {',
792
- ' width: 14px;',
793
- ' height: 14px;',
794
- '}',
795
- '.cl-exec-v2 .cl-tools-collapse-step-dot::before,',
796
- '.cl-exec-v2 .cl-tools-collapse-step-dot::after,',
797
- '.cl-exec-v2 .cl-tools-collapse-step-dot span {',
798
- ' width: 3px;',
799
- ' height: 3px;',
800
- ' background: #bbb;',
801
- '}',
802
-
803
- // ── V2 Footer(-由xxx完成 + 星级)──
804
- '.cl-exec-v2 .cl-output-footer-v2 {',
805
- ' display: flex;',
806
- ' align-items: center;',
807
- ' gap: 4px;',
808
- ' font-family: "PingFang SC", sans-serif;',
809
- ' font-size: 13px;',
810
- ' color: #999;',
811
- ' padding: 12px;',
812
- ' margin-top: 8px;',
813
- '}',
814
- '.cl-exec-v2 .cl-output-footer-v2 .cl-output-footer-text {',
815
- ' white-space: nowrap;',
816
- '}',
817
- '.cl-exec-v2 .cl-output-footer-v2 .cl-output-footer-star {',
818
- ' display: flex;',
819
- ' align-items: center;',
820
- ' flex-shrink: 0;',
821
- ' margin-left: 2px;',
822
- '}',
823
- '.cl-exec-v2 .cl-output-footer-v2 .cl-output-footer-count {',
824
- ' font-weight: 500;',
825
- ' white-space: nowrap;',
826
- '}',
827
-
828
- // ── chat-text 下 p 标签样式 ──
829
- '.cl-remote-agent-card .chat-text p {',
830
- ' color: #2F2F33 !important;',
831
- ' text-align: justify;',
832
- ' font-family: "PingFang SC" !important;',
833
- ' font-size: 14px !important;',
834
- ' font-style: normal !important;',
835
- ' font-weight: 400 !important;',
836
- ' line-height: 132% !important;',
837
- '}',
838
-
839
- // ── chat-text 下 code 标签样式(去背景、去边框、加粗)──
840
- '.chat-text code,',
841
- '.cl-remote-agent-card .chat-text code,',
842
- '.cl-remote-agent-card .chat-text p code {',
843
- ' background: transparent !important;',
844
- ' border: none !important;',
845
- ' font-weight: 700 !important;',
846
- '}',
847
- ].join('\n');
848
- document.head.appendChild(style);
849
- // ── 局部 host-shell 标记(不做全局扫描)──
850
- // 只处理当前 cardNode 的祖先链路,不 querySelectorAll 全局
851
- window._clMarkRemoteAgentHostShell = function _clMarkRemoteAgentHostShell(cardNode) {
852
- try {
853
- var hostAdapter = CL.hostAdapter || {};
854
- var node = cardNode && cardNode.parentElement;
855
- var hops = 0;
856
- while (node && node !== document.body && hops < 10) {
857
- if (node.matches && node.matches(
858
- '.chat,.chat-main,.chat-thread,.chat-thread-inner,' +
859
- '.chat-split-container,.content,.content--chat,.shell,.shell--chat'
860
- )) {
861
- break;
862
- }
863
-
864
- var shouldMark = false;
865
- var tag = (node.tagName || '').toLowerCase();
866
- if (typeof hostAdapter.isMarkableHost === 'function') {
867
- shouldMark = hostAdapter.isMarkableHost(node);
868
- }
869
-
870
- if (shouldMark && node.classList) {
871
- node.classList.add('cl-remote-agent-host-shell');
872
- if (tag === 'details' && !node.open) {
873
- node.open = true;
874
- node.setAttribute('open', '');
875
- }
876
- }
877
- node = node.parentElement;
878
- hops++;
879
- }
880
- } catch (err) {}
881
- };
882
-
883
- // 调度器:render hook 生命周期内调用,带延迟重试 + per-node 防抖
884
- window._cl_scheduleHostShellMark = function _cl_scheduleHostShellMark(cardNode) {
885
- if (!cardNode || typeof window._clMarkRemoteAgentHostShell !== 'function') return;
886
-
887
- // 防抖:同一 cardNode 150ms 内不重复调度(标记是幂等的,但有遍历成本)
888
- if (cardNode.__clShellMarkScheduled) return;
889
- cardNode.__clShellMarkScheduled = true;
890
- setTimeout(function() { cardNode.__clShellMarkScheduled = false; }, 150);
891
-
892
- function run() {
893
- try { window._clMarkRemoteAgentHostShell(cardNode); } catch (err) {}
894
- }
895
-
896
- run();
897
- if (typeof requestAnimationFrame === 'function') requestAnimationFrame(run);
898
- setTimeout(run, 0);
899
- setTimeout(run, 80);
900
- };
901
-
902
- console.log('[cl-styles] ✅ remote agent styles injected');
903
- })();