Commit Graph

1000 Commits

Author SHA1 Message Date
chan1103 dc0e2ebeed fix(utils): stop indented code interrupting paragraphs in marked lexer 2026-08-14 22:48:39 +09:00
can1357 ffd53ff92a chore: bump version to 17.3.4 2026-08-14 14:38:16 +02:00
can1357 039728ad80 chore: bump version to 17.3.3 2026-08-14 05:44:05 +02:00
can1357 ae2d3d6ea1 chore: bump version to 17.3.2 2026-08-14 00:28:43 +02:00
roboomp 5a0b2d460d fix(utils): normalized aborts during retry backoff
Route both fetchWithRetry backoff paths through one abort-normalizing wait helper and cover response and network retry cancellation.

Fixes #8450
2026-08-14 00:02:14 +02:00
can1357 0bc2c342f4 chore: bump version to 17.3.1 2026-08-13 19:39:21 +02:00
can1357 b279db1790 test: refactored test suites to eliminate time-based sleeps and polling loops
- Replaced time-based sleeps and polling loops with event-driven promise resolvers and fake timers across agent and tool tests.
- Migrated test suites to share in-memory auth storage and fixtures using lifecycle hooks.
- Updated catalog model definitions, metadata, and configurations.
2026-08-13 19:32:22 +02:00
can1357 8b0f400d3c chore: bump version to 17.3.0 2026-08-13 08:28:43 +02:00
can1357 fc1fd664b9 chore(changelog): rewritten 2026-08-13 05:51:01 +02:00
can1357 3cbb615630 chore: normalized changelog entries after merging open pull requests 2026-08-13 01:23:13 +02:00
can1357 157690aeb6 Merge PR #8101: fix(utils): mask routed lines beneath edge labels (@roboomp)
# Conflicts:
#	packages/utils/test/mermaid-ascii.test.ts
2026-08-13 01:15:29 +02:00
can1357 4658662c35 fix(write): keep streaming preview append checks bounded 2026-08-13 01:14:46 +02:00
can1357 9c311d7a7b Merge PR #8040: fix(tui,utils): remove O(N²) hot paths when streaming long tool-call args (@AmecoCoding) 2026-08-13 01:14:45 +02:00
can1357 5481d8b9b0 chore: bump version to 17.2.15 2026-08-12 03:26:12 +02:00
can1357 92098d60ec chore: rewrote changelog 2026-08-12 03:25:42 +02:00
can1357 037bfc5204 Merge PR #8268: fix(mcp): send MCP-Protocol-Version header and negotiate 2025-11-25 (@roboomp) 2026-08-12 01:53:44 +02:00
can1357 e5ebb2aee0 chore: bump version to 17.2.14 2026-08-11 20:43:02 +02:00
roboomp eaa5f46d32 fix(mcp): resumed interrupted HTTP response streams
Implemented 2025-11-25 Streamable HTTP polling semantics for POST SSE responses: retain event IDs and retry intervals, wait as instructed, and reconnect with GET plus Last-Event-ID until the originating JSON-RPC response arrives.

Extended the shared SSE parser to expose valid id/retry fields and control-only events so reconnecting consumers do not need to reparse raw lines.

