mirror of
https://github.com/mksglu/context-mode.git
synced 2026-11-23 13:11:14 +08:00
feat: ADR-0023 omp row, PRD and TECH-SPEC 11 agents, 01-contracts and 12-plugins name OMP, intake reads OMP (OMP M8)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ea76836de8
commit
48cdd04422
8 files changed
+11
-6
No files matched your search
@@ -45,7 +45,7 @@ export const ITEMS = [
|
||||
export const READY_KEYS = ["version", "steps", "output"];
|
||||
|
||||
const AGENT_MARKERS = ["claude code", "claude-code", "claude", "codex", "gemini cli", "gemini", "qwen code", "qwen", "opencode",
|
||||
"pi coding agent", "pi", "copilot cli", "copilot", "vs code", "vscode", "kiro", "zcode", "cursor"];
|
||||
"pi coding agent", "pi", "oh-my-pi", "omp", "copilot cli", "copilot", "vs code", "vscode", "kiro", "zcode", "cursor"];
|
||||
const RUNTIME_MARKERS = ["node", "bun"];
|
||||
const OS_MARKERS = ["linux", "macos", "darwin", "windows", "win32", "wsl", "ubuntu", "debian", "fedora", "alpine"];
|
||||
const OBSERVED_MARKERS = ["observed", "actual", "what happened", "output", "error", "warning"];
|
||||
|
||||
@@ -299,3 +299,4 @@ Split: this file holds the deviation rows without a date (format: id, files, dec
|
||||
| D-OMP-FIRE-1 | tests/0020-fire-plugin-ext.test.mjs ("ADR-0020 fire omp", T36-T42), src/adapters/pi.ts (decodeOmp), src/adapters/table.ts (omp row decode), tests/0020-adapters.test.mjs | ADR-0026 M7, support matrix rows 7, 8, 10, 11, 13; tests T36-T42 | The live OMP fire block runs the real omp from PATH (skips when absent) in a temp HOME with a fake OpenAI-compatible model on port 0, links the built package with `omp plugin link <dir>`, runs print mode with stdin from /dev/null and RPC mode through a JSON-lines driver. The first live run showed context.db rows with agent pi: the omp row used the Pi decode, which names the agent pi. The omp row now uses decodeOmp (the Pi decode, agent omp); the Pi row and Pi request bytes stay as they are (ADR-0021). The 9 ctx_* names are the names OMP sends: ctx_execute, ctx_batch, ctx_index, ctx_search, ctx_resume, ctx_stats, ctx_doctor, ctx_upgrade, ctx_purge. |
|
||||
| D-OMP-FIRE-1 (M7b) | e2e/cases/GP2-prompt-surface.e2e.mjs (GP2/omp-system-prompt-append), e2e/cases/GP3-hooks.e2e.mjs (GP3/omp-tool-call-block, omp-tool-result-replace, omp-input-captured, omp-compact-resume), e2e/cases/GP11-doctor-upgrade.e2e.mjs (GP11/omp-doctor-real-paths, omp-upgrade-no-pi-write, ALLOWED_ROOT_KEYS), e2e/golden/GP1/package-json-npm-d1-in-out.json | ADR-0026 M7, tests T44-T50 | The e2e cases load the built release-out/omp/index.js in a child process with a fake OMP extension API (on, registerTool) in a temp HOME and a git repo cwd, as the Pi GP11 driver does. They are tagged [M7]. The GP3 driver ends on its own (no process.exit) so the async tool_result rows reach context.db before the rows are read. The live omp run of the same paths stays in tests/0020 "fire omp". The GP1 package.json golden and the GP11 allowed root keys now carry the omp key and "11 coding agents" (from M4b, de525dc3). T51 GP1/omp-native-install waits for docs/install/omp.md (M8). |
|
||||
| D-OMP-CI-1 | .github/workflows/ci.yml (job ci: "omp 18.20.0 (native install script)" unix and Windows steps, "omp version", "OMP e2e cases GP2, GP3, GP11"), tests/0014-repo-hygiene.test.mjs ("ci.yml: OMP 18.20.0 installs with its own script on every OS ... (D-OMP-CI-1)") | ADR-0026 M7 CI job | OMP 18.20.0 installs from its own script (`sh -s -- --binary --ref v18.20.0`; Windows: the same install.ps1 as a scriptblock with `-Binary -Ref v18.20.0`) into `runner.temp/omp-bin`, 3 tries, then `omp --version` fails the job on every OS, so the omp fire block in tests/0020-fire-plugin-ext runs live in the v2 unit tests step and never skips. A separate step runs the [M7] OMP e2e cases (T44-T50) on every OS. ci.yml push branches are main, v2, v2-design, impl/**, so the lane branch does not start this job; it runs on the merge to main. Red 1ab8abf4, green next commit; YAML parse ok (PyYAML, 38 steps), e2e/checks/ci-config.mjs ok. No runtime code path changed, so no profile run. |
|
||||
| D-OMP-DOCS-1 | docs/install/omp.md (new), docs/install/README.md (11 agents, OMP rows), README.md (install-omp block, picker, stats row), build/check-install-docs.mjs (NATIVE_HOSTS omp), docs/architecture/adr/ADR-0023-native-install.md (omp row), PRD.md, TECH-SPEC.md, modules/01-contracts.md, modules/12-plugins.md, .github/scripts/issue-intake.mjs (AGENT_MARKERS omp, oh-my-pi), tests/0023-install-docs.test.mjs (T52), tests/0014-repo-hygiene.test.mjs (11 rows, intake omp) | ADR-0026 M8 docs | OMP install docs use only OMP's own verbs: `curl -fsSL https://omp.sh/install \| sh` or `irm https://omp.sh/install.ps1 \| iex` for OMP, then `omp plugin install\|upgrade\|uninstall context-mode` and `omp update`; 10 -> 11 agents. feature.yml already listed omp; bug.yml and agent-report.yml have no agent list, so intake reads OMP from free text. | Owner main rule: each agent's own native install command (ADR-0023). |
|
||||
@@ -32,7 +32,7 @@ Current outcome counts, from `https://github.com/mksglu/context-mode/blob/274600
|
||||
|
||||
## 3. Agents and architecture
|
||||
|
||||
v2.0 ships exactly 10 agents (TECH-SPEC §2):
|
||||
context-mode supports 11 agents (TECH-SPEC §2); OMP is the 11th (ADR-0026):
|
||||
|
||||
| Agent | Install mode |
|
||||
|---|---|
|
||||
@@ -46,6 +46,7 @@ v2.0 ships exactly 10 agents (TECH-SPEC §2):
|
||||
| ZCode | hooks + MCP |
|
||||
| Pi | in-process plugin |
|
||||
| OpenCode 2 | in-process plugin |
|
||||
| OMP | in-process plugin |
|
||||
|
||||
No other agent ships in v2.0. No CLI and no `cli.mjs` entry (ADR-0002, ADR-0010): install, update and diagnosis run through each host's own mechanism and through the `ctx_doctor`/`ctx_upgrade` tools.
|
||||
|
||||
|
||||
@@ -69,8 +69,8 @@ M7 is not done. Open items are listed in `https://github.com/mksglu/context-mode
|
||||
|
||||
## 2. Scope
|
||||
|
||||
- **[D] Agents (10):** Claude Code, Codex CLI, Gemini CLI, Qwen Code, Copilot CLI, VS Code Copilot, Kiro, ZCode, Pi, OpenCode 2.
|
||||
- **[D] Removed:** agy (PRD §15.5), OMP (G20), Cursor, JetBrains, Zed, Kimi, Kilo, OpenClaw, OpenCode 1.x, Codex Desktop.
|
||||
- **[D] Agents (11):** Claude Code, Codex CLI, Gemini CLI, Qwen Code, Copilot CLI, VS Code Copilot, Kiro, ZCode, Pi, OpenCode 2, OMP. OMP came back as its own agent in ADR-0026.
|
||||
- **[D] Removed:** agy (PRD §15.5), Cursor, JetBrains, Zed, Kimi, Kilo, OpenClaw, OpenCode 1.x, Codex Desktop.
|
||||
- **[D]** One `context.db` per project (G21, ADR-0002). Users install with `npm i -g context-mode && context-mode setup` (ADR-0019); the git `release` branch stays for the Claude Code marketplace (G12–G14, G22). Users get 3 command skills (`/ctx-stats`, `/ctx-doctor`, `/ctx-upgrade`) plus this repo's own `/release` skill (not shipped to users); `ctx_doctor` and `ctx_upgrade` are MCP tools; `context-mode doctor` and `context-mode upgrade` are the CLI forms that can fix (ADR-0010, ADR-0019 section 2).
|
||||
|
||||
The PRD was rewritten on 2026-10-15 to match this spec; no PRD line is superseded.
|
||||
|
||||
@@ -49,6 +49,7 @@ Owner decision for Claude Code (`https://github.com/mksglu/context-mode/blob/274
|
||||
| qwen | `qwen extensions install https://github.com/mksglu/context-mode:context-mode` | GitHub repo (today `--ref release`); fallback: `qwen extensions link <pkg dir>` by setup | `qwen extensions update context-mode` | Extension manifest and hooks as for Gemini, at the source root | Research result did not reach this step. Must confirm a source with no `release` ref, and whether an npm source exists. |
|
||||
| pi | `pi install npm:context-mode` | npm package | `pi update --extensions` | Pi package entry (in-process hooks, skills) in the npm tarball | Research result did not reach this step. Must confirm on the current Pi version. |
|
||||
| opencode | add `context-mode` to the `plugin` list in `opencode.json` | npm package name (OpenCode plugin list) | OpenCode fetches the plugin package again | `opencode/plugin.js` (in-process hooks) in the npm tarball | Research result did not reach this step. MCP entry may still need setup. |
|
||||
| omp | `omp plugin install context-mode` | OMP plugin store, by name (OMP 18.20.0) | `omp plugin upgrade context-mode`; OMP itself: `omp update` | `pi` key and OMP extension in the npm tarball (in-process hooks, tools, skills) | Added by ADR-0026; remove: `omp plugin uninstall context-mode`. |
|
||||
| copilot-cli | not decided | not decided | not decided | MCP config, hooks, skills | Research result did not reach this step. Today only `context-mode setup` installs it. |
|
||||
| vscode | not decided | not decided | not decided | MCP config, hooks, skills | Research result did not reach this step. Today only `context-mode setup` installs it. |
|
||||
| kiro | not decided | not decided | not decided | MCP config, hooks, skills | Research result did not reach this step. Today only `context-mode setup` installs it. |
|
||||
|
||||
@@ -16,7 +16,7 @@ Write them in this order: `types.ts` needs `AgentId` from `agents.ts`; `errors.t
|
||||
Exports:
|
||||
|
||||
```ts
|
||||
export const AGENT_IDS = ["claude-code","codex","gemini","qwen","copilot-cli","vscode","kiro","zcode","pi","opencode"] as const;
|
||||
export const AGENT_IDS = ["claude-code","codex","gemini","qwen","copilot-cli","vscode","kiro","zcode","pi","opencode","omp"] as const; // omp: ADR-0026
|
||||
export type AgentId = typeof AGENT_IDS[number];
|
||||
```
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@ Imports allowed (00 §2, module row `plugins`): `contracts`, `server` (`TOOLS`,
|
||||
|
||||
Files this module owns (00 §1): `src/entries/pi.ts`, `src/entries/opencode.ts`.
|
||||
|
||||
OMP (ADR-0026) loads the same `src/entries/pi.ts` build from its plugin store (`omp plugin install context-mode`); the entry names the host `omp` and keeps Pi and Pi-Bolt request bytes as they are (ADR-0021).
|
||||
|
||||
## 1. Why these two files are different from every other entry
|
||||
|
||||
Every other agent reaches context-mode over MCP: a spawned `server.mjs` process, and a spawned `hook.mjs` process per hook event. Pi and OpenCode 2 run context-mode **in-process** (PRD §3 "in-process plugin agents (Pi, OpenCode 2) … no spawn, no MCP hop"). `src/entries/pi.ts` and `src/entries/opencode.ts` are the only two files that call `TOOLS`, `INSTRUCTIONS`, and `handleHook` as plain function imports inside the host's own process, instead of over stdio or a child process.
|
||||
|
||||
@@ -203,7 +203,7 @@ describe("ADR-0023 native install commands per host", { concurrency: CONC }, ()
|
||||
assert.ok(spec.includes("**[D] Agents (11):**") && spec.includes("OpenCode 2, OMP."), "TECH-SPEC agent list");
|
||||
assert.ok(read("docs", "architecture", "modules", "01-contracts.md").includes('"pi","opencode","omp"] as const'), "01-contracts AGENT_IDS");
|
||||
assert.ok(read("docs", "architecture", "modules", "12-plugins.md").includes("ADR-0026"), "12-plugins names the OMP plugin");
|
||||
assert.ok(read("docs", "architecture", "modules", "DEVIATIONS.md").includes("| D-OMP-DOCS-1 |"), "DEVIATIONS row");
|
||||
assert.ok(read("docs", "architecture", "DEVIATIONS.md").includes("| D-OMP-DOCS-1 |"), "DEVIATIONS row");
|
||||
});
|
||||
|
||||
test("install-native: the real pages pass checkNativePages", () => {
|
||||
|
||||
Reference in new issue
Block a user