442ee57283
Two client-level paths in the LSP tool bypassed the combined tool-timeout/ caller abort signal built in `LspTool.execute`, so a wedged server hung past the advertised tool deadline and past user cancellation: - `getOrCreateClient` took no `AbortSignal` and its `initialize` `sendRequest` was invoked with `signal = undefined`. With no signal and no explicit `timeoutMs`, `sendRequest` fell back to the hard-coded `DEFAULT_REQUEST_TIMEOUT_MS = 30000` internal timer, so a first-use `lsp` call against a server that wedged in `initialize` ignored the 20s tool default (and any user-supplied shorter `timeout`) until the 30s internal timer fired. - `writeMessage`/`queueWriteMessage`/`sendNotification` had no timeout and no signal, so a `textDocument/didOpen`/`didChange`/`didSave` sent to a server that stopped draining stdin awaited `sink.flush()` forever. Because writes serialize through `client.writeQueue`, every later op on the client stalled behind the stuck flush too. Thread the caller `AbortSignal` through `getOrCreateClient` (initialize + initialized notification) and through `sendNotification` / `queueWriteMessage` / `writeMessage` so the sink flush is raced against the signal. On abort, tear the client down: kill the process and evict it from the active-clients map so the next `getOrCreateClient` call spawns a fresh server instead of queueing behind the wedged sink. Update the LSP tool callsites and internal helpers (`captureDiagnosticVersions`, `captureOpenFileVersions`, `syncFileContent`, `notifyFileSaved`, `formatContent`, `getDiagnosticsForFile`, `reloadServer`, and the rename didClose / didRenameFiles path) to forward their operation signal. Warmup keeps its short explicit `initTimeoutMs` and passes no caller signal; `sendRequest`'s existing `timeoutMs ?? (signal ? undefined : DEFAULT)` policy still uses that fixed timer. Fixes #3962
@oh-my-pi/pi-coding-agent
Core implementation package for the omp coding agent in the oh-my-pi monorepo.
For installation, setup, provider configuration, model roles, slash commands, and full CLI reference, see:
Package-specific references:
Memory backends
The agent supports three mutually-exclusive memory backends, selected via the memory.backend setting (Settings → Memory tab, or ~/.omp/config.yml):
off(default) — no memory subsystem runs.local— existing rollout-summarisation pipeline; writesmemory_summary.mdand consolidated artifacts under the agent dir.hindsight— talks to a Hindsight server (Cloud or self-hosted Docker), retains transcripts every Nth user turn, recalls memories on the first turn of a session, and exposesretain,recall, andreflect.
Hindsight quickstart
- Run a Hindsight server (Cloud or
docker run -p 8888:8888 ghcr.io/vectorize-io/hindsight:latest). - Set
memory.backend = "hindsight"andhindsight.apiUrl = "http://localhost:8888"(or your Cloud URL). - Optional environment overrides (env wins over settings):
HINDSIGHT_API_URL,HINDSIGHT_API_TOKEN— connectionHINDSIGHT_BANK_ID,HINDSIGHT_DYNAMIC_BANK_ID,HINDSIGHT_AGENT_NAME— bank addressingHINDSIGHT_AUTO_RECALL,HINDSIGHT_AUTO_RETAIN,HINDSIGHT_RETAIN_MODE— lifecycleHINDSIGHT_RECALL_BUDGET,HINDSIGHT_RECALL_MAX_TOKENS— recall sizingHINDSIGHT_BANK_MISSION,HINDSIGHT_DEBUG
Switching backends mid-session is honoured on the next system-prompt rebuild and the next /memory slash command. Existing users with memories.enabled = true|false are migrated to memory.backend = "local"|"off" exactly once on first launch.