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
- 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.
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
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- Added preprocessing to quote ambiguous plain scalars containing a colon-space sequence when standard YAML parsing fails.
- Preserves the parsed types of unaffected fields and prevents fallback warnings for common unquoted description strings.
- Added tests to verify successful recovery of unquoted values and continued fallback warning coverage for unrecoverable syntax.
- Restored the fetchWithRetry early return for Retry-After and quota hints larger than maxDelayMs.
- Added coverage so oversized provider retry hints do not sleep and retry internally.
- Introduced `isProbablyBinary` utility to sniff file headers for NUL bytes or invalid UTF-8 sequences.
- Updated `ReadTool` to use the binary sniffer, preventing mojibake corruption in output when reading non-text files.
- Refined `file-mentions` auto-reads to skip binary files and mark them as `binary` in the message transcript.
- Added comprehensive unit tests for binary detection logic, covering NUL bytes, truncated multibyte characters, and path-based file sniffing.
Rejoined split Windows extension module paths before launch parsing finishes and stripped extended-length Win32 prefixes before Bun import and worker spawn APIs see them.
Fixes#3804