Skip to content
This repository was archived by the owner on May 30, 2026. It is now read-only.

Dev#924

Merged
JegernOUTT merged 623 commits into
mainfrom
dev
May 4, 2026
Merged

Dev#924
JegernOUTT merged 623 commits into
mainfrom
dev

Conversation

@JegernOUTT
Copy link
Copy Markdown
Member

No description provided.

Add comprehensive device-flow OAuth support for GitHub Copilot alongside
existing manual-code and callback flows. Introduces new UI components for
displaying user codes, verification URLs, and polling status.

Changes:
- Add OAuthStartMode and response type definitions for device flow
- Implement device polling mechanism with configurable intervals
- Add GitHub Copilot device-flow UI with user code and verification URL
- Extract container styling to CSS module for reusability
- Add type validation for OAuth responses
- Add comprehensive test coverage for all OAuth flow types
Implement three new modules for the competitor import system:

- **markdown.rs**: Utilities for parsing/rendering markdown with YAML frontmatter,
  sanitizing identifiers, and extracting metadata from markdown content
- **tools.rs**: Tool mapping and resolution logic that normalizes tool aliases
  (e.g., "read" → "cat", "bash" → "shell") and applies allow/deny policies
- **converters.rs**: High-level conversion functions for commands, skills, and
  subagents that orchestrate markdown parsing, tool mapping, and artifact generation

Also add supporting types (ConversionContext, ConversionError, ToolPolicy,
NormalizedSubagent) to types.rs and export new modules from mod.rs.

Includes comprehensive unit tests for all conversion and utility functions.
Update test assertions to use helper functions for better type safety and
readability. Fix line wrapping and formatting to comply with linter rules
across test files and UI components following provider OAuth work.

- Replace complex expect.arrayContaining chains with helper functions
  (isActionWithType, isCreateWithModeAction)
- Add proper type annotations to test dispatch functions
- Fix optional chaining and null checks in fetch mock assertions
- Correct line wrapping for long expressions and JSX attributes
- Remove extra blank lines
Implement comprehensive Claude Code import functionality to collect and
convert skills, commands, and agents from both global (~/.claude) and
project-level (.claude) directories.

Changes:
- Add new `sources/claude.rs` module with candidate collection logic
- Support skill packages, markdown commands, and agent definitions
- Parse YAML frontmatter from markdown files with strict validation
- Convert Claude Code artifacts to Refact format via existing converters
- Add async support to global and project import functions
- Implement `run_project_import_with_paths` for testable project imports
- Update tests to use tokio::test for async functions
- Handle symlinks safely and report detailed import issues
Apply rustfmt to standardize code formatting across buddy module and
related files. Fixes inconsistent indentation in method chains, match
expressions, and function arguments. Also reorders module declarations
in providers/mod.rs for consistency.
Implement a new importer for Kilo Code projects that scans and converts
Kilo Code skills, commands, agents, and configuration files into Refact
format. Supports both project-level and global-level imports across
multiple Kilo Code directory structures (.kilo, .kilocode) and legacy
workflows.

- Add kilo.rs module with project and global root scanning
- Extract reusable CompatibleScanRoots abstraction in opencode.rs
- Support Kilo Code config files (kilo.json, kilo.jsonc)
- Report unsupported rule files without blocking imports
- Include comprehensive test coverage for all import scenarios
Replace manual null check with expect assertion in test helper and
change void to undefined for proper type consistency after provider
overhaul validation.
- Update speech bubble positioning, sizing, shadows, and controls styling
- Improve ground rendering with layered hills and refined grass animation
- Refine home hotspot, object sprites, and world objects with new colors/sizes
- Adjust canvas display size and model positions for better layout
- Tweak CSS positioning for compact mode compatibility
…ask agents

Introduce WorktreeService as the authoritative source for task-agent worktree
lifecycle management, replacing ad-hoc git operations and file system calls.

Key changes:
- Add WorktreeMeta to ThreadParams so agents access their worktree via
  execution scope rather than board card mirrors
- Prefer thread worktree over board card agent_worktree/agent_branch fields
- Consolidate worktree and branch cleanup into remove_agent_worktree_and_branch()
  using WorktreeService for registry consistency
- Add agent_worktree_name field to BoardCard for tracking registered worktree IDs
- Refactor PreparedWorktree to wrap WorktreeMeta, enabling async cleanup via service
- Improve error messages to include worktree paths for debugging
- Add comprehensive tests for worktree resolution, cleanup, and auto-commit flows
Replace optional code_workdir parameter with ExecutionScope in file edit
tools (create, update, undo, apply_patch) and shell tool. Add path
resolution through worktree scope with automatic remapping of absolute
paths to active worktree and privacy-aware warnings.

