Commit Graph

316 Commits

Author SHA1 Message Date
can1357 52719d1a7c refactor: restructured monorepo TypeScript config and build tasks for unified setup
- Migrated all package tsconfig files to extend tsconfig.workspace.json for unified TypeScript configuration across monorepo.
- Consolidated build and check scripts across 10+ packages to use biome for linting/formatting with separate type checking via tsgo.
- Renamed build scripts from build:native and build:binary to build for simplified command naming across packages/natives and packages/coding-agent.
- Refactored CI workflow to invoke bun tasks instead of inline shell scripts, reducing workflow complexity by 40+ lines.
- Removed sync-exports.ts and repro-stuck.ts scripts; deleted path aliases from tsconfig.base.json in favor of workspace-based configuration.
- Updated turbo.json with new task definitions (check:types, lint, fmt, fix) and removed build:native/embed:native tasks.
2026-04-08 17:05:20 +02:00
can1357 f2fceb27ad chore: bump version to 14.0.1 2026-04-08 15:07:01 +02:00
can1357 3f4384f6b1 fix(auto-generated-guard): corrected file not found handling in marker detection
- Fixed file not found error handling in auto-generated marker detection to gracefully return undefined instead of propagating errors.
- Made assertEditableFileContent function synchronous to simplify API and improve error handling consistency.
- Updated test assertions to match synchronous function behavior using toThrow instead of rejects patterns.
- Removed obsolete test case for doc comment preservation during replace operations.
2026-04-08 15:06:47 +02:00
can1357 4ca9bd9c78 refactor: migrated cloning logic to centralized utility for consistency
- Extracted `structuredCloneJSON()` utility to centralized package for consistent deep cloning with JSON fallback.
- Consolidated duplicate cloning logic across openai-responses, openai-responses-shared, and validation modules.
- Added resilience to message cloning in extension runner with try-catch fallback for non-cloneable objects.
- Optimized context emission in extension runner by skipping message cloning when no handlers exist.
- Added optional `contentIndex` field to AssistantMessageEvent variants for type consistency.
2026-04-08 14:51:35 +02:00
can1357 757bdca7a1 feat: added assistant message event interception for streaming edit abort control
- Added `onAssistantMessageEvent` callback to Agent API for inspecting and aborting assistant streaming events.
- Added `setAssistantMessageEventInterceptor()` method to dynamically update assistant message event handlers.
- Converted `checkAutoGeneratedFileContent()` from async to synchronous for improved streaming edit abort detection performance.
- Implemented LRU caching in auto-generated file detection with early path-based checks to prevent unnecessary edits.
- Refactored streaming edit pre-caching to use assistant message event interception for real-time abort capability.
- Extracted `peekFile()` utility for efficient file prefix reading with pooled buffer reuse strategy.
2026-04-08 14:51:15 +02:00
can1357 211e5369a0 refactor(coding-agent): migrated image utilities to shared pi-utils package
- Extracted image metadata detection and MIME type utilities to @oh-my-pi/pi-utils package for shared use across projects.
- Consolidated image-input.ts and mime.ts modules into image-loading.ts with simplified API removing redundant metadata parameters.
- Updated all import paths across coding-agent to use readImageMetadata from @oh-my-pi/pi-utils instead of local utilities.
- Added peek-file utility module to @oh-my-pi/pi-utils with buffer pooling for efficient file header reading.
2026-04-08 14:42:51 +02:00
can1357 99fac3419b chore: bump version to 14.0.0 2026-04-08 11:51:59 +02:00
can1357 4c03bad90d feat(coding-agent): added Auto QA tool and Python environment warmup for tool reliability
- Added Auto QA tool (`report_tool_issue`) for automated tracking of unexpected tool behavior with environment variable and setting support.
- Added Python tool environment warmup on first execution to ensure prelude helpers are available before use.
- Fixed Python prelude introspection to respect execution timeout and signal options, preventing hangs.
- Refactored prelude documentation caching and loading logic into reusable helper functions with test environment awareness.
- Enhanced kernel introspection with optional timeout and signal parameters for better execution control.
- Added system prompt guidance to encourage agents to report tool issues via Auto QA when available.
2026-04-08 11:49:13 +02:00
can1357 fd1e11c4e1 feat(coding-agent): enabled async Codex websocket prewarm for faster startup
- Made Codex websocket prewarm asynchronous and non-blocking during session creation for faster startup.
- Added Codex websocket status updates in interactive mode when prewarm completes or fails.
- Introduced `getOpenAICodexTransportDetails()` to determine transport preferences before prewarm initialization.
- Refactored Codex prewarm to fire in background without awaiting, matching LSP server warmup pattern.
- Updated CHANGELOG entries for ai and coding-agent packages to reflect Codex startup event monitoring and async prewarm behavior.
2026-04-08 08:54:05 +02:00
can1357 a6589d8e8c perf(utils): eliminated xcrun spawning for macOS toolchain binary resolution
- Replaced xcrun subprocess spawning with cached directory listing for 10-100x faster macOS toolchain binary resolution.
- Introduced XCODE_BINS set and isXcodeBin() filter to fast-reject non-Xcode commands without filesystem access.
- Implemented getDeveloperDirs() to resolve active Xcode directory via $DEVELOPER_DIR and /var/db/xcode_select_link symlink without spawning processes.
- Added getMacosToolPaths() to lazily compute and cache deduplicated toolchain bin directory listings on first lookup.
2026-04-08 08:47:54 +02:00
can1357 7f88a0c24c refactor: restructured logger.time() API to accept function references with wall-clock markers
- Refactored logger.time() API to accept function references and arguments separately instead of wrapped callbacks.
- Replaced RingBuffer-based timing with wall-clock markers and async span tracking for improved timing accuracy.
- Updated 20+ call sites across executor, kernel, main, and tools modules to use new logger.time() signature.
- Removed parsePath() helper function and inlined path.split() calls in settings module.
- Added test case verifying model selection without auth validation during startup.
2026-04-08 08:47:32 +02:00
can1357 a21a542afd refactor(prompt-templates): migrated prompt utilities to pi-utils package
- Extracted prompt rendering and formatting utilities from coding-agent to centralized pi-utils package with new API surface (prompt.render, prompt.format, prompt.registerHelper).
- Migrated parseFrontmatter utility from coding-agent to pi-utils package; updated 8 files to import from @oh-my-pi/pi-utils.
- Removed 170-line prompt-format.ts module and consolidated 192 lines of Handlebars helper registrations into pi-utils prompt module.
- Updated 60+ files across coding-agent and typescript-edit-benchmark to use new prompt.render() and prompt.format() API from pi-utils.
- Simplified prompt-templates.ts by delegating core functionality to pi-utils while retaining custom helper registrations (jtdToTypeScript, jsonStringify, etc.).
2026-04-08 05:47:35 +02:00
can1357 6d07944654 refactor: migrated binary detection to $which() utility across codebase
- Replaced all Bun.which() calls with $which() utility from @oh-my-pi/pi-utils across 22 files.
- Removed findBashOnPath() wrapper function from procmgr.ts, consolidating binary path resolution.
- Updated AGENTS.md documentation to reflect new $which() API usage pattern.
- Centralized binary detection logic through shared utility, reducing code duplication.
2026-04-08 05:28:22 +02:00
can1357 776546e09d feat(coding-agent): implemented advanced DAP debugging with breakpoints and memory introspection
- Added advanced DAP debugging capabilities including instruction breakpoints, data breakpoints, disassembly, memory introspection, and module inspection.
- Added reverse request handling in DAP client for runInTerminal and startDebugging to support child process debugging.
- Replaced Bun.which() with $which() utility providing flexible cache control and macOS Xcode toolchain fallback.
- Expanded debug tool schema with 20+ new parameters and 11 new action handlers for low-level debugging operations.
- Added instructionPointerReference field to debug session snapshots for enhanced low-level debugging context.
2026-04-08 05:20:37 +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 d116b44b81 chore: bump version to 13.19.0 2026-04-05 17:38:13 +02:00
can1357 279ae220a4 chore: bump version to 13.18.0 2026-04-02 06:00:18 +02:00
can1357 84e71f2c66 chore: bump version to 13.17.6 2026-04-02 01:07:43 +02:00
can1357 264e02fde3 chore: bump version to 13.17.5 2026-04-02 00:17:12 +02:00
can1357 bb01e58865 chore: bump version to 13.17.4 2026-04-01 23:50:36 +02:00
can1357 236fedaf2e chore: bump version to 13.17.3 2026-04-01 20:57:14 +02:00
can1357 2e0186a952 fix(ci): resolve gh_run_watch test hang and hardcoded path
- abortableSleep used Bun.sleep which vitest fake timers do not intercept;
  switch to setTimeout via Promise.withResolvers so vi.useFakeTimers() +
  vi.advanceTimersByTime() work correctly in the polling loop tests
