@chrysb/alphaclaw 0.1.25 → 0.2.1
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/bin/alphaclaw.js +400 -54
- package/lib/public/js/app.js +38 -19
- package/lib/public/js/components/channels.js +14 -3
- package/lib/public/js/components/onboarding/welcome-form-step.js +5 -2
- package/lib/public/js/components/onboarding/welcome-setup-step.js +2 -2
- package/lib/public/js/components/telegram-workspace.js +1377 -0
- package/lib/public/js/components/welcome.js +23 -1
- package/lib/public/js/lib/api.js +9 -0
- package/lib/server/constants.js +1 -0
- package/lib/server/helpers.js +32 -0
- package/lib/server/onboarding/github.js +96 -31
- package/lib/server/onboarding/index.js +86 -33
- package/lib/server/onboarding/openclaw.js +4 -11
- package/lib/server/onboarding/workspace.js +26 -3
- package/lib/server/routes/auth.js +24 -6
- package/lib/server/routes/onboarding.js +36 -0
- package/lib/server/routes/proxy.js +4 -4
- package/lib/server/routes/telegram.js +407 -0
- package/lib/server/telegram-api.js +65 -0
- package/lib/server/telegram-workspace.js +82 -0
- package/lib/server/topic-registry.js +152 -0
- package/lib/server.js +7 -1
- package/lib/setup/core-prompts/TOOLS.md +6 -6
- package/lib/setup/env.template +3 -0
- package/lib/setup/gitignore +2 -0
- package/lib/setup/hourly-git-sync.sh +9 -10
- package/package.json +1 -1
|
@@ -9,7 +9,7 @@ const kChannelMeta = {
|
|
|
9
9
|
discord: { label: 'Discord', iconSrc: '/assets/icons/discord.svg' },
|
|
10
10
|
};
|
|
11
11
|
|
|
12
|
-
export function Channels({ channels, onSwitchTab }) {
|
|
12
|
+
export function Channels({ channels, onSwitchTab, onNavigate }) {
|
|
13
13
|
return html`
|
|
14
14
|
<div class="bg-surface border border-border rounded-xl p-4">
|
|
15
15
|
<h2 class="card-label mb-3">Channels</h2>
|
|
@@ -17,6 +17,7 @@ export function Channels({ channels, onSwitchTab }) {
|
|
|
17
17
|
${channels ? ALL_CHANNELS.map(ch => {
|
|
18
18
|
const info = channels[ch];
|
|
19
19
|
const channelMeta = kChannelMeta[ch] || { label: ch.charAt(0).toUpperCase() + ch.slice(1), iconSrc: '' };
|
|
20
|
+
const isClickable = ch === 'telegram' && info?.status === 'paired' && onNavigate;
|
|
20
21
|
let badge;
|
|
21
22
|
if (!info) {
|
|
22
23
|
badge = html`<a
|
|
@@ -29,14 +30,24 @@ export function Channels({ channels, onSwitchTab }) {
|
|
|
29
30
|
} else {
|
|
30
31
|
badge = html`<${Badge} tone="warning">Awaiting pairing</${Badge}>`;
|
|
31
32
|
}
|
|
32
|
-
return html`<div
|
|
33
|
+
return html`<div
|
|
34
|
+
class="flex justify-between items-center py-1.5 ${isClickable ? 'cursor-pointer hover:bg-white/5 -mx-2 px-2 rounded-lg transition-colors' : ''}"
|
|
35
|
+
onclick=${isClickable ? () => onNavigate('telegram') : undefined}
|
|
36
|
+
>
|
|
33
37
|
<span class="font-medium text-sm flex items-center gap-2">
|
|
34
38
|
${channelMeta.iconSrc
|
|
35
39
|
? html`<img src=${channelMeta.iconSrc} alt="" class="w-4 h-4 rounded-sm" aria-hidden="true" />`
|
|
36
40
|
: null}
|
|
37
41
|
${channelMeta.label}
|
|
38
42
|
</span>
|
|
39
|
-
|
|
43
|
+
<span class="flex items-center gap-2">
|
|
44
|
+
${badge}
|
|
45
|
+
${isClickable && html`
|
|
46
|
+
<svg width="14" height="14" viewBox="0 0 16 16" fill="currentColor" class="text-gray-600">
|
|
47
|
+
<path d="M5.646 3.354a.5.5 0 01.708 0l4.5 4.5a.5.5 0 010 .708l-4.5 4.5a.5.5 0 01-.708-.708L9.793 8 5.646 3.854a.5.5 0 010-.5z"/>
|
|
48
|
+
</svg>
|
|
49
|
+
`}
|
|
50
|
+
</span>
|
|
40
51
|
</div>`;
|
|
41
52
|
}) : html`<div class="text-gray-500 text-sm text-center py-2">Loading...</div>`}
|
|
42
53
|
</div>
|
|
@@ -36,6 +36,7 @@ export const WelcomeFormStep = ({
|
|
|
36
36
|
goBack,
|
|
37
37
|
goNext,
|
|
38
38
|
loading,
|
|
39
|
+
githubStepLoading,
|
|
39
40
|
allValid,
|
|
40
41
|
handleSubmit,
|
|
41
42
|
}) => {
|
|
@@ -276,10 +277,12 @@ export const WelcomeFormStep = ({
|
|
|
276
277
|
: html`<div class="w-full"></div>`}
|
|
277
278
|
<button
|
|
278
279
|
onclick=${goNext}
|
|
279
|
-
disabled=${!currentGroupValid}
|
|
280
|
+
disabled=${!currentGroupValid || githubStepLoading}
|
|
280
281
|
class="w-full text-sm font-medium px-4 py-2 rounded-xl transition-all ac-btn-cyan"
|
|
281
282
|
>
|
|
282
|
-
|
|
283
|
+
${activeGroup.id === "github" && githubStepLoading
|
|
284
|
+
? "Checking..."
|
|
285
|
+
: "Next"}
|
|
283
286
|
</button>
|
|
284
287
|
`
|
|
285
288
|
: html`
|
|
@@ -78,7 +78,7 @@ export const WelcomeSetupStep = ({ error, loading, onRetry, onBack }) => {
|
|
|
78
78
|
const currentTip = kSetupTips[tipIndex];
|
|
79
79
|
|
|
80
80
|
return html`
|
|
81
|
-
<div class="min-h-[320px]
|
|
81
|
+
<div class="relative min-h-[320px] pt-4 pb-20 flex">
|
|
82
82
|
<div
|
|
83
83
|
class="flex-1 flex flex-col items-center justify-center text-center gap-4"
|
|
84
84
|
>
|
|
@@ -107,7 +107,7 @@ export const WelcomeSetupStep = ({ error, loading, onRetry, onBack }) => {
|
|
|
107
107
|
<p class="text-sm text-gray-500">This could take 10-15 seconds</p>
|
|
108
108
|
</div>
|
|
109
109
|
<div
|
|
110
|
-
class="
|
|
110
|
+
class="absolute bottom-3 left-3 right-3 bg-black/20 border border-border rounded-lg px-3 py-2 text-xs text-gray-500"
|
|
111
111
|
>
|
|
112
112
|
<span class="text-gray-400">${currentTip.label}: </span>
|
|
113
113
|
${currentTip.text}
|