palmier 0.6.8 → 0.6.9

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 (79) hide show
  1. package/dist/agents/agent.d.ts +2 -2
  2. package/dist/agents/aider.d.ts +1 -1
  3. package/dist/agents/aider.js +2 -5
  4. package/dist/agents/claude.d.ts +1 -1
  5. package/dist/agents/claude.js +2 -5
  6. package/dist/agents/cline.d.ts +1 -1
  7. package/dist/agents/cline.js +2 -5
  8. package/dist/agents/codex.d.ts +1 -1
  9. package/dist/agents/codex.js +2 -5
  10. package/dist/agents/copilot.d.ts +1 -1
  11. package/dist/agents/copilot.js +2 -5
  12. package/dist/agents/cursor.d.ts +1 -1
  13. package/dist/agents/cursor.js +2 -5
  14. package/dist/agents/deepagents.d.ts +1 -1
  15. package/dist/agents/deepagents.js +2 -5
  16. package/dist/agents/droid.d.ts +1 -1
  17. package/dist/agents/droid.js +2 -5
  18. package/dist/agents/gemini.d.ts +1 -1
  19. package/dist/agents/gemini.js +2 -5
  20. package/dist/agents/goose.d.ts +1 -1
  21. package/dist/agents/goose.js +2 -5
  22. package/dist/agents/hermes.d.ts +1 -1
  23. package/dist/agents/hermes.js +2 -5
  24. package/dist/agents/kimi.d.ts +1 -1
  25. package/dist/agents/kimi.js +2 -5
  26. package/dist/agents/kiro.d.ts +1 -1
  27. package/dist/agents/kiro.js +2 -5
  28. package/dist/agents/openclaw.d.ts +1 -1
  29. package/dist/agents/openclaw.js +2 -5
  30. package/dist/agents/opencode.d.ts +1 -1
  31. package/dist/agents/opencode.js +2 -5
  32. package/dist/agents/qoder.d.ts +1 -1
  33. package/dist/agents/qoder.js +2 -5
  34. package/dist/agents/qwen.d.ts +1 -1
  35. package/dist/agents/qwen.js +2 -5
  36. package/dist/agents/shared-prompt.js +1 -1
  37. package/dist/commands/run.js +1 -2
  38. package/dist/mcp-tools.d.ts +1 -1
  39. package/dist/mcp-tools.js +2 -2
  40. package/dist/pwa/assets/{index-C8vJwUNi.js → index-CZejk2al.js} +1 -1
  41. package/dist/pwa/assets/{web-NxTETXZK.js → web-C48txJFl.js} +1 -1
  42. package/dist/pwa/assets/{web-6UChJFov.js → web-zj8Blync.js} +1 -1
  43. package/dist/pwa/index.html +1 -1
  44. package/dist/pwa/service-worker.js +1 -1
  45. package/dist/rpc-handler.js +27 -67
  46. package/dist/task.js +2 -3
  47. package/dist/types.d.ts +0 -1
  48. package/package.json +2 -2
  49. package/palmier-server/pwa/src/constants.ts +1 -1
  50. package/src/agents/agent.ts +2 -2
  51. package/src/agents/aider.ts +2 -5
  52. package/src/agents/claude.ts +2 -5
  53. package/src/agents/cline.ts +2 -5
  54. package/src/agents/codex.ts +2 -5
  55. package/src/agents/copilot.ts +2 -5
  56. package/src/agents/cursor.ts +2 -5
  57. package/src/agents/deepagents.ts +2 -5
  58. package/src/agents/droid.ts +2 -5
  59. package/src/agents/gemini.ts +2 -5
  60. package/src/agents/goose.ts +2 -5
  61. package/src/agents/hermes.ts +2 -5
  62. package/src/agents/kimi.ts +2 -5
  63. package/src/agents/kiro.ts +2 -5
  64. package/src/agents/openclaw.ts +2 -5
  65. package/src/agents/opencode.ts +2 -5
  66. package/src/agents/qoder.ts +2 -5
  67. package/src/agents/qwen.ts +2 -5
  68. package/src/agents/shared-prompt.ts +1 -1
  69. package/src/commands/run.ts +1 -2
  70. package/src/mcp-tools.ts +2 -2
  71. package/src/rpc-handler.ts +29 -71
  72. package/src/task.ts +2 -3
  73. package/src/types.ts +0 -1
  74. package/test/agent-instructions.test.ts +84 -19
  75. package/test/agent-output-parsing.test.ts +1 -0
  76. package/test/task-parsing.test.ts +3 -3
  77. package/dist/commands/plan-generation.md +0 -22
  78. package/src/commands/plan-generation.md +0 -22
  79. package/test/fixtures/agent-instructions-snapshot.md +0 -58
