Commit Graph

1656 Commits

Author SHA1 Message Date
can1357 84800efe9f chore: bump version to 11.0.1 2026-02-05 04:25:26 +01:00
can1357 5c10f197c1 chore: bump version to 11.0.0 2026-02-05 04:16:22 +01:00
can1357 6647944e4b feat(coding-agent/modes): added missing UI dropdown options for task and grep settings
- Added UI dropdown options for `task.maxRecursionDepth` setting with presets (Unlimited, None, Single, Double, Triple).
- Added UI dropdown options for `grep.contextBefore` setting with presets (0-5 lines).
- Added UI dropdown options for `grep.contextAfter` setting with presets (0-10 lines).
- Simplified `task.maxRecursionDepth` description in settings UI to remove specific value examples.
2026-02-05 04:16:03 +01:00
can1357 8856c34cc9 fix(coding-agent/mcp): fixed MCP tool name generation to properly sanitize server and tool names
- Fixed MCP tool name generation to properly sanitize server and tool names, preventing invalid characters and duplicate prefixes in tool identifiers.
- Added sanitizeMCPToolNamePart helper function to normalize names by converting to lowercase, removing invalid characters, collapsing underscores, and trimming edges.
2026-02-05 04:11:58 +01:00
can1357 0e8a3e6599 feat(coding-agent/session): added optional persist parameter to setThinkingLevel() for non-persistent cycling
- Added optional `persist` parameter to `setThinkingLevel()` method to control whether thinking level changes are saved to settings.
- Changed thinking level cycling to no longer persist changes to settings by default, enabling quick iteration through thinking levels without modifying user preferences.
- Updated selector controller to handle both `thinkingLevel` and `defaultThinkingLevel` setting changes.
2026-02-05 04:11:39 +01:00
can1357 a28713b8ba refactor(test): consolidated API key retrieval to use centralized e2eApiKey() utility
- Consolidated API key retrieval across test files to use centralized e2eApiKey() utility function instead of direct environment variable access.
- Removed local API_KEY constant definitions and replaced with imports of e2eApiKey from shared oauth test utilities.
- Updated test skip conditions to use e2eApiKey('ANTHROPIC_API_KEY') for consistent API key availability checks across all test suites.
2026-02-05 03:51:08 +01:00
can1357 b59b104bad refactor(idgen): replaced nanoid with Snowflake ID generator
- Replaced nanoid and randomUUID with Snowflake ID generator across codebase for consistent distributed ID generation.
- Created new Snowflake utility module in packages/utils with support for 64-bit distributed ID generation with configurable epoch, machine ID, and sequence numbers.
- Updated session ID format documentation from nanoid to snowflake hex string format (16 hex characters).
- Removed nanoid dependency from package.json as it is now replaced by internal Snowflake implementation.
2026-02-05 03:48:08 +01:00
can1357 8ff2ef0ce0 refactor: migrated environment variable access from getEnv() to $env object API
- Migrated environment variable access from function-based `getEnv()` API to object property-based `$env` API across 43 files in the monorepo.
- Simplified `packages/utils/src/env.ts` by removing scoped environment variable logic (EnvScope, getEnvMap, getEnv functions) and replacing with direct `process.env` reference exported as `$env`.
- Updated `packages/ai/src/stream.ts` to remove environment parameter from KeyResolver functions and use global `$env` object instead of passed-in env parameter.
2026-02-05 03:07:40 +01:00
can1357 ec801665bc refactor(env): migrated environment variables from OMP_ to PI_ prefix and centralized access via getEnv()
- Migrated environment variable access from direct process.env to centralized getEnv() utility function across all packages.
- Renamed environment variable prefix from OMP_ to PI_ throughout codebase (e.g., OMP_CODING_AGENT_DIR -> PI_CODING_AGENT_DIR).
- Removed automatic environment variable migration from PI_ to OMP_ prefixes via migrate-env.ts module.
- Removed env setting from configuration schema and applyEnvironmentVariables() method from settings.
- Updated CI/CD build configuration to use PI_COMPILED flag instead of OMP_COMPILED.
- Changed venvPath property in PythonRuntime from nullable (string | null) to optional (string | undefined).
2026-02-05 02:55:01 +01:00
can1357 2c34b641cd revert "feat(coding-agent): added Grafana Pyroscope continuous profiling integration"
This reverts commit 1b81e820bf.
2026-02-05 02:38:33 +01:00
can1357 d8224c9c6b feat(tui): consolidated terminal notification handling into pi-tui package
- Added terminal-capabilities module with NotifyProtocol enum and notification formatting/sending methods to TerminalInfo class.
- Renamed TERMINAL_INFO export to TERMINAL and consolidated terminal image/capability exports from terminal-image to terminal-capabilities module.
- Removed terminal-image module exports from public API with functionality migrated to terminal-capabilities.
- Simplified notification settings in coding-agent by removing protocol detection logic and delegating to TERMINAL.sendNotification().
- Removed terminal-notify.ts utility module from coding-agent, consolidating notification handling into pi-tui package.
2026-02-05 02:29:07 +01:00
can1357 f82a5d121f feat(coding-agent/task): added task recursion depth control and hierarchical subagent naming
- Added task.maxRecursionDepth setting to control how many levels deep subagents can spawn their own subagents (0=none, 1=one level, 2=two levels, -1=unlimited).
- Added nested task artifact naming with parent task prefixes (e.g., '0-Auth.1-Subtask') to support hierarchical task identification.
- Added taskDepth and parentTaskPrefix options to CreateAgentSessionOptions for supporting nested/subagent sessions.
- Changed task tool spawns configuration from 'explore' to '*' to allow spawning any type of subagent.
- Updated system prompt to unconditionally include parallel delegation guidance for all agent types instead of only coordinators.
- Implemented automatic task tool disabling at maximum recursion depth to prevent excessive task nesting.
2026-02-05 02:18:10 +01:00
can1357 1b81e820bf feat(coding-agent): added Grafana Pyroscope continuous profiling integration
- Added Grafana Pyroscope continuous profiling integration for CPU and heap profiling.
- Added seven new Pyroscope configuration settings: enabled, serverAddress, appName, basicAuthUser, basicAuthPassword, tenantID, and flushIntervalMs.
- Added support for Pyroscope configuration via environment variables: PYROSCOPE_URL, PYROSCOPE_APP_NAME, PYROSCOPE_BASIC_AUTH_USER, PYROSCOPE_BASIC_AUTH_PASSWORD, PYROSCOPE_TENANT_ID, and PYROSCOPE_FLUSH_INTERVAL_MS.
- Integrated Pyroscope initialization and shutdown into the main application lifecycle with automatic profiling start/stop.
- Added @pyroscope/nodejs dependency for continuous profiling capabilities.
2026-02-05 02:17:35 +01:00
can1357 76cdce7dda refactor: centralized environment variable parsing into @oh-my-pi/pi-utils package
- Extracted environment variable parsing logic from multiple packages into centralized @oh-my-pi/pi-utils package.
- Moved getEnv, getEnvMap, and parseEnvFile functions from local implementations to shared pi-utils/src/env.ts module.
- Updated all imports across ai, coding-agent packages to use getEnv from @oh-my-pi/pi-utils instead of local definitions.
- Replaced direct process.env accesses in azure-openai-responses.ts and openai-responses.ts with centralized getEnv utility calls.
- Implemented EnvScope type and proxy-based environment variable merging to support multiple scopes (global, project, process) with dynamic process.env integration.
- Consolidated environment variable parsing and caching logic into single reusable module with improved testability and abstraction.
2026-02-05 02:16:26 +01:00
can1357 62ec0ba5bb feat(coding-agent): added jsonStringify helper and improved frontmatter error messages
- Added jsonStringify Handlebars helper to enable safe JSON serialization of template variables in frontmatter generation.
- Improved frontmatter parsing error messages to include source context, making debugging easier when YAML frontmatter parsing fails.
2026-02-05 01:42:29 +01:00
can1357 16ecbad940 feat(coding-agent/discovery): added skill discovery from ~/.agents/skills directory with agents provider
- Added support for loading skills from ~/.agents/skills directory as a new discovery provider.
- Registered 'agents' provider with priority 70 to enable skill discovery from Agents standard location.
- Updated skills documentation to include ~/.agents/skills/<skill>/SKILL.md as a discovery source.
2026-02-05 01:42:15 +01:00
can1357 7d60a1af85 docs(coding-agent): updated documentation
- Updated documentation to reflect product name change from 'pi' to 'omp' throughout guides and API references.
- Restructured extension and hook documentation to clarify discovery mechanisms, loading behavior, and configuration across multiple config systems (.omp, .pi, .claude, .codex).
- Updated SDK API documentation with new method signatures: discoverHooks() -> discoverExtensions(), SessionManager methods now async, settings format changed to YAML.
- Expanded session architecture documentation with new entry types (TtsrInjectionEntry, SessionInitEntry), updated field names (fromHook -> fromExtension), and clarified session file format versioning.
- Simplified session-tree-plan.md from detailed implementation checklist to architecture summary, removing completed tasks and rollout details.
2026-02-05 01:34:20 +01:00
can1357 1949a09187 feat(coding-agent): added configurable task concurrency with UI presets and dynamic settings
- Added task.maxConcurrency configuration setting with default value of 32 to control concurrent execution limits for subagents.
- Added UI options for task concurrency configuration with 8 preset levels (Unlimited, 1, 2, 4, 8, 16, 32, 64) in the tools settings tab.
- Changed task concurrency to be configurable via task.maxConcurrency setting instead of hardcoded MAX_CONCURRENCY constant.
- Changed concurrency limit calculation to support unlimited concurrency when task.maxConcurrency is set to 0.
- Removed MAX_CONCURRENCY constant and associated hardcoded concurrency limit from task execution.
- Updated task execution to dynamically retrieve maxConcurrency from session settings instead of using imported constant.
2026-02-05 00:54:48 +01:00
can1357 147a1a773c chore: removed WASM-specific naming and updated to N-API implementation
- Removed WASM-specific naming conventions and terminology throughout the codebase, including import aliases, comments, and type aliases.
- Removed legacy type aliases 'WasmMatch' and 'WasmSearchResult' from grep types module.
- Removed TypeScript module declaration for '*.wasm?raw' file imports.
- Updated error handling in task executor to properly handle stopReason === 'error' case with exit code and error message capture.
- Simplified documentation comments to remove implementation details about WASM and Photon library internals.
- Updated README to reflect shift from WASM to N-API for pi-natives crate implementation.
2026-02-05 00:54:48 +01:00
can1357 ca546b41af refactor(coding-agent/task): removed parallel task limit constraints
- Removed `MAX_PARALLEL_TASKS` constant and associated task count validation logic.
- Removed `maxItems` constraint from task schema array definition.
- Removed task count validation check that rejected requests exceeding the parallel task limit.
2026-02-05 00:38:37 +01:00
can1357 8e4191da13 docs(skills/system-prompts): standardized markdown formatting and updated agent tool configurations
- Standardized markdown table formatting with consistent column alignment and spacing across SKILL.md documentation.
- Added blank lines after section headers and before code blocks to improve documentation readability.
- Updated nested markdown code block fence from triple to quadruple backticks for proper syntax highlighting.
- Fixed XML element indentation and closing tags for </procedure> and </system_directive> elements.
- Removed 'ls' tool from agent definitions (explore, plan, reviewer) to streamline available tool sets.
- Expanded model list in explore agent to include additional model variants (haiku-4.5, gemini-flash-latest, glm variants, gpt-5.1-codex-mini).
2026-02-05 00:36:44 +01:00
can1357 1bdc5f13c1 chore: bump version to 10.6.2 2026-02-05 00:29:15 +01:00
can1357 59f21f3c09 docs(coding-agent/prompts): updated explore agent model list with additional variants
- Updated explore agent model list to include additional model variants and fixed trailing newline.
2026-02-05 00:29:00 +01:00
can1357 62f62cf552 chore: bump version to 10.6.1 2026-02-05 00:23:48 +01:00
can1357 ba0b0f6d86 feat(coding-agent): refactored model role system and extracted model resolution utilities
- Added 'commit' model role for dedicated commit message generation.
- Exported 'resolveModelOverride' function from model-resolver module for public use.
- Refactored model role system to centralize role configuration in MODEL_ROLES registry.
- Extracted model resolution utilities into dedicated model-resolver module for improved code organization.
- Made 'tag' and 'color' properties optional in ModelRoleInfo interface to support roles without visual indicators.
- Enhanced model selector with defensive null/undefined checks for optional role properties.
2026-02-05 00:23:33 +01:00
can1357 d5790b5414 refactor: added default generic type parameter to Model interface
- Added default generic type parameter to Model interface, allowing Model to be used without explicit type argument.
- Removed explicit <any> generic type parameters from Model type annotations throughout codebase, leveraging new default parameter.
2026-02-05 00:13:29 +01:00
can1357 92b93d87e0 refactor(coding-agent): centralized model role system into MODEL_ROLES registry with metadata and dynamic menu generation
- Centralized model role system into MODEL_ROLES registry with metadata (tag, name, color) and MODEL_ROLE_IDS array for consistent role management across the codebase.
- Refactored model selector to dynamically generate menu actions from MODEL_ROLES registry instead of hardcoded role definitions.
- Simplified model role resolution by replacing hardcoded role checks with loops over MODEL_ROLE_IDS array.
- Removed support for 'omp/' model role prefix in favor of 'pi/' prefix throughout model selection, task execution, and configuration.
- Added getModelRoles() and overrideModelRoles() helper methods to Settings class for cleaner model role management.
2026-02-05 00:10:07 +01:00
can1357 21270ee24f chore: bump version to 10.6.0 2026-02-04 23:25:39 +01:00
can1357 89092165bd feat(pi-natives/shell): enhanced Windows PATH handling with Git path detection and deduplication
- Added PATH environment variable merging on Windows to deduplicate and normalize path entries.
- Enhanced Git path detection to support multiple installation patterns (cmd, bin, usr/bin, mingw variants).
- Implemented path normalization and deduplication logic to prevent duplicate entries in PATH.
- Refactored Windows Git path discovery to return multiple candidate paths instead of single path.
2026-02-04 23:25:22 +01:00
can1357 c7d7bb5520 feat(grep): refactored grep tool to consolidate output modes and simplify parameters
- Removed `output_mode` parameter from grep tool, consolidating all output to content mode with file grouping and match headers.
- Renamed grep context parameters from `context_pre`/`context_post` to `pre`/`post` for improved clarity.
- Removed `n` (line numbers) parameter from grep tool as line numbers are now always displayed.
- Reformatted grep output to display numbered matches with file paths, line numbers, and context lines with consistent alignment.
- Introduced `SearchParams` struct in Rust grep implementation to simplify parameter passing and improve code maintainability.
- Made `normalize_env_key` function const-eligible for compile-time evaluation in shell module.
2026-02-04 23:24:15 +01:00
can1357 8f2f493986 feat(web/search): added Jina as a web search provider option with automatic detection
- Added Jina as a new web search provider option alongside existing providers (Exa, Perplexity, and Anthropic).
- Implemented Jina Reader API integration with automatic provider detection based on JINA_API_KEY environment variable.
- Created new Jina provider module with API key detection, search execution, and response transformation.
- Updated web search configuration schema and type definitions to include Jina as a supported provider.
2026-02-04 23:11:00 +01:00
can1357 98fb1f9f3c feat: split grep context into separate before/after parameters with configurable defaults
- Split grep context parameter into separate contextBefore and contextAfter options for more granular control over context lines displayed before and after matches.
- Added configurable grep context defaults via grep.contextBefore and grep.contextAfter settings with reduced default values (1 line before, 3 lines after).
- Updated grep tool schema to use context_pre and context_post parameters instead of unified context parameter.
- Maintained backward compatibility by keeping legacy context field in SearchOptions and GrepOptions structs.
- Added resolve_context() function to handle logic for choosing between separate before/after context values or legacy unified context value.
2026-02-04 23:10:10 +01:00
can1357 62281bd5a1 feat(coding-agent): enabled browser tool by default in settings schema
- Enabled the browser tool by default in settings schema.
2026-02-04 23:02:23 +01:00
can1357 927cc77795 chore: bump version to 10.5.0 2026-02-04 12:06:50 +01:00
can1357 8c05a5284e build(deps): migrated to Bun runtime and simplified stream handling
- Migrated from Node.js to Bun runtime by replacing @types/node with @types/bun and bun-types dependencies.
- Downgraded @types/diff from ^8.0.0 to ^7.0.2 in coding-agent package.
- Updated tsconfig.base.json to include DOM.AsyncIterable in lib configuration for async iterable DOM API support.
- Simplified stream handling in update-cli.ts by removing Readable.fromWeb() conversions and using response.body directly with pipeline().
- Simplified TextDecoderStream instantiation in stream.ts to use default parameters instead of explicit UTF-8 encoding configuration.
- Added defensive null/undefined handling in agent-loop.ts result assignment using nullish coalescing operator.
2026-02-04 10:59:20 +01:00
can1357 b9938ada49 refactor(brush-core-vendored): fixed PATHEXT handling for Windows executable discovery
- Refactored ExecutablePathSearch to remove generic type parameter N and use pre-computed filename candidates instead of single filename.
- Extracted platform-specific candidate_filenames() functions to generate executable filename variants on Windows and Unix-like systems.
- Replaced manual PATH string splitting with std::env::split_paths() for cross-platform path parsing.
- Simplified find_in_path() method to delegate to pathsearch::search_for_executable() instead of custom path searching logic.
- Implemented executable_extensions() function with lazy initialization to parse PATHEXT environment variable on Windows.
- Enhanced executable() method to validate file extensions against known executable extensions instead of returning hardcoded true.
2026-02-04 10:37:51 +01:00
can1357 e425ed502a fix(coding-agent): update python gateway tests 2026-02-04 10:23:34 +01:00
can1357 23290b704b docs(coding-agent/prompts): updated task tool guidance to enforce small, well-defined scope
- Updated task tool guidance to enforce small, well-defined task scope with maximum 3-5 files per task to prevent timeouts and improve parallel execution.
- Added critical section with task granularity requirements, red flags for overly broad tasks, and examples of bad vs. good task definitions.
2026-02-04 09:51:39 +01:00
can1357 1217c55562 refactor(coding-agent/task): extracted truncateOutput function to shared tools module as truncateTail
- Extracted truncateOutput function to shared tools module as truncateTail.
- Updated executor to import and use truncateTail from tools module instead of local implementation.
2026-02-04 09:44:32 +01:00
can1357 f3cff9d1b9 feat(tools): enhanced browser viewport and WebGL stealth configuration for high-DPI displays
- Added device scale factor (1.25x) to browser viewport configuration for improved rendering on high-DPI displays.
- Enhanced device pixel ratio detection to use actual window.devicePixelRatio when available instead of hardcoded value.
- Improved WebGL stealth by masking additional WebGL parameter queries (VENDOR and RENDERER) beyond unmasked variants.
2026-02-04 09:28:00 +01:00
can1357 67cd1509c6 chore(deps): updated SDK dependencies and added Puppeteer tool with stealth modules
- Updated @anthropic-ai/sdk from ^0.71.2 to ^0.72.1 in packages/ai.
- Updated @aws-sdk/client-bedrock-runtime from ^3.975.0 to ^3.982.0 in packages/ai.
- Updated @google/genai from ^1.38.0 to ^1.39.0 in packages/ai.
- Updated @smithy/node-http-handler from ^4.4.8 to ^4.4.9 in packages/ai.
- Updated openai from ^6.16.0 to ^6.17.0 in packages/ai.
- Removed proxy-agent and undici dependencies from packages/ai.
2026-02-04 09:25:45 +01:00
can1357 c95f502464 docs(coding-agent/prompts): updated system prompt to reduce round-trips and strengthen ask tool guidance
- Updated system prompt guidance to state assumptions and proceed without asking for confirmation, reducing unnecessary round-trips.
- Tightened ask tool conditions to require multiple approaches with significantly different tradeoffs before prompting user.
- Strengthened ask tool guidance to default to action and only ask when genuinely blocked by decisions with materially different outcomes.
- Changed refactor workflow to automatically remove now-unused elements and note removals instead of asking for confirmation.
2026-02-04 08:25:45 +01:00
can1357 9a942ed227 feat(coding-agent): added exclusive concurrency mode enforcement to file-modifying tools
- Added exclusive concurrency mode enforcement to file-modifying tools (edit, write, bash, python, ssh, todo-write) by introducing a new public `concurrency` property set to "exclusive" on each tool class.
- Updated CHANGELOG.md to document the enforcement of exclusive concurrency mode for file-modifying tools.
- Cleaned up imports in tool-execution.ts by removing unused Theme type import and reordering imports for better organization.
2026-02-04 08:25:22 +01:00
can1357 dcb8d10a72 refactor(coding-agent/extensibility): extracted tool proxy logic into reusable applyToolProxy utility function
- Extracted tool property proxying logic into a new applyToolProxy utility function to reduce duplication across wrapper classes.
- Simplified wrapper class implementations by replacing manual property assignments with declarative property forwarding via applyToolProxy.
- Converted explicit property declarations to declare statements and lazy getters that delegate to the underlying tool object.
- Removed renderCall and renderResult method declarations from wrapper classes, consolidating rendering logic handling in the tool-proxy module.
2026-02-04 07:06:21 +01:00
can1357 2f4743e912 refactor(coding-agent): extracted JSON tree rendering utilities into dedicated module for reuse
- Extracted JSON tree rendering utilities into dedicated module for reuse across tool renderers.
- Moved formatArgsInline, renderJsonTreeLines, and related constants from mcp/render.ts to tools/json-tree.ts.
- Updated tool-execution.ts to import and use shared JSON tree rendering functions.
2026-02-04 07:04:04 +01:00
can1357 fac1bf28f8 docs(coding-agent/prompts): added critical instruction to system prompt emphasizing task completion
- Added critical instruction to system prompt emphasizing task completion and preventing premature stopping.
2026-02-04 06:51:59 +01:00
can1357 2721f7c962 feat(coding-agent/tools): refactored ask tool to require questions array parameter
- Changed `ask` tool to require `questions` array parameter; single-question mode with `question`, `options`, `multi`, and `recommended` parameters is no longer supported.
- Updated `ask` tool guidance to prioritize proactive problem-solving and default to action, asking only when truly blocked by decisions that materially change scope or behavior.
- Refactored ask tool implementation to consolidate single and multi-question logic paths.
2026-02-04 05:45:39 +01:00
can1357 f41705ce3a feat(coding-agent): improved Python startup performance with prelude caching and shared gateway mode
- Added Python prelude caching to improve startup performance by caching helper functions and module discovery results.
- Added OMP_DEBUG_STARTUP environment variable for detailed startup stage tracing across initialization pipeline.
- Changed Python kernel initialization to require shared gateway mode, removing support for local kernel gateway startup.
- Improved error handling in shared gateway acquisition with automatic retries on 5xx status codes.
- Added repro-stuck.ts script for reproducing and debugging rare CLI hang issues with Chrome DevTools integration.
- Added trace-loader.ts preload script for tracing module resolution during startup diagnostics.
2026-02-04 05:02:28 +01:00
can1357 395a606167 fix(coding-agent/session): fixed title not being generated on /new route
- Initialized sessionName to undefined on /new to ensure title is properly generated.
2026-02-04 04:08:49 +01:00
can1357 11b1cc09ea fix(coding-agent/tools): fixed glob search returning no results when all files are ignored by gitignore
- Fixed glob search returning no results when all files are ignored by gitignore by automatically retrying without gitignore filtering.
2026-02-04 02:14:16 +01:00