Commit Graph

527 Commits

Author SHA1 Message Date
can1357 57ae61ed8a chore: bump version to 15.10.10 2026-06-09 23:20:47 +02:00
can1357 7207929c72 chore: bump version to 15.10.9 2026-06-09 19:52:12 +02:00
can1357 74d4f00928 chore: bump version to 15.10.8 2026-06-09 05:06:04 +02:00
can1357 eb1a46baf5 feat: added injectable fetch transport across AI and coding network flows
- Added optional FetchImpl fields to compaction, proxy, AI, coding-agent, and mnemopi options.
- Threaded injected fetch implementations through OAuth, discovery, and search/LLM request flows.
- Removed exported hookFetch utility and its package entrypoint from utils.
- Replaced global-fetch test monkeypatching with per-test FetchImpl mocks across test suites.
2026-06-09 04:51:17 +02:00
can1357 1a2602ce92 chore: bump version to 15.10.7 2026-06-09 00:32:37 +02:00
can1357 7d2eb3c550 chore: bump version to 15.10.6 2026-06-08 22:39:20 +02:00
can1357 348ba44293 chore: bump version to 15.10.5 2026-06-08 19:11:24 +02:00
can1357 9d457f73d9 test: migrated test imports to package subpath exports
- Replaced relative `../src` imports with `@oh-my-pi/pi-ai` and `@oh-my-pi/pi-agent-core` subpaths.
2026-06-08 19:03:55 +02:00
can1357 98c91cfa99 chore: bump version to 15.10.4 2026-06-08 12:27:26 +02:00
can1357 246d7dd0ab chore: bump version to 15.10.3 2026-06-08 06:52:49 +02:00
can1357 f38af64430 chore: bump version to 15.10.2 2026-06-08 02:57:31 +02:00
can1357 84573a0d1a chore: bump version to 15.10.1 2026-06-07 09:18:25 +02:00
can1357 fe607cf22c chore: bump version to 15.10.0 2026-06-07 00:16:09 +02:00
can1357 4bf9a92b28 feat(utils): added module-load timing preload and DAG report
- Added Bun preload that records inclusive per-module windows and resolved static import edges via plugin hooks.
- Shared events through a dependency-free buffer so the preload and logger avoid importing each other.
- Rendered module spans as a body/TLA-ranked dependency tree, separating graph wait from top-level work.
- Back-folded captured load phase into the root window to shrink the opaque pre-instrumentation figure.
2026-06-06 22:48:57 +02:00
can1357 20d19e8002 test: replaced blind sleeps with shared fixtures and condition polling
- Shared immutable model registries and auth storage via beforeAll/afterAll.
- Swapped fixed-delay settle sleeps for predicate polling and signals.
- Stubbed network/timers to drop wall-clock waits in registry and history tests.
- Added resetDisplay invalidation tests and startup-timing breakdown lines.
2026-06-06 22:09:04 +02:00
can1357 a7f5e83067 chore: bump version to 15.9.69 2026-06-06 20:13:59 +02:00
can1357 b65d173dcd chore: bump version to 15.9.67 2026-06-06 16:03:53 +02:00
can1357 d9f5a8c7ac chore: bump version to 15.9.5 2026-06-06 01:14:48 +02:00
can1357 388deb1c14 chore: bump version to 15.9.4 2026-06-05 21:59:43 +02:00
can1357 529a9dd351 chore: bump version to 15.9.3 2026-06-05 16:36:02 +02:00
can1357 241a42350c chore: bump version to 15.9.2 2026-06-05 13:27:40 +02:00
can1357 b8a602ac2a test(auth): switched OAuth ranking tests to weighted selection
- Replaced top-rank assertions with weighted-preference distribution checks.
- Added cases for equal-priority balancing and 2x best-bucket cap.
- Added coding-agent snapshot-cache boot and seed tests.
2026-06-05 11:15:32 +02:00
can1357 5004ba057f feat(auth-broker): added encrypted local snapshot cache
- Added AES-GCM cache for at-rest broker snapshots keyed on token, with URL as additional data.
- Added `onSnapshot` hook to RemoteAuthCredentialStore for persisting applied snapshots.
- Exposed cache read/write and TTL defaults through the coding-agent re-exports.
- Added `getAuthBrokerSnapshotCachePath` with `OMP_AUTH_BROKER_SNAPSHOT_CACHE` override.
2026-06-05 11:09:47 +02:00
can1357 9da448f01d chore: bump version to 15.9.1 2026-06-04 18:46:52 +02:00
can1357 52b3d90400 Merge remote-tracking branch 'origin/farm/87e6f6ee/fix-edit-renderer-enametoolong' 2026-06-04 18:35:39 +02:00
can1357 c4c2e43f35 chore: reformat 2026-06-04 18:33:36 +02:00
roboomp 9e3173da4e fix(utils): normalized paths before indentation length guard
- Moved the overlong-component guard to run after resolveFilePath so syntactically noisy but valid paths like long/../src/file.ts still honor editorconfig rules.
- Added a regression test that proves normalized paths with an eliminated overlong component resolve the configured tab width.

