opencode-planpilot 0.2.2 → 0.2.3

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": "opencode-planpilot",
3
- "version": "0.2.2",
3
+ "version": "0.2.3",
4
4
  "description": "Planpilot plugin for OpenCode",
5
5
  "type": "module",
6
6
  "repository": {
package/src/command.ts CHANGED
@@ -125,8 +125,6 @@ async function handlePlan(
125
125
  context: { cwd: string | undefined },
126
126
  ) {
127
127
  switch (subcommand) {
128
- case "add":
129
- return { planIds: handlePlanAdd(app, args), shouldSync: true }
130
128
  case "add-tree":
131
129
  return { planIds: handlePlanAddTree(app, args), shouldSync: true }
132
130
  case "list":
@@ -212,17 +210,6 @@ async function handleGoal(app: PlanpilotApp, subcommand: string | undefined, arg
212
210
  }
213
211
  }
214
212
 
215
- function handlePlanAdd(app: PlanpilotApp, args: string[]): number[] {
216
- const [title, content] = args
217
- if (!title || content === undefined) {
218
- throw invalidInput("plan add requires <title> <content>")
219
- }
220
- ensureNonEmpty("plan content", content)
221
- const plan = app.addPlan({ title, content })
222
- log(`Created plan ID: ${plan.id}: ${plan.title}`)
223
- return [plan.id]
224
- }
225
-
226
213
  function handlePlanAddTree(app: PlanpilotApp, args: string[]): number[] {
227
214
  const [title, content, ...rest] = args
228
215
  if (!title || content === undefined) {
package/src/index.ts CHANGED
@@ -297,6 +297,10 @@ export const PlanpilotPlugin: Plugin = async (ctx) => {
297
297
  await ctx.client.session.promptAsync({
298
298
  path: { id: sessionID },
299
299
  body: promptBody,
300
+ // OpenCode server routes requests to the correct instance (project) using this header.
301
+ // Without it, the server falls back to process.cwd(), which breaks when OpenCode is
302
+ // managed by opencode-studio (cwd != active project directory).
303
+ headers: ctx.directory ? { "x-opencode-directory": ctx.directory } : undefined,
300
304
  })
301
305
 
302
306
  await log("info", "auto-continue prompt_async accepted", {
package/src/prompt.ts CHANGED
@@ -42,7 +42,6 @@ export const PLANPILOT_HELP_TEXT = [
42
42
  "- help",
43
43
  "",
44
44
  "Plan:",
45
- "- plan add <title> <content>",
46
45
  "- plan add-tree <title> <content> --step <content> [--executor ai|human] [--goal <content>]... [--step ...]...",
47
46
  "- plan list [--scope project|all] [--status todo|done|all] [--limit N] [--page N] [--order id|title|created|updated] [--desc]",
48
47
  "- plan count [--scope project|all] [--status todo|done|all]",