Skip to content

feat: add Oh My Pi (omp) agent support - #103

Merged
RealZST merged 7 commits into
RealZST:mainfrom
FelipeMayerDev:feat/omp-agent-support
Jul 23, 2026
Merged

feat: add Oh My Pi (omp) agent support#103
RealZST merged 7 commits into
RealZST:mainfrom
FelipeMayerDev:feat/omp-agent-support

Conversation

@FelipeMayerDev

@FelipeMayerDev FelipeMayerDev commented Jul 18, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds Oh My Pi (omp) as the 11th supported agent in HarnessKit.

Backend

  • New OmpAdapter for ~/.omp / ~/.omp/agent layout.
  • Discovers user/project skills:
    • ~/.omp/agent/skills/<name>/SKILL.md
    • .omp/skills/<name>/SKILL.md
  • Discovers MCP config:
    • ~/.omp/agent/mcp.json
    • .omp/mcp.json
    • JSON mcpServers format, including stdio command, remote url, args, env, and native enabled flag.
  • Discovers TypeScript/JavaScript extension modules as plugins:
    • ~/.omp/agent/extensions/*.{ts,js,mjs,cjs}
    • .omp/extensions/
  • Discovers native config/rules:
    • AGENTS.md, RULES.md, config.yml, settings.json.
  • Declares HookFormat::None because omp hooks are JS/TS event modules, not shell-command hook configs (same model as OpenCode).

Frontend

  • Adds omp to AGENT_ORDER and display names.
  • Adds theme color variables and extension filter colors.
  • Adds an Oh My Pi mascot using the official omp.sh/favicon.svg Ο€ logo (pinkβ†’purpleβ†’cyan gradient).
  • Updates onboarding layout for the new agent.

Docs

  • Updates English and Chinese README agent count and capability matrix.

Verification

  • cargo check -p hk-core βœ…
  • cargo test -p hk-core βœ… β€” 557 tests passed
  • npx tsc --noEmit βœ…
  • npx vitest run src/lib/__tests__/types.test.ts src/stores/__tests__/extension-helpers.test.ts βœ… β€” 76 tests passed
  • Manual smoke test against a real ~/.omp install βœ…
    • detected omp
    • read ~/.omp/agent/config.yml
    • discovered 3 real extension modules: orca-agent-status, orca-prefill, orca-titlebar-spinner

Screenshots

Overview β€” Oh My Pi detected

Overview with Oh My Pi

Agent details β€” Oh My Pi

Oh My Pi agent details

Extensions filtered by Oh My Pi

Extensions filtered by Oh My Pi

Oh My Pi mascot card crop

Oh My Pi mascot card

FelipeMayerDev and others added 7 commits July 18, 2026 13:45
Add omp as the 11th supported agent. omp (Oh My Pi) is a coding agent
harness with base dir ~/.omp and agent config under ~/.omp/agent/.

Capabilities mapped:
- Skills: ~/.omp/agent/skills/<name>/SKILL.md (user), .omp/skills/ (project)
- MCP: ~/.omp/agent/mcp.json (user), .omp/mcp.json (project) β€” JSON mcpServers
- Plugins: ~/.omp/agent/extensions/*.ts (TypeScript extension modules)
- Rules: ~/.omp/agent/{AGENTS,RULES}.md (user), .omp/{AGENTS,RULES}.md (project)
- Settings: ~/.omp/agent/config.yml (user), .omp/config.yml (project)
- Hooks: None (omp hooks are JS/TS event modules, not shell commands β€” same
  model as opencode)

Frontend: AGENT_ORDER, display name, color theme, onboarding animation,
extension filter colors, mascot fallback.
Uses the official omp favicon (π symbol with pink→purple→cyan gradient
on dark tile). Hover: gentle float + hue cycle. Click: glow burst +
scale pulse. Reduced-motion respected.
omp's extension loader globs only *.{ts,js} (discovery/helpers.ts,
docs/extension-loading.md) β€” .mjs/.cjs files are never loaded, so listing
them as plugins would surface entries omp itself ignores. Also correct the
comment claiming omp has no native disable mechanism: it does
(disabledExtensions in config.yml); the rename model is safe because the
loader's glob won't match a .disabled file.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…bled state

omp decides a server's effective state from three inputs (mcp/config.ts):
the user-level disabledServers denylist always wins, then the per-entry
enabled flag, and the user-level enabledServers allowlist can force a
server back on over enabled:false. Reading only the entry flag made HK
mis-report in both directions. Both lists live in the user mcp.json but
gate servers from every source, so project-scope reads consult them too.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Two surfaces the adapter missed vs upstream discovery (builtin.ts,
extension-loading.md):

- Directory-form extensions <name>/index.{ts,js} (TS preferred). The
  entry's path is the index file so HK's rename toggle keeps the plugin
  name (the directory) stable. package.json-manifest extensions remain
  unmodeled.
- Per-file rules rules/*.{md,mdc} at both user (~/.omp/agent/rules) and
  project (.omp/rules) scope, separate from the sticky RULES.md.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…imation polish

- find_disabled_plugin_path special-cased source "local" only for
  opencode; omp uses the same single-file plugin model, so re-enabling an
  externally-disabled omp extension (no DB snapshot) silently no-opped.
  Cover both plugin forms: top-level *.disabled files and directory-form
  <name>/index.{ts,js}.disabled, with manager-level regression tests.
- List mcp.json in global_settings_files so the servers file is browsable
  from the agent page (matches kiro).
- Drop the redundant File(".omp/mcp.json") project marker β€” Dir(".omp")
  necessarily matches first.
- Add omp to CLICK_DURATIONS (0.9s animations were cut at the 600ms
  default) and cover the root-level omp-float in prefers-reduced-motion.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Replace the generic remove+snapshot toggle with omp's native mechanism:
flip the entry's own `enabled` flag in place (absent means enabled), then
scrub the user-level list that would override it β€” enabledServers on
disable, disabledServers on enable. Entries, secrets, and extra keys
(type/url/headers) are never removed or redacted, and natively-disabled
servers can now be re-enabled (previously "No saved config" error).

The entry flag β€” not the disabledServers denylist β€” carries the toggle
because the denylist matches by name across all sources and would knock
out same-named servers in other projects.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@RealZST
RealZST merged commit 0c596d6 into RealZST:main Jul 23, 2026
3 checks passed
@RealZST

RealZST commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Thanks for adding OMP! I cross-checked every convention against the omp source and docs, then pushed five commits on top of yours:

  • 01c87bf β€” Your is_extension_file matched .ts/.js/.mjs/.cjs. We checked omp's loader: it only globs *.{ts,js} (https://github.com/can1357/oh-my-pi/blob/main/docs/extension-loading.md), so a .mjs/.cjs file would show up in HarnessKit as a toggleable plugin while omp never actually loads it. This commit narrows the match to .ts/.js.
  • 654f57b β€” Your MCP reader only looked at the per-entry enabled flag. omp actually applies two more user-level lists on top: the disabledServers denylist (always wins) and the enabledServers allowlist (overrides enabled: false). See https://github.com/can1357/oh-my-pi/blob/main/docs/mcp-config.md. This commit reads all three, so HarnessKit shows the state omp actually uses.
  • ce0ed01 β€” Your adapter discovered top-level extension files and the AGENTS.md/RULES.md context files. omp also discovers directory-form extensions (/index.{ts,js}) and per-file rules (rules/*.{md,mdc}, both user and project scope), so this commit adds those two surfaces to the scan.
  • 62f21ca β€” HarnessKit disables a plugin by renaming it to *.disabled and remembering the path in its DB. If the file was renamed outside HK (so there's no DB record), re-enable falls back to searching the plugin dir and re-deriving each plugin's ID β€” but that derivation only knew opencode's ID format, and your omp plugins use the same format. So re-enabling such an omp extension silently did nothing; fixed. Also small polish: mcp.json shown in the settings view, a redundant project marker removed, animation timing fixed.
  • 9c8b231 β€” MCP toggle used HarnessKit's generic remove+snapshot+restore path, which redacts secrets and can drop keys like type/url. omp natively honors the per-entry enabled flag, so this commit just flips that flag in place β€” nothing gets deleted or redacted, and servers disabled by omp itself can now be re-enabled from HK.

Heads up: the project-level .omp/extensions/ path currently has no effect β€” HarnessKit doesn't scan project-level plugins for any agent yet, so only ~/.omp/agent/extensions/ is picked up. It will start working as soon as I add project-level plugin scanning.

Thanks again! Merged.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants