@chrysb/alphaclaw 0.1.0
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 +338 -0
- package/lib/public/icons/chevron-down.svg +9 -0
- package/lib/public/js/app.js +325 -0
- package/lib/public/js/components/badge.js +16 -0
- package/lib/public/js/components/channels.js +36 -0
- package/lib/public/js/components/credentials-modal.js +336 -0
- package/lib/public/js/components/device-pairings.js +72 -0
- package/lib/public/js/components/envars.js +354 -0
- package/lib/public/js/components/gateway.js +163 -0
- package/lib/public/js/components/google.js +223 -0
- package/lib/public/js/components/icons.js +23 -0
- package/lib/public/js/components/models.js +461 -0
- package/lib/public/js/components/pairings.js +74 -0
- package/lib/public/js/components/scope-picker.js +106 -0
- package/lib/public/js/components/toast.js +31 -0
- package/lib/public/js/components/welcome.js +541 -0
- package/lib/public/js/hooks/usePolling.js +29 -0
- package/lib/public/js/lib/api.js +196 -0
- package/lib/public/js/lib/model-config.js +88 -0
- package/lib/public/login.html +90 -0
- package/lib/public/setup.html +33 -0
- package/lib/scripts/systemctl +56 -0
- package/lib/server/auth-profiles.js +101 -0
- package/lib/server/commands.js +84 -0
- package/lib/server/constants.js +282 -0
- package/lib/server/env.js +78 -0
- package/lib/server/gateway.js +262 -0
- package/lib/server/helpers.js +192 -0
- package/lib/server/login-throttle.js +86 -0
- package/lib/server/onboarding/cron.js +51 -0
- package/lib/server/onboarding/github.js +49 -0
- package/lib/server/onboarding/index.js +127 -0
- package/lib/server/onboarding/openclaw.js +171 -0
- package/lib/server/onboarding/validation.js +107 -0
- package/lib/server/onboarding/workspace.js +52 -0
- package/lib/server/openclaw-version.js +179 -0
- package/lib/server/routes/auth.js +80 -0
- package/lib/server/routes/codex.js +204 -0
- package/lib/server/routes/google.js +390 -0
- package/lib/server/routes/models.js +68 -0
- package/lib/server/routes/onboarding.js +116 -0
- package/lib/server/routes/pages.js +21 -0
- package/lib/server/routes/pairings.js +134 -0
- package/lib/server/routes/proxy.js +29 -0
- package/lib/server/routes/system.js +213 -0
- package/lib/server.js +161 -0
- package/lib/setup/core-prompts/AGENTS.md +22 -0
- package/lib/setup/core-prompts/TOOLS.md +18 -0
- package/lib/setup/env.template +19 -0
- package/lib/setup/gitignore +12 -0
- package/lib/setup/hourly-git-sync.sh +86 -0
- package/lib/setup/skills/control-ui/SKILL.md +70 -0
- package/package.json +34 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: control-ui
|
|
3
|
+
description: Know when and how to direct the user to the Setup UI for configuration tasks.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Control UI
|
|
7
|
+
|
|
8
|
+
There is a web-based Setup UI at `{{BASE_URL}}`. The **user** manages runtime configuration through it. You should NOT call these API endpoints yourself or write config files directly — instead, tell the user what they need to do and where to do it.
|
|
9
|
+
|
|
10
|
+
## When to direct the user to the UI
|
|
11
|
+
|
|
12
|
+
### Adding or changing environment variables
|
|
13
|
+
|
|
14
|
+
When the user needs to add a new API key, token, or any env var:
|
|
15
|
+
|
|
16
|
+
> You can add that in your Setup UI → **Envars** tab: {{BASE_URL}}
|
|
17
|
+
|
|
18
|
+
### Connecting a new channel (Telegram, Discord)
|
|
19
|
+
|
|
20
|
+
> Add your bot token in the Setup UI → **Envars** tab, then approve the pairing request in the **General** tab.
|
|
21
|
+
|
|
22
|
+
### Approving or rejecting pairings
|
|
23
|
+
|
|
24
|
+
When a user asks about pairing their Telegram or Discord account:
|
|
25
|
+
|
|
26
|
+
> Open the Setup UI → **General** tab. Pending pairing requests appear automatically — click **Approve** or **Reject**.
|
|
27
|
+
|
|
28
|
+
### Connecting OpenAI Codex OAuth
|
|
29
|
+
|
|
30
|
+
> Connect or reconnect Codex OAuth from the Setup UI → **Models** tab. Click **Connect Codex OAuth** and follow the popup flow.
|
|
31
|
+
|
|
32
|
+
### Connecting Google Workspace
|
|
33
|
+
|
|
34
|
+
> Set up Google Workspace from the Setup UI → **General** tab (Google section). You'll need your OAuth client credentials from Google Cloud Console.
|
|
35
|
+
|
|
36
|
+
Supported Google services (user selects which to enable during OAuth):
|
|
37
|
+
|
|
38
|
+
| Service | Read | Write | Google API |
|
|
39
|
+
|---------|------|-------|------------|
|
|
40
|
+
| Gmail | `gmail:read` | `gmail:write` | `gmail.googleapis.com` |
|
|
41
|
+
| Calendar | `calendar:read` | `calendar:write` | `calendar-json.googleapis.com` |
|
|
42
|
+
| Drive | `drive:read` | `drive:write` | `drive.googleapis.com` |
|
|
43
|
+
| Sheets | `sheets:read` | `sheets:write` | `sheets.googleapis.com` |
|
|
44
|
+
| Docs | `docs:read` | `docs:write` | `docs.googleapis.com` |
|
|
45
|
+
| Tasks | `tasks:read` | `tasks:write` | `tasks.googleapis.com` |
|
|
46
|
+
| Contacts | `contacts:read` | `contacts:write` | `people.googleapis.com` |
|
|
47
|
+
| Meet | `meet:read` | `meet:write` | `meet.googleapis.com` |
|
|
48
|
+
|
|
49
|
+
Default enabled: Gmail (read), Calendar (read+write), Drive (read), Sheets (read), Docs (read).
|
|
50
|
+
|
|
51
|
+
The `gog` CLI is available to verify Google API access:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
gog auth list --plain
|
|
55
|
+
gog gmail labels list --account user@gmail.com
|
|
56
|
+
gog calendar calendars --account user@gmail.com
|
|
57
|
+
gog drive ls --account user@gmail.com
|
|
58
|
+
gog sheets metadata SPREADSHEET_ID --account user@gmail.com
|
|
59
|
+
gog contacts list --account user@gmail.com
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Config lives at `/data/.openclaw/gogcli/`.
|
|
63
|
+
|
|
64
|
+
## What the Setup UI provides (for your awareness)
|
|
65
|
+
|
|
66
|
+
This is a reference so you know what's available — not an invitation to call these endpoints.
|
|
67
|
+
|
|
68
|
+
- **General tab**: Gateway status/restart, OpenClaw version + update, channel health, pending pairings, Google Workspace
|
|
69
|
+
- **Models tab**: Primary model selection, provider credentials, Codex OAuth
|
|
70
|
+
- **Envars tab**: View/edit/add environment variables, save to `/data/.env`
|
package/package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@chrysb/alphaclaw",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public"
|
|
6
|
+
},
|
|
7
|
+
"description": "Setup UI, gateway manager, and onboarding wrapper for OpenClaw",
|
|
8
|
+
"bin": {
|
|
9
|
+
"alphaclaw": "./bin/alphaclaw.js"
|
|
10
|
+
},
|
|
11
|
+
"files": [
|
|
12
|
+
"bin/",
|
|
13
|
+
"lib/"
|
|
14
|
+
],
|
|
15
|
+
"scripts": {
|
|
16
|
+
"start": "node bin/alphaclaw.js start",
|
|
17
|
+
"test": "vitest run",
|
|
18
|
+
"test:watch": "vitest",
|
|
19
|
+
"test:coverage": "vitest run --coverage"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"express": "^4.21.0",
|
|
23
|
+
"http-proxy": "^1.18.1",
|
|
24
|
+
"openclaw": "latest"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@vitest/coverage-v8": "^4.0.18",
|
|
28
|
+
"supertest": "^7.2.2",
|
|
29
|
+
"vitest": "^4.0.18"
|
|
30
|
+
},
|
|
31
|
+
"engines": {
|
|
32
|
+
"node": ">=22.12.0"
|
|
33
|
+
}
|
|
34
|
+
}
|