Fixes #1872
2026-06-04 16:32:02 +00:00
can1357 0ddc5b3804 Merge remote-tracking branch 'origin/farm/87e6f6ee/fix-edit-renderer-enametoolong' into main2 2026-06-04 18:31:05 +02:00
roboomp a27e0add5f fix(utils): made editorconfig discovery resilient to malformed paths
- Tightened parseCachedEditorConfig to absorb any FsError, not just
  ENOENT. Editorconfig lookup is best-effort indentation hinting; an
  unreadable .editorconfig (ENAMETOOLONG, ENOTDIR, EACCES, ELOOP,
  EINVAL, …) means "no usable config here", not a fatal condition for
  callers like the edit renderer.
- Added a path-component length gate (NAME_MAX = 255 bytes) in
  getIndentation that short-circuits to the default tab width before
  any syscall. Renderers can hand arbitrary strings into replaceTabs
  (e.g. a malformed edit tool call whose file_path is gibberish);
  attempting to open <dir>/.editorconfig for a 500-byte component
  would otherwise crash the TUI with an uncaught ENAMETOOLONG.
- Added regression tests covering both safety nets.

Fixes #1872
2026-06-04 16:27:55 +00:00
roboomp 72f41f333e fix(utils): swallow editorconfig probe errors to keep TUI rendering safe
parseCachedEditorConfig caught only ENOENT, so an oversized path segment
(e.g. a 2KiB garbage string emitted by a hallucinating model) blew up
the renderer with an uncaught ENAMETOOLONG from fs.readFileSync. The
editorconfig probe is best-effort — there is no useful difference
between 'file missing' and 'open() refused for any other reason' from
the renderer's perspective. Catch every error, cache the miss so we do
not re-probe the same bogus path on every redraw, and add a regression
test that exercises the 2KiB-segment path through getIndentation.

Fixes #1871
2026-06-04 16:24:59 +00:00
can1357 17a39ebd3a chore: bump version to 15.9.0 2026-06-04 05:41:53 +02:00
Can Bölük a6997b1b7f Merge branch 'main' into fix/session-accent-light-contrast 2026-06-04 06:28:21 +03:00
can1357 1379772628 refactor(utils): consolidate color utilities into pi-utils
Move the color math added for the session-accent fix into the shared
@oh-my-pi/pi-utils color module instead of a coding-agent-local file:

- colorLuma, relativeLuminance, and hslToHex now live in
  packages/utils/src/color.ts (hslToHex lifted out of session-color.ts).
- Drop the duplicate hex parser: toRgb reuses the existing hexToRgb and
  paletteToRgb returns the shared RGB type, so hex parsing lives once.
- Delete packages/coding-agent/src/utils/color.ts; theme.ts and
  session-color.ts import from @oh-my-pi/pi-utils.
- Move the color unit test into the utils package; repoint session-color
  test imports.