- getCurrentHeadSha() and GhRunWatchTool session cwd used a hardcoded
  /work/pi path; replace with import.meta.dir so the tests resolve the
  real repo HEAD on any machine
- add timeout-minutes: 30 to the CI test job as a safety net against
  future hangs blocking release runs
2026-04-01 20:18:23 +02:00
can1357 5fbfbafa58 chore: bump version to 13.17.2 2026-04-01 19:32:22 +02:00
can1357 9b453ce2e5 chore: bump version to 13.17.1 2026-04-01 05:19:32 +02:00
can1357 862593d736 chore: bump version to 13.17.0 2026-03-30 14:00:34 +02:00
can1357 f44e007f7c chore: bump version to 13.16.5 2026-03-29 17:58:13 +02:00
can1357 1a616f80e5 chore: bump version to 13.16.4 2026-03-28 13:47:18 +01:00
can1357 b84ba76df1 chore: bump version to 13.16.3 2026-03-28 06:11:51 +01:00
can1357 660c5652d5 chore: bump version to 13.16.2 2026-03-27 12:12:54 +01:00
can1357 f114cd8122 chore: bump version to 13.16.1 2026-03-27 11:41:22 +01:00
can1357 17d596ab44 feat: fff
- Added SearchDb class for stateful shared search database instances enabling persistent file indexing and frecency tracking across grep, glob, and fuzzyFind operations.
- Added optional db parameter to grep(), glob(), and fuzzyFind() functions for database-backed searching with improved performance via cached file indices.
- Replaced grep-searcher with fff-grep and added fff-search dependency for enhanced file discovery and search capabilities with memory-mapped file support.
- Migrated fuzzy file discovery from fd module to fff module with SearchDb integration for stateful caching and improved search performance.
- Exported SearchDb type from @oh-my-pi/pi-natives public API for type-safe usage in grep, glob, and fuzzyFind workflows.
2026-03-27 11:28:49 +01:00
can1357 c7989526c1 chore: bump version to 13.16.0 2026-03-27 04:39:25 +01:00
can1357 ebf58f7c28 chore: bump version to 13.15.3 2026-03-26 16:17:37 +01:00
can1357 b8b1c75d20 chore: bump version to 13.15.2 2026-03-26 14:51:40 +01:00
can1357 80d7a8f413 chore: bump version to 13.15.1 2026-03-26 14:09:28 +01:00
can1357 4adaee02da chore: bump version to 13.15.0 2026-03-23 05:58:44 +01:00
can1357 7be29ab70f chore: bump version to 13.14.2 2026-03-21 17:34:47 +01:00
can1357 b89631541a chore: bump version to 13.14.1 2026-03-21 17:09:04 +01:00
can1357 32e6379fbe chore: bump version to 13.14.0 2026-03-20 23:53:34 +01:00
can1357 999d066d71 chore: bump version to 13.13.2 2026-03-18 23:21:20 +01:00
can1357 e58908615f chore: bump version to 13.13.1 2026-03-18 23:00:40 +01:00
can1357 964ee1bba8 chore: bump version to 13.13.0 2026-03-18 10:56:16 +01:00
can1357 88cb72b653 chore: bump version to 13.12.10 2026-03-17 19:42:38 +01:00
can1357 ca332be917 chore: bump version to 13.12.9 2026-03-17 16:50:20 +01:00
can1357 1b256ab151 chore: bump version to 13.12.8 2026-03-16 16:06:16 +01:00
can1357 78177af8bc feat(coding-agent): added symlink resolution and path alias handling for consistent directory behavior
- Added symlink and path alias resolution to session directory handling for consistent behavior across aliased home and temp directories.
- Improved status line path display to strip display roots using canonical path resolution, correctly handling symlink-equivalent directory aliases.
- Added support for quoted paths in grep, ast_grep, and find tools to properly handle directory names with spaces.
- Improved ast_grep error messaging when no matches found with parse errors to suggest narrowing path/glob or setting language.
- Extracted path utility functions (resolveEquivalentPath, normalizePathForComparison, pathIsWithin, relativePathWithinRoot) to shared utils package.
- Added comprehensive test coverage for symlink alias resolution in status line path rendering and session directory handling.
2026-03-16 15:24:18 +01:00
can1357 24ef2302ea chore: bump version to 13.12.7 2026-03-16 13:55:33 +01:00
can1357 53a46d94d8 chore: bump version to 13.12.6 2026-03-15 23:54:36 +01:00
can1357 26d874b372 chore: bump version to 13.12.5 2026-03-15 23:20:18 +01:00
can1357 3495c3d91a chore: bump version to 13.12.4 2026-03-15 18:41:15 +01:00