Commit Graph

1497 Commits

Author SHA1 Message Date
can1357 a5fa614f1a feat(lsp): added deferred diagnostics and workspace-scoped LSP actions
- Added deferred diagnostics support in LSP writethrough: `onDeferredDiagnostics` callback and `deferredSignal` in `WritethroughOptions` allow callers to receive diagnostics that arrive after the main 5-second timeout.
- Added language detection for `.pm` (Perl modules), `.astro` (Astro framework), and special filenames `containerfile` and `justfile`.
- Added workspace-scoped diagnostics and reload actions via `*` file parameter; `diagnostics` action now supports `*` for workspace-wide diagnostics across all configured servers.
- Reduced LSP diagnostics timeout from 10 seconds to 5 seconds for faster feedback; slow diagnostics now fetch in background via deferred mechanism.
2026-04-08 04:18:15 +02:00
can1357 970e115140 feat(dap): added socket-mode transport and improved session initialization for DAP adapters
- Added socket-mode transport support for DAP adapters, enabling network socket debuggers like dlv alongside stdio mode.
- Improved extensionless binary debugging to prioritize native debuggers and adapters with root markers.
- Fixed DAP session initialization to subscribe to stop events before launching/attaching, preventing missed stopOnEntry events.
- Refactored session event handling to fetch stack frames outside dispatch loop, eliminating deadlocks and improving responsiveness.
- Enhanced evaluate requests to default to top stopped frame when frameId is not explicitly provided.
2026-04-08 04:16:45 +02:00
can1357 d19d51770f feat(coding-agent): enabled eager todo skip for queries and commands
- Eager todo enforcement now skips prompts ending with question marks or exclamation marks, treating them as queries or commands rather than statements requiring task planning.
- Added 2 test cases validating that eager todo enforcement is skipped for prompts ending with question and exclamation marks.
2026-04-08 03:48:46 +02:00
can1357 f4be4f6232 feat(dap): introduced Debug Adapter Protocol tool for launch/attach debugging with breakpoints and inspection
- Added Debug Adapter Protocol (DAP) tool enabling launch/attach debugging with breakpoint management, stepping, stack traces, and variable inspection.
- Added debug adapter configurations for gdb, lldb-dap, debugpy, and dlv with automatic language and project detection via root markers.
- Added debug session management with conditional breakpoints, flow control (continue/step/pause), scopes, variables, and expression evaluation.
- Added `debug.enabled` setting to control debug tool availability and integrated debug tool into agent's builtin tools registry.
- Added environment variable configuration (TERM, GPG_TTY, NO_COLOR, PYTHONUNBUFFERED) to prevent terminal blocking in non-interactive execution.
2026-04-08 01:42:25 +02:00
can1357 45bade9612 feat(chunk): added canonical chunk paths with CRC validation and selector resolution
- Added fully-qualified anchor paths in chunk read output showing complete path hierarchy with CRC checksums.
- Added exact chunk selector resolution with CRC validation to enforce canonical chunk paths in edit operations.
- Added `?` selector option to read syntax-aware chunks by canonical path listing when anchor paths are unclear.
- Improved tree-sitter range handling with `end_row_as_line()` function to correctly convert half-open ranges to 1-indexed line numbers.
- Extracted anchor label logic into `chunk_anchor_label()` const function and consolidated style-based selection.
- Removed --dev flag support from native build pipeline and dev:native npm scripts.
2026-04-07 23:31:39 +02:00
can1357 e6d36e2d8a fix(coding-agent): corrected plan review previews to re-append at chat tail on refresh
- Fixed plan review previews to re-append at the chat tail on refresh, keeping them adjacent to the active selector instead of updating off-screen.
- Added comprehensive test coverage for plan review rendering behavior across multiple refresh cycles.
2026-04-07 22:38:49 +02:00
can1357 70fa7a9d25 refactor(natives): simplified native module loader and removed validation overhead
- Removed native binding validation function that checked required exports at load time.
- Enhanced native module loader to check XDG_DATA_HOME environment variable before ~/.omp/natives fallback.
- Removed dependency on @oh-my-pi/pi-utils from native module loader by inlining helper functions.
- Migrated child process termination from waitForChildProcess utility to killTree native binding.
2026-04-07 22:08:57 +02:00
can1357 c849bf6d30 chore: reorg CHANGELOG 2026-04-07 05:54:45 +02:00
can1357 87a3b6ca03 refactor(patch): restructured chunk edit schema to use explicit op enum and anchor field
- Refactored chunk edit schema to use explicit `op` enum field (replace, delete, append, prepend, after, before) instead of multiple boolean/string flags.
- Renamed chunk edit parameters from `after`/`before` field names to `anchor` for sibling-relative insert operations.
- Simplified chunk edit validation logic by consolidating nested conditionals into switch statement on operation type.
- Fixed `log_experiment` to correctly identify run-modified files by removing pre-run dirty path filtering.
- Simplified chunk edit and read prompt documentation to emphasize read-first workflow with consolidated examples.
2026-04-07 05:53:40 +02:00
can1357 a30ee4a111 refactor(chunk): restructured path parsing and edit operations for cleaner CRC handling
- Simplified chunk path parsing to extract selector separately from CRC field.
- Refactored chunk edit operations to conditionally strip CRC for auto-accepted batch operations.
- Enhanced chunk edit preview formatting to display operation types with target and line ranges.
- Improved chunk state rendering with clamped visible range and unified notice message format.
- Refactored error handling in chunk resolution from map_err to let-else pattern.
2026-04-07 05:51:21 +02:00
can1357 567197c34e feat: added macOS power assertion module to prevent idle-sleep during sessions
- Added MacOSPowerAssertion native module to prevent idle-sleep on macOS during active sessions.
- Integrated power assertion lifecycle management into coding-agent session with automatic start/stop.
- Implemented N-API bindings for macOS IOKit power assertions with RAII cleanup and cross-platform no-op fallback.
- Reformatted indentation from spaces to tabs across Rust chunk module for consistency.
2026-04-07 05:51:21 +02:00
can1357 ad4c5917a4 refactor(chunk): restructured selector resolution and state lookup with unified classification
- Refactored chunk selector resolution to extract and preserve raw selector strings separately from parsed CRC checksums.
- Reorganized chunk state lookup infrastructure with dedicated maps for checksum, leaf, and suffix-based chunk resolution.
- Simplified batch operation CRC validation to auto-accept stale checksums for subsequent operations on the same chunk.
- Unified TypeScript interface and Nix attrset chunk classification with consistent naming and nested expression handling.
- Extracted clipboard utility functions to dedicated module with improved OSC 52 and Termux support.
- Updated chunk read formatting with anchorStyle parameter and ellipsis standardization for improved consistency.
2026-04-07 05:51:21 +02:00
can1357 a6c78612e9 fix(coding-agent): corrected chunk edit validation using embedded CRC checksums
- Fixed chunk edit operations to extract and use embedded CRC checksums from selectors as fallback validation.
- Refactored patch operations to parse selectors and strip CRC suffix before processing insert, replace, and delete commands.
- Extended parseChunkSelector to return optional CRC field extracted from selector suffix for validation.
- Improved operator precedence clarity in read tool by adding parentheses around nullish coalescing expression.
2026-04-07 02:05:30 +02:00
can1357 9b78a6fa85 refactor(natives): migrated native bindings to NAPI-RS with auto-generated types
- Migrated native bindings from TypeScript wrappers to NAPI-RS generated modules with auto-generated type definitions and runtime enums.
- Replaced chunk tree API with stateful ChunkState class supporting render, edit, and resolve operations with improved error handling.
- Converted callback signatures to error-first pattern (error, result) for shell, PTY, glob, and grep operations.
- Introduced type-safe enums for MacOSAppearance, GrepOutputMode, KeyEventType, ImageFormat, and AstMatchStrictness replacing string literals.
- Refactored chunk tree implementation with dedicated modules for edit, indent, resolve, and state management with comprehensive validation.
- Moved clipboard utilities from native bindings to coding-agent package with improved OSC 52 and Termux compatibility.
2026-04-07 02:00:59 +02:00
can1357 20e60fba34 feat(coding-agent): enabled prose chunk rendering for markdown and text files
- Added `read.prosechunks` setting to enable chunk rendering for prose files (markdown, text, log, asciidoc, restructuredtext) in chunk edit mode.
- Added `read.explorechunks` setting to show chunk tree without checksums for read-only agents like explore.
- Implemented prose language detection and conditional chunk skipping logic based on file type and agent capabilities.
2026-04-06 21:21:01 +02:00
can1357 5e106e22db refactor(chunk): distributed AST classification to language modules
- Distributed language-specific AST classification logic from defaults module to individual language modules for 15+ languages.
- Simplified defaults module to minimal catch-all fallbacks, removing 341 lines of match-based classification logic.
- Consolidated chunk edit operations by removing splice operation and unifying with line-scoped replace parameters.
- Simplified chunk rendering output format by reducing thresholds and changing line count display from 'lines' to 'ln' suffix.
- Removed PI_CHUNK_SPLICES environment variable and chunkSplicesEnabled conditional logic throughout codebase.
2026-04-06 20:52:07 +02:00
can1357 79e2f8b2b1 feat(coding-agent): introduced keyed union format for chunk operations
- Changed chunk edit operation format from flat `op` field to nested keyed union structure with operation name as object key.
- Added parseKeyedChunkOp() function to normalize both keyed and legacy flat operation formats for backward compatibility.
- Enhanced chunk selector sanitization with filename prefix stripping and case-insensitive CRC checksum matching.
- Updated chunk edit prompt documentation and test suite to reflect new nested operation JSON structure.
2026-04-06 18:50:08 +02:00
can1357 266aabf29f feat(autoresearch): enabled selective segment creation and working tree preservation in experiments
- Added `new_segment` parameter to `init_experiment` to force new segment creation when contract fields match.
- Added `skip_restore` parameter to `log_experiment` to preserve working tree state and pre-existing uncommitted changes.
- Changed `log_experiment` to revert only run-modified files instead of entire working tree, preserving user changes.
- Changed `init_experiment` to detect matching contract fields and skip re-initialization unless `new_segment=true`.
- Added git status parsing utilities to track pre-run dirty paths and distinguish tracked vs untracked modifications.
- Removed secondary metrics validation requirement, making secondary metrics informational only.
2026-04-06 18:49:52 +02:00
can1357 8718c62ea2 chore: update tests, lockfiles, and misc cleanups 2026-04-06 18:41:17 +02:00
can1357 97e2acdf60 feat(lsp): added diagnostic versioning to suppress stale LSP results
- Added LSP diagnostic versioning support to track document versions and suppress stale diagnostics.
- Added options parameter to `waitForDiagnostics` and `getDiagnosticsForFile` with version filtering capabilities.
- Enabled `versionSupport` in LSP client capabilities to receive diagnostic version information from servers.
- Added test coverage for stale diagnostic suppression scenarios in LSP diagnostic freshness.
2026-04-06 01:16:26 +02:00
can1357 d116b44b81 chore: bump version to 13.19.0 2026-04-05 17:38:13 +02:00
can1357 3d29a48e7a fix(coding-agent): fixed memory leak by cancelling idle compaction
- Fixed memory leak by cancelling idle compaction timer on event controller disposal.
- Fixed session resumption to preserve last non-empty session when starting fresh.
- Fixed stash detection to use git ref resolution instead of output parsing for reliability.
- Fixed secret obfuscation to deobfuscate restored session messages locally while keeping LLM messages obfuscated.
- Fixed stash pop operation to preserve staged changes with --index flag after task branch merges.
- Changed idle compaction settings from enum to numeric type for flexible configuration.
2026-04-05 03:50:52 +02:00
Can Bölük 0e6f03b97e Merge branch 'main' into feat/secrets-hash-redaction 2026-04-05 01:19:34 +02:00
Can Bölük 63625184d8 Merge branch 'main' into feat/idle-compaction 2026-04-05 01:18:59 +02:00
Can Bölük fb1d46a86c Merge branch 'main' into feat/task-merge-back-safety 2026-04-05 01:18:12 +02:00
Can Bölük 0bf6b497d1 Merge branch 'main' into feat/web-search-source-truncation 2026-04-05 01:10:53 +02:00
can1357 511fddd8de revert: language-specific import management experiment
This reverts commit f044f3ba75.
2026-04-04 21:35:39 +02:00
can1357 85d0d366c5 fix(coding-agent): resolved PR checkout worktree paths to canonical form
- Fixed PR checkout tool to resolve worktree paths to canonical form using fs.realpath().
- Refactored test mocks to use vi.spyOn for git module functions instead of inline implementations.
- Updated test setup to pass Settings.isolated() with edit.manageImports enabled to EditTool.
- Added afterEach hooks across test suites to restore mocks after each test execution.
2026-04-04 16:08:48 +02:00
Patrik Sundberg 06ed77081d docs(coding-agent): add session observer to changelog 2026-04-04 15:53:31 +02:00
DeprecatedLuke 8023872f43 feat(coding-agent): switch secret placeholders to hash tokens 2026-04-04 11:54:34 +01:00
DeprecatedLuke fba6cc278b feat(coding-agent): truncate web search source lines 2026-04-04 11:53:17 +01:00
DeprecatedLuke d64fa7e859 feat(coding-agent): preserve results on isolated merge failures 2026-04-04 11:52:58 +01:00
DeprecatedLuke 5dfa44f2a3 feat(coding-agent): add idle compaction flow 2026-04-04 11:52:43 +01:00
can1357 f044f3ba75 feat(patch): added language-specific import management with deduplication
- Added language-specific import management for TypeScript, JavaScript, Python, Rust, Go, and C/C++ with automatic deduplication and grouping.
- Added `imports` parameter to patch, hashline, and replace edit operations for structured import/include requests with named, default, namespace, and alias support.
- Added `edit.manageImports` setting to control post-edit import management behavior across all edit operations.
- Implemented language-specific import handlers with parsing, merging, and rendering logic for each supported language.
- Integrated import application into EditTool with feature flag support and comprehensive test coverage across all languages.
2026-04-02 08:36:28 +02:00
can1357 6bb10ca40e feat(modes): enabled external editor integration for plan review and editing workflows
- Added external editor callback support to extension UI dialogs and hook selector for opening plans in external editor.
- Added `matchesAppExternalEditor()` keybinding matcher to detect external editor shortcuts (ctrl+g) across components.
- Added `trimTrailingNewline` option to `openInEditor()` function to preserve trailing newlines when editing externally.
- Modified plan review flow to re-read plan content from disk before approval to reflect external editor changes.
- Refactored plan preview rendering to cache and reuse UI container instead of recreating children on each render.
- Refactored Promise creation in external editor utility to use `Promise.withResolvers()` for cleaner async handling.
2026-04-02 07:43:01 +02:00
can1357 80f771d22f refactor(coding-agent): migrated GitHub CLI utilities to git.github namespace
- Migrated GitHub CLI utilities from gh-cli.ts module to utils/git.ts github namespace.
- Consolidated GitHub CLI command execution (available, run, json, text) into git.github namespace with unified error handling.
- Removed gh-cli.ts module and ControlledGit class infrastructure; updated all tool imports and call sites.
- Exported git utilities from main package entry point for extension use.
2026-04-02 07:39:11 +02:00
can1357 418b6801a0 refactor(coding-agent): migrated git operations to centralized utils module
- Extracted git operations from ControlledGit class into centralized utils/git module with 1276 lines of typed command wrappers.
- Replaced dependency injection of ControlledGit instances with direct cwd string parameters across commit agent tools and workflows.
- Migrated all git command execution from inline shell calls and custom helpers to structured git module API (diff, status, branch, worktree, patch, etc.).
- Removed ControlledGit class, operations.ts, and helper functions (findGitHeadPath, mergeStdoutStderr, joinPatch) now provided by git module.
- Exported git utilities from main package entry point for extension and plugin use.
2026-04-02 07:35:44 +02:00
can1357 279ae220a4 chore: bump version to 13.18.0 2026-04-02 06:00:18 +02:00
can1357 d6d15a2937 refactor(tools): consolidated fetch into read tool with URL caching
- Consolidated fetch tool into read tool with URL reading capability and caching support.
- Removed standalone fetch tool from all agent prompts and CLI documentation.
- Extended read tool schema with timeout and raw parameters for URL fetch control.
- Added URL caching mechanism to prevent redundant network requests during read operations.
- Refactored fetch module from class-based tool to standalone executeReadUrl function.
- Updated read tool documentation to describe multi-purpose capabilities including web pages, GitHub, Stack Overflow, Wikipedia, Reddit, NPM, arXiv, blogs, and feeds.
2026-04-02 05:59:50 +02:00
can1357 264e02fde3 chore: bump version to 13.17.5 2026-04-02 00:17:12 +02:00
can1357 25f3a029fb feat(tools): added ZIP archive writing support via fflate library
- Added support for writing to ZIP archives using fflate library for cross-platform compatibility.
- Modified archive writing to detect and handle ZIP files separately from Bun archives.
- Removed GhPrPushTool test case.
2026-04-02 00:08:34 +02:00
can1357 bb01e58865 chore: bump version to 13.17.4 2026-04-01 23:50:36 +02:00
can1357 9498032d68 feat(coding-agent): enabled archive entry writes with automatic creation support
- Added support for writing to archive entries using `archive.ext:path/inside/archive` syntax for .tar, .tar.gz, .tgz, and .zip formats.
- Added ability to create new archives automatically when writing to non-existent archive subpaths with nested directory support.
- Implemented archive path resolution and validation with fallback to plain file writes for non-archive filenames.
- Added comprehensive test coverage for archive write operations including entry updates, archive creation, and fallback behavior.
2026-04-01 21:25:36 +02:00
can1357 236fedaf2e chore: bump version to 13.17.3 2026-04-01 20:57:14 +02:00
can1357 d8f5bb4be2 feat(coding-agent): replaced markitdown CLI with native markit-ai library for document conversion
- Replaced Python-based markitdown CLI with native markit-ai library for document and notebook conversion.
- Added support for converting Jupyter notebooks (.ipynb) to markdown via markit-ai integration.
- Created markit utility module with file/buffer conversion wrappers and standardized error handling.
- Removed markitdown from Python tools manager and eliminated external CLI dependency.
- Updated fetch, read, and scraper tools to use new markit conversion API across codebase.
- Added test coverage for ipynb file conversion through markit utility.
2026-04-01 20:51:29 +02:00
can1357 9281e6b50e feat(coding-agent): added archive reading support for tar, tar.gz, tgz, zip
- Added archive reading support for .tar, .tar.gz, .tgz, and .zip files with virtual subpath syntax (archive.ext:path/inside/archive).
- Added archive listing and subdirectory navigation capabilities to explore archive contents without extraction.
- Added /tools slash command to display visible agent tools and their capabilities.
- Implemented ArchiveReader module with openArchive(), parseArchivePathCandidates(), and archive content extraction methods.
- Added fflate 0.8.2 dependency for archive decompression support.
- Added comprehensive test coverage for TAR, TAR.GZ, TGZ, and ZIP archive reading with fixture generation utilities.
2026-04-01 20:45:51 +02:00
can1357 e59436ba31 feat(coding-agent): added /tools command to display available agent tools
- Added `/tools` slash command to display agent-visible tools in interactive sessions.
- Added `handleToolsCommand()` method to InteractiveMode to delegate tools display to command controller.
- Added `buildToolsMarkdown()` utility function to generate formatted markdown table of available tools.
- Refactored `showMarkdownPanel()` helper to reduce duplication in markdown display logic across commands.
2026-04-01 20:32:59 +02:00
can1357 5fbfbafa58 chore: bump version to 13.17.2 2026-04-01 19:32:22 +02:00
can1357 5f0944ffe2 feat: added marketplace help command and improved catalog parsing resilience
- Added `/marketplace help` subcommand to display marketplace operations usage guide.
- Enhanced marketplace catalog parsing to skip invalid entries with warnings instead of failing.
- Improved `/marketplace discover` command to suggest official marketplace when no plugins available.
- Fixed marketplace error messages to display error details instead of object stringification.
- Added comprehensive marketplace plugin system documentation covering discovery, installation, and management.
2026-04-01 19:31:48 +02:00
can1357 68cf52de3c fix(session): corrected artifact storage fallback for non-persistent sessions
- Fixed artifact storage for non-persistent sessions to use in-memory fallback instead of returning undefined, enabling proper spill truncation for all session types.
- Added in-memory artifact map and counter to SessionManager for fallback storage when file-based ArtifactManager is unavailable.
- Updated saveArtifact() JSDoc to reflect new behavior of returning artifact IDs for all sessions.
2026-04-01 19:08:48 +02:00