heyio 1.0.8 → 1.0.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.
@@ -190,6 +190,33 @@ export function createTools() {
190
190
  return `Schedule created: ${schedule.id}`;
191
191
  },
192
192
  }),
193
+ // --- Shell Tool ---
194
+ defineTool("shell_exec", {
195
+ description: "Execute a shell command on the host machine. Use for git, gh CLI, file operations, etc. Commands run in the user's environment with their credentials.",
196
+ parameters: z.object({
197
+ command: z.string().describe("Shell command to execute"),
198
+ cwd: z.string().optional().describe("Working directory (defaults to home directory)"),
199
+ }),
200
+ handler: async ({ command, cwd }) => {
201
+ const { execSync } = await import("node:child_process");
202
+ const { homedir } = await import("node:os");
203
+ try {
204
+ const output = execSync(command, {
205
+ cwd: cwd ?? homedir(),
206
+ encoding: "utf-8",
207
+ timeout: 60_000,
208
+ maxBuffer: 1024 * 1024,
209
+ env: { ...process.env, GH_PROMPT_DISABLED: "1" },
210
+ });
211
+ return output.trim() || "(no output)";
212
+ }
213
+ catch (err) {
214
+ const stderr = err.stderr?.toString().trim() ?? "";
215
+ const stdout = err.stdout?.toString().trim() ?? "";
216
+ return `Error (exit ${err.status}): ${stderr || stdout || err.message}`;
217
+ }
218
+ },
219
+ }),
193
220
  ];
194
221
  }
195
222
  //# sourceMappingURL=tools.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "heyio",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "IO — a personal AI assistant daemon built on the GitHub Copilot SDK",
5
5
  "bin": {
6
6
  "io": "dist/index.js"