Commit Graph

20 Commits

Author SHA1 Message Date
can1357 978b93ba62 refactor: migrated native tools to WASM-based implementation
- Consolidated grep, find, and image processing into a new `@oh-my-pi/pi-natives` WASM package.
- Eliminated subprocess overhead and simplified JS tool implementations.
- Updated CI to include Rust workspace, linting, formatting, and WASM build steps.
- Documented `Promise.withResolvers()` and `using` declarations for wasm-bindgen.
2026-01-29 09:29:21 +01:00
can1357 799a990ade refactor(coding-agent): extracted type guard functions for improved type safety and reusability
- Extracted type guard functions for improved type safety and code reusability across RPC and migration modules.
- Centralized AgentEvent type validation into a dedicated Set constant and type guard function in rpc-client.
- Replaced inline type assertions with type guard functions in RPC response and event handling logic.
- Refactored test utilities to use parseSessionEntries helper and type guard functions for cleaner test code.
- Added reasoning content configuration properties to OpenAI compatibility settings.
2026-01-27 23:21:38 +01:00
can1357 d9a3291641 feat(deps): replaced external JSON/JSONL and text utilities with Bun built-in APIs
- Replaced external JSON/JSONL parsing libraries with Bun's built-in JSON5 and JSONL APIs across all packages.
- Removed dependencies: json5, ndjson, get-east-asian-width, json-stringify-safe, split2, through2, and @types/ndjson.
- Replaced custom text width and ANSI wrapping implementations with Bun.stringWidth() and Bun.wrapAnsi() APIs.
- Updated Bun type definitions from ^1.2.17 to ^1.2.18 and bun-types from ^1.3.5 to ^1.3.7.
- Refactored JSONL parsing throughout codebase to use Bun.JSONL.parse() and Bun.JSONL.parseChunk() with improved buffer management and error handling.
- Updated test assertions to use Bun.stringWidth() for dynamic width calculations instead of hardcoded values.
2026-01-27 19:18:58 +01:00
can1357 779ca4872b style(deps): migrated from Prettier to Biome and updated formatting rules
- Removed Prettier configuration files (.prettierignore and .prettierrc) and migrated formatting to Biome.
- Updated Biome configuration from version 2.3.11 to 2.3.12 and changed arrowParentheses rule from 'always' to 'asNeeded'.
- Pinned @biomejs/biome dependency to exact version 2.3.12 in package.json and bun.lock.
- Applied consistent arrow function formatting across 489 files by removing unnecessary parentheses around single parameters.
- Removed blank lines after comment blocks and reorganized imports for consistency across the codebase.
2026-01-24 04:20:19 +01:00
can1357 e22d123009 refactor(fs): migrated remaining sync file operations to async
- Converted readdirSync, readFileSync, and statSync to async readdir, readFile, stat across skills and agent discovery.
- Made scanDirectoryForSkills async and refactored custom directory scanning to use Promise.all for concurrent processing.
- Updated agent discovery to use fs/promises for async file reading and refactored helper patterns.
- Added AgentParsingError exception class for better error handling during agent parsing.
- Added filesystem error type guards (isEnoent, isEacces, isPerm, etc.) to pi-utils for safe error checking.
- Added color manipulation utilities to pi-utils for accessibility features.
- Added color-blind mode setting to settings manager.
- Migrated plugins, settings, and config modules from sync to async file operations.
- Updated error handling to use new pi-utils type guards for type-safe checking.
2026-01-24 03:18:03 +01:00
can1357 f66e5dba9b build(config): refactored build and TypeScript configuration with Bun loaders
- Removed WASM generation script; use Bun `wasm?raw` loader for imports.
- Added bunfig.toml with loaders for `.md`, `.py`, and `.wasm?raw` text imports.
- Added types/assets/index.d.ts for global TypeScript module declarations.
- Unified TypeScript configuration with tsgo-based checking across monorepo.
- Removed build and WASM steps from install and publish pipelines.
2026-01-24 00:03:52 +01:00
can1357 0fe761dc4b build(deps): refactored TypeScript and package configuration across monorepo
- Added tsconfig.publish.json files to all packages with optimized publish-time configuration.
- Updated all package.json scripts with prepublishOnly hooks for correct type checking during publish.
- Added @oh-my-pi/omp-stats path mappings to root tsconfig.json for consistent imports.
- Added WASM generation script for photon module and integrated into install:dev script.
2026-01-23 13:46:06 +01:00
can1357 f985c1ad69 feat: added retry utilities and improved async error handling for database and terminal operations
- Added retry utility functions `isRetryableError` and `extractHttpStatusFromError` to the @ai package for identifying transient errors suitable for retry operations.
- Made `AgentStorage.open()` asynchronous with exponential backoff retry logic to handle SQLITE_BUSY errors during concurrent database access.
- Refactored `AuthStorage` to use async factory pattern with `create()` method instead of synchronous constructor for proper async initialization.
- Added graceful error handling in terminal operations to exit cleanly when terminal becomes unavailable due to EIO errors instead of crashing.
- Added error handling during emergency terminal restore to prevent errors when terminal is already dead during crash cleanup.
2026-01-23 13:46:06 +01:00
can1357 cb5bbbf382 refactor(coding-agent): flattened directory structure, eliminated core/ folder
- Eliminated core/ directory (252 files, 23 subdirs → distributed)
- Reduced max nesting from 9 levels to 5 levels
- Promoted tool subdirs to top level: exa/, lsp/, patch/, task/, web/
- Merged web-scrapers/ + web-search/ into web/{scrapers,search}/
- Flattened modes/interactive/ to modes/
- Split execution/ into: ipy/ (python), exec/ (bash), ssh/
- Renamed ipy/python-*.ts to ipy/*.ts (executor, kernel, etc.)
- Flattened cursor/exec-bridge.ts to cursor.ts
- Created logical groupings: config/, session/, extensibility/, export/
- Updated all imports across 500+ files
2026-01-23 12:24:47 +01:00
can1357 b2c94bef1a refactor(deps): restructured codebase to use centralized pi-utils package
- Created new @oh-my-pi/pi-utils workspace package with shared utilities for logging, process management, stream handling, and temporary directory management.
- Migrated all packages to use centralized logger from @oh-my-pi/pi-utils instead of local winston implementations.
- Replaced custom process spawning and stream reading implementations with standardized cspawn and readLines utilities across all modules.
- Converted synchronous file operations and process spawning to async patterns using Bun shell syntax and fs/promises.
- Added streaming edit abort functionality with configurable setting to abort on patch preview failures.
- Updated test framework from vitest to bun:test across all test suites.
2026-01-20 05:33:21 +01:00
can1357 5a601bb0c0 feat: added Windows ARM64 support and streaming WASM loading with base64 fallback
- Added Windows ARM64 binary support and architecture detection in installers.
- Updated WASM loading to use streaming with base64 fallback for binary compatibility.
- Moved TTSR settings to dedicated tab and expanded abbreviation to Time Traveling Stream Rules.
- Added comprehensive install testing infrastructure with Docker validation.
- Updated package name from @oh-my-pi/omp-coding-agent to @oh-my-pi/pi-coding-agent.
2026-01-19 01:23:27 +01:00
can1357 9b3cf35630 docs(readme): added docs for Python tool, Todo tool, CLI subcommands, and Bedrock provider
- Added documentation for Python tool with IPython kernel integration.
- Added documentation for Todo tool with task tracking capabilities.
- Added documentation for new CLI subcommands (config, setup) and xhigh thinking level.
- Updated AI package description to include Bedrock provider.
2026-01-19 00:17:11 +01:00
can1357 5e9ef021bb feat: enhanced subagent config, reviewer output schema, and consolidated discovery helpers
- Added thinkingLevel field to agent frontmatter allowing subagents to override thinking level with clamping to model capabilities.
- Added structured output schema to reviewer agent ensuring consistent review output format with findings, correctness verdict, and confidence.
- Expanded system prompt with defensive reasoning guidance including assumption checks, edge case awareness, and completion reflex inhibition.
- Consolidated expandPath, parseFrontmatter, and parseAgentFields utilities into discovery/helpers module eliminating code duplication across loaders.
- Replaced silent error handling with logger.warn calls across config parsing, migrations, extension loading, and OAuth refresh failures.
2026-01-11 14:09:18 +01:00
can1357 899c69d72b feat(coding-agent/core): hardened database permissions and improved auth/settings migration with legacy fallbacks
- Added hardened file permissions on agent database directory (700) and database file (600) for improved security.
- Changed auth migration to merge credentials per-provider instead of skipping when any credentials exist.
- Added migration of settings from legacy settings.json file to SQLite database storage.
- Added fallback to legacy auth.json for OAuth credentials when not found in primary storage.
- Added hardenPermissions method to set restrictive chmod on database directory and file.
2026-01-10 23:39:03 +01:00
can1357 09427086d9 feat(coding-agent): migrated settings and auth storage from JSON files to SQLite database
- Migrated settings and auth credential storage from JSON files (settings.json, auth.json) to SQLite database (agent.db).
- Added AgentStorage class implementing unified SQLite storage with WAL mode, schema versioning, and prepared statement caching.
- Added storage-migration module to handle one-time migration from legacy JSON files to SQLite with backup creation.
- Updated credential migration message to reference agent.db instead of auth.json.
- Removed file locking mechanism from AuthStorage since SQLite handles concurrency natively.
- Added getAgentDbPath() config function returning path to SQLite database file.
2026-01-10 23:24:35 +01:00
can1357 100061accb chore: merged in upstream changes
- Added ExtensionRuntime shared state with async extension factory support
- Introduced pluggable tool operations (BashOperations, FileOperations, etc.) for remote execution
- Added new CLI flags: --no-tools, --no-extensions, --no-skills
- Added login dialog, countdown timer, and component barrel export
- Added blockImages and thinkingBudgets settings
- Refactored stdin handling with StdinBuffer for improved key parsing
- Updated DEVELOPMENT.md with new architecture documentation
2026-01-10 06:32:51 +01:00
can1357 15fbe228b3 feat(monorepo): merged codex providers and extensions 2026-01-05 15:37:44 +01:00
can1357 790a5370bb feat: renamed binary from pi to omp with config migration support
- Renamed CLI binary and package from 'pi' to 'omp' across all platforms and installers.
- Changed environment variable prefix from PI_* to OMP_* with automatic migration support.
- Changed configuration directory from ~/.pi/ to ~/.omp/ with multi-path fallback discovery.
- Added getConfigDirPaths(), findConfigFile(), and readConfigFile() functions for config resolution across .omp, .pi, and .claude directories.
2026-01-03 15:54:45 +01:00
can1357 50ab6b8b1b style: removed .js extension from imports and added node: prefix to builtins 2026-01-03 05:12:25 +01:00
Mario Zechner 1c82a15c0b Add automatic session migration for v0.30.0 bug
- Create migrations.ts with consolidated migrations
- Move auth migration from AuthStorage.migrateLegacy() to migrations.ts
- Add migrateSessionsFromAgentRoot() to fix misplaced sessions
- Sessions in ~/.pi/agent/*.jsonl are auto-migrated on startup

fixes #320
2025-12-26 03:24:49 +01:00