Improvements to notification system for better traceability: 1. DEV Completion Notifications: - Always include issue URL (📋 Issue: ...) - Include PR/MR URL when available (🔗 PR: ...) - Issue URL serves as fallback when PR/MR not found - Both URLs shown when PR/MR exists for maximum traceability 2. QA Pass Notifications: - Now include issue URL (📋 Issue: ...) - Provides direct link to resolved issue 3. Tool Aliases: - Added 'work_finish' as alias for 'task_complete' - Added 'work_start' as alias for 'task_pickup' - Added 'status' as alias for 'queue_status' - Matches naming used in AGENTS.md documentation Example DEV notification: ✅ DEV done #106 — Enhanced notification URLs 📋 Issue: https://github.com/user/repo/issues/106 🔗 PR: https://github.com/user/repo/pull/107 Moved to QA queue. Example QA notification: 🎉 QA PASS #106 — All tests passed 📋 Issue: https://github.com/user/repo/issues/106 Issue closed. Addresses issue #106
119 lines
4.2 KiB
TypeScript
119 lines
4.2 KiB
TypeScript
import type { OpenClawPluginApi } from "openclaw/plugin-sdk";
|
|
import { createTaskPickupTool } from "./lib/tools/task-pickup.js";
|
|
import { createTaskCompleteTool } from "./lib/tools/task-complete.js";
|
|
import { createTaskUpdateTool } from "./lib/tools/task-update.js";
|
|
import { createTaskCommentTool } from "./lib/tools/task-comment.js";
|
|
import { createQueueStatusTool } from "./lib/tools/queue-status.js";
|
|
import { createSessionHealthTool } from "./lib/tools/session-health.js";
|
|
import { createProjectRegisterTool } from "./lib/tools/project-register.js";
|
|
import { createTaskCreateTool } from "./lib/tools/task-create.js";
|
|
import { createSetupTool } from "./lib/tools/devclaw-setup.js";
|
|
import { createOnboardTool } from "./lib/tools/devclaw-onboard.js";
|
|
import { createAnalyzeChannelBindingsTool } from "./lib/tools/analyze-channel-bindings.js";
|
|
import { createContextTestTool } from "./lib/tools/context-test.js";
|
|
import { createHeartbeatTickTool } from "./lib/tools/heartbeat-tick.js";
|
|
import { registerCli } from "./lib/cli.js";
|
|
|
|
const plugin = {
|
|
id: "devclaw",
|
|
name: "DevClaw",
|
|
description:
|
|
"Multi-project dev/qa pipeline orchestration with GitHub/GitLab integration, developer tiers, and audit logging.",
|
|
configSchema: {
|
|
type: "object",
|
|
properties: {
|
|
models: {
|
|
type: "object",
|
|
description: "Model mapping per developer tier",
|
|
properties: {
|
|
junior: { type: "string", description: "Junior dev model" },
|
|
medior: { type: "string", description: "Medior dev model" },
|
|
senior: { type: "string", description: "Senior dev model" },
|
|
qa: { type: "string", description: "QA engineer model" },
|
|
},
|
|
},
|
|
projectExecution: {
|
|
type: "string",
|
|
enum: ["parallel", "sequential"],
|
|
description: "Plugin-level project execution: parallel (each project independent) or sequential (only one project active at a time)",
|
|
default: "parallel",
|
|
},
|
|
notifications: {
|
|
type: "object",
|
|
description: "Notification settings for worker lifecycle events",
|
|
properties: {
|
|
heartbeatDm: {
|
|
type: "boolean",
|
|
description: "Send heartbeat summaries to orchestrator DM. Default: true",
|
|
default: true,
|
|
},
|
|
workerStart: {
|
|
type: "boolean",
|
|
description: "Post when worker starts a task. Default: true",
|
|
default: true,
|
|
},
|
|
workerComplete: {
|
|
type: "boolean",
|
|
description: "Post when worker completes a task. Default: true",
|
|
default: true,
|
|
},
|
|
},
|
|
},
|
|
},
|
|
},
|
|
|
|
register(api: OpenClawPluginApi) {
|
|
// Agent tools (primary interface — agent calls these directly)
|
|
api.registerTool(createTaskPickupTool(api), {
|
|
names: ["task_pickup", "work_start"],
|
|
});
|
|
api.registerTool(createTaskCompleteTool(api), {
|
|
names: ["task_complete", "work_finish"],
|
|
});
|
|
api.registerTool(createTaskUpdateTool(api), {
|
|
names: ["task_update"],
|
|
});
|
|
api.registerTool(createTaskCommentTool(api), {
|
|
names: ["task_comment"],
|
|
});
|
|
api.registerTool(createQueueStatusTool(api), {
|
|
names: ["queue_status", "status"],
|
|
});
|
|
api.registerTool(createSessionHealthTool(api), {
|
|
names: ["session_health"],
|
|
});
|
|
api.registerTool(createProjectRegisterTool(api), {
|
|
names: ["project_register"],
|
|
});
|
|
api.registerTool(createTaskCreateTool(api), {
|
|
names: ["task_create"],
|
|
});
|
|
api.registerTool(createSetupTool(api), {
|
|
names: ["devclaw_setup"],
|
|
});
|
|
api.registerTool(createOnboardTool(api), {
|
|
names: ["devclaw_onboard"],
|
|
});
|
|
api.registerTool(createAnalyzeChannelBindingsTool(api), {
|
|
names: ["analyze_channel_bindings"],
|
|
});
|
|
api.registerTool(createContextTestTool(api), {
|
|
names: ["context_test"],
|
|
});
|
|
api.registerTool(createHeartbeatTickTool(api), {
|
|
names: ["heartbeat_tick"],
|
|
});
|
|
|
|
// CLI: `openclaw devclaw setup`
|
|
api.registerCli(({ program }: { program: any }) => registerCli(program), {
|
|
commands: ["devclaw"],
|
|
});
|
|
|
|
api.logger.info(
|
|
"DevClaw plugin registered (13 tools, 1 CLI command)",
|
|
);
|
|
},
|
|
};
|
|
|
|
export default plugin;
|