Commit Graph

4181 Commits

Author SHA1 Message Date
can1357 bfae4d46c3 fix(coding-agent): tracked acp tool args by session for replay
- Tracked ACP tool-call inputs per session and replayed them via `toolArgsById`/`getToolArgs` plumbing.
- Merged ACP tool execution end content from start and result events so command output replay preserves original args.
- Scoped ACP async-job draining by session `ownerId` and `agentId` with in-flight tracking and permission-gated deferred turns.
- Refactored compaction telemetry and async tests with per-test telemetry setup and asynchronous teardown resets.
2026-05-17 13:15:07 +02:00
Can Bölük 6331953dc8 Merge branch 'main' into acp-todo-plan-sync 2026-05-17 13:12:36 +02:00
Can Bölük 34ce96e42f Merge pull request #1138 from jiwangyihao/acp-autonomous-continuation
fix(coding-agent): keep ACP async continuations owned
2026-05-17 13:12:15 +02:00
Can Bölük b39c8c8460 Merge pull request #1134 from jiwangyihao/fix/acp-zed-permission-gate
fix(coding-agent): repair ACP permission flow for file edits
2026-05-17 13:12:07 +02:00
Can Bölük 1e66bf8bf3 Merge pull request #1132 from jiwangyihao/acp-tool-call-details-pr-d
ACP: keep command details stable across updates and replay
2026-05-17 13:11:59 +02:00
can1357 cab5138c5d style(coding-agent/cli): simplified formatting of reinstall warning output
- Collapsed a multi-line reinstall-warning `console.log` statement into a single line.
- Preserved the existing warning message text and only simplified its formatting.
2026-05-17 12:13:53 +02:00
Can Bölük 3038318ed9 Merge pull request #1125 from jiwangyihao/acp-initialize-startup
fix(coding-agent): defer ACP session startup
2026-05-17 11:26:27 +02:00
Can Bölük ae3a977a80 Merge pull request #1145 from can1357/farm/6901cca0/session-tree-horizontally-overflows-view
fix(tui): compress deep session tree gutters
2026-05-17 11:24:06 +02:00
Can Bölük 1fb5b897bf Merge pull request #1135 from MikeeI/fix/omp-update-install-url-path
fix(coding-agent): correct install.sh fallback URL in omp update warning
2026-05-17 11:23:12 +02:00
Can Bölük d62e7f4698 chore: update installation command in update-cli.ts 2026-05-17 11:23:02 +02:00
jiwangyihao 6e53286ce7 fix(coding-agent): scope async delivery drains 2026-05-17 15:40:04 +08:00
jiwangyihao 05e1e702dd fix(coding-agent): keep ACP async continuations owned 2026-05-17 15:30:09 +08:00
roboomp 9ede82deba fix(tui): compressed deep session tree gutters
Capped the session tree selector gutter width so deeply branched histories preserve space for the selected entry text.

Added regression coverage for heavily branched trees at wide and narrow viewport widths.

