@plannotator/opencode 0.6.5 → 0.6.6-beta.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.
Files changed (2) hide show
  1. package/dist/index.js +10 -20
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -2798,27 +2798,13 @@ var PlannotatorPlugin = async (ctx) => {
2798
2798
  return process.env.PLANNOTATOR_SHARE !== "disabled";
2799
2799
  }
2800
2800
  return {
2801
- "experimental.chat.system.transform": async (_input, output) => {
2802
- const existingSystem = output.system.join(`
2803
- `).toLowerCase();
2804
- if (existingSystem.includes("title generator") || existingSystem.includes("generate a title")) {
2805
- return;
2801
+ "chat.message": async (input, output) => {
2802
+ if (input.agent === "plan") {
2803
+ output.parts.unshift({
2804
+ type: "text",
2805
+ text: `[Reminder: When your plan is complete, call \`submit_plan\` for interactive user review. Do not proceed with implementation until the plan is approved.]`
2806
+ });
2806
2807
  }
2807
- output.system.push(`
2808
- ## Plan Submission
2809
-
2810
- When you have completed your plan, you MUST call the \`submit_plan\` tool to submit it for user review.
2811
- The user will be able to:
2812
- - Review your plan visually in a dedicated UI
2813
- - Annotate specific sections with feedback
2814
- - Approve the plan to proceed with implementation
2815
- - Request changes with detailed feedback
2816
-
2817
- If your plan is rejected, you will receive the user's annotated feedback. Revise your plan
2818
- based on their feedback and call submit_plan again.
2819
-
2820
- Do NOT proceed with implementation until your plan is approved.
2821
- `);
2822
2808
  },
2823
2809
  event: async ({ event }) => {
2824
2810
  const isCommandEvent = event.type === "command.executed" || event.type === "tui.command.execute";
@@ -2879,6 +2865,10 @@ Please address this feedback.`
2879
2865
  summary: tool.schema.string().describe("A brief 1-2 sentence summary of what the plan accomplishes")
2880
2866
  },
2881
2867
  async execute(args, context) {
2868
+ const subAgents = ["general", "explore"];
2869
+ if (subAgents.includes(context.agent)) {
2870
+ return `The submit_plan tool is only available to primary agents (plan, build). Sub-agents cannot submit plans directly.`;
2871
+ }
2882
2872
  const server = await startPlannotatorServer({
2883
2873
  plan: args.plan,
2884
2874
  origin: "opencode",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plannotator/opencode",
3
- "version": "0.6.5",
3
+ "version": "0.6.6-beta.0",
4
4
  "description": "Plannotator plugin for OpenCode - interactive plan review with visual annotation",
5
5
  "author": "backnotprop",
6
6
  "license": "BSL-1.1",
@@ -35,7 +35,7 @@
35
35
  "prepublishOnly": "bun run build"
36
36
  },
37
37
  "dependencies": {
38
- "@opencode-ai/plugin": "^1.0.218"
38
+ "@opencode-ai/plugin": "^1.1.10"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "bun": ">=1.0.0"