feat: Implement context detection and onboarding tools for DevClaw
- Add context-guard.ts to detect interaction context (via-agent, direct, group) and generate guardrails. - Introduce onboarding.ts for conversational onboarding context templates and workspace file checks. - Enhance setup.ts to support new agent creation with channel binding and migration of existing bindings. - Create analyze-channel-bindings.ts to analyze channel availability and detect binding conflicts. - Implement context-test.ts for debugging context detection. - Develop devclaw_onboard.ts for explicit onboarding tool that guides users through setup. - Update devclaw_setup.ts to include channel binding and migration support in setup process. - Modify project-register.ts to enforce project registration from group context and auto-populate group ID. - Enhance queue-status.ts to provide context-aware status checks and recommendations. - Update task tools (task-complete, task-create, task-pickup) to clarify group ID usage for Telegram/WhatsApp.
This commit is contained in:
16
index.ts
16
index.ts
@@ -6,6 +6,9 @@ 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 { registerCli } from "./lib/cli.js";
|
||||
|
||||
const plugin = {
|
||||
@@ -60,13 +63,24 @@ const plugin = {
|
||||
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"],
|
||||
});
|
||||
|
||||
// CLI: `openclaw devclaw setup`
|
||||
api.registerCli(({ program }: { program: any }) => registerCli(program), {
|
||||
commands: ["devclaw"],
|
||||
});
|
||||
|
||||
api.logger.info("DevClaw plugin registered (7 tools, 1 CLI command)");
|
||||
api.logger.info(
|
||||
"DevClaw plugin registered (10 tools, 1 CLI command)",
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user