summaryrefslogtreecommitdiffhomepage
path: root/packages/tool-shell/src/extension.ts
blob: 1a89de083119ca2883c976070514e08aa317e761 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import type { Extension } from "@dispatch/kernel";
import { createRunShellTool } from "./shell.js";
import { realSpawn } from "./spawn.js";

export const extension: Extension = {
	manifest: {
		id: "tool-shell",
		name: "Shell Tool",
		version: "0.0.0",
		apiVersion: "^0.1.0",
		trust: "bundled",
		activation: "eager",
		capabilities: { shell: true },
		contributes: { tools: ["run_shell"] },
	},
	activate(host) {
		host.defineTool(createRunShellTool({ workdir: process.cwd(), spawn: realSpawn }));
	},
};