- Introduce ResolvedToolPath struct to carry resolved paths and warnings
- Add resolve_path_with_scope() for scope-aware path resolution
- Add helper functions for scope warnings and message formatting
- Update all file edit tool signatures to accept ExecutionScope
- Update shell tool to enforce workdir within active worktree
- Add comprehensive tests for scoped path resolution and warnings
- Extend tool_apply_patch, tool_rm, and tool_mv to support scope
…d summaries

Integrate competitor import into startup flows with cache invalidation and
comprehensive logging:

- Add global import execution during agent startup (main.rs)
- Add project import execution during workspace initialization
- Implement cache invalidation based on import changes (commands, skills, subagents)
- Add detailed import summary logging per scope with status breakdowns
- Persist last import report to manifest for each scope
- Refactor import collection to support multiple sources (Claude, OpenCode, Kilo, Continue)
- Normalize project root paths to deduplicate equivalent workspace roots
- Add comprehensive test coverage for global/project imports and cache invalidation
Introduce bubbleChildren to HistoryTreeNode to display subagentic chats
(gather_files, code_review, etc.) as compact dots rather than expanding
tree rows. Preserve main chat links (handoff, mode_transition, branch)
as regular children.

Improve trajectory updated_at logic to only update timestamp when
messages actually change, preventing unnecessary file modifications.

Add parentId/linkType support throughout chat creation flow and UI
components. Update DotTrail to show subagent bubbles with purple dots.

Includes comprehensive tests for bubble sorting, searching, and
updated_at preservation.
Add execution scope validation to file reading, searching, and tree browsing
tools to restrict operations within active worktree boundaries. Implement
scope-aware path resolution with privacy checks and user-facing notices for
path remapping and out-of-scope access.

Key changes:
- Add `resolve_file_path_directly_with_scope()` for scoped file resolution
- Implement `resolve_existing_path_with_execution_scope()` for scope validation
- Add `list_scoped_files_under_dir()` for directory listing within scope
- Implement `remap_context_file_for_execution_scope()` for AST/VecDB results
- Add scope notice formatting and deduplication utilities
- Update @file, @tree, tool_cat, tool_tree, tool_regex_search, tool_search,
  and tool_ast_definition to use scoped operations
- Add comprehensive test suite for worktree scope enforcement in read tools
- Extend files_correction and files_in_workspace with privacy-aware helpers
Add extensive test coverage for competitor import scenarios including:
- Cross-source conflicts with first-write-wins behavior
- Source updates with user modification detection
- Global and project import isolation
- Continue rules filtering while importing checks
- KiloCode legacy workflow imports
- Malformed source error handling
- Multi-source subagent YAML generation with tool safety

Harden conflict detection by adding manifest entry matching to identify
when a destination file is owned by a different import source, preventing
silent overwrites and properly reporting conflicts.

Add test helper functions for status counting, subagent config reading,
and string conversion to reduce test boilerplate.
Introduce BubbleView interface and state to manage bubble properties
(text, position, width, opacity, etc.) reactively instead of direct DOM
manipulation in RAF loop. Improves testability and reduces side effects.

Minor test cleanup: remove redundant link_type properties.
Split monolithic `is_codex_model()` into distinct predicates to handle
different subscription models:

- `is_codex_named_model()`: GPT-5-Codex family (API-only)
- `is_gpt5_subscription_model()`: GPT-5 subscription models (ChatGPT Plus/Pro)
- `is_openai_codex_catalog_model()`: Union for catalog fallback
- `is_chatgpt_codex_live_model()`: ChatGPT live models
- `is_openai_api_codex_live_model()`: OpenAI API live models

Add `normalized_model_id()` helper to consistently handle underscore/hyphen
variants. Update regex pattern to match both codex and subscription models.
Extend test coverage for new predicate combinations and add GPT-5 subscription
model test cases.
…r parity

Add GitHub Copilot-specific request handling with proper authentication and
header management across all LLM adapters:

- Detect GitHub Copilot requests by model ID prefix or endpoint hostname
- Use Bearer token authentication for Copilot endpoints instead of x-api-key
- Add required Copilot headers: Openai-Intent, x-initiator, Copilot-Vision-Request
- Protect critical headers from being overridden via extra_headers
- Support Anthropic Messages wire format for /v1/messages endpoint
- Conditionally set vision header only when request contains images
- Detect initiator type (user vs agent) based on message roles

Implement across Anthropic, OpenAI Chat, and OpenAI Responses adapters with
comprehensive test coverage for header protection and vision detection.
…itization

- Increase bubble width options (240px, 300px, 340px) with refined text length logic
- Remove scrollable bubbles, simplify overflow to visible
- Add document.hidden checks to pause RAF loops in BuddyCanvas and BuddyWorld
- Implement priority-based runtime event selection with scoring system
- Disable home door when already in Buddy home
- Minor formatting fixes across components and tests

Remove unused scene HUD CSS styles.
…sary manifest writes

Add comprehensive path validation to prevent directory traversal attacks and
symlink-based escapes from import scopes. Implement conditional manifest
persistence to avoid creating empty manifests for no-op imports.

