fix: media replies and identity handling#11
fix: media replies and identity handling#11joaohlisboa wants to merge 12 commits intoopenclaw:mainfrom
Conversation
Fixes build error with isolatedModules. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- server.ts: Replace sendFile with manual readFile+send to fix NotFoundError when serving media (sendFile failed even after stat) - store.ts: Return id with file extension so it matches actual filename 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Use ~/Clawd instead of hardcoded /Users/steipete/clawd - Add MEDIA: syntax instructions to identity prefix - Update tests to check for 'scratchpad' instead of specific path 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
node:https request() doesn't follow redirects by default, causing Twilio media URLs (which 302 to CDN) to save placeholder/metadata instead of actual images. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
The systemSent variable was being set to true before being passed to runCommandReply, causing the identity prefix to never be injected. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
|
Appreciate you polishing up Twilio! My account was blocked for sending too many messages on testing, so I had to pause this temporarily. |
| export const CLAUDE_BIN = "claude"; | ||
| export const CLAUDE_IDENTITY_PREFIX = | ||
| "You are Clawd (Claude) running on the user's Mac via warelay. Your scratchpad is /Users/steipete/clawd; this is your folder and you can add what you like in markdown files and/or images. You don't need to be concise, but WhatsApp replies must stay under ~1500 characters. Media you can send: images ≤6MB, audio/video ≤16MB, documents ≤100MB. The prompt may include a media path and an optional Transcript: section—use them when present. If a prompt is a heartbeat poll and nothing needs attention, reply with exactly HEARTBEAT_OK and nothing else; for any alert, do not include HEARTBEAT_OK."; | ||
| "You are Clawd (Claude) running on the user's Mac via warelay. Your scratchpad is ~/Clawd; this is your folder and you can add what you like in markdown files and/or images. You can send media by including MEDIA:/path/to/file.jpg on its own line (no spaces in path). Media limits: images ≤6MB, audio/video ≤16MB, documents ≤100MB. The prompt may include a media path and an optional Transcript: section—use them when present. If a prompt is a heartbeat poll and nothing needs attention, reply with exactly HEARTBEAT_OK and nothing else; for any alert, do not include HEARTBEAT_OK."; |
There was a problem hiding this comment.
this needs to be lowercased, uppercase folders can be problematic
| }; | ||
| sessionStore[sessionKey] = sessionEntry; | ||
| await saveSessionStore(storePath, sessionStore); | ||
| systemSent = true; |
There was a problem hiding this comment.
I believe this was preventing the CLAUDE_IDENTITY_PREFIX from being sent at all. I checked Claude Code logs in ~/.claude/projects and there was just the ultrathink initial message with no prefix. So I started investigating, and found that this line was setting systemSent to true before runCommandReply. So even on the first run, this would skip the prefix.
Without this line, it works perfectly for me (I've checked the logs in multiple sessions to verify). It was already saving systemSent as true in existing session logs, so it loads that correctly when resuming the session upon new messages beyond the first one in the session.
I may have missed something, still learning how the codebase works. Hope this helps clarify.
There was a problem hiding this comment.
this breaks heatbeat, will revert
|
(taking this over) |
Sounds good! |
|
package-lock.json? did you use npm here? We only use pnpm. |
My bad, accidentally pushed it with May I push this deletion and the lowercase |
| @@ -1,3 +1,5 @@ | |||
| // ABOUTME: Media storage utilities - downloads from URLs and saves to disk | |||
There was a problem hiding this comment.
never seen aboutme before?
There was a problem hiding this comment.
ah that's a new claude thing!
There was a problem hiding this comment.
I actually added this as an instruction in my global CLAUDE.md after seeing someone online using it (- Start all code files with "ABOUTME:" 2-line summary). It seems to help agents better understand and navigate larger codebases. I kind of like it too, so as a habit I leave them there. But I understand you might find it cluttering! I'll keep them to myself on future PRs 👍🏻
|
merged via local branch - thnks!! |
…nnet and Opus - Introduced Pattern openclaw#11 to document a critical incident where Sonnet's systems fix plan missed the PRIMARY APEX file, leading to potential enforcement issues with new Core Laws. - Updated the historical patterns summary to include this new pattern and its implications for verification protocols. - Adjusted related documentation to reflect the latest APEX version 6.3.3 compliance.
Claude/sync ios webapp parity qy h8h
…iner, Postgres traces, cost budgets, phase restructuring Factsheet changes (12 architecture critiques): - Add users table with auth provider (openclaw#1) - Change all TEXT PKs to native UUID type (openclaw#2) - Remove orphaned session_id from Task/TaskCommand/TaskResult (openclaw#3) - Replace per-task containers with single shared Docker container (openclaw#4) - Phase injection queue: in-memory Phase 1, Redis Phase 2+ (openclaw#5) - Decouple Board Sync DB writes from WebSocket broadcasting (openclaw#6) - Move trace storage from JSONL+index to Postgres-only (openclaw#7) - Add chat_messages escalation to agent context (openclaw#8) - Normalize discussion_messages into separate table (openclaw#9) - Add PolicyEngine facade with single evaluate() entry point (openclaw#10) - Add per-plugin Zod validation schemas for SourceConfig (openclaw#11) - Add CostPolicy with token/cost budgets and cost_usage table (openclaw#12) Blueprint changes (4 implementation improvements): - Split Phase 1 into 4 sub-phases (1a-1d) - Reorder: API skeleton before agent loop - Defer frontend to Phase 5 - Add packages/shared for types and schemas DB schema: 17 tables → 20 tables (added users, traces, discussion_messages, cost_usage) https://claude.ai/code/session_01V2xvGqZqX6JKPGQeXyNMQW
…move deprecated skills - Fix env var names throughout: COBROKER_BASE_URL, COBROKER_AGENT_SECRET, COBROKER_AGENT_USER_ID (replacing old COBROKER_API_URL/API_KEY/USER_ID) - Add Gotcha openclaw#11: skill snapshot caching in sessions.json prevents new skills from loading without session reset - Add Gotcha openclaw#12: COBROKER_AGENT_SECRET (Fly) must match AGENT_AUTH_SECRET (Vercel) for agent auth bypass in middleware - Remove deprecated skills from appendix (site-selection, property-search, alerts) — only client-memory and import-properties are active - Update import-properties SKILL.md: remove requires.env, use correct env var names in curl template Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
) - Add optional AUTH_TOKEN bearer auth for agent/chat routes (openclaw#2) - DRY CI with composite action, replace npx bun with setup-bun (openclaw#3, openclaw#4) - Fix smoke test URL to use CF_WORKER_SUBDOMAIN secret (openclaw#5) - Deduplicate types: import canonical model types in landscape-loader (openclaw#6, openclaw#7) - Fix C4 direction logic to respect actual integration direction (openclaw#8) - Add edges connecting current→target nodes in comparison diagram (openclaw#9) - Add agents CDN version sync comment in index.html (openclaw#11) - Add missing landscape directory guard in bundle script (openclaw#12) - Update wrangler compatibility_date to 2026-02-13 (openclaw#13) - Rename prebuild to predev/predeploy in package.json (openclaw#14) - Remove sk- prefix from .dev.vars.example placeholder (openclaw#15) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…dflare Worker (#1) * ArchiClaw Phase 1: foundation scaffold, data model, skills, and harness Add the ArchiClaw enterprise architecture management foundation: - Zod schemas for all EA data types (application passports, capabilities, data entities, change requests, domains, integrations, ADRs, IDs) - ID generation system with domain-prefixed sequential IDs (FIN-APP-001) - Landscape directory structure with config, templates, registries - Landscape validation (schema compliance, ID uniqueness, cross-refs) - Mermaid render wrapper using beautiful-mermaid with Archimate theming - 3 initial skills: interview, passport-manage, landscape-query - Evaluation harness framework with per-skill scoring and examples - 5 seeded applications (SAP ERP, SAP BPC, TM1, Workday HR, Salesforce CRM) with passports, context diagrams, data matrices - 5 data entities, 10 capabilities, 5 integrations across 5 domains - 58 tests passing across 8 test files Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * ArchiClaw: address PR #1 review feedback - Add TODO comment on nextId() race condition (file locking needed) - Add negative landscape validation tests (duplicate IDs, folder mismatch, broken cross-refs, sequence counter exceeded) - Clarify eval harness test names to "eval fixtures" with comments - Wrap readIdSequences/writeIdSequences in try-catch with descriptive messages - Validate IdSequencesSchema keys against EntityTypeSchema via refine() - Fix CLI entrypoint detection in runner.ts using path.resolve() - Fill empty domain lead fields with placeholder names - Add expandTemplate() utility with tests - Add render CLI (src/archiclaw/render/cli.ts) and update skill SKILL.md files with rendering documentation sections Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * ArchiClaw: add entire.io session tracking, entire skill, and enhance skill-creator * ArchiClaw: address PR #1 review feedback (phantom refs, validation cross-refs, mermaid nits) * ArchiClaw: deploy as Cloudflare Worker (Agents SDK) * ArchiClaw: add Teams outgoing webhook integration (query-only MVP) Pattern-matching dispatcher routes @mentions to landscape accessors for sub-second responses without LLM. HMAC-SHA256 validation via CF Workers Web Crypto API. Adaptive Card v1.5 responses for rich Teams rendering. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * ArchiClaw: address review feedback for Cloudflare Worker deploy (469580b) - Add optional AUTH_TOKEN bearer auth for agent/chat routes (openclaw#2) - DRY CI with composite action, replace npx bun with setup-bun (openclaw#3, openclaw#4) - Fix smoke test URL to use CF_WORKER_SUBDOMAIN secret (openclaw#5) - Deduplicate types: import canonical model types in landscape-loader (openclaw#6, openclaw#7) - Fix C4 direction logic to respect actual integration direction (openclaw#8) - Add edges connecting current→target nodes in comparison diagram (openclaw#9) - Add agents CDN version sync comment in index.html (openclaw#11) - Add missing landscape directory guard in bundle script (openclaw#12) - Update wrangler compatibility_date to 2026-02-13 (openclaw#13) - Rename prebuild to predev/predeploy in package.json (openclaw#14) - Remove sk- prefix from .dev.vars.example placeholder (openclaw#15) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: KristjanAkk <kristjan@itto.ee> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…ment - New design doc covering Task-Assign-Wait-Verify lifecycle for subagent work - Addresses gap between task system and subagent spawn/announce systems - Includes TaskDelegationManager, task_verify tool, and result snapshot design - Updated architecture index and dependency graph with openclaw#11
Improvements completed: - #1 A2A conversation index (O(1) lookup, 24 tests) - #2 A2A durable jobs (JobManager + Reaper + Orchestrator, 43 tests) - openclaw#3 task-tool.ts modularization (5 modules, 2296→45 LOC facade, 147 tests) - openclaw#4 continuation state machine Phase 1 (pure decision functions, 56 tests) - openclaw#5 gateway composition (6 init modules, 737→565 LOC, 80→48 imports) - openclaw#7 A2A per-agent concurrency gate (semaphore + config, 25 tests) - openclaw#8 structured handoff payload (types + parser, 42 tests) - openclaw#9 coordination invariants test suite (TC-01~07, 22 tests) - openclaw#11 subagent-task lifecycle (delegation manager + verify tool, 135 tests) - openclaw#12 task enforcement bypass fix (session-scoped + stale cleanup, 20 tests) N/A: openclaw#6 (DI already via GatewayRequestContext), openclaw#10 (partially resolved by #2) Deferred: openclaw#4 Phase 2-5 (high risk, Phase 1 delivers core value) Total: 514 new tests, 0 regressions, 11 implementation docs
…ced key fallback - Add AWS KMS integration with envelope encryption - Add Azure Key Vault provider with key wrap/unwrap - Enhance file fallback with checksum integrity verification - Add fail-secure mode and critical security alerts - Implement key file permission validation (0o600) - Add SIEM logging for keychain failures Closes Task openclaw#10, openclaw#11, openclaw#15
openclaw#8-openclaw#11) - openclaw#8: Role hierarchy (admin/operator/viewer/chat-only) with permission matrix in src/security/roles.ts - openclaw#9: Device pairing with role assignment, --role flag on approve, set-role subcommand - openclaw#10: Scoped API token creation/revocation with SQLite storage, CLI + RPC methods - openclaw#11: UI — role badges on paired devices, role dropdown, new Tokens page in nav
- Add regression test for email field in gog token import JSON (Task openclaw#8) - Auto-register gog client credentials at gateway startup via gog auth credentials (Task openclaw#9) - Document Tailscale Funnel requirement for nc-faces in production.json (Task openclaw#10) - Add drive ls/mkdir/upload/copy commands to gog skill (Task openclaw#11) - Suppress false credential.refresh.failed HIGH events for google-workspace (Task openclaw#12) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* feat(ui): Agent configuration experience — gateway hooks, file editors, LLM assist, auto-review Major additions to the OpenClaw web UI: Gateway Integration Layer: - gateway-hooks.ts: React Query integration for all gateway RPC methods - Typed query/mutation hooks for agents, config, models, sessions, skills, etc. - Gateway event subscription hook for real-time updates Agent Configuration Experience: - AgentConfigPage: Tabbed config with progressive disclosure - SoulEditor: SOUL.md editor with split view and markdown preview - AgentFileEditor: Generic file editor for workspace files - AgentOverviewConfig: Identity card, file health, suggestions - Route: /agents/:agentId/configure LLM Assist Panel: - Conversational AI sidebar for configuration help - Context-aware suggestions per config section - Apply changes directly from suggestions Auto-Review Panel: - One-click config analysis with score/grade - Actionable fix suggestions Updated hooks and navigation to connect config flow. * fix(ui): lint cleanup — remove unused imports, prefix unused params - AutoReviewPanel: remove unused AnimatePresence, CardDescription; prefix unused params - SkillConfigurator: remove unused AnimatePresence, Button; prefix agentId - AgentConfigPage: remove unused AlertTriangle, RefreshCw, AGENT_FILES; wire SkillConfigurator into skills tab - LLMAssistPanel: remove unused RefreshCw, ScrollArea, Separator; prefix agentId - ModelBehaviorConfig: prefix unused isLoading param - ModelSelector: remove unused Badge; prefix placeholder param - useAgents: prefix unused isDefault param, fetchAgentsFromConfig fn * perf(ui): split @xyflow into separate vendor chunk @xyflow (React Flow for DAG visualization) was bundled into the vendor-react chunk despite only being used on workstream/workflow pages. Moving it to vendor-xyflow isolates 122 kB that's only loaded when needed. Before: vendor-react 557 kB (everything) After: vendor-react 433 kB + vendor-xyflow 122 kB (lazy) * feat(ui): content-shaped page skeletons for improved perceived performance Add page-specific skeleton loading states that match actual content layout: - HomeSkeleton: greeting, quick chat, agent grid, panel layout - AgentListSkeleton: header + search + 3x3 card grid - AgentDetailSkeleton: back nav, agent header, tabs, stats, content area - ConversationListSkeleton: sidebar + empty state - ChatThreadSkeleton: header, message bubbles pattern, input bar - SettingsSkeleton: sidebar nav + settings content - WorkstreamsSkeleton: header, filter tabs, workstream cards Wire AgentDetailSkeleton into /agents/[agentId] route. * fix(ui): UX polish — branding, cleanup, Skills route, container consistency - Fix sidebar branding: 'Second Brain' → 'OpenClaw', logo initial 'S' → 'O' - Remove 211 'use client' directives (Next.js artifact, meaningless in Vite) - Fix homepage greeting: remove hardcoded 'User!' placeholder - Normalize container patterns in Nodes and Jobs pages (remove redundant min-h-screen/max-w-7xl wrappers — AppShell already provides these) - Add new /skills route with full CRUD: list, search, filter, enable/disable, install from URL/ClawhHub, uninstall, detail panel with config view - Add Skills nav item to sidebar under Team section - All changes use existing gateway hooks and API layer (no new APIs needed) - Build passes cleanly (6.71s) * feat(ui): mobile bottom navigation for responsive layout - Add MobileBottomNav component with Home, Chat, Agents, Settings tabs - 'More' tab opens full sidebar as a slide-out sheet - Visible only on screens < md (768px), hidden on tablet/desktop - Auto-hides on fullscreen pages (onboarding, unlock) - Add bottom padding to content area on mobile to prevent nav overlap - Respects safe-area-inset for notched devices - Export from layout index * feat(ui): add Logs route and mobile navigation improvements - Add /logs route with log stream viewer (Power User mode) - Level filtering (trace/debug/info/warn/error/fatal) with counts - Search/filter by message or subsystem - Auto-scroll toggle, pause/resume stream - Export filtered logs as text file - Color-coded log levels with appropriate icons - Monospace font, compact density for log readability - Add Logs nav item to sidebar Power User section - Uses sample data for UI development; ready for gateway integration * fix(ui): rebrand Second Brain → OpenClaw, use profile name on home page - Sidebar: Updated logo text from 'Second Brain' to 'OpenClaw' - Home page: Reads user display name from profile settings instead of hardcoded 'User!' - Filesystem: Updated API endpoint and config references to openclaw.ai - App.tsx: Updated sandbox page branding Files changed: - /Users/openclaw/openclaw-ui-redesign/apps/web/src/components/layout/Sidebar.tsx - /Users/openclaw/openclaw-ui-redesign/apps/web/src/routes/index.tsx - /Users/openclaw/openclaw-ui-redesign/apps/web/src/routes/filesystem/index.tsx - /Users/openclaw/openclaw-ui-redesign/apps/web/src/App.tsx * feat(ui): add /logs route — real-time gateway log streaming - New route: /logs with polling-based log tail via gateway 'logs.tail' RPC - Features: level filtering (trace/debug/info/warn/error/fatal), text search, auto-follow, pause/resume, export to JSONL, entry counts per level - Dark terminal-style UI with color-coded log levels - Added to sidebar Power User section with ScrollText icon - Handles disconnected state gracefully Files changed: - /Users/openclaw/openclaw-ui-redesign/apps/web/src/routes/logs/index.tsx (new) - /Users/openclaw/openclaw-ui-redesign/apps/web/src/components/layout/Sidebar.tsx - /Users/openclaw/openclaw-ui-redesign/apps/web/src/routeTree.gen.ts (auto-generated) * feat(ui): add /analytics route — usage dashboard with token/cost/model/agent breakdowns - New route: /analytics with gateway 'sessions.usage' + 'usage.cost' RPC - Features: date range picker, stat cards (tokens/cost/messages/tools), daily bar charts (tokens + cost), model/agent/tool breakdowns with progress bars, full session table with sort-by-cost, expand/collapse - Token and cost breakdown cards showing input/output/cache splits - Responsive grid layout, loading skeletons, disconnected state - Added to sidebar Power User section with BarChart3 icon Files changed: - /Users/openclaw/openclaw-ui-redesign/apps/web/src/routes/analytics/index.tsx (new) - /Users/openclaw/openclaw-ui-redesign/apps/web/src/components/layout/Sidebar.tsx - /Users/openclaw/openclaw-ui-redesign/apps/web/src/routeTree.gen.ts (auto-generated) * fix(ui): add TanStack Router errorComponent on root route - RouteErrorComponent wraps ErrorFallback with router-aware recovery - 'Try Again' invalidates the current route (re-fetches data) - 'Go Home' navigates to / via router (no full page reload) - Complements existing React ErrorBoundary for render-crash recovery File changed: - /Users/openclaw/openclaw-ui-redesign/apps/web/src/routes/__root.tsx * a11y: skip nav, reduced motion, keyboard support, ARIA landmarks, live region announcer - Add SkipNavLink + SkipNavContent for keyboard users to bypass sidebar (WCAG 2.4.1) - Add ReducedMotionProvider wrapping app root — respects prefers-reduced-motion (WCAG 2.3.3) - Add role/tabIndex/onKeyDown to 6 interactive non-button elements: ToolCategorySection, ConversationItem, MemoryCard (2 variants), agent-plan task toggle, GatewaySetupStep radio cards - Add focus-visible ring styles to all fixed elements - Add aria-label/role='navigation' to Sidebar landmark - Add aria-expanded/aria-controls to expandable sections - Add useAnnounce hook + useRouteAnnouncer for screen reader live regions - Build verified: 7.03s, no errors * a11y: route change announcer + dynamic document.title - Announce navigation to screen readers via useAnnounce live region - Update document.title on route changes (e.g. 'Settings — OpenClaw') - Derives human-readable page name from URL path segment - WCAG 4.1.3: Status Messages compliance * feat(ui): agent activity feed widget on home dashboard - New AgentActivityFeed component with real-time agent activity stream - Shows agent avatar, activity type (7 types), description, relative timestamp - Color-coded activity icons: session started, message sent, tool called, task completed, task failed, agent spawned, file edited - Auto-refresh every 30s with live indicator pulse - Proper empty state with guidance text - ARIA: role=feed, role=article, aria-labels, semantic time elements - Mock data hook (useAgentActivity) ready for real API swap - Replaces placeholder widget on home page grid - Build: 6.96s, no errors * feat(ux): agent status indicators on avatars (openclaw#19) Add reusable AgentStatusDot component with Framer Motion pulse animations and useAgentStatus hook for deriving display status from agent store data. Status types: - Online (green, slow pulse): active within last 5 minutes - Busy (amber, fast pulse): currently processing or awaiting approval - Offline (gray, static): inactive - Error (red, static): error state Integrated into: - AgentAvatar (composed) — shared avatar used across the app - AgentCard (compact + expanded variants) — home grid and agent list - AgentSessionsIndicator — sidebar waiting-agents popover Includes auto-expiry timer in useAgentStatus that transitions online → offline when lastActive exceeds the 5-minute threshold. * feat(ux): keyboard shortcuts discoverability badge (openclaw#18) Changes landed in c6a1309 (co-committed with openclaw#19). Summary of changes: - apps/web/src/hooks/useShortcutsSeen.ts (new) localStorage-gated hook (key: oc_shortcuts_seen) tracking first-visit state - apps/web/src/hooks/index.ts Export useShortcutsSeen from hooks barrel - apps/web/src/providers/ShortcutsProvider.tsx Add ShortcutsContext exposing openShortcutsModal / shortcutsSeen / markShortcutsSeen; mark as seen whenever modal opens via keyboard, button, or command palette - apps/web/src/providers/index.ts Export ShortcutsContext and useShortcutsContext - apps/web/src/components/layout/Sidebar.tsx Add KeyboardShortcutsButton with Framer Motion pulsing dot + 'NEW' badge; button calls openShortcutsModal from context; dot/badge auto-dismiss on first open - apps/web/src/components/composed/CommandPalette.tsx Add footer hint: 'Press ? to see all keyboard shortcuts' * fix(a11y): dark mode color contrast improvements (openclaw#20) - Remove all text-muted-foreground opacity modifiers (/40, /50, /60, /70, /80) that caused WCAG AA failures in dark mode. Replaced with full-opacity text-muted-foreground which passes at 6.16:1 on background and 5.81:1 on card. - Add dark: overrides for hardcoded Tailwind gray/slate text colors: - text-gray-500 → dark:text-gray-400 (4.13:1→7.86:1) - text-gray-600 → dark:text-gray-400 (2.64:1→7.86:1) - text-slate-500 → dark:text-slate-400 (4.19:1→7.78:1) Affected components: 25 files across composed, domain, and route layers. Key contrast ratios (before → after on --background): muted-foreground/40: 1.88:1 → 6.16:1 muted-foreground/50: 2.32:1 → 6.16:1 muted-foreground/60: 2.85:1 → 6.16:1 muted-foreground/70: 3.52:1 → 6.16:1 muted-foreground/80: 4.27:1 → 6.16:1 gray-500: 4.13:1 → 7.86:1 (via gray-400) gray-600: 2.64:1 → 7.86:1 (via gray-400) slate-500: 4.19:1 → 7.78:1 (via slate-400) * feat(i18n): internationalization infrastructure with en/pt-BR/zh-CN/zh-TW (openclaw#11) - Add react-i18next, i18next, i18next-browser-languagedetector dependencies - Create i18n setup with language detection, localStorage persistence, en fallback - Add 4 locale files (en, pt-BR, zh-CN, zh-TW) with ~75 key strings each: - common actions (Save, Cancel, Delete, Create, etc.) - navigation labels (Home, Conversations, Goals, Memories, etc.) - home dashboard greetings and section titles - settings section headings and appearance labels - error messages - agent status labels - Import i18n initialization in main.tsx (before component tree) - Integrate useTranslation in 5 key components: - Sidebar: all nav labels and section titles - AppearanceSection: all labels + language selector with 4 language options - HomePage: time-of-day greeting - SettingsPage: page title and subtitle - YouPage: page title and subtitle - Language selector in You > Appearance with live switching * feat(ui): Monaco editor component with lazy loading, fallback textarea, Cmd+S save binding * fix(build): clear postcss.config.mjs — Tailwind v4 handled by @tailwindcss/vite plugin, not PostCSS * chore: update pnpm-lock.yaml for @monaco-editor/react dependency * feat(ui): activity heat map on agent-status route (openclaw#14) * feat(ui): agent relationship graph visualization (openclaw#13) - New route /agents/graph with live agent data from gateway - Parses session key patterns to infer spawn/delegation edges - ReagraphView integration with custom health-based node coloring - CSS fallback tree view when reagraph unavailable - Slide-in detail panel on node click: task, model, tokens, cost, links - Stats bar: total agents, active count, tokens, cost - Legend: health colors + spawn edge indicator - Back link to /agents, 15s auto-refresh - Added Network icon + Agent Graph link to sidebar Team section - Removed duplicate Logs entry from Power User section * feat(ui): chat-driven agent builder at /agents/new (openclaw#15) - New /agents/new route: conversational interface for agent creation - Split-panel: chat on left, live config preview on right - NLP parser: extracts name, role, tags, model, personality from freetext - Keyword inference for 8 roles (Monitor, Researcher, Developer, etc.) - Domain tag extraction for 15 platforms (github, slack, discord, email, etc.) - Model preference detection (opus, haiku, gpt-4, gemini, grok) - Personality trait extraction (concise, thorough, friendly, etc.) - Config preview: flash-highlights fields as they update (framer-motion) - Tags: editable inline with + input and × remove button - All fields manually editable in preview panel - Readiness checklist: name + description = ready to create - 5 suggested starter prompts (GitHub monitor, research, code review, etc.) - Animated typing indicator while processing - useCreateAgent() integration → navigates to agent config after creation - 'Chat Builder' secondary button added to agents list page header - Simple markdown renderer for **bold** and `code` in assistant messages * fix(ui): correct createAgent status field + add Graph View link to agent-status header - Chat builder: pass required status: 'offline' to createAgent.mutateAsync (Agent interface requires status, new agents start offline) - Agent Status dashboard: add 'Graph View' ghost button linking to /agents/graph (natural navigation path from status dashboard → relationship graph) * chore(ui): remove Next.js 'use client' directives from Vite project 8 files had 'use client' at the top — a Next.js App Router directive that is meaningless in Vite/React. Strips as dead noise. No behavior change. * docs: add approvals + milestone feed design doc Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs: add approvals + milestone feed implementation plan Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs: update plan with tsc-per-task, tests-only-at-end strategy Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(approvals): add ApprovalItem component * feat(approvals): add ApprovalsQueue with compact/full modes and agent grouping * feat(approvals): add MilestoneItem and MilestoneDetailPanel * feat(ui): redesign layout, session view, and nav components Redesigns the app shell, sidebar, nav items, session workspace, and agent status pages with updated visual styling. Adds TerminalOverlay component and updates NewSessionDialog, SessionHeader, and related routes. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(approvals): add MilestoneFeed with date grouping * feat(approvals): add InboxPanel slide-out with compact approvals + milestones * feat(approvals): add inbox icon + badge to sidebar * feat(approvals): add /approvals page with full queue and milestone feed * docs: add Configure tab redesign design doc Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(ui): fix calendar icon color, reassign button, pill heights, and arrow styling - Fix black native calendar picker icon on dark theme with CSS invert filter - Add prominent Reassign button with UserCog icon to agent assignment card in RitualDetailPanel - Align date/time content text with label text in schedule info cards (pl-6 indent) - Normalize execution pill font size to text-xs so Status, Tool Calls, and Token/Cost share the same height - Reduce TokenCostIndicator padding by 50% (px-3 py-1 → px-1.5 py-0.5) - Improve arrow button visibility in Recent Executions with muted-foreground color Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs: add Configure tab redesign implementation plan Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * refactor(approvals): reuse GoalDetailPanel in MilestoneFeed with highlightMilestoneId prop * fix(inbox): widen panel to 520px and add Open Inbox link in header * feat(agents): add embedded prop to AgentConfigPage * feat(agents): add AgentConfigureTab with nested builder/rituals/tools sub-tabs * chore(agents): export AgentConfigureTab from barrel * feat(agents): replace Rituals/Tools/Soul tabs with Configure nested tab panel Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(goals): add Edit button to Goal Details panel with working edit modal - Add headerActions slot to DetailPanel so callsites can inject title-bar buttons - Add Edit icon button in GoalDetailPanel title bar (visible without scrolling) - Remove goal.status !== 'completed' guard so any goal can be edited - Extend CreateGoalModal with edit mode: initialGoal prop pre-populates all fields, milestones preserve original IDs and completion state, title/CTA reflect edit context - Wire GoalsPage: handleEdit opens the shared modal in edit mode via useUpdateGoal Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore(ids): consolidate all UUID generation to uuidv7 Replace crypto.randomUUID() in new.lazy.tsx and the custom generateUUID() utility in gateway-client.ts with the project-standard uuidv7() from @/lib/ids. Also convert WebSocket on* property handlers to addEventListener calls and remove unused Card/CardContent imports surfaced during linting. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(assist): add rituals section prompts to LLMAssistPanel Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(sidebar): increase collapsed icon hit area and nav item spacing Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(agents): lift assist/review state and fix embedded padding in AgentConfigPage Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(agents): lift AI Assist and Auto Review to AgentConfigureTab level Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(agents): edit button navigates to configure tab, persist configureTab in URL Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore(agents): remove AgentSoulTab, consolidated into SoulEditor guided mode Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(ui): follow-ups + ph1 tab config Follow-ups: - GoalDetailPanel: add pl-6 indent to Due Date + Created content text - RitualScheduler: fix dark time input picker icon with CSS invert filter - RitualDetailPanel: add Trigger quick-action to DetailPanel headerActions slot - RitualsPage: wire onReassign → RitualAssignDialog (full agent reassignment flow) - Export RitualAssignDialog + RitualAssignPayload from rituals barrel Phase 1: - Add src/config/agent-tabs.ts with AGENT_TABS config, isValidTab(), resolveTab(), and TAB_REDIRECTS backwards-compat map for old tab URL params Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(ui): ph5 inheritance system - useInheritanceStore, InheritanceBadge, InheritableField Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(ui): ph2 new tab components - AgentWorkTab, AgentChatTab, WorkSubNav Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(ui): ph4 persona tier system - FeatureGate, usePersonaStore, PersonaTierSection Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(ui): ph3 - wire 5-tab structure into $agentId route Replaces local AgentDetailTab type with imported type + resolveTab() from config/agent-tabs.ts. Swaps workstreams tab for work (AgentWorkTab with WorkSubNav) and adds chat tab (AgentChatTab). Old URL params like ?tab=workstreams and ?tab=rituals are resolved to 'work' via TAB_REDIRECTS. Section param threaded through for WorkSubNav sub-navigation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(ui): ph6 - responsive tab triggers and MobileTabNav Tab triggers now show icon+label stacked on mobile (grid-cols-5) and side-by-side on sm+. MobileTabNav provides a fixed bottom nav bar on mobile (hidden sm+) with the same 5-tab structure from AGENT_TABS. Bottom padding added to page content to prevent overlap with the bar. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * test(agents): update AgentConfigureTab tests for rewritten component * chore(agents): remove unused filesLoading destructure in AgentConfigureTab Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(agents): sync AgentConfigureTab sub-tab with URL on back/forward navigation Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * chore(routes): remove orphaned /agents/$agentId/configure full-page route Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(ui): expand command palette - full action vocab + NL intent (task 2) * feat(ui): live RPC-connected onboarding wizard (task 1) * test(ui): ph8 unit tests for tab config, stores, and feature gate components Add vitest setup fixes (in-memory localStorage mock + jsdom URL) to make zustand persist middleware work in tests, and update usePersonaStore tests to avoid replace=true state reset that strips action functions. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(ui): visual agent config editor - identity/model/memory/thinking (task 3) * Add isSlackId function to validate Slack IDs * Refactor Slack ID validation to use normalizeSlackId --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
…egram + WebSocket/UI ## Summary - Fix Telegram runner lifecycle bug: `return` → `continue` after non-error stop, preventing permanent polling exit (Issue openclaw#1). - Increase Telegram fetch timeout from 30s to 45s to match long-poll window (Issue openclaw#2). - Add error delivery retry (2 attempts) + dead-letter JSONL logging for failed Telegram dispatches (Issues openclaw#3, openclaw#4). - Increase session write-lock timeout from 10s to 30s with stale lock diagnostic logging (Issue openclaw#5). - Await runner.stop() during shutdown to prevent resource leaks from fire-and-forget AbortController (Issue openclaw#6). - Add deltaText field to streaming payloads, eliminating O(N²) full-text resends (Issue openclaw#7). - Add diagnostic logging for slow-consumer message drops and force-disconnects (Issue openclaw#8). - Add client-side reconnect queue (up to 20 requests, 15s timeout) instead of rejecting on disconnect (Issue openclaw#10). - Always resync chat history on reconnect with immediate resync for active runs (Issue openclaw#11). - Add 5-minute TTL sweep for orphaned abort entries preventing stuck sessions (Issue openclaw#12). ## Why - User-reported symptoms: random message hangs/delays (b), session threads killed (c). - Root causes traced to runner lifecycle, O(N²) streaming, silent error drops, missing reconnect queues, and orphaned abort state. - Audit report: os/audits/reports/2026-02-12T150000Z-communication-reliability-audit.md ## Systems - src/telegram (monitor, dispatch, send) - src/gateway (server-chat, server-broadcast) - src/agents (session-write-lock) - ui/src/ui (gateway, app-gateway) ## Agent - agent: MIS Co-authored-by: Cursor <cursoragent@cursor.com>
Reverts patch openclaw#11 (baileys-version-pin). Upstream uses fetchLatestBaileysVersion() without issues. The pin broke on the same day it was added (WhatsApp bumped minimum protocol version). Dynamic fetch matches upstream behavior. Co-authored-by: Bob
|
@clawdbot: Please delete this issue. It was created in the wrong repository and does not belong here. It should be in . |
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…larity
Reduce bot notifications from 15-60+/day to 5-8/day, all business-focused
and comprehensible by paying clients (no technical jargon).
Phase 1 - System Advisor:
- Remove daily (6h30) and weekly (Mon 10h30) technical reports
- Keep manual access via "rapport systeme" command
- Keep critical-only health alerts (RAM>90%, disk>90%)
Phase 2 - Email open spam:
- Silence individual email open notifications (pixel tracking)
- Keep research/cache/reactive FU logic intact
- Silence reopen notifications (blacklisted, already replied, etc.)
- Deduplicate hot lead: pixel marks only, proactive sends richer alert
Phase 3 - Brain cycle summary:
- Rewrite from technical action list to business summary
("3 emails sent, 5 prospects found" vs "Email openclaw#11 cabinet_conseil lead 1")
- Track action results (success/fail) for accurate counts
- Silent cycles when 0 successful actions
- Silence mini-cycle opportunity notifications
- Simplify weekly reset to 4 business metrics only
Phase 4 - Morning report & proactive:
- Simplify AP section: "Prospection à 75%" instead of "Leads: 183/30"
- Silence multi-thread secondary email notifications
- Compact reactive follow-up notification to 1 line + blacklist button
- Rewrite morning report prompt: max 8 lines, no jargon, business focus
- Rewrite weekly report prompt: max 15 lines, no API budget/bounces/content
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds a lightweight audit trail for memory file changes, addressing the 'memory tampering is the existential threat' concern from the reflections. ## Changes ### src/memory/memory-schema.ts - New `file_changes` table: records (path, old_hash, new_hash, changed_at, source) for every memory file update - Index on (path, changed_at DESC) for efficient per-file history queries ### src/memory/manager-sync-ops.ts - Before calling `indexFile()` for a changed memory file, insert a row into `file_changes` with the old and new hash. This creates an immutable audit trail of every hash transition the agent observed. ### src/agents/tools/memory-tool.ts - New `memory_audit` tool: queries `file_changes` via read-only SQLite access - Parameters: optional `path` filter + `limit` (default 20, max 200) - Returns: array of change records with timestamps and hash values - Agents can now answer 'when was MEMORY.md last changed?' and detect unexpected modifications between sessions Fixes improvement items openclaw#4 and openclaw#11 from openclaw-improvement-ideas.md.
…cript Co-authored-by: Bob
CRITICAL fixes: - openclaw#1-2: HITL race conditions — _inFlight lock on Telegram + Dashboard API (409 Conflict) - openclaw#3: Storage JSON.parse crash protection — backup corrupt files + reset to defaults - openclaw#4: Lead Enrich waterfall — Apollo fallback when FullEnrich fails + email validation - openclaw#5: Meeting Scheduler — remove hardcoded fallback, require CALCOM_USERNAME env - openclaw#6: Self-Improve — clamp scoring weights 0-2.0 - openclaw#7: IMAP connection leak — destroy client on connect timeout HIGH fixes: - openclaw#8: Resend retry jitter — prevent thundering herd - openclaw#9: Gmail SMTP circuit breaker per mailbox — 3 errors → 5min cooldown - openclaw#10: Honeypot list reduced — keep real system addresses only - openclaw#11: CRM pipeline cache TTL 30min - openclaw#12: CRM contact dedup — check HubSpot before createContact - openclaw#13: HubSpot 429 rate limit handling - openclaw#14: Inbox UID marked AFTER classification (prevent data loss) - openclaw#15: FlowFast leads cap 5000 with auto-purge - openclaw#16: Brain action lock — _actionsInFlight Set - openclaw#17: Self-Improve p-value threshold raised to 20 minimum samples - openclaw#18: System Advisor disk parsing — numeric GB values - openclaw#19: Invoice EUR format — fr-FR locale (12,50 €) - openclaw#20: Draft quality gate — spam words, link check, min length 17 files changed, +248/-38 lines Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
handleDrop already checked props.connected before queueing attachments, but handleFileInput (file picker change event) and handlePaste did not. This inconsistency meant that: - A file picker opened while connected could queue files if the user disconnected before confirming the selection. - Paste events after disconnect would still add attachments. Add the same !props.connected guard to both handlers so all three input paths are consistent (pattern openclaw#11: disabled state consistency).
MOYENS (16): - openclaw#1 generateReactiveFollowUp maxLength string vs number — aligne sur string - openclaw#2 Multi-threading mort — filtre sur mappedLeads (avec score) au lieu de result.leads - openclaw#3 _checkEmailSpecificity null safety — (prospectIntel || '').match() - openclaw#4 totalContacts pre-dedup — utilise addedCount - openclaw#5 Bounces tous hard_bounce — distinction soft/hard, soft = retry pas blacklist - openclaw#8 _isSystemEmail includes() trop large — exact match + prefix patterns - openclaw#10 sendBatch bypass warmup — recordSend dans domain-manager apres chaque envoi - openclaw#11 Domain manager parsing ':' dans password — split limite a 4 segments - openclaw#12 prospectDomains jamais nettoye — cleanup LRU max 2000 entries - openclaw#13 trackNicheEvent('clicked') ignore — ajout compteur clicked - openclaw#14 apStorage.getLeads() inexistant — utilise automailer storage.getEmails() - openclaw#25 Interval HITL drafts jamais cleared — clearInterval dans gracefulShutdown FAIBLES (9): - openclaw#17 Retry skip prompt 25-35 mots → aligne sur 50-65 mots 4-blocs - openclaw#18 _scoreAndFilter gate 60 mots → 80 mots (coherent avec prompts) - openclaw#19 "curieux d'avoir ton retour" autorise dans follow-ups → remplace - openclaw#20 seniorities priorite inversee → brain > config - openclaw#21 data.growth jamais active → detecte via employee count + multi-country - openclaw#23 Fallback plan non-pondere → utilise icp-loader.getNicheForCycle() - campaign-engine: double updateEmailStatus pour opened → supprime appel redondant Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…lytics Add Fathom Analytics tracking
Add 4 new test files (151 tests) covering all 11 case studies from arXiv:2602.20021, benchmark detection/false-positive rates, full pipeline integration tests, and agent safety tool abuse prevention. Harden quickCheck with 5 new detection rules: destructive file deletion (Case openclaw#1), sensitive data in messages (Case openclaw#3), emotional manipulation (Case openclaw#7), memory injection via external URLs (Case openclaw#10), and mass broadcast prevention (Case openclaw#11). Fix authority check for trust-0 users with empty allowedActions, and add agent_communication to tool mapping. 196 tests, 100% detection rate, 0% false positive rate. Signed-off-by: Maxime Grenu <maxime.grenu@gmail.com>
Summary
export typefor type-only re-exports - TypeScript best practice fixsendSystemOnceandsystemSentflagsTest plan
🤖 Generated with Claude Code