Commit Graph

677 Commits

Author SHA1 Message Date
can1357 a76de2fea8 Merge PR #3089: fix(test): migrate fs.rmSync to removeSyncWithRetries for EBUSY-safe cleanup (@oldschoola) 2026-06-20 22:12:49 +02:00
can1357 62756efb8f chore: bump version to 16.1.7 2026-06-20 05:40:49 +02:00
can1357 73065ea431 chore: bump version to 16.1.6 2026-06-20 02:47:39 +02:00
oldschoola fa903b2b2c fix(test): migrate fs.rmSync to removeSyncWithRetries for EBUSY-safe cleanup
Export removeSyncWithRetries from @oh-my-pi/pi-utils as a standalone
function, then migrate the highest-impact fs.rmSync call sites:

- test/helpers/temp-home-cleanup.ts: 2 fs.rmSync → removeSyncWithRetries
  (affects all tests using the cleanupTempHome helper)
- test/core/apply-patch-regression.test.ts: 16 fs.rmSync → removeSyncWithRetries
  (the most fs.rmSync calls of any test file)

removeSyncWithRetries retries on EBUSY/EPERM/ENOTEMPTY (40x25ms on
Windows), matching TempDir.removeSync's retry logic. On Linux/macOS
(CI) the retries are a no-op — fs.rmSync succeeds immediately.
2026-06-19 17:27:54 -07:00
can1357 1a92b3f854 chore: bump version to 16.1.5 2026-06-19 22:27:50 +02:00
can1357 ee2b000bdc chore: bump version to 16.1.4 2026-06-19 20:45:56 +02:00
can1357 259bb004e1 chore: bump version to 16.1.3 2026-06-19 17:52:38 +02:00
can1357 14603e9b32 docs(changelog): normalize [Unreleased] after PR integration
Promote union-merged entries into [Unreleased], drop a duplicated
Removed block, and add the missing #3006 entry.
2026-06-19 17:24:17 +02:00
can1357 2de02f2119 Merge PR #3019: fix: Windows test failures — path handling, EBUSY, SQLite handle leaks (@oldschoola) 2026-06-19 17:17:04 +02:00
can1357 6486e2a14a Merge PR #3021: fix(ipc): harden worker IPC send against async EPIPE rejections (@oldschoola) 2026-06-19 17:16:37 +02:00
can1357 db7ca77a8f chore: bump version to 16.1.2 2026-06-19 16:17:09 +02:00
can1357 d46bd0139b refactor(coding-agent): fixed system prompt customization path
- Fixed `SYSTEM.md` integration to correctly include custom-rendered sections like rules and skills.
- Consolidated system prompt validation by requiring `<skills>` tag presence instead of specific prose.
- Removed redundant system prompt math-formatting tests and orphaned task batch documentation tests.
2026-06-19 16:16:37 +02:00
can1357 80a0a1b8a8 feat(utils): replaced createAbortableStream with abortableSource
- Introduced `abortableSource` as a lighter, direct-reader async generator.
- Removed the `createAbortableStream` public API to eliminate unnecessary stream wrapper layers.
- Updated internal stream processing to use `abortableSource` for improved memory and performance.
2026-06-19 16:06:18 +02:00
can1357 6d7dab0c68 fix(coding-agent): prevented crash when resuming session in deleted directory
- Export `directoryExists` in `utils` to safely validate working directories before traversal.
- Update `SessionManager` and startup logic to fallback to the launch directory if a session's recorded working directory no longer exists.
- Add regression tests to ensure sessions now correctly adopt the launch directory instead of crashing on missing paths.
2026-06-19 16:06:01 +02:00
can1357 492fe5e896 chore: bump version to 16.1.1 2026-06-19 09:03:07 +02:00
can1357 3d0b3d71af chore: bump version to 16.1.0 2026-06-19 08:08:44 +02:00
oldschoola 23565e3e58 fix(ipc): hardened worker IPC send against async EPIPE rejections
- Added `safeSend` helper wrapping `Subprocess.send()` so sync throws and async EPIPE rejections cannot escape.
- Replaced inline try/catch send wrappers in STT, TTS, and tiny-title clients with shared `safeSend`.
- Added `isIpcSendEpipe` predicate and made matching rejections non-fatal in the `unhandledRejection` handler.
- Added contract tests for `safeSend` and `isIpcSendEpipe` covering sync throws, async rejections, and edge cases.
2026-06-18 21:42:02 -07:00
oldschoola 14252e71cb fix: Windows test failures — path handling, EBUSY, SQLite handle leaks
Fix all Windows-specific test failures caused by path handling problems
and EBUSY errors from unclosed SQLite database handles.

