机器人指出之前的 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 路由。
@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.