Skip to content

[native] omp: three-mode alignment (proxy / launcher / native plugin) + runtime-info #957

Description

@ranxianglei

Goal

Bring omp to full three-mode alignment like pi / opencode / dsh already have:

  1. Mode 1 — proxy (URL prefix, exists today via launcher)
  2. Mode 2 — launcher (bili omp — exists)
  3. Mode 3 — native plugin (bili plugin install omp — the gap): plugin loaded by the CLIENT itself, spawns/attaches its own proxy, rewrites model traffic, registers ACP tools natively, stamps plugin-mode headers, implements the runtime-info protocol.

Feasibility pre-assessment

OpenCode-fork
HIGH — omp is an opencode fork; if it retains opencode's plugin API (config hooks / chat hooks / tool registration), the opencode v1 native path (src/agent/opencode-native.ts) ports almost directly. Start by diffing its plugin surface against opencode 1.x.

Reference implementations (read these first)

Requirements if feasible

  • No launcher, no env vars, no fixed port for the end user; opt-out env BILI_NATIVE_OMP=0
  • Plugin-mode gating: stamp x-bili-plugin ONLY after native tools are registered (round 1 rides wire mode)
  • Parent-pid watchdog proxy teardown; attach to a healthy proxy when present
  • Runtime-info stamps (model + contextWindow + maxOutput whenever the client exposes them)
  • npm run typecheck + npm test + npm run build green; new tests for the plugin module (see tests/dsh-native.test.ts for the harness style)
  • README (en + zh) client table + install section updated

If NOT feasible

Post the evidence (what extension points exist, why wire interception / native tools are impossible) and close as wontfix — a documented no is a deliverable too.

For ework

This issue is directly implementable. Follow the dsh playbook; ask in this thread before inventing new protocol surface. PR must reference this issue (Fixes #N).

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions