@codemcp/workflows 6.10.0 → 6.11.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemcp/workflows",
3
- "version": "6.10.0",
3
+ "version": "6.11.0",
4
4
  "description": "A Model Context Protocol server that acts as an intelligent conversation state manager and development guide for LLMs, featuring comprehensive long-term memory with persistent project artifacts",
5
5
  "type": "module",
6
6
  "main": "packages/cli/dist/index.js",
@@ -51,7 +51,7 @@
51
51
  "typescript": "^5.9.3",
52
52
  "vitepress": "^1.6.4",
53
53
  "vitest": "4.0.18",
54
- "@codemcp/workflows-core": "6.10.0"
54
+ "@codemcp/workflows-core": "6.11.0"
55
55
  },
56
56
  "lint-staged": {
57
57
  "*.{ts,js,mts,cts,tsx,jsx}": [
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemcp/workflows-cli",
3
- "version": "6.10.0",
3
+ "version": "6.11.0",
4
4
  "description": "CLI tools for responsible-vibe development workflows",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemcp/workflows-core",
3
- "version": "6.10.0",
3
+ "version": "6.11.0",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemcp/workflows-docs",
3
- "version": "6.10.0",
3
+ "version": "6.11.0",
4
4
  "description": "Documentation site for Responsible Vibe MCP",
5
5
  "type": "module",
6
6
  "scripts": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemcp/workflows-server",
3
- "version": "6.10.0",
3
+ "version": "6.11.0",
4
4
  "description": "MCP server for responsible-vibe development workflows - provides structured workflow guidance",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -28568,9 +28568,17 @@ var WorkflowsPlugin = async (input) => {
28568
28568
  directory: input.directory,
28569
28569
  worktree: input.worktree
28570
28570
  });
28571
- const envWorkflows = process.env.WORKFLOW?.toLowerCase();
28572
- let workflowsEnabled = envWorkflows === "off" ? false : true;
28573
- logger37.info("Workflows state initialized", { workflowsEnabled });
28571
+ const envAgentFilter = process.env.WORKFLOW_AGENTS;
28572
+ const agentFilter = envAgentFilter && envAgentFilter.trim() ? new Set(
28573
+ envAgentFilter.split(",").map((a) => a.trim().toLowerCase()).filter(Boolean)
28574
+ ) : null;
28575
+ function isAgentEnabled(agent) {
28576
+ if (agentFilter === null) return true;
28577
+ return agentFilter.has((agent ?? "").toLowerCase());
28578
+ }
28579
+ logger37.info("Workflows state initialized", {
28580
+ agentFilter: agentFilter ? [...agentFilter] : "all (no filter)"
28581
+ });
28574
28582
  const planManager = new PlanManager2();
28575
28583
  const instructionGenerator = new InstructionGenerator2();
28576
28584
  let cachedServerContext = null;
@@ -28661,8 +28669,10 @@ var WorkflowsPlugin = async (input) => {
28661
28669
  });
28662
28670
  }
28663
28671
  }
