Skip to content

feat(mubu): add Mubu agent harness#99

Open
cnfjlhj wants to merge 5 commits intoHKUDS:mainfrom
cnfjlhj:feat/add-mubu-harness
Open

feat(mubu): add Mubu agent harness#99
cnfjlhj wants to merge 5 commits intoHKUDS:mainfrom
cnfjlhj:feat/add-mubu-harness

Conversation

@cnfjlhj
Copy link

@cnfjlhj cnfjlhj commented Mar 18, 2026

Description

This PR adds a new cli-anything-mubu harness for the Mubu desktop app.

The harness exposes an agent-oriented CLI with:

  • local discovery from backups, RxDB metadata, and sync logs
  • live node inspection from the authenticated desktop session
  • dry-run-first mutation primitives for update-text, create-child, and delete-node
  • a packaged REPL, generated SKILL.md, harness tests, and a CLI-Hub registry entry

Before opening this PR, I tightened the harness for upstream use:

  • daily helpers no longer assume a hardcoded personal folder and now require an explicit folder reference or MUBU_DAILY_FOLDER
  • packaged docs and generated skill content now use placeholders instead of personal-looking examples
  • live E2E checks now skip environment-specific SSL/certificate transport failures instead of reporting harness regressions
  • the Mubu harness version and registry entry were bumped to 0.1.1

Since opening the PR, I also hardened the harness against real-world Mubu history edge cases discovered in deeper installed/live testing:

  • logical duplicate document paths are now deduplicated by freshest metadata so open-path resolves repeated Mubu history entries predictably
  • backup-driven show and links output now overlay document metadata titles and paths instead of leaking root-node titles as document names
  • public mubu-cli state now defaults to ~/.config/mubu-cli for new users while preserving fallback to the legacy ~/.config/cli-anything-mubu state dir
  • targeted regression tests were added for duplicate document resolution, metadata overlay behavior, and state-dir branding fallback

Type of Change

  • New Software CLI — adds a CLI harness for a new application
  • Bug Fix — fixes incorrect behavior
  • New Feature — adds new functionality to an existing harness or the plugin
  • Documentation — updates docs only
  • Other — please describe:

For New Software CLIs

  • MUBU.md SOP document exists at mubu/agent-harness/MUBU.md
  • SKILL.md exists inside the Python package (cli_anything/mubu/skills/SKILL.md)
  • Unit tests at cli_anything/mubu/tests/test_core.py are present and pass without backend
  • E2E tests at cli_anything/mubu/tests/test_full_e2e.py are present
  • README.md includes the new software (with link to harness directory)
  • registry.json includes an entry for the new software (for the CLI-Hub)
  • repl_skin.py in utils/ is an unmodified copy from the plugin

For Existing CLI Modifications

  • All unit tests pass: python3 -m pytest cli_anything/mubu/tests/test_core.py -v
  • All E2E tests pass: python3 -m pytest cli_anything/mubu/tests/test_full_e2e.py -v
  • No test regressions — no previously passing tests were removed or weakened
  • registry.json entry is updated if version, description, or requirements changed

General Checklist

  • Code follows existing patterns and conventions
  • --json flag is supported on any new commands
  • Commit messages follow the conventional format (feat:, fix:, docs:, test:)
  • I have tested my changes locally

Test Results

cd mubu/agent-harness
python3 -m pytest cli_anything/mubu/tests -q
........................................................................ [ 67%]
.................................                                        [100%]
106 passed in 93.06s

python3 -m unittest cli_anything/mubu/tests/test_agent_harness.py -v
# 11 tests OK

cnfjlhj added 3 commits March 18, 2026 12:18
Require an explicit daily folder reference or MUBU_DAILY_FOLDER for daily helpers, scrub personal examples from docs and generated skill content, and harden live E2E checks for environment-specific SSL failures.
Update the package metadata, generated skill output, test expectations, and registry entry so the contribution PR reflects the generalized daily-folder behavior in the published harness version.
cnfjlhj added 2 commits March 18, 2026 17:13
Deduplicate logical document paths by freshest metadata so open-path resolves real Mubu history duplicates consistently. Overlay backup-driven show/link output with metadata titles and doc paths, and default new public state to ~/.config/mubu-cli while preserving legacy fallback.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants