palmier 0.9.5 → 0.9.7

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 (258) hide show
  1. package/README.md +30 -13
  2. package/dist/agents/agent.d.ts +0 -1
  3. package/dist/agents/agent.js +0 -1
  4. package/dist/agents/aider.d.ts +0 -1
  5. package/dist/agents/aider.js +0 -1
  6. package/dist/agents/claude.d.ts +0 -1
  7. package/dist/agents/claude.js +0 -1
  8. package/dist/agents/cline.d.ts +0 -1
  9. package/dist/agents/cline.js +0 -1
  10. package/dist/agents/codex.d.ts +0 -1
  11. package/dist/agents/codex.js +0 -1
  12. package/dist/agents/copilot.d.ts +0 -1
  13. package/dist/agents/copilot.js +0 -1
  14. package/dist/agents/cursor.d.ts +0 -1
  15. package/dist/agents/cursor.js +0 -1
  16. package/dist/agents/deepagents.d.ts +0 -1
  17. package/dist/agents/deepagents.js +0 -1
  18. package/dist/agents/droid.d.ts +0 -1
  19. package/dist/agents/droid.js +0 -1
  20. package/dist/agents/gemini.d.ts +0 -1
  21. package/dist/agents/gemini.js +0 -1
  22. package/dist/agents/goose.d.ts +0 -1
  23. package/dist/agents/goose.js +0 -1
  24. package/dist/agents/hermes.d.ts +0 -1
  25. package/dist/agents/hermes.js +0 -1
  26. package/dist/agents/kimi.d.ts +0 -1
  27. package/dist/agents/kimi.js +0 -1
  28. package/dist/agents/kiro.d.ts +0 -1
  29. package/dist/agents/kiro.js +0 -1
  30. package/dist/agents/openclaw.d.ts +0 -1
  31. package/dist/agents/openclaw.js +0 -1
  32. package/dist/agents/opencode.d.ts +0 -1
  33. package/dist/agents/opencode.js +0 -1
  34. package/dist/agents/qoder.d.ts +0 -1
  35. package/dist/agents/qoder.js +0 -1
  36. package/dist/agents/qwen.d.ts +0 -1
  37. package/dist/agents/qwen.js +0 -1
  38. package/dist/agents/shared-prompt.d.ts +0 -1
  39. package/dist/agents/shared-prompt.js +0 -1
  40. package/dist/client-store.d.ts +0 -1
  41. package/dist/client-store.js +0 -1
  42. package/dist/commands/clients.d.ts +0 -1
  43. package/dist/commands/clients.js +0 -1
  44. package/dist/commands/info.d.ts +0 -1
  45. package/dist/commands/info.js +0 -1
  46. package/dist/commands/init.d.ts +0 -1
  47. package/dist/commands/init.js +3 -4
  48. package/dist/commands/pair.d.ts +0 -1
  49. package/dist/commands/pair.js +0 -1
  50. package/dist/commands/restart.d.ts +0 -1
  51. package/dist/commands/restart.js +0 -1
  52. package/dist/commands/run.d.ts +0 -1
  53. package/dist/commands/run.js +0 -1
  54. package/dist/commands/serve.d.ts +0 -1
  55. package/dist/commands/serve.js +0 -1
  56. package/dist/commands/uninstall.d.ts +0 -1
  57. package/dist/commands/uninstall.js +0 -1
  58. package/dist/config.d.ts +0 -1
  59. package/dist/config.js +0 -1
  60. package/dist/event-queues.d.ts +0 -1
  61. package/dist/event-queues.js +0 -1
  62. package/dist/events.d.ts +0 -1
  63. package/dist/events.js +0 -1
  64. package/dist/index.d.ts +0 -1
  65. package/dist/index.js +0 -1
  66. package/dist/linked-device.d.ts +0 -1
  67. package/dist/linked-device.js +0 -1
  68. package/dist/mcp-handler.d.ts +0 -1
  69. package/dist/mcp-handler.js +0 -1
  70. package/dist/mcp-tools.d.ts +0 -1
  71. package/dist/mcp-tools.js +0 -1
  72. package/dist/nats-client.d.ts +0 -1
  73. package/dist/nats-client.js +0 -1
  74. package/dist/network.d.ts +0 -1
  75. package/dist/network.js +0 -1
  76. package/dist/notification-store.d.ts +0 -1
  77. package/dist/notification-store.js +0 -1
  78. package/dist/pending-requests.d.ts +0 -1
  79. package/dist/pending-requests.js +0 -1
  80. package/dist/platform/index.d.ts +0 -1
  81. package/dist/platform/index.js +0 -1
  82. package/dist/platform/linux.d.ts +0 -1
  83. package/dist/platform/linux.js +0 -1
  84. package/dist/platform/macos.d.ts +0 -1
  85. package/dist/platform/macos.js +0 -1
  86. package/dist/platform/platform.d.ts +0 -1
  87. package/dist/platform/platform.js +0 -1
  88. package/dist/platform/windows.d.ts +0 -1
  89. package/dist/platform/windows.js +0 -1
  90. package/dist/pwa/apple-touch-icon.png +0 -0
  91. package/dist/pwa/assets/index-D1bIhEbd.css +1 -0
  92. package/dist/pwa/assets/{index-Cvffaohh.js → index-DWvRAUiy.js} +31 -31
  93. package/dist/pwa/assets/{web-qdLcAD7T.js → web-C4iZbqTC.js} +1 -1
  94. package/dist/pwa/assets/{web-ChtbM4nv.js → web-CBFqJGX6.js} +1 -1
  95. package/dist/pwa/assets/{web-hExASsqW.js → web-DL4uXOpS.js} +1 -1
  96. package/dist/pwa/favicon.ico +0 -0
  97. package/dist/pwa/index.html +3 -3
  98. package/dist/pwa/manifest.webmanifest +1 -1
  99. package/dist/pwa/pwa-192x192.png +0 -0
  100. package/dist/pwa/pwa-512x512.png +0 -0
  101. package/dist/pwa/service-worker.js +1 -1
  102. package/dist/rpc-handler.d.ts +0 -1
  103. package/dist/rpc-handler.js +3 -10
  104. package/dist/sms-store.d.ts +0 -1
  105. package/dist/sms-store.js +0 -1
  106. package/dist/spawn-command.d.ts +0 -1
  107. package/dist/spawn-command.js +0 -1
  108. package/dist/task.d.ts +1 -1
  109. package/dist/task.js +14 -1
  110. package/dist/transports/http-transport.d.ts +0 -1
  111. package/dist/transports/http-transport.js +0 -1
  112. package/dist/transports/nats-transport.d.ts +0 -1
  113. package/dist/transports/nats-transport.js +0 -1
  114. package/dist/types.d.ts +0 -1
  115. package/dist/types.js +0 -1
  116. package/dist/update-checker.d.ts +0 -1
  117. package/dist/update-checker.js +0 -1
  118. package/package.json +5 -1
  119. package/.github/workflows/ci.yml +0 -16
  120. package/.github/workflows/publish.yml +0 -37
  121. package/CLAUDE.md +0 -22
  122. package/dist/pwa/assets/index-DBgOYBrB.css +0 -1
  123. package/palmier-server/.github/workflows/ci.yml +0 -21
  124. package/palmier-server/.github/workflows/deploy.yml +0 -38
  125. package/palmier-server/CLAUDE.md +0 -17
  126. package/palmier-server/PRODUCTION.md +0 -358
  127. package/palmier-server/README.md +0 -231
  128. package/palmier-server/nats.conf +0 -19
  129. package/palmier-server/package.json +0 -15
  130. package/palmier-server/pnpm-lock.yaml +0 -7639
  131. package/palmier-server/pnpm-workspace.yaml +0 -3
  132. package/palmier-server/pwa/index.html +0 -16
  133. package/palmier-server/pwa/logo/logo-prompt.md +0 -28
  134. package/palmier-server/pwa/logo/logo_20260330.png +0 -0
  135. package/palmier-server/pwa/package.json +0 -34
  136. package/palmier-server/pwa/public/apple-touch-icon.png +0 -0
  137. package/palmier-server/pwa/public/favicon.ico +0 -0
  138. package/palmier-server/pwa/public/pwa-192x192.png +0 -0
  139. package/palmier-server/pwa/public/pwa-512x512.png +0 -0
  140. package/palmier-server/pwa/src/App.css +0 -3004
  141. package/palmier-server/pwa/src/App.tsx +0 -59
  142. package/palmier-server/pwa/src/agentLabels.ts +0 -11
  143. package/palmier-server/pwa/src/api.ts +0 -67
  144. package/palmier-server/pwa/src/components/CapabilityToggles.tsx +0 -170
  145. package/palmier-server/pwa/src/components/ConnectionStatusIcon.tsx +0 -114
  146. package/palmier-server/pwa/src/components/HostMenu.tsx +0 -429
  147. package/palmier-server/pwa/src/components/PermissionsDialog.tsx +0 -34
  148. package/palmier-server/pwa/src/components/PullToRefreshIndicator.tsx +0 -46
  149. package/palmier-server/pwa/src/components/RunDetailView.tsx +0 -343
  150. package/palmier-server/pwa/src/components/SessionComposer.tsx +0 -157
  151. package/palmier-server/pwa/src/components/SessionsView.tsx +0 -326
  152. package/palmier-server/pwa/src/components/SwipeToDeleteRow.tsx +0 -170
  153. package/palmier-server/pwa/src/components/TabBar.tsx +0 -40
  154. package/palmier-server/pwa/src/components/TaskCard.tsx +0 -255
  155. package/palmier-server/pwa/src/components/TaskForm.tsx +0 -764
  156. package/palmier-server/pwa/src/components/TasksView.tsx +0 -179
  157. package/palmier-server/pwa/src/constants.ts +0 -2
  158. package/palmier-server/pwa/src/contexts/HostConnectionContext.tsx +0 -432
  159. package/palmier-server/pwa/src/contexts/HostStoreContext.tsx +0 -124
  160. package/palmier-server/pwa/src/draftGuard.ts +0 -24
  161. package/palmier-server/pwa/src/formatTime.ts +0 -44
  162. package/palmier-server/pwa/src/hooks/useBackClose.ts +0 -75
  163. package/palmier-server/pwa/src/hooks/useMediaQuery.ts +0 -17
  164. package/palmier-server/pwa/src/hooks/usePullToRefresh.ts +0 -102
  165. package/palmier-server/pwa/src/hooks/usePushSubscription.ts +0 -77
  166. package/palmier-server/pwa/src/main.tsx +0 -14
  167. package/palmier-server/pwa/src/native/Device.ts +0 -49
  168. package/palmier-server/pwa/src/pages/Dashboard.tsx +0 -542
  169. package/palmier-server/pwa/src/pages/PairHost.tsx +0 -232
  170. package/palmier-server/pwa/src/pages/PairSetup.tsx +0 -134
  171. package/palmier-server/pwa/src/service-worker.ts +0 -142
  172. package/palmier-server/pwa/src/types.ts +0 -75
  173. package/palmier-server/pwa/src/vite-env.d.ts +0 -11
  174. package/palmier-server/pwa/tsconfig.json +0 -21
  175. package/palmier-server/pwa/tsconfig.node.json +0 -19
  176. package/palmier-server/pwa/vite.config.ts +0 -47
  177. package/palmier-server/server/.env.example +0 -20
  178. package/palmier-server/server/package.json +0 -36
  179. package/palmier-server/server/src/db.ts +0 -44
  180. package/palmier-server/server/src/fcm.ts +0 -74
  181. package/palmier-server/server/src/index.ts +0 -688
  182. package/palmier-server/server/src/nats-jwt.ts +0 -299
  183. package/palmier-server/server/src/nats-setup.ts +0 -48
  184. package/palmier-server/server/src/nats.ts +0 -33
  185. package/palmier-server/server/src/notify.ts +0 -34
  186. package/palmier-server/server/src/push.ts +0 -68
  187. package/palmier-server/server/src/routes/device.ts +0 -224
  188. package/palmier-server/server/src/routes/fcm.ts +0 -64
  189. package/palmier-server/server/src/routes/hosts.ts +0 -56
  190. package/palmier-server/server/src/routes/push.ts +0 -101
  191. package/palmier-server/server/tsconfig.json +0 -20
  192. package/palmier-server/spec.md +0 -533
  193. package/src/agents/agent-instructions.md +0 -28
  194. package/src/agents/agent.ts +0 -114
  195. package/src/agents/aider.ts +0 -35
  196. package/src/agents/claude.ts +0 -39
  197. package/src/agents/cline.ts +0 -35
  198. package/src/agents/codex.ts +0 -40
  199. package/src/agents/copilot.ts +0 -37
  200. package/src/agents/cursor.ts +0 -36
  201. package/src/agents/deepagents.ts +0 -36
  202. package/src/agents/droid.ts +0 -35
  203. package/src/agents/gemini.ts +0 -43
  204. package/src/agents/goose.ts +0 -33
  205. package/src/agents/hermes.ts +0 -36
  206. package/src/agents/kimi.ts +0 -35
  207. package/src/agents/kiro.ts +0 -36
  208. package/src/agents/openclaw.ts +0 -29
  209. package/src/agents/opencode.ts +0 -36
  210. package/src/agents/qoder.ts +0 -36
  211. package/src/agents/qwen.ts +0 -32
  212. package/src/agents/shared-prompt.ts +0 -30
  213. package/src/client-store.ts +0 -68
  214. package/src/commands/clients.ts +0 -29
  215. package/src/commands/info.ts +0 -29
  216. package/src/commands/init.ts +0 -165
  217. package/src/commands/pair.ts +0 -137
  218. package/src/commands/restart.ts +0 -6
  219. package/src/commands/run.ts +0 -608
  220. package/src/commands/serve.ts +0 -211
  221. package/src/commands/uninstall.ts +0 -9
  222. package/src/config.ts +0 -36
  223. package/src/cross-spawn.d.ts +0 -5
  224. package/src/event-queues.ts +0 -41
  225. package/src/events.ts +0 -29
  226. package/src/index.ts +0 -111
  227. package/src/linked-device.ts +0 -52
  228. package/src/mcp-handler.ts +0 -200
  229. package/src/mcp-tools.ts +0 -839
  230. package/src/nats-client.ts +0 -19
  231. package/src/network.ts +0 -96
  232. package/src/notification-store.ts +0 -30
  233. package/src/pending-requests.ts +0 -73
  234. package/src/platform/index.ts +0 -20
  235. package/src/platform/linux.ts +0 -296
  236. package/src/platform/macos.ts +0 -329
  237. package/src/platform/platform.ts +0 -31
  238. package/src/platform/windows.ts +0 -299
  239. package/src/rpc-handler.ts +0 -694
  240. package/src/sms-store.ts +0 -28
  241. package/src/spawn-command.ts +0 -123
  242. package/src/task.ts +0 -330
  243. package/src/transports/http-transport.ts +0 -478
  244. package/src/transports/nats-transport.ts +0 -76
  245. package/src/types.ts +0 -89
  246. package/src/update-checker.ts +0 -40
  247. package/test/agent-instructions.test.ts +0 -209
  248. package/test/agent-output-parsing.test.ts +0 -74
  249. package/test/linux-cron.test.ts +0 -41
  250. package/test/macos-plist.test.ts +0 -112
  251. package/test/notification-store.test.ts +0 -57
  252. package/test/pairing.test.ts +0 -35
  253. package/test/result-state.test.ts +0 -110
  254. package/test/task-parsing.test.ts +0 -82
  255. package/test/taskrun-messages.test.ts +0 -224
  256. package/test/tsconfig.json +0 -9
  257. package/test/windows-xml.test.ts +0 -89
  258. package/tsconfig.json +0 -19
