Commit Graph

151 Commits

Author SHA1 Message Date
can1357 508a9f543e feat: removed render_mermaid tool and added width-aware Mermaid clipping
- Removed render_mermaid from tool discovery, task definitions, and registries.
- Removed renderMermaid setting and prompt/docs references tied to the deleted tool.
- Added maxWidth and theme color options to Mermaid ASCII resolution in markdown flow.
- Re-rendered Mermaid ASCII in both directions and clipped output to available width.
2026-06-16 21:32:39 +02:00
can1357 57958ab4b7 docs: clarify RenderMermaid usage
RenderMermaid is disabled by default and emits terminal text rather
than SVG/PNG; complex sequence diagrams with alt/else blocks become
hard to read at default widths. Add docs/render-mermaid.md covering
enablement (renderMermaid.enabled), config knobs (useAscii, paddingX,
paddingY, boxBorderPadding), output expectations, and limitations.
Link the new guide from the coding-agent README.

Fixes #961
2026-05-09 03:11:18 +02:00
can1357 d14e4ae4b9 refactor(coding-agent): standardized Hindsight memory wrappers and tool names
- Standardized Hindsight context output to emit `<memories>` blocks and updated retention stripping to remove both `<memories>` and legacy `<hindsight_memories>`/`<relevant_memories>` tags.
- Renamed built-in Hindsight tool entry points and labels from `hindsight_retain`/`hindsight_recall`/`hindsight_reflect` to `retain`, `recall`, and `reflect`, including tool availability checks.
2026-05-03 07:39:52 +02:00
can1357 d57275fb5d feat(coding-agent): made memory.backend the authoritative selector for memory backends
- Updated runtime memory config loading and backend resolution so `memory.backend === "local"` now enables the local pipeline directly, while `memories.enabled` is treated only as a legacy migration input.
- Switched the `memory.backend` default to `off` and kept `memories.enabled` hidden from the Memory tab UI for migration compatibility.
- Adjusted memory runtime, resolver, and documentation/tests to match the new backend-selection semantics.
2026-05-03 07:39:52 +02:00
can1357 ce2a109c09 feat(coding-agent): added hindsight memory backends and tools
- Added `memory.backend` and `hindsight.*` settings schema with migration from `memories.enabled` legacy mode.
- Added Hindsight memory backend runtime modules for resolved config, client creation, bank ID derivation, and state lifecycle.
- Added off/local/hindsight backends and resolver wiring across SDK, commands, and compaction context.
- Added `hindsight_recall`, `hindsight_reflect`, and `hindsight_retain` tools with schema validation and backend gating.
- Added Memory tab metadata and symbols to expose backend selection in the settings UI.
- Added package export barrels and tests for bank ID, content formatting, and hindsight config env precedence.
2026-05-03 07:39:52 +02:00
can1357 66c80fd613 feat: add MCP JSON schema and documentation
fixes #462
2026-03-18 22:43:59 +01:00
can1357 25de46f16d docs: update README 2026-02-16 14:04:14 +00:00
can1357 08e9c685f3 refactor(dirs): restructured environment variable access and simplified configuration in test suite
- Refactored environment variable access to use dedicated getter/setter functions in test suite.
- Simplified configuration constants by removing ompConfig dependency and using hardcoded values.
- Introduced module-level caching for agent directory and subdirectory paths to improve performance.
- Added setAgentDir() function to manage agent directory updates and cache invalidation.
- Reorganized dirs.ts with logical section headers and consolidated subdirectory functions using helper utilities.
- Updated directory accessor functions to accept optional agentDir parameter for flexibility.
2026-02-13 15:26:06 +01:00
can1357 4c399f018a docs(coding-agent): added comprehensive models.yml provider
- Added comprehensive `models.yml` provider integration guide documenting custom model registration, provider overrides, API adapters, merge behavior, and practical integration patterns for Ollama, vLLM, LM Studio, and proxy endpoints.
- Updated README to reference new `models.yml` documentation and clarified that `models.json` is still supported for legacy configurations.
- Updated CHANGELOG to document the new models.yml guide and configuration format migration.
2026-02-13 13:39:50 +01:00
can1357 f8950c22b4 refactor(auth-storage): cleanup auth.json mentions
- Migrated authentication storage from JSON-based (auth.json) to database-based (agent.db) format across test files and configuration.
- Simplified auth storage discovery in sdk.ts by removing manual path construction and fallback logic in favor of centralized getAgentDbPath() function.
- Removed dbPath instance property from AuthStorage class as database path is now managed centrally.
- Updated environment variable precedence documentation to reflect agent.db instead of auth.json as the lowest priority source.
- Removed OAuth provider section header comments from multiple test files for cleaner test organization.
- Added support for JSON and JSONC configuration file formats without requiring migration to YAML.
2026-02-05 14:30:22 +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 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 a0b26fc1aa feat(coding-agent): added plan model role with parallel task execution and improved todo validation
- Added 'plan' model role option to support architectural planning with dedicated model selection via CLI argument (--plan), environment variable (OMP_PLAN_MODEL), and UI menu action.
- Updated model selector to display 'PLAN' badge for plan models and prioritize them in the model sorting order.
- Relaxed task management constraints to allow multiple tasks to be in_progress simultaneously, enabling parallel task execution instead of enforcing single-task-at-a-time workflow.
- Improved todo validation to check for blocking pending tasks before allowing a todo to be marked in_progress, with more specific error messages indicating which earlier tasks are blocking progress.
2026-01-27 06:35:33 +01:00
can1357 4a3f29aed3 feat(coding-agent): renamed web_fetch tool to fetch for consistency
- Renamed web_fetch tool to fetch for consistency across codebase and documentation.
- Removed format parameter from output tool and added automatic JSON to YAML conversion.
- Updated tool documentation and CLI help text to reflect tool name changes.
- Adjusted output truncation limits for bash and python tools.
2026-01-23 06:38:30 +01:00
can1357 34f2fc0854 chore: bump version to 6.0.0 2026-01-19 01:38:04 +01:00
can1357 e496de869a feat(coding-agent): added support for new providers and updated keyboard shortcuts
- Updated keyboard shortcuts: Ctrl+P/Shift+Ctrl+P now cycle role models instead of models.
- Changed Ctrl+T to toggle todo list expansion instead of thinking block.
- Added support for openai-codex-responses, google-vertex, cursor providers.
- Updated settings structure to use modelRoles object and removed deprecated options.
- Removed WASM base64 generation script and simplified postinstall process.
- Updated SDK documentation to reflect async auth/model discovery and new auth storage path.
2026-01-19 01:32:04 +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 1c93809f59 feat(coding-agent): added /dump command for clipboard transcript export
- Added new `/dump` slash command to copy full session transcript to clipboard.
- Separated `/export` and `/dump` commands with distinct responsibilities, removing clipboard copy functionality from `/export`.
- Implemented handleDumpCommand() method in command controller to manage clipboard operations independently.
2026-01-11 00:31:23 +01:00
can1357 48a9900784 feat: added extension UI customization APIs, SDK exports, CLI flags, and fixed clipboard/resize bugs
- Added setFooter(), setHeader(), and setEditorComponent() methods to ExtensionUIContext for custom UI components.
- Exported InteractiveModeOptions type and numerous UI components for programmatic SDK usage.
- Added --no-tools flag to disable all built-in tools and --no-extensions flag to disable extension discovery.
- Changed bash tool output truncation to recalculate on terminal resize instead of using cached width.
- Fixed Wayland clipboard copy (wl-copy) no longer blocking when the process doesn't exit promptly.
- Updated model pricing and renamed nex-agi/deepseek-v3.1-nex-n1 model removing :free suffix.
2026-01-10 07:11:01 +01:00
can1357 020beb5616 feat(coding-agent): added calc tool, multi-credential round-robin, auth.json file locking, clickable OAuth URLs
- Added calc tool supporting basic mathematical calculations with arithmetic operators, parentheses, and hex/binary/octal literals.
- Added support for multiple API credentials per provider with round-robin distribution across sessions.
- Added file locking on auth.json to prevent concurrent write corruption.
- Added clickable OAuth login URL display in terminal with plain text fallback.
- Updated ask tool prompt to emphasize exhausting other options before asking users.
- Refactored OAuth credential storage to append new credentials instead of replacing existing ones.
2026-01-10 03:36:25 +01:00
can1357 7740b3ad47 feat(coding-agent): added env vars, file mention validation, and model fallback logic
- Added environment variable management via settings.json with applyEnvironmentVariables() and related methods.
- Enhanced file mentions to support directories, validate boundaries, and truncate large files.
- Added fallback model candidate logic in title generator to retry on model failures.
- Fixed bash output preview to minify JSON content and skip structural-only lines.
- Added Cerebras provider support with thinking block filtering and zai-glm-4.6 model priority.
- Refactored tree rendering to use consistent theme.tree properties instead of boxSharp.
2026-01-08 14:10:01 +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 ac051daf90 feat(coding-agent): added clipboard export option to /export command 2026-01-03 04:05:00 +01:00
can1357 2be354322d chore: renamed package scope to @oh-my-pi for consistent branding
- Renamed npm package scope from @mariozechner to @oh-my-pi across all packages for consistent branding.
- Removed packages/pods directory and all related pod management functionality.
- Updated import paths and module declarations throughout codebase to reflect new package names.
- Reformatted code with consistent trailing comma removal and ternary operator alignment.
2026-01-02 18:08:23 +01:00
Mario Zechner 7ff3a23bdf Add /share command to README 2026-01-01 21:28:22 +01:00
Mario Zechner e69830bf9a fix: enabledModels now supports glob patterns for OAuth providers
Added glob pattern support (e.g., github-copilot/*, *sonnet*) to --models
and enabledModels. Patterns are matched against both provider/modelId and
just modelId, so *sonnet* works without requiring anthropic/*sonnet*.

The existing fuzzy substring matching for non-glob patterns is preserved.

fixes #337
2026-01-01 02:04:04 +01:00
Mario Zechner eaed2c154e Update README.md compaction and branching sections
- Simplify compaction section, link to docs/compaction.md for details
- Clarify that branch summaries are optional (user is prompted)
- Change /branch to /tree in compaction note
2025-12-31 14:44:51 +01:00
Mario Zechner c3d0ac281f Restructure README.md
- Add session tree intro to Sessions section
- Move Themes, Custom Slash Commands, Skills, Hooks, Custom Tools to new Extensions top-level section
- Keep Settings File under Configuration
2025-12-31 14:39:51 +01:00
Mario Zechner ff147833c4 Update README.md for new APIs
- Add /tree to slash commands table
- Expand Branching section with /tree in-place navigation
- Update hooks example: pi.send() -> pi.sendMessage(), session -> session_start
- Remove hookTimeout from settings (no longer exists)
2025-12-31 14:13:30 +01:00
Mario Zechner f9caeab90f Reorder execute params: (toolCallId, params, onUpdate, ctx, signal?)
Optional signal now at the end for cleaner API
2025-12-31 12:14:28 +01:00
Mario Zechner a405cb5268 Update CHANGELOG, README, and custom-tools.md for new CustomTool API
- Add custom tools API rework to CHANGELOG breaking changes
- Update docs/custom-tools.md with new types and signatures
- Update README quick example with correct execute signature
2025-12-31 12:10:37 +01:00
Duncan Ogilvie c826183dfa Add enabledModels to settings.json 2025-12-27 13:53:21 +01:00
Mario Zechner b3b78ac97a feat(coding-agent): Add --session-dir flag for custom session directory
- Add --session-dir CLI flag to specify custom session directory
- SessionManager API: second param of create(), continueRecent(), list(), open()
  changed from agentDir to sessionDir (direct directory, no cwd encoding)
- When omitted, uses default (~/.pi/agent/sessions/<encoded-cwd>/)
- --session now derives sessionDir from file's parent if --session-dir not provided
- list() validates session header before processing files
- Closes #313

Co-authored-by: scutifer <scutifer@users.noreply.github.com>
2025-12-25 20:27:41 +01:00
Mario Zechner 3595ac0900 docs: add Shift+Ctrl+P and Ctrl+L keyboard shortcuts to README
Follow-up to #315
2025-12-25 18:32:45 +01:00
Mario Zechner 90832f945b Auto-load SYSTEM.md as custom system prompt
Closes #309
2025-12-25 18:04:22 +01:00
Mario Zechner ea45015750 Add /settings command with unified settings menu (#312)
* Add /settings command with unified settings menu

- Add SettingsList component to tui package with support for:
  - Inline value cycling (Enter/Space toggles)
  - Submenus for complex selections
  - Selection preservation when returning from submenu

- Add /settings slash command consolidating:
  - Auto-compact (toggle)
  - Show images (toggle)
  - Queue mode (cycle)
  - Hide thinking (toggle)
  - Collapse changelog (toggle)
  - Thinking level (submenu)
  - Theme (submenu with preview)

- Update AGENTS.md to clarify no inline imports rule

Fixes #310

* Add /settings to README slash commands table

* Remove old settings slash commands, consolidate into /settings

- Remove /thinking, /queue, /theme, /autocompact, /show-images commands
- Remove unused selector methods and imports
- Update README references to use /settings
2025-12-25 15:39:42 +01:00
Mario Zechner 504d0253f6 Rename /clear to /new, update hook events to before_new/new
Closes #305 - took direct rename approach instead of alias system

Thanks @mitsuhiko for the nudge!
2025-12-25 04:15:10 +01:00
Mario Zechner aa8f7029e1 Refactor OAuth/API key handling: AuthStorage and ModelRegistry
- Add AuthStorage class for credential storage (auth.json)
- Add ModelRegistry class for model management with API key resolution
- Add discoverAuthStorage() and discoverModels() discovery functions
- Add migration from legacy oauth.json and settings.json apiKeys to auth.json
- Remove configureOAuthStorage, defaultGetApiKey, findModel, discoverAvailableModels
- Remove apiKeys from Settings type and SettingsManager methods
- Rename getOAuthPath to getAuthPath
- Update SDK, examples, docs, tests, and mom package

Fixes #296
2025-12-25 03:48:36 +01:00
Mario Zechner ece66335e8 List all provider keys in README settings example 2025-12-24 02:42:41 +01:00
Mario Zechner df3ee508bd Update README with settings.json API keys 2025-12-24 02:14:02 +01:00
Aliou Diallo d3b8a702b9 docs: fix outdated custom tools paths and add missing header shortcut (#283)
* docs: fix custom tools example paths to use index.ts structure

* fix: add missing ctrl+g shortcut to startup header

* docs: fix /session -> /resume for session switching references
2025-12-23 03:29:31 +01:00
Mario Zechner dc05041ad4 README: clarify TUI settings save to global preferences only 2025-12-22 12:40:42 +01:00
Mario Zechner 5b2a692fd5 Update README: document project-specific settings, add SettingsManager to SDK list 2025-12-22 12:34:08 +01:00
Mario Zechner 59976daeb8 Add SDK documentation
- docs/sdk.md: comprehensive SDK reference
  - Core concepts (createAgentSession, AgentSession, Agent, events)
  - All options with examples
  - Discovery functions
  - Complete example

- README.md: add SDK section with brief overview and links
2025-12-22 03:20:09 +01:00
Mario Zechner 20702d2cd5 feat(coding-agent): add --skills CLI flag for filtering skills
Adds glob pattern support for skill filtering:
- --skills <patterns> CLI flag (comma-separated glob patterns)
- includeSkills setting in settings.json
- ignoredSkills now supports glob patterns
- ignoredSkills takes precedence over includeSkills and --skills

Closes #268
2025-12-21 20:58:54 +01:00
Mario Zechner 7b27c08122 Clarify Ctrl+Z docs to mention fg for resume 2025-12-21 20:22:29 +01:00
Aliou Diallo dea263fe94 feat(coding-agent): add Ctrl+Z to suspend process (#267)
* feat(tui): add isCtrlZ key detection and resetRenderState method

* feat(coding-agent): add Ctrl+Z handler to suspend process

* docs(coding-agent): add Ctrl+Z to keyboard shortcuts documentation

* feat(tui): add force parameter to requestRender
2025-12-21 20:19:32 +01:00
Mario Zechner 4577ed7e17 Update README to include github-copilot, google-gemini-cli, google-antigravity providers 2025-12-21 20:17:12 +01:00
Aliou Diallo 04090c8c54 docs(coding-agent): document Ctrl+G external editor shortcut 2025-12-21 14:51:52 +01:00
Mario Zechner 0fe6361528 Add Google Gemini CLI and Antigravity OAuth providers
- Add google-gemini-cli provider: free Gemini 2.0/2.5 via Cloud Code Assist
- Add google-antigravity provider: free Gemini 3, Claude, GPT-OSS via sandbox
- Move OAuth infrastructure from coding-agent to ai package
- Fix thinking signature handling for cross-model handoff
- Fix OpenAI message ID length limit (max 64 chars)
- Add GitHub Copilot overflow pattern detection
- Add OAuth provider tests for context overflow and streaming
2025-12-20 21:34:18 +01:00