@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/lib/server.js CHANGED
@@ -36,6 +36,7 @@ const { createLoginThrottle } = require("./server/login-throttle");
36
36
  const { createOpenclawVersionService } = require("./server/openclaw-version");
37
37
  const { createAlphaclawVersionService } = require("./server/alphaclaw-version");
38
38
  const { syncBootstrapPromptFiles } = require("./server/onboarding/workspace");
39
+ const { createTelegramApi } = require("./server/telegram-api");
39
40
 
40
41
  const { registerAuthRoutes } = require("./server/routes/auth");
41
42
  const { registerPageRoutes } = require("./server/routes/pages");
@@ -46,6 +47,7 @@ const { registerPairingRoutes } = require("./server/routes/pairings");
46
47
  const { registerCodexRoutes } = require("./server/routes/codex");
47
48
  const { registerGoogleRoutes } = require("./server/routes/google");
48
49
  const { registerProxyRoutes } = require("./server/routes/proxy");
50
+ const { registerTelegramRoutes } = require("./server/routes/telegram");
49
51
 
50
52
  const { PORT, GATEWAY_URL, kTrustProxyHops, SETUP_API_PREFIXES } = constants;
51
53
 
@@ -146,6 +148,10 @@ registerGoogleRoutes({
146
148
  getApiEnableUrl,
147
149
  constants,
148
150
  });
151
+ const telegramApi = createTelegramApi(() => process.env.TELEGRAM_BOT_TOKEN);
152
+ const doSyncPromptFiles = () =>
153
+ syncBootstrapPromptFiles({ fs, workspaceDir: constants.WORKSPACE_DIR });
154
+ registerTelegramRoutes({ app, telegramApi, syncPromptFiles: doSyncPromptFiles });
149
155
  registerProxyRoutes({ app, proxy, SETUP_API_PREFIXES, requireAuth });
150
156
 
151
157
  const server = http.createServer(app);
@@ -170,7 +176,7 @@ server.on("upgrade", (req, socket, head) => {
170
176
 
171
177
  server.listen(PORT, "0.0.0.0", () => {
172
178
  console.log(`[alphaclaw] Express listening on :${PORT}`);
173
- syncBootstrapPromptFiles({ fs, workspaceDir: constants.WORKSPACE_DIR });
179
+ doSyncPromptFiles();
174
180
  if (isOnboarded()) {
175
181
  reloadEnv();
176
182
  syncChannelConfig(readEnvFile());
@@ -6,11 +6,11 @@ AlphaClaw UI: `{{SETUP_UI_URL}}`
6
6
 
7
7
  ### Tabs
8
8
 
9
- | Tab | URL | What it manages |
10
- | ------- | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
11
- | General | `{{SETUP_UI_URL}}#general` | Gateway status & restart, channel health (Telegram/Discord), pending pairings, feature health (Embeddings/Audio), Google Workspace connection, repo auto-sync schedule, OpenClaw dashboard |
12
- | Providers | `{{SETUP_UI_URL}}#providers` | AI provider credentials (Anthropic, OpenAI, Gemini, Mistral, Voyage, Groq, Deepgram), feature capabilities, Codex OAuth |
13
- | Envars | `{{SETUP_UI_URL}}#envars` | View/edit/add environment variables (saved to `/data/.env`), gateway restart to apply changes |
9
+ | Tab | URL | What it manages |
10
+ | --------- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
11
+ | General | `{{SETUP_UI_URL}}#general` | Gateway status & restart, channel health (Telegram/Discord), pending pairings, feature health (Embeddings/Audio), Google Workspace connection, repo auto-sync schedule, OpenClaw dashboard |
12
+ | Providers | `{{SETUP_UI_URL}}#providers` | AI provider credentials (Anthropic, OpenAI, Gemini, Mistral, Voyage, Groq, Deepgram), feature capabilities, Codex OAuth |
13
+ | Envars | `{{SETUP_UI_URL}}#envars` | View/edit/add environment variables (saved to `/data/.env`), gateway restart to apply changes |
14
14
 
15
15
  ### Environment variables
16
16
 
@@ -25,7 +25,7 @@ Google Workspace is connected via the **General** tab (`{{SETUP_UI_URL}}#general
25
25
  **Commit and push after every set of changes.** Your entire .openclaw directory (config, cron, workspace) is version controlled. This is how your work survives container restarts.
26
26
 
27
27
  ```bash
28
- cd /data/.openclaw && git add -A && git commit -m "description" && git push
28
+ alphaclaw git-sync --message "description"
29
29
  ```
30
30
 
31
31
  Never force push. Always pull before pushing if there might be remote changes.
@@ -11,6 +11,9 @@ GEMINI_API_KEY=
11
11
  GITHUB_TOKEN=
12
12
  GITHUB_WORKSPACE_REPO=
13
13
 
14
+ # --- Setup UI auth (required) ---
15
+ SETUP_PASSWORD=
16
+
14
17
  # --- Channels (at least one required) ---
15
18
  TELEGRAM_BOT_TOKEN=
16
19
  DISCORD_BOT_TOKEN=
@@ -4,6 +4,8 @@
4
4
  # Whitelist specific files/dirs.
5
5
  !workspace/
6
6
  !workspace/**
7
+ workspace/.openclaw/
8
+ workspace/.openclaw/**
7
9
  !skills/
8
10
  !skills/**
9
11
  !cron/
@@ -4,6 +4,14 @@ set -euo pipefail
4
4
  REPO="$(cd "$(dirname "$0")" && pwd)"
5
5
  cd "$REPO"
6
6
 
7
+ # Load persisted env vars when running under cron's minimal environment.
8
+ if [[ -f "$REPO/.env" ]]; then
9
+ set -a
10
+ # shellcheck disable=SC1091
11
+ source "$REPO/.env"
12
+ set +a
13
+ fi
14
+
7
15
  # Drop cron scheduler runtime-only churn when it is metadata/timestamp-only.
8
16
  maybe_restore_if_runtime_only() {
9
17
  local file="$1"
@@ -73,14 +81,5 @@ NODE
73
81
  maybe_restore_if_runtime_only "cron/jobs.json"
74
82
  maybe_restore_if_runtime_only "crons.json"
75
83
 
76
- # Stage everything else.
77
- git add -A
78
-
79
- # Nothing to commit? done.
80
- if git diff --cached --quiet; then
81
- exit 0
82
- fi
83
-
84
84
  msg="Auto-commit hourly sync $(date -u +'%Y-%m-%dT%H:%M:%SZ')"
85
- git commit -m "$msg"
86
- git push
85
+ alphaclaw git-sync -m "$msg"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chrysb/alphaclaw",
3
- "version": "0.1.25",
3
+ "version": "0.2.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },