Commit Graph

10235 Commits

Author SHA1 Message Date
can1357 8205d3ee31 style: applied biome formatting to merged fix commits 2026-07-23 11:39:15 +02:00
can1357 ef8643547e docs: normalized changelog entries under [Unreleased] after PR merges 2026-07-23 11:37:49 +02:00
can1357 ca27ad0b06 Merge PR #4927: feat(coding-agent): rewrite /guided-goal interviewer for loop engineering (@metaphorics) 2026-07-23 11:37:14 +02:00
can1357 d109f389d8 docs(coding-agent): move format-on-write changelog entry to Unreleased 2026-07-23 11:37:13 +02:00
can1357 536d37ac07 Merge PR #5137: perf(coding-agent): avoid cold LSP startup on format-only writes (@wolfiesch) 2026-07-23 11:37:13 +02:00
can1357 db3a6a1407 Merge PR #6318: fix(tui): show fallback models in Agent Hub (@roboomp) 2026-07-23 11:37:13 +02:00
can1357 bf15acb25d fix(coding-agent): hub cancel reaches the registration behind a settled job row
A budget-aborted keep-alive subagent's job row (job id == agent id) settles
failed and is retained ~5 min; executeCancel short-circuited to
already_completed for that window, leaving the zombie registration
unkillable exactly when the user wants it dead. Fall through to
cancelAgentRegistration for settled rows; keep already_completed when no
lingering registration exists.

Also stop wiring AgentLifecycleManager.global() onto SDK sessions created
with a caller-supplied agentRegistry: the global lifecycle releases through
AgentRegistry.global(), so it would report a cancel while releasing an
unrelated global ref. Without a lifecycle, cancel falls back to
dispose + unregister on the session's own registry.

Addresses both Codex P2 review findings on #6319.
2026-07-23 11:37:13 +02:00
can1357 9756fea7af Merge PR #6319: fix(coding-agent): let hub cancel kill a jobless agent registration (@roboomp) 2026-07-23 11:37:13 +02:00
can1357 be94acbf71 fix(extensions): handle TypeScript import-equals require specifiers
Collect TSImportEqualsDeclaration/TSExternalModuleReference targets so
legacy .ts/.cts extensions using `import x = require("pkg")` get their
bare dependencies pinned like plain require() calls. Fold of the #6256
follow-up (comicchang/oh-my-pi@1e54b68) requested on #6324.
2026-07-23 11:37:12 +02:00
can1357 27fc2d60d1 Merge PR #6324: fix(extensions): resolve transitive CJS dependencies (@jeffscottward) 2026-07-23 11:37:12 +02:00
can1357 3566b78817 test(internal-urls): cover hasResolvableTranscript availability contract 2026-07-23 11:37:12 +02:00
can1357 c818e77240 Merge PR #6328: fix(task): only point follow-up hints at transcripts that exist (@paralin) 2026-07-23 11:37:12 +02:00
can1357 39c3f2a054 Merge PR #6329: fix(settings): expose Hindsight API token (@salmonumbrella) 2026-07-23 11:37:12 +02:00
can1357 c43f5d72c8 docs(coding-agent): add changelog entry for Firecrawl keyless mode (#4332) 2026-07-23 11:37:11 +02:00
can1357 bacb51dffd Merge PR #6331: Add firecrawl keyless mode support (@CoderTCY) 2026-07-23 11:37:11 +02:00
can1357 395e5ba288 fix(coding-agent): bypass anonymous-connect guard when a tool auth challenge is present
Servers may allow the unauthenticated MCP handshake yet protect individual
tool calls via _meta["mcp/www_authenticate"]. The 'reauthorization is not
required' guard would silently abort the tool-challenge reauth path.
2026-07-23 11:37:11 +02:00
can1357 7880c459b7 Merge PR #6346: fix(coding-agent): retry MCP tool auth challenges (@spenceresin8) 2026-07-23 11:37:11 +02:00
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
slee1996 2145ab8f8e fix(coding-agent): retry MCP tool auth challenges 2026-07-22 23:44:38 -06:00
Christian Stewart 0ff5312744 fix(task): only point follow-up hints at transcripts that exist
The aborted-task follow-up hint always references history://<agentId>,
including when no transcript can actually be served. Following that link
then fails.

Add hasResolvableTranscript beside sessionFilesFromDisk, mirroring the
availability half of HistoryProtocolHandler's resolution semantics: a
registered ref's live session, a retained session file verified on disk,
or a disk-scanned .jsonl under a known artifacts dir (which still serves
hard-aborted children whose refs were unregistered). Probing never
throws; a stale path or unreadable artifacts subtree reads as unavailable
instead of failing delivery of the settled result. Render the transcript
clause from that check, independently of the resume affordance, so a
still-resumable idle/parked agent keeps its hub resume hint and a
disk-backed transcript keeps its link. Idle-completion hints are
unchanged.

Signed-off-by: Christian Stewart <christian@aperture.us>
2026-07-22 20:22:37 -07:00
salmonumbrella 37b81fec6e revert(hindsight): defer live runtime reconfiguration 2026-07-22 20:11:59 -07:00
salmonumbrella 4063fbd9f6 fix(hindsight): allow live backend re-enable 2026-07-22 19:55:58 -07:00
CoderTCY d115ac66c1 Fix by review 2026-07-23 10:23:06 +08:00
salmonumbrella a7f3c76428 fix(hindsight): preserve state across credential changes 2026-07-22 19:20:24 -07:00
salmonumbrella dd03143b9d fix(hindsight): refresh live client on connection changes
Rebuild Hindsight runtime state when API URL or token settings change. Keep active subagent aliases routed through the latest primary state and reset bank caches across endpoint changes.
2026-07-22 19:03:24 -07:00
CoderTCY 1071984385 Fixes 2026-07-23 09:54:35 +08:00
CoderTCY 3ada287cb0 feat(firecrawl): support keyless mode when no API key is configured
When FIRECRAWL_API_KEY is not set, fall back to Firecrawl keyless mode
(omit Authorization header). Auto-chain still requires a credential via
isAvailable; explicit webSearch: firecrawl works keyless via
isExplicitlyAvailable returning true.

Closes https://github.com/can1357/oh-my-pi/issues/4332
2026-07-23 09:54:35 +08:00
salmonumbrella 47a0c56f93 fix(settings): mask Hindsight API token 2026-07-22 18:50:05 -07: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
salmonumbrella 9b3820e1e5 docs(changelog): move Hindsight fix under unreleased 2026-07-22 18:32:21 -07:00
salmonumbrella 726f9a043c fix(settings): expose Hindsight API token 2026-07-22 18:27:18 -07: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
Jeff Scott Ward 0b9adcb4c8 fix(extensions): resolve transitive CJS deps
Preserve runtime package resolution in compiled binaries across CommonJS
dependency graphs and mixed-module packages.

Refs #6173
Co-authored-by: Comic Chang <comicchang@gmail.com>
2026-07-22 19:38:23 -04: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
Comic Chang 1ede6ae628 fix(extensions): load legacy plugins in compiled binaries 2026-07-22 18:42:14 -04: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