Root causes fixed:
1. POSIX path assumptions: replaced hard-coded file:///tmp, /repo, etc.
   with pathToFileURL/path.resolve/path.join computed expectations
2. shortenPath() now normalizes backslashes to forward slashes after ~
   and respects home directory boundaries
3. HistoryStorage.resetInstance() leaked its Database — added #close()
   that finalizes all prepared statements and closes the DB
4. AgentStorage gained the same resetInstance()/#close() pattern
5. SqliteAuthCredentialStore.close() leaked one-off prepared statements
   from inline this.#db.prepare() calls — wrapped each in try/finally
6. model-cache.ts used a process-global DB even for custom dbPath —
   now opens/closes per-call via withModelCacheDb
7. createAgentSession leaked AuthStorage on construction failure —
   added ownsAuthStorage cleanup in catch block
8. MnemopiBackend.removeDbFiles() now truly best-effort (catches errors)
9. TempDir retry window expanded from 4x10ms to 40x25ms
10. TempDir prefix convention: non-@ prefixes created dirs relative to
    cwd instead of os.tmpdir() — all test temp dirs now use @ prefix
11. Shell-escaped interpolated paths in bash tool tests
12. git core.autocrlf false in autoresearch test repo init

All 522 previously-failing Windows tests now pass.
2026-06-18 21:32:38 -07:00
can1357 f7937c5e8d chore: bump version to 16.0.11 2026-06-19 04:59:59 +02:00
can1357 4f03180ae6 refactor(deps): moved intent field constant to pi-wire
- Moved the `INTENT_FIELD` constant from `@oh-my-pi/pi-agent-core` to the specialized `@oh-my-pi/pi-wire` package to permit broader usage across the monorepo.
- Updated all references across `agent`, `ai`, `coding-agent`, `collab-web`, and `snapcompact` packages to import the constant from the new location.
- Added `@oh-my-pi/pi-wire` as a dependency to all affected packages.
2026-06-19 04:58:29 +02:00
can1357 3998d95088 feat: standardized tab expansion to fixed width
- Removed configurable tab width support and the `display.tabWidth` setting across all packages.
- Deleted obsolete utility functions `getIndentation`, `getIndentationNoescape`, and `setDefaultTabWidth`.
- Standardized tab expansion logic to use a fixed `DEFAULT_TAB_WIDTH` globally.
- Cleaned up related configuration schemas, test suites, and internal API signatures to remove path-dependency.
2026-06-19 04:48:41 +02:00
can1357 623ae8df35 chore: bump version to 16.0.10 2026-06-19 01:32:28 +02:00
can1357 20f8c3776f chore: bump version to 16.0.9 2026-06-18 23:01:31 +02:00
can1357 2023a6f674 chore: bump version to 16.0.8 2026-06-18 20:05:56 +02:00
can1357 653ba1fab1 chore: reformat 2026-06-18 20:05:35 +02:00
can1357 f5ebab2b83 feat(utils): vendor mermaid rendering 2026-06-18 18:52:38 +02:00
can1357 93624f0239 chore: bump version to 16.0.7 2026-06-18 16:38:08 +02:00
can1357 159b8a1c63 chore: bump version to 16.0.6 2026-06-18 03:20:08 +02:00
can1357 0386d44fec refactor(ai): replaced abort signal timeouts with clearable fetch timers
- Prevents absolute `AbortSignal.timeout` from cutting off active stream bodies by introducing a clearable pre-response timer.
- Clears the watchdog timer for Bedrock, Gemini, Ollama, and Codex providers once headers are received.
- Restores regular caller abort signaling capability on the combined fetch stream.
- Adds comprehensive fake-timer tests to cover the timeout arming and clearing lifecycle.
2026-06-18 01:57:23 +02:00
can1357 7e87709d22 chore: bump version to 16.0.5 2026-06-17 15:11:23 +02:00
can1357 94a813788f chore: bump version to 16.0.4 2026-06-17 09:44:33 +02:00
can1357 8eeb707387 chore: bump version to 16.0.3 2026-06-17 01:58:36 +02:00
can1357 0e049b9a1a test(ai): dropped chdir and env mutation from request-debug recording test
- Replaced `process.chdir(tempDir)` plus `PI_REQ_DEBUG=1` auto-naming with explicit `setNextRequestDebugPath` targets, removing the `previousCwd` save/restore and the `debugFiles` directory-scan helper.
- The PI_REQ_DEBUG recording assertions now read each request/response from the path they set, so the test no longer mutates `process.cwd()` or the global debug env flag.
2026-06-17 01:22:31 +02:00
can1357 dcd1836d51 feat(utils): added isTerminalHeadless/setTerminalHeadless terminal-suppression flag
- Added `isTerminalHeadless()` / `setTerminalHeadless()` to `env`, a process-wide switch that suppresses real-terminal side effects (stdout escape/frame writes, stdin raw mode, CSI/OSC probes, SIGWINCH, window-title changes, emergency restore).
- Defaulted the flag to `isBunTestRuntime()` so it engages when `bun test` sets `NODE_ENV=test`, and made `setTerminalHeadless` return the previous value so callers can restore exact prior state.
2026-06-17 01:20:37 +02:00
can1357 5bce7ed6df feat: added advisory transcript formatting and one-shot benchmark metrics
- Introduced advisory note output as `<advisory>` tags with optional severity and guidance.
- Updated session transcript formatting to `### Session update` and inline watched role labels.
- Added shared `escapeXmlText` utility and escaped XML-sensitive text in advisor outputs.
- Added one-shot success run token metrics and one-shot statistics reporting.
2026-06-16 18:34:50 +02:00
can1357 dc14689fc1 chore: bump version to 16.0.2 2026-06-16 15:33:47 +02:00
can1357 e24f789de4 chore: bump version to 16.0.1 2026-06-15 21:30:30 +02:00
can1357 4897760040 Merge PR #2623: fix(ai): merge streamed object tool arguments 2026-06-15 19:46:10 +02:00
can1357 44f9867e0e chore: bump version to 16.0.0 2026-06-15 17:27:48 +02:00
Can Bölük fb157f4abc Merge pull request #2637 from Parsifa1/fix/xdg-fix
fix: align tool cache paths with XDG dirs
2026-06-15 13:43:32 +02:00
Parsifa1 ed5855807f fix: align tool cache paths with XDG dirs 2026-06-15 11:28:36 +00:00
can1357 789d4f6948 chore: bump version to 15.13.3 2026-06-15 12:47:58 +02:00
can1357 3ab675a83b fix: added buffered worker inboxing and standardized worker selectors
- Added `WorkerInbox` and `installWorkerInbox(port)` to queue worker messages before bind.
- Added `consumeWorkerInbox()` to replay buffered messages and clear one active inbox.
- Added buffered inbox consumption in JS and tab worker transports before direct message handlers.
- Normalized worker selector arguments to the `__omp_worker_*` naming across workers and tests.
2026-06-15 11:59:44 +02:00
can1357 b7b1b54f6a chore: bump version to 15.13.2 2026-06-15 08:49:41 +02:00
roboomp 20caaf8010 style: bun run fix 2026-06-15 05:52:09 +00:00
can1357 6c48b6224d chore: bump version to 15.13.1 2026-06-15 04:36:40 +02:00
can1357 ecd9f3220f feat(scripts): added changelog recovery mode for historical duplicate cleanup
- Added --recover CLI option to rebuild changelog fixes from tagged history.
- Pruned Unreleased bullets that match historical released items across all tags.
- Normalized output by sorting release sections by version and compacting bullet spacing.
2026-06-15 03:43:24 +02:00
can1357 3f82589ec1 fix: fixed OAuth and profile-boundary regressions across CLI and env handling
- Fixed OAuth credentials to keep unknown fields in schema while preserving existing shape checks.
- Fixed MCP OAuth IDs to be profile-scoped and avoid deleting credentials from non-active profiles.
- Fixed string-flag parsing so PROFILE_BOOTSTRAP_BOUNDARY tokens are not consumed as values.
- Fixed active-profile directory resolution to refresh after env updates so profile .env overrides apply.
2026-06-15 03:20:45 +02:00
Ogrodev 932ebe9a48 Merge remote-tracking branch 'upstream/main' into feat/profiles-and-alias
# Conflicts:
#	.github/actions/build-native/action.yml
#	.github/workflows/ci.yml
2026-06-14 21:26:03 -03:00
Ogrodev f9bc96e96c fix(coding-agent): harden profile auth shipping gaps 2026-06-14 20:30:50 -03:00