Commit Graph
1578 Commits
Author SHA1 Message Date
can1357 ccbcb682df fix(submit-result): enforce data-or-error union contract 2026-02-26 09:02:09 +01:00
can1357 9da1b441a8 style(prompts): reformat 2026-02-26 08:56:47 +01:00
can1357 6dd384120c Merge branch 'pr-172' 2026-02-26 08:56:02 +01:00
can1357 1c8b3f8cb3 Merge PR #155 and fix isolation merge regressions 2026-02-26 08:53:25 +01:00
lukeandGitHub bac30de126 feat: add PERPLEXITY_COOKIES env var for session cookie auth (#178)
Support Perplexity web search via session cookies extracted from
the desktop app (Electron/AppImage). Accepts either a raw cookie
string or a bare session token value.

Auth resolution order: PERPLEXITY_COOKIES > agent.db OAuth > PERPLEXITY_API_KEY
2026-02-26 08:42:53 +01:00
Kevin LoftisandGitHub bb9f899638 fix: prevent thundering herd of git status processes in status line (#180)
The #getGitStatus() method fires an async `git status --porcelain` but
only updates the TTL timestamp after the async completes. In large repos
where git status takes seconds, every TUI render cycle during that window
spawns a new process — cascading into hundreds of concurrent git processes,
exhausting file descriptors and creating .git/index.lock contention.

Add a #gitStatusInFlight boolean guard that ensures exactly one git status
process runs at a time. Use a finally block to unconditionally reset the
guard and refresh the TTL to completion time.
2026-02-26 08:41:56 +01:00
Muhammad Zahid MasruriandGitHub fa7b962e51 fix(exa): synthesize answer from per-result summaries (#169)
Request contents.summary from Exa /search API and combine up to
3 non-empty summaries into SearchResponse.answer, replacing the
previous 'No answer text returned' output.

Changes:
- Add contents.summary to every Exa search request body
- Add summary field to ExaSearchResult interface
- Export synthesizeAnswer() to build combined answer from summaries
- Export buildExaRequestBody() for testability
- Export normalizeSearchType() (was private)
- Prefer summary over text/highlights for snippet field (falsy check)
- Only synthesize answer from results that have a URL (mirrors sources filter)

Tests: 37 new tests covering normalizeSearchType, buildExaRequestBody,
synthesizeAnswer (pure unit tests) and searchExa (mocked fetch)
2026-02-25 19:45:34 +01:00
Chay ChoongandGitHub b29b06d73a fix(mcp): make disabledServers work on user-level third-party servers (#175)
The disabledServers mechanism introduced in 4bfa3b0c (Merge branch
'pr-82', 2026-02-16) was defeated by a level guard added after merge:
servers with _source.level === "user" were exempt from the disabled
check. This meant servers discovered from ~/.claude.json (which the
Claude provider tags as level "user") were never actually filtered out,
even when present in disabledServers.

Remove the level guard so disabledServers applies unconditionally. This
is safe because the /mcp disable command already uses updateMCPServer
(setting enabled: false inline) for servers defined in omp own configs;
the disabledServers path only fires for third-party discovered servers.

Also fix the /mcp list display to cross-filter discovered servers
against the disabled list, preventing a server from appearing both as
"connected" and "disabled" when the MCP manager has stale state.
2026-02-25 19:43:42 +01:00
Joshua ChristmanandCursor 7e85f2a299 fix(submit-result): make data required in schema to prevent submit loop
The submit_result tool marked 'data' as optional (Type.Optional) in its
JSON schema, but runtime validation requires it when status is 'success'.
Models that follow the schema literally omit the data parameter, causing
every call to fail with 'data is required when status is success (got
null/undefined)'. The agent then retries indefinitely.

Change data from Type.Optional(dataSchema) to dataSchema so the schema
matches runtime requirements. Models are now forced to include the data
object when calling submit_result with success, resolving the loop.

For aborted status, models can pass data: {}; validation is skipped.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-24 20:12:05 -06:00
2ff8f25d31 fix(coding-agent/commit): Hardened changelog schemas and shared categories (#149)
- Added a shared CHANGELOG_CATEGORIES constant and reused it across changelog tooling.
- Validated changelog entry and deletion payloads to require arrays and flag invalid categories.
- Exported the changelog tool schema for generator validation and referenced it during parsing.

Co-authored-by: Can Bölük <can1357@users.noreply.github.com>
2026-02-24 03:30:34 +01:00
Zakhar KoganandCan Bölük bb7f288489 fix(extensions): guard wrapTextWithAnsi with width validation
- Guard Container.render() to ensure width >= 1 for ALL components
- Guard TwoColumnBody.rightWidth with Math.max(0, ...)
- Validate description type before passing to native function
- Fall back to truncation when width <= 2

Fixes crash when opening extensions in narrow terminals.
2026-02-24 03:29:06 +01:00
can1357 d4469b3eb7 fix(coding-agent): updated edit rules and recovery instructions
Fixes #158.
2026-02-24 03:25:13 +01:00
can1357 523dca5bbc fix: extended exa search types
Fixes #159.
2026-02-24 03:15:43 +01:00
Zahidandcan1357 c37bd1553b fix(coding-agent): use supported Exa search type for deep wrapper 2026-02-24 03:14:13 +01:00
can1357 ac384045cc fix(coding-agent): refine Exa no-key behavior and fallback priority 2026-02-24 03:12:33 +01:00
haosenwang1018andcan1357 e3dc860925 fix: allow Exa MCP tools without EXA_API_KEY
The Exa MCP endpoint at https://mcp.exa.ai/mcp is publicly accessible
without an API key. Previously, all Exa tools bailed early with
'EXA_API_KEY not found' when no key was set, even though the basic
tools (web_search_exa, company_research_exa, get_code_context_exa)
work fine unauthenticated.

Changes:
- fetchExaTools/callExaTool: accept null apiKey, omit exaApiKey param
- MCPWrappedTool.execute: only require key for Websets tools
- createExaTool (factory): remove early-return guard on missing key

Fixes #151
2026-02-24 03:12:02 +01:00
can1357 fb150a9e39 fix(coding-agent): redirect ssh stdin to avoid mux fd errors
Fixes #154.
2026-02-24 02:59:42 +01:00
can1357 e116b87bed fix(model-selector): show commit role badge in /model
Fixes #157.
2026-02-24 02:58:35 +01:00
can1357 76a921f284 fix: apply non-interactive env to all bash execution paths
The non-interactive environment variables (pager, editor, and prompt
suppression) were only applied in the PTY (interactive) bash path.
The non-PTY executeBash path had no such defaults, so commands could
block on pagers or credential prompts.

- Extract NO_PAGER_ENV from bash-interactive.ts into shared
  non-interactive-env.ts module (renamed to NON_INTERACTIVE_ENV)
- Apply it in executeBash (non-PTY) with user overrides taking
  precedence
- Fix ordering in interactive PTY path so user env overrides
  the defaults (was reversed)
- Add test verifying defaults are applied alongside user env
2026-02-24 02:57:43 +01:00
can1357 6240e7bb03 refactor(prompts): clarified agent and system guidance
- Standardized prompt format, removing XML-like tags.
- Emphasized RFC 2119 keywords using bolding across all prompts.
- Rewrote the core system prompt with enhanced structure and directives.
2026-02-24 02:50:20 +01:00
Zahid 91fc0300b9 fix(coding-agent): align Exa MCP tool names with _exa suffix 2026-02-24 07:36:17 +07:00
DeprecatedLuke 745e38aebf fix(task): filter lock files from commit message diff input 2026-02-23 20:42:49 +00:00
DeprecatedLuke 7499379756 fix(task): make merge failures non-fatal, preserve agent output 2026-02-23 20:37:51 +00:00
DeprecatedLuke 39ff2ab6e7 feat(task): add task.eager setting for eager task delegation 2026-02-23 20:36:25 +00:00
can1357 8a3699bff4 refactor(prompts): harmonized prompt templates and bolded keywords
- Standardized prompt structures, replacing custom XML-like tags with Markdown.
- Implemented automatic bolding for RFC 2119 keywords (e.g., MUST, SHOULD) in prompt content.
- Simplified environment information provided to agents, removing desktop environment details.
- Updated image generation tool parameters for improved clarity and capacity.
2026-02-23 21:19:26 +01:00
can1357 a83175c94c refactor: migrated imports to unified package root and consolidated skill discovery logic
- Consolidated @oh-my-pi/pi-utils subpath imports into single package root import across 100+ files.
- Moved tryParseJson utility from local web scrapers module to @oh-my-pi/pi-utils package for centralized JSON parsing.
- Renamed loadSkillsFromDir to scanSkillsFromDir and refactored skill discovery to use fs.promises.readdir instead of glob-based approach.
- Replaced custom parseJSON with tryParseJson across discovery modules for consistent error handling.
- Removed emitCustomToolSessionEvent method and cleanupSshResources function, consolidating shutdown logic into dispose method.
- Updated glob pattern construction to use GlobBuilder with literal_separator(true) for improved path handling.
2026-02-23 20:59:17 +01:00
DeprecatedLuke 696d6ba545 feat(task): add better commit messages and nested repo isolation 2026-02-23 19:17:43 +00:00
DeprecatedLuke c1370f7332 feat(task): implement branch merge strategy for isolated tasks 2026-02-23 19:17:42 +00:00
DeprecatedLuke 995b26b90f feat(task): add nested non-submodule repo support for isolation 2026-02-23 19:17:41 +00:00
DeprecatedLuke 86cd66b3d5 feat(task): add fuse-overlay isolation backend 2026-02-23 19:17:40 +00:00
can1357 74344eca1b fix: corrected tool description normalization to prevent undefined field errors
- Added fallback empty string for undefined tool descriptions across all AI providers to prevent runtime errors.
- Made `description` field required in CustomTool interface and normalized tool descriptions in agent-loop.
- Refactored tool normalization in agent-loop by renaming `injectIntentIntoTools()` to `normalizeTools()` with conditional intent injection.
- Added comprehensive description metadata to todo-write tool schema fields for improved clarity.
2026-02-23 17:12:59 +01:00
can1357 49e40aca5c fix(settings): initialised all setting hooks on load
- Replaced hardcoded tab width update with a generic mechanism to trigger all registered setting hooks.
- Ensures all settings with associated hooks are properly configured during initialization.
2026-02-23 15:06:10 +01:00
can1357 d3575c752d feat(async): added job delivery acknowledgment
- Introduced mechanism to suppress future delivery attempts for acknowledged jobs.
- The AwaitTool acknowledges deliveries for jobs it finished awaiting.
- Prevents unnecessary retries and clears delivery queue for handled jobs.
2026-02-23 15:00:11 +01:00
can1357 4b60af5c47 feat(text-display): implemented configurable tab width
- Added a `display.tabWidth` setting to control default tab rendering.
- Integrated `.editorconfig` resolution for c ontext-aware tab indentation.
- Updated native text processing to use the resolved tab width for calculations.
- Improved tab visualization in diffs and other UI elements for consistency.
2026-02-23 15:00:06 +01:00
Kyle ChenandCan Bölük f613d190ac fix: close unclosed {{#if}} block and restore git section in custom-system-prompt
The {{#if contextFiles.length}} block (line 10) was never closed with
{{/if}}, causing Handlebars to throw 'if doesn't match ifAny' at
runtime when the template is compiled.

Additionally, the git version control section (git.isRepo guard with
branch, status, and commit history) was missing entirely, even though
the outer {{#ifAny contextFiles.length git.isRepo}} guard references it.

This fix:
- Adds the missing {{/if}} to close the contextFiles.length block
- Restores the git.isRepo conditional section for version control info
- Ensures </project> and {{/ifAny}} are properly positioned
2026-02-23 06:47:22 +01:00
can1357 6e596fbed9 feat(tools): removed timeout parameter from await tool for indefinite waiting
- Removed `timeout` parameter from await tool--tool now waits indefinitely until jobs complete or the call is aborted.
- Renamed `job_ids` parameter to `jobs` in await tool schema.
- Removed `timedOut` field from await tool result details.
- Simplified timeout logic by eliminating sleep-based polling in favor of indefinite waiting.
2026-02-23 02:35:27 +01:00
can1357 90f68431bf Fix local URL resolution for bash destinations 2026-02-23 01:51:54 +01:00
can1357 5696e9799a chore: renamed job polling tool to await
- Renamed `poll_jobs` tool to `await` for clarity.
- Updated all related files, prompts, and type definitions.
2026-02-23 01:44:03 +01:00
can1357 c5dafa28f5 docs(prompts): clarified task tool and system prompt documentation structure
- Restructured task tool documentation for clarity, moving parameter definitions into a dedicated section and consolidating guidance on context, assignments, and parallelization.
- Reformatted system prompt template to use markdown headings instead of XML tags for skills, preloaded skills, and rules sections.
2026-02-23 01:40:44 +01:00
can1357andCan Bölük ac76b6623e perf: accepting #142 with changes 2026-02-23 01:18:24 +01:00
can1357 330334b972 Deduplicate intent field description to save tokens
Move agent__intent description from per-tool JSON schema injection (repeated
once per tool) into a single conditional block in the system prompt template.
Token savings scale with tool count.

- agent-loop: remove description from intent schema injection
- system-prompt.md: add intentTracing/intentField template block
- sdk: compute intentField once, pass through to prompt builder
- system-prompt.ts: thread intentField option into template context
2026-02-23 01:05:48 +01:00
can1357 a96178494a refactor(coding-agent): restructured tool schemas for consistency and clarity
- Renamed `file` parameter to `path` in edit tool schemas and all test cases for consistency.
- Removed `file` property fallback from EditRenderArgs interface and path resolution methods.
- Refactored browser viewport schema to use snake_case `device_scale_factor` with explicit camelCase mapping for Puppeteer API.
- Added hashline edit rule requiring `end` tag to include closing braces/brackets when replacing blocks.
- Refactored INTENT_FIELD injection logic to conditionally reorder schema properties and update required array.
2026-02-23 00:23:53 +01:00
can1357 801c13d141 fix(patch): corrected property access from text to lines in applyHashlineEdits
- Corrected property access from `result.text` to `result.lines` to match actual return type of `applyHashlineEdits()`.
2026-02-22 23:48:08 +01:00
can1357 0e1a4ef15a feat: strict mode + simplified hashline edit operations
- Consolidated `replace` operations and removed `insert`.
- Improved line hash collision resistance for symbol-only text.
2026-02-22 23:45:01 +01:00
can1357 399202b8d2 refactor(patch): antigravity friendly schema 2026-02-22 19:56:58 +01:00
can1357 ae07ab7e76 docs(patch): clarified examples 2026-02-22 19:26:40 +01:00
can1357 0d628857c1 refactor(patch): consolidated edits into replace op 2026-02-22 19:24:55 +01:00
can1357 0298a88601 feat(coding-agent): added in-memory todo phase management to ToolSession API
- Added getTodoPhases() and setTodoPhases() methods to ToolSession API for in-memory todo phase management.
- Added getLatestTodoPhasesFromEntries() export to retrieve todo phases from session history entries.
- Changed todo state management from file-based (todos.json) to in-memory session cache with automatic persistence.
- Changed todo phases to sync from session branch history during branching and rewriting operations.
- Removed file-based todo loading logic and replaced with session-based todo phase retrieval throughout codebase.
2026-02-22 19:11:24 +01:00
can1357 95ecf8ad1a refactor(coding-agent): simplified URL resolution and template formatting
- Removed try-catch wrapper around URL resolution in expandInternalUrls, allowing errors to propagate to caller.
- Simplified template formatting in subagent-user-prompt.md by collapsing context block to single line.
2026-02-22 18:44:50 +01:00
can1357 1ec9d4d0f4 chore: reorder internal protocol exports 2026-02-22 18:35:21 +01:00