openclaw-openagent 1.0.9 → 1.0.12
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/index.js +1 -1
- package/dist/src/app/remote-agent-tool.js +110 -14
- package/dist/src/app/types.d.ts +2 -2
- package/dist/src/plugin-ui/adapters/adapters/oc-2026-04.js +103 -0
- package/dist/src/plugin-ui/adapters/adapters/oc-2026-05.js +125 -0
- package/dist/src/plugin-ui/adapters/adapters/oc-2026-06.js +125 -0
- package/dist/src/plugin-ui/adapters/adapters/oc-unknown.js +48 -0
- package/dist/src/plugin-ui/adapters/oc-2026-04.js +103 -0
- package/dist/src/plugin-ui/adapters/oc-2026-05.js +125 -0
- package/dist/src/plugin-ui/adapters/oc-2026-06.js +125 -0
- package/dist/src/plugin-ui/adapters/oc-unknown.js +48 -0
- package/dist/src/plugin-ui/assets/bg.png +0 -0
- package/dist/src/plugin-ui/assets/icon.png +0 -0
- package/dist/src/plugin-ui/assets/openagent-override.js +2480 -1004
- package/dist/src/plugin-ui/index.d.ts +1 -1
- package/dist/src/plugin-ui/index.js +2 -2
- package/dist/src/plugin-ui/ui-extension-loader/index.d.ts +2 -1
- package/dist/src/plugin-ui/ui-extension-loader/index.js +5 -5
- package/dist/src/plugin-ui/ui-extension-loader/registry-regex.js +128 -13
- package/dist/src/plugin-ui/ui-extension-loader/types.d.ts +4 -1
- package/dist/src/state/store.d.ts +21 -0
- package/dist/src/state/store.js +54 -0
- package/dist/src/transport/oasn/oasn-invocation.d.ts +3 -0
- package/dist/src/transport/oasn/oasn-invocation.js +28 -12
- package/dist/src/transport/oasn/oasn-types.d.ts +8 -4
- package/index.ts +1 -1
- package/openclaw.plugin.json +1 -1
- package/package.json +5 -4
- package/src/app/remote-agent-tool.ts +131 -16
- package/src/app/types.ts +2 -2
- package/src/plugin-ui/adapters/oc-2026-04.js +103 -0
- package/src/plugin-ui/adapters/oc-2026-05.js +125 -0
- package/src/plugin-ui/adapters/oc-2026-06.js +125 -0
- package/src/plugin-ui/adapters/oc-unknown.js +48 -0
- package/src/plugin-ui/assets/bg.png +0 -0
- package/src/plugin-ui/assets/icon.png +0 -0
- package/src/plugin-ui/assets/openagent-override.js +2480 -1004
- package/src/plugin-ui/build.cjs +309 -23
- package/src/plugin-ui/index.ts +2 -2
- package/src/plugin-ui/modules/agent-book/panel/agent-book.js +187 -14
- package/src/plugin-ui/modules/agent-book/panel/agent-card.js +26 -10
- package/src/plugin-ui/modules/agent-book/panel/agent-data.js +1 -1
- package/src/plugin-ui/modules/agent-book/panel/inject-ui.js +149 -1
- package/src/plugin-ui/modules/agent-book/panel/styles.js +352 -210
- package/src/plugin-ui/modules/agent-book/remote-agent-tool/components-core.js +4 -2
- package/src/plugin-ui/modules/agent-book/remote-agent-tool/thought-chain-card.js +4 -1
- package/src/plugin-ui/modules/agent-book/scanner.js +17 -5
- package/src/plugin-ui/modules/agent-book/travelcard/travel-styles.js +5 -0
- package/src/plugin-ui/modules/loader/bootstrap.js +1 -1
- package/src/plugin-ui/modules/loader/shared-state.js +278 -0
- package/src/plugin-ui/modules/remote-agent/execution-card.js +385 -124
- package/src/plugin-ui/modules/remote-agent/native-style-adapter.js +5 -23
- package/src/plugin-ui/modules/remote-agent/output-card.js +97 -31
- package/src/plugin-ui/modules/remote-agent/render-hooks.js +149 -58
- package/src/plugin-ui/modules/remote-agent/styles.js +690 -523
- package/src/plugin-ui/modules/remote-agent/tool-card-model.js +77 -3
- package/src/plugin-ui/postinstall-deploy.cjs +52 -0
- package/src/plugin-ui/ui-extension-loader/index.ts +6 -6
- package/src/plugin-ui/ui-extension-loader/registry-regex.ts +131 -14
- package/src/plugin-ui/ui-extension-loader/types.ts +5 -1
- package/src/state/store.ts +80 -0
- package/src/transport/oasn/oasn-invocation.ts +47 -12
- package/src/transport/oasn/oasn-types.ts +6 -2
- package/src/types/openclaw-plugin-sdk-media-store.d.ts +9 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
// ── OpenClaw 2026.4 host adapter ──
|
|
2
|
+
// Host DOM: chat-tool-msg-collapse -> chat-tool-msg-body -> chat-tool-card.
|
|
3
|
+
|
|
4
|
+
(function _clInstallHostAdapter202604() {
|
|
5
|
+
function _matches(node, selector) {
|
|
6
|
+
return !!(node && selector && node.matches && node.matches(selector));
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
var adapter = {
|
|
10
|
+
id: 'oc-2026-04',
|
|
11
|
+
family: '2026.4',
|
|
12
|
+
css: {
|
|
13
|
+
remoteShell: [
|
|
14
|
+
'details.chat-tool-msg-collapse:has(.cl-remote-agent-card)',
|
|
15
|
+
'.chat-tool-msg-collapse:has(.cl-remote-agent-card)',
|
|
16
|
+
],
|
|
17
|
+
outputHostMargin: [],
|
|
18
|
+
outputHostMarginReset: [
|
|
19
|
+
'details.chat-tool-msg-collapse:has(.cl-remote-agent-card)',
|
|
20
|
+
'.chat-tool-msg-collapse:has(.cl-remote-agent-card)',
|
|
21
|
+
],
|
|
22
|
+
summaryHidden: [
|
|
23
|
+
'details.chat-tool-msg-collapse:has(.cl-remote-agent-card) > summary.chat-tool-msg-summary',
|
|
24
|
+
'.chat-tool-msg-collapse:has(.cl-remote-agent-card) > .chat-tool-msg-summary',
|
|
25
|
+
],
|
|
26
|
+
hostShellRawText: [
|
|
27
|
+
'.chat-tool-msg-body.cl-remote-agent-host-shell > .chat-text',
|
|
28
|
+
],
|
|
29
|
+
rawTextCardHosts: [
|
|
30
|
+
'.chat-tool-msg-body:has(.cl-remote-agent-card) > .chat-text',
|
|
31
|
+
'.chat-tool-card__detail:has(.cl-remote-agent-card) > .chat-text',
|
|
32
|
+
],
|
|
33
|
+
rawTextPlaceholderHosts: [
|
|
34
|
+
'.chat-tool-msg-body:has(.cl-remote-agent-output-placeholder) > .chat-text',
|
|
35
|
+
'.chat-tool-card__detail:has(.cl-remote-agent-output-placeholder) > .chat-text',
|
|
36
|
+
],
|
|
37
|
+
hostBody: [
|
|
38
|
+
'details.chat-tool-msg-collapse:has(.cl-remote-agent-card) > .chat-tool-msg-body',
|
|
39
|
+
'.chat-tool-msg-collapse:has(.cl-remote-agent-card) > .chat-tool-msg-body',
|
|
40
|
+
],
|
|
41
|
+
manualOpenReset: [
|
|
42
|
+
'.chat-tool-msg-collapse.chat-tool-msg-collapse--manual.is-open:has(.cl-remote-agent-card)',
|
|
43
|
+
],
|
|
44
|
+
hostShellReset: [
|
|
45
|
+
'.cl-remote-agent-host-shell.chat-tool-card',
|
|
46
|
+
'.cl-remote-agent-host-shell.chat-tool-card__detail',
|
|
47
|
+
'.cl-remote-agent-host-shell.chat-tool-msg-body',
|
|
48
|
+
'details.cl-remote-agent-host-shell',
|
|
49
|
+
],
|
|
50
|
+
hostShellSummary: [
|
|
51
|
+
'.cl-remote-agent-host-shell > summary.chat-tool-msg-summary',
|
|
52
|
+
'.cl-remote-agent-host-shell > .chat-tool-msg-summary',
|
|
53
|
+
],
|
|
54
|
+
modernCardLayout: false,
|
|
55
|
+
},
|
|
56
|
+
nativeStyle: {
|
|
57
|
+
shellSelectors: [
|
|
58
|
+
'.chat-tool-card:not(:has(.cl-remote-agent-card))',
|
|
59
|
+
'.chat-tool-msg-collapse:not(:has(.cl-remote-agent-card))',
|
|
60
|
+
],
|
|
61
|
+
summarySelectors: [
|
|
62
|
+
'.chat-tool-card__header',
|
|
63
|
+
'.chat-tool-card__title',
|
|
64
|
+
'.chat-tool-msg-summary:not(.cl-remote-agent-host-shell *)',
|
|
65
|
+
],
|
|
66
|
+
indentSelectors: [
|
|
67
|
+
'.chat-group.tool:not(:has(.cl-remote-agent-card))',
|
|
68
|
+
'.chat-bubble:not(:has(.cl-remote-agent-card))',
|
|
69
|
+
],
|
|
70
|
+
},
|
|
71
|
+
selectors: {
|
|
72
|
+
textContext: '.chat-text, .chat-tool-card__detail, .chat-tool-msg-body',
|
|
73
|
+
summary: ':scope > .chat-tool-msg-summary, .chat-tool-msg-summary',
|
|
74
|
+
forceOpenHeader: '.chat-tool-msg-summary',
|
|
75
|
+
rawTextHostClosest: [
|
|
76
|
+
'.chat-tool-msg-body',
|
|
77
|
+
'.chat-tool-card__detail',
|
|
78
|
+
'.chat-bubble',
|
|
79
|
+
],
|
|
80
|
+
rawTextHostsWithinShell: '.chat-tool-msg-body, .chat-tool-card__detail, .chat-bubble',
|
|
81
|
+
},
|
|
82
|
+
isRemoteNativeToolShellCandidate: function(node) {
|
|
83
|
+
return _matches(node, 'details.chat-tool-msg-collapse, .chat-tool-msg-collapse, .chat-tool-card');
|
|
84
|
+
},
|
|
85
|
+
isNativeToolShell: function(node) {
|
|
86
|
+
return _matches(node, 'details.chat-tool-msg-collapse, .chat-tool-msg-collapse');
|
|
87
|
+
},
|
|
88
|
+
isToolLikeShell: function(node) {
|
|
89
|
+
return _matches(node, 'details.chat-tool-msg-collapse, .chat-tool-msg-collapse, .chat-tool-card, .chat-tool-msg-body, .chat-tool-card__detail');
|
|
90
|
+
},
|
|
91
|
+
isToolBody: function(node) {
|
|
92
|
+
return _matches(node, '.chat-tool-msg-body');
|
|
93
|
+
},
|
|
94
|
+
isMarkableHost: function(node) {
|
|
95
|
+
return _matches(node, 'details.chat-tool-msg-collapse, .chat-tool-card, .chat-tool-card__detail, .chat-tool-msg-body');
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
CL.hostAdapter = adapter;
|
|
100
|
+
try {
|
|
101
|
+
document.documentElement.setAttribute('data-openagent-host-adapter', adapter.id);
|
|
102
|
+
} catch (e) {}
|
|
103
|
+
})();
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
// ── OpenClaw 2026.5 host adapter ──
|
|
2
|
+
// Host DOM uses the newer tools-collapse family, with msg-collapse kept as a
|
|
3
|
+
// compatible secondary path for mixed 2026.5 builds.
|
|
4
|
+
|
|
5
|
+
(function _clInstallHostAdapter202605() {
|
|
6
|
+
function _matches(node, selector) {
|
|
7
|
+
return !!(node && selector && node.matches && node.matches(selector));
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
var adapter = {
|
|
11
|
+
id: 'oc-2026-05',
|
|
12
|
+
family: '2026.5',
|
|
13
|
+
css: {
|
|
14
|
+
remoteShell: [
|
|
15
|
+
'details.chat-tools-collapse:has(.cl-remote-agent-card)',
|
|
16
|
+
'details.chat-tool-msg-collapse:has(.cl-remote-agent-card)',
|
|
17
|
+
'.chat-tools-collapse:has(.cl-remote-agent-card)',
|
|
18
|
+
'.chat-tool-msg-collapse:has(.cl-remote-agent-card)',
|
|
19
|
+
],
|
|
20
|
+
outputHostMargin: [
|
|
21
|
+
'details.chat-tools-collapse:has(.cl-output-card)',
|
|
22
|
+
'.chat-tools-collapse:has(.cl-output-card)',
|
|
23
|
+
'details.chat-tool-msg-collapse:has(.cl-remote-agent-card)',
|
|
24
|
+
'.chat-tool-msg-collapse:has(.cl-remote-agent-card)',
|
|
25
|
+
],
|
|
26
|
+
outputHostMarginReset: [],
|
|
27
|
+
summaryHidden: [
|
|
28
|
+
'details.chat-tools-collapse:has(.cl-remote-agent-card) > summary.chat-tools-summary',
|
|
29
|
+
'details.chat-tool-msg-collapse:has(.cl-remote-agent-card) > summary.chat-tool-msg-summary',
|
|
30
|
+
'.chat-tools-collapse:has(.cl-remote-agent-card) > .chat-tools-summary',
|
|
31
|
+
'.chat-tool-msg-collapse:has(.cl-remote-agent-card) > .chat-tool-msg-summary',
|
|
32
|
+
],
|
|
33
|
+
hostShellRawText: [
|
|
34
|
+
'.chat-tools-collapse__body.cl-remote-agent-host-shell > .chat-text',
|
|
35
|
+
'.chat-tool-msg-body.cl-remote-agent-host-shell > .chat-text',
|
|
36
|
+
],
|
|
37
|
+
rawTextCardHosts: [
|
|
38
|
+
'.chat-tools-collapse__body:has(.cl-remote-agent-card) > .chat-text',
|
|
39
|
+
'.chat-tool-msg-body:has(.cl-remote-agent-card) > .chat-text',
|
|
40
|
+
'.chat-tool-card__detail:has(.cl-remote-agent-card) > .chat-text',
|
|
41
|
+
],
|
|
42
|
+
rawTextPlaceholderHosts: [
|
|
43
|
+
'.chat-tools-collapse__body:has(.cl-remote-agent-output-placeholder) > .chat-text',
|
|
44
|
+
'.chat-tool-msg-body:has(.cl-remote-agent-output-placeholder) > .chat-text',
|
|
45
|
+
'.chat-tool-card__detail:has(.cl-remote-agent-output-placeholder) > .chat-text',
|
|
46
|
+
],
|
|
47
|
+
hostBody: [
|
|
48
|
+
'details.chat-tools-collapse:has(.cl-remote-agent-card) > .chat-tools-collapse__body',
|
|
49
|
+
'details.chat-tool-msg-collapse:has(.cl-remote-agent-card) > .chat-tool-msg-body',
|
|
50
|
+
'.chat-tools-collapse:has(.cl-remote-agent-card) > .chat-tools-collapse__body',
|
|
51
|
+
'.chat-tool-msg-collapse:has(.cl-remote-agent-card) > .chat-tool-msg-body',
|
|
52
|
+
],
|
|
53
|
+
manualOpenReset: [
|
|
54
|
+
'.chat-tool-msg-collapse.chat-tool-msg-collapse--manual.is-open:has(.cl-remote-agent-card)',
|
|
55
|
+
],
|
|
56
|
+
hostShellReset: [
|
|
57
|
+
'.cl-remote-agent-host-shell.chat-tool-card',
|
|
58
|
+
'.cl-remote-agent-host-shell.chat-tool-card__detail',
|
|
59
|
+
'.cl-remote-agent-host-shell.chat-tools-collapse__body',
|
|
60
|
+
'.cl-remote-agent-host-shell.chat-tool-msg-body',
|
|
61
|
+
'details.cl-remote-agent-host-shell',
|
|
62
|
+
],
|
|
63
|
+
hostShellSummary: [
|
|
64
|
+
'.cl-remote-agent-host-shell > summary.chat-tools-summary',
|
|
65
|
+
'.cl-remote-agent-host-shell > summary.chat-tool-msg-summary',
|
|
66
|
+
'.cl-remote-agent-host-shell > .chat-tools-summary',
|
|
67
|
+
'.cl-remote-agent-host-shell > .chat-tool-msg-summary',
|
|
68
|
+
],
|
|
69
|
+
modernCardLayout: true,
|
|
70
|
+
},
|
|
71
|
+
nativeStyle: {
|
|
72
|
+
shellSelectors: [
|
|
73
|
+
'.chat-tool-card:not(:has(.cl-remote-agent-card))',
|
|
74
|
+
'.chat-tool-msg-collapse:not(:has(.cl-remote-agent-card))',
|
|
75
|
+
'.chat-tools-collapse:not(:has(.cl-remote-agent-card))',
|
|
76
|
+
'.tool-card:not(:has(.cl-remote-agent-card))',
|
|
77
|
+
'.chat-tool-card__wrapper:not(:has(.cl-remote-agent-card))',
|
|
78
|
+
],
|
|
79
|
+
summarySelectors: [
|
|
80
|
+
'.chat-tool-card__header',
|
|
81
|
+
'.chat-tool-card__title',
|
|
82
|
+
'.chat-tool-msg-summary:not(.cl-remote-agent-host-shell *)',
|
|
83
|
+
'.chat-tools-summary:not(.cl-remote-agent-host-shell *)',
|
|
84
|
+
'.tool-card__header',
|
|
85
|
+
'.tool-card__title',
|
|
86
|
+
],
|
|
87
|
+
indentSelectors: [
|
|
88
|
+
'.chat-group.tool:not(:has(.cl-remote-agent-card))',
|
|
89
|
+
'.chat-bubble:not(:has(.cl-remote-agent-card))',
|
|
90
|
+
],
|
|
91
|
+
},
|
|
92
|
+
selectors: {
|
|
93
|
+
textContext: '.chat-text, .chat-tool-card__detail, .chat-tool-msg-body, .chat-tools-collapse__body',
|
|
94
|
+
summary: ':scope > summary, :scope > .chat-tools-summary, :scope > .chat-tool-msg-summary, .chat-tools-summary, .chat-tool-msg-summary',
|
|
95
|
+
forceOpenHeader: '.chat-tool-msg-summary, .chat-tools-summary',
|
|
96
|
+
rawTextHostClosest: [
|
|
97
|
+
'.chat-tools-collapse__body',
|
|
98
|
+
'.chat-tool-msg-body',
|
|
99
|
+
'.chat-tool-card__detail',
|
|
100
|
+
'.chat-bubble',
|
|
101
|
+
],
|
|
102
|
+
rawTextHostsWithinShell: '.chat-tools-collapse__body, .chat-tool-msg-body, .chat-tool-card__detail, .chat-bubble',
|
|
103
|
+
},
|
|
104
|
+
isRemoteNativeToolShellCandidate: function(node) {
|
|
105
|
+
return _matches(node, 'details.chat-tools-collapse, details.chat-tool-msg-collapse, .chat-tools-collapse, .chat-tool-msg-collapse, .chat-tool-card');
|
|
106
|
+
},
|
|
107
|
+
isNativeToolShell: function(node) {
|
|
108
|
+
return _matches(node, 'details.chat-tools-collapse, details.chat-tool-msg-collapse, .chat-tools-collapse, .chat-tool-msg-collapse');
|
|
109
|
+
},
|
|
110
|
+
isToolLikeShell: function(node) {
|
|
111
|
+
return _matches(node, 'details.chat-tools-collapse, details.chat-tool-msg-collapse, .chat-tools-collapse, .chat-tool-msg-collapse, .chat-tool-card, .chat-tools-collapse__body, .chat-tool-msg-body, .chat-tool-card__detail');
|
|
112
|
+
},
|
|
113
|
+
isToolBody: function(node) {
|
|
114
|
+
return _matches(node, '.chat-tools-collapse__body, .chat-tool-msg-body');
|
|
115
|
+
},
|
|
116
|
+
isMarkableHost: function(node) {
|
|
117
|
+
return _matches(node, 'details.chat-tools-collapse, details.chat-tool-msg-collapse, .chat-tool-card, .chat-tool-card__detail, .chat-tools-collapse__body, .chat-tool-msg-body');
|
|
118
|
+
},
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
CL.hostAdapter = adapter;
|
|
122
|
+
try {
|
|
123
|
+
document.documentElement.setAttribute('data-openagent-host-adapter', adapter.id);
|
|
124
|
+
} catch (e) {}
|
|
125
|
+
})();
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
// ── OpenClaw 2026.6 host adapter ──
|
|
2
|
+
// 2026.6 uses the V2 OpenAgent card path and the newer tools-collapse host
|
|
3
|
+
// structure. Selector values intentionally mirror the 2026.5 adapter.
|
|
4
|
+
|
|
5
|
+
(function _clInstallHostAdapter202606() {
|
|
6
|
+
function _matches(node, selector) {
|
|
7
|
+
return !!(node && selector && node.matches && node.matches(selector));
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
var adapter = {
|
|
11
|
+
id: 'oc-2026-06',
|
|
12
|
+
family: '2026.6',
|
|
13
|
+
css: {
|
|
14
|
+
remoteShell: [
|
|
15
|
+
'details.chat-tools-collapse:has(.cl-remote-agent-card)',
|
|
16
|
+
'details.chat-tool-msg-collapse:has(.cl-remote-agent-card)',
|
|
17
|
+
'.chat-tools-collapse:has(.cl-remote-agent-card)',
|
|
18
|
+
'.chat-tool-msg-collapse:has(.cl-remote-agent-card)',
|
|
19
|
+
],
|
|
20
|
+
outputHostMargin: [
|
|
21
|
+
'details.chat-tools-collapse:has(.cl-output-card)',
|
|
22
|
+
'.chat-tools-collapse:has(.cl-output-card)',
|
|
23
|
+
'details.chat-tool-msg-collapse:has(.cl-remote-agent-card)',
|
|
24
|
+
'.chat-tool-msg-collapse:has(.cl-remote-agent-card)',
|
|
25
|
+
],
|
|
26
|
+
outputHostMarginReset: [],
|
|
27
|
+
summaryHidden: [
|
|
28
|
+
'details.chat-tools-collapse:has(.cl-remote-agent-card) > summary.chat-tools-summary',
|
|
29
|
+
'details.chat-tool-msg-collapse:has(.cl-remote-agent-card) > summary.chat-tool-msg-summary',
|
|
30
|
+
'.chat-tools-collapse:has(.cl-remote-agent-card) > .chat-tools-summary',
|
|
31
|
+
'.chat-tool-msg-collapse:has(.cl-remote-agent-card) > .chat-tool-msg-summary',
|
|
32
|
+
],
|
|
33
|
+
hostShellRawText: [
|
|
34
|
+
'.chat-tools-collapse__body.cl-remote-agent-host-shell > .chat-text',
|
|
35
|
+
'.chat-tool-msg-body.cl-remote-agent-host-shell > .chat-text',
|
|
36
|
+
],
|
|
37
|
+
rawTextCardHosts: [
|
|
38
|
+
'.chat-tools-collapse__body:has(.cl-remote-agent-card) > .chat-text',
|
|
39
|
+
'.chat-tool-msg-body:has(.cl-remote-agent-card) > .chat-text',
|
|
40
|
+
'.chat-tool-card__detail:has(.cl-remote-agent-card) > .chat-text',
|
|
41
|
+
],
|
|
42
|
+
rawTextPlaceholderHosts: [
|
|
43
|
+
'.chat-tools-collapse__body:has(.cl-remote-agent-output-placeholder) > .chat-text',
|
|
44
|
+
'.chat-tool-msg-body:has(.cl-remote-agent-output-placeholder) > .chat-text',
|
|
45
|
+
'.chat-tool-card__detail:has(.cl-remote-agent-output-placeholder) > .chat-text',
|
|
46
|
+
],
|
|
47
|
+
hostBody: [
|
|
48
|
+
'details.chat-tools-collapse:has(.cl-remote-agent-card) > .chat-tools-collapse__body',
|
|
49
|
+
'details.chat-tool-msg-collapse:has(.cl-remote-agent-card) > .chat-tool-msg-body',
|
|
50
|
+
'.chat-tools-collapse:has(.cl-remote-agent-card) > .chat-tools-collapse__body',
|
|
51
|
+
'.chat-tool-msg-collapse:has(.cl-remote-agent-card) > .chat-tool-msg-body',
|
|
52
|
+
],
|
|
53
|
+
manualOpenReset: [
|
|
54
|
+
'.chat-tool-msg-collapse.chat-tool-msg-collapse--manual.is-open:has(.cl-remote-agent-card)',
|
|
55
|
+
],
|
|
56
|
+
hostShellReset: [
|
|
57
|
+
'.cl-remote-agent-host-shell.chat-tool-card',
|
|
58
|
+
'.cl-remote-agent-host-shell.chat-tool-card__detail',
|
|
59
|
+
'.cl-remote-agent-host-shell.chat-tools-collapse__body',
|
|
60
|
+
'.cl-remote-agent-host-shell.chat-tool-msg-body',
|
|
61
|
+
'details.cl-remote-agent-host-shell',
|
|
62
|
+
],
|
|
63
|
+
hostShellSummary: [
|
|
64
|
+
'.cl-remote-agent-host-shell > summary.chat-tools-summary',
|
|
65
|
+
'.cl-remote-agent-host-shell > summary.chat-tool-msg-summary',
|
|
66
|
+
'.cl-remote-agent-host-shell > .chat-tools-summary',
|
|
67
|
+
'.cl-remote-agent-host-shell > .chat-tool-msg-summary',
|
|
68
|
+
],
|
|
69
|
+
modernCardLayout: true,
|
|
70
|
+
},
|
|
71
|
+
nativeStyle: {
|
|
72
|
+
shellSelectors: [
|
|
73
|
+
'.chat-tool-card:not(:has(.cl-remote-agent-card))',
|
|
74
|
+
'.chat-tool-msg-collapse:not(:has(.cl-remote-agent-card))',
|
|
75
|
+
'.chat-tools-collapse:not(:has(.cl-remote-agent-card))',
|
|
76
|
+
'.tool-card:not(:has(.cl-remote-agent-card))',
|
|
77
|
+
'.chat-tool-card__wrapper:not(:has(.cl-remote-agent-card))',
|
|
78
|
+
],
|
|
79
|
+
summarySelectors: [
|
|
80
|
+
'.chat-tool-card__header',
|
|
81
|
+
'.chat-tool-card__title',
|
|
82
|
+
'.chat-tool-msg-summary:not(.cl-remote-agent-host-shell *)',
|
|
83
|
+
'.chat-tools-summary:not(.cl-remote-agent-host-shell *)',
|
|
84
|
+
'.tool-card__header',
|
|
85
|
+
'.tool-card__title',
|
|
86
|
+
],
|
|
87
|
+
indentSelectors: [
|
|
88
|
+
'.chat-group.tool:not(:has(.cl-remote-agent-card))',
|
|
89
|
+
'.chat-bubble:not(:has(.cl-remote-agent-card))',
|
|
90
|
+
],
|
|
91
|
+
},
|
|
92
|
+
selectors: {
|
|
93
|
+
textContext: '.chat-text, .chat-tool-card__detail, .chat-tool-msg-body, .chat-tools-collapse__body',
|
|
94
|
+
summary: ':scope > summary, :scope > .chat-tools-summary, :scope > .chat-tool-msg-summary, .chat-tools-summary, .chat-tool-msg-summary',
|
|
95
|
+
forceOpenHeader: '.chat-tool-msg-summary, .chat-tools-summary',
|
|
96
|
+
rawTextHostClosest: [
|
|
97
|
+
'.chat-tools-collapse__body',
|
|
98
|
+
'.chat-tool-msg-body',
|
|
99
|
+
'.chat-tool-card__detail',
|
|
100
|
+
'.chat-bubble',
|
|
101
|
+
],
|
|
102
|
+
rawTextHostsWithinShell: '.chat-tools-collapse__body, .chat-tool-msg-body, .chat-tool-card__detail, .chat-bubble',
|
|
103
|
+
},
|
|
104
|
+
isRemoteNativeToolShellCandidate: function(node) {
|
|
105
|
+
return _matches(node, 'details.chat-tools-collapse, details.chat-tool-msg-collapse, .chat-tools-collapse, .chat-tool-msg-collapse, .chat-tool-card');
|
|
106
|
+
},
|
|
107
|
+
isNativeToolShell: function(node) {
|
|
108
|
+
return _matches(node, 'details.chat-tools-collapse, details.chat-tool-msg-collapse, .chat-tools-collapse, .chat-tool-msg-collapse');
|
|
109
|
+
},
|
|
110
|
+
isToolLikeShell: function(node) {
|
|
111
|
+
return _matches(node, 'details.chat-tools-collapse, details.chat-tool-msg-collapse, .chat-tools-collapse, .chat-tool-msg-collapse, .chat-tool-card, .chat-tools-collapse__body, .chat-tool-msg-body, .chat-tool-card__detail');
|
|
112
|
+
},
|
|
113
|
+
isToolBody: function(node) {
|
|
114
|
+
return _matches(node, '.chat-tools-collapse__body, .chat-tool-msg-body');
|
|
115
|
+
},
|
|
116
|
+
isMarkableHost: function(node) {
|
|
117
|
+
return _matches(node, 'details.chat-tools-collapse, details.chat-tool-msg-collapse, .chat-tool-card, .chat-tool-card__detail, .chat-tools-collapse__body, .chat-tool-msg-body');
|
|
118
|
+
},
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
CL.hostAdapter = adapter;
|
|
122
|
+
try {
|
|
123
|
+
document.documentElement.setAttribute('data-openagent-host-adapter', adapter.id);
|
|
124
|
+
} catch (e) {}
|
|
125
|
+
})();
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
// ── Unknown OpenClaw host adapter ──
|
|
2
|
+
// Fail closed: render OpenAgent's own card, but do not apply host-structure
|
|
3
|
+
// takeover selectors when the host version is not one of the supported series.
|
|
4
|
+
|
|
5
|
+
(function _clInstallHostAdapterUnknown() {
|
|
6
|
+
function _false() { return false; }
|
|
7
|
+
|
|
8
|
+
var adapter = {
|
|
9
|
+
id: 'oc-unknown',
|
|
10
|
+
family: 'unknown',
|
|
11
|
+
css: {
|
|
12
|
+
remoteShell: [],
|
|
13
|
+
outputHostMargin: [],
|
|
14
|
+
outputHostMarginReset: [],
|
|
15
|
+
summaryHidden: [],
|
|
16
|
+
hostShellRawText: [],
|
|
17
|
+
rawTextCardHosts: [],
|
|
18
|
+
rawTextPlaceholderHosts: [],
|
|
19
|
+
hostBody: [],
|
|
20
|
+
manualOpenReset: [],
|
|
21
|
+
hostShellReset: [],
|
|
22
|
+
hostShellSummary: [],
|
|
23
|
+
modernCardLayout: false,
|
|
24
|
+
},
|
|
25
|
+
nativeStyle: {
|
|
26
|
+
shellSelectors: [],
|
|
27
|
+
summarySelectors: [],
|
|
28
|
+
indentSelectors: [],
|
|
29
|
+
},
|
|
30
|
+
selectors: {
|
|
31
|
+
textContext: '.chat-text',
|
|
32
|
+
summary: '',
|
|
33
|
+
forceOpenHeader: '',
|
|
34
|
+
rawTextHostClosest: [],
|
|
35
|
+
rawTextHostsWithinShell: '',
|
|
36
|
+
},
|
|
37
|
+
isRemoteNativeToolShellCandidate: _false,
|
|
38
|
+
isNativeToolShell: _false,
|
|
39
|
+
isToolLikeShell: _false,
|
|
40
|
+
isToolBody: _false,
|
|
41
|
+
isMarkableHost: _false,
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
CL.hostAdapter = adapter;
|
|
45
|
+
try {
|
|
46
|
+
document.documentElement.setAttribute('data-openagent-host-adapter', adapter.id);
|
|
47
|
+
} catch (e) {}
|
|
48
|
+
})();
|
|
Binary file
|
|
Binary file
|