Commit Graph

468 Commits

Author SHA1 Message Date
can1357 eca3a08d25 chore: bump version to 15.5.9 2026-05-28 12:09:01 +02:00
can1357 6cc91fcb37 chore: bump version to 15.5.8 2026-05-28 10:37:49 +02:00
duiguangbin810 271a86eabb docs: fix stale links and add missing CHANGELOGs
- Fix typo "stauts" → "status" in stream.test.ts comment
- Update frontmatter.ts link to packages/utils/src/ (moved from coding-agent)
- Update notebook.ts link to src/edit/ (moved from src/tools/)
- Mark removed bash-normalize.ts in docs and update description
- Add CHANGELOG.md for swarm-extension and utils packages

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 13:54:56 +08:00
can1357 b4238b10d3 fix: resolved auth-gateway handling of 429 usage-limit responses
- Classified usage-limit gateway responses as `429 rate_limit_error` in auth handling paths.
- Aligned auth-gateway and pi-native key retrieval with derived `sessionId` for `getApiKey` lookups.
- Handled usage-limit auth failures by rotating credentials with retry hints and returning undefined when none available.
- Replaced stream auth checks with retryable-upstream logic for 401 and usage-limit errors before content.
- Expanded `extractRetryHint` parsing for `~`, `sec`, `ms`, and minute/hour units.
- Added coverage for classifyGatewayError, retry-hint parsing variants, and stream-auth retry edge cases.
2026-05-28 02:56:54 +02:00
can1357 b87cd8f93f chore: bump version to 15.5.7 2026-05-27 19:01:33 +02:00
can1357 bf92a3dd4d chore: bump version to 15.5.6 2026-05-27 15:04:44 +02:00
can1357 f0c7df60d5 chore: bump version to 15.5.5 2026-05-27 14:44:30 +02:00
can1357 6643178d6a refactor: replaced instanceof Promise checks with isPromise utility
- Imported isPromise from node:util/types in four modules.
- Replaced four instanceof Promise checks with isPromise calls for more reliable promise detection.
2026-05-27 13:02:52 +02:00
can1357 69ab1656ff chore: bump version to 15.5.4 2026-05-27 10:27:32 +02:00
can1357 280b638cc8 chore: bump version to 15.5.3 2026-05-27 03:20:33 +02:00
can1357 2ae57b85dc chore: bump version to 15.5.2 2026-05-27 00:46:37 +02:00
can1357 8d429e96fb chore: bump version to 15.5.1 2026-05-27 00:05:59 +02:00
can1357 f19469c96c chore: bump version to 15.5.0 2026-05-26 22:55:07 +02:00
can1357 8a32eceb53 fix(utils): clamped usage durations to suppress stale negative reset countdowns
- Clamped `formatDuration` to return `0ms` for non-positive, NaN, or infinite inputs.
- Updated usage report rendering to suppress reset countdowns when `resetsAt` is absent or no longer in the future.
- Added unit tests for `formatDuration` covering clamped values and standard duration formatting.
2026-05-26 20:22:25 +02:00
can1357 6899e0aaed chore: bump version to 15.4.3 2026-05-26 18:55:58 +02:00
can1357 38b7966894 chore: bump version to 15.4.2 2026-05-26 17:51:35 +02:00
can1357 774d32cc3f chore: bump version to 15.4.1 2026-05-26 16:53:12 +02:00
can1357 732dae7b11 chore: bump version to 15.4.0 2026-05-26 11:26:08 +02:00
can1357 82b3a83dd7 fix(utils): improved logger error serialization and transient error detection
- Added a custom JSON replacer that unwraps `Error` instances in logger output, preserving name, message, stack, cause, and enumerable fields.
- Updated uncaught-exception and unhandled-rejection logging paths to pass only `{ err }`, relying on the logger serializer for full error details.
- Extended transient socket-close matching to detect HTTP2 stream reset/refused/calm errors and added regression tests for logger error serialization behavior.
2026-05-26 08:07:08 +02:00
can1357 7acc631ce9 chore: bump version to 15.3.2 2026-05-25 20:30:37 +02:00
can1357 83b69ead9f test(ai): fixed SSE test structure and added keepalive parsing coverage
- Restructured the auth-broker `openSnapshotStream` tests to be top-level cases under the describe suite.
- Added a stream parser test asserting pure ": keepalive" lines are not included in subsequent SSE event raw output.
2026-05-25 20:29:30 +02:00
can1357 25cfee5bca fix(ai): validated auth-broker SSE stream responses and initial snapshot
- AuthBrokerClient now checked the response Content-Type and rejected non-SSE responses before parsing.
- It required the first parsed SSE event to be a snapshot and treated ended or truncated streams as errors.
- Added coverage for non-SSE and missing-initial-snapshot streams, and reset raw SSE state for empty events.
2026-05-25 20:28:58 +02:00
can1357 e2b86b8a41 chore: bump version to 15.3.1 2026-05-25 14:07:16 +02:00
can1357 45345f43b0 chore: bump version to 15.3.0 2026-05-25 12:56:19 +02:00
can1357 e6c08c1155 chore: bump version to 15.2.4 2026-05-22 17:48:11 +09:00
can1357 3ecfac846c chore: bump version to 15.2.3 2026-05-22 13:34:49 +09:00
can1357 1228c96959 feat(coding-agent): added worktree list/clear CLI with orphan pruning
- Added the new `omp worktree` (`wt`) command with `list|clear`, `all/dry-run/json` options, and CLI registration.
- Added `listWorktrees`/`clearWorktrees` flows that scan worktrees, classify orphaned entries, emit JSON, and call `worktree.prune`.
- Replaced legacy path encoding with `hashPath` via `getWorktreeDir`, updating task isolation, storage keys, and PR checkout paths.
- Added bounded PR worktree path retries before `git worktree add` and updated checkout-path tests for hashed names.
2026-05-22 12:47:13 +09:00
can1357 cf94ded9d3 chore: bump version to 15.2.2 2026-05-22 11:29:03 +09:00
can1357 3064bb9084 chore: bump version to 15.2.1 2026-05-21 17:15:11 +09:00
can1357 dbd3540a31 chore: bump version to 15.2.0 2026-05-21 15:58:02 +09:00
can1357 fe5b96e8a1 chore: bump version to 15.1.9 2026-05-21 13:24:41 +09:00
can1357 e6ddfc0a8e chore: bump version to 15.1.8 2026-05-20 17:49:07 +09:00
can1357 1521cb785b chore: bump version to 15.1.7 2026-05-19 19:27:28 +09:00
can1357 60e2befb35 chore: bump version to 15.1.6 2026-05-19 07:17:26 +02:00
can1357 7a63c5a621 chore: bump version to 15.1.5 2026-05-19 05:34:02 +02:00
can1357 3976e31ffd chore: bump version to 15.1.4 2026-05-19 04:48:55 +02:00
can1357 4b6be0b0df fix(utils): preserve Windows env names with parentheses
The Bun.env scrub and filterProcessEnv used isValidEnvName (strict shell
identifier shape), which deleted standard Windows variables like
ProgramFiles(x86) and CommonProgramFiles(x86). procmgr.ts imports this
module before resolving the shell and reads Bun.env['ProgramFiles(x86)']
to find Git Bash under 32-bit Program Files, so installations that only
had Git there were no longer discovered and failed with 'No bash shell
found'.