No behavior change to accent luminance capping.
2026-06-04 05:27:11 +02:00
can1357 5e17edf1ec refactor(coding-agent): restructured session text slicing to use unified head/tail reads
- Replaced SessionStorage readTextPrefix/readTextSuffix with readTextSlices.
- Added peekFileEnds utility to read bounded file head/tail in one handle.
- Updated session-manager list/recent reads to consume unified head/tail slices.
- Expanded storage tests for head/tail and UTF-8-boundary slice extraction.
2026-06-04 02:07:34 +02:00
can1357 e6716d086d feat(coding-agent): added lifecycle status to session picker
- Classified each session's final message as done, interrupted, aborted, error, or pending from a 32 KiB tail read.
- Rendered the status as a colored segment on the session metadata line.
- Added `peekFileTail` and `readTextSuffix` across storage backends to read file tails in one pass.
- Simplified `MemorySessionStorage` to a string array mirror with a sidecar mtime map.
2026-06-04 01:58:25 +02:00
can1357 f967f9d789 chore: bump version to 15.8.3 2026-06-03 16:37:19 +02:00
can1357 139a995d84 chore: bump version to 15.8.2 2026-06-03 12:11:46 +02:00
can1357 ecc5a6d5d5 chore: bump version to 15.8.1 2026-06-02 18:15:17 +02:00
can1357 e214b92240 chore: bump version to 15.8.0 2026-06-02 11:17:17 +02:00
can1357 cfea72f0f2 chore: bump version to 15.7.6 2026-06-01 19:24:27 +02:00
can1357 da58949320 chore: bump version to 15.7.5 2026-06-01 15:04:12 +02:00
can1357 38fcd53d64 chore: bump version to 15.7.4 2026-05-31 17:08:17 +02:00
can1357 20c019fccb refactor(cli): moved MallocStackLogging cleanup to cli entrypoint
- Removed env var deletion from utils/dirs.ts (wrong layer).
- Placed it in the CLI entrypoint so it runs before any subprocess inherits the env.
2026-05-31 16:57:22 +02:00
can1357 a043826723 chore: bump version to 15.7.3 2026-05-31 12:30:20 +02:00
can1357 ad15d80031 fix(mnemosyne): corrected vector-math cosineSimilarity for bad values
- Consolidated `cosineSimilarity` in `vector-math`, removed duplicate local impls, and treated mismatch/non-finite as zero.
- Switched beam, query-cache, recall, shmr, and binary-vectors to consume shared `cosineSimilarity` from `vector-math`.
- Changed embeddings to parse `$env/$flag`, return `Float32Array`, lazily import model deps, and retry via `fetchWithRetry`.
- Added `@oh-my-pi/pi-utils` and replaced hardcoded FastEmbed cache paths with `getFastembedCacheDir`.
- Expanded truthy parsing for lowercase `y`, `true`, `yes`, and `on`, then updated optional-embedding tests for cache behavior.
- Updated binary-vectors and optional-embedding tests for NaN-safe cosine, `Float32Array`, and cache-dir expectations.
2026-05-31 05:24:52 +02:00
can1357 570b439b31 chore: enabled parallel Bun test runs across package scripts
- Updated each package's test script to run `bun test` with the `--parallel` flag.
- Updated the tui package test command to preserve its `test/*.test.ts` file filter while enabling parallel execution.
2026-05-31 05:24:51 +02:00
can1357 f9f213e53e chore: bump version to 15.7.2 2026-05-31 03:46:17 +02:00
can1357 73de3bf926 chore: bump version to 15.7.1 2026-05-31 02:50:54 +02:00
can1357 e72fe367e5 chore: bump version to 15.7.0 2026-05-31 02:17:33 +02:00
can1357 0986a9e605 refactor(dirs): moved malloc env scrubbing into dirs module import
- Removed `scrubProcessEnv` from procmgr and its explicit call in cli.ts.
- Scrubbing now happens automatically when `dirs.ts` is imported, eliminating the need for a manual call at startup.
2026-05-30 22:26:52 +02:00