Author SHA1 Message Date
3d58bfc8af release: v1.0.0-rc1 — feature freeze for stable release
* fix: orphan agents now grouped under main in agent tree

Agents without parentAgentId, own bot, or binding-based inference
(e.g. dynamically created sub-agents like codex-worker) were
incorrectly displayed as top-level roots. They now default to
main's subtree.

Bump version to 0.9.4.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* cleanup: drop archived workflow skill defaults

* release: v1.0.0-rc1 — feature freeze for stable release

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
Co-authored-by: dtzp555 <dtzp555@gmail.com>
2026-04-05 07:51:39 +10:00
d3fdbcef6a fix: improve agent tree ordering and parent inference (#15)
Root agents with their own bot (hasOwnBot) now sort to the top of the
agent tree alongside main. Agents listed in a parent's
subagents.allowAgents are automatically inferred as children even
without an explicit parentAgentId or Telegram binding.

Co-authored-by: Tao <dtzp555@gmail.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-17 20:33:26 +10:00
5 changed files with 34 additions and 15 deletions
+3 -3
View File
@@ -166,7 +166,7 @@ That is why OCM should be thought of as a **control panel for an existing OpenCl
## What's New (v0.9.x)
- **Skills & Tools auto-config (v0.9.4)**: new agents/sub-agents automatically get default Skills (memory-continuity, agent-workflow, execution-agent-dispatch, session-logs) and Tool Groups (fs, runtime, memory, sessions_spawn, subagents). A collapsible Skills & Tools picker in the creation form lets you customize per agent.
- **Skills & Tools auto-config**: new agents/sub-agents automatically get default Skills (`memory-continuity`, `session-logs`) and Tool Groups (`fs`, `runtime`, `memory`, `sessions_spawn`, `subagents`). A collapsible Skills & Tools picker in the creation form lets you customize per agent.
- **Discord support (v0.9.x)**: add agent/sub-agent flows for Discord (main agent binds channel; sub-agent binds thread).
- **README screenshots gallery**: screenshots grouped into a collapsible section so the homepage stays shorter.
- **Built-in CLI terminal**: run OpenClaw commands from any page with streaming output, presets, favorites, and Tab completion.
@@ -282,8 +282,8 @@ ocm/
## Related Projects
- [clawkeeper](https://github.com/dtzp555-max/clawkeeper) — OpenClaw memory operations kit for doctor / provider switch / backup / restore workflows.
- [execution-agent-planner](https://github.com/dtzp555-max/execution-agent-planner) — skill for deciding when work should stay with one execution agent or split across specialized workers.
- [clawkeeper](https://github.com/dtzp555-max/clawkeeper) — OpenClaw memory operations kit for doctor / provider switch / backup / restore workflows. *(archived)*
- [execution-agent-planner](https://github.com/dtzp555-max/execution-agent-planner) — archived planning skill for deciding when work should stay with one execution agent or split across specialized workers.
- [gh-pr-release-flow](https://github.com/dtzp555-max/gh-pr-release-flow) — skill for PR-first GitHub repos where release work should happen after merge.
## License
+1 -1
View File
@@ -138,7 +138,7 @@ Click `+ Add Agent` and fill:
- workspace path (recommended: separate folder per agent)
- model (dropdown is sourced from `openclaw models list`)
- the BotFather token
- **Skills & Tools** (optional): expand the collapsible picker at the bottom to customize. By default, new agents get: `memory-continuity`, `agent-workflow`, `execution-agent-dispatch`, `session-logs` as Skills, and `group:fs`, `group:runtime`, `group:memory`, `sessions_spawn`, `subagents` as Tool Groups. Use the quick-action buttons (Default / All / None) to adjust.
- **Skills & Tools** (optional): expand the collapsible picker at the bottom to customize. By default, new agents get: `memory-continuity`, `session-logs` as Skills, and `group:fs`, `group:runtime`, `group:memory`, `sessions_spawn`, `subagents` as Tool Groups. Use the quick-action buttons (Default / All / None) to adjust.
OCM writes the agent + Telegram account/binding + skills + tool groups into `openclaw.json`.
+1 -1
View File
@@ -123,7 +123,7 @@ bash start.sh
- workspace 路径(建议独立目录)
- 选择模型(下拉来自 `openclaw models list`,更不容易选错)
- 填入刚拿到的 bot token
- **Skills & Tools**(可选):展开表单底部的折叠面板可自定义。默认预设:Skills 包含 `memory-continuity``agent-workflow``execution-agent-dispatch``session-logs`Tool Groups 包含 `group:fs``group:runtime``group:memory``sessions_spawn``subagents`。提供「仅默认 / 全选 / 清空」快捷按钮。
- **Skills & Tools**(可选):展开表单底部的折叠面板可自定义。默认预设:Skills 包含 `memory-continuity``session-logs`Tool Groups 包含 `group:fs``group:runtime``group:memory``sessions_spawn``subagents`。提供「仅默认 / 全选 / 清空」快捷按钮。
保存后,OCM 会把主 Agent + skills + tools 写进 `openclaw.json`,并把 bot token 绑定到对应 `accountId`
+28 -9
View File
@@ -24,7 +24,7 @@ const SCRIPT_DIR = __dirname;
const MANAGER_CONFIG = path.join(SCRIPT_DIR, 'manager-config.json');
let PORT = 3333;
let HOST = '0.0.0.0';
const APP_VERSION = '0.9.4';
const APP_VERSION = '1.0.0-rc1';
// --port 参数
const portIdx = process.argv.indexOf('--port');
if (portIdx !== -1 && process.argv[portIdx + 1]) PORT = parseInt(process.argv[portIdx + 1]) || 3333;
@@ -64,7 +64,7 @@ function refreshPaths() {
}
// ── Default Skills & Tool Groups for new agents ─────────────
const DEFAULT_SKILLS = ['memory-continuity', 'agent-workflow', 'execution-agent-dispatch', 'session-logs'];
const DEFAULT_SKILLS = ['memory-continuity', 'session-logs'];
const DEFAULT_TOOL_GROUPS = ['group:fs', 'group:runtime', 'group:memory', 'sessions_spawn', 'subagents'];
function applySkillsTools(agentEntry, skills, toolGroups) {
@@ -428,6 +428,12 @@ async function handleApi(req, res, urlObj, body) {
);
// For main agent without explicit binding, infer its accountId from first unclaimed telegram account
const mainInferredAccountId = telegramAccounts.find(a => !claimedAccounts.has(a)) || telegramAccounts[0] || null;
// Build map: agentId -> parentAgentId inferred from subagents.allowAgents
const allowAgentsParentMap = {};
list.forEach(parent => {
const allowed = parent.subagents?.allowAgents || [];
allowed.forEach(childId => { if (!allowAgentsParentMap[childId]) allowAgentsParentMap[childId] = parent.id; });
});
const enriched = list.map(a => {
const binding = bindings.find(b => b.agentId === a.id && b.match?.peer?.kind === 'group');
const groupId = binding?.match?.peer?.id || null;
@@ -457,7 +463,9 @@ async function handleApi(req, res, urlObj, body) {
// Workspace: explicit per-agent, or defaults.workspace for main
const workspace = a.workspace || (isMain ? defaultWorkspace : null);
return { ...a, workspace, groupId, requireMention: groupId ? (groups[groupId]?.requireMention ?? true) : null,
effectiveModel: modelVal || defaults.model?.primary || '默认', hasOwnBot, accountId, parentAccountId, parentAgentId: a.parentAgentId || null, bindings: (bindings||[]).filter(b=>b.agentId===a.id).map(b=>({
effectiveModel: modelVal || defaults.model?.primary || '默认', hasOwnBot, accountId, parentAccountId,
parentAgentId: a.parentAgentId || (!hasOwnBot ? allowAgentsParentMap[a.id] : null) || null,
bindings: (bindings||[]).filter(b=>b.agentId===a.id).map(b=>({
idx: bindings.indexOf(b),
channel: b.match?.channel || '',
accountId: b.match?.accountId || '',
@@ -3021,14 +3029,11 @@ function showAddForm(type) {
// ── Skills / Tools picker helper ──────────────────────────
const AVAILABLE_SKILLS = [
{ id:'memory-continuity', label:'Memory Continuity', isDefault:true },
{ id:'agent-workflow', label:'Agent Workflow', isDefault:true },
{ id:'execution-agent-dispatch', label:'Execution Dispatch', isDefault:true },
{ id:'session-logs', label:'Session Logs', isDefault:true },
{ id:'browser-use', label:'Browser Use', isDefault:false },
{ id:'github', label:'GitHub', isDefault:false },
{ id:'gh-issues', label:'GitHub Issues', isDefault:false },
{ id:'coding-agent', label:'Coding Agent', isDefault:false },
{ id:'execution-agent-planner', label:'Execution Planner', isDefault:false },
{ id:'discord', label:'Discord', isDefault:false },
{ id:'weather', label:'Weather', isDefault:false },
{ id:'summarize', label:'Summarize', isDefault:false },
@@ -3352,16 +3357,24 @@ function renderAgents() {
// Build grouping: prefer explicit parentAgentId; fallback to telegram bot-root grouping.
const byId = {}; (S.agents||[]).forEach(a=>{ byId[a.id]=a; });
// infer parentAgentId for legacy telegram sub-agents if missing
// infer parentAgentId for sub-agents if missing
const accountToRootId = {};
(S.agents||[]).forEach(a=>{ if(a.hasOwnBot && a.accountId) accountToRootId[a.accountId]=a.id; });
(S.agents||[]).forEach(a=>{
if(!a.parentAgentId && !a.hasOwnBot && a.parentAccountId && accountToRootId[a.parentAccountId]){
if(a.parentAgentId || a.hasOwnBot || a.id === 'main') return; // already resolved or is a root
// Case 1: legacy telegram sub-agent with parentAccountId
if(a.parentAccountId && accountToRootId[a.parentAccountId]){
a._inferParentAgentId = accountToRootId[a.parentAccountId];
return;
}
// Case 2: orphan agent (no own bot, no parentAgentId, no binding-based inference)
// These are likely dynamically created sub-agents — default to 'main'
if(byId['main']){
a._inferParentAgentId = 'main';
}
});
const roots=[]; const childrenByRoot={}; const orphans=[];
const roots=[]; const childrenByRoot={};
(S.agents||[]).forEach(a=>{
const pid = a.parentAgentId || a._inferParentAgentId || '';
if(pid && byId[pid]){
@@ -3370,6 +3383,12 @@ function renderAgents() {
roots.push(a);
}
});
// Sort roots: agents with own bot first (main always first among those), then orphans
roots.sort((a,b)=>{
if(a.id==='main') return -1; if(b.id==='main') return 1;
if(a.hasOwnBot && !b.hasOwnBot) return -1; if(!a.hasOwnBot && b.hasOwnBot) return 1;
return (a.name||a.id).localeCompare(b.name||b.id);
});
function fmtBinding(b){
const ch = (b.channel||'').toLowerCase();
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "openclaw-manager",
"version": "0.9.3",
"version": "1.0.0-rc1",
"description": "A local web UI for managing OpenClaw AI agents \u2014 no npm install required",
"main": "openclaw-manager.js",
"scripts": {