Commit Graph

404 Commits

Author SHA1 Message Date
can1357 10625d2e9a Merge PR #7376: feat(coding-agent): add OpenAI service tier override (@paralin)
# Conflicts:
#	packages/coding-agent/src/commands/launch.ts
2026-08-02 21:22:41 +02:00
Christian Stewart 9d69db481a feat(coding-agent): add OpenAI service tier override
The OpenAI service tier could only be chosen through the `tier.openai`
setting, or for a resumed session through whatever tier that session
recorded. Wanting flex or priority for a single run meant editing
settings and putting them back afterwards, while `bench` already took a
`--service-tier` flag that the session CLI did not offer.

Add `--service-tier` to the root command. The flag wins over the
configured setting and over a resumed session's recorded tier, leaves
the Anthropic and Google entries untouched, and records the resulting
map so a later resume keeps it. `none` removes the OpenAI entry, which
omits `service_tier` from the request.

Signed-off-by: Christian Stewart <christian@aperture.us>
2026-08-02 05:07:33 -07:00
roboomp 72d8d4eaca fix(cli): restored piped session persistence
- Treated undefined stdin TTY state as redirected input.

- Honored PI_CODING_AGENT_SESSION_DIR with CLI precedence.

Fixes #7378
2026-08-02 11:33:58 +00:00
can1357 60d5b9b49d fix(coding-agent): classify host before auth storage 2026-08-01 20:13:40 +02:00
can1357 b6e12240c9 Merge PR #7240: fix(coding-agent): bound synchronous SQLite busy-waits in headless hosts (@pi3123) 2026-08-01 20:13:39 +02:00
Sunil Srivatsa 8a7edb3f3d fix(coding-agent): preserve explicit extensions in isolation 2026-08-01 12:32:19 -04:00
pi3123 4a9350963f Hoist interactive-host flag above settings load; add changelog entries
Settings.init opens agent.db/stats.db before setInteractiveHost ran, so
interactive hosts received the 1000ms headless busy timeout on those
databases (issue #2421 class). Declare the flag before settings load and
add [Unreleased] changelog entries per repo conventions.
2026-07-31 23:27:15 -07:00
can1357 e02510f8c9 Merge PR #7108: fix(rpc): restore frames for IRC-revived subagents (@roboomp) 2026-07-31 19:28:42 +02:00
roboomp 223122d6b0 fix(cli): generated titles for positional initial messages
Moved automatic title eligibility and persistence into AgentSession so editor and CLI bootstrap submissions share one path.

Added a PTY regression probe covering the positional-message launch flow.

Fixes #7166
2026-07-31 10:28:48 +00:00
roboomp d686375b8c fix(rpc): monitored IRC wakes on cold-revived subagents
- Extracted the shared attachIrcWakeTurnMonitor from the executor reviver closure.
- Installed it in the persisted cold-revive path, forwarding the top-level event bus.
- Covered that a resumed process's parked subagent emits wake lifecycle frames.

Fixes #7105
2026-07-30 20:08:21 +00:00
Wolfgang Schoenberger 757b0938ce fix(coding-agent): tighten startup changelog contracts
(cherry picked from commit e5490279ca0b400b143514e7ef3e38be0686bf31)
2026-07-30 01:42:01 +02:00
Wolfgang Schoenberger a4dc5a094a feat(coding-agent): add startup changelog display modes
(cherry picked from commit bed594fecd1eae1917f3f047f883da5ba83317f9)
2026-07-30 01:41:57 +02:00
can1357 f11641d5a8 feat(coding-agent): enabled importing foreign sessions from claude and codex
- Implemented session stores and metadata converters to import Claude and Codex sessions into OMP.
- Added `--from-claude` and `--from-codex` CLI flags and `/resume` command arguments for foreign session resolution.
- Updated session selector components and controllers to support listing and picking external agent sessions.
- Added comprehensive unit tests and documentation covering foreign session import functionality.
2026-07-30 00:28:40 +02:00
roboomp 1bb6226b37 fix(cli): updated cwd override after resume switch
- Replaced parsed --cwd with the resumed project after explicit-id and picker project switches.
- Asserted session construction receives the destination cwd when resume starts with a launch-project --cwd.

Fixes #6752
2026-07-27 02:32:09 +00:00
roboomp c7d907352c fix(cli): await destination plugin preload on resume switch
- Warm the resumed project plugin roots before session creation instead of relying on the unawaited re-warm inside clearPluginRootsAndCaches.
- Assert the destination cwd is preloaded during the switch.

Fixes #6752
2026-07-27 02:26:44 +00:00
roboomp 4ede4eb3be fix(cli): recompute model scope after resume project switch
- Re-resolve settings-derived model scope once a resume switches projects.
- Extract resolveScopedModels shared across startup, explicit resume, and picker.
- Assert destination enabledModels drive the resumed scope.

Fixes #6752
2026-07-27 02:22:23 +00:00
roboomp 517b0445a5 fix(cli): resumed cross-directory sessions in place
- Removed the implicit fork branch from explicit session-id resume resolution.
- Re-scoped process cwd, settings, plugin roots, and capabilities before session creation.
- Preserved the missing-directory move flow and covered both paths with regression tests.

Fixes #6752
2026-07-27 02:13:24 +00:00
can1357 18bd043c86 fix(cli): keep CLI --models scope pinned and defer scoped thinking with the role
The #6694 deferral must not apply when the scope comes from the --models
flag: createAgentSession re-resolves the default role against
settings.enabledModels only and never sees parsed.models, so leaving
options.model unset let a saved out-of-scope default silently escape an
explicit CLI scope. Pin scopedModels[0] for CLI scopes as before.

When the default role IS deferred (settings-derived scope), also skip
seeding options.thinkingLevel from scopedModels[0]'s explicit suffix —
explicit options win in createAgentSession and would override the
re-resolved role's own thinking selector.
2026-07-26 15:41:29 +02:00
roboomp 06674b2571 fix(cli): defer out-of-scope default role so extension models resolve
enabledModels is resolved at startup before extensions call
registerProvider(), so a modelRoles.default naming an extension-provided
model dropped out of the resolved scope and buildSessionOptions pinned
options.model to the first scoped model. That pre-fill marked the model
"explicit" in createAgentSession, suppressing the post-extension
default-role re-resolution and silently running the session on a
different in-scope provider's model.

A configured default that cannot be found in the startup scope is now
left unset so createAgentSession re-resolves it against the fully
registered, still enabledModels-scoped catalog once extensions load. The
first scoped model is only seeded when no default role is configured.

Fixes #6694
2026-07-26 11:33:03 +00:00
Brent 6d4a345d69 fix(coding-agent): defer ACP reserve confirmation 2026-07-24 02:23:51 +02:00
can1357 26726fdcb9 Merge PR #6255: add dynamic multi-root workspace context (@maatheusgois-dd) 2026-07-23 17:30:33 +02:00
Kormákur c2fde74ef0 feat(coding-agent): configure isolated task apply behavior 2026-07-23 00:48:48 +00:00
can1357 b6674731a0 Merge PR #6203: fix(coding-agent): keep startup alive when prewalk target lacks auth (@roboomp) 2026-07-22 21:13:14 +02:00
maatheusgois-dd 00fd98729a Make parent live root list authoritative for subagents, CLI merge stays in buildSessionOptions
- main.ts:buildSessionOptions now merges --add-dir with settings
  before passing to options.additionalDirectories
- sdk.ts: when options.additionalDirectories is explicitly provided,
  uses it as-is (no settings re-merge); falls back to settings only
  when not provided
- This prevents removed roots from being re-seeded in subagent sessions

Co-authored-by: oh-my-pi <https://omp.sh>
2026-07-22 03:01:10 -03:00
maatheusgois-dd 32d8b84e26 Add dynamic multi-root workspace context (#2569)
A session now carries an ordered list of workspace directories beyond cwd,
managed live from the terminal. New /add-dir, /remove-dir, and /dirs slash
commands let you add and remove folders mid-session; the repeatable --add-dir
CLI flag seeds them at launch, and the workspace.additionalDirectories
setting persists defaults per project. Additional roots are persisted in the
session header, survive reopen/fork/move, and are surfaced to the agent in the
system prompt so it knows they exist and can read/grep/glob them by absolute
path. Design aligns with the endorsed community implementation on
feature/session-workspace.

Co-authored-by: oh-my-pi <https://omp.sh>
2026-07-21 23:38:32 -03:00
roboomp 62b47dede8 fix(cli): preferred authenticated provider for bare models
Made startup resolution rank configured providers before catalog-only matches while preserving explicit provider pins and catalog fallback behavior.

Added regression coverage for shared bare model IDs across authenticated and unauthenticated providers.

Fixes #6150
2026-07-21 21:50:36 +00:00
roboomp a7d9e4b89e fix(coding-agent): kept startup alive when prewalk target lacks auth
prewalk.enabled resolved the hand-off target (default @smol) and threw
"No API key for <provider>/<id>" inside buildSessionOptions when the
target had no configured auth, aborting startup and locking the user out
of the app. Prewalk is an optional, off-by-default optimization, so an
unresolvable or unauthorized target now warns and leaves prewalk unarmed
instead of crashing.

Fixes #6064
2026-07-21 20:38:30 +00:00
can1357 1bf08608a4 Merge PR #4964: fix(cli): resolve bundled extension imports (@roboomp)
# Conflicts:
#	packages/coding-agent/src/extensibility/plugins/legacy-pi-compat.ts
#	packages/coding-agent/src/main.ts
#	packages/coding-agent/src/prompts/system/workflow-notice.md
#	packages/coding-agent/test/extensibility/legacy-pi-bundled-virtual.test.ts
2026-07-20 22:53:16 +02:00
can1357 5aa850078e Merge PR #5904: fix(rpc): claim stdin before extension discovery (@roboomp) 2026-07-18 19:57:44 +02:00
can1357 3863a1fac6 Merge PR #5911: fix(subagent): skip session title generation for headless subagents (@roboomp) 2026-07-18 19:57:44 +02:00
Christian Stewart 670304eafa fix(coding-agent): resolve bare model role aliases
Signed-off-by: Christian Stewart <christian@aperture.us>
2026-07-18 03:51:09 -07:00
roboomp 53a3aef39a fix(subagent): keep title refresh for focusable subagents
Review follow-up: a live subagent focused from the Agent Hub renders its
session name in the status line (session_name segment reads
sessionManager.getSessionName()), so the blanket agentKind === "sub" skip
made the user-enabled title.refreshOnReplan silently ineffective and left
focused subagents untitled after their first todo replan.

Focus only exists in an interactive host, and subagents run in-process, so
gate the skip on a process-global interactive-host flag: subagents skip the
replan title refresh only in non-interactive hosts (print/RPC/ACP/eval/SDK/
CI) where no session tree is focusable. The interactive entrypoint declares
the host via setInteractiveHost(isInteractive); the flag defaults false, so
bun test and headless embedders keep the optimization without leaking state.

Fixes #5910
2026-07-17 21:10:58 +00:00
roboomp fe54ebc990 fix(rpc): claimed stdin before extension discovery
Claimed Bun's singleton stdin reader before loading extensions and passed the owned stream into RPC and RPC-UI mode.

Added process-level regressions for both modes with a startup extension that attempts to lock stdin.

Fixes #5898
2026-07-17 19:29:47 +00:00
can1357 fcb368263b merge PR #5507 via eval/pr-5507: feat(telemetry): support full OTel — log and metric export 2026-07-17 05:32:51 +02:00
can1357 92d63050c0 merge sweep/2026-07-17 2026-07-17 05:24:45 +02:00
robomp-bot d85469264e style(warp): organize event bridge import 2026-07-16 00:23:52 +09:00
robomp-bot 342345b388 feat(warp): bridge TUI session events 2026-07-16 00:10:00 +09:00
can1357 425e583ae0 feat(coding-agent): added support for task-agent field and model resolution
- Added schema and type updates for task-agent fields and model resolver settings.
- Extended discovery helper logic to carry resolved task-agent metadata through execution setup.
- Updated task/agent registration and execution paths to use the new capability/field data.
- Expanded test coverage for agent-field parsing, model resolution, and executor prewalk behavior.
2026-07-15 00:50:55 +02:00
roboomp 506d0942cf feat(telemetry): added otlp log and metric export
Extended the OTLP export bootstrap beyond traces so omp emits the full
OpenTelemetry signal set from a single session.

- Registered a LoggerProvider + BatchLogRecordProcessor and a MeterProvider
  + PeriodicExportingMetricReader when their OTLP endpoints (or the shared
  endpoint) are set, each gated independently by OTEL_*_EXPORTER=none,
  OTEL_SDK_DISABLED, and http/protobuf protocol checks.
- Bridged the centralized logger through a new registerLogSink API so every
  log event also becomes an OTLP log record with severity, attributes, and
  active span context for log-trace correlation (min level via OTEL_LOG_LEVEL).
- Recorded gen_ai.client.token.usage and pi.omp.agent.* metrics from the
  agent run summary and per-chat usage hooks, and emitted a structured run
  summary log event.
- Added an out-of-process logs+metrics probe and gating tests covering the
  per-signal kill switches.

Fixes #4604
2026-07-14 19:39:11 +00:00
can1357 dde82c5ffe Merge PR #5167: fix(coding-agent): reject unknown continued session ids (@paralin) 2026-07-14 18:39:26 +02:00
can1357 f9f6ed9e8d feat(coding-agent): replaced legacy pi/ role alias prefix with
- Replaced legacy `pi/` role alias prefix with canonical `@` syntax across model resolution, documentation, and tests.
- Added support for bare `*` default alias and multiple alias prefix detection with custom role resolution in `resolveConfiguredRolePattern()`.
- Enhanced thinking suffix parsing to accept unambiguous abbreviations (minimum 2 characters) for effort and level selectors.
- Extended `resolveCliModel()` and `filterAvailableModelsByEnabledPatterns()` to accept settings parameter for role alias resolution from `--model` flag.
2026-07-13 23:26:33 +02:00
can1357 4df6f6683d chore: finalizing the new /prewalk 2026-07-13 15:18:31 +02:00
can1357 f405525bf4 feat: removed boomerang feature and associated validation workflows
- Removed the `downshift.boomerang` feature, including CLI flags, configuration schema settings, and internal session state logic.
- Deleted the associated prompt definition file and all unit tests related to the boomerang validation flow.
- Cleaned up frontend forms and server request handling in the harbor-manager package to reflect the feature removal.
- Updated the downshift planning prompt instructions to maintain continuity in task creation.
2026-07-13 14:15:54 +02:00
can1357 95ecc61bc9 feat(coding-agent): implemented downshift boomerang flow for context handoff
- Introduced `--downshift-boomerang` CLI flag and `downshift.boomerang` configuration setting.
- Integrated boomerang validation hand-back logic and context cutting within the agent session.
- Added system prompt templates and runtime checks to facilitate message handling for boomerang transitions.
- Included unit tests to verify context management and validation pass requirements during the boomerang process.
2026-07-13 10:37:20 +02:00
can1357 9f1ff90a39 feat(coding-agent): implemented downshift and plan-yolo agent workflows
- Replaced legacy reasoning-slide functionality with new downshift and plan-yolo capabilities.
- Updated CLI arguments, slash commands, and configuration schemas to support the new model-switching and execution behaviors.
- Refactored agent session logic to handle downshift arming, plan-yolo headless execution, and context scrubbing.
- Renamed and added system prompts to align with the updated downshift and plan-yolo workflows.
2026-07-13 06:03:46 +02:00
can1357 4cfec93458 feat(coding-agent/launch): introduced persistent project service tool
- Introduced a project-scoped `launch` tool to orchestrate long-running services, debuggers, and watchers with persistent execution capabilities.
- Implemented a robust daemon broker with Unix/Windows IPC transport that manages process lifecycles, readiness monitoring, and automatic log rotation.
- Added detached process support to ensure services persist independently of the main application lifecycle, including recovery and cleanup mechanisms.
- Updated the `bash` interceptor to prioritize the new `launch` tool for background processes and provided comprehensive documentation for lifecycle and signal handling.
2026-07-13 04:21:55 +02:00
can1357 ac16253613 wip: rslide (experimental) 2026-07-13 04:21:54 +02:00
Christian Stewart a45a62860b fix(coding-agent): strip continued ids after extension reparse
Reuse raw argv during the extension-aware parse so explicit session ids are removed without dropping a following user prompt.

Signed-off-by: Christian Stewart <christian@aperture.us>
2026-07-11 16:19:05 -07:00
Christian Stewart 21446db15a fix(coding-agent): resolve continued ids before extension flags
Identify explicit session ids from the token immediately following --continue so extension-owned values remain untouched while session resolution targets the requested id.

Signed-off-by: Christian Stewart <christian@aperture.us>
2026-07-11 16:19:05 -07:00
Christian Stewart 39290eade8 fix(coding-agent): deferred continue normalization past extension flags
Skipped UUID-shaped positional normalization while startup parsing still contains unrecognized extension flags, then normalized the extension-aware parse.

Signed-off-by: Christian Stewart <christian@aperture.us>
2026-07-11 16:19:05 -07:00