Commit Graph

368 Commits

Author SHA1 Message Date
Mathews-Tom 98edcb4388 Merge remote-tracking branch 'upstream/main' into feat/secret-friendly-names 2026-06-28 22:33:27 +05:30
can1357 d18e2c2f4d feat(agent): introduced idle progress recaps and optional session titles
- Added idle recap functionality to EventController to display goals and next actions when the agent is inactive.
- Updated session parsing in gc-cli and memories to correctly support optional title entries in session files.
2026-06-28 07:27:01 +02:00
Mathews-Tom 49b91ed3e2 Merge remote-tracking branch 'upstream/main' into feat/secret-friendly-names
# Conflicts:
#	packages/coding-agent/test/sdk-session-isolation.test.ts
2026-06-27 21:01:41 +05:30
can1357 2d5b08d055 feat(coding-agent): improved edit tool ui for file operations
- Enhanced the edit renderer to support visual tracking of delete and move/rename operations.
- Updated diff computation to correctly handle file-level changes and suppress erroneous "No changes" warnings.
- Improved terminal output with a clearer activity indicator and accurate state representation during multi-file operations.
- Extended the rendering pipeline to display source-to-destination paths for file renames and added validation tests for edit workflows.
2026-06-27 03:35:32 +02:00
can1357 775ff2d171 Merge PR #3572: feat: add xai/ddg/firecrawl/tinyfish web_search providers (@zekdevs) 2026-06-27 02:04:51 +02:00
can1357 a515c24735 Fix Codex reset expiry integration 2026-06-27 01:39:33 +02:00
can1357 393d068a22 Merge PR #3343: feat(usage): show expiry dates for banked Codex resets (@oldschoola) 2026-06-27 01:39:33 +02:00
can1357 b72b83884d Merge PR #3216: feat: add provider in-flight request limits (@H4vC)
# Conflicts:
#	packages/coding-agent/src/modes/components/settings-selector.ts
2026-06-27 01:39:32 +02:00
can1357 3e5360ca4c Merge PR #3060: feat(provider): add GitLab Duo Agent provider (@jiwangyihao) 2026-06-27 01:39:31 +02:00
can1357 ae1650d689 refactor: renamed search and find tools to grep and glob
- Renamed the `find` and `search` tools to `glob` and `grep` respectively across the codebase to improve command clarity.
- Implemented full-stack support for the renamed tools, including CLI arguments, system prompts, SDK exports, and tool registration.
- Added automated migration logic in `settings` to transform legacy `find` and `search` configuration keys to their new equivalents.
- Updated the `collab-web` renderer registry to ensure backwards compatibility with legacy tool outputs.
2026-06-27 00:57:55 +02:00
Mathews-Tom 6431628307 fix(coding-agent): stabilize gc session ordering 2026-06-26 21:27:31 +05:30
zekdevs 0e4215124a Merge remote-tracking branch 'upstream/main' into feat/add-additional-web-search-providers 2026-06-26 09:23:46 -06:00
zekdevs 64e4f00e3d add xai, ddg, firecrawl, and tinyfish as web_search providers 2026-06-26 08:41:20 -06:00
Dr Kennedy Umege 5ea467aa3c fix: address gc review edge cases 2026-06-26 12:58:30 +01:00
Dr Kennedy Umege 1912cf93ab fix: align gc dry-run and wal failures 2026-06-26 11:53:44 +01:00
Dr Kennedy Umege 087a0a4be0 fix: tighten gc dry-run and failure status 2026-06-26 11:23:33 +01:00
Dr Kennedy Umege 51380f9099 fix: cover gc recovery edge cases 2026-06-26 10:22:23 +01:00
Dr Kennedy Umege 8193f2e541 fix: harden gc retry paths 2026-06-26 09:44:03 +01:00
jiwangyihao ec00294462 fix(ai): 仅为 paste-code provider 合成默认手动粘贴码提示
机器人指出之前的 CLI 侧 gating 是无效的:runLocalLogin 对非 paste-code provider
省略 onManualCodeInput,但 AuthStorage.login 仍以 ctrl.onManualCodeInput ??
manualCodeInput 注入默认值,因此 loopback OAuth provider 的 OAuthCallbackFlow
仍会让 readline 粘贴提示与 HTTP 回调竞争;回调先到时该提示悬挂,终端进入
脏/阻塞状态。