Changes:
- Validate destination paths are relative and don't escape scope (lexical + canonical)
- Validate source paths remain under their declared roots
- Validate project source roots stay within workspace boundaries
- Skip manifest writes when import has no activity and manifest doesn't exist
- Add extensive test coverage for path traversal and containment scenarios
- Revamp speech bubble positioning, sizing, and styling with improved
  tail rendering using inner/outer tail approach
- Add refined width tiers (330px/300px/260px/220px) for better text wrapping
- Introduce constants for bubble colors and improve button styling
- Enhance BuddyWorld with distant hills, home path, celestial bounds,
  object sparkles, and increased canvas size
- Improve runtime speech text processing with normalization, error
  rewriting (context window → friendly message), and default controls
- Add test for context window error handling
- Adjust CSS positioning for new bubble and character layouts
Add comprehensive test coverage for Qwen/DashScope cache metrics (prompt_cache_hit_tokens,
prompt_cache_miss_tokens) in OpenAI adapter, Anthropic cache control with reasoning and tools,
and custom model quirks handling for Qwen and Zhipu providers.

- Add test_anthropic_supported_flags_keep_cache_control_tools_and_reasoning to verify
  cache control, tools, and reasoning flags coexist in Anthropic requests
- Add test_parse_openai_usage_with_dashscope_cache_metrics to validate DashScope cache
  token parsing in OpenAI adapter
- Add test_parse_stream_chunk_reasoning_content for reasoning content streaming
- Add custom model quirks tests for Qwen and Zhipu to ensure provider-specific fields
  are not applied to custom model variants
Implement comprehensive worktree merge functionality with conflict detection,
cleanup operations, and integration with task agent workflows.

Changes:
- Add POST /worktrees/:id/merge endpoint with merge strategy support (merge/squash)
- Implement WorktreeService.merge_worktree() with preflight conflict detection
- Add git operations: branch_exists, ensure_clean_worktree, commits_ahead,
  checkout_branch, commit_all, parse_conflict_files, abort_merge,
  preflight_merge_conflicts
- Enhance diff output with line addition/deletion counts via numstat parsing
- Add WorktreeConflictState and MergeWorktreeResponse types with cleanup tracking
- Integrate merge service into ToolTaskMergeAgent for registered task workflows
- Add merge lock to prevent concurrent merge operations
- Add HTTP 409 Conflict status for merge conflicts and in-progress merges
- Comprehensive test coverage for merge scenarios (squash, regular, conflicts, cleanup)
Refact Agent and others added 29 commits May 3, 2026 03:32
Move `bubblePositionForSceneX` into a dedicated Buddy world utils
module and tighten several null-safe state accesses while keeping the
same behavior.
Emit `workspace_changed_tx` notifications when the workspace is
initialized or when folders are added/removed so downstream listeners
can react to updated workspace state.
Use the configured LSP port to open the local web app in an external
browser from the toolbar, and tighten event validation for external URL
actions.
Tighten the chat form controls so they compress gracefully on narrow
screens.

- add container-query based hiding for low-priority controls
- prevent select triggers from overflowing by allowing flex shrink
- wrap project info control for responsive visibility handling
Adjust the chat form bottom controls to keep the mode selector aligned
with the other controls and tighten the responsive flex behavior.
Switch the chat placeholder from the old tip-of-the-day and
settings-driven copy to a Buddy-based insight message sourced from
buddy state and activity data.
Delete the Bitbucket, GitHub, GitLab, MySQL, Postgres, and PDB
integration implementations and unregister them from the integrations
module list. Also trim now-unused process I/O helpers.
Add `chat_id` to buddy activities and update the activity panel so
clickable entries can open the related Buddy chat. Also exclude Buddy
chats from normal persisted chat tabs and hydration so they do not
pollute the regular chat list.
Integrate Buddy placeholder UI changes and minor formatting updates
from the worktree into the dev branch.
Replace the state-driven Buddy placeholder speech with a random
greeting and center the empty-state layout for a cleaner, simpler
chat landing experience.
Replace hardcoded “Buddy” strings with the user’s companion name
throughout engine and GUI, and update related prompts, labels, and
status text to use identity-aware wording.
Make the empty chat state stretch to the full container height so the
placeholder centers correctly.

Also remove the welcome text and unused `Text` import.
Adjust buddy poses and diorama rendering to use softer transforms and
frame-time-based animation timing, making motion feel more consistent
and less jittery.
Update the chat placeholder to pick from a larger set of witty
greetings, with messages that incorporate the buddy name when
available.
Add the current buddy name to callback/effect dependencies so UI actions
reflect renamed state immediately, and preserve empty-string names by
falling back only when the semantic state name is missing.
@JegernOUTT JegernOUTT merged commit c9ff799 into main May 4, 2026
16 of 18 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant