fourmis-agents-sdk 0.3.1 → 0.4.0
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/dist/agent-loop.d.ts +21 -3
- package/dist/agent-loop.d.ts.map +1 -1
- package/dist/agent-loop.js +294 -90
- package/dist/agents/index.js +2798 -1857
- package/dist/agents/task-manager.js +15 -0
- package/dist/agents/tools.d.ts.map +1 -1
- package/dist/agents/tools.js +2798 -1857
- package/dist/agents/types.d.ts +4 -0
- package/dist/agents/types.d.ts.map +1 -1
- package/dist/api.d.ts +8 -5
- package/dist/api.d.ts.map +1 -1
- package/dist/api.js +2140 -923
- package/dist/auth/gemini-oauth.js +15 -0
- package/dist/auth/login-openai.js +15 -0
- package/dist/auth/openai-oauth.js +15 -0
- package/dist/hooks.d.ts +19 -1
- package/dist/hooks.d.ts.map +1 -1
- package/dist/hooks.js +42 -2
- package/dist/index.d.ts +8 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2148 -924
- package/dist/mcp/client.d.ts +7 -0
- package/dist/mcp/client.d.ts.map +1 -1
- package/dist/mcp/client.js +146 -12
- package/dist/mcp/index.js +146 -12
- package/dist/mcp/server.js +15 -0
- package/dist/mcp/types.d.ts +19 -1
- package/dist/mcp/types.d.ts.map +1 -1
- package/dist/memory/index.js +15 -0
- package/dist/memory/memory-handler.js +15 -0
- package/dist/permissions.d.ts.map +1 -1
- package/dist/permissions.js +22 -3
- package/dist/providers/anthropic.d.ts.map +1 -1
- package/dist/providers/anthropic.js +56 -2
- package/dist/providers/gemini.js +15 -0
- package/dist/providers/openai.js +15 -0
- package/dist/providers/registry.js +56 -2
- package/dist/providers/types.d.ts +4 -1
- package/dist/providers/types.d.ts.map +1 -1
- package/dist/query.d.ts +21 -2
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +84 -1
- package/dist/settings.js +15 -0
- package/dist/skills/frontmatter.js +15 -0
- package/dist/skills/index.js +38 -1
- package/dist/skills/skills.d.ts +16 -0
- package/dist/skills/skills.d.ts.map +1 -1
- package/dist/skills/skills.js +38 -1
- package/dist/tools/ask-user-question.d.ts +7 -0
- package/dist/tools/ask-user-question.d.ts.map +1 -0
- package/dist/tools/ask-user-question.js +63 -0
- package/dist/tools/bash.d.ts.map +1 -1
- package/dist/tools/bash.js +62 -2
- package/dist/tools/config.d.ts +7 -0
- package/dist/tools/config.d.ts.map +1 -0
- package/dist/tools/config.js +129 -0
- package/dist/tools/edit.js +15 -0
- package/dist/tools/exit-plan-mode.d.ts +7 -0
- package/dist/tools/exit-plan-mode.d.ts.map +1 -0
- package/dist/tools/exit-plan-mode.js +49 -0
- package/dist/tools/glob.js +15 -0
- package/dist/tools/grep.js +15 -0
- package/dist/tools/index.d.ts +7 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +521 -9
- package/dist/tools/mcp-resources.js +15 -0
- package/dist/tools/notebook-edit.d.ts +7 -0
- package/dist/tools/notebook-edit.d.ts.map +1 -0
- package/dist/tools/notebook-edit.js +98 -0
- package/dist/tools/presets.d.ts +2 -1
- package/dist/tools/presets.d.ts.map +1 -1
- package/dist/tools/presets.js +37 -4
- package/dist/tools/read.d.ts.map +1 -1
- package/dist/tools/read.js +27 -1
- package/dist/tools/registry.d.ts +2 -0
- package/dist/tools/registry.d.ts.map +1 -1
- package/dist/tools/registry.js +25 -0
- package/dist/tools/todo-write.d.ts +7 -0
- package/dist/tools/todo-write.d.ts.map +1 -0
- package/dist/tools/todo-write.js +84 -0
- package/dist/tools/web-fetch.d.ts +6 -0
- package/dist/tools/web-fetch.d.ts.map +1 -0
- package/dist/tools/web-fetch.js +100 -0
- package/dist/tools/web-search.d.ts +7 -0
- package/dist/tools/web-search.d.ts.map +1 -0
- package/dist/tools/web-search.js +93 -0
- package/dist/tools/write.js +15 -0
- package/dist/types.d.ts +344 -42
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +15 -0
- package/dist/utils/cost.js +15 -0
- package/dist/utils/session-store.d.ts +1 -1
- package/dist/utils/session-store.d.ts.map +1 -1
- package/dist/utils/session-store.js +64 -2
- package/dist/utils/system-prompt.d.ts +2 -0
- package/dist/utils/system-prompt.d.ts.map +1 -1
- package/dist/utils/system-prompt.js +48 -4
- package/package.json +3 -2
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
8
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
9
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
10
|
+
for (let key of __getOwnPropNames(mod))
|
|
11
|
+
if (!__hasOwnProp.call(to, key))
|
|
12
|
+
__defProp(to, key, {
|
|
13
|
+
get: () => mod[key],
|
|
14
|
+
enumerable: true
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __export = (target, all) => {
|
|
19
|
+
for (var name in all)
|
|
20
|
+
__defProp(target, name, {
|
|
21
|
+
get: all[name],
|
|
22
|
+
enumerable: true,
|
|
23
|
+
configurable: true,
|
|
24
|
+
set: (newValue) => all[name] = () => newValue
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
28
|
+
var __require = import.meta.require;
|
|
29
|
+
|
|
30
|
+
// src/tools/ask-user-question.ts
|
|
31
|
+
var AskUserQuestionTool = {
|
|
32
|
+
name: "AskUserQuestion",
|
|
33
|
+
description: "Ask the user a clarifying question and wait for their response.",
|
|
34
|
+
inputSchema: {
|
|
35
|
+
type: "object",
|
|
36
|
+
properties: {
|
|
37
|
+
question: {
|
|
38
|
+
type: "string",
|
|
39
|
+
description: "Question to ask the user."
|
|
40
|
+
},
|
|
41
|
+
options: {
|
|
42
|
+
type: "array",
|
|
43
|
+
items: { type: "string" },
|
|
44
|
+
description: "Optional fixed choices."
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
required: ["question"]
|
|
48
|
+
},
|
|
49
|
+
async execute(input) {
|
|
50
|
+
const { question, options } = input ?? {};
|
|
51
|
+
if (!question) {
|
|
52
|
+
return { content: "Error: question is required", isError: true };
|
|
53
|
+
}
|
|
54
|
+
const choices = Array.isArray(options) && options.length > 0 ? ` Choices: ${options.join(" | ")}` : "";
|
|
55
|
+
return {
|
|
56
|
+
content: `User interaction is not available in this runtime. Unanswered question: ${question}.${choices}`,
|
|
57
|
+
isError: true
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
export {
|
|
62
|
+
AskUserQuestionTool
|
|
63
|
+
};
|
package/dist/tools/bash.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bash.d.ts","sourceRoot":"","sources":["../../src/tools/bash.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAA2B,MAAM,eAAe,CAAC;AAMjF,eAAO,MAAM,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"bash.d.ts","sourceRoot":"","sources":["../../src/tools/bash.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAA2B,MAAM,eAAe,CAAC;AAMjF,eAAO,MAAM,QAAQ,EAAE,kBAoItB,CAAC"}
|
package/dist/tools/bash.js
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
2
4
|
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
8
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
9
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
10
|
+
for (let key of __getOwnPropNames(mod))
|
|
11
|
+
if (!__hasOwnProp.call(to, key))
|
|
12
|
+
__defProp(to, key, {
|
|
13
|
+
get: () => mod[key],
|
|
14
|
+
enumerable: true
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
3
18
|
var __export = (target, all) => {
|
|
4
19
|
for (var name in all)
|
|
5
20
|
__defProp(target, name, {
|
|
@@ -33,17 +48,58 @@ var BashTool = {
|
|
|
33
48
|
timeout: {
|
|
34
49
|
type: "number",
|
|
35
50
|
description: "Timeout in milliseconds (max 600000)"
|
|
51
|
+
},
|
|
52
|
+
run_in_background: {
|
|
53
|
+
type: "boolean",
|
|
54
|
+
description: "Run command asynchronously and return immediately."
|
|
55
|
+
},
|
|
56
|
+
dangerouslyDisableSandbox: {
|
|
57
|
+
type: "boolean",
|
|
58
|
+
description: "If true, explicitly request unsandboxed execution."
|
|
59
|
+
},
|
|
60
|
+
_simulatedSedEdit: {
|
|
61
|
+
type: "object",
|
|
62
|
+
properties: {
|
|
63
|
+
filePath: { type: "string" },
|
|
64
|
+
newContent: { type: "string" }
|
|
65
|
+
},
|
|
66
|
+
description: "Internal field for precomputed edit previews."
|
|
36
67
|
}
|
|
37
68
|
},
|
|
38
69
|
required: ["command"]
|
|
39
70
|
},
|
|
40
71
|
async execute(input, ctx) {
|
|
41
|
-
const {
|
|
72
|
+
const {
|
|
73
|
+
command,
|
|
74
|
+
timeout: timeoutMs,
|
|
75
|
+
run_in_background,
|
|
76
|
+
description,
|
|
77
|
+
dangerouslyDisableSandbox,
|
|
78
|
+
_simulatedSedEdit
|
|
79
|
+
} = input;
|
|
42
80
|
if (!command || typeof command !== "string") {
|
|
43
81
|
return { content: "Error: command is required", isError: true };
|
|
44
82
|
}
|
|
45
83
|
const timeout = Math.min(timeoutMs ?? DEFAULT_TIMEOUT, MAX_TIMEOUT);
|
|
46
84
|
try {
|
|
85
|
+
if (run_in_background) {
|
|
86
|
+
const proc2 = Bun.spawn(["bash", "-c", command], {
|
|
87
|
+
cwd: ctx.cwd,
|
|
88
|
+
stdout: "ignore",
|
|
89
|
+
stderr: "ignore",
|
|
90
|
+
stdin: "ignore",
|
|
91
|
+
env: { ...process.env, ...ctx.env }
|
|
92
|
+
});
|
|
93
|
+
return {
|
|
94
|
+
content: `Background command started (pid ${proc2.pid ?? "unknown"}).`,
|
|
95
|
+
metadata: {
|
|
96
|
+
pid: proc2.pid ?? null,
|
|
97
|
+
run_in_background: true,
|
|
98
|
+
dangerouslyDisableSandbox: dangerouslyDisableSandbox === true,
|
|
99
|
+
hasSimulatedSedEdit: !!_simulatedSedEdit
|
|
100
|
+
}
|
|
101
|
+
};
|
|
102
|
+
}
|
|
47
103
|
const proc = Bun.spawn(["bash", "-c", command], {
|
|
48
104
|
cwd: ctx.cwd,
|
|
49
105
|
stdout: "pipe",
|
|
@@ -75,7 +131,11 @@ var BashTool = {
|
|
|
75
131
|
return {
|
|
76
132
|
content: output,
|
|
77
133
|
isError: exitCode !== 0 ? true : undefined,
|
|
78
|
-
metadata: {
|
|
134
|
+
metadata: {
|
|
135
|
+
exitCode,
|
|
136
|
+
dangerouslyDisableSandbox: dangerouslyDisableSandbox === true,
|
|
137
|
+
hasSimulatedSedEdit: !!_simulatedSedEdit
|
|
138
|
+
}
|
|
79
139
|
};
|
|
80
140
|
} catch (err) {
|
|
81
141
|
const message = err instanceof Error ? err.message : String(err);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/tools/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,kBAAkB,EAA2B,MAAM,eAAe,CAAC;AAmCjF,eAAO,MAAM,UAAU,EAAE,kBA4ExB,CAAC"}
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
8
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
9
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
10
|
+
for (let key of __getOwnPropNames(mod))
|
|
11
|
+
if (!__hasOwnProp.call(to, key))
|
|
12
|
+
__defProp(to, key, {
|
|
13
|
+
get: () => mod[key],
|
|
14
|
+
enumerable: true
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __export = (target, all) => {
|
|
19
|
+
for (var name in all)
|
|
20
|
+
__defProp(target, name, {
|
|
21
|
+
get: all[name],
|
|
22
|
+
enumerable: true,
|
|
23
|
+
configurable: true,
|
|
24
|
+
set: (newValue) => all[name] = () => newValue
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
28
|
+
var __require = import.meta.require;
|
|
29
|
+
|
|
30
|
+
// src/tools/config.ts
|
|
31
|
+
import { mkdir, readFile, writeFile } from "fs/promises";
|
|
32
|
+
import { join, dirname } from "path";
|
|
33
|
+
function scopePath(cwd, scope) {
|
|
34
|
+
if (scope === "project")
|
|
35
|
+
return join(cwd, ".claude", "settings.json");
|
|
36
|
+
return join(cwd, ".claude", "settings.local.json");
|
|
37
|
+
}
|
|
38
|
+
function setByPath(obj, keyPath, value) {
|
|
39
|
+
const keys = keyPath.split(".").filter(Boolean);
|
|
40
|
+
if (keys.length === 0)
|
|
41
|
+
return;
|
|
42
|
+
let current = obj;
|
|
43
|
+
for (let i = 0;i < keys.length - 1; i++) {
|
|
44
|
+
const key = keys[i];
|
|
45
|
+
const next = current[key];
|
|
46
|
+
if (!next || typeof next !== "object" || Array.isArray(next)) {
|
|
47
|
+
current[key] = {};
|
|
48
|
+
}
|
|
49
|
+
current = current[key];
|
|
50
|
+
}
|
|
51
|
+
current[keys[keys.length - 1]] = value;
|
|
52
|
+
}
|
|
53
|
+
function getByPath(obj, keyPath) {
|
|
54
|
+
const keys = keyPath.split(".").filter(Boolean);
|
|
55
|
+
let current = obj;
|
|
56
|
+
for (const key of keys) {
|
|
57
|
+
if (!current || typeof current !== "object" || Array.isArray(current))
|
|
58
|
+
return;
|
|
59
|
+
current = current[key];
|
|
60
|
+
}
|
|
61
|
+
return current;
|
|
62
|
+
}
|
|
63
|
+
var ConfigTool = {
|
|
64
|
+
name: "Config",
|
|
65
|
+
description: "Read or update .claude settings values.",
|
|
66
|
+
inputSchema: {
|
|
67
|
+
type: "object",
|
|
68
|
+
properties: {
|
|
69
|
+
action: {
|
|
70
|
+
type: "string",
|
|
71
|
+
enum: ["get", "set", "list"]
|
|
72
|
+
},
|
|
73
|
+
key: {
|
|
74
|
+
type: "string",
|
|
75
|
+
description: "Dot-path key (for get/set)."
|
|
76
|
+
},
|
|
77
|
+
value: {
|
|
78
|
+
description: "Value for set action."
|
|
79
|
+
},
|
|
80
|
+
scope: {
|
|
81
|
+
type: "string",
|
|
82
|
+
enum: ["local", "project"]
|
|
83
|
+
}
|
|
84
|
+
},
|
|
85
|
+
required: ["action"]
|
|
86
|
+
},
|
|
87
|
+
async execute(input, ctx) {
|
|
88
|
+
const {
|
|
89
|
+
action,
|
|
90
|
+
key,
|
|
91
|
+
value,
|
|
92
|
+
scope = "local"
|
|
93
|
+
} = input ?? {};
|
|
94
|
+
if (!action) {
|
|
95
|
+
return { content: "Error: action is required", isError: true };
|
|
96
|
+
}
|
|
97
|
+
const filePath = scopePath(ctx.cwd, scope);
|
|
98
|
+
let data = {};
|
|
99
|
+
try {
|
|
100
|
+
const raw = await readFile(filePath, "utf-8");
|
|
101
|
+
data = JSON.parse(raw);
|
|
102
|
+
} catch {
|
|
103
|
+
data = {};
|
|
104
|
+
}
|
|
105
|
+
if (action === "list") {
|
|
106
|
+
return { content: JSON.stringify(data, null, 2) };
|
|
107
|
+
}
|
|
108
|
+
if (!key) {
|
|
109
|
+
return { content: "Error: key is required for get/set", isError: true };
|
|
110
|
+
}
|
|
111
|
+
if (action === "get") {
|
|
112
|
+
const out = getByPath(data, key);
|
|
113
|
+
return { content: out === undefined ? "undefined" : JSON.stringify(out, null, 2) };
|
|
114
|
+
}
|
|
115
|
+
setByPath(data, key, value);
|
|
116
|
+
try {
|
|
117
|
+
await mkdir(dirname(filePath), { recursive: true });
|
|
118
|
+
await writeFile(filePath, JSON.stringify(data, null, 2) + `
|
|
119
|
+
`, "utf-8");
|
|
120
|
+
return { content: `Updated ${key} in ${filePath}` };
|
|
121
|
+
} catch (err) {
|
|
122
|
+
const message = err instanceof Error ? err.message : String(err);
|
|
123
|
+
return { content: `Error writing config: ${message}`, isError: true };
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
export {
|
|
128
|
+
ConfigTool
|
|
129
|
+
};
|
package/dist/tools/edit.js
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
2
4
|
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
8
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
9
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
10
|
+
for (let key of __getOwnPropNames(mod))
|
|
11
|
+
if (!__hasOwnProp.call(to, key))
|
|
12
|
+
__defProp(to, key, {
|
|
13
|
+
get: () => mod[key],
|
|
14
|
+
enumerable: true
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
3
18
|
var __export = (target, all) => {
|
|
4
19
|
for (var name in all)
|
|
5
20
|
__defProp(target, name, {
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ExitPlanMode tool.
|
|
3
|
+
* Signals the runtime to leave plan mode and return to default permissions.
|
|
4
|
+
*/
|
|
5
|
+
import type { ToolImplementation } from "./registry.js";
|
|
6
|
+
export declare const ExitPlanModeTool: ToolImplementation;
|
|
7
|
+
//# sourceMappingURL=exit-plan-mode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"exit-plan-mode.d.ts","sourceRoot":"","sources":["../../src/tools/exit-plan-mode.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAc,MAAM,eAAe,CAAC;AAEpE,eAAO,MAAM,gBAAgB,EAAE,kBAgB9B,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// @bun
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
8
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
9
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
10
|
+
for (let key of __getOwnPropNames(mod))
|
|
11
|
+
if (!__hasOwnProp.call(to, key))
|
|
12
|
+
__defProp(to, key, {
|
|
13
|
+
get: () => mod[key],
|
|
14
|
+
enumerable: true
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __export = (target, all) => {
|
|
19
|
+
for (var name in all)
|
|
20
|
+
__defProp(target, name, {
|
|
21
|
+
get: all[name],
|
|
22
|
+
enumerable: true,
|
|
23
|
+
configurable: true,
|
|
24
|
+
set: (newValue) => all[name] = () => newValue
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
28
|
+
var __require = import.meta.require;
|
|
29
|
+
|
|
30
|
+
// src/tools/exit-plan-mode.ts
|
|
31
|
+
var ExitPlanModeTool = {
|
|
32
|
+
name: "ExitPlanMode",
|
|
33
|
+
description: "Exit plan mode and resume normal execution permissions.",
|
|
34
|
+
inputSchema: {
|
|
35
|
+
type: "object",
|
|
36
|
+
properties: {}
|
|
37
|
+
},
|
|
38
|
+
async execute() {
|
|
39
|
+
return {
|
|
40
|
+
content: "Exiting plan mode.",
|
|
41
|
+
metadata: {
|
|
42
|
+
setPermissionMode: "default"
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
export {
|
|
48
|
+
ExitPlanModeTool
|
|
49
|
+
};
|
package/dist/tools/glob.js
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
2
4
|
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
8
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
9
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
10
|
+
for (let key of __getOwnPropNames(mod))
|
|
11
|
+
if (!__hasOwnProp.call(to, key))
|
|
12
|
+
__defProp(to, key, {
|
|
13
|
+
get: () => mod[key],
|
|
14
|
+
enumerable: true
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
3
18
|
var __export = (target, all) => {
|
|
4
19
|
for (var name in all)
|
|
5
20
|
__defProp(target, name, {
|
package/dist/tools/grep.js
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
// @bun
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
2
4
|
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
+
var __toESM = (mod, isNodeMode, target) => {
|
|
8
|
+
target = mod != null ? __create(__getProtoOf(mod)) : {};
|
|
9
|
+
const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
|
|
10
|
+
for (let key of __getOwnPropNames(mod))
|
|
11
|
+
if (!__hasOwnProp.call(to, key))
|
|
12
|
+
__defProp(to, key, {
|
|
13
|
+
get: () => mod[key],
|
|
14
|
+
enumerable: true
|
|
15
|
+
});
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
3
18
|
var __export = (target, all) => {
|
|
4
19
|
for (var name in all)
|
|
5
20
|
__defProp(target, name, {
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -10,6 +10,13 @@ export { WriteTool } from "./write.js";
|
|
|
10
10
|
export { EditTool } from "./edit.js";
|
|
11
11
|
export { GlobTool } from "./glob.js";
|
|
12
12
|
export { GrepTool } from "./grep.js";
|
|
13
|
+
export { NotebookEditTool } from "./notebook-edit.js";
|
|
14
|
+
export { WebFetchTool } from "./web-fetch.js";
|
|
15
|
+
export { WebSearchTool } from "./web-search.js";
|
|
16
|
+
export { AskUserQuestionTool } from "./ask-user-question.js";
|
|
17
|
+
export { TodoWriteTool } from "./todo-write.js";
|
|
18
|
+
export { ConfigTool } from "./config.js";
|
|
19
|
+
export { ExitPlanModeTool } from "./exit-plan-mode.js";
|
|
13
20
|
import { ToolRegistry } from "./registry.js";
|
|
14
21
|
/**
|
|
15
22
|
* Build a ToolRegistry populated with the requested tools.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,YAAY,EAAE,kBAAkB,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjF,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tools/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,YAAY,EAAE,kBAAkB,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AACjF,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAEvD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAgC7C;;GAEG;AACH,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,MAAM,EAAE,EACnB,YAAY,CAAC,EAAE,MAAM,EAAE,EACvB,eAAe,CAAC,EAAE,MAAM,EAAE,GACzB,YAAY,CAad"}
|