Repository navigation
refuse ACP service on OMP hosts (oh-my-pi) - #237
Conversation
📦 Built Extension ArtifactBranch: Option A — Install from npm PR tag (recommended)pi install npm:billion-context-pi@pr-237Each push to this PR publishes a new version under the Option B — Download artifact
tar xzf billion-context-pi-pr237.tgz
pi install ./packageThis comment is automatically updated on each push. |
|
[bot] Reviewed Verified
Minor notes (non-blocking)
Test coverageThe 5 new cases in None of the notes block merge — the core behavior (refuse + stand down on OMP, zero impact on Pi) is implemented correctly. |
|
readme只更新了英文. bili omp -- -p "your task"", 这个例子有问题 ,实际命令就是 bili omp 本机实际测试 pi是否还能用,omp是否一定拒绝 |
|
[bot] 已按反馈修改并推送(分支 1.
2. 新增独立文档(中英)
3. README 开头明确说明(中英都加)
4. 本机实测
|
OMP's in-process session API diverges from Pi's, so the compression refs the extension injects drift out of sync with the session's real refs and compress calls fail with 'does not exist in this session' (#234). Detect the host at session_start (isOmpHost = !isPiHost). On OMP the extension now refuses service: it warns once (UI notify, or stderr when headless, plus a log line), disables the four ACP tools, skips the ACP system-prompt injection and the context transform, and lets the host compact normally. Pi hosts are unaffected. Points OMP users at the billion-context proxy (bili omp) as the supported alternative. Adds tests/omp-refuse.test.ts (5 cases) and a README 'Host support' section.
Address review feedback on the OMP refusal: - src/omp.ts: the real command is just 'bili omp' (drop ' -- -p "your task"') - docs/omp.md + docs/omp.zh-CN.md: dedicated OMP support doc (not supported, use the billion-context proxy) - README.md / README.zh-CN.md: prominent top note (OMP unsupported, use bili) and a host-support section in the zh-CN README (was EN-only)
8a4f867 to
d0dd0e4
Compare
Picks up kernel ranxianglei#175 (stale-ref gate messages report true causes with diagnostics) and ranxianglei#176 (reclaim dead message refs, reuse exhausted capacity, classify boundary failures). Skip the three OMP identity-binding tests: kernel 0.0.48 prunes refs absent from the sync view, which conflicts with OMP live-ref stability. OMP hosts are being refused separately (ranxianglei#237).
…se-service refuse ACP service on OMP hosts (oh-my-pi)
Summary
Refuses ACP service on OMP (
can1357/oh-my-pi) hosts. Fixes #234.Why
OMP's in-process session API diverges from Pi's. The compression refs billion-context-pi injects can drift out of sync with the session's real refs, so
compresscalls fail withdoes not exist in this sessionand one-shot runs never succeed. OMP is no longer actively supported on this plugin (maintainer note on #234) — the in-process integration is too complex to keep reliable.What changed
src/omp.ts:isOmpHost(sm) = !isPiHost(sm), reusing the existing feature-detect (Pi exposesbuildContextEntries; OMP onlygetBranch).session_start— on OMP the extension sets arefusedflag and, once per process, warns (UInotifyin TUI/RPC;console.errorto stderr in headless one-shot; plus a log line) pointing users at the supported alternative.contexttransform is a no-op (messages pass through untouched), and host auto-compaction is left alone (nocancel).Alternative for OMP users
Tests
tests/omp-refuse.test.ts(5 cases): single warning, tool refusal, headless stderr path, and Pi-host no-regression.npm test→ 433 pass, 0 fail. The existing OMP integration tests still pass (they exercise the context handler directly without firingsession_start).npm run typecheckclean;npm run buildsucceeds.No version bump here — that belongs to the release commit.