Commit Graph

2352 Commits

Author SHA1 Message Date
can1357 acc799cd2e chore(ci): improved release process and expanded Rust toolchain support
- Updated release process to create new commits with descriptive messages instead of amending previous commits.
- Changed release push strategy from force push to regular push for better git history integrity.
- Extended check:rs script to verify minimal dependency versions and Windows MSVC target compilation.
- Added x86_64-pc-windows-msvc target to Rust toolchain configuration for cross-compilation support.
2026-02-05 08:28:56 +01:00
can1357 d1ccb24e7e chore: bump version to 11.1.0 2026-02-05 08:27:52 +01:00
can1357 a1786ce3b5 feat(coding-agent): added diagnostic sorting by severity, location, and message for consistent output
- Added `sortDiagnostics()` utility function to sort diagnostics by severity, location, and message for consistent output ordering.
- Changed diagnostic output to sort results by severity (errors first), then by file location and message for improved readability.
- Added `getSeverityRank()` helper function in render-utils to map diagnostic severity levels to numeric ranks for sorting.
- Integrated diagnostic sorting in LSP index module to apply consistent ordering before formatting diagnostics.
2026-02-05 08:11:07 +01:00
can1357 1a2e833974 feat: added Windows process handle duplication and signal handling for safe job termination
- Added Windows-specific process handle duplication mechanism to safely manage process termination across multiple handles.
- Implemented Windows signal handling support with Signal enum variants (Terminate, Kill, Interrupt) and kill_process() function using Windows API.
- Added background job termination on cancellation with platform-specific implementations (TERM/KILL signals on Unix, TerminateProcess on Windows).
- Implemented cancellation token support in shell execution with proper cleanup of background jobs when timeout or abort occurs.
- Added test coverage for background job termination on timeout and abort scenarios.
2026-02-05 08:10:52 +01:00
can1357 71f3acb6dc feat(coding-agent/task): added task isolation setting and dynamic schema configuration for isolated worktrees
- Added task isolation setting to enable running subagents in isolated git worktrees.
- Made task schema dynamically include isolated parameter only when isolation is enabled.
- Added validation to reject isolated parameter when task isolation is disabled.
- Updated task tool to conditionally render isolation documentation based on feature flag.
- Refactored task schema into factory function to support dynamic isolation configuration.
2026-02-05 08:00:08 +01:00
can1357 12b712dcbb feat(coding-agent/prompts): added thinking-level configuration to agent prompts
- Added thinking-level configuration parameters to agent prompts (explore: minimal, init: medium, plan: high, reviewer: high).
2026-02-05 07:50:02 +01:00
can1357 2993b68c15 fix(pi-natives): added graceful shutdown timeout before aborting shell tasks
- Added graceful shutdown timeout before aborting shell tasks to allow proper cleanup.
- Implemented 2-second timeout for task completion in run_shell_session before forceful abort.
- Implemented 2-second timeout for task completion in run_shell_oneshot before forceful abort.
- Added tokio_cancel.cancel() call in run_shell_oneshot cancellation path for consistency.
2026-02-05 07:49:32 +01:00
can1357 39634776a7 feat(coding-agent): refactored task API to use 'assignment' field and structured context separation
- Refactored task API to use 'assignment' field instead of 'args' for per-task instructions, enabling clearer separation between shared context and task-specific work.
- Introduced structured context/assignment separation pattern with '<swarm_context>' wrapper for template rendering, replacing placeholder-based substitution.
- Changed agent frontmatter field from 'thinkingLevel' to 'thinking-level' (kebab-case) for consistency with YAML conventions.
- Removed 'context' parameter from ExecutorOptions as context is now prepended at template level rather than executor level.
- Removed 'args' field from AgentProgress and SingleResult interfaces, simplifying task result tracking.
- Updated task rendering to display full task text instead of formatted args, improving clarity in progress output.
2026-02-05 07:43:53 +01:00
can1357 4d4328109c docs(coding-agent/prompts): clarified subagent submit reminder about aborted status and blocker details
- Added clarification to subagent submit reminder about when to use aborted status and requirements for including blocker details.
2026-02-05 06:45:44 +01:00
can1357 eb52f00651 docs(coding-agent/prompts): refined system prompts to clarify aborting, confirmation, and checkpoint procedures
- Updated subagent system prompt to clarify that aborting is only acceptable when truly blocked after exhausting tools and reasonable attempts.
- Updated system prompt to emphasize proceeding without confirmation after stating assumptions and to avoid asking for file paths that can be resolved from repo context.
- Clarified checkpoint procedure to be an internal step that continues in the same response without waiting for user input.
- Updated requirements conflict guidance to only ask for resolution after exhausting exploration with tools and context.
2026-02-05 06:42:56 +01:00
can1357 b902723cc9 refactor(coding-agent): converted class properties to TypeScript parameter properties across 51 files
- Converted class properties to TypeScript parameter properties across 51 files to reduce boilerplate code.
- Removed explicit field declarations and manual assignments in constructors by using TypeScript's parameter property syntax with access modifiers.
- Applied consistent pattern of declaring private readonly and public readonly properties directly in constructor parameters.
2026-02-05 06:34:12 +01:00
can1357 314a0044a3 feat(coding-agent/modes): refactored submenu settings API for improved ergonomics and type safety
- Converted SubmenuSettingDef.getOptions() method to options getter property for improved API ergonomics.
- Changed OptionProvider type to support both static arrays and function providers, enabling simpler configuration of option lists.
- Added createSubmenuSettingDef() helper function to simplify creation of submenu settings with flexible option providers.
- Refactored internal option provider definitions to use static arrays instead of arrow functions where applicable.
- Updated SelectSubmenu to enforce immutability of options parameter using ReadonlyArray type.
- Refactored select-list.ts to use TypeScript parameter properties for cleaner constructor implementation.
2026-02-05 06:34:01 +01:00
can1357 9a3b6115f1 fix(pi-natives): fixed bash session getting stuck on interrupt with proper task abort and cleanup
- Added explicit task abort and session cleanup to prevent bash session from getting stuck when interrupted.
- Ensured task is properly awaited after abort to allow graceful shutdown.
- Cleared session state on cancellation to prevent stale session references.
2026-02-05 06:21:56 +01:00
can1357 d656dcf7ac feat(coding-agent): refactored setThinkingLevel API to accept optional persist parameter
- Modified setThinkingLevel() API to accept optional persist parameter with default value of false, allowing callers to control whether thinking level changes are persisted to settings.
- Updated SetThinkingLevelHandler type signature to include optional persist parameter for consistency across extension handlers.
- Simplified setThinkingLevel method signature from accepting options object to accepting boolean persist parameter, improving API clarity.
2026-02-05 06:21:42 +01:00
can1357 37c74bb19d perf: migrated timing measurements to Bun.nanoseconds() for higher precision
- Migrated timing measurements from `performance.now()` to `Bun.nanoseconds()` for higher precision benchmarking across all benchmark and timing-sensitive code.
- Updated elapsed time calculations to convert nanoseconds to milliseconds using division by 1e6 to maintain consistent time units.
- Increased benchmark precision from 4 to 6 decimal places for per-operation timing measurements.
- Refactored grep benchmark to use averaged timing values instead of storing individual iteration times, reducing memory overhead.
2026-02-05 06:19:49 +01:00
can1357 e131000ed2 refactor(coding-agent): extracted external editor handling into shared utility module
- Extracted external editor handling logic into shared utility module to reduce code duplication across hook-editor and input-controller components.
- Created new external-editor utility module with getEditorCommand() and openInEditor() functions for centralizing editor process management and temporary file handling.
- Simplified hook-editor component by replacing manual editor spawning and file operations with openInEditor() utility function call.
- Simplified input-controller component by replacing manual editor spawning and file operations with openInEditor() utility function call.
2026-02-05 06:13:58 +01:00
can1357 f0b97f44fe chore: bump version to 11.0.3 2026-02-05 04:59:33 +01:00
can1357 8858250127 docs(coding-agent/cli): updated help text and documentation for expanded tool availability
- Updated help text to reflect expanded tool availability and simplified main description.
- Added documentation for new subcommands: commit, stats, jupyter, and grep in help text.
- Added documentation for browser and todo_write tools in available tools list.
- Updated --tools option documentation to clarify default behavior includes all tools.
- Reorganized environment variables section in help text for better clarity.
2026-02-05 04:59:19 +01:00
can1357 77a4455900 fix(coding-agent): fixed temporary model roles persisting by using override instead of set
- Fixed temporary model roles persisting by using override instead of set in settings initialization.
- Refactored model role assignment to use dedicated overrideModelRoles method instead of manual object manipulation.
2026-02-05 04:56:14 +01:00
can1357 a1a4824cd7 docs(coding-agent): added LLM provider env vars and expanded CLI help documentation
- Added comprehensive environment variables documentation including API keys for 11 new LLM providers (Groq, Cerebras, xAI, OpenRouter, Mistral, z.ai, MiniMax, OpenCode, Cursor, Vercel AI Gateway, Perplexity) and cloud provider configuration.
- Expanded CLI help text with detailed API keys section documenting all supported LLM providers, cloud providers, search services, and model override configuration variables.
- Fixed redundant fallback check in porting guide example by removing duplicate `Bun.env.HOME` reference.
2026-02-05 04:51:42 +01:00
can1357 89e6479661 refactor: migrated environment variable access from process.env to Bun.env across 71 files
- Migrated all environment variable access from Node.js `process.env` to Bun runtime `Bun.env` API across the entire codebase.
- Updated 71 files including source code, tests, documentation, and configuration to use Bun's native environment variable API.
- Added comprehensive environment variables documentation in `packages/coding-agent/docs/environment-variables.md` covering 100+ environment variables organized by category.
- Updated CHANGELOG entries to reflect migration from `process.env` to `Bun.env` and environment variable prefix changes (PI_* vs OMP_*).
- Maintained identical behavior and logic across all changes - only the environment variable access method was updated.
2026-02-05 04:51:18 +01:00
can1357 be9357694f chore: bump version to 11.0.2 2026-02-05 04:41:47 +01:00
can1357 8c453754d2 feat(coding-agent/session): added role alias expansion to model resolution logic
- Added import of expandRoleAlias function from model-resolver module.
- Added role alias expansion step before parsing model strings in model resolution logic.
2026-02-05 04:41:22 +01:00
can1357 91e3fb68cf refactor(coding-agent/session): restructured session manager to use direct array push and parallel file processing
- Refactored getSortedSessions to use direct array push instead of Promise.all with null filtering.
- Refactored collectSessionsFromFiles to use Promise.all for parallel file processing instead of sequential for loop.
- Simplified error handling by removing explicit null returns and filtering logic.
2026-02-05 04:41:13 +01:00
can1357 84800efe9f chore: bump version to 11.0.1 2026-02-05 04:25:26 +01:00
can1357 3e1ef1be33 fix(utils): fixed u32 overflow in snowflake ID generation
- Fixed u32 overflow in snowflake ID generation by keeping values in Number space instead of relying on bitwise operations that cause integer truncation.
2026-02-05 04:25:11 +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 1fbd161921 refactor(utils): simplified snowflake generation with 32-bit operations and hex lookup
- Simplified snowflake generation by replacing bigint arithmetic with 32-bit number operations and hex lookup table.
- Removed configurable epoch from Source constructor, using fixed EPOCH constant instead.
- Renamed Source.next() method to generate() and removed source parameter from module-level functions.
- Removed getMachineId() function which was unused in non-distributed snowflake implementation.
- Simplified getSequence() and getTimestamp() implementations to use direct hex parsing instead of bigint operations.
2026-02-05 04:07:08 +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