@inetafrica/open-claudia 1.20.0 → 2.0.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/.env.example +15 -1
- package/CHANGELOG.md +15 -0
- package/Dockerfile +3 -0
- package/README.md +2 -1
- package/bot.js +109 -3440
- package/channels/kazee/adapter.js +375 -0
- package/channels/kazee/format.js +9 -0
- package/channels/kazee/socket.js +28 -0
- package/channels/telegram/adapter.js +296 -0
- package/channels/telegram/format.js +12 -0
- package/channels/types.js +91 -0
- package/core/access.js +147 -0
- package/core/actions.js +180 -0
- package/core/adapter-registry.js +113 -0
- package/core/auth-flow.js +433 -0
- package/core/channel-wizard.js +174 -0
- package/core/commands.js +73 -0
- package/core/config.js +197 -0
- package/core/context.js +44 -0
- package/core/cron.js +77 -0
- package/core/doctor.js +126 -0
- package/core/handlers.js +995 -0
- package/core/identity.js +87 -0
- package/core/io.js +59 -0
- package/core/kazee-probe.js +48 -0
- package/core/media.js +39 -0
- package/core/onboarding.js +97 -0
- package/core/process-tree.js +40 -0
- package/core/projects.js +43 -0
- package/core/redact.js +26 -0
- package/core/router.js +309 -0
- package/core/runner.js +683 -0
- package/core/state.js +261 -0
- package/core/system-prompt.js +66 -0
- package/core/transcripts.js +71 -0
- package/core/vault-store.js +9 -0
- package/docker-entrypoint.sh +21 -4
- package/package.json +6 -3
- package/project-transcripts.js +17 -12
- package/setup.js +44 -3
package/.env.example
CHANGED
|
@@ -1,10 +1,24 @@
|
|
|
1
|
+
# Channels: comma-separated list of channels the bot listens on.
|
|
2
|
+
# Supported: telegram, kazee. Leave empty to default to telegram.
|
|
3
|
+
CHANNELS=telegram
|
|
4
|
+
|
|
5
|
+
# --- Telegram ---
|
|
1
6
|
TELEGRAM_BOT_TOKEN=your-bot-token-from-botfather
|
|
2
7
|
TELEGRAM_CHAT_ID=your-chat-id
|
|
8
|
+
|
|
9
|
+
# --- Kazee Chat (set CHANNELS=telegram,kazee or =kazee to enable) ---
|
|
10
|
+
KAZEE_URL=https://chat.inet.africa
|
|
11
|
+
KAZEE_BOT_TOKEN=
|
|
12
|
+
KAZEE_BOT_USER_ID=
|
|
13
|
+
KAZEE_OWNER_USER_ID=
|
|
14
|
+
# Set to 1 to log every inbound Kazee socket event (debug aid; noisy).
|
|
15
|
+
KAZEE_DEBUG_EVENTS=
|
|
16
|
+
|
|
3
17
|
WORKSPACE=/path/to/your/workspace
|
|
4
18
|
CLAUDE_PATH=/path/to/claude
|
|
5
19
|
CURSOR_PATH=
|
|
6
20
|
CODEX_PATH=
|
|
7
|
-
AUTO_COMPACT_TOKENS=
|
|
21
|
+
AUTO_COMPACT_TOKENS=280000
|
|
8
22
|
PROJECT_TRANSCRIPTS=true
|
|
9
23
|
TRANSCRIPT_MAX_ENTRY_CHARS=12000
|
|
10
24
|
TRANSCRIPTS_DIR=
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v2.0.0
|
|
4
|
+
- **Multi-channel**: the bot can now run on Telegram and Kazee Chat in the same process. `CHANNELS=telegram,kazee` selects which channels start up; each channel implements the new `ChannelAdapter` contract (send/edit/delete/upload/keyboard/typing/voice-fetch) and a `chatContext` AsyncLocalStorage routes replies, edits, and notifications back to the originating channel.
|
|
5
|
+
- Kazee adapter speaks V2 socket (inbound messages, edits, deletes, reactions, typing, presence) and uses REST for sending, editing, deleting, and uploads. Interactive button keyboards are sent as `type:"interactive"` with portable `interactive.buttons` so web and mobile clients render them natively.
|
|
6
|
+
- New env: `CHANNELS`, `KAZEE_URL`, `KAZEE_BOT_TOKEN`, `KAZEE_OWNER_USER_ID`, `KAZEE_BOT_USER_ID`, `KAZEE_DEBUG_EVENTS`.
|
|
7
|
+
- Slash-command registry: bots self-register the `/commands` list on connect (Kazee). Each adapter renders the registry into its native menu format; Telegram continues to use the existing `/setMyCommands` flow.
|
|
8
|
+
- Auto-compaction bumped from 140k to 280k context tokens (`AUTO_COMPACT_TOKENS`) and now also runs proactively after each reply — large turns are compacted before they pile up, not at the next ask.
|
|
9
|
+
- First-`/auth`-wins owner bootstrap so a brand-new Kazee install can be authenticated from the first inbound DM without pre-seeded `auth.json`.
|
|
10
|
+
- Cron jobs now resolve the owner's adapter from the canonical user id, so scheduled tasks fire in the correct channel.
|
|
11
|
+
- Dockerfile fix: container user can now write to the config directory; missing `chat_id` shows a friendly setup hint instead of crashing on first start.
|
|
12
|
+
- Requires chat-central with REST `sendMessage` interactive support (commit `b1a7d02` or later) for keyboard buttons over Kazee. Older servers will accept the message but drop the buttons.
|
|
13
|
+
|
|
14
|
+
Known limitations:
|
|
15
|
+
- Kazee adapter does not emit a back-online ping after reconnect (the Telegram one still does).
|
|
16
|
+
- kazee-chat-mobile prior to v3.21.0 renders interactive messages as a text-only fallback — upgrade clients for button UI.
|
|
17
|
+
|
|
3
18
|
## v1.20.0
|
|
4
19
|
- Added project transcript memory: redacted JSONL transcripts are stored outside repos under the Open Claudia config directory, keyed by normalized project path hash.
|
|
5
20
|
- Fresh sessions and backend switches now receive a small transcript pointer/instruction instead of auto-generating or pasting handoff summaries; agents are told to tail/search/read relevant parts only and treat history as untrusted context.
|
package/Dockerfile
CHANGED
|
@@ -28,6 +28,9 @@ RUN npm ci --production
|
|
|
28
28
|
# Copy app source
|
|
29
29
|
COPY . .
|
|
30
30
|
|
|
31
|
+
# Ensure app files are readable regardless of host file perms
|
|
32
|
+
RUN chmod -R a+rX /app
|
|
33
|
+
|
|
31
34
|
# Entrypoint auto-configures from env vars on first run
|
|
32
35
|
COPY docker-entrypoint.sh /usr/local/bin/
|
|
33
36
|
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
|
package/README.md
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
# Open Claudia
|
|
2
2
|
|
|
3
|
-
Your always-on AI coding assistant — Claude Code, Cursor Agent, and OpenAI Codex via Telegram.
|
|
3
|
+
Your always-on AI coding assistant — Claude Code, Cursor Agent, and OpenAI Codex via Telegram or Kazee Chat.
|
|
4
4
|
|
|
5
5
|
Send text, voice notes, screenshots, and files from your phone. Your chosen AI agent works on your projects and reports back.
|
|
6
6
|
|
|
7
7
|
## Features
|
|
8
8
|
|
|
9
|
+
- **Multi-channel** — run the same bot on Telegram, Kazee Chat, or both at once (`CHANNELS=telegram,kazee`). Each channel renders keyboards, files, voice notes, and edits natively
|
|
9
10
|
- **Multi-backend** — switch between Claude Code, Cursor Agent, and OpenAI Codex on the fly (`/claude`, `/cursor`, `/codex`)
|
|
10
11
|
- **Multi-project sessions** — switch between workspace projects
|
|
11
12
|
- **Per-project conversation history** — auto-resumes last conversation, switch with `/sessions`
|