The unsafe cases for native execve are '=' or NUL in names and NUL in
values, not parentheses. Introduce isSafeEnvName covering exactly those
cases and use it for the in-place Bun.env scrub and the spawn-env
filter. Keep isValidEnvName (strict) for dotenv parsing, where strict
shell-identifier shape is the right contract.
2026-05-17 13:43:00 +02:00
Vilmos Nebehaj 98405e16de fix(utils): ignore unsafe dotenv entries 2026-05-17 13:43:00 +02:00
can1357 189b9a6d35 fix(ai): addressed stream auth retries by replaying start events after 401
- Buffered `start` events until after the first replay-unsafe event and replayed them on auth failure.
- Retried stream requests with refreshed credentials when `onAuthError` returned a new key for gateway and pi-native.
- Added 401 error-status parsing for assistant errors and updated stream-auth tests for start+401 retry behavior.
- Added `AuthRetryFailure` helpers and status extraction types to propagate auth-retry metadata through stream attempts.
2026-05-17 13:13:32 +02:00
can1357 407f9319d5 chore: bump version to 15.1.3 2026-05-17 05:45:51 +02:00
can1357 75f34d1815 feat(utils): added configurable logger transport switching for headless services
- Added a new `setTransports` logger API to swap console and file winston transports at runtime.
- Refactored logger transport creation to lazily build rotating file logs via a shared directory helper.
- Updated auth-broker serve startup/shutdown to use structured logger output and switch to console-only logs for its headless runtime.
2026-05-17 04:19:38 +02:00
can1357 cd981ae0e6 feat(utils): install ID generation 2026-05-17 01:31:16 +02:00
can1357 c3f5a60c22 feat(auth): added auth-broker for remote credential vault
- Added `AuthBrokerClient`, `RemoteAuthCredentialStore`, `AuthBrokerRefresher`, and `startAuthBroker` server in `packages/ai/src/auth-broker`.
- Renamed `AuthCredentialStore` class to `SqliteAuthCredentialStore`; extracted `AuthCredentialStore` as a persistence interface.
- Added `exportSnapshot`, `forceRefreshCredentialById`, `disableCredentialById`, and `upsertCredential` to `AuthStorage` for broker wire protocol.
- Added `omp auth-broker` CLI subcommand (serve, token, login, logout, import, status) and `discoverAuthStorage` broker-mode path keyed on `OMP_AUTH_BROKER_URL`.
2026-05-16 20:44:07 +02:00
can1357 39f34ada70 feat: added pure-JS sanitizeText
- Migrated sanitizeText from pi-natives to pi-utils as a pure-JS implementation, removing the native dependency across all call sites.
2026-05-16 20:12:26 +02:00
can1357 3e1b4107d3 chore: bump version to 15.1.2 2026-05-15 23:48:01 +02:00
can1357 37d4314f2d chore(config): organized publish type mapping from src to dist/types
- Added declaration-only compiler options to multiple package publish tsconfig files.
- Standardized publish include/exclude settings to emit types from src into dist/types.
- Added manifest rewrite helpers to remap type paths from ./src to ./dist/types/*.d.ts.
- Updated publish flow to append dist/types/extra files and skip publish build/rewrite for native packages.
2026-05-15 23:46:23 +02:00
can1357 7282d92bf4 fix: normalized line-ending handling for text and TUI output flows
- Unified line-ending normalization to `replace(/\r\n?/g, "\\n")` in editor, scraper, benchmark, and utils modules.
- Added terminal-aware line sanitization in code-cell rendering to collapse inline carriage returns and avoid overwrite corruption.
- Tightened editor and paste sanitizers to trim control characters consistently after CR normalization.
2026-05-15 23:46:23 +02:00
can1357 0bfea39f3c chore: bump version to 15.1.1 2026-05-15 21:22:43 +02:00
can1357 06aadd08f2 chore: bump version to 15.1.0 2026-05-15 19:16:17 +02:00
can1357 361a40dc43 refactor(coding-agent): replaced reverse/find usage with last-item array helpers
- Updated plan-mode and hindsight session state lookups to use Array.findLast for selecting the latest assistant or user message.
- Updated postmortem callback iteration to use Array.toReversed before mapping cleanup callbacks.
2026-05-15 14:46:54 +02:00