Compaction was reporting only 189 tokens removed for 6 messages because
Phase 1 (tool result pruning) hollowed out messages before Phase 2
(summary compaction) measured them. Now captures pre-pruning token count
and reports combined savings from both phases.
Also threads RunLog through SessionManager to emit tool_result_pruning
and compaction_detail events, and adds preflight pruning stats logging.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The transformContext pipeline ran sanitizeToolUseResultPairing() before
preflightCompact(), but compaction (pruneToolResults + compactMessagesTokenAware)
can break tool_use/tool_result pairing by dropping assistant messages while
keeping their tool_result blocks. This caused 400 errors from the Anthropic API:
"unexpected tool_use_id found in tool_result blocks".
Add a second sanitizeToolUseResultPairing() call after preflightCompact()
to repair any orphaned tool_result blocks created during compaction.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Instead of only protecting .env files, use cpSync with force:true to
overlay bundle files onto the existing directory. This preserves any
user-created files (credentials.json, token.json, etc.) that don't
exist in the bundle, rather than deleting and re-copying the entire
directory.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add unhandledRejection and uncaughtException handlers to prevent the
gateway from crashing on unexpected errors. Add SIGTERM/SIGINT handlers
for graceful shutdown via app.close().
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add bot.catch() to prevent unhandled errors from crashing the polling
loop, and catch the 409 "terminated by other getUpdates request" error
specifically when another bot instance is already running.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove hardcoded service API key hints from getApiKeyHint() — skill-specific
hints should be discovered dynamically by the agent via web_search/web_fetch
at runtime. Only keep LLM provider hints which are system-level. Update
skill-creator instructions accordingly.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Update skill-creator SKILL.md with proactive skill activation workflow:
guide users through API key setup, accept keys in chat, write .env files
automatically. Add sections for creating skills with env requirements and
.env file format reference.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add buildIneligibleSkillsSummary() to SkillManager that surfaces skills
with actionable issues (missing env vars, binaries) in the agent's system
prompt. Expand getApiKeyHint() with common service API providers. Update
buildSkillsSection() to guide the agent to suggest activating inactive
skills when they match user intent.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove centralized skills.env.json5 in favor of per-skill .env files.
Clean up CredentialManager by removing hasEnv/getEnv/getResolvedEnvSnapshot
methods and skills env loading. Update CLI credentials and skills commands.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Move skill environment variables from centralized skills.env.json5 to
per-skill .env files within each skill's directory. This makes credential
management more intuitive and self-contained.
- Fix parser to handle metadata.requires, always, os, skillKey, install
- Add minimal .env parser (dotenv.ts) and load .env at skill parse time
- Add env field to Skill type for per-skill environment variables
- Update eligibility checker to use skill.env instead of CredentialManager
- Preserve user .env files across bundled skill upgrades in loader
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Move LoadingIndicator from ChatView into MessageList for consistent padding
- Add isLoading and hasPendingApprovals props to MessageList
- Adjust message spacing (my-1 → my-2) for better visual balance
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Create LoadingIndicator component with "generating" and "streaming" variants
- Remove inline loading indicator from StreamingMarkdown (empty content returns empty fragment)
- Use unified LoadingIndicator in ChatView with consistent positioning
- Eliminates layout shift between different loading states
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use container utility class consistently across chat components
- Change container max-width from 5xl to 4xl for better readability
- Adjust message bubble padding (p-3 -> p-2)
- Fix logout dropdown alignment and add destructive variant
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Use TipTap's getText({ blockSeparator: '\n' }) instead of doc.textContent
to preserve newlines between paragraphs when submitting messages
- Add whitespace-pre-wrap CSS to user message bubbles to render newlines
- Add className prop support to StreamingMarkdown component
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Move the env var read into the rewrites function so `next build`
succeeds without MULTICA_API_URL set (it is only needed at runtime).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace scattered API_URL, MAIN_VITE_API_URL, and RENDERER_VITE_API_URL
with a single MULTICA_API_URL across all apps and packages.
- Desktop: use envPrefix to expose MULTICA_* to main process, rename
RENDERER_VITE_API_URL → RENDERER_VITE_MULTICA_API_URL, remove
MAIN_VITE_API_URL (now read directly via MULTICA_API_URL)
- Web: add .env.development with MULTICA_API_URL, enforce required check
in next.config.ts, update .gitignore to allow .env.development
- Core: make MULTICA_API_URL required in api-client (no silent fallback)
- Scripts: pass MULTICA_API_URL in dev-local.sh for web process
- Turbo: update globalEnv from API_URL to MULTICA_API_URL
- Docs: update references to the new env var name
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add intermediate build stage to compile @multica/types, @multica/utils,
and @multica/core before the runtime stage so dist/ artifacts are
available. Also adds @multica/utils as an explicit gateway dependency.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace plain-text bot messages with HTML-formatted messages and
inline keyboard buttons. Users are now guided through connection
with interactive buttons (How to connect, What is Multica?, Check
status, Help, Reconnect) that edit messages in-place. Add
setChatMenuButton to show commands in the hamburger menu.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* docs: slim down README and split into topic-specific docs
Add local full-stack development section (pnpm dev:local) and
move detailed content (credentials, CLI, skills/tools, time
injection, development guide) into separate docs/ files.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* docs: remove openclaw research notes and add doc index to README
Delete docs/channel/openclaw-research.md (1187-line research dump,
insights already absorbed into implementation). Expand README
documentation section with categorized links to all docs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* docs: remove obsolete design proposals and plans
Delete auto-memory-refresh, cron-job-tool, and dashboard-design
docs that were never implemented. Remove Design Proposals section
from README.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Delete auto-memory-refresh, cron-job-tool, and dashboard-design
docs that were never implemented. Remove Design Proposals section
from README.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Delete docs/channel/openclaw-research.md (1187-line research dump,
insights already absorbed into implementation). Expand README
documentation section with categorized links to all docs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add local full-stack development section (pnpm dev:local) and
move detailed content (credentials, CLI, skills/tools, time
injection, development guide) into separate docs/ files.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
These fields were only checked during eligibility but never injected
at runtime via credentialManager.getEnv(). Remove the half-implemented
per-skill credential config to reduce confusion.
API key configuration remains supported via skills.env.json5 and
process.env.
Refs: MUL-246, MUL-255
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
When the user sends a message and the agent hasn't started streaming
yet, the chat area showed no visual feedback. Now a "Generating..."
spinner appears between message send and the first streaming content,
matching the existing indicator style used in StreamingMarkdown.
Closes MUL-224
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
* feat(desktop): remove Multica App tab from Clients page
Only Telegram is currently available as a connection method.
Remove the unused "Multica App" tab, tabs UI, and related
components (QRCodeCard, DevicesCard, MulticaAppTab) to simplify
the page.
MUL-252
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* fix(desktop): restore authorized devices list on Clients page
The devices list was accidentally removed along with the Multica App
tab. Add it back below the Telegram card.
MUL-252
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
turbo lint fails for all packages due to eslint binary resolution
issues. Fall back to pnpm --filter which handles node_modules/.bin
PATH correctly. Scope matches original CI (web + desktop).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Configure weekly npm and GitHub Actions dependency updates. Groups
dev and production dependencies separately for easier review.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add test task to turbo.json and include it in the build-and-typecheck
job. Turbo handles the dependency graph: builds deps first, then runs
typecheck and test in parallel for each package.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The 12-line check_fillable_fields.py was a subset of
extract_form_field_info.py. Add a --check flag to the latter and
remove the standalone script. Update forms.md reference accordingly.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Split single CI job into parallel lint + build-and-typecheck jobs.
Add turbo cache via actions/cache for faster subsequent runs.
Use single turbo invocation for build+typecheck to optimize task
scheduling. Add concurrency group to cancel stale PR runs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>