Commit Graph

14 Commits

Author SHA1 Message Date
can1357 8e3e0ebf9e feat: introduced Effort enum and ThinkingConfig for model-aware reasoning
- Introduced Effort enum and ThinkingConfig metadata for per-model reasoning capabilities with min/max effort levels.
- Migrated thinking level API from string-based ThinkingLevel to structured Effort enum across agent and AI packages.
- Added model-thinking module with effort mapping, policy application, and semantic versioning utilities for provider-specific thinking modes.
- Removed supportsXhigh() function and replaced effort clamping with model-aware validation using ThinkingConfig metadata.
- Expanded models.json with thinking configuration objects for 50+ models including Claude, Gemini, and OpenAI variants.
- Added Python analysis scripts for edit tool usage patterns and tool invocation stream processing.
2026-03-06 12:35:01 +01:00
can1357 4bd495429f refactor: restructured thinking mode API from static constants to dynamic functions
- Removed static thinking mode constant exports (THINKING_LEVELS, ALL_THINKING_LEVELS, ALL_THINKING_MODES, THINKING_MODE_DESCRIPTIONS, THINKING_MODE_LABELS) in favor of dynamic function-based API.
- Renamed formatThinking() to getThinkingMetadata() with return type changed from string to structured ThinkingMetadata object containing value, label, and description.
- Renamed getAvailableThinkingLevel() to getAvailableThinkingLevels() and getAvailableThinkingEffort() to getAvailableThinkingEfforts() with added default parameters for runtime flexibility.
- Updated all consumer modules to use new function-based API instead of static constants, enabling dynamic thinking mode configuration.
2026-03-05 01:33:42 +01:00
can1357 10242a445a refactor(ai): renamed reasoningEffort to reasoning across providers
- Updated option interfaces, param builders, and stream functions to use unified `reasoning` field.
- Added `resolveOpenAiReasoningEffort()` to centralize xhigh clamping logic.
- Replaced type casts with `castApi()` helper and fixed test option names.
- Updated coding-agent and benchmark references for consistency.
2026-03-05 00:25:12 +01:00
can1357 e1897ce013 refactor: migrated thinking configuration to centralized pi-ai module
- Extracted thinking module with ThinkingEffort, ThinkingLevel, and ThinkingMode types to centralize reasoning configuration across packages.
- Migrated ThinkingLevel type from pi-agent-core to pi-ai package with new validation functions parseThinkingLevel() and getAvailableThinkingLevel().
- Consolidated thinking level constants and descriptions into reusable exports (ALL_THINKING_LEVELS, THINKING_MODE_DESCRIPTIONS) for consistent UI display.
- Removed local thinking-effort-label utility and replaced formatThinkingEffortLabel() with centralized formatThinking() function from pi-ai.
- Refactored thinking mode handling to distinguish ThinkingSelector (user-facing with 'off' option) from ThinkingEffort (provider-level).
2026-03-05 00:03:40 +01:00
can1357 abf8c1efc9 refactor: unslop common utilities 2026-02-22 11:01:11 +01:00
can1357 94ad716db2 wip: fixture metadata improvements 2026-02-20 12:01:30 +01:00
can1357 21c71cf755 chore(react-edit-benchmark): updated benchmark reports 2026-02-20 12:00:40 +01:00
can1357 2bdcd618ad feat: introduced hashline API redesign with structured operations and LINE#ID format
- Redesigned hashline edit API with new operation names (set, set_range, insert) and structured body parameter accepting string arrays for multiline edits.
- Changed hashline reference format from LINE:HASH to LINE#ID throughout tools and documentation for improved clarity.
- Enhanced insert operation to support optional before/after anchors enabling flexible insertion positioning and boundary echo stripping.
- Made hashline autocorrect heuristics conditional on PI_HL_AUTOCORRECT environment variable for controlled behavior.
- Added benchmark reports for claude-haiku-4-5 and GPT-5.2-Codex models demonstrating hashline edit variant performance.
2026-02-19 15:02:59 +01:00
can1357 a9fb9c9791 feat(react-edit-benchmark): resolved hashline regression with strict validation
- Added provider failure detection and exponential backoff retry logic to handle authentication and authorization errors in benchmark tasks.
- Implemented HashlineMismatchError behavior in coding-agent to fail on stale hash references instead of silently relocating edits.
- Simplified hashline validation by removing automatic line relocation logic and hash tracking infrastructure.
- Added benchmark report for claude-sonnet-4-6 model showing 85% task success rate with detailed failure analysis and performance metrics.
2026-02-19 12:52:13 +01:00
can1357 a5d26bb5f5 feat(react-edit-benchmark): migrated benchmark to directory-based fixtures with RPC resource management
- Added `--no-rules` CLI flag to coding-agent to disable rules discovery and loading.
- Added `rules` option to CreateAgentSessionOptions to allow custom rules configuration.
- Added `sessionDir` option to RpcClientOptions and implemented Symbol.dispose() for resource cleanup.
- Removed tarball-based task loading; migrated to directory-based fixtures with required inputDir and expectedDir properties.
- Refactored runner to use RpcClient resource management with `using` statement and simplified fixture handling.
- Consolidated type definitions and removed tarball.ts module in favor of streamlined task interface.
2026-02-18 05:14:19 +01:00
can1357 3c65b3b1f5 feat(react-edit-benchmark): implemented AST-based mutation system
- Replaced regex-based code mutation with Babel AST.
- Introduced a wider range of precise, structural bug types.
- Integrated code formatting into generated benchmark fixtures.
- Updated dependencies with Babel and `regexp-tree`.
2026-02-18 03:44:14 +01:00
can1357 aab245bc63 feat(edit): better hashline & benchmark prompts, re-ran codex 2026-02-15 15:38:06 +01:00
can1357 0b492d9fbb fix(react-edit-benchmark): fixed incorrect path resolution for CLI module using Bun.fileURLToPath()
- Fixed incorrect path resolution for CLI module by using Bun.fileURLToPath() to convert import.meta.resolve() result to a proper file path.
- Reordered constant declarations to ensure TMP_DIR is initialized before CLI_PATH which depends on it.
- Updated scripts/repro-stuck.ts to use consistent CLI path resolution with Bun.fileURLToPath().
2026-02-12 15:10:17 +01:00
can1357 2dc1efad24 feat(coding-agent): exported utility functions and reorganized package structure for better module access
- Exported renderPromptTemplate function from config/prompt-templates module for programmatic prompt template rendering.
- Exported computeLineHash function from patch/hashline module for external patch utility access.
- Added ./cli export path in package.json for direct CLI module access.
2026-02-12 09:40:44 +01:00