@chrysb/alphaclaw 0.3.3 → 0.3.4
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 +18 -0
- package/lib/plugin/usage-tracker/index.js +308 -0
- package/lib/plugin/usage-tracker/openclaw.plugin.json +8 -0
- package/lib/public/css/explorer.css +51 -1
- package/lib/public/css/shell.css +3 -1
- package/lib/public/css/theme.css +35 -0
- package/lib/public/js/app.js +73 -24
- package/lib/public/js/components/file-tree.js +231 -28
- package/lib/public/js/components/file-viewer.js +193 -20
- package/lib/public/js/components/segmented-control.js +33 -0
- package/lib/public/js/components/sidebar.js +14 -32
- package/lib/public/js/components/telegram-workspace/index.js +353 -0
- package/lib/public/js/components/telegram-workspace/manage.js +397 -0
- package/lib/public/js/components/telegram-workspace/onboarding.js +616 -0
- package/lib/public/js/components/usage-tab.js +528 -0
- package/lib/public/js/components/watchdog-tab.js +1 -1
- package/lib/public/js/lib/api.js +25 -1
- package/lib/public/js/lib/telegram-api.js +78 -0
- package/lib/public/js/lib/ui-settings.js +38 -0
- package/lib/public/setup.html +34 -30
- package/lib/server/alphaclaw-version.js +3 -3
- package/lib/server/constants.js +1 -0
- package/lib/server/onboarding/openclaw.js +15 -0
- package/lib/server/routes/auth.js +5 -1
- package/lib/server/routes/telegram.js +185 -60
- package/lib/server/routes/usage.js +133 -0
- package/lib/server/usage-db.js +570 -0
- package/lib/server.js +21 -1
- package/lib/setup/core-prompts/AGENTS.md +0 -101
- package/package.json +1 -1
- package/lib/public/js/components/telegram-workspace.js +0 -1365
|
@@ -32,104 +32,3 @@ Changes committed ([abc1234](commit url)): <-- linked commit hash
|
|
|
32
32
|
• path/or/resource (new|edit|delete) — brief description
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
### Release Flow (Beta -> Production)
|
|
36
|
-
|
|
37
|
-
Use this release flow when promoting tested beta builds to production:
|
|
38
|
-
|
|
39
|
-
1. Ensure `main` is clean and synced, and tests pass.
|
|
40
|
-
2. Publish beta iterations as needed:
|
|
41
|
-
- `npm version prerelease --preid=beta`
|
|
42
|
-
- `git push && git push --tags`
|
|
43
|
-
- `npm publish --tag beta`
|
|
44
|
-
3. For beta template testing, pin exact beta in template `package.json` (for example `0.3.2-beta.4`) to avoid Docker layer cache reusing old installs.
|
|
45
|
-
4. When ready for production, publish a stable release version (for example `0.3.2`):
|
|
46
|
-
- `npm version 0.3.2`
|
|
47
|
-
- `git push && git push --tags`
|
|
48
|
-
- `npm publish` (publishes to `latest`)
|
|
49
|
-
5. Return templates to production channel:
|
|
50
|
-
- `@chrysb/alphaclaw: "latest"`
|
|
51
|
-
6. Optionally keep beta branch/tag flows active for next release cycle.
|
|
52
|
-
|
|
53
|
-
### Telegram Notice Format (AlphaClaw)
|
|
54
|
-
|
|
55
|
-
Use this format for any Telegram notices sent from AlphaClaw services (watchdog, system alerts, repair notices):
|
|
56
|
-
|
|
57
|
-
1. Header line (Markdown): `🐺 *AlphaClaw Watchdog*`
|
|
58
|
-
2. Headline line (simple, no `Status:` prefix):
|
|
59
|
-
- `🔴 Crash loop detected`
|
|
60
|
-
- `🔴 Crash loop detected, auto-repairing...`
|
|
61
|
-
- `🟡 Auto-repair started, awaiting health check`
|
|
62
|
-
- `🟢 Auto-repair complete, gateway healthy`
|
|
63
|
-
- `🟢 Gateway healthy again`
|
|
64
|
-
- `🔴 Auto-repair failed`
|
|
65
|
-
3. Append a markdown link to the headline when URL is available:
|
|
66
|
-
- `... - [View logs](<full-url>/#/watchdog)`
|
|
67
|
-
4. Optional context lines like `Trigger: ...`, `Attempt count: ...`
|
|
68
|
-
5. For values with underscores or special characters (for example `crash_loop`), wrap the value in backticks:
|
|
69
|
-
- `Trigger: \`crash_loop\``
|
|
70
|
-
6. Do not use HTML tags (`<b>`, `<a href>`) for Telegram watchdog notices.
|
|
71
|
-
|
|
72
|
-
### UI Conventions
|
|
73
|
-
|
|
74
|
-
Use these conventions for all UI work under `lib/public/js` and `lib/public/css`.
|
|
75
|
-
|
|
76
|
-
#### Component structure
|
|
77
|
-
|
|
78
|
-
- Use arrow-function components and helpers.
|
|
79
|
-
- Prefer shared components over one-off markup when a pattern already exists.
|
|
80
|
-
- Keep constants in `kName` format (e.g. `kUiTabs`, `kGroupOrder`, `kNamePattern`).
|
|
81
|
-
- Keep component-level helpers near the top of the file, before the main export.
|
|
82
|
-
|
|
83
|
-
#### Rendering and composition
|
|
84
|
-
|
|
85
|
-
- Use the `htm` + `preact` pattern:
|
|
86
|
-
- `const html = htm.bind(h);`
|
|
87
|
-
- return `html\`...\``
|
|
88
|
-
- Prefer early return for hidden states (e.g. `if (!visible) return null;`).
|
|
89
|
-
- Use `<PageHeader />` for tab/page headers that need a title and right-side actions.
|
|
90
|
-
- Use card shells consistently: `bg-surface border border-border rounded-xl`.
|
|
91
|
-
|
|
92
|
-
#### Buttons
|
|
93
|
-
|
|
94
|
-
- Primary actions: `ac-btn-cyan`
|
|
95
|
-
- Secondary actions: `ac-btn-secondary`
|
|
96
|
-
- Positive/success actions: `ac-btn-green`
|
|
97
|
-
- Ghost/text actions: `ac-btn-ghost` (use for low-emphasis actions like "Disconnect" or "Add provider")
|
|
98
|
-
- Destructive inline actions: `ac-btn-danger`
|
|
99
|
-
- Use consistent disabled treatment: `opacity-50 cursor-not-allowed`.
|
|
100
|
-
- Keep action sizing consistent (`text-xs px-3 py-1.5 rounded-lg` for compact controls unless there is a clear reason otherwise).
|
|
101
|
-
- For `<PageHeader />` actions, use `ac-btn-cyan` (primary) or `ac-btn-secondary` (secondary) by default; avoid ghost/text-only styling for main header actions.
|
|
102
|
-
- Prefer shared action components when available (`ActionButton`, `UpdateActionButton`, `ConfirmDialog`) before custom button logic.
|
|
103
|
-
- In setup/onboarding auth flows (e.g. Codex OAuth), prefer `<ActionButton />` over raw `<button>` for consistency in tone, sizing, and loading behavior.
|
|
104
|
-
- In multi-step auth flows, keep the active "finish" action visually primary and demote the "start/restart" action to secondary once the flow has started.
|
|
105
|
-
|
|
106
|
-
#### Dialogs and modals
|
|
107
|
-
|
|
108
|
-
- Use `<ConfirmDialog />` for destructive/confirmation flows.
|
|
109
|
-
- Use `<ModalShell />` for non-confirm custom modals that need shared overlay and Escape handling.
|
|
110
|
-
- Modal overlay convention:
|
|
111
|
-
- `fixed inset-0 bg-black/70 flex items-center justify-center p-4 z-50`
|
|
112
|
-
- Modal panel convention:
|
|
113
|
-
- `bg-modal border border-border rounded-xl p-5 ...`
|
|
114
|
-
- Support close-on-overlay click and Escape key for dialogs.
|
|
115
|
-
|
|
116
|
-
#### Inputs and forms
|
|
117
|
-
|
|
118
|
-
- Reuse `<SecretInput />` for sensitive values and token/key inputs.
|
|
119
|
-
- Base input look should remain consistent:
|
|
120
|
-
- `bg-black/30 border border-border rounded-lg ... focus:border-gray-500`
|
|
121
|
-
- Preserve monospace for technical values (`font-mono`) and codes/paths.
|
|
122
|
-
- Prefer inline helper text under fields (`text-xs text-gray-500/600`) for setup guidance.
|
|
123
|
-
|
|
124
|
-
#### Feedback and state
|
|
125
|
-
|
|
126
|
-
- Use `showToast(...)` for user-visible operation outcomes.
|
|
127
|
-
- Prefer semantic toast levels (`success`, `error`, `warning`, `info`) at callsites. Legacy color aliases are only for backwards compatibility.
|
|
128
|
-
- Keep toast positioning relative to the active page container (not the viewport) when layout banners can shift content.
|
|
129
|
-
- Keep loading/saving flags explicit in state (`saving`, `creating`, `restartingGateway`, etc.).
|
|
130
|
-
- Reuse `<LoadingSpinner />` for loading indicators instead of inline spinner SVG markup.
|
|
131
|
-
- Use `<Badge />` for compact status chips (e.g. connected/not connected) instead of one-off status span styling.
|
|
132
|
-
- Use polling via `usePolling` for frequently refreshed backend-backed data.
|
|
133
|
-
- For restart-required flows, render the standardized yellow restart banner style used in `providers`, `envars`, and `webhooks`.
|
|
134
|
-
|
|
135
|
-
For inconsistencies tracking and DRY opportunities, see `lib/setup/core-prompts/UI-DRY-OPPORTUNITIES.md`.
|