28664
- if (!workflowsEnabled) {
28665
- logger37.debug("chat.message: Workflows disabled, skipping hook");
28672
+ if (!isAgentEnabled(hookInput.agent)) {
28673
+ logger37.debug("chat.message: Agent does not support workflows", {
28674
+ agent: hookInput.agent
28675
+ });
28666
28676
  return;
28667
28677
  }
28668
28678
  let result = null;
@@ -28748,10 +28758,6 @@ var WorkflowsPlugin = async (input) => {
28748
28758
  * Fires before each tool execution. We block disallowed file edits based on phase.
28749
28759
  */
28750
28760
  "tool.execute.before": async (hookInput, output) => {
28751
- if (!workflowsEnabled) {
28752
- logger37.debug("tool.execute.before: Workflows disabled, skipping hook");
28753
- return;
28754
- }
28755
28761
  const editTools = ["edit", "write", "patch", "apply_patch", "multiedit"];
28756
28762
  if (!editTools.includes(hookInput.tool)) {
28757
28763
  return;
@@ -28794,12 +28800,6 @@ ACTION REQUIRED: Use transition_phase tool to move to a phase that allows editin
28794
28800
  * to preserve and instruct the summary to end with phase continuation.
28795
28801
  */
28796
28802
  "experimental.session.compacting": async (hookInput, output) => {
28797
- if (!workflowsEnabled) {
28798
- logger37.debug(
28799
- "experimental.session.compacting: Workflows disabled, skipping hook"
28800
- );
28801
- return;
28802
- }
28803
28803
  logger37.debug("experimental.session.compacting hook fired", {
28804
28804
  sessionID: hookInput.sessionID
28805
28805
  });
@@ -28817,51 +28817,19 @@ ACTION REQUIRED: Use transition_phase tool to move to a phase that allows editin
28817
28817
  logger37.info("Injected compaction guidance", { phase: state.phase });
28818
28818
  },
28819
28819
  /**
28820
- * Hook 4: command.execute.before
28821
- * Intercept /workflow and /wf commands to toggle workflows enabled state
28822
- */
28823
- "command.execute.before": async (hookInput, output) => {
28824
- const cmd = hookInput.command.toLowerCase();
28825
- const args = (hookInput.arguments || "").toLowerCase().trim();
28826
- if (cmd === "workflow" || cmd === "wf") {
28827
- if (args === "on") {
28828
- workflowsEnabled = true;
28829
- output.parts.push({
28830
- id: `prt_workflows_toggle_${Date.now()}`,
28831
- type: "text",
28832
- text: "Workflows enabled for this session."
28833
- });
28834
- logger37.info("Workflows toggled via command", { workflowsEnabled });
28835
- } else if (args === "off") {
28836
- workflowsEnabled = false;
28837
- output.parts.push({
28838
- id: `prt_workflows_toggle_${Date.now()}`,
28839
- type: "text",
28840
- text: "Workflows disabled for this session. Plugin will not inject instructions or enforce file restrictions."
28841
- });
28842
- logger37.info("Workflows toggled via command", { workflowsEnabled });
28843
- } else {
28844
- output.parts.push({
28845
- id: `prt_workflows_toggle_${Date.now()}`,
28846
- type: "text",
28847
- text: `Usage: /workflow on|off or /wf on|off
28848
- Current state: ${workflowsEnabled ? "enabled" : "disabled"}`
28849
- });
28850
- }
28851
- }
28852
- },
28853
- /**
28854
- * Custom tools - always registered so /workflow on can re-enable them mid-session.
28855
- * Each tool's execute method checks workflowsEnabled at call time and throws a
28856
- * clear message when disabled, rather than silently failing.
28820
+ * Custom tools - always registered to allow clear error messages.
28821
+ * Each tool's execute method checks the agent filter at call time and throws
28822
+ * an error if the agent is not allowed to use workflows.
28857
28823
  */
28858
28824
  tool: await (async () => {
28859
- const DISABLED_MSG = "Workflows are disabled (WORKFLOW=off). Enable with /workflow on or /wf on";
28860
28825
  const wrap = (def) => ({
28861
28826
  ...def,
28862
28827
  execute: async (args, ctx) => {
28863
- if (!workflowsEnabled) {
28864
- throw new Error(DISABLED_MSG);
28828
+ const agent = ctx.agent;
28829
+ if (!isAgentEnabled(agent)) {
28830
+ throw new Error(
28831
+ `Workflows are not enabled for this agent (${agent}). Set WORKFLOW_AGENTS environment variable to include this agent, or use a different agent.`
28832
+ );
28865
28833
  }
28866
28834
  return def.execute(args, ctx);
28867
28835
  }
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemcp/workflows-opencode",
3
- "version": "6.10.0",
3
+ "version": "6.11.0",
4
4
  "description": "OpenCode plugin for structured development workflows",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemcp/workflows-opencode-tui",
3
- "version": "6.10.0",
3
+ "version": "6.11.0",
4
4
  "description": "OpenCode TUI sidebar plugin that displays the current responsible-vibe workflow phase and name",
5
5
  "main": "workflows-phase.tsx",
6
6
  "exports": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codemcp/workflows-visualizer",
3
- "version": "6.10.0",
3
+ "version": "6.11.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.ts",
6
6
  "module": "dist/index.ts",