Fixes #1144
2026-05-17 06:55:59 +00:00
can1357 8f204539b8 fix(coding-agent): deferred agent_end emission until prompt unwinds
- Held wire-level agent_end until #promptInFlightCount drops to 0, preventing AgentBusyError when subscribers fire the next prompt synchronously from agent_end.
- Added #pendingAgentEndEmit field and #flushPendingAgentEnd(), called from #endInFlight and #resetInFlight.
- Added regression test covering re-entrant prompt() from agent_end listener.
2026-05-17 08:53:41 +02:00
jiwangyihao 6b22479c31 Merge branch 'acp-tool-call-details-pr-a' into acp-tool-call-details-pr-d
# Conflicts:
#	packages/coding-agent/test/acp-event-mapper.test.ts
2026-05-17 13:16:57 +08:00
jiwangyihao 1fbdb7662b fix(acp): 将 shell 和 exec 归类为执行工具 2026-05-17 13:14:40 +08:00
jiwangyihao 6137c0fbcf Merge remote-tracking branch 'origin/main' into acp-tool-call-details-pr-d 2026-05-17 11:55:31 +08:00
jiwangyihao c2d4e97cd8 Merge remote-tracking branch 'origin/main' into acp-tool-call-details-pr-a 2026-05-17 11:55:07 +08:00
jiwangyihao adde02c42c Merge remote-tracking branch 'origin/main' into acp-initialize-startup 2026-05-17 11:55:03 +08:00
jiwangyihao dbd959a6eb Merge remote-tracking branch 'origin/main' into acp-todo-plan-sync 2026-05-17 11:55:01 +08:00
Bonobo 8a7f7d75c5 fix(coding-agent): correct install.sh fallback URL in omp update warning
The fallback reinstall hint printed when omp update can't verify the new
binary pointed at https://raw.githubusercontent.com/can1357/oh-my-pi/main/install.sh,
which returns 404. The installer actually lives at scripts/install.sh
(consistent with the README install instructions).
2026-05-17 05:54:08 +02:00
jiwangyihao 9ff833e526 Merge remote-tracking branch 'origin/main' into fix/acp-zed-permission-gate 2026-05-17 11:53:44 +08:00
jiwangyihao 1e5276e2d6 Merge remote-tracking branch 'origin/main' into acp-initialize-startup
# Conflicts:
#	packages/coding-agent/src/main.ts
2026-05-17 11:53:04 +08:00
jiwangyihao ec76a04d8f Merge remote-tracking branch 'origin/main' into acp-tool-call-details-pr-d 2026-05-17 11:47:54 +08:00
jiwangyihao 0aca488267 Merge remote-tracking branch 'origin/main' into acp-todo-plan-sync 2026-05-17 11:47:14 +08:00
can1357 407f9319d5 chore: bump version to 15.1.3 2026-05-17 05:45:51 +02:00
jiwangyihao 80a3aea679 Merge remote-tracking branch 'origin/main' into acp-tool-call-details-pr-a 2026-05-17 11:45:32 +08:00
can1357 9155df2bf0 fix(coding-agent): scoped report_tool_issue enum to active built-in tools
- Built a dynamic enum from constructed built-in/hidden tools so MCP and extension tools are excluded from QA reports.
- Added allowlist guard to silently drop reports targeting non-built-in tools at runtime.
- Stripped `proxy_` prefix before allowlist check so passthrough-wrapped tools resolve correctly.
2026-05-17 05:45:25 +02:00
jiwangyihao cb7d30a437 Merge remote-tracking branch 'origin/main' into fix/acp-zed-permission-gate 2026-05-17 11:44:41 +08:00
can1357 7b20915e20 refactor(coding-agent): replaced console.warn with logger.warn calls
- Migrated warning output from raw console.warn+chalk to the shared logger utility.
- Removed unused chalk import as a result.
2026-05-17 05:31:58 +02:00
can1357 f4b1cc084b fix: guarded terminal control sequences behind isTTY checks
- Skipped thinking-line writes and clears when stdout is not a TTY.
- Prevented terminal title (set/push/pop) from emitting OSC/xterm escape sequences to piped or non-interactive output.
- Suppressed all ProcessTerminal control writes when stdout isn't a TTY.
2026-05-17 05:29:56 +02:00
can1357 f945e5e382 refactor(coding-agent/modes): reorganized account section width sharing
- Refactored account header rendering to separate label truncation from reset suffixes and align suffix spacing.
- Introduced a shared section width calculation so provider groups reuse the same account column and bar width.
- Updated aggregate usage text to show free-percentage formatting and shortened account count labels.
2026-05-17 05:16:03 +02:00
can1357 a951925814 fix(ai): corrected stream auth to refresh once and retry pre-start 401
- Updated auth refresh to return generation booleans and return false for missing, non-oauth, or null-rotation creds.
- Added stream auth retry logic by wrapping streamSimple and retrying once with a fresh key for pre-start 401 only.
- Added changelog note on streaming auth retries and coding-agent onAuthError flow to refresh stale credentials.
- Added snapshot and stream auth tests for headers/no-store, 304 transitions, long-poll wakes, and retry limits.
2026-05-17 05:02:16 +02:00
can1357 6db7d6af92 feat(ai): added auth-broker snapshot contract with generation checks
- Added generation-aware snapshot contracts with generation, serverNowMs, refresher, and rotatesInMs fields.
- Reworked /v1/snapshot serving and client fetching for If-None-Match long-poll with 304/200 status handling.
- Added status checks in remote-store and SDK/CLI snapshot paths, applying updates only when fetch returns 200.
- Added StreamOptions.onAuthError and stream one-shot 401 retry dispatch using refreshed credentials.
2026-05-17 04:54:30 +02:00
can1357 c8f1e4a0b6 refactor(coding-agent): replaced bracket-wrapped bars with smooth sub-cell rendering
- Switched usage bar fill to floor+partial-block characters (▓, ▒) for finer granularity.
- Removed surrounding `[` / `]` bracket characters from bar output and adjusted column width arithmetic accordingly.
- Replaced dot-filled unknown-state bar brackets with a plain dot run.
2026-05-17 04:35:56 +02:00
can1357 75f34d1815 feat(utils): added configurable logger transport switching for headless services
- Added a new `setTransports` logger API to swap console and file winston transports at runtime.
- Refactored logger transport creation to lazily build rotating file logs via a shared directory helper.
- Updated auth-broker serve startup/shutdown to use structured logger output and switch to console-only logs for its headless runtime.
2026-05-17 04:19:38 +02:00
can1357 90b134ca4c test: replaced real timers and sleeps with deterministic test hooks
- Added `providerRetryWait` and `retryWait` hooks to stream/usage options so tests bypass real scheduler delays.
- Parameterized GitHub Copilot poll intervals and Copilot model retry base delay for fast test execution.
- Replaced `Bun.sleep`/`setTimeout` polling loops with `AbortSignal` event listeners in agent session tests.
- Consolidated auth-gateway E2E helpers into a shared `test/helpers` module, eliminating duplicated `checkGatewayAvailable` implementations.
- Migrated credential-disabled tests from SQLite-backed stores to an in-memory store, removing temp-dir lifecycle overhead.
2026-05-17 04:02:09 +02:00
can1357 6d7c4008e5 feat(emoji): added emoticon expansion and inline replace
- Added a hand-maintained EMOTICONS table mapping western text emoticons (`:)`, `:-D`, `
2026-05-17 03:57:20 +02:00
can1357 2155b8e020 perf: replaced WeakMap caches with symbol-keyed properties
- Migrated per-object caches (chat/tool starts, model fingerprints, validation contexts, provider indexes, render IDs) from WeakMap to Symbol-keyed properties on the objects themselves.
- Rewrote SSE debug tee as a single-pass inline parser, eliminating the body.tee() + readSseEvents re-parse pipeline.
- Refactored MockModel from a factory function + external WeakMap state into a self-contained class.
- Added FIFO memoization caches for heuristic candidate expansion and namespace suffix lookups.
2026-05-17 03:47:45 +02:00
jiwangyihao ef2d536b96 fix(coding-agent): 修复 ACP 文件编辑权限请求 2026-05-17 09:40:50 +08:00
can1357 5523582735 test(coding-agent): minor fixes 2026-05-17 03:12:36 +02:00
can1357 cb05764eac feat(ai): added pi-native auth-gateway transport
- Added POST /v1/pi/stream endpoint that accepts canonical Context directly, skipping wire-format translation layers.
- Added client-side streamPiNative dispatch activated via Model.transport = "pi-native".
- Propagated transport field through model registry, provider overrides, and models.yml schema.
- Refactored deriveSessionId to accept explicit arguments instead of ParsedFormatRequest.
2026-05-17 03:05:57 +02:00
can1357 dc3d39df9e perf: optimized SSE debug cloning and model alias resolution
- Eliminated double clone of `raw` per SSE event by removing `toRawSseEvent` and relying on the single clone in `notifyRawSseEvent`.
- Extracted regex patterns as module-level constants to avoid recompilation on each call.
- Replaced sort-based model alias selection with a single-pass linear scan, reducing allocations.
2026-05-17 02:45:12 +02:00
can1357 42d86254df feat(coding-agent): added emoji shortcode autocomplete and inline replace
- Added bucketed emoji dataset with prefix-indexed lookup for O(log n) suggestions.
- Implemented `:name:` inline replace that fires on closing colon without popup.
- Wired emoji suggestions and completions into PromptActionAutocompleteProvider.
- Extended AutocompleteProvider interface with trySyncInlineReplace hook.
2026-05-17 02:32:12 +02:00
can1357 69aeb94621 fix(grievances): replaced hostname with platform/arch 2026-05-17 02:16:23 +02:00
can1357 c049613cab docs: added auth-broker, schema-normalize, install-id, and eval docs
- Added auth-broker-gateway.md covering remote OAuth vault, gateway forward-proxy, usage cache layering, and env surface.
- Added ai-schema-normalize.md documenting the unified tool-schema normalization pipeline and strict-mode edge cases.
- Added install-id.md describing the per-install UUID persistence and consumer contract.
- Rewrote eval.md to reflect structured JSON cells schema, removing the legacy `*** Cell` parser and Lark grammar.
- Updated environment-variables.md, models.md, sdk.md, secrets.md, lsp.md, session-tree-plan.md, ttsr-injection-lifecycle.md, and natives docs to match code changes.
2026-05-17 02:15:55 +02:00
can1357 0bb385f8ab feat(grievances): added consent gate & push
- Added `dev.autoqa.consent` setting and single-flight popup handler wired through `InteractiveMode`.
- Added `flushGrievances` to batch-POST unpushed rows to `dev.autoqaPush.endpoint` with cooldown and single-flight deduplication.
- Added `omp grievances push` subcommand with TTY progress bar for manual draining.
- Migrated shared DB logic to `openAutoQaDb` (with `pushed` column migration) exported from `report-tool-issue`.
2026-05-17 01:47:24 +02:00
jiwangyihao 3057cbc00d fix(coding-agent): defer ACP session startup 2026-05-17 07:37:25 +08:00
can1357 6120adbde2 perf(coding-agent): added PI_TIMING flag to log prompt durations
- Wrapped initial and subsequent print-mode prompts with `logger.time` for timing instrumentation.
- Printed collected timings after session run when `PI_TIMING` env var is set.
2026-05-17 01:33:16 +02:00
can1357 66259615de perf(coding-agent): added preconnect and conditional LSP warmup
- Added fire-and-forget `preconnectModelHost` to prime DNS/TCP/TLS/H2 before the first API call, saving 100–300ms on transcontinental connections.
- Skipped LSP warmup for non-UI (print/script) sessions to avoid CPU contention with LLM stream consumers.
2026-05-17 01:31:53 +02:00