186 Commits

Author SHA1 Message Date
can1357 14634ab4e5 fix(task): corrected task progress display and async execution tracking
- Fixed task progress display to hide tool count and token metrics when zero, reducing visual clutter in status output.
- Refactored async task execution to use job progress reporting API instead of direct update callbacks, improving progress tracking accuracy.
- Implemented pre-allocation of unique IDs for batch tasks to prevent artifact collisions across concurrent executions.
- Extracted async details builder into reusable function to consolidate state construction logic.
2026-02-22 13:06:28 +01:00
can1357 4b7232c49c feat(task): enabled independent parallel execution with per-task progress tracking
- Improved parallel task execution to schedule multiple background jobs independently instead of batching all tasks into a single job, enabling true concurrent execution.
- Enhanced task progress tracking to report per-task status (pending, running, completed, failed, aborted) with individual timing and token metrics for each background task.
- Updated background task messaging to provide real-time progress counts (e.g., '2/5 finished') and distinguish between single and multiple task jobs.
- Refactored task scheduling loop to track per-task progress state and emit granular async updates during execution.
2026-02-22 13:02:57 +01:00
can1357 476b858b3a feat(coding-agent): added async background job execution with configurable concurrency limits
- Added async background job execution for bash and task tools with configurable concurrency limits and automatic result delivery.
- Added cancel_job tool and /jobs slash command to manage and inspect running background jobs with status display.
- Added jobs:// internal protocol handler for querying job status and retrieving job execution details.
- Added async.enabled and async.maxJobs settings to control background job execution behavior.
- Enhanced status line to display count of running background jobs with visual indicator.
- Implemented AsyncJobManager with exponential backoff retry delivery, job lifecycle tracking, and automatic eviction.