Fixes #8264
2026-08-11 18:21:12 +00:00
can1357 2157becbe9 chore: bump version to 17.2.13 2026-08-11 16:03:05 +02:00
can1357 b524dfe36f refactor: standardized outbound User-Agent headers on shared utility constant
- Define a centralized `USER_AGENT` constant in `@oh-my-pi/pi-utils` formatted as `omp/<version>`.
- Replace hardcoded and platform-specific user agent strings across AI providers, catalog scrapers, tools, and search providers with the unified `USER_AGENT`.
- Add unit tests for update-cli binary release distribution gating.
2026-08-11 15:38:32 +02:00
can1357 8bd621f118 chore(changelog): promoted merged entries back to unreleased 2026-08-11 15:12:36 +02:00
can1357 4cea411ec1 fix(utils): moved log retention changelog to unreleased 2026-08-11 15:07:43 +02:00
can1357 978db72a46 Merge PR #7120: fix(utils): retain one rolled log per process day (@wolfiesch) 2026-08-11 15:07:43 +02:00
can1357 164edcb466 chore: removed stray blank line 2026-08-11 15:06:16 +02:00
Shawn Koh cfbd567628 fix: preserve punctuation label colors 2026-08-11 01:19:54 +08:00
Shawn Koh e658d9f7be fix: address Mermaid rendering review 2026-08-11 01:14:29 +08:00
Shawn Koh a42868f550 fix: make terminal state diagrams readable 2026-08-11 01:00:35 +08:00
Wolfie dca28eee66 fix(utils): retain one rolled log per process day 2026-08-09 23:19:52 -07:00
roboomp 5d92336e19 fix(utils): masked routed lines beneath edge labels
Added opaque label-space cells so Mermaid ASCII edge labels erase routed paths while preserving spaces during serialization.

Added horizontal and vertical regression coverage.

Fixes #8098
2026-08-09 19:03:32 +00:00
lee 9e87d432bd fix(tui,utils): remove O(N^2) hot paths when streaming long tool-call args
Long write/edit streams made the TUI stutter or freeze for seconds at a
time (ui.loop-blocked warnings, keystrokes starving while the single JS
thread rebuilt previews). Two compounding quadratic paths:

1. parseStreamingJsonThrottled re-parsed the entire accumulated args
   buffer on a FIXED 256-byte cadence. The comment claimed this bounded
   mid-stream work to O(N), but a constant growth gate still parses an
   N-byte buffer N/256 times at O(N) each: O(N^2) with a smaller
   constant. The gate now scales geometrically (max(256, len/32)), so
   parse points form a geometric progression: O(log N) parses, O(N log N)
   total, with mid-stream snapshots staying within ~3% of the stream.
   Small buffers keep the exact fixed cadence as before.

2. write.ts formatStreamingContent normalized + split('\n') the WHOLE
   accumulated content on every 30Hz reveal tick (renderCall also ran a
   full-payload normalize first): O(N) per tick, O(N^2) per stream, per
   concurrent writer. The collapsed tail-window path now tracks the
   newline count incrementally (append-only resume keyed on the
   component's persistent render-state object via WeakMap) and extracts
   only the tail window with a backward scan: O(delta + preview lines)
   per tick, byte-identical output to the split-based reference. The
   expanded (Ctrl+O) path is unchanged in output and skips its
   split+join round-trip.

Tests: geometric-gate bounds + freshness + small-buffer cadence in
parse-streaming-json-throttled.test.ts; append-growth/reference-
window/CRLF/trailing-newline/restart battery in
write-streaming-incremental.test.ts. Full write/tool-render battery
(56 tests) and ai streaming-args tests (117 tests) pass.
2026-08-08 22:32:26 +01:00
can1357 6fb07028fd chore: bump version to 17.2.12 2026-08-08 20:57:55 +02:00
can1357 055a5d4f26 chore: bump version to 17.2.11 2026-08-07 23:38:40 +02:00
can1357 34af136c6a test(utils): dropped flaky concurrent logger rotation test
- The two-child fs.watch/poll choreography deadlocked under parallel test load
  (runner killed a dangling probe); the PID-namespace pruning test still covers
  the multiprocess audit/rotation file contract.
2026-08-07 23:38:26 +02:00
can1357 a9dcf0f8d1 chore: update changelogs 2026-08-07 23:38:26 +02:00
can1357 850225a694 style: applied biome formatting after community fix merges 2026-08-07 13:40:52 +02:00
can1357 bd6e87b297 feat(utils): added repair and rawKeys options to parseFrontmatter
- repair: false disables lenient recovery (ambiguous-scalar quoting, tab
  replacement, leading HTML-comment stripping) so spec-conformant loaders
  reject malformed input instead of silently repairing it.
- rawKeys: true preserves frontmatter keys verbatim; exported
  normalizeFrontmatterKeys for callers that validate raw keys first.
2026-08-07 05:59:19 +02:00
can1357 3a8591a8af test: hardened two ci-flaky timing tests
- mnemopi provider parity 'diagnose, validate, graph' does ~6.7s of real
  work under bun --parallel=8 on loaded runners; raised its per-test
  timeout to 30s (default 5s flaked twice in three CI runs).
- utils LRUCache updateAgeOnGet drove a 30ms TTL with real 20ms sleeps
  (10ms margin); now drives performance.now() via a mocked clock, so the
  contract is asserted deterministically with no wall-clock wait.
2026-08-06 14:48:57 +02:00
can1357 6e40e3e9fd fix(utils/marked): closed lists at an end-of-input blank run
- A blank run at EOF now breaks the list without consuming the blank,
  matching real marked: '- item\n\n' lexes as a tight list plus a space
  token instead of a loose list whose raw includes the blank.
- Completes the 17.2.10 mid-document fix; same-marker continuation and
  indented item content across blanks are unaffected.
- Added list/blank boundary token-shape tests (verified against marked
  v15) since the tui incremental tests compare the lexer to itself.
2026-08-06 14:40:13 +02:00
can1357 d4ac069053 docs(utils): noted marked list tokenizer and template lookup fixes 2026-08-06 14:18:33 +02:00
can1357 0992c9314f fix(utils/template): added handlebars lookup builtin
- {{lookup obj key}} resolves proto-safe obj[key] like Handlebars'
  built-in; a user-registered lookup helper still takes precedence.
- Restores slash-command/prompt-template arg consumption via
  {{default (lookup . "arguments") "none"}}.
2026-08-06 14:18:32 +02:00
can1357 ef39946bfe fix(utils/marked): kept list-trailing blank line out of the list token
- A blank line before a non-continuing top-level line (including plain
  paragraphs) now closes the list without consuming the blank, so it
  always lexes as a separate space token like real marked.
- List token shape no longer depends on the follower's block type,
  restoring the TUI streaming lexer's freeze invariant (lex(prefix) ++
  lex(tail) == lex(full) under append-only growth).
