Files
devclaw-gitea/index.ts
Lauren ten Hoor d7178bb8e5 refactor: reorganize task management imports and update task handling tools
- Updated import paths for task management providers in task-comment, task-create, and task-update tools.
- Removed deprecated task-complete and task-pickup tools, replacing them with work-finish and work-start tools for improved task handling.
- Enhanced work-finish and work-start tools to streamline task completion and pickup processes, including context-aware detection and auto-scheduling features.
- Updated package.json to include build scripts and main entry point.
- Modified tsconfig.json to enable output directory, declaration files, and source maps for better TypeScript support.
2026-02-10 21:39:41 +08:00

79 lines
2.9 KiB
TypeScript

import type { OpenClawPluginApi } from "openclaw/plugin-sdk";
import { createWorkStartTool } from "./lib/tools/work-start.js";
import { createWorkFinishTool } from "./lib/tools/work-finish.js";
import { createTaskCreateTool } from "./lib/tools/task-create.js";
import { createTaskUpdateTool } from "./lib/tools/task-update.js";
import { createTaskCommentTool } from "./lib/tools/task-comment.js";
import { createStatusTool } from "./lib/tools/status.js";
import { createAutoPickupTool } from "./lib/tools/auto-pickup.js";
import { createProjectRegisterTool } from "./lib/tools/project-register.js";
import { createSetupTool } from "./lib/tools/setup.js";
import { createOnboardTool } from "./lib/tools/onboard.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" },
medior: { type: "string" },
senior: { type: "string" },
qa: { type: "string" },
},
},
projectExecution: {
type: "string",
enum: ["parallel", "sequential"],
description: "Plugin-level: parallel (each project independent) or sequential (one project at a time)",
default: "parallel",
},
notifications: {
type: "object",
description: "Notification settings",
properties: {
heartbeatDm: { type: "boolean", default: true },
workerStart: { type: "boolean", default: true },
workerComplete: { type: "boolean", default: true },
},
},
},
},
register(api: OpenClawPluginApi) {
// Worker lifecycle
api.registerTool(createWorkStartTool(api), { names: ["work_start"] });
api.registerTool(createWorkFinishTool(api), { names: ["work_finish"] });
// Task management
api.registerTool(createTaskCreateTool(api), { names: ["task_create"] });
api.registerTool(createTaskUpdateTool(api), { names: ["task_update"] });
api.registerTool(createTaskCommentTool(api), { names: ["task_comment"] });
// Operations
api.registerTool(createStatusTool(api), { names: ["status"] });
api.registerTool(createAutoPickupTool(api), { names: ["auto_pickup"] });
// Setup & config
api.registerTool(createProjectRegisterTool(api), { names: ["project_register"] });
api.registerTool(createSetupTool(api), { names: ["setup"] });
api.registerTool(createOnboardTool(api), { names: ["onboard"] });
// CLI
api.registerCli(({ program }: { program: any }) => registerCli(program), {
commands: ["devclaw"],
});
api.logger.info("DevClaw plugin registered (10 tools, 1 CLI command)");
},
};
export default plugin;