monomind 1.16.10 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/github/code-review-swarm.md +19 -19
- package/.claude/agents/github/github-modes.md +4 -4
- package/.claude/agents/github/multi-repo-swarm.md +24 -24
- package/.claude/agents/github/project-board-sync.md +28 -28
- package/.claude/agents/github/swarm-issue.md +26 -26
- package/.claude/agents/github/swarm-pr.md +18 -18
- package/.claude/agents/github/workflow-automation.md +27 -27
- package/.claude/agents/reengineer-squad/git-manager.md +2 -2
- package/.claude/commands/mastermind/master.md +9 -3
- package/.claude/commands/mastermind/references/antigravity-tools.md +60 -0
- package/.claude/commands/mastermind/references/claude-code-tools.md +50 -0
- package/.claude/commands/mastermind/references/codex-tools.md +64 -0
- package/.claude/commands/mastermind/references/copilot-tools.md +49 -0
- package/.claude/commands/mastermind/references/gemini-tools.md +63 -0
- package/.claude/commands/mastermind/references/pi-tools.md +28 -0
- package/.claude/helpers/mastermind-activate.cjs +53 -0
- package/.claude/settings.json +4 -0
- package/.claude/skills/mastermind/runorg.md +14 -0
- package/.claude/skills/mastermind/techport.md +5 -5
- package/README.md +1 -1
- package/package.json +5 -4
- package/packages/@monomind/cli/.claude/agents/github/code-review-swarm.md +19 -19
- package/packages/@monomind/cli/.claude/agents/github/github-modes.md +4 -4
- package/packages/@monomind/cli/.claude/agents/github/multi-repo-swarm.md +24 -24
- package/packages/@monomind/cli/.claude/agents/github/project-board-sync.md +28 -28
- package/packages/@monomind/cli/.claude/agents/github/swarm-issue.md +26 -26
- package/packages/@monomind/cli/.claude/agents/github/swarm-pr.md +18 -18
- package/packages/@monomind/cli/.claude/agents/github/workflow-automation.md +27 -27
- package/packages/@monomind/cli/.claude/agents/reengineer-squad/git-manager.md +2 -2
- package/packages/@monomind/cli/.claude/commands/mastermind/master.md +9 -3
- package/packages/@monomind/cli/.claude/commands/mastermind/references/antigravity-tools.md +60 -0
- package/packages/@monomind/cli/.claude/commands/mastermind/references/claude-code-tools.md +50 -0
- package/packages/@monomind/cli/.claude/commands/mastermind/references/codex-tools.md +64 -0
- package/packages/@monomind/cli/.claude/commands/mastermind/references/copilot-tools.md +49 -0
- package/packages/@monomind/cli/.claude/commands/mastermind/references/gemini-tools.md +63 -0
- package/packages/@monomind/cli/.claude/commands/mastermind/references/pi-tools.md +28 -0
- package/packages/@monomind/cli/.claude/helpers/mastermind-activate.cjs +53 -0
- package/packages/@monomind/cli/.claude/skills/mastermind/runorg.md +14 -0
- package/packages/@monomind/cli/.claude/skills/mastermind/techport.md +5 -5
- package/packages/@monomind/cli/README.md +1 -1
- package/packages/@monomind/cli/dist/src/browser/dashboard/ui.html +125 -37
- package/packages/@monomind/cli/dist/src/commands/index.js +0 -2
- package/packages/@monomind/cli/dist/src/init/executor.js +0 -24
- package/packages/@monomind/cli/dist/src/init/statusline-generator.js +0 -45
- package/packages/@monomind/cli/dist/src/init/types.d.ts +0 -2
- package/packages/@monomind/cli/dist/src/init/types.js +0 -2
- package/packages/@monomind/cli/dist/src/ui/dashboard.html +82 -75
- package/packages/@monomind/cli/dist/src/ui/server.mjs +41 -4
- package/packages/@monomind/cli/package.json +1 -1
- package/packages/@monomind/guidance/README.md +0 -1
- package/packages/@monomind/guidance/package.json +2 -14
- package/scripts/verify-appliance.sh +16 -20
- package/.claude-plugin/README.md +0 -704
- package/.claude-plugin/docs/INSTALLATION.md +0 -258
- package/.claude-plugin/docs/PLUGIN_SUMMARY.md +0 -358
- package/.claude-plugin/docs/QUICKSTART.md +0 -357
- package/.claude-plugin/docs/STRUCTURE.md +0 -122
- package/.claude-plugin/hooks/hooks.json +0 -74
- package/.claude-plugin/marketplace.json +0 -98
- package/.claude-plugin/plugin.json +0 -70
- package/.claude-plugin/scripts/install.sh +0 -234
- package/.claude-plugin/scripts/uninstall.sh +0 -36
- package/.claude-plugin/scripts/verify.sh +0 -102
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Gemini CLI Tool Mapping
|
|
2
|
+
|
|
3
|
+
Skills speak in actions ("dispatch a subagent", "create a todo", "read a file"). On Gemini CLI these resolve to the tools below.
|
|
4
|
+
|
|
5
|
+
| Action skills request | Gemini CLI equivalent |
|
|
6
|
+
|----------------------|----------------------|
|
|
7
|
+
| Read a file | `read_file` |
|
|
8
|
+
| Read multiple files at once | `read_many_files` |
|
|
9
|
+
| Create a new file | `write_file` |
|
|
10
|
+
| Edit a file | `replace` |
|
|
11
|
+
| Run a shell command | `run_shell_command` |
|
|
12
|
+
| Search file contents | `grep_search` |
|
|
13
|
+
| Find files by name | `glob` |
|
|
14
|
+
| List files and subdirectories | `list_directory` |
|
|
15
|
+
| Fetch a URL | `web_fetch` |
|
|
16
|
+
| Search the web | `google_web_search` |
|
|
17
|
+
| Invoke a skill | `activate_skill` |
|
|
18
|
+
| Dispatch a subagent (`Subagent (general-purpose):` template) | `invoke_agent` with `agent_name: "generalist"` (invocable via `@generalist` chat syntax — see [Subagent support](#subagent-support)) |
|
|
19
|
+
| Multiple parallel dispatches | Multiple `invoke_agent` calls in the same response |
|
|
20
|
+
| Task tracking ("create a todo", "mark complete") | `write_todos` (statuses: pending, in_progress, completed, cancelled, blocked) |
|
|
21
|
+
|
|
22
|
+
## Instructions file
|
|
23
|
+
|
|
24
|
+
When a skill mentions "your instructions file", on Gemini CLI this is **`GEMINI.md`**. Gemini CLI loads `GEMINI.md` hierarchically: global at `~/.gemini/GEMINI.md`, project-level files in workspace directories and their ancestors, and sub-directory `GEMINI.md` files when a tool accesses files in those directories.
|
|
25
|
+
|
|
26
|
+
## Personal skills directory
|
|
27
|
+
|
|
28
|
+
User-level skills live at **`~/.gemini/skills/`**, with **`~/.agents/skills/`** as a cross-runtime alias (shared with Codex and Copilot CLI). When both directories exist at the same scope, `.agents/skills/` takes precedence. Each skill is a subdirectory containing a `SKILL.md` (with `name` and `description` frontmatter).
|
|
29
|
+
|
|
30
|
+
## Subagent support
|
|
31
|
+
|
|
32
|
+
Gemini CLI dispatches subagents through the `invoke_agent` tool, which takes `agent_name` and `prompt` parameters. The same dispatch is also surfaced as a chat-syntax shortcut: typing `@generalist <prompt>` is equivalent to calling `invoke_agent` with `agent_name: "generalist"`. Built-in agent names include `generalist`, `cli_help`, `codebase_investigator`, and (with browser tooling enabled) `browser_agent`.
|
|
33
|
+
|
|
34
|
+
Skills dispatch with `Subagent (general-purpose):` and either reference a prompt-template file or supply an inline prompt. On Gemini CLI:
|
|
35
|
+
|
|
36
|
+
| Skill dispatch form | Gemini CLI equivalent |
|
|
37
|
+
|---------------------|----------------------|
|
|
38
|
+
| References an implementer template (writes code, runs tests) | Fill the template, then `invoke_agent` with `agent_name: "generalist"` and the filled prompt |
|
|
39
|
+
| References a code-reviewer template (`mastermind:review`) | `invoke_agent` with `agent_name: "generalist"` and the filled review template |
|
|
40
|
+
| Inline prompt (no template referenced) | `invoke_agent` with `agent_name: "generalist"` and your inline prompt |
|
|
41
|
+
|
|
42
|
+
### Prompt filling
|
|
43
|
+
|
|
44
|
+
Skills provide prompt templates with placeholders like `{WHAT_WAS_IMPLEMENTED}` or `[FULL TEXT of task]`. Fill all placeholders before passing the complete prompt to `invoke_agent`. The prompt template itself contains the agent's role, review criteria, and expected output format — the subagent will follow it.
|
|
45
|
+
|
|
46
|
+
### Parallel dispatch
|
|
47
|
+
|
|
48
|
+
Gemini CLI supports parallel subagent dispatch. Issue multiple `invoke_agent` calls in the same response to run independent subagent work in parallel. Keep dependent tasks sequential, but do not serialize independent subagent tasks just to preserve a simpler history.
|
|
49
|
+
|
|
50
|
+
## Additional Gemini CLI tools
|
|
51
|
+
|
|
52
|
+
These tools are unique to Gemini CLI:
|
|
53
|
+
|
|
54
|
+
| Tool | Purpose |
|
|
55
|
+
|------|---------|
|
|
56
|
+
| `save_memory` (legacy) | Persist facts across sessions when `experimental.memoryV2 = false` |
|
|
57
|
+
| `get_internal_docs` | Look up Gemini CLI's bundled documentation |
|
|
58
|
+
| `ask_user` | Pose structured questions to the user (text / single-select / multi-select) |
|
|
59
|
+
| `enter_plan_mode` / `exit_plan_mode` | Switch into and out of read-only plan mode |
|
|
60
|
+
| `update_topic` | Update the current conversation's topic / strategic-intent metadata |
|
|
61
|
+
| `complete_task` | Signal that a Gemini subagent has completed and return its result to the parent agent |
|
|
62
|
+
| `tracker_create_task`, `tracker_update_task`, `tracker_get_task`, `tracker_list_tasks`, `tracker_add_dependency`, `tracker_visualize` | Rich task tracker with dependency and visualization support |
|
|
63
|
+
| `read_mcp_resource`, `list_mcp_resources` | MCP resource access |
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Pi Tool Mapping
|
|
2
|
+
|
|
3
|
+
Skills speak in actions ("dispatch a subagent", "create a todo", "read a file"). On Pi these resolve to the tools below.
|
|
4
|
+
|
|
5
|
+
| Action skills request | Pi equivalent |
|
|
6
|
+
| --- | --- |
|
|
7
|
+
| Invoke a skill | Pi native skills: load the relevant `SKILL.md` with `read`, or let the human use `/skill:name` |
|
|
8
|
+
| Read a file | `read` |
|
|
9
|
+
| Create a file | `write` |
|
|
10
|
+
| Edit a file | `edit` |
|
|
11
|
+
| Run a shell command | `bash` |
|
|
12
|
+
| Search file contents | `grep` when active; otherwise `bash` with `rg`/`grep` |
|
|
13
|
+
| Find files by name | `find` or `bash` with shell globs |
|
|
14
|
+
| List files and subdirectories | `ls` when active; otherwise `bash` with `ls` |
|
|
15
|
+
| Dispatch a subagent (`Subagent (general-purpose):` template) | Use an installed subagent tool such as `subagent` from `pi-subagents` if available |
|
|
16
|
+
| Task tracking ("create a todo", "mark complete") | Use an installed todo/task tool if available, otherwise track tasks in the plan or `TODO.md` |
|
|
17
|
+
|
|
18
|
+
## Skills
|
|
19
|
+
|
|
20
|
+
Pi discovers skills from configured skill directories and installed Pi packages. A Mastermind Pi package should expose `skills/` through its `pi.skills` manifest entry. Pi does not expose Claude Code's `Skill` tool, but the agent should still follow the Mastermind rule: when a skill applies, load and follow it before responding.
|
|
21
|
+
|
|
22
|
+
## Subagents
|
|
23
|
+
|
|
24
|
+
Pi core does not ship a standard subagent tool. The `pi-subagents` package is a strong optional companion and provides a `subagent` tool with single-agent, chain, parallel, async, forked-context, and resume/status workflows. If no subagent tool is available, do not fabricate `Task` calls; execute sequentially in the current session or explain that the optional subagent capability is not installed.
|
|
25
|
+
|
|
26
|
+
## Task lists
|
|
27
|
+
|
|
28
|
+
Pi core does not ship a standard task-list tool. If a todo/task extension is installed, use its documented tool. Otherwise use Mastermind plan files, checklists in Markdown, or a repo-local `TODO.md` for task tracking. Older docs may refer to `TodoWrite`; treat that as the task-tracking action above.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
const path = require('path');
|
|
4
|
+
|
|
5
|
+
// Walk up from cwd to find the project root containing master.md
|
|
6
|
+
function findMasterPath() {
|
|
7
|
+
const candidates = [];
|
|
8
|
+
if (process.env.CLAUDE_PROJECT_DIR) candidates.push(process.env.CLAUDE_PROJECT_DIR);
|
|
9
|
+
let dir = process.cwd();
|
|
10
|
+
for (let i = 0; i < 12; i++) {
|
|
11
|
+
candidates.push(dir);
|
|
12
|
+
const parent = path.dirname(dir);
|
|
13
|
+
if (parent === dir) break;
|
|
14
|
+
dir = parent;
|
|
15
|
+
}
|
|
16
|
+
for (const base of candidates) {
|
|
17
|
+
const p = path.join(base, '.claude', 'commands', 'mastermind', 'master.md');
|
|
18
|
+
if (fs.existsSync(p)) return p;
|
|
19
|
+
}
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Extract only the MASTERMIND PROTOCOL section (before the capability menu / execution flow).
|
|
24
|
+
// The protocol section ends at the separator before "**If $ARGUMENTS is empty:**"
|
|
25
|
+
function extractProtocol(content) {
|
|
26
|
+
const marker = '\n---\n\n**If $ARGUMENTS is empty:**';
|
|
27
|
+
const idx = content.indexOf(marker);
|
|
28
|
+
if (idx !== -1) return content.slice(0, idx).trim();
|
|
29
|
+
// Fallback: everything before the capability menu header
|
|
30
|
+
const fallback = content.indexOf('\n**MASTERMIND** —');
|
|
31
|
+
if (fallback !== -1) return content.slice(0, fallback).trim();
|
|
32
|
+
return content.trim();
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const masterPath = findMasterPath();
|
|
36
|
+
if (!masterPath) {
|
|
37
|
+
process.stderr.write('[mastermind-activate] master.md not found — skipping injection\n');
|
|
38
|
+
process.exit(0);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
let raw;
|
|
42
|
+
try {
|
|
43
|
+
raw = fs.readFileSync(masterPath, 'utf8');
|
|
44
|
+
} catch (e) {
|
|
45
|
+
process.stderr.write('[mastermind-activate] Could not read master.md: ' + e.message + '\n');
|
|
46
|
+
process.exit(0);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// Strip YAML frontmatter
|
|
50
|
+
const body = raw.replace(/^---[\s\S]*?---\s*/, '');
|
|
51
|
+
const protocol = extractProtocol(body);
|
|
52
|
+
|
|
53
|
+
process.stdout.write(protocol + '\n');
|
|
@@ -477,6 +477,20 @@ If the file exists: write run:complete to run file, emit org:complete via curl,
|
|
|
477
477
|
OPERATING LOOP:
|
|
478
478
|
1. Check for stop signal (above). Exit with run:complete + org:complete events if found.
|
|
479
479
|
|
|
480
|
+
1b. Check user mailbox for pending messages:
|
|
481
|
+
_threads="${REPO_ROOT}/.monomind/orgs/${orgName}-threads.json"
|
|
482
|
+
if [ -f "$_threads" ]; then
|
|
483
|
+
_pending=$(jq '[.[] | select(.status == "pending")]' "$_threads" 2>/dev/null || echo "[]")
|
|
484
|
+
if [ "$(echo "$_pending" | jq 'length')" -gt 0 ]; then
|
|
485
|
+
echo "$_pending" | jq -r '.[] | .text // .msg // ""'
|
|
486
|
+
jq '[.[] | if .status == "pending" then .status = "processed" else . end]' "$_threads" > "${_threads}.tmp" && mv "${_threads}.tmp" "$_threads" || true
|
|
487
|
+
curl -s -X POST "${CTRL_URL}/api/mastermind/event" -H "Content-Type: application/json" \
|
|
488
|
+
-d "$(jq -cn --arg s "${sessionId}" --arg o "${orgName}" --arg rid "${runId}" \
|
|
489
|
+
--arg msg "Received user message — adjusting plan if needed" \
|
|
490
|
+
'{type:"org:comms",session:$s,org:$o,runId:$rid,from:"boss",to:"user",msg:$msg,ts:(now*1000|floor)}')" || true
|
|
491
|
+
fi
|
|
492
|
+
fi
|
|
493
|
+
|
|
480
494
|
2. List unclaimed Todo cards:
|
|
481
495
|
monotask card list ${board_id} --col ${todo_col} --json | jq '[.[] | select(.labels | index("claimed") | not)]'
|
|
482
496
|
|
|
@@ -27,7 +27,7 @@ If invoked directly (not by `mastermind:master`):
|
|
|
27
27
|
- `focus_hint`: optional — what to look for ("CLI commands", "animation", "hooks", "skills"); default: `"core architecture skills commands hooks agents"`
|
|
28
28
|
- `mode`: confirm | auto
|
|
29
29
|
- `partial`: boolean — if true, skip strategy (a) Copy-As-Is; force (b) Adapt or (c) Extract only
|
|
30
|
-
- `source_brand`: derived in Phase 1A — PascalCase brand name of the source project (e.g. `
|
|
30
|
+
- `source_brand`: derived in Phase 1A — PascalCase brand name of the source project (e.g. `Monomind`, `ClaudeFlow`); used in all `rg -i "{source_brand}"` brand contamination checks
|
|
31
31
|
- `candidate_file`: derived during Phase 1E–1F — absolute path to a specific source file under analysis; substituted before running per-candidate coupling checks
|
|
32
32
|
|
|
33
33
|
---
|
|
@@ -192,11 +192,11 @@ head -80 "{source_path}/README.md" 2>/dev/null
|
|
|
192
192
|
**BRAND EXTRACTION — required before Phase 2B collision detection:**
|
|
193
193
|
|
|
194
194
|
Extract `source_brand` from three signals, pick the most specific:
|
|
195
|
-
1. `package.json` `name` field: strip `@scope/` prefix, convert to PascalCase (e.g., `claude-flow` → `ClaudeFlow`, `
|
|
195
|
+
1. `package.json` `name` field: strip `@scope/` prefix, convert to PascalCase (e.g., `claude-flow` → `ClaudeFlow`, `monomind` → `Monomind`)
|
|
196
196
|
2. README H1 title: extract the project name word(s) before any tagline
|
|
197
|
-
3. Class name prefixes: run `grep -rhn "^export class\|^export abstract class" "{source_path}/src" --include="*.ts" 2>/dev/null | grep -oE "(class) [A-Z][A-Za-z0-9]+" | awk '{print $2}' | grep -oE "^[A-Z][a-z]+" | sort | uniq -c | sort -rn | head -5` — the most frequent leading word (e.g., `
|
|
197
|
+
3. Class name prefixes: run `grep -rhn "^export class\|^export abstract class" "{source_path}/src" --include="*.ts" 2>/dev/null | grep -oE "(class) [A-Z][A-Za-z0-9]+" | awk '{print $2}' | grep -oE "^[A-Z][a-z]+" | sort | uniq -c | sort -rn | head -5` — the most frequent leading word (e.g., `Mono` from `Monomind`, `Claude` from `ClaudeFlow`) is the brand prefix; convert to PascalCase compound if needed
|
|
198
198
|
|
|
199
|
-
Set `source_brand` to the PascalCase result (e.g., `
|
|
199
|
+
Set `source_brand` to the PascalCase result (e.g., `Monomind`, `ClaudeFlow`, `SourceProject`). This variable is used verbatim in all subsequent `rg -i "{source_brand}"` calls and the collision-detection Python script.
|
|
200
200
|
|
|
201
201
|
### 1B — Repo-Map (Structural Index)
|
|
202
202
|
|
|
@@ -359,7 +359,7 @@ grep -rhn "^export" "{source_path}/src" --include="*.ts" 2>/dev/null | \
|
|
|
359
359
|
grep -oE "(class|interface|function|const|type|enum) [A-Z][A-Za-z0-9]+" | awk '{print $2}' | \
|
|
360
360
|
python3 -c "
|
|
361
361
|
import sys, re
|
|
362
|
-
source_brand = '{source_brand}' # LLM substitutes the PascalCase value from Phase 1A before running (e.g. '
|
|
362
|
+
source_brand = '{source_brand}' # LLM substitutes the PascalCase value from Phase 1A before running (e.g. 'Monomind', 'ClaudeFlow')
|
|
363
363
|
# Mono prefix: the domain prefix used in monomind for this context (e.g. 'Mono', 'Agent', 'Graph')
|
|
364
364
|
# LLM: substitute the actual mono prefix from Phase 0B's MNS before running
|
|
365
365
|
mono_prefix = '{mono_prefix}'
|
|
@@ -420,9 +420,8 @@ body { background: #0b0b14; color: #ccc; font-family: system-ui,-apple-system,sa
|
|
|
420
420
|
<!-- ── top bar ─────────────────────────────────────── -->
|
|
421
421
|
<div id="topbar">
|
|
422
422
|
<span class="logo">monomind <span>dashboard</span></span>
|
|
423
|
-
<span class="pill pill-run" id="p-
|
|
424
|
-
<span class="pill pill-done" id="p-
|
|
425
|
-
<span class="pill pill-fail" id="p-fail">✗ 0</span>
|
|
423
|
+
<span class="pill pill-run" id="p-workflows" title="Total workflows">⚡ workflows</span>
|
|
424
|
+
<span class="pill pill-done" id="p-actions" title="Total actions">✓ actions</span>
|
|
426
425
|
<span id="conn">
|
|
427
426
|
<span id="conn-dot"></span>
|
|
428
427
|
<span id="conn-label">connecting…</span>
|
|
@@ -435,12 +434,9 @@ body { background: #0b0b14; color: #ccc; font-family: system-ui,-apple-system,sa
|
|
|
435
434
|
<!-- sidebar -->
|
|
436
435
|
<nav id="sidebar">
|
|
437
436
|
<div class="nav-section-label">Project</div>
|
|
438
|
-
<div class="nav-item active" data-panel="
|
|
439
|
-
<span class="nav-icon"
|
|
440
|
-
<span class="nav-badge" id="nb-
|
|
441
|
-
</div>
|
|
442
|
-
<div class="nav-item" data-panel="builder">
|
|
443
|
-
<span class="nav-icon">🔧</span> Builder
|
|
437
|
+
<div class="nav-item active" data-panel="monoagent">
|
|
438
|
+
<span class="nav-icon">🤖</span> MonoAgent
|
|
439
|
+
<span class="nav-badge green" id="nb-ma">0</span>
|
|
444
440
|
</div>
|
|
445
441
|
|
|
446
442
|
<div class="nav-section-label" style="margin-top:8px">System</div>
|
|
@@ -458,21 +454,38 @@ body { background: #0b0b14; color: #ccc; font-family: system-ui,-apple-system,sa
|
|
|
458
454
|
<!-- main -->
|
|
459
455
|
<div id="main">
|
|
460
456
|
|
|
461
|
-
<!--
|
|
462
|
-
<div class="panel active" id="
|
|
457
|
+
<!-- MonoAgent panel -->
|
|
458
|
+
<div class="panel active" id="monoagent-panel">
|
|
463
459
|
<div class="panel-header">
|
|
464
|
-
<span class="panel-title">
|
|
465
|
-
<span class="panel-subtitle" id="
|
|
460
|
+
<span class="panel-title">MonoAgent Workflows</span>
|
|
461
|
+
<span class="panel-subtitle" id="ma-subtitle">loading…</span>
|
|
462
|
+
<button onclick="loadMonoagentData()" style="margin-left:auto;background:#1a1a2e;border:1px solid #2a2a4a;color:#a78bfa;padding:3px 10px;border-radius:6px;cursor:pointer;font-size:11px">↻ Refresh</button>
|
|
466
463
|
</div>
|
|
467
|
-
<div
|
|
468
|
-
|
|
469
|
-
<
|
|
470
|
-
|
|
471
|
-
|
|
464
|
+
<div style="flex:1;overflow-y:auto;padding:12px;display:flex;flex-direction:column;gap:16px">
|
|
465
|
+
<!-- Workflow list -->
|
|
466
|
+
<div>
|
|
467
|
+
<div style="font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:1px;color:#3a3a5a;margin-bottom:8px">Workflows</div>
|
|
468
|
+
<div id="ma-workflows" style="display:grid;gap:8px;align-content:start"></div>
|
|
469
|
+
<div class="empty" id="ma-wf-empty" style="display:none">
|
|
470
|
+
<span class="empty-icon">🤖</span>
|
|
471
|
+
<span class="empty-title">No workflows found</span>
|
|
472
|
+
<span class="empty-sub">Create one with: <code style="color:#7c3aed">monoagent workflow create</code></span>
|
|
473
|
+
</div>
|
|
474
|
+
</div>
|
|
475
|
+
<!-- Action run history -->
|
|
476
|
+
<div>
|
|
477
|
+
<div style="font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:1px;color:#3a3a5a;margin-bottom:8px">Action History</div>
|
|
478
|
+
<div id="ma-history" style="display:grid;gap:6px;align-content:start"></div>
|
|
479
|
+
<div class="empty" id="ma-hist-empty" style="display:none">
|
|
480
|
+
<span class="empty-icon">📋</span>
|
|
481
|
+
<span class="empty-title">No action history</span>
|
|
482
|
+
<span class="empty-sub">Run an action with: <code style="color:#7c3aed">monoagent run <ACTION_ID></code></span>
|
|
483
|
+
</div>
|
|
484
|
+
</div>
|
|
472
485
|
</div>
|
|
473
486
|
</div>
|
|
474
487
|
|
|
475
|
-
<!-- Builder panel -->
|
|
488
|
+
<!-- Builder panel (kept for internal use, hidden from nav) -->
|
|
476
489
|
<div class="panel" id="builder-panel">
|
|
477
490
|
<!-- Toolbar -->
|
|
478
491
|
<div id="builder-toolbar">
|
|
@@ -573,12 +586,11 @@ function navigateToPanel(target) {
|
|
|
573
586
|
var navItem = document.querySelector('[data-panel="' + target + '"]');
|
|
574
587
|
if (navItem) navItem.classList.add('active');
|
|
575
588
|
document.querySelectorAll('.panel').forEach(function(p) { p.classList.remove('active'); });
|
|
576
|
-
var panelId = target
|
|
577
|
-
: target === 'builder' ? 'builder-panel'
|
|
578
|
-
: target + '-panel';
|
|
589
|
+
var panelId = target + '-panel';
|
|
579
590
|
var panel = document.getElementById(panelId);
|
|
580
591
|
if (panel) panel.classList.add('active');
|
|
581
592
|
if (target === 'builder') renderEdges();
|
|
593
|
+
if (target === 'monoagent') loadMonoagentData();
|
|
582
594
|
location.hash = target;
|
|
583
595
|
}
|
|
584
596
|
|
|
@@ -592,7 +604,7 @@ document.querySelectorAll('.nav-item').forEach(function(item) {
|
|
|
592
604
|
// Hash-based routing on load
|
|
593
605
|
(function() {
|
|
594
606
|
var hash = location.hash.replace('#', '');
|
|
595
|
-
var validPanels = ['
|
|
607
|
+
var validPanels = ['monoagent', 'agents', 'memory', 'sessions'];
|
|
596
608
|
if (hash && validPanels.indexOf(hash) !== -1) {
|
|
597
609
|
// defer until after renderEdges is defined
|
|
598
610
|
window.addEventListener('load', function() { navigateToPanel(hash); });
|
|
@@ -613,20 +625,7 @@ function esc(s) {
|
|
|
613
625
|
}
|
|
614
626
|
|
|
615
627
|
function updateHeader() {
|
|
616
|
-
|
|
617
|
-
for (var id in runs) {
|
|
618
|
-
var s = runs[id].status;
|
|
619
|
-
if (s === 'running') running++;
|
|
620
|
-
else if (s === 'completed') done++;
|
|
621
|
-
else if (s === 'failed') fail++;
|
|
622
|
-
}
|
|
623
|
-
document.getElementById('p-run').textContent = '● ' + running;
|
|
624
|
-
document.getElementById('p-done').textContent = '✓ ' + done;
|
|
625
|
-
document.getElementById('p-fail').textContent = '✗ ' + fail;
|
|
626
|
-
document.getElementById('nb-run').textContent = String(running || Object.keys(runs).length);
|
|
627
|
-
document.getElementById('nb-run').className = 'nav-badge' + (running ? '' : ' green');
|
|
628
|
-
var total = Object.keys(runs).length;
|
|
629
|
-
document.getElementById('pb-subtitle').textContent = total + (total === 1 ? ' run' : ' runs');
|
|
628
|
+
// no-op: topbar pills are updated by loadMonoagentData
|
|
630
629
|
}
|
|
631
630
|
|
|
632
631
|
function progressPct(r) {
|
|
@@ -648,6 +647,7 @@ function elapsed(r) {
|
|
|
648
647
|
function renderCards() {
|
|
649
648
|
var cards = document.getElementById('pb-cards');
|
|
650
649
|
var empty = document.getElementById('pb-empty');
|
|
650
|
+
if (!cards) return; // panel removed from DOM
|
|
651
651
|
var sorted = Object.values(runs).sort(function(a, b) { return b.startedAt - a.startedAt; });
|
|
652
652
|
if (!sorted.length) { cards.innerHTML = ''; empty.style.display = 'flex'; return; }
|
|
653
653
|
empty.style.display = 'none';
|
|
@@ -1737,6 +1737,94 @@ function handleEvent(evt) {
|
|
|
1737
1737
|
renderCards();
|
|
1738
1738
|
}
|
|
1739
1739
|
|
|
1740
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1741
|
+
// MONOAGENT DATA
|
|
1742
|
+
// ═══════════════════════════════════════════════════════════════════
|
|
1743
|
+
var MA_STATE_COLORS = { COMPLETED: '#22c55e', FAILED: '#ef4444', PENDING: '#f59e0b', RUNNING: '#a78bfa' };
|
|
1744
|
+
|
|
1745
|
+
function maStateLabel(state) {
|
|
1746
|
+
var s = (state || '').toUpperCase();
|
|
1747
|
+
return { color: MA_STATE_COLORS[s] || '#555', text: s || 'UNKNOWN' };
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1750
|
+
function renderWorkflows(workflows) {
|
|
1751
|
+
var el = document.getElementById('ma-workflows');
|
|
1752
|
+
var empty = document.getElementById('ma-wf-empty');
|
|
1753
|
+
if (!workflows || !workflows.length) {
|
|
1754
|
+
el.innerHTML = '';
|
|
1755
|
+
empty.style.display = 'flex';
|
|
1756
|
+
return;
|
|
1757
|
+
}
|
|
1758
|
+
empty.style.display = 'none';
|
|
1759
|
+
el.innerHTML = workflows.map(function(wf) {
|
|
1760
|
+
var active = wf.is_active;
|
|
1761
|
+
var updated = wf.updated_at && wf.updated_at !== '0001-01-01T00:00:00Z'
|
|
1762
|
+
? new Date(wf.updated_at).toLocaleDateString()
|
|
1763
|
+
: '—';
|
|
1764
|
+
return '<div style="background:#0f0f1e;border:1px solid #1a1a2e;border-radius:8px;padding:10px 14px;display:flex;align-items:center;gap:10px">' +
|
|
1765
|
+
'<span style="font-size:16px">' + (active ? '▶' : '⏸') + '</span>' +
|
|
1766
|
+
'<div style="flex:1;min-width:0">' +
|
|
1767
|
+
'<div style="font-weight:600;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">' + esc(wf.name || wf.id) + '</div>' +
|
|
1768
|
+
'<div style="font-size:10px;color:#3a3a5a;margin-top:2px">' + esc(wf.id) + ' · v' + (wf.version || 1) + ' · updated ' + esc(updated) + '</div>' +
|
|
1769
|
+
(wf.description ? '<div style="font-size:10px;color:#555;margin-top:2px">' + esc(wf.description) + '</div>' : '') +
|
|
1770
|
+
'</div>' +
|
|
1771
|
+
'<span style="font-size:10px;padding:2px 7px;border-radius:10px;border:1px solid;' +
|
|
1772
|
+
(active ? 'background:#22c55e15;border-color:#22c55e44;color:#22c55e' : 'background:#33333315;border-color:#33333344;color:#555') + '">' +
|
|
1773
|
+
(active ? 'active' : 'inactive') +
|
|
1774
|
+
'</span>' +
|
|
1775
|
+
'</div>';
|
|
1776
|
+
}).join('');
|
|
1777
|
+
document.getElementById('nb-ma').textContent = String(workflows.length);
|
|
1778
|
+
}
|
|
1779
|
+
|
|
1780
|
+
function renderHistory(actions) {
|
|
1781
|
+
var el = document.getElementById('ma-history');
|
|
1782
|
+
var empty = document.getElementById('ma-hist-empty');
|
|
1783
|
+
if (!actions || !actions.length) {
|
|
1784
|
+
el.innerHTML = '';
|
|
1785
|
+
empty.style.display = 'flex';
|
|
1786
|
+
return;
|
|
1787
|
+
}
|
|
1788
|
+
empty.style.display = 'none';
|
|
1789
|
+
el.innerHTML = actions.map(function(a) {
|
|
1790
|
+
var sl = maStateLabel(a.state);
|
|
1791
|
+
var dt = a.created_at
|
|
1792
|
+
? new Date(typeof a.created_at === 'number' ? a.created_at * 1000 : a.created_at).toLocaleString()
|
|
1793
|
+
: '—';
|
|
1794
|
+
return '<div style="background:#0f0f1e;border:1px solid #1a1a2e;border-radius:6px;padding:8px 12px;display:flex;align-items:center;gap:10px">' +
|
|
1795
|
+
'<div style="flex:1;min-width:0">' +
|
|
1796
|
+
'<div style="font-weight:600;font-size:11px">' + esc(a.type || '(unnamed)') + '</div>' +
|
|
1797
|
+
'<div style="font-size:10px;color:#3a3a5a;margin-top:2px">' +
|
|
1798
|
+
esc(a.id.slice(0, 8)) + '… · ' + esc(a.platform || '') + ' · ' + esc(dt) +
|
|
1799
|
+
'</div>' +
|
|
1800
|
+
'</div>' +
|
|
1801
|
+
'<span style="font-size:10px;font-weight:600;color:' + sl.color + '">' + sl.text + '</span>' +
|
|
1802
|
+
'</div>';
|
|
1803
|
+
}).join('');
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1806
|
+
function loadMonoagentData() {
|
|
1807
|
+
document.getElementById('ma-subtitle').textContent = 'loading…';
|
|
1808
|
+
fetch('/monoagent/data')
|
|
1809
|
+
.then(function(r) { return r.json(); })
|
|
1810
|
+
.then(function(d) {
|
|
1811
|
+
renderWorkflows(d.workflows || []);
|
|
1812
|
+
renderHistory(d.actions || []);
|
|
1813
|
+
var wc = (d.workflows || []).length;
|
|
1814
|
+
var ac = (d.actions || []).length;
|
|
1815
|
+
document.getElementById('ma-subtitle').textContent = wc + ' workflow' + (wc !== 1 ? 's' : '') + ' · ' + ac + ' action' + (ac !== 1 ? 's' : '');
|
|
1816
|
+
document.getElementById('p-workflows').textContent = '⚡ ' + wc;
|
|
1817
|
+
document.getElementById('p-actions').textContent = '✓ ' + ac;
|
|
1818
|
+
})
|
|
1819
|
+
.catch(function(e) {
|
|
1820
|
+
document.getElementById('ma-subtitle').textContent = 'error loading data';
|
|
1821
|
+
console.error('monoagent data fetch failed', e);
|
|
1822
|
+
});
|
|
1823
|
+
}
|
|
1824
|
+
|
|
1825
|
+
// Load monoagent data on startup (it's the default panel)
|
|
1826
|
+
loadMonoagentData();
|
|
1827
|
+
|
|
1740
1828
|
// ═══════════════════════════════════════════════════════════════════
|
|
1741
1829
|
// CONNECTION
|
|
1742
1830
|
// ═══════════════════════════════════════════════════════════════════
|
|
@@ -51,8 +51,6 @@ const commandLoaders = {
|
|
|
51
51
|
issues: () => import('./issues.js'),
|
|
52
52
|
// Auto-update System (ADR-025)
|
|
53
53
|
update: () => import('./update.js'),
|
|
54
|
-
// Local ↔ global skill sync
|
|
55
|
-
sync: () => import('./sync.js'),
|
|
56
54
|
// MonoVector PostgreSQL Bridge
|
|
57
55
|
monovector: () => import('./monovector/index.js'),
|
|
58
56
|
// Benchmark Suite (Pre-training, Neural, Memory)
|
|
@@ -1479,30 +1479,6 @@ mcp:
|
|
|
1479
1479
|
`;
|
|
1480
1480
|
atomicWriteFile(configPath, config);
|
|
1481
1481
|
result.created.files.push('.monomind/config.yaml');
|
|
1482
|
-
// Stamp the CLI version that initialized this project — used by `monomind sync check`
|
|
1483
|
-
// to detect when the global install has been upgraded but local skills/config have not.
|
|
1484
|
-
const versionPath = path.join(targetDir, '.monomind', 'version');
|
|
1485
|
-
try {
|
|
1486
|
-
const pkgCandidates = [
|
|
1487
|
-
path.join(__dirname, '..', '..', 'package.json'), // src/init/ in dev
|
|
1488
|
-
path.join(__dirname, '..', '..', '..', 'package.json'), // dist/src/init/ in prod
|
|
1489
|
-
];
|
|
1490
|
-
let cliVersion = null;
|
|
1491
|
-
for (const p of pkgCandidates) {
|
|
1492
|
-
if (fs.existsSync(p)) {
|
|
1493
|
-
const pkg = JSON.parse(fs.readFileSync(p, 'utf-8'));
|
|
1494
|
-
if (typeof pkg.version === 'string' && pkg.version) {
|
|
1495
|
-
cliVersion = pkg.version;
|
|
1496
|
-
break;
|
|
1497
|
-
}
|
|
1498
|
-
}
|
|
1499
|
-
}
|
|
1500
|
-
if (cliVersion) {
|
|
1501
|
-
atomicWriteFile(versionPath, cliVersion);
|
|
1502
|
-
result.created.files.push('.monomind/version');
|
|
1503
|
-
}
|
|
1504
|
-
}
|
|
1505
|
-
catch { /* non-fatal — sync check will degrade gracefully */ }
|
|
1506
1482
|
// Write .monomind/.gitignore — commit config/knowledge/metrics, exclude sensitive data
|
|
1507
1483
|
const gitignorePath = path.join(targetDir, '.monomind', '.gitignore');
|
|
1508
1484
|
const gitignore = `# Monomind — exclude files that may contain secrets or sensitive prompt data
|
|
@@ -1062,40 +1062,6 @@ function generateStatusline() {
|
|
|
1062
1062
|
return parts.join(\` \${DIV} \`);
|
|
1063
1063
|
}
|
|
1064
1064
|
|
|
1065
|
-
// ── Sync / update status ────────────────────────────────────────
|
|
1066
|
-
// Returns {local, global} if local .monomind/version differs from the running CLI,
|
|
1067
|
-
// or null when in sync or no version file exists.
|
|
1068
|
-
function getSyncStatus() {
|
|
1069
|
-
try {
|
|
1070
|
-
const vf = path.join(CWD, '.monomind', 'version');
|
|
1071
|
-
if (!fs.existsSync(vf)) return null;
|
|
1072
|
-
const local = fs.readFileSync(vf, 'utf-8').trim();
|
|
1073
|
-
const global = getVersion().replace(/^v/, '');
|
|
1074
|
-
if (!local || !global || local === global) return null;
|
|
1075
|
-
return { local, global };
|
|
1076
|
-
} catch { return null; }
|
|
1077
|
-
}
|
|
1078
|
-
|
|
1079
|
-
// Returns the latest available version string if the cache shows a newer release,
|
|
1080
|
-
// null otherwise. Reads from the rate-limiter cache — no network call.
|
|
1081
|
-
function getUpdateStatus() {
|
|
1082
|
-
try {
|
|
1083
|
-
const stateFile = path.join(os.homedir(), '.monomind', 'update-state.json');
|
|
1084
|
-
if (!fs.existsSync(stateFile)) return null;
|
|
1085
|
-
const stat = safeStat(stateFile);
|
|
1086
|
-
if (!stat || stat.size > 1024 * 1024) return null;
|
|
1087
|
-
const state = JSON.parse(fs.readFileSync(stateFile, 'utf-8'));
|
|
1088
|
-
const pkgVersions = (state && typeof state.packageVersions === 'object') ? state.packageVersions : {};
|
|
1089
|
-
const latest = pkgVersions['monomind'] || pkgVersions['@monoes/monomindcli'];
|
|
1090
|
-
const current = getVersion().replace(/^v/, '');
|
|
1091
|
-
if (!latest || !current) return null;
|
|
1092
|
-
const [lMaj, lMin, lPat] = latest.split('.').map(Number);
|
|
1093
|
-
const [cMaj, cMin, cPat] = current.split('.').map(Number);
|
|
1094
|
-
const isNewer = lMaj > cMaj || (lMaj === cMaj && lMin > cMin) || (lMaj === cMaj && lMin === cMin && lPat > cPat);
|
|
1095
|
-
return isNewer ? latest : null;
|
|
1096
|
-
} catch { return null; }
|
|
1097
|
-
}
|
|
1098
|
-
|
|
1099
1065
|
// ── Multi-line dashboard (full mode) ─────────────────────────────
|
|
1100
1066
|
function generateDashboard() {
|
|
1101
1067
|
const git = getGitInfo();
|
|
@@ -1213,17 +1179,6 @@ function generateDashboard() {
|
|
|
1213
1179
|
|
|
1214
1180
|
lines.push(\`\${x.teal}🧠 CONTEXT\${x.reset} \${graphStr}\${hilStr}\`);
|
|
1215
1181
|
|
|
1216
|
-
// ── Row 3: Sync / update warnings (only when action needed) ──
|
|
1217
|
-
const sync = getSyncStatus();
|
|
1218
|
-
const upd = getUpdateStatus();
|
|
1219
|
-
if (sync || upd) {
|
|
1220
|
-
const parts = [];
|
|
1221
|
-
if (sync) parts.push(\`\${x.coral}⚠ sync: local v\${sync.local} → global v\${sync.global} (monomind sync run)\${x.reset}\`);
|
|
1222
|
-
if (upd) parts.push(\`\${x.gold}↑ v\${upd} available (npm i -g monomind)\${x.reset}\`);
|
|
1223
|
-
lines.push(SEP);
|
|
1224
|
-
lines.push(parts.join(\` \${DIV} \`));
|
|
1225
|
-
}
|
|
1226
|
-
|
|
1227
1182
|
return lines.join('\\n');
|
|
1228
1183
|
}
|
|
1229
1184
|
|
|
@@ -176,8 +176,6 @@ export interface StatuslineConfig {
|
|
|
176
176
|
export interface MCPConfig {
|
|
177
177
|
/** Include monomind MCP server */
|
|
178
178
|
monomind: boolean;
|
|
179
|
-
/** Include ruv-swarm MCP server */
|
|
180
|
-
ruvSwarm: boolean;
|
|
181
179
|
/** Include monograph knowledge graph MCP server */
|
|
182
180
|
graphify: boolean;
|
|
183
181
|
/** Auto-start MCP server */
|
|
@@ -112,7 +112,6 @@ export const DEFAULT_INIT_OPTIONS = {
|
|
|
112
112
|
},
|
|
113
113
|
mcp: {
|
|
114
114
|
monomind: true,
|
|
115
|
-
ruvSwarm: false,
|
|
116
115
|
graphify: false,
|
|
117
116
|
autoStart: false,
|
|
118
117
|
port: 3000,
|
|
@@ -236,7 +235,6 @@ export const FULL_INIT_OPTIONS = {
|
|
|
236
235
|
},
|
|
237
236
|
mcp: {
|
|
238
237
|
monomind: true,
|
|
239
|
-
ruvSwarm: true,
|
|
240
238
|
graphify: false,
|
|
241
239
|
autoStart: false,
|
|
242
240
|
port: 3000,
|