@chrysb/alphaclaw 0.6.2-beta.4 → 0.6.2-beta.6
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/lib/public/assets/icons/slack.svg +17 -0
- package/lib/public/css/cron.css +91 -39
- package/lib/public/js/components/add-channel-menu.js +59 -0
- package/lib/public/js/components/agents-tab/agent-bindings-section/index.js +14 -38
- package/lib/public/js/components/agents-tab/agent-bindings-section/use-channel-items.js +0 -6
- package/lib/public/js/components/agents-tab/create-channel-modal.js +185 -47
- package/lib/public/js/components/channels.js +15 -44
- package/lib/public/js/components/cron-tab/cron-calendar.js +287 -164
- package/lib/public/js/components/cron-tab/cron-insights-panel.js +325 -0
- package/lib/public/js/components/cron-tab/cron-job-detail.js +38 -363
- package/lib/public/js/components/cron-tab/cron-job-settings-card.js +233 -0
- package/lib/public/js/components/cron-tab/cron-overview.js +40 -19
- package/lib/public/js/components/cron-tab/cron-prompt-editor.js +173 -0
- package/lib/public/js/components/cron-tab/cron-run-history-panel.js +69 -56
- package/lib/public/js/components/cron-tab/cron-runs-trend-card.js +20 -2
- package/lib/public/js/components/cron-tab/index.js +170 -78
- package/lib/public/js/components/envars.js +4 -3
- package/lib/public/js/components/file-viewer/editor-surface.js +5 -1
- package/lib/public/js/components/file-viewer/use-editor-line-number-sync.js +36 -0
- package/lib/public/js/components/file-viewer/use-file-viewer.js +7 -23
- package/lib/public/js/components/file-viewer/utils.js +1 -5
- package/lib/public/js/components/onboarding/pairing-utils.js +1 -0
- package/lib/public/js/components/onboarding/welcome-config.js +31 -1
- package/lib/public/js/components/onboarding/welcome-form-step.js +145 -67
- package/lib/public/js/components/onboarding/welcome-pairing-step.js +89 -50
- package/lib/public/js/components/pairings.js +1 -1
- package/lib/public/js/components/welcome/index.js +1 -0
- package/lib/public/js/lib/channel-provider-availability.js +23 -0
- package/lib/server/agents/channels.js +110 -6
- package/lib/server/agents/shared.js +70 -1
- package/lib/server/constants.js +13 -0
- package/lib/server/gateway.js +28 -11
- package/lib/server/onboarding/openclaw.js +30 -0
- package/lib/server/onboarding/validation.js +1 -1
- package/lib/server/routes/pairings.js +2 -2
- package/lib/server/routes/system.js +9 -2
- package/lib/server/slack-api.js +38 -0
- package/lib/server/watchdog-notify.js +20 -3
- package/lib/server.js +3 -1
- package/package.json +1 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<svg width="54" height="54" viewBox="0 0 54 54" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<g clip-path="url(#clip0_4127_70105)">
|
|
3
|
+
<path d="M11.379 33.9993C11.379 37.1358 8.84512 39.6507 5.7276 39.6507C2.61008 39.6507 0.0572205 37.1168 0.0572205 33.9993C0.0572205 30.8817 2.5911 28.3479 5.70862 28.3479H11.36V33.9993H11.379Z" fill="#E01E5A"/>
|
|
4
|
+
<path d="M14.1962 33.9997C14.1962 30.8632 16.7301 28.3483 19.8476 28.3483C22.9651 28.3483 25.499 30.8822 25.499 33.9997V48.1353C25.499 51.2718 22.9651 53.7867 19.8476 53.7867C16.7301 53.7867 14.1962 51.2718 14.1962 48.1353V33.9997Z" fill="#E01E5A"/>
|
|
5
|
+
<path d="M19.8662 11.2673C16.7296 11.2673 14.2148 8.73347 14.2148 5.61594C14.2148 2.49842 16.7486 -0.0354538 19.8662 -0.0354538C22.9837 -0.0354538 25.5175 2.49842 25.5175 5.61594V11.2673H19.8662Z" fill="#36C5F0"/>
|
|
6
|
+
<path d="M19.8682 14.1334C23.0047 14.1334 25.5196 16.6673 25.5196 19.7848C25.5196 22.9023 22.9857 25.4362 19.8682 25.4362H5.67566C2.53916 25.4362 0.0242615 22.9023 0.0242615 19.7848C0.0242615 16.6673 2.55814 14.1334 5.67566 14.1334H19.8682Z" fill="#36C5F0"/>
|
|
7
|
+
<path d="M42.5323 19.7853C42.5323 16.6488 45.0662 14.1339 48.1837 14.1339C51.3012 14.1339 53.8351 16.6678 53.8351 19.7853C53.8351 22.9028 51.3012 25.4367 48.1837 25.4367H42.5323V19.7853Z" fill="#2EB67D"/>
|
|
8
|
+
<path d="M39.7126 19.7934C39.7126 22.9299 37.1787 25.4448 34.0612 25.4448C30.9436 25.4448 28.4098 22.911 28.4098 19.7934V5.61986C28.4098 2.48336 30.9436 -0.0315399 34.0612 -0.0315399C37.1787 -0.0315399 39.7126 2.48336 39.7126 5.61986V19.7934Z" fill="#2EB67D"/>
|
|
9
|
+
<path d="M34.0376 42.482C37.1741 42.482 39.689 45.0158 39.689 48.1334C39.689 51.2509 37.1552 53.7848 34.0376 53.7848C30.9201 53.7848 28.3862 51.2509 28.3862 48.1334V42.482H34.0376Z" fill="#ECB22E"/>
|
|
10
|
+
<path d="M34.0381 39.6507C30.9016 39.6507 28.3867 37.1168 28.3867 33.9993C28.3867 30.8818 30.9206 28.3479 34.0381 28.3479H48.2306C51.3671 28.3479 53.882 30.8818 53.882 33.9993C53.882 37.1168 51.3482 39.6507 48.2306 39.6507H34.0381Z" fill="#ECB22E"/>
|
|
11
|
+
</g>
|
|
12
|
+
<defs>
|
|
13
|
+
<clipPath id="clip0_4127_70105">
|
|
14
|
+
<rect width="54" height="54" fill="white"/>
|
|
15
|
+
</clipPath>
|
|
16
|
+
</defs>
|
|
17
|
+
</svg>
|
package/lib/public/css/cron.css
CHANGED
|
@@ -10,26 +10,101 @@
|
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
.cron-tab-header {
|
|
13
|
-
padding: 16px
|
|
13
|
+
padding: 16px 0 12px;
|
|
14
14
|
border-bottom: 1px solid var(--border);
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
+
.cron-tab-header-content {
|
|
18
|
+
width: 100%;
|
|
19
|
+
max-width: 672px;
|
|
20
|
+
margin-left: auto;
|
|
21
|
+
margin-right: auto;
|
|
22
|
+
box-sizing: border-box;
|
|
23
|
+
display: flex;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
gap: 10px;
|
|
26
|
+
}
|
|
27
|
+
|
|
17
28
|
.cron-tab-main {
|
|
18
29
|
flex: 1;
|
|
19
30
|
min-height: 0;
|
|
31
|
+
overflow-y: auto;
|
|
32
|
+
overflow-x: hidden;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.cron-tab-main-content {
|
|
36
|
+
width: min(100% - 40px, 672px);
|
|
37
|
+
margin-left: auto;
|
|
38
|
+
margin-right: auto;
|
|
39
|
+
padding: 0 0 24px;
|
|
40
|
+
min-height: 100%;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.cron-tab-selector-shell {
|
|
44
|
+
position: relative;
|
|
45
|
+
width: min(100%, 320px);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.cron-tab-selector-toggle {
|
|
49
|
+
width: 100%;
|
|
50
|
+
border: 1px solid var(--border);
|
|
51
|
+
border-radius: 10px;
|
|
52
|
+
background: rgba(255, 255, 255, 0.015);
|
|
53
|
+
color: var(--text);
|
|
54
|
+
text-align: left;
|
|
55
|
+
font: inherit;
|
|
56
|
+
padding: 8px 10px;
|
|
20
57
|
display: flex;
|
|
58
|
+
align-items: center;
|
|
59
|
+
justify-content: space-between;
|
|
60
|
+
gap: 8px;
|
|
21
61
|
}
|
|
22
62
|
|
|
23
|
-
.cron-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
63
|
+
.cron-tab-selector-toggle:hover {
|
|
64
|
+
border-color: rgba(148, 163, 184, 0.45);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.cron-tab-selector-toggle.is-open {
|
|
68
|
+
border-color: rgba(99, 235, 255, 0.55);
|
|
69
|
+
background: rgba(99, 235, 255, 0.08);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.cron-tab-selector-title {
|
|
73
|
+
font-size: 14px;
|
|
74
|
+
font-weight: 700;
|
|
75
|
+
color: var(--text);
|
|
76
|
+
white-space: nowrap;
|
|
77
|
+
overflow: hidden;
|
|
78
|
+
text-overflow: ellipsis;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.cron-tab-selector-caret {
|
|
82
|
+
color: var(--text-dim);
|
|
83
|
+
transition: transform 0.12s ease;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.cron-tab-selector-toggle.is-open .cron-tab-selector-caret {
|
|
87
|
+
transform: rotate(180deg);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.cron-tab-selector-dropdown {
|
|
91
|
+
position: absolute;
|
|
92
|
+
top: calc(100% + 8px);
|
|
93
|
+
left: 0;
|
|
94
|
+
width: min(100vw - 40px, 420px);
|
|
95
|
+
max-height: min(70vh, 620px);
|
|
96
|
+
border: 1px solid var(--border);
|
|
97
|
+
border-radius: 12px;
|
|
27
98
|
background: var(--bg-sidebar);
|
|
28
|
-
|
|
99
|
+
box-shadow: 0 14px 32px rgba(0, 0, 0, 0.45);
|
|
100
|
+
overflow: hidden;
|
|
101
|
+
z-index: 8;
|
|
29
102
|
}
|
|
30
103
|
|
|
31
|
-
.cron-list-panel-inner {
|
|
104
|
+
.cron-tab-selector-dropdown .cron-list-panel-inner {
|
|
32
105
|
padding: 0 10px 10px;
|
|
106
|
+
max-height: min(70vh, 620px);
|
|
107
|
+
overflow-y: auto;
|
|
33
108
|
}
|
|
34
109
|
|
|
35
110
|
.cron-list-sticky-search {
|
|
@@ -168,49 +243,26 @@
|
|
|
168
243
|
flex: 0 0 auto;
|
|
169
244
|
}
|
|
170
245
|
|
|
171
|
-
.cron-list-resizer {
|
|
172
|
-
cursor: col-resize;
|
|
173
|
-
position: relative;
|
|
174
|
-
width: 6px;
|
|
175
|
-
margin-left: -3px;
|
|
176
|
-
z-index: 4;
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
.cron-list-resizer::after {
|
|
180
|
-
content: "";
|
|
181
|
-
position: absolute;
|
|
182
|
-
left: 2px;
|
|
183
|
-
top: 0;
|
|
184
|
-
bottom: 0;
|
|
185
|
-
width: 2px;
|
|
186
|
-
background: transparent;
|
|
187
|
-
transition: background 0.12s;
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
.cron-list-resizer:hover::after,
|
|
191
|
-
.cron-list-resizer.is-resizing::after {
|
|
192
|
-
background: rgba(99, 235, 255, 0.55);
|
|
193
|
-
}
|
|
194
|
-
|
|
195
246
|
.cron-detail-panel {
|
|
196
|
-
|
|
247
|
+
height: auto;
|
|
197
248
|
min-width: 0;
|
|
198
|
-
min-height:
|
|
199
|
-
overflow:
|
|
249
|
+
min-height: 100%;
|
|
250
|
+
overflow: visible;
|
|
200
251
|
}
|
|
201
252
|
|
|
202
253
|
.cron-detail-scroll {
|
|
203
|
-
height:
|
|
204
|
-
overflow
|
|
254
|
+
height: auto;
|
|
255
|
+
overflow: visible;
|
|
205
256
|
}
|
|
206
257
|
|
|
207
258
|
.cron-detail-content {
|
|
208
|
-
padding: 16px
|
|
259
|
+
padding: 16px 0 0;
|
|
209
260
|
display: flex;
|
|
210
261
|
flex-direction: column;
|
|
211
262
|
gap: 12px;
|
|
212
263
|
min-height: 100%;
|
|
213
|
-
width:
|
|
264
|
+
width: 100%;
|
|
265
|
+
max-width: 672px;
|
|
214
266
|
margin-left: auto;
|
|
215
267
|
margin-right: auto;
|
|
216
268
|
}
|
|
@@ -227,7 +279,7 @@
|
|
|
227
279
|
|
|
228
280
|
.cron-prompt-editor-shell .file-viewer-editor-line-num-col {
|
|
229
281
|
width: 44px;
|
|
230
|
-
padding: 16px
|
|
282
|
+
padding: 16px 10px 112px 0;
|
|
231
283
|
}
|
|
232
284
|
|
|
233
285
|
.cron-calendar-repeating-strip {
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { h } from "https://esm.sh/preact";
|
|
2
|
+
import htm from "https://esm.sh/htm";
|
|
3
|
+
import { ActionButton } from "./action-button.js";
|
|
4
|
+
import { AddLineIcon } from "./icons.js";
|
|
5
|
+
import { OverflowMenu, OverflowMenuItem } from "./overflow-menu.js";
|
|
6
|
+
|
|
7
|
+
const html = htm.bind(h);
|
|
8
|
+
|
|
9
|
+
export const AddChannelMenu = ({
|
|
10
|
+
open = false,
|
|
11
|
+
onClose = () => {},
|
|
12
|
+
onToggle = () => {},
|
|
13
|
+
triggerDisabled = false,
|
|
14
|
+
channelIds = [],
|
|
15
|
+
getChannelMeta = () => ({ label: "Channel", iconSrc: "" }),
|
|
16
|
+
isChannelDisabled = () => false,
|
|
17
|
+
onSelectChannel = () => {},
|
|
18
|
+
}) => html`
|
|
19
|
+
<${OverflowMenu}
|
|
20
|
+
open=${open}
|
|
21
|
+
ariaLabel="Add channel"
|
|
22
|
+
title="Add channel"
|
|
23
|
+
onClose=${onClose}
|
|
24
|
+
onToggle=${onToggle}
|
|
25
|
+
renderTrigger=${({ onToggle: handleToggle, ariaLabel, title }) => html`
|
|
26
|
+
<${ActionButton}
|
|
27
|
+
onClick=${handleToggle}
|
|
28
|
+
disabled=${triggerDisabled}
|
|
29
|
+
loading=${false}
|
|
30
|
+
loadingMode="inline"
|
|
31
|
+
tone="subtle"
|
|
32
|
+
size="sm"
|
|
33
|
+
idleLabel="Add channel"
|
|
34
|
+
loadingLabel="Opening..."
|
|
35
|
+
idleIcon=${AddLineIcon}
|
|
36
|
+
idleIconClassName="h-3.5 w-3.5"
|
|
37
|
+
iconOnly=${true}
|
|
38
|
+
title=${title}
|
|
39
|
+
ariaLabel=${ariaLabel}
|
|
40
|
+
/>
|
|
41
|
+
`}
|
|
42
|
+
>
|
|
43
|
+
${channelIds.map((channelId) => {
|
|
44
|
+
const channelMeta = getChannelMeta(channelId);
|
|
45
|
+
const disabled = !!isChannelDisabled(channelId);
|
|
46
|
+
return html`
|
|
47
|
+
<${OverflowMenuItem}
|
|
48
|
+
key=${channelId}
|
|
49
|
+
iconSrc=${channelMeta.iconSrc}
|
|
50
|
+
disabled=${disabled}
|
|
51
|
+
onClick=${() => onSelectChannel(channelId)}
|
|
52
|
+
>
|
|
53
|
+
${channelMeta.label}
|
|
54
|
+
</${OverflowMenuItem}>
|
|
55
|
+
`;
|
|
56
|
+
})}
|
|
57
|
+
</${OverflowMenu}>
|
|
58
|
+
`;
|
|
59
|
+
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { h } from "https://esm.sh/preact";
|
|
2
2
|
import htm from "https://esm.sh/htm";
|
|
3
|
+
import { isChannelProviderDisabledForAdd } from "../../../lib/channel-provider-availability.js";
|
|
4
|
+
import { AddChannelMenu } from "../../add-channel-menu.js";
|
|
3
5
|
import { ActionButton } from "../../action-button.js";
|
|
4
6
|
import { ALL_CHANNELS, ChannelsCard, getChannelMeta } from "../../channels.js";
|
|
5
7
|
import { ConfirmDialog } from "../../confirm-dialog.js";
|
|
6
8
|
import { AddLineIcon } from "../../icons.js";
|
|
7
|
-
import { OverflowMenu, OverflowMenuItem } from "../../overflow-menu.js";
|
|
8
9
|
import { CreateChannelModal } from "../create-channel-modal.js";
|
|
9
10
|
import { ChannelCardItem } from "./channel-item-trailing.js";
|
|
10
11
|
import { useAgentBindings } from "./use-agent-bindings.js";
|
|
@@ -50,7 +51,7 @@ export const AgentBindingsSection = ({
|
|
|
50
51
|
setShowCreateModal,
|
|
51
52
|
showCreateModal,
|
|
52
53
|
} = useAgentBindings({ agent, agents });
|
|
53
|
-
const {
|
|
54
|
+
const { mergedChannelItems } = useChannelItems({
|
|
54
55
|
agentId,
|
|
55
56
|
agentNameMap,
|
|
56
57
|
channelStatus,
|
|
@@ -108,48 +109,23 @@ export const AgentBindingsSection = ({
|
|
|
108
109
|
/>`;
|
|
109
110
|
}}
|
|
110
111
|
actions=${html`
|
|
111
|
-
<${
|
|
112
|
+
<${AddChannelMenu}
|
|
112
113
|
open=${menuOpenId === "__create_channel"}
|
|
113
|
-
ariaLabel="Add channel"
|
|
114
|
-
title="Add channel"
|
|
115
114
|
onClose=${() => setMenuOpenId("")}
|
|
116
115
|
onToggle=${() =>
|
|
117
116
|
setMenuOpenId((current) =>
|
|
118
117
|
current === "__create_channel" ? "" : "__create_channel",
|
|
119
118
|
)}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
idleIconClassName="h-3.5 w-3.5"
|
|
131
|
-
iconOnly=${true}
|
|
132
|
-
title=${title}
|
|
133
|
-
ariaLabel=${ariaLabel}
|
|
134
|
-
idleLabel="Add channel"
|
|
135
|
-
/>
|
|
136
|
-
`}
|
|
137
|
-
>
|
|
138
|
-
${ALL_CHANNELS.map((channelId) => {
|
|
139
|
-
const channelMeta = getChannelMeta(channelId);
|
|
140
|
-
const isDisabled = channelId === "discord" && hasDiscordAccount;
|
|
141
|
-
return html`
|
|
142
|
-
<${OverflowMenuItem}
|
|
143
|
-
key=${channelId}
|
|
144
|
-
iconSrc=${channelMeta.iconSrc}
|
|
145
|
-
disabled=${isDisabled}
|
|
146
|
-
onClick=${() => openCreateChannelModal(channelId)}
|
|
147
|
-
>
|
|
148
|
-
${channelMeta.label}
|
|
149
|
-
</${OverflowMenuItem}>
|
|
150
|
-
`;
|
|
151
|
-
})}
|
|
152
|
-
</${OverflowMenu}>
|
|
119
|
+
triggerDisabled=${saving}
|
|
120
|
+
channelIds=${ALL_CHANNELS}
|
|
121
|
+
getChannelMeta=${getChannelMeta}
|
|
122
|
+
isChannelDisabled=${(channelId) =>
|
|
123
|
+
isChannelProviderDisabledForAdd({
|
|
124
|
+
configuredChannelMap,
|
|
125
|
+
provider: channelId,
|
|
126
|
+
})}
|
|
127
|
+
onSelectChannel=${openCreateChannelModal}
|
|
128
|
+
/>
|
|
153
129
|
`}
|
|
154
130
|
/>
|
|
155
131
|
</div>
|
|
@@ -20,11 +20,6 @@ export const useChannelItems = ({
|
|
|
20
20
|
defaultAgentId = "",
|
|
21
21
|
isDefaultAgent = false,
|
|
22
22
|
}) => {
|
|
23
|
-
const hasDiscordAccount = useMemo(() => {
|
|
24
|
-
const discordChannel = configuredChannelMap.get("discord");
|
|
25
|
-
return Array.isArray(discordChannel?.accounts) && discordChannel.accounts.length > 0;
|
|
26
|
-
}, [configuredChannelMap]);
|
|
27
|
-
|
|
28
23
|
const [showAssignedElsewhere, setShowAssignedElsewhere] = useState(false);
|
|
29
24
|
|
|
30
25
|
const channelItemData = useMemo(() => {
|
|
@@ -205,7 +200,6 @@ export const useChannelItems = ({
|
|
|
205
200
|
}, [assignedElsewhereItems, showAssignedElsewhere, visibleChannelItems]);
|
|
206
201
|
|
|
207
202
|
return {
|
|
208
|
-
hasDiscordAccount,
|
|
209
203
|
mergedChannelItems,
|
|
210
204
|
};
|
|
211
205
|
};
|