Commit Graph

297 Commits

Author SHA1 Message Date
can1357 bb01e58865 chore: bump version to 13.17.4 2026-04-01 23:50:36 +02:00
can1357 236fedaf2e chore: bump version to 13.17.3 2026-04-01 20:57:14 +02:00
can1357 2e0186a952 fix(ci): resolve gh_run_watch test hang and hardcoded path
- abortableSleep used Bun.sleep which vitest fake timers do not intercept;
  switch to setTimeout via Promise.withResolvers so vi.useFakeTimers() +
  vi.advanceTimersByTime() work correctly in the polling loop tests
- getCurrentHeadSha() and GhRunWatchTool session cwd used a hardcoded
  /work/pi path; replace with import.meta.dir so the tests resolve the
  real repo HEAD on any machine
- add timeout-minutes: 30 to the CI test job as a safety net against
  future hangs blocking release runs
2026-04-01 20:18:23 +02:00
can1357 5fbfbafa58 chore: bump version to 13.17.2 2026-04-01 19:32:22 +02:00
can1357 9b453ce2e5 chore: bump version to 13.17.1 2026-04-01 05:19:32 +02:00
can1357 862593d736 chore: bump version to 13.17.0 2026-03-30 14:00:34 +02:00
can1357 f44e007f7c chore: bump version to 13.16.5 2026-03-29 17:58:13 +02:00
can1357 1a616f80e5 chore: bump version to 13.16.4 2026-03-28 13:47:18 +01:00
can1357 b84ba76df1 chore: bump version to 13.16.3 2026-03-28 06:11:51 +01:00
can1357 660c5652d5 chore: bump version to 13.16.2 2026-03-27 12:12:54 +01:00
can1357 f114cd8122 chore: bump version to 13.16.1 2026-03-27 11:41:22 +01:00
can1357 17d596ab44 feat: fff
- Added SearchDb class for stateful shared search database instances enabling persistent file indexing and frecency tracking across grep, glob, and fuzzyFind operations.
- Added optional db parameter to grep(), glob(), and fuzzyFind() functions for database-backed searching with improved performance via cached file indices.
- Replaced grep-searcher with fff-grep and added fff-search dependency for enhanced file discovery and search capabilities with memory-mapped file support.
- Migrated fuzzy file discovery from fd module to fff module with SearchDb integration for stateful caching and improved search performance.
- Exported SearchDb type from @oh-my-pi/pi-natives public API for type-safe usage in grep, glob, and fuzzyFind workflows.
2026-03-27 11:28:49 +01:00
can1357 c7989526c1 chore: bump version to 13.16.0 2026-03-27 04:39:25 +01:00
can1357 ebf58f7c28 chore: bump version to 13.15.3 2026-03-26 16:17:37 +01:00
can1357 b8b1c75d20 chore: bump version to 13.15.2 2026-03-26 14:51:40 +01:00
can1357 80d7a8f413 chore: bump version to 13.15.1 2026-03-26 14:09:28 +01:00
can1357 4adaee02da chore: bump version to 13.15.0 2026-03-23 05:58:44 +01:00
can1357 7be29ab70f chore: bump version to 13.14.2 2026-03-21 17:34:47 +01:00
can1357 b89631541a chore: bump version to 13.14.1 2026-03-21 17:09:04 +01:00
can1357 32e6379fbe chore: bump version to 13.14.0 2026-03-20 23:53:34 +01:00
can1357 999d066d71 chore: bump version to 13.13.2 2026-03-18 23:21:20 +01:00
can1357 e58908615f chore: bump version to 13.13.1 2026-03-18 23:00:40 +01:00
can1357 964ee1bba8 chore: bump version to 13.13.0 2026-03-18 10:56:16 +01:00
can1357 88cb72b653 chore: bump version to 13.12.10 2026-03-17 19:42:38 +01:00
can1357 ca332be917 chore: bump version to 13.12.9 2026-03-17 16:50:20 +01:00
can1357 1b256ab151 chore: bump version to 13.12.8 2026-03-16 16:06:16 +01:00
can1357 78177af8bc feat(coding-agent): added symlink resolution and path alias handling for consistent directory behavior
- Added symlink and path alias resolution to session directory handling for consistent behavior across aliased home and temp directories.
- Improved status line path display to strip display roots using canonical path resolution, correctly handling symlink-equivalent directory aliases.
- Added support for quoted paths in grep, ast_grep, and find tools to properly handle directory names with spaces.
- Improved ast_grep error messaging when no matches found with parse errors to suggest narrowing path/glob or setting language.
- Extracted path utility functions (resolveEquivalentPath, normalizePathForComparison, pathIsWithin, relativePathWithinRoot) to shared utils package.
- Added comprehensive test coverage for symlink alias resolution in status line path rendering and session directory handling.
2026-03-16 15:24:18 +01:00
can1357 24ef2302ea chore: bump version to 13.12.7 2026-03-16 13:55:33 +01:00
can1357 53a46d94d8 chore: bump version to 13.12.6 2026-03-15 23:54:36 +01:00
can1357 26d874b372 chore: bump version to 13.12.5 2026-03-15 23:20:18 +01:00
can1357 3495c3d91a chore: bump version to 13.12.4 2026-03-15 18:41:15 +01:00
can1357 a2a07fbce0 chore: bump version to 13.12.3 2026-03-15 17:38:49 +01:00
can1357 99848563bb chore: bump version to 13.12.2 2026-03-15 17:29:51 +01:00
can1357 d469c2a96b chore: bump version to 13.12.1 2026-03-15 16:51:30 +01:00
汐 758acc6b53 fix(xdg): add darwin support (#412) 2026-03-14 16:04:07 +01:00
can1357 07e2dfbf0b chore: bump version to 13.12.0 2026-03-14 15:03:25 +01:00
can1357 ddaa15c66b chore: reformat 2026-03-14 15:03:07 +01:00
can1357 cd11c84bb8 refactor(utils): removed getTestAuthPath and improved XDG directory resolution
- Removed getTestAuthPath function and updated oauth test to construct path directly using getAgentDir and path.join.
- Refactored XDG directory resolution to validate paths exist before returning them, preventing invalid directory references.
- Extracted XDG resolution logic into a reusable resolveIf helper function for cleaner code.
2026-03-14 14:53:32 +01:00
汐 2ae1a042d8 feat(utils): full XDG Base Directory support for all path helpers (#407)
* feat(utils): full XDG Base Directory support for all path helpers

Implement XDG-first resolution across all omp path helpers, extend the
migration command to cover every data/state/cache location, and fix
five data-safety issues found in review.

dirs.ts:
- Add getXdgCachePath() helper ($XDG_CACHE_HOME/omp/<subpath>)
- Add isDefaultAgentDir() helper: XDG lookup is only valid when the
  resolved agentDir equals the process default (~/.omp/agent); custom
  profiles set via PI_CODING_AGENT_DIR or setAgentDir() are never
  silently redirected to the global XDG database
- Update 15 functions to XDG-first resolution:
    data:  getPluginsDir, getRemoteDir, getRemoteHostDir, getPythonEnvDir,
           getWorktreeBaseDir
    state: getReportsDir, getSshControlDir, getCrashLogPath, getDebugLogPath
    cache: getPuppeteerDir, getGpuCachePath, getNativesDir
- Guard XDG lookup with isDefaultAgentDir(agentDir ?? getAgentDir()) in
  all 9 agent-subdir helpers so that callers passing the global default
  agentDir still resolve to the migrated XDG location, while callers
  passing a non-default agentDir or running under a custom profile via
  setAgentDir() bypass XDG entirely
- Plugin-derived helpers delegate to getPluginsDir() and follow XDG
  resolution automatically

migrate-xdg.ts:
- Add getXdgCacheHome() helper
- Extend MigrationItem.category to include 'cache'
- Add 12 new migration entries: reports, plugins, remote, ssh-control,
  remote-host, python-env, puppeteer, wt, gpu_cache.json, natives,
  omp-crash.log, omp-debug.log
- Refuse to run when PI_CODING_AGENT_DIR points to a non-default
  profile: migration only makes sense for the default ~/.omp/agent tree
- copyDirectory returns skipped source paths (target existed, non-force)
- verifyIntegrity: remove size-mismatch early-return that masked stale
  targets as successful copies
- executeMigration: delete only entries that were actually copied;
  use rmdir on source dir so it is removed only when empty, preserving
  any skipped files for a subsequent --force run
- executeMigration: rename partial target to <target>.bak on integrity
  failure instead of deleting; preserves pre-existing user data while
  preventing getXdgDataPath from treating the partial tree as
  authoritative; source remains intact for re-copy on next run

test isolation:
- Set XDG_DATA_HOME/XDG_STATE_HOME to non-existent paths in
  memories-runtime.test.ts beforeEach/afterEach to prevent
  getXdgDataPath/getXdgStatePath from resolving to real user data

* fix(utils,coding-agent): fix XDG support issues

dirs.ts:
- Refactor path resolution into DirResolver class. XDG base dirs are
  resolved once at construction from env vars (Linux only, no
  existsSync). setAgentDir creates a fresh instance, naturally
  invalidating all cached paths and recomputing isDefaultProfile.
- getRootSubdir/agentSubdir accept optional XdgCategory parameter;
  when set, the XDG base replaces the config root. Every accessor
  is a one-liner delegate.
- Non-Linux platforms: XDG fields are null, zero overhead. No
  filesystem probing, no string comparisons on the hot path.
- Config-only subdirs (themes, tools, commands, prompts, modules)
  have no XDG category — they stay under the config root.
- Remove `import { env } from 'bun'`, use process.env consistently.
- Restore JSDoc comments to document actual defaults (~/.omp/...).

migrate-xdg.ts:
- Gate migrateToXdg on Linux — exits with clear error on other
  platforms.
- Fix data loss bug: verifyIntegrity now accepts a Set of skipped
  paths and skips verification for files that were intentionally not
  copied (pre-existing at target in non-force mode).
- Fix nested directory source deletion: recursive removeSourceEntries
  walks the tree and only deletes files not in the skipped set.
- Remove dead _sourcePath variable and unused force parameter from
  verifyIntegrity.
- Remove `import { env } from 'bun'`, use process.env consistently.

logger.ts:
- Revert JSDoc to document ~/.omp/logs/ as default.

oauth.ts:
- Replace direct getAgentSubdir call with getTestAuthPath().

CHANGELOG.md:
- Merge duplicate section headers under [Unreleased].
- Add missing blank line before [13.11.1].

---------

Co-authored-by: can1357 <me@can.ac>
2026-03-14 14:52:12 +01:00
can1357 6fc41a1599 chore: bump version to 13.11.1 2026-03-13 15:30:17 +01:00
can1357 7ab04f617e chore: bump version to 13.11.0 2026-03-12 17:38:11 +01:00
汐 af383e5618 fix(path): PI_CONFIG_DIR discovery (#358)
* fix(path): PI_CONFIG_DIR discovery

* refactor: centralize agent dir name into getConfigAgentDirName()

- Add getConfigAgentDirName() to utils/dirs.ts as single source of truth
- Replace duplicated "/agent" suffix construction in helpers.ts and config.ts
- Let biome format mcp/manager.ts canonically

---------

Co-authored-by: can1357 <me@can.ac>
2026-03-11 01:07:57 +01:00
can1357 61aa2c2bee chore: bump version to 13.10.1 2026-03-10 20:15:23 +01:00
can1357 535a828f9c chore: bump version to 13.10.0 2026-03-10 08:10:33 +01:00
can1357 2a56458fa9 chore: bump version to 13.9.16 2026-03-10 07:45:20 +01:00
can1357 dc90bb15c0 chore: bump version to 13.9.15 2026-03-10 05:51:27 +01:00
can1357 8fe602173b chore: bump version to 13.9.14 2026-03-10 04:24:07 +01:00
can1357 d30d55119c chore: bump version to 13.9.13 2026-03-10 04:10:50 +01:00
can1357 6eb5b3fc59 chore: bump version to 13.9.12 2026-03-09 16:15:02 +01:00
can1357 bd23578f55 chore: bump version to 13.9.11 2026-03-08 16:36:37 +01:00