Commit Graph

10197 Commits

Author SHA1 Message Date
can1357 370045b310 fix(sdk): always await in-flight runtime discovery in deferred --model retry
The getDiscoverableProviders() guard skipped awaiting runtimeDiscoveryPromise
when no config-discovery providers exist, so a cold deferred selector backed
only by runtime model managers (extension fetchDynamicModels) with implicit
local discovery disabled still resolved against the offline cache. Awaiting
unconditionally is free when no runtime managers are registered
(refreshRuntimeProviders early-returns); the full refresh fallback stays
gated on discoverable providers.
2026-07-23 11:37:11 +02:00
can1357 e581452c04 Merge PR #6355: fix(rpc): await background model discovery in get_available_models, set_model, and deferred --model resolution (@ReqX) 2026-07-23 11:37:11 +02:00
can1357 e488d09751 fix(coding-agent): keep failed tails visible in read-only session history
Route loadSessionMessagesReadOnly through transcript mode (collapsed to the
latest compaction) so history:// transcripts of on-disk sessions retain
failed/aborted assistant tails that the provider-context builder now drops.
2026-07-23 11:37:10 +02:00
can1357 6fe0cc99bc Merge PR #6357: fix(coding-agent): guard session context replay tail (@honsunrise) 2026-07-23 11:37:10 +02:00
can1357 b184b22fef Merge PR #6358: feat(ai): add Synthetic usage reporting (@Gareth-Rouse) 2026-07-23 11:37:10 +02:00
can1357 ebddcc3839 Merge PR #6360: feat(task): allow per-call model selection (@panosAthDBX) 2026-07-23 11:37:10 +02:00
can1357 b4a3abe445 feat: added hasProvider method to detect known model providers
- Implemented ModelRegistry.hasProvider to return true when a provider has live models, is discoverable, or is registered at runtime.
- Replaced AgentSession's internal provider check with #isKnownProvider that delegates to the new hasProvider method, updating related fallback logic.
2026-07-23 11:17:00 +02:00
panosAthDBX bfef3f7eea fix(task): reject sparse model fallback arrays 2026-07-23 09:53:54 +01:00
panosAthDBX 10e1ba911c test(task): cover model override precedence 2026-07-23 09:50:25 +01:00
ReqX 838e37417f fix(rpc): await background model discovery in get_available_models, set_model, and deferred --model resolution
Three read paths raced background model discovery on cold start:

1. `get_available_models` RPC (rpc-mode.ts) read the registry
   synchronously and returned a partial catalog containing only
   statically-bundled models.
2. `set_model` RPC (rpc-mode.ts) read the registry synchronously and
   rejected discovery-backed selectors with "Model not found".
3. `--model <provider>/<pattern>` CLI flag deferred retry (sdk.ts:2078)
   resolved synchronously after extension registration, before
   discovery-backed providers had populated `#models`.

Paths 1 and 2 are fixed by exposing the existing in-flight background
refresh promise (`#backgroundRefresh`, already tracked and cleared by
`refreshInBackground`) via a new public
`ModelRegistry.awaitBackgroundRefresh()` method, and awaiting it at each
RPC read site. No-op when no refresh is in flight (warm sessions
unaffected).