- A list followed by a paragraph is now tight, not loose, per CommonMark.
2026-08-06 14:18:32 +02:00
can1357 43c1b245e7 chore: bump version to 17.2.10 2026-08-06 13:32:34 +02:00
can1357 dedd4449c9 refactor(utils/marked): removed biome lint ignore comment from generic token interface
- Removed the biome-ignore lint comment for explicit any on the Generic token interface.
2026-08-06 13:32:15 +02:00
can1357 9e738dc880 chore: reformat + rewrite changelogs 2026-08-06 13:30:08 +02:00
can1357 0b0e7dd530 chore: normalized changelogs after merging 20 pull requests 2026-08-05 21:50:46 +02:00
can1357 6c84c3e8fc Merge PR #7691: fix(utils): support PowerShell as custom shellPath (@metaphorics) 2026-08-05 21:50:25 +02:00
can1357 e9888367d1 refactor: migrated packages to internal utility modules and removed external dependencies
- Implemented in-house, zero-dependency utility modules in `pi-utils` covering DOM manipulation, markdown parsing, templating, browser automation helpers, and terminal buffers.
- Migrated packages across the repository to consume the new internal utilities and `omptype` schema validators instead of external dependencies.
- Removed multiple external runtime and development dependencies including Zod, Marked, LRU cache, Turndown, and Puppeteer browser packages.
2026-08-05 13:39:09 +02:00
metaphorics b86f788ae7 fix(utils): support PowerShell as custom shellPath 2026-08-05 10:24:35 +00:00
brymko 01ed58d684 docs(utils): documented fatal recovery hint contract 2026-08-05 14:31:03 +08:00
brymko 56931915f1 feat(coding-agent): added fatal session recovery hints
Registered live session resume commands with postmortem handling so a
fatal rejection or exception identifies every recoverable agent before
cleanup. Escaped terminal control characters in recovery output.
2026-08-05 14:31:03 +08:00