在唯一汇聚点 AuthStorage.login 做权威 gating:

- 仅当 provider 属于 PASTE_CODE_LOGIN_PROVIDERS 时才合成默认 manualCodeInput;
  loopback provider 不再获得手动码竞争。
- 调用方显式传入的 onManualCodeInput 对任意 provider 仍被透传(逃生舱)。
- 该修复覆盖所有调用方,不止 auth-broker CLI。
- CLI 侧的 usesManualInput gating 保留为纵深防御,并更新注释指明 storage 层
  才是权威闸门,纠正机器人指出的“只在此处省略”误导性表述。

新增针对 storage 契约的回归测试(auth-storage-manual-code-gate.test.ts):
loopback provider 不被注入默认提示;显式提示对 loopback 仍透传;paste-code
provider(gitlab-duo-agent)在调用方省略时被合成默认提示并经 onPrompt 路由。
2026-06-26 16:13:25 +08:00
jiwangyihao 4fdf2f83a5 fix(ai): 处理 rebase 后 Codex 新增的三项审阅意见
- catalog CHANGELOG 删除 rebase 重放进已发布 [16.1.4] 段落的重复 Claude 4.6 条目,使该段落与上游 main 完全一致(已发布段不可变)
- Duo Agent finally 清理在最终 idle timeout(重试已耗尽)时也发送 stop PATCH,避免代理/LB 持续断连场景下服务端工作流残留
- auth-broker login 仅对 pasteCodeFlow provider 传入 onManualCodeInput,普通 loopback provider 不再让 readline 提示与 HTTP 回调竞争导致终端残留
2026-06-26 16:13:23 +08:00
jiwangyihao d6194030e5 feat(agent): thread cwd through to local tool execution 2026-06-26 16:13:20 +08:00
Dr Kennedy Umege 8da76c80fc fix: address gc review feedback 2026-06-26 09:07:02 +01:00
Dr Kennedy Umege 4ead62cace feat: add manual coding-agent gc command 2026-06-26 08:39:50 +01:00
roboomp 8f05a29d4d fix(cli): aligned gallery state labels
Accepted displayed gallery lifecycle labels as --state aliases, rejected unknown values before rendering, and updated failed fixtures to render visibly failed states.

Fixes #3473
2026-06-25 15:22:35 +00:00
can1357 3e1d5fce12 feat(coding-agent): filtered out non-reportable accounts in usage CLI
- Add `usageProviderFor` helper to `AuthStorage` to distinguish between providers without usage endpoints and missing data.
- Implement account filtering in the usage CLI to exclude providers that do not support usage reporting unless explicitly requested.
- Improve CLI diagnostic messages when no usage data is retrieved by differentiating between missing credentials and unsupported providers.
2026-06-25 04:44:36 +02:00
can1357 01ef63fbd0 Merge PR #3312: fix(usage): dedup provider-wide notes and add report-level notes field (@oldschoola) 2026-06-24 18:26:17 +02:00
oldschoola cbbdfda2ce fix: normalize tabs in usage notes rendering
Address P2 review: sanitizeText preserves \t which can create visual
holes in rendered output. Add .replace(/\t/g, '  ') to provider-wide
and per-limit notes in usage-report.ts and usage-cli.ts, matching the
TUI path which already uses replaceTabs().
2026-06-23 16:02:26 -07:00
oldschoola 04c3199511 fix(usage): normalize newlines in provider notes before rendering
sanitizeText preserves newlines (\n) which break TUI line layout when
injected into a single rendered row. All notes rendering sites now
replace \r\n sequences with spaces before sanitization:

