Commit Graph

797 Commits

Author SHA1 Message Date
can1357 c8afd0f967 Merge PR #5131: fix(tui): suppress unmanaged macOS stderr writes corrupting the viewport (@korri123) 2026-07-14 18:34:14 +02:00
can1357 a3960bb4e1 chore: bump version to 16.5.0 2026-07-14 01:32:16 +02:00
can1357 01d3fc9b6b chore: bump version to 16.4.8 2026-07-12 20:48:09 +02:00
can1357 f933f02fcf chore: bump version to 16.4.7 2026-07-12 13:06:27 +02:00
can1357 12466ecf40 chore: bump version to 16.4.6 2026-07-12 02:50:43 +02:00
can1357 a3117c2842 feat(agent): migrated async-drain utility to shared package for reuse
- Relocated `AsyncDrain` class from `coding-agent` to `utils` package.
- Updated `HistoryStorage` to import `AsyncDrain` from shared utilities.
- Centralized the utility to allow reuse across the codebase.
2026-07-12 01:06:17 +02:00
can1357 3d1f9a4a3c chore: bump version to 16.4.5 2026-07-11 19:50:41 +02:00
can1357 cf1b3fc3fb chore: bump version to 16.4.4 2026-07-11 12:30:26 +02:00
can1357 f7930048d5 chore: bump version to 16.4.3 2026-07-11 07:55:17 +02:00
Kormákur 9af5835b20 chore: remove noisy test 2026-07-11 00:43:49 +00:00
Kormákur 17486d2009 fix(utils): create log dir before redirecting stderr guard
On a fresh profile ~/.omp/logs may not exist yet (the logger creates it
lazily), so opening getLogPath() with "a" threw and the guard fell back to
/dev/null — discarding macOS diagnostics and native crash reports instead
of preserving them in the omp log. mkdir the redirect target's parent
(recursive) before opening; the /dev/null fallback stays as the safety net.
2026-07-11 00:38:55 +00:00
Kormákur 4eaca82fa6 fix(tui): suppress unmanaged macOS stderr writes corrupting the viewport
On macOS, libmalloc writes runtime diagnostics (e.g. "MallocStackLogging:
can't turn off malloc stack logging because it was not enabled") directly
to fd 2 of the running TUI process at arbitrary times, painting into the
viewport. The existing env-strip only protects child processes.

Add a fd-level stderr guard in pi-utils (suppressTerminalStderr /
restoreTerminalStderr) that dup2-redirects fd 2 to the omp log file while
the TUI owns the terminal, and restores it at every ownership handoff
(external editor, Ctrl+Z suspend, shutdown, crash restore). Postmortem
fatal handlers restore fd 2 before printing so crash reports stay visible.

Mirrors openai/codex#24459.
2026-07-11 00:16:42 +00:00
can1357 fd2d4616a6 chore: bump version to 16.4.2 2026-07-11 00:17:35 +02:00
can1357 a99f46e941 chore: update changelogs 2026-07-11 00:17:04 +02:00
can1357 531880c620 feat: improved json serialization for bigint values
- Introduced `stringifyJson` helper to preserve bigint precision by serializing them as decimal strings.
- Replaced native `JSON.stringify` across compaction and session management modules to prevent serialization errors when handling bigint values in tool arguments.
- Added regression tests in `agent` and `coding-agent` packages to ensure bigint tool arguments remain intact through compaction and persistence flows.
2026-07-11 00:12:29 +02:00
can1357 395e4a5fcf chore: bump version to 16.4.1 2026-07-10 20:50:59 +02:00
can1357 a0f7266fbc chore: bump version to 16.4.0 2026-07-10 14:11:05 +02:00
can1357 e8d0a93db6 chore: bump version to 16.3.15 2026-07-09 22:44:35 +02:00
can1357 5ddb0719ad chore: bump version to 16.3.14 2026-07-09 20:37:29 +02:00
can1357 dd67447a03 chore: bump version to 16.3.13 2026-07-09 19:39:55 +02:00
can1357 314b9a7c9d fix(config): shared yaml config discovery
Moved the config.yml/config.yaml filename order into pi-utils as
MAIN_CONFIG_FILENAMES and taught the auth-broker config reader to probe
both extensions with the same precedence as the settings loader.

Fixes #4914
2026-07-09 18:27:22 +02:00
can1357 f25ab54c59 chore: bump version to 16.3.12 2026-07-08 19:40:13 +02:00
can1357 3ee194dcc7 chore: normalized changelog entries for merged pull requests 2026-07-08 15:35:00 +02:00
can1357 ffaa4764ec merge PR #4729: fix(cli): stop exporting launch .env.local into commands 2026-07-08 15:19:37 +02:00
can1357 38486e56db feat(coding-agent): handled unawaited promise rejections in eval cells
- Introduced a rejection interception mechanism to capture unhandled promise rejections from eval cell code.
- Attributed floating rejections to specific runs to fail the owning cell instead of crashing the process or worker.
- Downgraded rejections occurring after a cell finished to warn logs to prevent silent failures.
2026-07-08 14:51:25 +02:00
can1357 b086c5d669 chore: bump version to 16.3.11 2026-07-06 17:48:50 +02:00
roboomp 4b29248877 fix(cli): stopped exporting launch env local values
Filtered Bun-autoloaded launch .env.local entries out of child shell environments so nested commands can load their own dotenv files.

Added a regression test covering Convex-style inherited deployment variables while preserving ordinary inherited env values.

Fixes #4723
2026-07-06 15:23:59 +00:00
can1357 d8e568fad1 chore: bump version to 16.3.10 2026-07-06 08:13:30 +02:00
can1357 0006252d6e test(utils): validated tool error handling and cleanup signal propagation
- Added comprehensive test suite for `postmortem` utility error handling, covering cleanup symbol marking, cause chain depth validation, and process exception suppression.
- Added tests for `browser-run-cancellation` ensuring proper `unhandledRejection` suppression and correct `ToolAbortError` propagation during teardown.
- Implemented `collectUnhandledRejections` helper to verify silence of process-level rejections during async race conditions in browser runs.
- Added integration-style probe tests for `postmortem` to verify that marked cleanup errors allow process survival while unmarked ones remain fatal.
2026-07-06 08:07:25 +02:00
can1357 ff0419e412 feat(utils): enabled routine cleanup error tagging and deadlines
- Added markExpectedCleanupError and isExpectedCleanupError to identify and downgrade routine teardown errors to warnings.
- Updated global uncaughtException and unhandledRejection handlers to suppress process exit for tagged cleanup errors.
- Introduced a 10s execution deadline for cleanup callbacks to prevent process hanging during teardown.
2026-07-06 08:07:24 +02:00
can1357 674cf01762 chore: bump version to 16.3.9 2026-07-06 04:19:29 +02:00
can1357 d806ac5e4c chore: bump version to 16.3.8 2026-07-05 19:43:28 +02:00
can1357 0ca345185c chore: bump version to 16.3.7 2026-07-05 16:58:53 +02:00
can1357 fdd7bdef7b feat(ai): improved reasoning block separation and validation
- Mark demoted thinking blocks with a symbol to decouple paragraph separators from the raw text content.
- Update `openai-completions` to conditionally insert a newline only when a demoted thinking block is followed by other content.
- Ensure terminal demoted thinking blocks are trimmed to prevent trailing whitespace that causes rejection by the Anthropic API.
2026-07-05 16:25:12 +02:00
can1357 336e1edf7a chore: organized test scripts in CI workspace and package configuration
- Added scripts/fix-dts-extensions.test.ts to the test:scripts npm script.
- Included the .d.ts extension rewrite test in the CI workspace test suite.
- Updated repoScriptTests list in scripts/ci-test-ts.ts to ensure consistent tracking.
2026-07-05 16:01:51 +02:00
can1357 d63c69d7c3 feat(utils): implemented buffer classification for stream parsing
- Implemented classifyJsonPrefix to categorize buffers as complete, valid prefix, or invalid based on RFC 8259 strictness.
- Added utility to support disambiguation of identifierless streaming tool-call deltas during model response processing.
- Validated classifier logic with comprehensive suite covering nested structures, escape sequences, and strict formatting rules.
2026-07-05 15:57:24 +02:00
can1357 5768615e5d feat(ai): enabled millisecond precision for transport retry delay headers
- Added support for the `retry-after-ms` header in `getRetryAfterMsFromHeaders` to parse millisecond-based retry delays.
- Implemented `parseRetryAfterMsHeader` utility to safely validate and convert header values to milliseconds.
- Updated `extractRetryHint` in `fetch-retry` to prioritize the `retry-after-ms` header during transport response processing.
- Included `x-ratelimit-reset-ms` header support in `extractRetryHint` to better handle rate limit reset timings.
2026-07-05 12:03:48 +02:00
can1357 98f6e9f004 chore: bump version to 16.3.6 2026-07-04 14:00:53 +02:00
can1357 fef9b62334 chore: bump version to 16.3.5 2026-07-04 05:19:15 +02:00
can1357 d0c1890a6c chore: bump version to 16.3.4 2026-07-03 06:37:14 +02:00
can1357 afc79e4cda chore: bump version to 16.3.3 2026-07-03 00:57:22 +02:00
can1357 9e0b6cddf2 chore: bump version to 16.3.2 2026-07-02 17:50:38 +02:00
can1357 0ea6ea630b chore: bump version to 16.3.1 2026-07-02 09:00:04 +02:00
can1357 17552b9135 feat(utils): recovered unquoted bareword strings in json parser
- Added support for parsing unquoted bareword strings in object and array value positions.
- Implemented safety checks to prevent bareword recovery from masking structure, consuming non-finite atoms, or swallowing valid JSON delimiters.
- Included logic to preserve URL-style and Windows-style paths containing colons while rejecting invalid or ambiguous syntax.
2026-07-02 07:52:12 +02:00
can1357 36cfb54e92 chore: bump version to 16.3.0 2026-07-02 04:12:21 +02:00
can1357 3128eab271 chore: update changelogs 2026-07-02 03:08:59 +02:00
can1357 5dcf2ad197 chore: cleanup 2026-07-02 03:08:16 +02:00
can1357 d5b26b6b97 build(utils): relocated tls-fetch utility to the utilities package
- Extracted the `tls-fetch` implementation and tests from `@oh-my-pi/pi-ai` to `@oh-my-pi/pi-utils`.
- Exported the `wrapFetchForExtraCa` and `withExtraCaFetch` utilities publicly from `@oh-my-pi/pi-utils`.
- Introduced `ExtraCaError` to replace the AI-specific `ValidationError` for missing `NODE_EXTRA_CA_CERTS` paths.
- Updated imports in `packages/ai/src/stream.ts` to consume the relocated utility.
2026-07-02 01:51:09 +02:00
can1357 5356713eae chore: bump version to 16.2.13 2026-07-01 20:03:42 +02:00
can1357 fccc0ed3ce chore: bump version to 16.2.12 2026-07-01 05:29:19 +02:00