Draft
Conversation
Introduces a central registry for organizing assistant tools by category with per-tenant enable/disable configuration. - ToolCategory enum: FILES, GIT, DOCKER, LOGS, DATASOURCE, ENVIRONMENT - ToolConfig dataclass for tool metadata and priority - TenantToolConfig for tenant-specific tool overrides - ToolRegistry class with singleton pattern - 27 unit tests covering all functionality Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Introduces unified parsing utilities for the Dataing Assistant: - TextParser: UTF-8 text files with line-range chunking and search - YamlParser: Safe YAML loading with format_summary for LLMs - JsonParser: JSON parsing with schema inference and summaries - LogParser: Log files with level detection, timestamps, JSON support - DataParser: CSV/Parquet sampling without full memory load All parsers include: - Size limits to prevent resource exhaustion - Consistent error handling - Helpful summaries for LLM consumption 58 unit tests covering all parsers. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Implements safe file access for the Dataing Assistant with: - Directory allowlist: python-packages/, frontend/, demo/, docs/ - Root file patterns: docker-compose*.yml, *.md, pyproject.toml, etc. - Blocked patterns: .env, *.pem, *.key, *secret*, *credential* - Path traversal prevention via canonicalization - Symlink target validation - File size limit (100KB) - Line-range reading support - File search across repository - Directory listing Includes LocalFileReader class and tool functions: - read_local_file - Read file with safety checks - search_in_files - Search pattern across files - list_directory - List files in directory 27 unit tests covering security requirements. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…tch implementations - Add LogProvider protocol and BaseLogProvider ABC with search_logs - Add LocalFileLogProvider with pattern filtering, pagination, truncation - Add DockerLogProvider for container logs with status checks - Add CloudWatchLogProvider (optional, requires boto3) - Fix pattern filter to check both message and raw line - Fix truncation logic to track last processed line correctly - Add _matches_pattern helper for consistent search behavior - Add unit tests for base types and local provider (24 tests) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add DockerStatusTool class with container status, health, and stats methods - Add human-readable tool functions for agent integration - Add register_docker_tools() for registry integration - Include status indicators (🟢/🔴) for quick container health scanning - Support async operations for non-blocking Docker API calls - Add 27 unit tests with mocked Docker client Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- fn-56.1: "SelfDebugAgent" → "DataingAssistant agent" - File: agents/self_debug.py → agents/assistant.py - Updated implementation details and tool references - fn-56.3: "debug chat API routes" → "assistant API routes" - File: routes/debug_chat.py → routes/assistant.py - Endpoints: /debug-chat/ → /assistant/ - Added export endpoint and session listing Per interview decisions in .flow/specs/fn-56.md Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Created the main DataingAssistant agent for the Dataing platform. Features: - Multi-tool integration: Local files, Docker, logs, git (bond-agent) - Streaming support: Full StreamHandlers integration for real-time output - Multi-tenancy: Tenant-isolated instances - Graceful degradation: Works without optional dependencies Tools included: 1. File tools: read_local_file, search_in_files, list_directory 2. Docker tools: list_containers, get_status, get_health, get_stats, find_unhealthy 3. Log tools: get_logs, search_logs, get_recent_errors 4. Git tools: githunter_toolset, github_toolset (from bond-agent) System prompt explains Dataing platform capabilities and guides response format. Files: - agents/assistant.py - DataingAssistant class with all tools - tests/unit/agents/test_assistant.py - 22 unit tests Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Created migration 035_dataing_assistant.sql with three tables: 1. assistant_sessions - Links sessions to investigations (each session is an investigation) - Parent/child investigation linking support - Token usage and last_activity tracking - User preferences in metadata JSONB 2. assistant_messages - Chat messages with role (user/assistant/system/tool) - Tool call tracking as JSONB array - Per-message token count 3. assistant_audit_log - Security audit trail of all tool usage - Action type, target, result summary - Full metadata in JSONB Includes indexes for fast queries and trigger to auto-update session activity. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Created REST API routes for the Dataing Assistant.
Endpoints:
- POST /assistant/sessions - Create new session
- GET /assistant/sessions - List user sessions
- GET /assistant/sessions/{id} - Get session details
- POST /assistant/sessions/{id}/messages - Send message
- GET /assistant/sessions/{id}/stream - SSE stream
- DELETE /assistant/sessions/{id} - Delete session
- POST /assistant/sessions/{id}/export - Export (JSON/Markdown)
Features:
- Real-time streaming via EventSourceResponse
- 15-second heartbeat for connection keep-alive
- Client disconnect detection
- Audit logging for all tool calls
- Full Pydantic model validation
Files:
- routes/assistant.py - API routes with SSE streaming
- routes/__init__.py - Router registration
- tests/unit/entrypoints/api/routes/test_assistant.py - 20 unit tests
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Routes were registered and dependencies added as part of fn-56.3. DataingAssistant is created per-request with tenant isolation (appropriate for multi-tenancy, not a singleton). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Created Dataing Assistant frontend feature with floating chat widget. Components: - AssistantWidget - Floating button + Sheet panel - AssistantPanel - Chat UI with input, messages, quick questions - AssistantMessage - Individual message display with streaming support - useAssistant - State hook with SSE streaming Features: - Floating button at bottom-20 right-4 (above DemoToggle) - Slide-out Sheet panel for chat - Session persistence in localStorage - SSE streaming for real-time responses - Tool call indicators - Quick question suggestions - Auto-scroll to bottom on new messages - Enter to send, Shift+Enter for newline Integration: - Widget added to App.tsx - Uses existing Sheet component from shadcn/ui - Uses JWT auth context for API authentication Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Generated OpenAPI client for assistant endpoints and created API wrapper. Changes: - Generated assistant API client from OpenAPI spec - Created lib/api/assistant.ts with cleaner hook names - Updated useAssistant hook to use generated client - Removed raw fetch calls in favor of type-safe API client New API hooks: - useCreateAssistantSession - useAssistantSessions - useAssistantSession - useDeleteAssistantSession - useSendAssistantMessage - useExportAssistantSession Also includes generated types for git repos, code changes, snapshots, and other new API features from the OpenAPI schema. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add parent/child investigation linking for assistant chat sessions:
- Add _load_parent_investigation_context() to load parent findings/events
- Update _process_message() to merge parent context into assistant context
- Add GET /assistant/investigations/{id}/sessions endpoint
- Update useAssistant hook to support parentInvestigationId
- Regenerate OpenAPI client with new endpoint
- Add 4 unit tests for parent context loading
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add "This was helpful" button to assistant messages for memory integration: - Add FEEDBACK_ASSISTANT_MESSAGE event type for feedback tracking - Add "assistant_message" target type to feedback API routes - Update investigation_feedback.ts with new target type and generic hook - Add "This was helpful" button to AssistantMessage component - Pass sessionInvestigationId to messages for context - Update InvestigationFeedbackButtons REASON_OPTIONS - Regenerate OpenAPI client This enables users to mark helpful responses which can be used for agent memory and fine-tuning in the future. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Complete the Dataing Assistant epic (fn-56) with:
- fn-56.12: Parent/child investigation linking
- fn-56.13: Agent memory integration ("This was helpful")
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Related Issues
Type of Change
Checklist
git commit -s) per the DCOjust lintpasses locallyjust typecheckpasses locallyjust testpasses locallyScreenshots / Recordings
Additional Context