@eclaw/openclaw-channel 1.0.1 → 1.0.2
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/onboarding.js +10 -9
- package/package.json +1 -1
package/dist/onboarding.js
CHANGED
|
@@ -12,7 +12,7 @@ export const eclawOnboardingAdapter = {
|
|
|
12
12
|
return {
|
|
13
13
|
channel: 'eclaw',
|
|
14
14
|
configured,
|
|
15
|
-
statusLines: [`E-Claw: ${configured ? 'configured
|
|
15
|
+
statusLines: [`E-Claw: ${configured ? 'configured' : 'not configured'}`],
|
|
16
16
|
selectionHint: configured ? 'configured' : 'E-Claw (AI Live Wallpaper Chat)',
|
|
17
17
|
quickstartScore: configured ? 1 : 3,
|
|
18
18
|
};
|
|
@@ -22,21 +22,22 @@ export const eclawOnboardingAdapter = {
|
|
|
22
22
|
const accountId = DEFAULT_ACCOUNT_ID;
|
|
23
23
|
const resolved = resolveAccount(cfg, accountId);
|
|
24
24
|
await prompter.note([
|
|
25
|
-
'
|
|
26
|
-
'
|
|
27
|
-
'
|
|
28
|
-
|
|
25
|
+
'1. Log in to https://eclawbot.com',
|
|
26
|
+
'2. Go to Portal → Settings → Channel API',
|
|
27
|
+
'3. Create an API Key and API Secret',
|
|
28
|
+
'4. Enter the credentials below',
|
|
29
|
+
].join('\n'), 'E-Claw Setup');
|
|
29
30
|
const apiKey = await prompter.text({
|
|
30
31
|
message: 'Channel API Key',
|
|
31
32
|
placeholder: 'eck_...',
|
|
32
33
|
initialValue: resolved.apiKey || '',
|
|
33
|
-
validate: (v) => (String(v ?? '').trim() ? undefined : '
|
|
34
|
+
validate: (v) => (String(v ?? '').trim() ? undefined : 'Required'),
|
|
34
35
|
});
|
|
35
36
|
const apiSecret = await prompter.text({
|
|
36
37
|
message: 'Channel API Secret',
|
|
37
38
|
placeholder: 'ecs_...',
|
|
38
39
|
initialValue: resolved.apiSecret || '',
|
|
39
|
-
validate: (v) => (String(v ?? '').trim() ? undefined : '
|
|
40
|
+
validate: (v) => (String(v ?? '').trim() ? undefined : 'Required'),
|
|
40
41
|
});
|
|
41
42
|
const entityIdStr = await prompter.text({
|
|
42
43
|
message: 'Entity ID (0–3)',
|
|
@@ -44,11 +45,11 @@ export const eclawOnboardingAdapter = {
|
|
|
44
45
|
initialValue: String(resolved.entityId ?? 0),
|
|
45
46
|
validate: (v) => {
|
|
46
47
|
const n = Number(v);
|
|
47
|
-
return Number.isInteger(n) && n >= 0 && n <= 3 ? undefined : '
|
|
48
|
+
return Number.isInteger(n) && n >= 0 && n <= 3 ? undefined : 'Must be 0–3';
|
|
48
49
|
},
|
|
49
50
|
});
|
|
50
51
|
const botName = await prompter.text({
|
|
51
|
-
message: 'Bot
|
|
52
|
+
message: 'Bot display name (optional)',
|
|
52
53
|
placeholder: 'My Bot',
|
|
53
54
|
initialValue: resolved.botName ?? '',
|
|
54
55
|
});
|