@@ -1,114 +0,0 @@
1
- import type { ParsedTask, RequiredPermission } from "../types.js";
2
- import { ClaudeAgent } from "./claude.js";
3
- import { GeminiAgent } from "./gemini.js";
4
- import { CodexAgent } from "./codex.js";
5
- import { DroidAgent } from "./droid.js";
6
- import { OpenClawAgent } from "./openclaw.js";
7
- import { CopilotAgent } from "./copilot.js";
8
- import { QwenAgent } from "./qwen.js";
9
- import { KimiAgent } from "./kimi.js";
10
- import { GooseAgent } from "./goose.js";
11
- import { OpenCodeAgent } from "./opencode.js";
12
- import { DeepAgents } from "./deepagents.js";
13
- import { Aider } from "./aider.js";
14
- import { Cursor } from "./cursor.js";
15
- import { Kiro } from "./kiro.js";
16
- import { Cline } from "./cline.js";
17
- import { Qoder } from "./qoder.js";
18
- import { Hermes } from "./hermes.js";
19
-
20
- export interface CommandLine {
21
- command: string;
22
- args: string[];
23
- /** If provided, the string is written to the process's stdin and then the pipe is closed. */
24
- stdin?: string;
25
- /** Additional environment variables to set for the spawned process. */
26
- env?: Record<string, string>;
27
- }
28
-
29
- export interface AgentTool {
30
- /** Return the command and args for a short, non-interactive prompt (e.g. generating a task name). */
31
- getPromptCommandLine(prompt: string): CommandLine;
32
-
33
- /** Return the command and args used to run a task. If followupPrompt is provided, use it instead of the task's prompt,
34
- * and treat it as a continuation of the original run (reuse the same session, etc).
35
- * extraPermissions: pass an array of RequiredPermission for transient permissions granted for this run only,
36
- * or pass `"yolo"` to enable yolo mode (auto-approve all tools, skip permission instructions). */
37
- getTaskRunCommandLine(task: ParsedTask, followupPrompt?: string, extraPermissions?: RequiredPermission[] | "yolo"): CommandLine;
38
-
39
- /** Whether this agent supports permission overrides (e.g. --allowedTools).
40
- * If false, the permissions section is omitted from agent instructions. */
41
- supportsPermissions: boolean;
42
-
43
- /** Whether this agent supports yolo mode (auto-approve all tools). */
44
- supportsYolo: boolean;
45
-
46
- /** Detect whether the agent CLI is available and perform any agent-specific
47
- * initialization. Returns true if the agent was detected and initialized successfully. */
48
- init(): Promise<boolean>;
49
- }
50
-
51
- const agentRegistry: Record<string, AgentTool> = {
52
- claude: new ClaudeAgent(),
53
- gemini: new GeminiAgent(),
54
- codex: new CodexAgent(),
55
- openclaw: new OpenClawAgent(),
56
- copilot: new CopilotAgent(),
57
- qwen: new QwenAgent(),
58
- kimi: new KimiAgent(),
59
- droid: new DroidAgent(),
60
- goose: new GooseAgent(),
61
- opencode: new OpenCodeAgent(),
62
- deepagents: new DeepAgents(),
63
- aider: new Aider(),
64
- cursor: new Cursor(),
65
- kiro: new Kiro(),
66
- cline: new Cline(),
67
- qoder: new Qoder(),
68
- hermes: new Hermes(),
69
- };
70
-
71
- const agentLabels: Record<string, string> = {
72
- claude: "Claude Code",
73
- gemini: "Gemini CLI",
74
- codex: "Codex CLI",
75
- droid: "Droid CLI",
76
- openclaw: "OpenClaw",
77
- copilot: "Copilot CLI",
78
- qwen: "Qwen Code",
79
- kimi: "Kimi Code",
80
- goose: "Goose CLI",
81
- opencode: "OpenCode",
82
- deepagents: "Deep Agents CLI",
83
- aider: "Aider",
84
- cursor: "Cursor CLI",
85
- kiro: "Kiro CLI",
86
- cline: "Cline CLI",
87
- qoder: "Qoder CLI",
88
- hermes: "Hermes Agent",
89
- };
90
-
91
- export interface DetectedAgent {
92
- key: string;
93
- label: string;
94
- supportsPermissions: boolean;
95
- supportsYolo: boolean;
96
- }
97
-
98
- export async function detectAgents(): Promise<DetectedAgent[]> {
99
- const detected: DetectedAgent[] = [];
100
- for (const [key, agent] of Object.entries(agentRegistry)) {
101
- const label = agentLabels[key] ?? key;
102
- const ok = await agent.init();
103
- if (ok) detected.push({ key, label, supportsPermissions: agent.supportsPermissions, supportsYolo: agent.supportsYolo });
104
- }
105
- return detected;
106
- }
107
-
108
- export function getAgent(name: string): AgentTool {
109
- const agent = agentRegistry[name];
110
- if (!agent) {
111
- throw new Error(`Unknown agent: "${name}". Available agents: ${Object.keys(agentRegistry).join(", ")}`);
112
- }
113
- return agent;
114
- }
@@ -1,35 +0,0 @@
1
- import type { ParsedTask, RequiredPermission } from "../types.js";
2
- import { execSync } from "child_process";
3
- import type { AgentTool, CommandLine } from "./agent.js";
4
- import { getAgentInstructions } from "./shared-prompt.js";
5
- import { SHELL } from "../platform/index.js";
6
-
7
- export class Aider implements AgentTool {
8
- supportsPermissions = false;
9
- supportsYolo = true;
10
- getPromptCommandLine(prompt: string): CommandLine {
11
- return { command: "aider", args: ["--message", prompt] };
12
- }
13
-
14
- getTaskRunCommandLine(task: ParsedTask, followupPrompt?: string, extraPermissions?: RequiredPermission[] | "yolo"): CommandLine {
15
- const yolo = extraPermissions === "yolo";
16
- const prompt = followupPrompt ?? getAgentInstructions(task, yolo || !this.supportsPermissions);
17
- const args = [];
18
-
19
- if (yolo) {
20
- args.push("--yes-always");
21
- }
22
- args.push("--message", prompt);
23
-
24
- return { command: "aider", args};
25
- }
26
-
27
- async init(): Promise<boolean> {
28
- try {
29
- execSync("aider --version", { stdio: "ignore", shell: SHELL });
30
- } catch {
31
- return false;
32
- }
33
- return true;
34
- }
35
- }
@@ -1,39 +0,0 @@
1
- import type { ParsedTask, RequiredPermission } from "../types.js";
2
- import { execSync } from "child_process";
3
- import type { AgentTool, CommandLine } from "./agent.js";
4
- import { getAgentInstructions } from "./shared-prompt.js";
5
- import { SHELL } from "../platform/index.js";
6
-
7
- export class ClaudeAgent implements AgentTool {
8
- supportsPermissions = true;
9
- supportsYolo = true;
10
- getPromptCommandLine(prompt: string): CommandLine {
11
- return { command: "claude", args: ["-p", prompt] };
12
- }
13
-
14
- getTaskRunCommandLine(task: ParsedTask, followupPrompt?: string, extraPermissions?: RequiredPermission[] | "yolo"): CommandLine {
15
- const yolo = extraPermissions === "yolo";
16
- const prompt = followupPrompt ?? getAgentInstructions(task, yolo || !this.supportsPermissions);
17
- const args = ["--permission-mode", yolo ? "bypassPermissions" : "acceptEdits", "-p"];
18
-
19
- if (!yolo) {
20
- args.push("--allowedTools", "WebFetch");
21
- const allPerms = [...(task.frontmatter.permissions ?? []), ...(extraPermissions ?? [])];
22
- for (const p of allPerms) {
23
- args.push("--allowedTools", p.name);
24
- }
25
- }
26
-
27
- if (followupPrompt) {args.push("-c");}
28
- return { command: "claude", args, stdin: prompt };
29
- }
30
-
31
- async init(): Promise<boolean> {
32
- try {
33
- execSync("claude --version", { stdio: "ignore", shell: SHELL });
34
- } catch {
35
- return false;
36
- }
37
- return true;
38
- }
39
- }
@@ -1,35 +0,0 @@
1
- import type { ParsedTask, RequiredPermission } from "../types.js";
2
- import { execSync } from "child_process";
3
- import type { AgentTool, CommandLine } from "./agent.js";
4
- import { getAgentInstructions } from "./shared-prompt.js";
5
- import { SHELL } from "../platform/index.js";
6
-
7
- export class Cline implements AgentTool {
8
- supportsPermissions = false;
9
- supportsYolo = true;
10
- getPromptCommandLine(prompt: string): CommandLine {
11
- return { command: "cline ", args: ["--yolo", "-p", prompt] };
12
- }
13
-
14
- getTaskRunCommandLine(task: ParsedTask, followupPrompt?: string, extraPermissions?: RequiredPermission[] | "yolo"): CommandLine {
15
- const yolo = extraPermissions === "yolo";
16
- const prompt = followupPrompt ?? getAgentInstructions(task, yolo || !this.supportsPermissions);
17
- const args = [];
18
-
19
- if (yolo) {
20
- args.push("--yolo");
21
- }
22
- args.push(prompt);
23
-
24
- return { command: "cline ", args};
25
- }
26
-
27
- async init(): Promise<boolean> {
28
- try {
29
- execSync("cline --version", { stdio: "ignore", shell: SHELL });
30
- } catch {
31
- return false;
32
- }
33
- return true;
34
- }
35
- }
@@ -1,40 +0,0 @@
1
- import type { ParsedTask, RequiredPermission } from "../types.js";
2
- import { execSync } from "child_process";
3
- import type { AgentTool, CommandLine } from "./agent.js";
4
- import { getAgentInstructions } from "./shared-prompt.js";
5
- import { SHELL } from "../platform/index.js";
6
-
7
- export class CodexAgent implements AgentTool {
8
- supportsPermissions = true;
9
- supportsYolo = true;
10
- getPromptCommandLine(prompt: string): CommandLine {
11
- return { command: "codex", args: ["exec", "--skip-git-repo-check", prompt] };
12
- }
13
-
14
- getTaskRunCommandLine(task: ParsedTask, followupPrompt?: string, extraPermissions?: RequiredPermission[] | "yolo"): CommandLine {
15
- const yolo = extraPermissions === "yolo";
16
- const prompt = followupPrompt ?? getAgentInstructions(task, yolo || !this.supportsPermissions);
17
- const args = ["exec", "--skip-git-repo-check", "--sandbox", yolo ? "danger-full-access" : "workspace-write"];
18
-
19
- if (!yolo) {
20
- const allPerms = [...(task.frontmatter.permissions ?? []), ...(extraPermissions ?? [])];
21
- for (const p of allPerms) {
22
- args.push("--config");
23
- args.push(`apps.${p.name}.default_tools_approval_mode="approve"`);
24
- }
25
- }
26
- if (followupPrompt) {args.push("resume", "--last");}
27
- args.push("-");
28
-
29
- return { command: "codex", args, stdin: prompt };
30
- }
31
-
32
- async init(): Promise<boolean> {
33
- try {
34
- execSync("codex --version", { stdio: "ignore", shell: SHELL });
35
- } catch {
36
- return false;
37
- }
38
- return true;
39
- }
40
- }
@@ -1,37 +0,0 @@
1
- import type { ParsedTask, RequiredPermission } from "../types.js";
2
- import { execSync } from "child_process";
3
- import type { AgentTool, CommandLine } from "./agent.js";
4
- import { getAgentInstructions } from "./shared-prompt.js";
5
- import { SHELL } from "../platform/index.js";
6
-
7
- export class CopilotAgent implements AgentTool {
8
- supportsPermissions = false;
9
- supportsYolo = true;
10
- getPromptCommandLine(prompt: string): CommandLine {
11
- return { command: "copilot", args: ["-p", prompt] };
12
- }
13
-
14
- getTaskRunCommandLine(task: ParsedTask, followupPrompt?: string, extraPermissions?: RequiredPermission[] | "yolo"): CommandLine {
15
- const yolo = extraPermissions === "yolo";
16
- const prompt = followupPrompt ?? getAgentInstructions(task, yolo || !this.supportsPermissions);
17
- const args = ["-p", prompt];
18
-
19
- if (yolo) {
20
- args.push("--yolo");
21
- } else {
22
- const allPerms = [...(task.frontmatter.permissions ?? []), ...(extraPermissions ?? [])];
23
- args.push(`--allow-tool=${["web_fetch", ...allPerms.map((p) => p.name)].join(",")}`);
24
- }
25
- if (followupPrompt) { args.push("--continue"); }
26
- return { command: "copilot", args};
27
- }
28
-
29
- async init(): Promise<boolean> {
30
- try {
31
- execSync("copilot -v", { stdio: "ignore", shell: SHELL });
32
- } catch {
33
- return false;
34
- }
35
- return true;
36
- }
37
- }
@@ -1,36 +0,0 @@
1
- import type { ParsedTask, RequiredPermission } from "../types.js";
2
- import { execSync } from "child_process";
3
- import type { AgentTool, CommandLine } from "./agent.js";
4
- import { getAgentInstructions } from "./shared-prompt.js";
5
- import { SHELL } from "../platform/index.js";
6
-
7
- export class Cursor implements AgentTool {
8
- supportsPermissions = false;
9
- supportsYolo = true;
10
- getPromptCommandLine(prompt: string): CommandLine {
11
- return { command: "cursor", args: ["-p", prompt] };
12
- }
13
-
14
- getTaskRunCommandLine(task: ParsedTask, followupPrompt?: string, extraPermissions?: RequiredPermission[] | "yolo"): CommandLine {
15
- const yolo = extraPermissions === "yolo";
16
- const prompt = followupPrompt ?? getAgentInstructions(task, yolo || !this.supportsPermissions);
17
- const args = [];
18
-
19
- if (yolo) {
20
- args.push("--force");
21
- }
22
- if (followupPrompt) {args.push("--continue");}
23
- args.push("-p", prompt);
24
-
25
- return { command: "cursor", args};
26
- }
27
-
28
- async init(): Promise<boolean> {
29
- try {
30
- execSync("cursor --version", { stdio: "ignore", shell: SHELL });
31
- } catch {
32
- return false;
33
- }
34
- return true;
35
- }
36
- }
@@ -1,36 +0,0 @@
1
- import type { ParsedTask, RequiredPermission } from "../types.js";
2
- import { execSync } from "child_process";
3
- import type { AgentTool, CommandLine } from "./agent.js";
4
- import { getAgentInstructions } from "./shared-prompt.js";
5
- import { SHELL } from "../platform/index.js";
6
-
7
- export class DeepAgents implements AgentTool {
8
- supportsPermissions = false;
9
- supportsYolo = true;
10
- getPromptCommandLine(prompt: string): CommandLine {
11
- return { command: "deepagents", args: ["--non-interactive", prompt] };
12
- }
13
-
14
- getTaskRunCommandLine(task: ParsedTask, followupPrompt?: string, extraPermissions?: RequiredPermission[] | "yolo"): CommandLine {
15
- const yolo = extraPermissions === "yolo";
16
- const prompt = followupPrompt ?? getAgentInstructions(task, yolo || !this.supportsPermissions);
17
- const args = [];
18
-
19
- if (yolo) {
20
- args.push("--auto-approve");
21
- }
22
- if (followupPrompt) {args.push("--resume");}
23
- args.push("--non-interactive", prompt);
24
-
25
- return { command: "deepagents", args};
26
- }
27
-
28
- async init(): Promise<boolean> {
29
- try {
30
- execSync("deepagents --version", { stdio: "ignore", shell: SHELL });
31
- } catch {
32
- return false;
33
- }
34
- return true;
35
- }
36
- }
@@ -1,35 +0,0 @@
1
- import type { ParsedTask, RequiredPermission } from "../types.js";
2
- import { execSync } from "child_process";
3
- import type { AgentTool, CommandLine } from "./agent.js";
4
- import { getAgentInstructions } from "./shared-prompt.js";
5
- import { SHELL } from "../platform/index.js";
6
-
7
- export class DroidAgent implements AgentTool {
8
- supportsPermissions = false;
9
- supportsYolo = true;
10
- getPromptCommandLine(prompt: string): CommandLine {
11
- return { command: "droid", args: ["exec", prompt] };
12
- }
13
-
14
- getTaskRunCommandLine(task: ParsedTask, followupPrompt?: string, extraPermissions?: RequiredPermission[] | "yolo"): CommandLine {
15
- const yolo = extraPermissions === "yolo";
16
- const prompt = followupPrompt ?? getAgentInstructions(task, yolo || !this.supportsPermissions);
17
- const args = ["exec", "--session-id", task.frontmatter.id];
18
-
19
- if (yolo) {
20
- args.push("--skip-permissions-unsafe");
21
- }
22
- args.push(prompt);
23
-
24
- return { command: "droid", args};
25
- }
26
-
27
- async init(): Promise<boolean> {
28
- try {
29
- execSync("droid --version", { stdio: "ignore", shell: SHELL });
30
- } catch {
31
- return false;
32
- }
33
- return true;
34
- }
35
- }
@@ -1,43 +0,0 @@
1
- import type { ParsedTask, RequiredPermission } from "../types.js";
2
- import { execSync } from "child_process";
3
- import type { AgentTool, CommandLine } from "./agent.js";
4
- import { getAgentInstructions } from "./shared-prompt.js";
5
- import { SHELL } from "../platform/index.js";
6
-
7
- export class GeminiAgent implements AgentTool {
8
- supportsPermissions = true;
9
- supportsYolo = true;
10
- getPromptCommandLine(prompt: string): CommandLine {
11
- return { command: "gemini", args: ["--prompt", prompt] };
12
- }
13
-
14
- getTaskRunCommandLine(task: ParsedTask, followupPrompt?: string, extraPermissions?: RequiredPermission[] | "yolo"): CommandLine {
15
- const yolo = extraPermissions === "yolo";
16
- const prompt = followupPrompt ?? getAgentInstructions(task, yolo || !this.supportsPermissions);
17
- const args = ["--approval-mode", yolo ? "yolo" : "auto_edit"];
18
-
19
- if (!yolo) {
20
- const tools = ["run_shell_command", "web_fetch"];
21
- const allPerms = [...(task.frontmatter.permissions ?? []), ...(extraPermissions ?? [])];
22
- for (const p of allPerms) {
23
- tools.push(p.name);
24
- }
25
- args.push("--allowed-tools", tools.join(","));
26
- }
27
-
28
- if (followupPrompt) {args.push("--resume");}
29
- // Read prompt from stdin to avoid command-line length limits.
30
- args.push("--prompt", "-");
31
-
32
- return { command: "gemini", args, stdin: prompt };
33
- }
34
-
35
- async init(): Promise<boolean> {
36
- try {
37
- execSync("gemini --version", { stdio: "ignore", shell: SHELL });
38
- } catch {
39
- return false;
40
- }
41
- return true;
42
- }
43
- }
@@ -1,33 +0,0 @@
1
- import type { ParsedTask, RequiredPermission } from "../types.js";
2
- import { execSync } from "child_process";
3
- import type { AgentTool, CommandLine } from "./agent.js";
4
- import { getAgentInstructions } from "./shared-prompt.js";
5
- import { SHELL } from "../platform/index.js";
6
-
7
- export class GooseAgent implements AgentTool {
8
- supportsPermissions = false;
9
- supportsYolo = true;
10
- getPromptCommandLine(prompt: string): CommandLine {
11
- return { command: "goose", args: ["run", "--text", prompt] };
12
- }
13
-
14
- getTaskRunCommandLine(task: ParsedTask, followupPrompt?: string, extraPermissions?: RequiredPermission[] | "yolo"): CommandLine {
15
- const yolo = extraPermissions === "yolo";
16
- const prompt = followupPrompt ?? getAgentInstructions(task, yolo || !this.supportsPermissions);
17
- const args = ["run"];
18
-
19
- if (followupPrompt) {args.push("--resume");}
20
- args.push("--text", prompt);
21
-
22
- return { command: "goose", args, ...(yolo ? { env: { GOOSE_MODE: "auto" } } : {}) };
23
- }
24
-
25
- async init(): Promise<boolean> {
26
- try {
27
- execSync("goose --version", { stdio: "ignore", shell: SHELL });
28
- } catch {
29
- return false;
30
- }
31
- return true;
32
- }
33
- }
@@ -1,36 +0,0 @@
1
- import type { ParsedTask, RequiredPermission } from "../types.js";
2
- import { execSync } from "child_process";
3
- import type { AgentTool, CommandLine } from "./agent.js";
4
- import { getAgentInstructions } from "./shared-prompt.js";
5
- import { SHELL } from "../platform/index.js";
6
-
7
- export class Hermes implements AgentTool {
8
- supportsPermissions = false;
9
- supportsYolo = true;
10
- getPromptCommandLine(prompt: string): CommandLine {
11
- return { command: "hermes", args: ["chat", "-q", prompt] };
12
- }
13
-
14
- getTaskRunCommandLine(task: ParsedTask, followupPrompt?: string, extraPermissions?: RequiredPermission[] | "yolo"): CommandLine {
15
- const yolo = extraPermissions === "yolo";
16
- const prompt = followupPrompt ?? getAgentInstructions(task, yolo || !this.supportsPermissions);
17
- const args = ["chat"];
18
-
19
- if (yolo) {
20
- args.push("--trust-all-tools");
21
- }
22
- if (followupPrompt) {args.push("--continue");}
23
- args.push("-q", prompt);
24
-
25
- return { command: "hermes", args};
26
- }
27
-
28
- async init(): Promise<boolean> {
29
- try {
30
- execSync("hermes --version", { stdio: "ignore", shell: SHELL });
31
- } catch {
32
- return false;
33
- }
34
- return true;
35
- }
36
- }
@@ -1,35 +0,0 @@
1
- import type { ParsedTask, RequiredPermission } from "../types.js";
2
- import { execSync } from "child_process";
3
- import type { AgentTool, CommandLine } from "./agent.js";
4
- import { getAgentInstructions } from "./shared-prompt.js";
5
- import { SHELL } from "../platform/index.js";
6
-
7
- export class KimiAgent implements AgentTool {
8
- supportsPermissions = false;
9
- supportsYolo = true;
10
- getPromptCommandLine(prompt: string): CommandLine {
11
- return { command: "kimi", args: ["-p", prompt] };
12
- }
13
-
14
- getTaskRunCommandLine(task: ParsedTask, followupPrompt?: string, extraPermissions?: RequiredPermission[] | "yolo"): CommandLine {
15
- const yolo = extraPermissions === "yolo";
16
- const prompt = followupPrompt ?? getAgentInstructions(task, yolo || !this.supportsPermissions);
17
- const args = [];
18
-
19
- if (yolo) {
20
- args.push("--yolo");
21
- }
22
- if (followupPrompt) { args.push("--continue"); }
23
- args.push("-p", prompt);
24
- return { command: "kimi", args };
25
- }
26
-
27
- async init(): Promise<boolean> {
28
- try {
29
- execSync("kimi --version", { stdio: "ignore", shell: SHELL });
30
- } catch {
31
- return false;
32
- }
33
- return true;
34
- }
35
- }
@@ -1,36 +0,0 @@
1
- import type { ParsedTask, RequiredPermission } from "../types.js";
2
- import { execSync } from "child_process";
3
- import type { AgentTool, CommandLine } from "./agent.js";
4
- import { getAgentInstructions } from "./shared-prompt.js";
5
- import { SHELL } from "../platform/index.js";
6
-
7
- export class Kiro implements AgentTool {
8
- supportsPermissions = false;
9
- supportsYolo = true;
10
- getPromptCommandLine(prompt: string): CommandLine {
11
- return { command: "kiro-cli", args: ["--no-interactive", prompt] };
12
- }
13
-
14
- getTaskRunCommandLine(task: ParsedTask, followupPrompt?: string, extraPermissions?: RequiredPermission[] | "yolo"): CommandLine {
15
- const yolo = extraPermissions === "yolo";
16
- const prompt = followupPrompt ?? getAgentInstructions(task, yolo || !this.supportsPermissions);
17
- const args = [];
18
-
19
- if (yolo) {
20
- args.push("--trust-all-tools");
21
- }
22
- if (followupPrompt) {args.push("--resume");}
23
- args.push("--no-interactive", prompt);
24
-
25
- return { command: "kiro-cli", args};
26
- }
27
-
28
- async init(): Promise<boolean> {
29
- try {
30
- execSync("kiro-cli --version", { stdio: "ignore", shell: SHELL });
31
- } catch {
32
- return false;
33
- }
34
- return true;
35
- }
36
- }
@@ -1,29 +0,0 @@
1
- import type { ParsedTask, RequiredPermission } from "../types.js";
2
- import { execSync } from "child_process";
3
- import type { AgentTool, CommandLine } from "./agent.js";
4
- import { getAgentInstructions } from "./shared-prompt.js";
5
-
6
- export class OpenClawAgent implements AgentTool {
7
- supportsPermissions = false;
8
- supportsYolo = false;
9
- getPromptCommandLine(prompt: string): CommandLine {
10
- return { command: "openclaw", args: ["agent", "--local", "--agent", "main", "--message", prompt] };
11
- }
12
-
13
- getTaskRunCommandLine(task: ParsedTask, followupPrompt?: string, extraPermissions?: RequiredPermission[] | "yolo"): CommandLine {
14
- const prompt = followupPrompt ?? getAgentInstructions(task, true);
15
- // OpenClaw does not support stdin as prompt.
16
- const args = ["agent", "--local", "--session-id", task.frontmatter.id, "--message", prompt];
17
-
18
- return { command: "openclaw", args };
19
- }
20
-
21
- async init(): Promise<boolean> {
22
- try {
23
- execSync("openclaw --version", { stdio: "ignore" });
24
- } catch {
25
- return false;
26
- }
27
- return true;
28
- }
29
- }
@@ -1,36 +0,0 @@
1
- import type { ParsedTask, RequiredPermission } from "../types.js";
2
- import { execSync } from "child_process";
3
- import type { AgentTool, CommandLine } from "./agent.js";
4
- import { getAgentInstructions } from "./shared-prompt.js";
5
- import { SHELL } from "../platform/index.js";
6
-
7
- export class OpenCodeAgent implements AgentTool {
8
- supportsPermissions = false;
9
- supportsYolo = true;
10
- getPromptCommandLine(prompt: string): CommandLine {
11
- return { command: "opencode", args: ["run", prompt] };
12
- }
13
-
14
- getTaskRunCommandLine(task: ParsedTask, followupPrompt?: string, extraPermissions?: RequiredPermission[] | "yolo"): CommandLine {
15
- const yolo = extraPermissions === "yolo";
16
- const prompt = followupPrompt ?? getAgentInstructions(task, yolo || !this.supportsPermissions);
17
- const args = ["run"];
18
-
19
- if (yolo) {
20
- args.push("--dangerously-skip-permissions");
21
- }
22
- if (followupPrompt) {args.push("--continue");}
23
- args.push(prompt);
24
-
25
- return { command: "opencode", args};
26
- }
27
-
28
- async init(): Promise<boolean> {
29
- try {
30
- execSync("opencode --version", { stdio: "ignore", shell: SHELL });
31
- } catch {
32
- return false;
33
- }
34
- return true;
35
- }
36
- }