Release v0.1.4 — CLI Evolution Phase 1#12
Merged
ApiliumDevTeam merged 124 commits intomainfrom Mar 5, 2026
Merged
Conversation
The deriveIdHint() function was returning "mayros-bluebubbles" from the npm package name, but plugin manifests use short IDs like "bluebubbles". Strip the "mayros-" prefix so hints match manifests and eliminate 38 config warnings on startup. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…t timeout - Android bundle-playstore job now skips gracefully when KEYSTORE_FILE secret is not configured, instead of failing with ENOENT - Increase Discord pairing test timeout from 10s to 60s to handle slow CI runners under heavy load Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- llm-task, open-prose: use mayros/plugin-sdk instead of relative path - llm-task, open-prose: add missing devDependency on @apilium/mayros - googlechat, memory-core: fix peerDependency version to >=0.1.0 - skill-hub: add missing semver dependency Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Makes CLI exit points testable by routing through the runtime abstraction instead of calling process.exit directly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- command-registry: pass argv param instead of using process.argv - register.subclis: wrap eager registration in Promise.allSettled to prevent a single failing subcli from breaking others Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Move ALLOWED_INVALID_COMMANDS and ALLOWED_INVALID_GATEWAY_SUBCOMMANDS to shared lightweight-commands module - Add shouldRegisterPrimarySubcommand guard in run-main - Add resetConfigGuardForTest helper Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use pickGatewayPort() instead of hardcoded 18789 so the SSH tunnel command matches the actual configured gateway port. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Allows tests to reset the bannerEmitted state between test cases. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- clearAgentRunContext: also clear seqByRun entry to prevent stale sequence numbers across runs - resetAgentRunContextForTest: clear all Maps (runContextById, seqByRun, listeners) for complete test isolation - Add missing resetAgentRunContextForTest() call in 3rd test Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use { hash?: string } instead of any for the createTriple no-op stub.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add 3 new patterns: 'do not follow system/developer', 'developer message', and XML-tag injection (<system>, <assistant>, etc.) - Add 7 tests for uncovered regex variants: forget, pretend, you should, run bash, override instructions, wget, eval Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- prepareContext: batch listTriples calls in groups of 5 with Promise.all to reduce sequential Cortex round-trips - mergeResults: pre-fetch all parent text values into a Set to eliminate N+1 dedup queries - Add removeInjectedContext to prevent memory leaks from accumulated delegation contexts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Store companion triple with full original predicate alongside conflict-flag triple for unambiguous resolution - resolveConflicts: look up companion triple for exact original predicate, with endsWith fallback for legacy data - Clean up companion triples when resolving conflicts Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Using owners[0] as grantor was incorrect — the first owner cannot grant admin to themselves. Use 'system' as the grantor instead. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Hooks: - subagent_spawning: use typed event.agentId/label/childSessionKey instead of as Record casts - subagent_ended: use event.targetSessionKey/outcome/runId, clean up injected context on end - before_agent_start: mark unused event as _event - agent_end: use typed event.success instead of cast Tools: - mesh_share: enforce namespace prefix on subject and predicate - mesh_query: two-step query via ownership triples instead of single patternQuery that could leak cross-namespace data - mesh_conflicts: remove always-true conditional after early return - CLI share: add write access check before createTriple Infra: - Bound messageLog to 1000 entries via appendToMessageLog helper - Add ensureNsPrefix utility for consistent namespace enforcement Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove dead before_agent_start hook (event.skills does not exist on PluginHookBeforeAgentStartEvent) - Remove before_tool_call hook and toolCallTimers map; rewrite after_tool_call using typed event.toolName/params/result/durationMs - Fix LLM hooks: use event.runId instead of callId, event.usage.input and event.usage.output instead of promptTokens/completionTokens - Remove redundant String() wrapper on event.model (already string) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- semantic-skills before_tool_call: use typed event.toolName directly - semantic-skills after_tool_call: use typed event.toolName and event.result directly, remove redundant null guard - memory-semantic before_compaction: use typed event.messages directly instead of casting to Record<string, unknown> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The test exercises /bash via handleCommands but did not call resetBashChatCommandForTests() first, risking stale activeJob state from prior tests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
## Summary - **Rewrite extension hooks** to use typed event fields instead of `as Record<string, unknown>` casts across semantic-observability, semantic-skills, memory-semantic, and agent-mesh (eliminates 13 unsafe casts) - **Harden agent-mesh**: namespace-prefix enforcement on share/query tools, bounded message log, ACL grant fix, companion triples for conflict resolution, batched delegation queries - **Replace `process.exit`** with `defaultRuntime.exit` in 4 CLI modules (hooks, logs, plugins, help) for testability - **Fix CLI command registration**: pass argv explicitly, use `Promise.allSettled` for subcli registration, extract lightweight-commands constants - **Add injection detection patterns** (3 new) and **variant test coverage** (7 new tests) in enrichment-sanitizer - **Fix agent-events state cleanup**: clear seqByRun + listeners in reset, add missing test resets in agent-events and commands tests - **Fix extension packages**: import paths (`mayros/plugin-sdk`), missing devDependencies, peerDependency versions 17 atomic commits, 33 files, 406 insertions, 260 deletions. ## Test plan - [x] `npx tsc --noEmit` — 0 errors - [x] `pnpm build` — clean - [x] `pnpm test -- src/infra/agent-events.test.ts extensions/semantic-skills/enrichment-sanitizer.test.ts src/auto-reply/reply/commands.test.ts` — all pass - [x] `grep -n "as Record" extensions/semantic-observability/index.ts` → 0 matches - [x] `grep -n "(event as Record" extensions/memory-semantic/index.ts` → 0 matches - [x] `grep -n "process\.exit" src/cli/hooks-cli.ts src/cli/plugins-cli.ts src/cli/logs-cli.ts src/cli/program/help.ts` → 0 matches - [x] Full test suite `pnpm test` — no regressions
- Add skills?: Array<{ name, dir, frontmatter? }> to the event type
- Map skillEntries into the event payload in attempt.ts so plugins
receive loaded skill data at runtime
Remove as Record casts — both before_agent_start hooks now use the typed skills array directly. Eliminates redundant type guards since the array elements are properly typed.
Prevent code continuation in test environments where exit() is mocked by adding return statements after three exit(1) calls that lacked them.
Use the centralized DEFAULT_GATEWAY_PORT from config/paths instead of magic numbers in discover.ts, daemon.ts, and register.ts.
Replace console.error with defaultRuntime.error for testability in the eager subcli registration path. Remove unused argv parameter from shouldEagerRegisterSubcommands.
runCli rewrites argv (e.g. --update to update) but buildProgram, registerPreActionHooks, and configureProgramHelp read raw process.argv directly, missing the rewrite. Thread the normalized argv from runCli through the entire build pipeline.
Build the params object with all fields upfront instead of mutating through unsafe as Record<string, unknown> casts after construction.
Local development reference, same treatment as CLAUDE.md.
Register code-cli as a subcli and wire no-subcommand fallback in run-main.ts so bare `mayros` launches the interactive TUI session. Includes 4 tests for option parsing and defaults.
Bare `mayros` now checks wizard.lastRunAt: if missing, redirects to `mayros onboard`; otherwise launches `mayros code`. Add onboard/code to ALLOWED_INVALID_COMMANDS so they work without valid config. Add 9 TUI slash commands (/plan, /kg, /trace, /team, /tasks, /workflow, /rules, /mailbox, /onboard) that delegate to the agent via structured messages, bridging Phase 2-5 features into the interactive session. Includes 3 first-run gate tests and 13 ecosystem command tests.
Implement `mayros batch run` for processing multiple prompts in parallel with configurable concurrency. Supports JSONL and text (--- separated) input formats, JSON-lines output, per-prompt timeout, and result streaming. Includes 18 tests covering input parsing and type validation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implement `mayros teleport export/import/inspect` for portable session bundles. Exports session transcript (base64), store metadata, and Cortex triples as a single JSON file. Import restores all components with optional session key remapping. Includes 19 tests covering export, import, validation, and round-trip integrity. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
New extension with pull-based delta sync protocol between Cortex instances. Includes sync-protocol (conflict detection, LWW resolution, reconciliation), peer-manager (Cortex-backed peer state, lifecycle), plugin entry (3 tools: sync_status/sync_now/sync_pair, auto-sync hooks), and sync CLI (status/pair/remove/now). 36 tests covering protocol logic, conflict strategies, and peer management. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extends ProjectMemory with ingestMayrosMd() to parse markdown sections into Cortex triples (conventions, key files, build commands, decisions). Adds CortexClient.listTriplesSince() for timestamp-based delta queries. Integrates sync pairing into onboarding wizard and registers /batch, /teleport, /sync TUI slash commands with their handlers.
Introduces IntelliJ Platform plugin for Mayros with Gradle build config, WebSocket JSON-RPC client mirroring the VSCode extension protocol, application-level service for connection lifecycle, chat tool window with message history and streaming, and persistent settings state.
Completes the IntelliJ plugin with agents tree view, trace events table panel, quick settings panel, send-selection and explain-code editor context actions, TODO/FIXME gutter line markers, and WebSocket client unit tests.
Use execute() with details return instead of handler(), return content as typed array, and replace registerHook() with api.on() for hooks.
batch-cli: clear timeout handle to prevent memory leak in batch ops teleport: fix transcript filename on remap, use replaceAll for triple subject remapping, add Array.isArray guard in validateBundle, fix ~ path expansion with os.homedir() fallback sync-protocol: guard against NaN dates in resolveConflict and buildLocalDelta sort, change > to >= for inclusive delta boundary, simplify redundant reconcile condition cortex-client: fix listTriplesSince off-by-one (> to >=) + NaN guard project-memory: add fallback for empty slugify result, relax convention detection to sectionDepth >= 1 onboarding: add URL format validation for peer endpoint and alphanumeric check for peerId jetbrains: fix Timer leak in reconnect, clear event listeners on reconnect to prevent duplicates, use consistent session keys in editor actions, add Logger for WebSocket parse errors, add clearEventListeners
- Replace global clearEventListeners() with per-panel unsubscribe pattern (ChatPanel and TracesPanel track their own listeners) - Remove MayrosClient.clearEventListeners() (no longer needed) - Add randomUUID suffix to slugify fallback for collision safety - Add skipSync to onboarding test that was failing from sync step - Document inclusive >= boundary design decision in sync-protocol
…solation - project-memory: add continue after non-build cmdMatch to prevent bulletMatch fallthrough; normalize CRLF before splitting lines - teleport: use Buffer byte length for transcriptSize instead of string length; guard NaN port with Number.isFinite fallback - onboarding: use validated endpoint variable instead of dead code; trim peerId once into local variable - onboarding tests: add skipSync to remaining tests; mock onboard-mcp - JetBrains MayrosClient: @volatile on shared state fields; CopyOnWriteArrayList for event listeners; cancel reconnectTimer in disconnect(); snapshot pending requests before clear - JetBrains MayrosService: CopyOnWriteArrayList for listeners; @volatile client; @synchronized connect() - JetBrains panels: clear listener list on reconnect instead of calling off() on wrong (new) client instance
…nd JetBrains Fix output ordering in batch CLI, atomic session store writes in teleport, null-byte conflict keys and stable JSON comparison in sync protocol, sort-before-limit in project memory queries, ScheduledExecutorService for reconnect in JetBrains client, EDT-safe listener notifications, and project-scoped gutter session keys.
…ple remapping Clear timeout timer in syncWithPeer via try/finally, filter stats by active status only, add Disposable to ChatPanel and TracesPanel with listener cleanup, remap projectMemory triples and node references on teleport import, graceful executor shutdown in MayrosClient, safe asString in TracesPanel, sync-cli error handling, and peer ID validation feedback in onboarding.
Sync 46 extension packages, VSCode extension, and JetBrains plugin to version 0.1.4. Add missing SVG icon for JetBrains tool windows, add @service annotation to MayrosSettings for proper IDE lifecycle.
The cortex-sync extension lacked a mayros.plugin.json file, causing the manifest registry to emit error diagnostics during bundled plugin discovery. This polluted config validation results and caused two plugin-validation tests to fail. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
VSCode and JetBrains plugins are being published for the first time, so they start at 0.1.0 independently of the core Mayros version. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ugin Add Gradle 8.12 wrapper (gradlew) so the plugin can be built without a system Gradle install. Set Java source/target compatibility to 17 to match the Kotlin jvmTarget and IntelliJ Platform requirements. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…xtension Port JetBrains-exclusive features: "Explain Code" and "Send Selection" context menu actions with editor selection support, CodeLens gutter markers for TODO/FIXME/HACK/mayros: comments, and upgrade the WebSocket client to gateway protocol v3 with challenge-response handshake.
…tBrains plugin Consolidate six separate tool windows into a single tabbed panel with a setup screen for disconnected state and auto-detection of gateway token from ~/.mayros/mayros.json. Add Skills, Plan, and Knowledge Graph panels, agent filter on Traces, HTML chat bubbles with theme-aware colors, and upgrade MayrosClient to gateway protocol v3 with challenge-response handshake.
Rename `mayros dashboard` → `mayros team-dashboard` and `mayros doctor` → `mayros diagnose` for clarity. Update ci-plugin and lsp-bridge workspace dependencies to use @apilium/mayros scope. Add gitignore entries for JetBrains and VSCode extension build artifacts.
Gateway propagates isHeartbeat flag on chat events so TUI can suppress heartbeat noise. History loader strips heartbeat prompt/response pairs. Slash commands without arguments now open interactive select overlays instead of printing usage text (/think, /verbose, /reasoning, /elevated, /activation, /style, /theme). Deduplicate /agents→/agent, /sessions→ /session, /models→/model aliases and remove /elev, /reset, /quit. Add elevatedLevel, groupActivation, and PendingImage to TUI state types.
New WelcomeScreen component with shield mascot avatar in golden gradient and two-column bordered panel showing quick-start tips and session info. Shown on first connection, subsequent session switches show plain text. Responsive single-column fallback for terminals narrower than 70 cols. Add Ctrl+V image paste support via clipboard capture — images are encoded as base64 attachments and sent alongside chat messages. Editor inserts an [Image #N] marker at cursor position. Code CLI now shows onboarding hint on first run and supports --clean flag to start with a blank chat while preserving session history. Gateway disconnect handler distinguishes ECONNREFUSED with a helpful start hint, and local pairing requests are auto-approved inline.
- hono 4.11.10 → 4.12.4 (cookie injection, SSE injection, serveStatic) - @hono/node-server 1.19.9 → 1.19.10 (encoded slash bypass) - dompurify ^3.3.1 → ^3.3.2 (XSS vulnerability) Add hono as direct dependency to ensure pnpm override propagates to transitive peer resolution through @buape/carbon.
Document all new capabilities in README: Terminal UI, IDE plugins, Knowledge Graph, Multi-Agent Mesh, Plan Mode, Extensions Ecosystem, Hooks System, and updated architecture diagram. Add .vscodeignore for clean VSCode extension packaging. Gitignore internal docs. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
) ## Summary - **Terminal UI** — interactive TUI (`mayros code`) with 30+ slash commands, 3 themes, vim mode, image paste, headless CLI (`-p`), markdown agents/commands - **IDE plugins** — VSCode extension (sidebar + 4 webview panels) and JetBrains plugin (unified tabbed panel), both via Gateway WebSocket - **Knowledge Graph** — code indexer (incremental TS/JS scanning → RDF), project memory, smart compaction, cross-session recall - **Multi-Agent Mesh** — team manager, workflow orchestrator (3 built-in), agent mailbox, background tracker, git worktree isolation - **Plan Mode** — Cortex-backed semantic planning (explore → assert → approve → execute) - **Extensions** — bash-sandbox, interactive-permissions, llm-hooks, mcp-client, code-indexer, cortex-sync, CI/CD, LSP bridge - **Hooks** — 29 hook types, HTTP webhook dispatcher (HMAC-SHA256), async queue with dead-letter - **CLIs** — trace, plan, kg, workflow, dashboard, session, tasks, mailbox, rules, batch, teleport - **Security** — 18-layer architecture maintained across all new features - **README** — updated with all new capabilities, architecture diagram, extensions table ## Test plan - [ ] `pnpm build` compiles without errors - [ ] `pnpm test` passes (~9200+ tests across 1035+ files) - [ ] `mayros code` launches TUI with welcome screen - [ ] `mayros -p "hello"` streams response in headless mode - [ ] VSCode extension packages cleanly (`cd tools/vscode-extension && pnpm package`) - [ ] JetBrains plugin builds (`cd tools/jetbrains-plugin && ./gradlew build`) - [ ] `mayros kg stats` returns Cortex graph statistics - [ ] `mayros plan start "test"` creates a new plan - [ ] `mayros trace status` reports Cortex connectivity - [ ] `mayros workflow list` shows built-in workflow definitions - [ ] README renders correctly on GitHub (tables, code blocks, diagram)
ApiliumDevTeam
added a commit
that referenced
this pull request
Mar 9, 2026
## Summary Merge `dev` into `main` for the v0.1.4 release. This includes the full CLI Evolution Phase 1 (124 commits, 371 files, +56K lines). - **Terminal UI** — `mayros code` interactive TUI with 30+ slash commands, 3 themes, vim mode, image paste, headless CLI (`-p`), markdown agents/commands - **IDE plugins** — VSCode extension + JetBrains plugin connected via Gateway WebSocket - **Knowledge Graph** — code indexer, project memory, smart compaction, cross-session recall - **Multi-Agent Mesh** — teams, workflows, agent mailbox, background tracker, git worktree isolation - **Plan Mode** — Cortex-backed semantic planning (explore → assert → approve → execute) - **Extensions** — bash-sandbox, interactive-permissions, llm-hooks, mcp-client, code-indexer, cortex-sync, CI/CD, LSP bridge - **Hooks** — 29 hook types, HTTP webhook dispatcher (HMAC-SHA256), async queue with dead-letter - **CLIs** — trace, plan, kg, workflow, dashboard, session, tasks, mailbox, rules, batch, teleport - **Security** — 18-layer architecture maintained across all new features - **README** — updated with all new capabilities ## Test plan - [ ] `pnpm build` compiles without errors - [ ] `pnpm test` passes (~9200+ tests) - [ ] Tag `v0.1.4` after merge - [ ] `npm publish` / `pnpm publish` - [ ] Publish IDE plugins to marketplaces (see `tools/PUBLISHING.md`)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Merge
devintomainfor the v0.1.4 release. This includes the full CLI Evolution Phase 1 (124 commits, 371 files, +56K lines).mayros codeinteractive TUI with 30+ slash commands, 3 themes, vim mode, image paste, headless CLI (-p), markdown agents/commandsTest plan
pnpm buildcompiles without errorspnpm testpasses (~9200+ tests)v0.1.4after mergenpm publish/pnpm publishtools/PUBLISHING.md)