- command-controller.ts: provider-wide notes (line 1591) + per-group
  notes (line 1666)
- usage-report.ts: provider-wide notes (line 58) + per-limit notes
  (line 90, previously completely unsanitized)
- usage-cli.ts: provider-wide notes (line 455)
2026-06-23 16:02:26 -07:00
oldschoola 12511ca004 fix(usage): sanitize provider notes in usage-report and usage-cli
Apply sanitizeText to provider notes in the shared usage-report
renderer and the CLI usage output, matching the sanitization added
to command-controller.ts. Prevents tabs/newlines/control characters
in provider notes from breaking terminal rendering.
2026-06-23 16:02:25 -07:00
oldschoola 6c3f35dfef fix(usage): dedup provider-wide notes and add report-level notes field
Provider-wide disclaimers (e.g. OpenCode Go's "OMP-observed spend
only") were duplicated onto every UsageLimit, then repeated N times
in the TUI aggregate renderer (once per account × window). With
2 accounts × 3 windows, the same disclaimer appeared 6 times
bullet-joined.

Structural fix:
- Add notes?: string[] to UsageReport (interface + both schema
  copies: usage.ts and auth-broker/wire-schemas.ts) so the field
  survives the broker client's "+": "reject" deserialization gate.
- Move opencode-go's disclaimer from per-limit notes to
  provider-level notes.

Defensive fix:
- Dedup identical per-limit notes in the TUI aggregate renderer
  (command-controller.ts) via [...new Set(...)].
- Render provider-level notes once above per-account sections in
  all three rendering paths: TUI (command-controller), CLI
  (usage-cli), and ACP (usage-report helper).

Regression tests:
- usage-cli.test.ts: provider-level notes render once, not
  duplicated per account or limit; positioned above per-account rows.
- usage-report-notes-schema.test.ts: wire-schema round-trip proving
  notes survives usageResponseSchema validation.

Fixes #3268
2026-06-23 16:02:25 -07:00
oldschoola 1f8e923f8b fix: preserve UNC path roots in POSIX shell config paths
Address codex P2 review: Windows UNC paths like \\server\share\me
become //server/share/me after toPosix, but path.posix.join collapses
leading // to /, producing /server/share/me/.bashrc — a local Unix path
instead of the UNC location.

Add posixJoinUnc() that restores leading // after path.posix.join when
any input segment starts with //. Add regression test for UNC homeDir.
2026-06-23 15:24:38 -07:00
oldschoola 2ce25f2dc2 fix: normalize backslashes in all POSIX path components for profile-alias
Address codex review feedback on PR #3346:
- path.posix.join only adds / separators but preserves existing backslashes
  in input segments (homeDir, ZDOTDIR, XDG_CONFIG_HOME), producing mixed
  paths like C:\Users\me/.bashrc on Windows.
- Add toPosix() helper to normalize backslashes to forward slashes before
  path.posix.join, applied to all POSIX-shell path components.
- PowerShell paths remain platform-native (path.join) as before.
- Add 3 regression tests: bash homeDir, zsh ZDOTDIR, fish XDG_CONFIG_HOME
  all with Windows backslash paths.
2026-06-23 13:55:51 -07:00
oldschoola aa81fcb423 fix: use POSIX paths for all POSIX-shell configs + normalize runtime path (review feedback) 2026-06-23 13:39:04 -07:00
oldschoola f423cc5c95 fix(cli): profile-alias installer produces correct paths for POSIX shells on Windows
The profile-alias installer used path.join unconditionally, which produces
backslash-separated paths on Windows. For bash/zsh/fish config files, this
is wrong — POSIX shells can't resolve backslash paths, even on Windows
(Git Bash, WSL).

Fix:
- resolveShellConfigPath: use path.posix.join for non-Windows platforms,
  path.join for Windows (PowerShell profiles need native Windows paths)
- resolveProfileAliasCommandFromProcess: normalize script path to forward
  slashes for the display/posix/fish fields (POSIX shells), keep native
  path for the powerShell field

Updated 12 test assertions to compute expected paths dynamically using
path.join/path.resolve, so they match the platform's path separator.
All 17 profile-alias tests now pass on Windows (was 5 pass / 12 fail).
2026-06-23 12:24:41 -07:00
oldschoola 639b6195fa feat(usage): show expiry dates for banked Codex rate-limit resets (#3339)
The /usage display (TUI, ACP text, and omp usage CLI) now shows when
banked Codex rate-limit resets expire, so users can plan when to redeem
them before the 30-day window lapses.

Changes:
- Added UsageResetCreditDetail interface (grantedAt, expiresAt, status)
  and optional credits field to UsageResetCredits in packages/ai
- Updated both ArkType schema copies (usage.ts + wire-schemas.ts)
- The OpenAI Codex usage provider now calls listCodexResetCredits to
  fetch individual credit details when availableCount > 0, filtering
  out redeemed credits. Errors are logged and swallowed (graceful
  degradation: count shows without expiry dates)
- TUI (command-controller.ts): shows per-credit expiry as relative time
  + absolute date under each account line
- ACP text (usage-report.ts): same per-credit expiry rendering
- CLI (usage-cli.ts): shows the soonest expiry date in the account header
- 2 new tests: credit detail fetching with expiry dates, and no extra
  API call when availableCount is 0
2026-06-23 11:58:29 -07:00
can1357 cffb804d3a feat(coding-agent): added mouse support and fullscreen rendering to session picker
- Enabled fullscreen overlay rendering for the terminal session picker.
- Implemented full mouse support including wheel-based scrolling and click-to-select functionality.
- Anchored the session picker footer to the bottom of the viewport to correct UI flickering.
- Added comprehensive unit tests for mouse interaction and layout constancy during resizing.
2026-06-23 02:25:30 +02:00
can1357 6ff37e346a feat(coding-agent): extended --thinking CLI flag options
- Added `off` and `auto` as valid inputs for the `--thinking` CLI flag.
- Centralized thinking level definitions in `CLI_THINKING_LEVELS` to keep flag options, shell completions, and validation in sync.
- Configured CLI parsing to reject `inherit` as an explicit input to prevent unintended configuration suppression.
2026-06-23 01:46:36 +02:00
can1357 060f4004e7 feat(coding-agent): refactored eval tool to single-step execution
- Transitioned the eval tool from batch multi-cell execution to a single-step input structure with flat parameters.
- Updated core agent logic, UI components, and documentation to support state persistence across incremental eval calls.
- Restricted bash tool capabilities by requiring explicit use of `read` or `find` instead of `ls` or `find`.
- Added support for Ruby and Julia language runtimes to the eval tool and associated web renderers.
2026-06-23 00:59:58 +02:00
can1357 899c0ef08b feat: simplified todo tool to single operation interface
- Refactored `todo` tool to accept a single operation object instead of an `ops` array.
- Implemented parameter normalization to maintain backward compatibility with legacy array-based tool calls.
- Updated tool instructions, documentation, and UI rendering components to reflect the new interface.
- Added compatibility tests to verify rendering and execution for both legacy and current operation formats.
2026-06-23 00:54:54 +02:00
Brit b1deca6606 feat: add provider in-flight request limits 2026-06-22 02:11:41 +02:00
oldschoola 13bfc7b9c0 Remove Wafer Pass provider 2026-06-21 02:45:48 +02:00
can1357 0f976084b8 fix(coding-agent/cli): route leading global flags before a subcommand to that subcommand
`omp --approval-mode=yolo acp` was rewritten to `launch --approval-mode=yolo
acp`, swallowing `acp` as a launch prompt so the yolo override never reached the
ACP command path (the ACP permission gate from #2097 stayed in always-ask).

`resolveCliArgv` only inspected `argv[0]`, so any leading global option flag hid
the real subcommand. It now scans past leading flags using the launch parser's
value-consumption contract (a flag's value is never mistaken for the subcommand,
e.g. `--model acp`) and hoists the recognized subcommand to the front with the
flags preserved as its own argv. Genuine launch prompts are untouched.

The flag value-consumption rule is factored into `cli/flag-tables.ts`
(`flagConsumesValue` + the shared `isUnknownLongValueCandidate`) so the resolver
and the profile bootstrap share one source of truth.

Fixed permission mode not respected in ACP mode ([#2970](https://github.com/can1357/oh-my-pi/issues/2970))

Fixes #2970
2026-06-21 02:17:54 +02:00
can1357 d8ec46eee5 fix(tiny): guard unsupportedReason access on const model-spec union (#3133 integration typecheck) 2026-06-20 22:25:29 +02:00
can1357 31bb2144e7 Merge PR #3100: fix(coding-agent): keep /resume picker scoped to the current folder (@roboomp) 2026-06-20 22:13:01 +02:00
can1357 6f17533041 fix(tiny): keep tiny-models download all green by skipping load-blocked models
resolveModels("all") expanded the full TINY_LOCAL_MODELS registry, which now
includes the qwen3-1.7b entry marked unsupportedReason. loadPipeline() throws
for such specs, so the download worker reported it as failed and the bulk
command exited with "One or more tiny title models failed to download" even
when every usable model downloaded. Filter unsupported specs out of the `all`
prefetch path; explicit single-model requests are unchanged. Addresses the
unaddressed Codex P2 on PR #3133.
2026-06-20 22:12:47 +02:00
roboomp de03b0c8ee fix(coding-agent): kept /resume picker scoped to the current folder
The session picker auto-switched into all-projects scope whenever the
current cwd had no sessions, so /resume from a fresh project silently
surfaced every other project's history. The empty-folder hint already
tells users to Tab into all-projects, but the auto-switch made it
unreachable. Both call sites (the /resume slash command and `omp
--resume` startup) now always open in folder scope; `omp --resume`
keeps the global probe only to early-exit with 'No sessions found' when
nothing exists anywhere. The component-level `startInAllScope` option
is deleted along with its callers.

Fixes #3099
2026-06-20 03:43:59 +00:00
can1357 d10a5356ca feat(coding-agent): added provider extension support to CLI tools
- Enable shared extension provider loading in bench and dry-balance CLI commands to ensure custom providers are registered.
- Surface benchmark failures for empty streams that return no content and zero usage tokens instead of treating them as successful.
2026-06-19 19:23:46 +02:00
can1357 67f6518e42 feat: enhanced tool robustness, improve authentication flow, and update API parameters
- Implement JSON repair and strict argument validation to sanitize raw payloads and redact sensitive information from agent event logs.
- Add automatic authentication fallback for benchmark model resolution to ensure consistent performance testing across providers.
- Refactor search tool API parameters by replacing `i` with a case-sensitive `case` boolean flag for clarity.
- Update session history formatting to ensure empty objects are consistently serialized as `{}` instead of empty strings.
2026-06-19 16:46:07 +02:00
can1357 6d7dab0c68 fix(coding-agent): prevented crash when resuming session in deleted directory
- Export `directoryExists` in `utils` to safely validate working directories before traversal.
- Update `SessionManager` and startup logic to fallback to the launch directory if a session's recorded working directory no longer exists.
- Add regression tests to ensure sessions now correctly adopt the launch directory instead of crashing on missing paths.
2026-06-19 16:06:01 +02:00
can1357 4f03180ae6 refactor(deps): moved intent field constant to pi-wire
- Moved the `INTENT_FIELD` constant from `@oh-my-pi/pi-agent-core` to the specialized `@oh-my-pi/pi-wire` package to permit broader usage across the monorepo.
- Updated all references across `agent`, `ai`, `coding-agent`, `collab-web`, and `snapcompact` packages to import the constant from the new location.
- Added `@oh-my-pi/pi-wire` as a dependency to all affected packages.
2026-06-19 04:58:29 +02:00