Fixes #56.
2026-02-22 12:44:57 +01:00
can1357 e4225d6829 refactor(coding-agent): consolidated output utilities into streaming-output module
- Consolidated truncation and output utilities from tools/truncate.ts and tools/output-utils.ts into session/streaming-output.ts with improved UTF-8 boundary handling.
- Renamed formatSize() to formatBytes() across codebase for consistency and clarity in byte-level formatting.
- Refactored OutputSink to use windowed byte truncation instead of full-buffer encoding, improving memory efficiency on large outputs.
- Migrated from Buffer to Uint8Array in web scrapers for better cross-platform compatibility and native browser support.
- Added getArtifactManager() lazy-initialization method to ToolSession for deferred artifact manager instantiation.
- Simplified API surface with wildcard exports from tools and session modules, reducing import complexity.
2026-02-22 01:02:26 +01:00
can1357 e2bb5041d2 feat(coding-agent): add Agent Control Center dashboard
Closes #93
2026-02-19 04:56:52 +01:00
can1357 acf8ab5225 style: stylistic changes 2026-02-10 07:39:39 +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 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 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 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 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 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 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 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 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 ef415e863b feat(coding-agent): refactored settings system with new singleton API and unified schema
- Replaced SettingsManager class with new Settings singleton providing synchronous get/set API and background persistence.
- Introduced settings-schema.ts as single source of truth for all configuration definitions with 100+ settings organized into logical groups.
- Migrated from method-based settings access (getTheme(), setTheme()) to path-based access using dot notation (settings.get('theme'), settings.set('theme', value)).
- Removed 2035-line settings-manager.ts file and replaced with modular settings.ts (693 lines) and settings-schema.ts (836 lines) for improved maintainability.
- Unified settings schema into single source of truth eliminating duplicate definitions across settings-defs.ts and settings-manager.ts.
2026-02-01 08:08:58 +01:00
can1357 2fc19f69ca feat(coding-agent): added subagent context passing and automatic tool injection for agent sessions
- Added getCompactContext() API to agent session for accessing parent conversation context.
- Implemented automatic submit_result tool injection for subagents with explicit tool lists.
- Added contextFile parameter to ExecutorOptions for passing parent conversation context to subagents.
- Enhanced subagent system prompt with conditional context file instructions and improved code formatting.
- Removed schema override notification from task summary prompt to simplify output.
- Implemented formatCompactContext() method to format conversation history for subagent consumption.
2026-01-31 10:03:50 +01:00
can1357 899f201f2d refactor(coding-agent): renamed output parameter to schema and restructured task metadata format
- Renamed 'output' parameter to 'schema' throughout task configuration and documentation for clarity.
- Updated task schema definition to use 'schema' field with improved description clarifying it defines expected response structure.
- Restructured task summary output format to consolidate metadata into tag attributes and simplify XML structure.
- Added truncation detection for task output exceeding 5000 character threshold with truncated flag.
- Removed charCount from task metadata, retaining only lineCount and charSize properties.
2026-01-28 04:00:32 +01:00
can1357 eb3ca1ddd2 refactor(coding-agent): restructured prompt rendering and tool utilities into dedicated modules
- Extracted tool choice mapping logic into dedicated utility module for provider-specific format conversions.
- Refactored task summary generation to use template-based rendering instead of string concatenation.
- Migrated system prompt generation to use Handlebars templates with structured data instead of hardcoded strings.
- Extracted JTD to TypeScript conversion logic into dedicated utility module for schema documentation.
- Consolidated prompt template rendering across multiple modules using unified renderPromptTemplate function.
- Simplified type assertions in stream module to use generic OptionsForApi type instead of provider-specific types.
2026-01-28 03:47:16 +01:00
can1357 70a2c30177 feat(coding-agent): added tools list to system prompt and improved output preview logic
- Added available tools list to system prompt for agent coherence.
- Improved output preview logic to show full output for smaller results and truncate larger outputs to 10 lines.
2026-01-28 03:17:18 +01:00
can1357 34f03bc7fb feat(coding-agent): added subagent skill preloads
- Inline preloaded skill contents in system prompts and allow task-level skill selection.
- Record session init entries with system prompt, task, tools, and output schema.
- Fix session persistence to keep pre-assistant entries in subagent logs.
2026-01-27 05:18:30 +01:00
can1357 a8743c1f91 fix(coding-agent/task): reduced subagent progress overhead
- Throttled subagent progress emissions with a coalescing window and terminal flushes.
- Switched message_update handling to append text deltas into a bounded tail buffer for recent output.
- Removed deep cloning from TaskTool progress updates to keep progress rendering cheap.
2026-01-27 03:03:05 +01:00
can1357 6b595a1cad fix(coding-agent): exports 2026-01-25 19:53:14 +01:00
can1357 79079e6ecd feat(coding-agent): added plan mode with approval workflow and tool gating
- Plan mode provides structured workflow where agents propose plans for user approval before execution.
- Added plan:// internal URL protocol for accessing plan files and injecting plan-mode context into subagent prompts.
- Added plan mode toggle shortcut and paused status indicator in status line.
- Fixed plan reference injection to properly pass workflow state to plan-mode system prompts.
- Improved autocomplete fuzzy matching to support subsequence matching for skill suggestions.
2026-01-25 19:35:26 +01:00
can1357 7745206ebc feat(coding-agent/task): added support for comma-separated model lists
- Model field now accepts string arrays for fallback model prioritization.
- Extracted model list parsing into dedicated parseModelList helper function.
- Extended default model alias detection to validate all entries in comma-separated lists.
2026-01-25 14:05:45 +01:00
can1357 7bb2e1aa58 feat(port): ported pi-mono improvements + worker & patch improvements
- added Azure OpenAI Responses support and OpenRouter routing compat
- improved patch applicator diagnostics and subagent context propagation
- updated editor cursor handling, keybindings, and working message API
- refreshed porting sync metadata
2026-01-25 13:50:08 +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 51d39e7eea refactor(imports): migrated node module imports to namespace imports
- Converted named imports from node modules (fs, path, os) to namespace imports across all packages.
- Extended extension loader error handling with isEacces and hasFsCode type guards.
2026-01-24 03:37:59 +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 68031aa116 feat(coding-agent/task): added AgentOutputManager to prevent artifact ID collisions across task invocations
- Added AgentOutputManager to allocate unique IDs for agent outputs across task invocations, preventing artifact collisions.
- Implemented automatic ID scanning in ArtifactManager to resume sessions without overwriting existing artifacts.
- Integrated AgentOutputManager into task processing to allocate unique IDs before template rendering.
- Added agentOutputManager property to ToolSession interface for managing unique agent:// IDs across task invocations.
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