@@ -12,8 +12,8 @@ export interface CommandLine {
12
12
  * Abstracts how plans are generated and tasks are executed across different AI agents.
13
13
  */
14
14
  export interface AgentTool {
15
- /** Return the command and args used to generate a plan from a prompt. */
16
- getPlanGenerationCommandLine(prompt: string): CommandLine;
15
+ /** Return the command and args for a short, non-interactive prompt (e.g. generating a task name). */
16
+ getPromptCommandLine(prompt: string): CommandLine;
17
17
  /** Return the command and args used to run a task. If followupPrompt is provided, use it instead of the task's prompt,
18
18
  * and treat it as a continuation of the original run (reuse the same session, etc).
19
19
  * extraPermissions: pass an array of RequiredPermission for transient permissions granted for this run only,
@@ -2,7 +2,7 @@ import type { ParsedTask, RequiredPermission } from "../types.js";
2
2
  import type { AgentTool, CommandLine } from "./agent.js";
3
3
  export declare class Aider implements AgentTool {
4
4
  supportsPermissions: boolean;
5
- getPlanGenerationCommandLine(prompt: string): CommandLine;
5
+ getPromptCommandLine(prompt: string): CommandLine;
6
6
  getTaskRunCommandLine(task: ParsedTask, followupPrompt?: string, extraPermissions?: RequiredPermission[] | "yolo"): CommandLine;
7
7
  init(): Promise<boolean>;
8
8
  }
@@ -3,11 +3,8 @@ import { getAgentInstructions } from "./shared-prompt.js";
3
3
  import { SHELL } from "../platform/index.js";
4
4
  export class Aider {
5
5
  supportsPermissions = false;
6
- getPlanGenerationCommandLine(prompt) {
7
- return {
8
- command: "aider",
9
- args: ["--message", prompt],
10
- };
6
+ getPromptCommandLine(prompt) {
7
+ return { command: "aider", args: ["--message", prompt] };
11
8
  }
12
9
  getTaskRunCommandLine(task, followupPrompt, extraPermissions) {
13
10
  const yolo = extraPermissions === "yolo";
@@ -2,7 +2,7 @@ import type { ParsedTask, RequiredPermission } from "../types.js";
2
2
  import type { AgentTool, CommandLine } from "./agent.js";
3
3
  export declare class ClaudeAgent implements AgentTool {
4
4
  supportsPermissions: boolean;
5
- getPlanGenerationCommandLine(prompt: string): CommandLine;
5
+ getPromptCommandLine(prompt: string): CommandLine;
6
6
  getTaskRunCommandLine(task: ParsedTask, followupPrompt?: string, extraPermissions?: RequiredPermission[] | "yolo"): CommandLine;
7
7
  init(): Promise<boolean>;
8
8
  }
@@ -3,11 +3,8 @@ import { getAgentInstructions } from "./shared-prompt.js";
3
3
  import { SHELL } from "../platform/index.js";
4
4
  export class ClaudeAgent {
5
5
  supportsPermissions = true;
6
- getPlanGenerationCommandLine(prompt) {
7
- return {
8
- command: "claude",
9
- args: ["-p", prompt],
10
- };
6
+ getPromptCommandLine(prompt) {
7
+ return { command: "claude", args: ["-p", prompt] };
11
8
  }
12
9
  getTaskRunCommandLine(task, followupPrompt, extraPermissions) {
13
10
  const yolo = extraPermissions === "yolo";
@@ -2,7 +2,7 @@ import type { ParsedTask, RequiredPermission } from "../types.js";
2
2
  import type { AgentTool, CommandLine } from "./agent.js";
3
3
  export declare class Cline implements AgentTool {
4
4
  supportsPermissions: boolean;
5
- getPlanGenerationCommandLine(prompt: string): CommandLine;
5
+ getPromptCommandLine(prompt: string): CommandLine;
6
6
  getTaskRunCommandLine(task: ParsedTask, followupPrompt?: string, extraPermissions?: RequiredPermission[] | "yolo"): CommandLine;
7
7
  init(): Promise<boolean>;
8
8
  }
@@ -3,11 +3,8 @@ import { getAgentInstructions } from "./shared-prompt.js";
3
3
  import { SHELL } from "../platform/index.js";
4
4
  export class Cline {
5
5
  supportsPermissions = false;
6
- getPlanGenerationCommandLine(prompt) {
7
- return {
8
- command: "cline ",
9
- args: ["--yolo", "-p", prompt],
10
- };
6
+ getPromptCommandLine(prompt) {
7
+ return { command: "cline ", args: ["--yolo", "-p", prompt] };
11
8
  }
12
9
  getTaskRunCommandLine(task, followupPrompt, extraPermissions) {
13
10
  const yolo = extraPermissions === "yolo";
@@ -2,7 +2,7 @@ import type { ParsedTask, RequiredPermission } from "../types.js";
2
2
  import type { AgentTool, CommandLine } from "./agent.js";
3
3
  export declare class CodexAgent implements AgentTool {
4
4
  supportsPermissions: boolean;
5
- getPlanGenerationCommandLine(prompt: string): CommandLine;
5
+ getPromptCommandLine(prompt: string): CommandLine;
6
6
  getTaskRunCommandLine(task: ParsedTask, followupPrompt?: string, extraPermissions?: RequiredPermission[] | "yolo"): CommandLine;
7
7
  init(): Promise<boolean>;
8
8
  }
@@ -3,11 +3,8 @@ import { getAgentInstructions } from "./shared-prompt.js";
3
3
  import { SHELL } from "../platform/index.js";
4
4
  export class CodexAgent {
5
5
  supportsPermissions = true;
6
- getPlanGenerationCommandLine(prompt) {
7
- return {
8
- command: "codex",
9
- args: ["exec", "--skip-git-repo-check", prompt],
10
- };
6
+ getPromptCommandLine(prompt) {
7
+ return { command: "codex", args: ["exec", "--skip-git-repo-check", prompt] };
11
8
  }
12
9
  getTaskRunCommandLine(task, followupPrompt, extraPermissions) {
13
10
  const yolo = extraPermissions === "yolo";
@@ -2,7 +2,7 @@ import type { ParsedTask, RequiredPermission } from "../types.js";
2
2
  import type { AgentTool, CommandLine } from "./agent.js";
3
3
  export declare class CopilotAgent implements AgentTool {
4
4
  supportsPermissions: boolean;
5
- getPlanGenerationCommandLine(prompt: string): CommandLine;
5
+ getPromptCommandLine(prompt: string): CommandLine;
6
6
  getTaskRunCommandLine(task: ParsedTask, followupPrompt?: string, extraPermissions?: RequiredPermission[] | "yolo"): CommandLine;
7
7
  init(): Promise<boolean>;
8
8
  }
@@ -3,11 +3,8 @@ import { getAgentInstructions } from "./shared-prompt.js";
3
3
  import { SHELL } from "../platform/index.js";
4
4
  export class CopilotAgent {
5
5
  supportsPermissions = false;
6
- getPlanGenerationCommandLine(prompt) {
7
- return {
8
- command: "copilot",
9
- args: ["-p", prompt],
10
- };
6
+ getPromptCommandLine(prompt) {
7
+ return { command: "copilot", args: ["-p", prompt] };
11
8
  }
12
9
  getTaskRunCommandLine(task, followupPrompt, extraPermissions) {
13
10
  const yolo = extraPermissions === "yolo";
@@ -2,7 +2,7 @@ import type { ParsedTask, RequiredPermission } from "../types.js";
2
2
  import type { AgentTool, CommandLine } from "./agent.js";
3
3
  export declare class Cursor implements AgentTool {
4
4
  supportsPermissions: boolean;
5
- getPlanGenerationCommandLine(prompt: string): CommandLine;
5
+ getPromptCommandLine(prompt: string): CommandLine;
6
6
  getTaskRunCommandLine(task: ParsedTask, followupPrompt?: string, extraPermissions?: RequiredPermission[] | "yolo"): CommandLine;
7
7
  init(): Promise<boolean>;
8
8
  }
@@ -3,11 +3,8 @@ import { getAgentInstructions } from "./shared-prompt.js";
3
3
  import { SHELL } from "../platform/index.js";
4
4
  export class Cursor {
5
5
  supportsPermissions = false;
6
- getPlanGenerationCommandLine(prompt) {
7
- return {
8
- command: "cursor",
9
- args: ["-p", prompt],
10
- };
6
+ getPromptCommandLine(prompt) {
7
+ return { command: "cursor", args: ["-p", prompt] };
11
8
  }
12
9
  getTaskRunCommandLine(task, followupPrompt, extraPermissions) {
13
10
  const yolo = extraPermissions === "yolo";
@@ -2,7 +2,7 @@ import type { ParsedTask, RequiredPermission } from "../types.js";
2
2
  import type { AgentTool, CommandLine } from "./agent.js";
3
3
  export declare class DeepAgents implements AgentTool {
4
4
  supportsPermissions: boolean;
5
- getPlanGenerationCommandLine(prompt: string): CommandLine;
5
+ getPromptCommandLine(prompt: string): CommandLine;
6
6
  getTaskRunCommandLine(task: ParsedTask, followupPrompt?: string, extraPermissions?: RequiredPermission[] | "yolo"): CommandLine;
7
7
  init(): Promise<boolean>;
8
8
  }
@@ -3,11 +3,8 @@ import { getAgentInstructions } from "./shared-prompt.js";
3
3
  import { SHELL } from "../platform/index.js";
4
4
  export class DeepAgents {
5
5
  supportsPermissions = false;
6
- getPlanGenerationCommandLine(prompt) {
7
- return {
8
- command: "deepagents",
9
- args: ["--non-interactive", prompt],
10
- };
6
+ getPromptCommandLine(prompt) {
7
+ return { command: "deepagents", args: ["--non-interactive", prompt] };
11
8
  }
12
9
  getTaskRunCommandLine(task, followupPrompt, extraPermissions) {
13
10
  const yolo = extraPermissions === "yolo";
@@ -2,7 +2,7 @@ import type { ParsedTask, RequiredPermission } from "../types.js";
2
2
  import type { AgentTool, CommandLine } from "./agent.js";
3
3
  export declare class DroidAgent implements AgentTool {
4
4
  supportsPermissions: boolean;
5
- getPlanGenerationCommandLine(prompt: string): CommandLine;
5
+ getPromptCommandLine(prompt: string): CommandLine;
6
6
  getTaskRunCommandLine(task: ParsedTask, followupPrompt?: string, extraPermissions?: RequiredPermission[] | "yolo"): CommandLine;
7
7
  init(): Promise<boolean>;
8
8
  }
@@ -3,11 +3,8 @@ import { getAgentInstructions } from "./shared-prompt.js";
3
3
  import { SHELL } from "../platform/index.js";
4
4
  export class DroidAgent {
5
5
  supportsPermissions = false;
6
- getPlanGenerationCommandLine(prompt) {
7
- return {
8
- command: "droid",
9
- args: ["exec", prompt],
10
- };
6
+ getPromptCommandLine(prompt) {
7
+ return { command: "droid", args: ["exec", prompt] };
11
8
  }
12
9
  getTaskRunCommandLine(task, followupPrompt, extraPermissions) {
13
10
  const yolo = extraPermissions === "yolo";
@@ -2,7 +2,7 @@ import type { ParsedTask, RequiredPermission } from "../types.js";
2
2
  import type { AgentTool, CommandLine } from "./agent.js";
3
3
  export declare class GeminiAgent implements AgentTool {
4
4
  supportsPermissions: boolean;
5
- getPlanGenerationCommandLine(prompt: string): CommandLine;
5
+ getPromptCommandLine(prompt: string): CommandLine;
6
6
  getTaskRunCommandLine(task: ParsedTask, followupPrompt?: string, extraPermissions?: RequiredPermission[] | "yolo"): CommandLine;
7
7
  init(): Promise<boolean>;
8
8
  }
@@ -3,11 +3,8 @@ import { getAgentInstructions } from "./shared-prompt.js";
3
3
  import { SHELL } from "../platform/index.js";
4
4
  export class GeminiAgent {
5
5
  supportsPermissions = true;
6
- getPlanGenerationCommandLine(prompt) {
7
- return {
8
- command: "gemini",
9
- args: ["--prompt", prompt],
10
- };
6
+ getPromptCommandLine(prompt) {
7
+ return { command: "gemini", args: ["--prompt", prompt] };
11
8
  }
12
9
  getTaskRunCommandLine(task, followupPrompt, extraPermissions) {
13
10
  const yolo = extraPermissions === "yolo";
@@ -2,7 +2,7 @@ import type { ParsedTask, RequiredPermission } from "../types.js";
2
2
  import type { AgentTool, CommandLine } from "./agent.js";
3
3
  export declare class GooseAgent implements AgentTool {
4
4
  supportsPermissions: boolean;
5
- getPlanGenerationCommandLine(prompt: string): CommandLine;
5
+ getPromptCommandLine(prompt: string): CommandLine;
6
6
  getTaskRunCommandLine(task: ParsedTask, followupPrompt?: string, extraPermissions?: RequiredPermission[] | "yolo"): CommandLine;
7
7
  init(): Promise<boolean>;
8
8
  }
@@ -3,11 +3,8 @@ import { getAgentInstructions } from "./shared-prompt.js";
3
3
  import { SHELL } from "../platform/index.js";
4
4
  export class GooseAgent {
5
5
  supportsPermissions = false;
6
- getPlanGenerationCommandLine(prompt) {
7
- return {
8
- command: "goose",
9
- args: ["run", "--text", prompt],
10
- };
6
+ getPromptCommandLine(prompt) {
7
+ return { command: "goose", args: ["run", "--text", prompt] };
11
8
  }
12
9
  getTaskRunCommandLine(task, followupPrompt, extraPermissions) {
13
10
  const yolo = extraPermissions === "yolo";
@@ -2,7 +2,7 @@ import type { ParsedTask, RequiredPermission } from "../types.js";
2
2
  import type { AgentTool, CommandLine } from "./agent.js";
3
3
  export declare class Hermes implements AgentTool {
4
4
  supportsPermissions: boolean;
5
- getPlanGenerationCommandLine(prompt: string): CommandLine;
5
+ getPromptCommandLine(prompt: string): CommandLine;
6
6
  getTaskRunCommandLine(task: ParsedTask, followupPrompt?: string, extraPermissions?: RequiredPermission[] | "yolo"): CommandLine;
7
7
  init(): Promise<boolean>;
8
8
  }
@@ -3,11 +3,8 @@ import { getAgentInstructions } from "./shared-prompt.js";
3
3
  import { SHELL } from "../platform/index.js";
4
4
  export class Hermes {
5
5
  supportsPermissions = false;
6
- getPlanGenerationCommandLine(prompt) {
7
- return {
8
- command: "hermes",
9
- args: ["chat", "-q", prompt],
10
- };
6
+ getPromptCommandLine(prompt) {
7
+ return { command: "hermes", args: ["chat", "-q", prompt] };
11
8
  }
12
9
  getTaskRunCommandLine(task, followupPrompt, extraPermissions) {
13
10
  const yolo = extraPermissions === "yolo";
@@ -2,7 +2,7 @@ import type { ParsedTask, RequiredPermission } from "../types.js";
2
2
  import type { AgentTool, CommandLine } from "./agent.js";
3
3
  export declare class KimiAgent implements AgentTool {
4
4
  supportsPermissions: boolean;
5
- getPlanGenerationCommandLine(prompt: string): CommandLine;
5
+ getPromptCommandLine(prompt: string): CommandLine;
6
6
  getTaskRunCommandLine(task: ParsedTask, followupPrompt?: string, extraPermissions?: RequiredPermission[] | "yolo"): CommandLine;
7
7
  init(): Promise<boolean>;
8
8
  }
@@ -3,11 +3,8 @@ import { getAgentInstructions } from "./shared-prompt.js";
3
3
  import { SHELL } from "../platform/index.js";
4
4
  export class KimiAgent {
5
5
  supportsPermissions = false;
6
- getPlanGenerationCommandLine(prompt) {
7
- return {
8
- command: "kimi",
9
- args: ["-p", prompt],
10
- };
6
+ getPromptCommandLine(prompt) {
7
+ return { command: "kimi", args: ["-p", prompt] };
11
8
  }
12
9
  getTaskRunCommandLine(task, followupPrompt, extraPermissions) {
13
10
  const yolo = extraPermissions === "yolo";
@@ -2,7 +2,7 @@ import type { ParsedTask, RequiredPermission } from "../types.js";
2
2
  import type { AgentTool, CommandLine } from "./agent.js";
3
3
  export declare class Kiro implements AgentTool {
4
4
  supportsPermissions: boolean;
5
- getPlanGenerationCommandLine(prompt: string): CommandLine;
5
+ getPromptCommandLine(prompt: string): CommandLine;
6
6
  getTaskRunCommandLine(task: ParsedTask, followupPrompt?: string, extraPermissions?: RequiredPermission[] | "yolo"): CommandLine;
7
7
  init(): Promise<boolean>;
8
8
  }
@@ -3,11 +3,8 @@ import { getAgentInstructions } from "./shared-prompt.js";
3
3
  import { SHELL } from "../platform/index.js";
4
4
  export class Kiro {
5
5
  supportsPermissions = false;
6
- getPlanGenerationCommandLine(prompt) {
7
- return {
8
- command: "kiro-cli",
9
- args: ["--no-interactive", prompt],
10
- };
6
+ getPromptCommandLine(prompt) {
7
+ return { command: "kiro-cli", args: ["--no-interactive", prompt] };
11
8
  }
12
9
  getTaskRunCommandLine(task, followupPrompt, extraPermissions) {
13
10
  const yolo = extraPermissions === "yolo";
@@ -2,7 +2,7 @@ import type { ParsedTask, RequiredPermission } from "../types.js";
2
2
  import type { AgentTool, CommandLine } from "./agent.js";
3
3
  export declare class OpenClawAgent implements AgentTool {
4
4
  supportsPermissions: boolean;
5
- getPlanGenerationCommandLine(prompt: string): CommandLine;
5
+ getPromptCommandLine(prompt: string): CommandLine;
6
6
  getTaskRunCommandLine(task: ParsedTask, followupPrompt?: string, extraPermissions?: RequiredPermission[] | "yolo"): CommandLine;
7
7
  init(): Promise<boolean>;
8
8
  }
@@ -2,11 +2,8 @@ import { execSync } from "child_process";
2
2
  import { getAgentInstructions } from "./shared-prompt.js";
3
3
  export class OpenClawAgent {
4
4
  supportsPermissions = false;
5
- getPlanGenerationCommandLine(prompt) {
6
- return {
7
- command: "openclaw",
8
- args: ["agent", "--local", "--agent", "main", "--message", prompt],
9
- };
5
+ getPromptCommandLine(prompt) {
6
+ return { command: "openclaw", args: ["agent", "--local", "--agent", "main", "--message", prompt] };
10
7
  }
11
8
  getTaskRunCommandLine(task, followupPrompt, extraPermissions) {
12
9
  const yolo = extraPermissions === "yolo";
@@ -2,7 +2,7 @@ import type { ParsedTask, RequiredPermission } from "../types.js";
2
2
  import type { AgentTool, CommandLine } from "./agent.js";
3
3
  export declare class OpenCodeAgent implements AgentTool {
4
4
  supportsPermissions: boolean;
5
- getPlanGenerationCommandLine(prompt: string): CommandLine;
5
+ getPromptCommandLine(prompt: string): CommandLine;
6
6
  getTaskRunCommandLine(task: ParsedTask, followupPrompt?: string, extraPermissions?: RequiredPermission[] | "yolo"): CommandLine;
7
7
  init(): Promise<boolean>;
8
8
  }
@@ -3,11 +3,8 @@ import { getAgentInstructions } from "./shared-prompt.js";
3
3
  import { SHELL } from "../platform/index.js";
4
4
  export class OpenCodeAgent {
5
5
  supportsPermissions = false;
6
- getPlanGenerationCommandLine(prompt) {
7
- return {
8
- command: "opencode",
9
- args: ["run", prompt],
10
- };
6
+ getPromptCommandLine(prompt) {
7
+ return { command: "opencode", args: ["run", prompt] };
11
8
  }
12
9
  getTaskRunCommandLine(task, followupPrompt, extraPermissions) {
13
10
  const yolo = extraPermissions === "yolo";
@@ -2,7 +2,7 @@ import type { ParsedTask, RequiredPermission } from "../types.js";
2
2
  import type { AgentTool, CommandLine } from "./agent.js";
3
3
  export declare class Qoder implements AgentTool {
4
4
  supportsPermissions: boolean;
5
- getPlanGenerationCommandLine(prompt: string): CommandLine;
5
+ getPromptCommandLine(prompt: string): CommandLine;
6
6
  getTaskRunCommandLine(task: ParsedTask, followupPrompt?: string, extraPermissions?: RequiredPermission[] | "yolo"): CommandLine;
7
7
  init(): Promise<boolean>;
8
8
  }
@@ -3,11 +3,8 @@ import { getAgentInstructions } from "./shared-prompt.js";
3
3
  import { SHELL } from "../platform/index.js";
4
4
  export class Qoder {
5
5
  supportsPermissions = false;
6
- getPlanGenerationCommandLine(prompt) {
7
- return {
8
- command: "qodercli",
9
- args: ["-p", prompt],
10
- };
6
+ getPromptCommandLine(prompt) {
7
+ return { command: "qodercli", args: ["-p", prompt] };
11
8
  }
12
9
  getTaskRunCommandLine(task, followupPrompt, extraPermissions) {
13
10
  const yolo = extraPermissions === "yolo";
@@ -2,7 +2,7 @@ import type { ParsedTask, RequiredPermission } from "../types.js";
2
2
  import type { AgentTool, CommandLine } from "./agent.js";
3
3
  export declare class QwenAgent implements AgentTool {
4
4
  supportsPermissions: boolean;
5
- getPlanGenerationCommandLine(prompt: string): CommandLine;
5
+ getPromptCommandLine(prompt: string): CommandLine;
6
6
  getTaskRunCommandLine(task: ParsedTask, followupPrompt?: string, extraPermissions?: RequiredPermission[] | "yolo"): CommandLine;
7
7
  init(): Promise<boolean>;
8
8
  }
@@ -3,11 +3,8 @@ import { getAgentInstructions } from "./shared-prompt.js";
3
3
  import { SHELL } from "../platform/index.js";
4
4
  export class QwenAgent {
5
5
  supportsPermissions = false;
6
- getPlanGenerationCommandLine(prompt) {
7
- return {
8
- command: "qwen",
9
- args: ["-p", prompt],
10
- };
6
+ getPromptCommandLine(prompt) {
7
+ return { command: "qwen", args: ["-p", prompt] };
11
8
  }
12
9
  getTaskRunCommandLine(task, followupPrompt, extraPermissions) {
13
10
  const yolo = extraPermissions === "yolo";
@@ -10,7 +10,7 @@ const AGENT_INSTRUCTIONS_TEMPLATE = fs.readFileSync(path.join(__dirname, "agent-
10
10
  */
11
11
  export function getAgentInstructions(task, skipPermissions) {
12
12
  const port = loadConfig().httpPort ?? 9966;
13
- const taskDescription = task.body || task.frontmatter.user_prompt;
13
+ const taskDescription = task.frontmatter.user_prompt;
14
14
  let instructions = AGENT_INSTRUCTIONS_TEMPLATE
15
15
  .replace(/\{\{ENDPOINT_DOCS\}\}/g, generateEndpointDocs(port, task.frontmatter.id))
16
16
  .replace(/\{\{TASK_DESCRIPTION\}\}/g, taskDescription);
@@ -214,7 +214,7 @@ export async function runCommand(taskId) {
214
214
  await appendAndNotify(ctx, {
215
215
  role: "user",
216
216
  time: Date.now(),
217
- content: task.body || task.frontmatter.user_prompt,
217
+ content: task.frontmatter.user_prompt,
218
218
  });
219
219
  const result = await invokeAgentWithRetries(ctx, task);
220
220
  const outcome = resolveOutcome(taskDir, result.outcome);
@@ -294,7 +294,6 @@ async function runCommandTriggeredMode(ctx) {
294
294
  const perLinePrompt = `${ctx.task.frontmatter.user_prompt}\n\nProcess this input:\n${line}`;
295
295
  const perLineTask = {
296
296
  frontmatter: { ...ctx.task.frontmatter, user_prompt: perLinePrompt },
297
- body: "",
298
297
  };
299
298
  const result = await invokeAgentWithRetries(ctx, perLineTask);
300
299
  if (result.outcome === "finished") {
@@ -23,5 +23,5 @@ export declare const agentToolMap: Map<string, ToolDefinition>;
23
23
  /**
24
24
  * Generate the HTTP Endpoints markdown section for agent-instructions.md from the tool registry.
25
25
  */
26
- export declare function generateEndpointDocs(port: number, taskId: string): string;
26
+ export declare function generateEndpointDocs(port: number, taskId: string, tools?: ToolDefinition[]): string;
27
27
  //# sourceMappingURL=mcp-tools.d.ts.map
package/dist/mcp-tools.js CHANGED
@@ -175,13 +175,13 @@ export const agentToolMap = new Map(agentTools.map((t) => [t.name, t]));
175
175
  /**
176
176
  * Generate the HTTP Endpoints markdown section for agent-instructions.md from the tool registry.
177
177
  */
178
- export function generateEndpointDocs(port, taskId) {
178
+ export function generateEndpointDocs(port, taskId, tools = agentTools) {
179
179
  const baseUrl = `http://localhost:${port}`;
180
180
  const lines = [
181
181
  `The following HTTP endpoints are available during task execution. Use curl to call them.`,
182
182
  "",
183
183
  ];
184
- for (const tool of agentTools) {
184
+ for (const tool of tools) {
185
185
  const schema = tool.inputSchema;
186
186
  const props = schema.properties ?? {};
187
187
  const required = new Set(schema.required ?? []);