| fix: resolved AI/OAuth helper duplication via shared modules
- Standardized missing-file read errors and now return File not found: <path> for absent edit targets.
- Centralized AI provider, usage, and OAuth helpers into shared modules to remove duplicated logic.
- Migrated OAuth/API-key login flows to shared factory helpers and removed inline prompt/token-exchange code.
- Reused shared tools and formatter utilities for discovery, stream tails, LSP batching, and source formatting.
- Consolidated repeated test helpers and fixtures into shared modules, replacing inline helper duplicates.
| 1 个月前 |
| fix(extensibility): added centralized session slash command discovery for extensions
- Added a shared session command helper that aggregates extension, prompt, and skill slash commands.
- Updated ACP, extension UI, runtime-init, and task executor extension contexts to return session command data instead of empty arrays.
| 17 天前 |
| refactor: replace named re-exports with star re-exports in barrel files
Convert export { A, B, ... } from and export type { ... } from blocks
to export * from across all packages (ai, coding-agent, natives, tui, utils).
| 2 个月前 |
| feat(deps): added pi.zod exports and removed TypeBox package exports
- Added canonical pi.zod schema API exports and removed TypeBox package exports/imports.
- Migrated Tool schema typing from TypeBox to shared TSchema/Zod flow with legacy TypeBox compatibility.
- Updated AI provider adapters and MCP/agent builders to convert tool params through toolWireSchema().
- Reworked schema validation from AJV to Zod-safe parsing with fromTypeBox, toolWireSchema, and meta schema checks.
| 17 天前 |
| fix(coding-agent): process @file before session creation; drop built-in flag-name list
Two review fixes for the extension-flag/initial-prompt work:
1. @file ordering — processFileArguments runs process.exit(1) on a
missing/unreadable file. It had been moved after createSession, which
writes the terminal breadcrumb eagerly (SessionManager.create →
#newSessionSync), so omp @missing.md "x" left a junk session/breadcrumb
behind before exiting.
Resolve extension-registered CLI flags BEFORE creating the session: load the
session's extensions up front (new loadSessionExtensions helper, the single
source of createAgentSession's discovery-branch logic), build an
ExtensionFlagSink straight from the loaded extensions + runtime, re-parse
argv, then process @file args — all before any session exists. The loaded
result is handed back to createAgentSession via preloadedExtensions (now
checked before disableExtensionDiscovery, so it can't double-load) and the
same EventBus is shared, so no extra work. This keeps the P1#1 fix
(--flag @value is the flag's value, not a file) while failing fast with no
session side effects.
2. "Can we avoid the big list of names?" — removed the hand-maintained
BUILTIN_FLAG_NAMES set (and its stale "rejected at registration" doc).
applyExtensionFlags now always falls back to recovering a flag's value from
argv when parseArgs didn't surface it; the recovery scan mirrors parseArgs's
consumption rules (flag-looking space-form values stay their own flag) and is
a no-op for flags that were absent or already surfaced, so no list of
built-in names is needed.
Adds ExtensionRunner.aggregateFlags (static) so getFlags and the CLI's
pre-session sink share one implementation.
Tests: pre-session flag resolution via the exact main.ts sink pattern;
list-free recovery of an arbitrary colliding built-in (--model); and the
flag-looking-value rule. Verified typecheck + extension/runner/acp suites.
| 1 天前 |
| refactor(tool-discovery): simplified tool discovery API by removing MCP-specific shims
- Removed deprecated MCP-specific type aliases and functions from tool-discovery module, consolidating to unified generic tool discovery API.
- Migrated session and SDK code to use generic filterBySource() and collectDiscoverableTools() instead of MCP-specific variants.
- Removed deprecated interface members including hasQueuedMessages(), FocusPane, AcpBuiltinCommandRuntime, and legacy settings methods.
- Updated test suites to use renamed generic discovery methods and removed back-compat test coverage for legacy MCP shapes.
| 6 天前 |
| fix(coding-agent/tools): reworked yolo approval resolution to honor user tool policies
- In resolveApproval, yolo mode now returns the user policy directly (allow/prompt/deny) and ignores tool override prompts.
- Updated approval-mode and approval unit tests to match the new behavior for critical bash patterns under yolo and auto-approve.
- Updated docs and settings metadata to describe yolo as user-policy-driven rather than override-driven.
| 5 天前 |