Path 3 mirrors the cold-cache race fix already applied to the
default-role fallback on this branch (issues #6114, #6162, sdk.ts:2343):
when a deferred pattern is unresolved and any discoverable provider is
registered, run a cache-aware `refresh("online-if-uncached")` pass
before the retry. Reuses the existing discovery machinery rather than
introducing a new ordering dependency.

The `omp models` CLI never had this bug because it awaits
`modelRegistry.refresh()` directly before listing.

Behavioral characteristics:
- **Warm-session fast path preserved**: when no refresh is in flight
  (`#backgroundRefresh === undefined`), `await undefined` resolves in a
  microtask. No regression for sessions that don't need discovery or
  have already settled.
- **Failure isolation preserved**: `refreshInBackground()` already
  swallows discovery errors via `.catch(...)`, so `awaitBackgroundRefresh()`
  resolves even when discovery fails — callers then read whatever models
  made it into `#models` (built-in + cached). No new failure modes.
- **Scoped**: doesn't change `refreshInBackground()` semantics. Adds a
  new read-only awaiter with minimal API surface. Reuses the
  well-established `refresh("online-if-uncached")` pattern for the
  deferred retry path.

Reproduction (get_available_models RPC, with any discovery-backed
provider configured in `~/.omp/agent/models.yaml`):

  cd ~
  {
    sleep 1
    printf '%s\n' '{"id":"m1","type":"get_available_models"}'
    sleep 5
  } | timeout 15 omp --mode rpc-ui --approval-mode yolo 2>/dev/null \
    | grep '"id":"m1"' | jq '.data.models | {count: length, providers: ([.[].provider]|unique)}'

Before: discovery-backed provider absent from the response on cold start.
After:  discovery-backed provider present.

Reproduction (--model CLI flag, same config):

  omp --mode rpc-ui --model <discovery-provider>/<model-id> --approval-mode yolo

Before: exits 1 with "Model \"<discovery-provider>/<model-id>\" not found".
After:  starts rpc-ui session with the requested model selected.
2026-07-23 08:46:31 +00:00
panosAthDBX 1c8d9db6dd feat(task): allow per-call model selection 2026-07-23 09:42:39 +01:00
Honsun Zhu 6fae89aaea fix(coding-agent): guard session context replay tail 2026-07-23 16:38:22 +08:00
Gareth-Rouse e2839d1288 feat(ai): added Synthetic usage provider
/usage and omp usage now report Synthetic (synthetic.new) quota state
via GET /v2/quotas (free, does not consume quota): the rolling 5-hour
request limit with per-tick regeneration rate, and the weekly credit
quota in USD. Applies to API-key credentials for the synthetic
provider; every payload section is parsed defensively since only
subscription is documented.
2026-07-23 08:46:18 +01:00
can1357 7504d4c24d fix(coding-agent): kept setup wizard selection visible on short terminals
- Provider sign-in, theme, and web-search lists now shrink their visible row window to fit available height.
- Decorative chrome (sign-in hint, theme mock preview) yields to the list when space is tight.
- SelectList and OAuthSelector expose `setMaxVisible`/`setMaxHeight` so hosts can refit lists after construction.
2026-07-23 03:36:20 +02:00
can1357 3f38358c6e test(mcp): polled full post-condition for deferred xdev mount
- The xd registry reconciles before the async prompt rebuild while the
  active tool swap lands after it; polling the mount alone raced the
  write-transport activation on slow runners.
2026-07-23 01:59:06 +02:00
can1357 52ad6516ef feat(diff): implemented native UTF-16 diff processing and removed jsdiff
- Implemented native UTF-16 text processing in Rust diff module with support for unpaired surrogates.
- Removed `similar` crate from Rust workspace and `diff` npm package from coding-agent, hashline, and natives.
- Removed jsdiff fallback wrappers and `isWellFormed()` guards from TypeScript diff implementations.
- Added comprehensive test suite for native diff functions covering random inputs and edge cases including surrogates and emoji.
- Renamed model `codex-auto-review` to `gpt-5.3-codex-spark` with updated pricing and context window.
2026-07-23 01:35:31 +02:00
can1357 2f5a67694a test(dap): made tcp transport tests deterministic
- Replaced the subprocess-based delayed-banner test with in-process
  tests of the exported waitForTcpServerListening gate (banner split
  across chunks, stdout end without banner).
- Dropped wall-clock elapsed assertions from the ghost-socket tests;
  the connection-closed rejection message already distinguishes the
  wake path from a request timeout.
2026-07-23 01:22:24 +02:00
can1357 9b54d9e9ac chore: bump version to 17.0.8 2026-07-23 00:41:54 +02:00
can1357 fc6256372d test: fix local-midnight logger flake and stale kimi k3 thinking format pin
- logger-multiprocess asserted the UTC day (toISOString) while DailyRotateFile names files with the LOCAL date, failing nightly between 00:00 and 02:00 local (UTC+2); the per-pid rotation-file invariant now matches any dated name.
- kimi-code k3 bundled compat moved to thinkingFormat 'kimi' with the catalog regen; the K3 named-tool-choice downgrade gate keys on provider/id/baseUrl, so only the stale precondition needed updating.
2026-07-23 00:13:14 +02:00
can1357 b6e68fd243 fix(coding-agent): updated mentions of explore -> scout 2026-07-23 00:12:07 +02:00
can1357 7d404686c2 chore: updated changelogs + remove summarization marker 2026-07-22 23:59:32 +02:00
can1357 242bcbef8c revert #6130: doesn't really work well 2026-07-22 23:54:15 +02:00
can1357 59877a01bd fix(update): fetch musl release asset on musl hosts and align musl release test
- omp update's getBinaryName now detects a musl Linux host (Alpine release file or /lib/ld-musl-* loader, mirroring scripts/install.sh) and downloads omp-linux-musl-<arch>, so self-update no longer replaces a musl install with the glibc build.
- Updated musl-release dry-run assertions to the Bun.build output format the binaries script now emits; promoted the musl changelog entry to [Unreleased].
2026-07-22 23:12:24 +02:00
can1357 6a517cfbbc Merge farm/b12a11bd: feat(release): add musl-linked linux builds
# Conflicts:
#	package.json
2026-07-22 23:08:42 +02:00
can1357 e4de9509c7 test: adapt catalog-pinned tests to regenerated model catalog
- Repointed tests off removed gpt-5.2/5.3 codex variants and devin models (e06ac0b787): context-promotion and TTSR tests pin gpt-5.5 -> gpt-5.6-sol via per-test modelOverrides since no bundled codex model has a runtime-effective promotion target anymore; replay-boundary and history-payload suites use gpt-5.5; advisor quota fallback uses devin/swe-1-6-slow with suffix-less selectors per #4579 devin-agent semantics; gateway-reference pins kilo/giga-potato and now asserts the reference carries effortRouting so the cross-provider no-inherit contract stays meaningful.
- Verified cross-provider gateway references do not inherit wire routing after variant collapse (identity/reference.ts:145-154) - stale test, no product bug.
2026-07-22 22:26:10 +02:00
can1357 0002905ec5 chore: untrack node_modules symlinks and harden ignore pattern
- An eval-worktree cherry-pick swept 16 packages/*/node_modules symlinks into the index; 'node_modules/' with a trailing slash only matches directories, so symlinked installs bypassed the ignore. Dropped the slash and removed the tracked links.
2026-07-22 21:43:22 +02:00
can1357 08a0af909c fix(session): keep content-less overflow rejections out of persisted terminal error turns
- #6253's dead-end persist now skips context-overflow errors so the auto-compaction progress guard's contract (live-UI-only overflow rejections) still holds; non-overflow terminal provider errors keep persisting per #6249/#6250.
2026-07-22 21:40:05 +02:00
can1357 58a2acd330 test(coding-agent): align ctx fixtures with settled-component cache and todo commit-on-execute
- Added transcriptMessageComponents to every InteractiveMode ctx test literal; #6033's reuse cache made the field required and addMessageToChat populates it unconditionally.
- Wired setTodoPhases into the eager-todo ToolSession fixture to mirror sdk.ts; the test relied on the stale message_end todo replay #6148 removed.
2026-07-22 21:32:12 +02:00
can1357 8a9aa0342d chore: format evaluator fix commits and suppress intentional DAP placeholder lint 2026-07-22 21:16:38 +02:00
can1357 1b7dc1c3f6 docs: normalize changelog entries under [Unreleased]
- Promoted union-merge strays back under [Unreleased] and merged duplicate headings across ai, catalog, coding-agent, natives, and tui changelogs (scripts/fix-changelogs.ts --since 7b141199d5).
- Restored the pi-ai changelog entry for #6139 that its fix commit missed.
2026-07-22 21:14:15 +02:00
can1357 61989b1845 test(sdk): cover discovery-only local provider default resolution
- Adopted the regression tests from #6228 (@roboomp) on top of the #6233 fix, which supersedes it; both LM Studio cold-cache cases pass against the merged resolver.
2026-07-22 21:13:38 +02:00
can1357 9a0a154e53 Merge PR #6279: perf(coding-agent): compute edit and word diffs natively (@wolfiesch) 2026-07-22 21:13:23 +02:00
can1357 b39b49a2c4 docs(coding-agent): fix grammar in resolveSpawnItems doc comment 2026-07-22 21:13:23 +02:00
can1357 9c6c53435b Merge PR #6130: feat(coding-agent): add capture-only apply control to the task tool (@korri123) 2026-07-22 21:13:23 +02:00
can1357 741aaa301d Merge PR #5895: feat(tui): allow re-answering a past ask from the session tree (@Mathews-Tom) 2026-07-22 21:13:23 +02:00
can1357 d3bc8d19d1 Merge PR #6223: docs: correct /advisor as session-scoped, not persisted (@roboomp) 2026-07-22 21:13:23 +02:00
can1357 9720c091ff Merge PR #6235: fix(coding-agent): show changelog in standalone binaries (@roboomp) 2026-07-22 21:13:22 +02:00
can1357 17a571472e Merge PR #6182: fix(coding-agent): avoid stack overflow in deeply nested HTML exports (@jiwangyihao) 2026-07-22 21:13:22 +02:00
can1357 9c54d25a4e Merge PR #6298: fix(cli): dispose model-listing extensions (@roboomp) 2026-07-22 21:13:22 +02:00
can1357 8ac9d121c6 Merge PR #6212: fix(dap): close tcp connect race and wake pending requests on transport end (@roboomp) 2026-07-22 21:13:22 +02:00
can1357 a07d72f638 fix(git): report missing cwd distinctly from missing git binary
A deleted/nonexistent cwd also makes Bun.spawn throw ENOENT; only claim
'git is not installed.' when the working directory actually exists, else
name the missing directory. Addresses the Codex P2 review on #6237.
2026-07-22 21:13:21 +02:00
can1357 a4bd7a4df3 Merge PR #6237: fix(git): degrade gracefully when git binary is missing (@roboomp) 2026-07-22 21:13:21 +02:00
can1357 b9072f1991 fix(extensibility): validate Type.Unsafe against the draft-2020-12 upgraded schema
Aligns the shim's runtime safeParse/__validator with the wire/tool-call
path, so legacy draft-07 documents (tuple items) accept the same values
validateToolArguments does. Adds a regression test.
2026-07-22 21:13:21 +02:00
can1357 d6cbf9a6aa Merge PR #6241: fix(extensibility): add Type.Unsafe to typebox shim (@roboomp) 2026-07-22 21:13:21 +02:00
can1357 9995325ad5 fix(sdk): carry strict through the custom-tool definition bridge
customToolToDefinition rebuilt ToolDefinition without strict, so the
Task proxies' (and startup MCP tools') explicit strict:false was dropped
before RegisteredToolAdapter and the OpenAI-family serializers saw it.
Declare strict on ToolDefinition, copy it in the bridge, and cover the
proxy -> definition -> registered adapter path in the parity test.
2026-07-22 21:13:21 +02:00
can1357 9952adbc82 Merge PR #6242: fix(mcp): route task proxies through source tool and mark tools non-strict (@roboomp) 2026-07-22 21:13:21 +02:00
can1357 59db75d6d4 Merge PR #6205: fix(task): surface actionable shape error for batch calls (@roboomp) 2026-07-22 21:13:20 +02:00
can1357 c5489fa5c5 Merge PR #6222: fix(write): reject unknown URI-like targets (@roboomp) 2026-07-22 21:13:20 +02:00
can1357 13e7f29bc4 Merge PR #6296: fix(tools): cap per-tool default timeout with tools.maxTimeout (@roboomp) 2026-07-22 21:13:20 +02:00
can1357 d4219e6d0b Merge PR #6207: fix(usage): align multi-account /usage columns across windows (@roboomp) 2026-07-22 21:13:19 +02:00