iosm-cli 0.1.0 → 0.1.2
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/CHANGELOG.md +3 -1
- package/README.md +218 -547
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +11 -3
- package/dist/cli/args.js.map +1 -1
- package/dist/core/agent-profiles.d.ts.map +1 -1
- package/dist/core/agent-profiles.js +20 -5
- package/dist/core/agent-profiles.js.map +1 -1
- package/dist/core/sdk.d.ts +2 -2
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +3 -3
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +4 -1
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +34 -3
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/ast-grep.d.ts +12 -0
- package/dist/core/tools/ast-grep.d.ts.map +1 -0
- package/dist/core/tools/ast-grep.js +12 -0
- package/dist/core/tools/ast-grep.js.map +1 -0
- package/dist/core/tools/comby.d.ts +12 -0
- package/dist/core/tools/comby.d.ts.map +1 -0
- package/dist/core/tools/comby.js +14 -0
- package/dist/core/tools/comby.js.map +1 -0
- package/dist/core/tools/external-cli.d.ts +33 -0
- package/dist/core/tools/external-cli.d.ts.map +1 -0
- package/dist/core/tools/external-cli.js +201 -0
- package/dist/core/tools/external-cli.js.map +1 -0
- package/dist/core/tools/fd.d.ts +12 -0
- package/dist/core/tools/fd.d.ts.map +1 -0
- package/dist/core/tools/fd.js +15 -0
- package/dist/core/tools/fd.js.map +1 -0
- package/dist/core/tools/index.d.ts +57 -0
- package/dist/core/tools/index.d.ts.map +1 -1
- package/dist/core/tools/index.js +61 -2
- package/dist/core/tools/index.js.map +1 -1
- package/dist/core/tools/jq.d.ts +12 -0
- package/dist/core/tools/jq.d.ts.map +1 -0
- package/dist/core/tools/jq.js +12 -0
- package/dist/core/tools/jq.js.map +1 -0
- package/dist/core/tools/rg.d.ts +12 -0
- package/dist/core/tools/rg.d.ts.map +1 -0
- package/dist/core/tools/rg.js +15 -0
- package/dist/core/tools/rg.js.map +1 -0
- package/dist/core/tools/sed.d.ts +12 -0
- package/dist/core/tools/sed.d.ts.map +1 -0
- package/dist/core/tools/sed.js +14 -0
- package/dist/core/tools/sed.js.map +1 -0
- package/dist/core/tools/semgrep.d.ts +12 -0
- package/dist/core/tools/semgrep.d.ts.map +1 -0
- package/dist/core/tools/semgrep.js +13 -0
- package/dist/core/tools/semgrep.js.map +1 -0
- package/dist/core/tools/yq.d.ts +12 -0
- package/dist/core/tools/yq.d.ts.map +1 -0
- package/dist/core/tools/yq.js +12 -0
- package/dist/core/tools/yq.js.map +1 -0
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +136 -3
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/docs/assets/preview.jpg +0 -0
- package/docs/cli-reference.md +12 -4
- package/docs/configuration.md +4 -4
- package/docs/development-and-testing.md +1 -1
- package/docs/extensions-packages-themes.md +1 -1
- package/docs/getting-started.md +3 -3
- package/docs/interactive-mode.md +1 -1
- package/docs/rpc-json-sdk.md +1 -1
- package/package.json +6 -2
|
@@ -1,13 +1,22 @@
|
|
|
1
|
+
export { createAstGrepTool, type AstGrepToolInput, astGrepTool, } from "./ast-grep.js";
|
|
1
2
|
export { type BashOperations, type BashSpawnContext, type BashSpawnHook, type BashToolDetails, type BashToolInput, type BashToolOptions, bashTool, createBashTool, } from "./bash.js";
|
|
3
|
+
export { type CombyToolInput, combyTool, createCombyTool, } from "./comby.js";
|
|
2
4
|
export { createEditTool, type EditOperations, type EditToolDetails, type EditToolInput, type EditToolOptions, editTool, } from "./edit.js";
|
|
5
|
+
export { type ExternalCliToolDetails, type ExternalCliToolInput, type ExternalCliToolOptions, createExternalCliTool, } from "./external-cli.js";
|
|
6
|
+
export { createFdTool, type FdToolInput, fdTool, } from "./fd.js";
|
|
3
7
|
export { createFindTool, type FindOperations, type FindToolDetails, type FindToolInput, type FindToolOptions, findTool, } from "./find.js";
|
|
4
8
|
export { createGrepTool, type GrepOperations, type GrepToolDetails, type GrepToolInput, type GrepToolOptions, grepTool, } from "./grep.js";
|
|
9
|
+
export { createJqTool, type JqToolInput, jqTool, } from "./jq.js";
|
|
5
10
|
export { createLsTool, type LsOperations, type LsToolDetails, type LsToolInput, type LsToolOptions, lsTool, } from "./ls.js";
|
|
6
11
|
export { createReadTool, type ReadOperations, type ReadToolDetails, type ReadToolInput, type ReadToolOptions, readTool, } from "./read.js";
|
|
12
|
+
export { createRgTool, type RgToolInput, rgTool, } from "./rg.js";
|
|
13
|
+
export { createSedTool, type SedToolInput, sedTool, } from "./sed.js";
|
|
14
|
+
export { createSemgrepTool, type SemgrepToolInput, semgrepTool, } from "./semgrep.js";
|
|
7
15
|
export { DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, formatSize, type TruncationOptions, type TruncationResult, truncateHead, truncateLine, truncateTail, } from "./truncate.js";
|
|
8
16
|
export { createWriteTool, type WriteOperations, type WriteToolInput, type WriteToolOptions, writeTool, } from "./write.js";
|
|
9
17
|
export { type ToolPermissionGuard, type ToolPermissionRequest } from "./permissions.js";
|
|
10
18
|
export { createTodoWriteTool, createTodoReadTool, todoWriteTool, todoReadTool, getTaskFilePath, type TodoTask, type TodoTaskStatus, type TodoWriteInput, type TodoReadInput, } from "./todo.js";
|
|
19
|
+
export { createYqTool, type YqToolInput, yqTool, } from "./yq.js";
|
|
11
20
|
export { createTaskTool, type SubagentRunner, type TaskToolProgress, type TaskToolProgressPhase, type TaskToolInput, type TaskToolDetails, } from "./task.js";
|
|
12
21
|
import type { AgentTool } from "@mariozechner/pi-agent-core";
|
|
13
22
|
import { type BashToolOptions } from "./bash.js";
|
|
@@ -55,6 +64,54 @@ export declare const allTools: {
|
|
|
55
64
|
path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
56
65
|
limit: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
57
66
|
}>, any>;
|
|
67
|
+
rg: AgentTool<import("@sinclair/typebox").TObject<{
|
|
68
|
+
args: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
69
|
+
path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
70
|
+
stdin: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
71
|
+
timeout: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
72
|
+
}>, any>;
|
|
73
|
+
fd: AgentTool<import("@sinclair/typebox").TObject<{
|
|
74
|
+
args: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
75
|
+
path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
76
|
+
stdin: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
77
|
+
timeout: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
78
|
+
}>, any>;
|
|
79
|
+
ast_grep: AgentTool<import("@sinclair/typebox").TObject<{
|
|
80
|
+
args: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
81
|
+
path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
82
|
+
stdin: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
83
|
+
timeout: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
84
|
+
}>, any>;
|
|
85
|
+
comby: AgentTool<import("@sinclair/typebox").TObject<{
|
|
86
|
+
args: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
87
|
+
path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
88
|
+
stdin: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
89
|
+
timeout: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
90
|
+
}>, any>;
|
|
91
|
+
jq: AgentTool<import("@sinclair/typebox").TObject<{
|
|
92
|
+
args: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
93
|
+
path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
94
|
+
stdin: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
95
|
+
timeout: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
96
|
+
}>, any>;
|
|
97
|
+
yq: AgentTool<import("@sinclair/typebox").TObject<{
|
|
98
|
+
args: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
99
|
+
path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
100
|
+
stdin: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
101
|
+
timeout: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
102
|
+
}>, any>;
|
|
103
|
+
semgrep: AgentTool<import("@sinclair/typebox").TObject<{
|
|
104
|
+
args: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
105
|
+
path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
106
|
+
stdin: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
107
|
+
timeout: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
108
|
+
}>, any>;
|
|
109
|
+
sed: AgentTool<import("@sinclair/typebox").TObject<{
|
|
110
|
+
args: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
111
|
+
path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
112
|
+
stdin: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
113
|
+
timeout: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
114
|
+
}>, any>;
|
|
58
115
|
todo_write: AgentTool<import("@sinclair/typebox").TObject<{
|
|
59
116
|
tasks: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
|
|
60
117
|
id: import("@sinclair/typebox").TString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,QAAQ,EACR,cAAc,GACd,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,cAAc,EACd,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,QAAQ,GACR,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,cAAc,EACd,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,QAAQ,GACR,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,cAAc,EACd,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,QAAQ,GACR,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,YAAY,EACZ,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,WAAW,EAChB,KAAK,aAAa,EAClB,MAAM,GACN,MAAM,SAAS,CAAC;AACjB,OAAO,EACN,cAAc,EACd,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,QAAQ,GACR,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,iBAAiB,EACjB,iBAAiB,EACjB,UAAU,EACV,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,YAAY,EACZ,YAAY,EACZ,YAAY,GACZ,MAAM,eAAe,CAAC;AACvB,OAAO,EACN,eAAe,EACf,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,SAAS,GACT,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,KAAK,mBAAmB,EAAE,KAAK,qBAAqB,EAAE,MAAM,kBAAkB,CAAC;AACxF,OAAO,EACN,mBAAmB,EACnB,kBAAkB,EAClB,aAAa,EACb,YAAY,EACZ,eAAe,EACf,KAAK,QAAQ,EACb,KAAK,cAAc,EACnB,KAAK,cAAc,EACnB,KAAK,aAAa,GAClB,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,cAAc,EACd,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,aAAa,EAClB,KAAK,eAAe,GACpB,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,iBAAiB,EACjB,KAAK,gBAAgB,EACrB,WAAW,GACX,MAAM,eAAe,CAAC;AACvB,OAAO,EACN,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,QAAQ,EACR,cAAc,GACd,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,KAAK,cAAc,EACnB,SAAS,EACT,eAAe,GACf,MAAM,YAAY,CAAC;AACpB,OAAO,EACN,cAAc,EACd,KAAK,cAAc,EACn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,MAAM,QAAQ,GAAG,MAAM,OAAO,QAAQ,CAAC;AAE7C,MAAM,WAAW,YAAY;IAC5B,gCAAgC;IAChC,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,gCAAgC;IAChC,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,gCAAgC;IAChC,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,iCAAiC;IACjC,KAAK,CAAC,EAAE,gBAAgB,CAAC;CACzB;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,IAAI,EAAE,CAO7E;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,IAAI,EAAE,CAe/E;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,MAAM,CAAC,QAAQ,EAAE,IAAI,CAAC,CAoB1F;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,CAAC,EAAE,YAAY,GAAG,IAAI,EAAE,CAKjG"}
|
package/dist/core/tools/index.js
CHANGED
|
@@ -1,25 +1,55 @@
|
|
|
1
|
+
export { createAstGrepTool, astGrepTool, } from "./ast-grep.js";
|
|
1
2
|
export { bashTool, createBashTool, } from "./bash.js";
|
|
3
|
+
export { combyTool, createCombyTool, } from "./comby.js";
|
|
2
4
|
export { createEditTool, editTool, } from "./edit.js";
|
|
5
|
+
export { createExternalCliTool, } from "./external-cli.js";
|
|
6
|
+
export { createFdTool, fdTool, } from "./fd.js";
|
|
3
7
|
export { createFindTool, findTool, } from "./find.js";
|
|
4
8
|
export { createGrepTool, grepTool, } from "./grep.js";
|
|
9
|
+
export { createJqTool, jqTool, } from "./jq.js";
|
|
5
10
|
export { createLsTool, lsTool, } from "./ls.js";
|
|
6
11
|
export { createReadTool, readTool, } from "./read.js";
|
|
12
|
+
export { createRgTool, rgTool, } from "./rg.js";
|
|
13
|
+
export { createSedTool, sedTool, } from "./sed.js";
|
|
14
|
+
export { createSemgrepTool, semgrepTool, } from "./semgrep.js";
|
|
7
15
|
export { DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, formatSize, truncateHead, truncateLine, truncateTail, } from "./truncate.js";
|
|
8
16
|
export { createWriteTool, writeTool, } from "./write.js";
|
|
9
17
|
export { createTodoWriteTool, createTodoReadTool, todoWriteTool, todoReadTool, getTaskFilePath, } from "./todo.js";
|
|
18
|
+
export { createYqTool, yqTool, } from "./yq.js";
|
|
10
19
|
export { createTaskTool, } from "./task.js";
|
|
20
|
+
import { astGrepTool, createAstGrepTool } from "./ast-grep.js";
|
|
11
21
|
import { bashTool, createBashTool } from "./bash.js";
|
|
22
|
+
import { combyTool, createCombyTool } from "./comby.js";
|
|
12
23
|
import { createEditTool, editTool } from "./edit.js";
|
|
24
|
+
import { createFdTool, fdTool } from "./fd.js";
|
|
13
25
|
import { createFindTool, findTool } from "./find.js";
|
|
14
26
|
import { createGrepTool, grepTool } from "./grep.js";
|
|
27
|
+
import { createJqTool, jqTool } from "./jq.js";
|
|
15
28
|
import { createLsTool, lsTool } from "./ls.js";
|
|
16
29
|
import { createReadTool, readTool } from "./read.js";
|
|
30
|
+
import { createRgTool, rgTool } from "./rg.js";
|
|
31
|
+
import { createSedTool, sedTool } from "./sed.js";
|
|
32
|
+
import { createSemgrepTool, semgrepTool } from "./semgrep.js";
|
|
17
33
|
import { createWriteTool, writeTool } from "./write.js";
|
|
34
|
+
import { createYqTool, yqTool } from "./yq.js";
|
|
18
35
|
import { todoWriteTool, todoReadTool } from "./todo.js";
|
|
19
36
|
// Default tools for full access mode (using process.cwd())
|
|
20
37
|
export const codingTools = [readTool, bashTool, editTool, writeTool];
|
|
21
38
|
// Read-only tools for exploration without modification (using process.cwd())
|
|
22
|
-
export const readOnlyTools = [
|
|
39
|
+
export const readOnlyTools = [
|
|
40
|
+
readTool,
|
|
41
|
+
grepTool,
|
|
42
|
+
findTool,
|
|
43
|
+
lsTool,
|
|
44
|
+
rgTool,
|
|
45
|
+
fdTool,
|
|
46
|
+
astGrepTool,
|
|
47
|
+
combyTool,
|
|
48
|
+
jqTool,
|
|
49
|
+
yqTool,
|
|
50
|
+
semgrepTool,
|
|
51
|
+
sedTool,
|
|
52
|
+
];
|
|
23
53
|
// All available tools (using process.cwd())
|
|
24
54
|
export const allTools = {
|
|
25
55
|
read: readTool,
|
|
@@ -29,6 +59,14 @@ export const allTools = {
|
|
|
29
59
|
grep: grepTool,
|
|
30
60
|
find: findTool,
|
|
31
61
|
ls: lsTool,
|
|
62
|
+
rg: rgTool,
|
|
63
|
+
fd: fdTool,
|
|
64
|
+
ast_grep: astGrepTool,
|
|
65
|
+
comby: combyTool,
|
|
66
|
+
jq: jqTool,
|
|
67
|
+
yq: yqTool,
|
|
68
|
+
semgrep: semgrepTool,
|
|
69
|
+
sed: sedTool,
|
|
32
70
|
todo_write: todoWriteTool,
|
|
33
71
|
todo_read: todoReadTool,
|
|
34
72
|
};
|
|
@@ -47,7 +85,20 @@ export function createCodingTools(cwd, options) {
|
|
|
47
85
|
* Create read-only tools configured for a specific working directory.
|
|
48
86
|
*/
|
|
49
87
|
export function createReadOnlyTools(cwd, options) {
|
|
50
|
-
return [
|
|
88
|
+
return [
|
|
89
|
+
createReadTool(cwd, options?.read),
|
|
90
|
+
createGrepTool(cwd),
|
|
91
|
+
createFindTool(cwd),
|
|
92
|
+
createLsTool(cwd),
|
|
93
|
+
createRgTool(cwd),
|
|
94
|
+
createFdTool(cwd),
|
|
95
|
+
createAstGrepTool(cwd),
|
|
96
|
+
createCombyTool(cwd),
|
|
97
|
+
createJqTool(cwd),
|
|
98
|
+
createYqTool(cwd),
|
|
99
|
+
createSemgrepTool(cwd),
|
|
100
|
+
createSedTool(cwd),
|
|
101
|
+
];
|
|
51
102
|
}
|
|
52
103
|
/**
|
|
53
104
|
* Create all tools configured for a specific working directory.
|
|
@@ -61,6 +112,14 @@ export function createAllTools(cwd, options) {
|
|
|
61
112
|
grep: createGrepTool(cwd),
|
|
62
113
|
find: createFindTool(cwd),
|
|
63
114
|
ls: createLsTool(cwd),
|
|
115
|
+
rg: createRgTool(cwd),
|
|
116
|
+
fd: createFdTool(cwd),
|
|
117
|
+
ast_grep: createAstGrepTool(cwd),
|
|
118
|
+
comby: createCombyTool(cwd),
|
|
119
|
+
jq: createJqTool(cwd),
|
|
120
|
+
yq: createYqTool(cwd),
|
|
121
|
+
semgrep: createSemgrepTool(cwd),
|
|
122
|
+
sed: createSedTool(cwd),
|
|
64
123
|
todo_write: todoWriteTool,
|
|
65
124
|
todo_read: todoReadTool,
|
|
66
125
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAON,QAAQ,EACR,cAAc,GACd,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,cAAc,EAKd,QAAQ,GACR,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,cAAc,EAKd,QAAQ,GACR,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,cAAc,EAKd,QAAQ,GACR,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,YAAY,EAKZ,MAAM,GACN,MAAM,SAAS,CAAC;AACjB,OAAO,EACN,cAAc,EAKd,QAAQ,GACR,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,iBAAiB,EACjB,iBAAiB,EACjB,UAAU,EAGV,YAAY,EACZ,YAAY,EACZ,YAAY,GACZ,MAAM,eAAe,CAAC;AACvB,OAAO,EACN,eAAe,EAIf,SAAS,GACT,MAAM,YAAY,CAAC;AAEpB,OAAO,EACN,mBAAmB,EACnB,kBAAkB,EAClB,aAAa,EACb,YAAY,EACZ,eAAe,GAKf,MAAM,WAAW,CAAC;AACnB,O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ACtB,CAAC","sourcesContent":["export {\n\ttype BashOperations,\n\ttype BashSpawnContext,\n\ttype BashSpawnHook,\n\ttype BashToolDetails,\n\ttype BashToolInput,\n\ttype BashToolOptions,\n\tbashTool,\n\tcreateBashTool,\n} from \"./bash.js\";\nexport {\n\tcreateEditTool,\n\ttype EditOperations,\n\ttype EditToolDetails,\n\ttype EditToolInput,\n\ttype EditToolOptions,\n\teditTool,\n} from \"./edit.js\";\nexport {\n\tcreateFindTool,\n\ttype FindOperations,\n\ttype FindToolDetails,\n\ttype FindToolInput,\n\ttype FindToolOptions,\n\tfindTool,\n} from \"./find.js\";\nexport {\n\tcreateGrepTool,\n\ttype GrepOperations,\n\ttype GrepToolDetails,\n\ttype GrepToolInput,\n\ttype GrepToolOptions,\n\tgrepTool,\n} from \"./grep.js\";\nexport {\n\tcreateLsTool,\n\ttype LsOperations,\n\ttype LsToolDetails,\n\ttype LsToolInput,\n\ttype LsToolOptions,\n\tlsTool,\n} from \"./ls.js\";\nexport {\n\tcreateReadTool,\n\ttype ReadOperations,\n\ttype ReadToolDetails,\n\ttype ReadToolInput,\n\ttype ReadToolOptions,\n\treadTool,\n} from \"./read.js\";\nexport {\n\tDEFAULT_MAX_BYTES,\n\tDEFAULT_MAX_LINES,\n\tformatSize,\n\ttype TruncationOptions,\n\ttype TruncationResult,\n\ttruncateHead,\n\ttruncateLine,\n\ttruncateTail,\n} from \"./truncate.js\";\nexport {\n\tcreateWriteTool,\n\ttype WriteOperations,\n\ttype WriteToolInput,\n\ttype WriteToolOptions,\n\twriteTool,\n} from \"./write.js\";\nexport { type ToolPermissionGuard, type ToolPermissionRequest } from \"./permissions.js\";\nexport {\n\tcreateTodoWriteTool,\n\tcreateTodoReadTool,\n\ttodoWriteTool,\n\ttodoReadTool,\n\tgetTaskFilePath,\n\ttype TodoTask,\n\ttype TodoTaskStatus,\n\ttype TodoWriteInput,\n\ttype TodoReadInput,\n} from \"./todo.js\";\nexport {\n\tcreateTaskTool,\n\ttype SubagentRunner,\n\ttype TaskToolProgress,\n\ttype TaskToolProgressPhase,\n\ttype TaskToolInput,\n\ttype TaskToolDetails,\n} from \"./task.js\";\n\nimport type { AgentTool } from \"@mariozechner/pi-agent-core\";\nimport { type BashToolOptions, bashTool, createBashTool } from \"./bash.js\";\nimport { createEditTool, type EditToolOptions, editTool } from \"./edit.js\";\nimport { createFindTool, findTool } from \"./find.js\";\nimport { createGrepTool, grepTool } from \"./grep.js\";\nimport { createLsTool, lsTool } from \"./ls.js\";\nimport { createReadTool, type ReadToolOptions, readTool } from \"./read.js\";\nimport { createWriteTool, type WriteToolOptions, writeTool } from \"./write.js\";\nimport { todoWriteTool, todoReadTool } from \"./todo.js\";\n\n/** Tool type (AgentTool from pi-ai) */\nexport type Tool = AgentTool<any>;\n\n// Default tools for full access mode (using process.cwd())\nexport const codingTools: Tool[] = [readTool, bashTool, editTool, writeTool];\n\n// Read-only tools for exploration without modification (using process.cwd())\nexport const readOnlyTools: Tool[] = [readTool, grepTool, findTool, lsTool];\n\n// All available tools (using process.cwd())\nexport const allTools = {\n\tread: readTool,\n\tbash: bashTool,\n\tedit: editTool,\n\twrite: writeTool,\n\tgrep: grepTool,\n\tfind: findTool,\n\tls: lsTool,\n\ttodo_write: todoWriteTool,\n\ttodo_read: todoReadTool,\n};\n\nexport type ToolName = keyof typeof allTools;\n\nexport interface ToolsOptions {\n\t/** Options for the read tool */\n\tread?: ReadToolOptions;\n\t/** Options for the bash tool */\n\tbash?: BashToolOptions;\n\t/** Options for the edit tool */\n\tedit?: EditToolOptions;\n\t/** Options for the write tool */\n\twrite?: WriteToolOptions;\n}\n\n/**\n * Create coding tools configured for a specific working directory.\n */\nexport function createCodingTools(cwd: string, options?: ToolsOptions): Tool[] {\n\treturn [\n\t\tcreateReadTool(cwd, options?.read),\n\t\tcreateBashTool(cwd, options?.bash),\n\t\tcreateEditTool(cwd, options?.edit),\n\t\tcreateWriteTool(cwd, options?.write),\n\t];\n}\n\n/**\n * Create read-only tools configured for a specific working directory.\n */\nexport function createReadOnlyTools(cwd: string, options?: ToolsOptions): Tool[] {\n\treturn [createReadTool(cwd, options?.read), createGrepTool(cwd), createFindTool(cwd), createLsTool(cwd)];\n}\n\n/**\n * Create all tools configured for a specific working directory.\n */\nexport function createAllTools(cwd: string, options?: ToolsOptions): Record<ToolName, Tool> {\n\treturn {\n\t\tread: createReadTool(cwd, options?.read),\n\t\tbash: createBashTool(cwd, options?.bash),\n\t\tedit: createEditTool(cwd, options?.edit),\n\t\twrite: createWriteTool(cwd, options?.write),\n\t\tgrep: createGrepTool(cwd),\n\t\tfind: createFindTool(cwd),\n\t\tls: createLsTool(cwd),\n\t\ttodo_write: todoWriteTool,\n\t\ttodo_read: todoReadTool,\n\t};\n}\n\n/**\n * Create a filtered set of tools from a list of tool names.\n * Used by agent profiles and the Task tool to configure subagent capabilities.\n */\nexport function createToolsFromNames(cwd: string, names: string[], options?: ToolsOptions): Tool[] {\n\tconst all = createAllTools(cwd, options);\n\treturn names\n\t\t.filter((n): n is ToolName => n in all)\n\t\t.map((n) => all[n]);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/tools/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,iBAAiB,EAEjB,WAAW,GACX,MAAM,eAAe,CAAC;AACvB,OAAO,EAON,QAAQ,EACR,cAAc,GACd,MAAM,WAAW,CAAC;AACnB,OAAO,EAEN,SAAS,EACT,eAAe,GACf,MAAM,YAAY,CAAC;AACpB,OAAO,EACN,cAAc,EAKd,QAAQ,GACR,MAAM,WAAW,CAAC;AACnB,OAAO,EAIN,qBAAqB,GACrB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACN,YAAY,EAEZ,MAAM,GACN,MAAM,SAAS,CAAC;AACjB,OAAO,EACN,cAAc,EAKd,QAAQ,GACR,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,cAAc,EAKd,QAAQ,GACR,MAAM,WAAW,CAAC;AACnB,OAAO,EACN,YAA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GAAG,CAAC;QACzB,EAAE,EAAE,YAAY,CAAC,GAAG,CAAC;QACrB,EAAE,EAAE,YAAY,CAAC,GAAG,CAAC;QACrB,EAAE,EAAE,YAAY,CAAC,GAAG,CAAC;QACrB,QAAQ,EAAE,iBAAiB,CAAC,GAAG,CAAC;QAChC,KAAK,EAAE,eAAe,CAAC,GAAG,CAAC;QAC3B,EAAE,EAAE,YAAY,CAAC,GAAG,CAAC;QACrB,EAAE,EAAE,YAAY,CAAC,GAAG,CAAC;QACrB,OAAO,EAAE,iBAAiB,CAAC,GAAG,CAAC;QAC/B,GAAG,EAAE,aAAa,CAAC,GAAG,CAAC;QACvB,UAAU,EAAE,aAAa;QACzB,SAAS,EAAE,YAAY;KACvB,CAAC;AACH,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,oBAAoB,CAAC,GAAW,EAAE,KAAe,EAAE,OAAsB;IACxF,MAAM,GAAG,GAAG,cAAc,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IACzC,OAAO,KAAK;SACV,MAAM,CAAC,CAAC,CAAC,EAAiB,EAAE,CAAC,CAAC,IAAI,GAAG,CAAC;SACtC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACtB,CAAC","sourcesContent":["export {\n\tcreateAstGrepTool,\n\ttype AstGrepToolInput,\n\tastGrepTool,\n} from \"./ast-grep.js\";\nexport {\n\ttype BashOperations,\n\ttype BashSpawnContext,\n\ttype BashSpawnHook,\n\ttype BashToolDetails,\n\ttype BashToolInput,\n\ttype BashToolOptions,\n\tbashTool,\n\tcreateBashTool,\n} from \"./bash.js\";\nexport {\n\ttype CombyToolInput,\n\tcombyTool,\n\tcreateCombyTool,\n} from \"./comby.js\";\nexport {\n\tcreateEditTool,\n\ttype EditOperations,\n\ttype EditToolDetails,\n\ttype EditToolInput,\n\ttype EditToolOptions,\n\teditTool,\n} from \"./edit.js\";\nexport {\n\ttype ExternalCliToolDetails,\n\ttype ExternalCliToolInput,\n\ttype ExternalCliToolOptions,\n\tcreateExternalCliTool,\n} from \"./external-cli.js\";\nexport {\n\tcreateFdTool,\n\ttype FdToolInput,\n\tfdTool,\n} from \"./fd.js\";\nexport {\n\tcreateFindTool,\n\ttype FindOperations,\n\ttype FindToolDetails,\n\ttype FindToolInput,\n\ttype FindToolOptions,\n\tfindTool,\n} from \"./find.js\";\nexport {\n\tcreateGrepTool,\n\ttype GrepOperations,\n\ttype GrepToolDetails,\n\ttype GrepToolInput,\n\ttype GrepToolOptions,\n\tgrepTool,\n} from \"./grep.js\";\nexport {\n\tcreateJqTool,\n\ttype JqToolInput,\n\tjqTool,\n} from \"./jq.js\";\nexport {\n\tcreateLsTool,\n\ttype LsOperations,\n\ttype LsToolDetails,\n\ttype LsToolInput,\n\ttype LsToolOptions,\n\tlsTool,\n} from \"./ls.js\";\nexport {\n\tcreateReadTool,\n\ttype ReadOperations,\n\ttype ReadToolDetails,\n\ttype ReadToolInput,\n\ttype ReadToolOptions,\n\treadTool,\n} from \"./read.js\";\nexport {\n\tcreateRgTool,\n\ttype RgToolInput,\n\trgTool,\n} from \"./rg.js\";\nexport {\n\tcreateSedTool,\n\ttype SedToolInput,\n\tsedTool,\n} from \"./sed.js\";\nexport {\n\tcreateSemgrepTool,\n\ttype SemgrepToolInput,\n\tsemgrepTool,\n} from \"./semgrep.js\";\nexport {\n\tDEFAULT_MAX_BYTES,\n\tDEFAULT_MAX_LINES,\n\tformatSize,\n\ttype TruncationOptions,\n\ttype TruncationResult,\n\ttruncateHead,\n\ttruncateLine,\n\ttruncateTail,\n} from \"./truncate.js\";\nexport {\n\tcreateWriteTool,\n\ttype WriteOperations,\n\ttype WriteToolInput,\n\ttype WriteToolOptions,\n\twriteTool,\n} from \"./write.js\";\nexport { type ToolPermissionGuard, type ToolPermissionRequest } from \"./permissions.js\";\nexport {\n\tcreateTodoWriteTool,\n\tcreateTodoReadTool,\n\ttodoWriteTool,\n\ttodoReadTool,\n\tgetTaskFilePath,\n\ttype TodoTask,\n\ttype TodoTaskStatus,\n\ttype TodoWriteInput,\n\ttype TodoReadInput,\n} from \"./todo.js\";\nexport {\n\tcreateYqTool,\n\ttype YqToolInput,\n\tyqTool,\n} from \"./yq.js\";\nexport {\n\tcreateTaskTool,\n\ttype SubagentRunner,\n\ttype TaskToolProgress,\n\ttype TaskToolProgressPhase,\n\ttype TaskToolInput,\n\ttype TaskToolDetails,\n} from \"./task.js\";\n\nimport type { AgentTool } from \"@mariozechner/pi-agent-core\";\nimport { astGrepTool, createAstGrepTool } from \"./ast-grep.js\";\nimport { type BashToolOptions, bashTool, createBashTool } from \"./bash.js\";\nimport { combyTool, createCombyTool } from \"./comby.js\";\nimport { createEditTool, type EditToolOptions, editTool } from \"./edit.js\";\nimport { createFdTool, fdTool } from \"./fd.js\";\nimport { createFindTool, findTool } from \"./find.js\";\nimport { createGrepTool, grepTool } from \"./grep.js\";\nimport { createJqTool, jqTool } from \"./jq.js\";\nimport { createLsTool, lsTool } from \"./ls.js\";\nimport { createReadTool, type ReadToolOptions, readTool } from \"./read.js\";\nimport { createRgTool, rgTool } from \"./rg.js\";\nimport { createSedTool, sedTool } from \"./sed.js\";\nimport { createSemgrepTool, semgrepTool } from \"./semgrep.js\";\nimport { createWriteTool, type WriteToolOptions, writeTool } from \"./write.js\";\nimport { createYqTool, yqTool } from \"./yq.js\";\nimport { todoWriteTool, todoReadTool } from \"./todo.js\";\n\n/** Tool type (AgentTool from pi-ai) */\nexport type Tool = AgentTool<any>;\n\n// Default tools for full access mode (using process.cwd())\nexport const codingTools: Tool[] = [readTool, bashTool, editTool, writeTool];\n\n// Read-only tools for exploration without modification (using process.cwd())\nexport const readOnlyTools: Tool[] = [\n\treadTool,\n\tgrepTool,\n\tfindTool,\n\tlsTool,\n\trgTool,\n\tfdTool,\n\tastGrepTool,\n\tcombyTool,\n\tjqTool,\n\tyqTool,\n\tsemgrepTool,\n\tsedTool,\n];\n\n// All available tools (using process.cwd())\nexport const allTools = {\n\tread: readTool,\n\tbash: bashTool,\n\tedit: editTool,\n\twrite: writeTool,\n\tgrep: grepTool,\n\tfind: findTool,\n\tls: lsTool,\n\trg: rgTool,\n\tfd: fdTool,\n\tast_grep: astGrepTool,\n\tcomby: combyTool,\n\tjq: jqTool,\n\tyq: yqTool,\n\tsemgrep: semgrepTool,\n\tsed: sedTool,\n\ttodo_write: todoWriteTool,\n\ttodo_read: todoReadTool,\n};\n\nexport type ToolName = keyof typeof allTools;\n\nexport interface ToolsOptions {\n\t/** Options for the read tool */\n\tread?: ReadToolOptions;\n\t/** Options for the bash tool */\n\tbash?: BashToolOptions;\n\t/** Options for the edit tool */\n\tedit?: EditToolOptions;\n\t/** Options for the write tool */\n\twrite?: WriteToolOptions;\n}\n\n/**\n * Create coding tools configured for a specific working directory.\n */\nexport function createCodingTools(cwd: string, options?: ToolsOptions): Tool[] {\n\treturn [\n\t\tcreateReadTool(cwd, options?.read),\n\t\tcreateBashTool(cwd, options?.bash),\n\t\tcreateEditTool(cwd, options?.edit),\n\t\tcreateWriteTool(cwd, options?.write),\n\t];\n}\n\n/**\n * Create read-only tools configured for a specific working directory.\n */\nexport function createReadOnlyTools(cwd: string, options?: ToolsOptions): Tool[] {\n\treturn [\n\t\tcreateReadTool(cwd, options?.read),\n\t\tcreateGrepTool(cwd),\n\t\tcreateFindTool(cwd),\n\t\tcreateLsTool(cwd),\n\t\tcreateRgTool(cwd),\n\t\tcreateFdTool(cwd),\n\t\tcreateAstGrepTool(cwd),\n\t\tcreateCombyTool(cwd),\n\t\tcreateJqTool(cwd),\n\t\tcreateYqTool(cwd),\n\t\tcreateSemgrepTool(cwd),\n\t\tcreateSedTool(cwd),\n\t];\n}\n\n/**\n * Create all tools configured for a specific working directory.\n */\nexport function createAllTools(cwd: string, options?: ToolsOptions): Record<ToolName, Tool> {\n\treturn {\n\t\tread: createReadTool(cwd, options?.read),\n\t\tbash: createBashTool(cwd, options?.bash),\n\t\tedit: createEditTool(cwd, options?.edit),\n\t\twrite: createWriteTool(cwd, options?.write),\n\t\tgrep: createGrepTool(cwd),\n\t\tfind: createFindTool(cwd),\n\t\tls: createLsTool(cwd),\n\t\trg: createRgTool(cwd),\n\t\tfd: createFdTool(cwd),\n\t\tast_grep: createAstGrepTool(cwd),\n\t\tcomby: createCombyTool(cwd),\n\t\tjq: createJqTool(cwd),\n\t\tyq: createYqTool(cwd),\n\t\tsemgrep: createSemgrepTool(cwd),\n\t\tsed: createSedTool(cwd),\n\t\ttodo_write: todoWriteTool,\n\t\ttodo_read: todoReadTool,\n\t};\n}\n\n/**\n * Create a filtered set of tools from a list of tool names.\n * Used by agent profiles and the Task tool to configure subagent capabilities.\n */\nexport function createToolsFromNames(cwd: string, names: string[], options?: ToolsOptions): Tool[] {\n\tconst all = createAllTools(cwd, options);\n\treturn names\n\t\t.filter((n): n is ToolName => n in all)\n\t\t.map((n) => all[n]);\n}\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { AgentTool } from "@mariozechner/pi-agent-core";
|
|
2
|
+
import type { Static } from "@sinclair/typebox";
|
|
3
|
+
import { externalCliSchema } from "./external-cli.js";
|
|
4
|
+
export type JqToolInput = Static<typeof externalCliSchema>;
|
|
5
|
+
export declare function createJqTool(cwd: string): AgentTool<typeof externalCliSchema>;
|
|
6
|
+
export declare const jqTool: AgentTool<import("@sinclair/typebox").TObject<{
|
|
7
|
+
args: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
8
|
+
path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
9
|
+
stdin: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
10
|
+
timeout: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
11
|
+
}>, any>;
|
|
12
|
+
//# sourceMappingURL=jq.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jq.d.ts","sourceRoot":"","sources":["../../../src/core/tools/jq.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAyB,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE7E,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE3D,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC,OAAO,iBAAiB,CAAC,CAQ7E;AAED,eAAO,MAAM,MAAM;;;;;QAA8B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createExternalCliTool } from "./external-cli.js";
|
|
2
|
+
export function createJqTool(cwd) {
|
|
3
|
+
return createExternalCliTool(cwd, {
|
|
4
|
+
name: "jq",
|
|
5
|
+
label: "jq",
|
|
6
|
+
description: "Run jq for JSON querying/transformation. Pass CLI arguments directly, optionally with stdin.",
|
|
7
|
+
commandCandidates: ["jq"],
|
|
8
|
+
missingInstallHint: "Install jq (brew install jq).",
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
export const jqTool = createJqTool(process.cwd());
|
|
12
|
+
//# sourceMappingURL=jq.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jq.js","sourceRoot":"","sources":["../../../src/core/tools/jq.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAqB,MAAM,mBAAmB,CAAC;AAI7E,MAAM,UAAU,YAAY,CAAC,GAAW;IACvC,OAAO,qBAAqB,CAAC,GAAG,EAAE;QACjC,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,IAAI;QACX,WAAW,EAAE,8FAA8F;QAC3G,iBAAiB,EAAE,CAAC,IAAI,CAAC;QACzB,kBAAkB,EAAE,+BAA+B;KACnD,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC","sourcesContent":["import type { AgentTool } from \"@mariozechner/pi-agent-core\";\nimport type { Static } from \"@sinclair/typebox\";\nimport { createExternalCliTool, externalCliSchema } from \"./external-cli.js\";\n\nexport type JqToolInput = Static<typeof externalCliSchema>;\n\nexport function createJqTool(cwd: string): AgentTool<typeof externalCliSchema> {\n\treturn createExternalCliTool(cwd, {\n\t\tname: \"jq\",\n\t\tlabel: \"jq\",\n\t\tdescription: \"Run jq for JSON querying/transformation. Pass CLI arguments directly, optionally with stdin.\",\n\t\tcommandCandidates: [\"jq\"],\n\t\tmissingInstallHint: \"Install jq (brew install jq).\",\n\t});\n}\n\nexport const jqTool = createJqTool(process.cwd());\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { AgentTool } from "@mariozechner/pi-agent-core";
|
|
2
|
+
import type { Static } from "@sinclair/typebox";
|
|
3
|
+
import { externalCliSchema } from "./external-cli.js";
|
|
4
|
+
export type RgToolInput = Static<typeof externalCliSchema>;
|
|
5
|
+
export declare function createRgTool(cwd: string): AgentTool<typeof externalCliSchema>;
|
|
6
|
+
export declare const rgTool: AgentTool<import("@sinclair/typebox").TObject<{
|
|
7
|
+
args: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
8
|
+
path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
9
|
+
stdin: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
10
|
+
timeout: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
11
|
+
}>, any>;
|
|
12
|
+
//# sourceMappingURL=rg.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rg.d.ts","sourceRoot":"","sources":["../../../src/core/tools/rg.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAyB,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE7E,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE3D,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC,OAAO,iBAAiB,CAAC,CAY7E;AAED,eAAO,MAAM,MAAM;;;;;QAA8B,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { createExternalCliTool } from "./external-cli.js";
|
|
2
|
+
export function createRgTool(cwd) {
|
|
3
|
+
return createExternalCliTool(cwd, {
|
|
4
|
+
name: "rg",
|
|
5
|
+
label: "rg",
|
|
6
|
+
description: "Run ripgrep directly for advanced regex search. Args are passed directly to rg (no shell interpolation). Exit code 1 (no matches) is treated as success.",
|
|
7
|
+
commandCandidates: ["rg"],
|
|
8
|
+
ensureManagedTool: "rg",
|
|
9
|
+
allowExitCodes: [0, 1],
|
|
10
|
+
emptyOutputMessage: "No matches found",
|
|
11
|
+
missingInstallHint: "Install ripgrep (rg) or allow iosm-cli to download managed binaries.",
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
export const rgTool = createRgTool(process.cwd());
|
|
15
|
+
//# sourceMappingURL=rg.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rg.js","sourceRoot":"","sources":["../../../src/core/tools/rg.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAqB,MAAM,mBAAmB,CAAC;AAI7E,MAAM,UAAU,YAAY,CAAC,GAAW;IACvC,OAAO,qBAAqB,CAAC,GAAG,EAAE;QACjC,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,IAAI;QACX,WAAW,EACV,0JAA0J;QAC3J,iBAAiB,EAAE,CAAC,IAAI,CAAC;QACzB,iBAAiB,EAAE,IAAI;QACvB,cAAc,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;QACtB,kBAAkB,EAAE,kBAAkB;QACtC,kBAAkB,EAAE,sEAAsE;KAC1F,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC","sourcesContent":["import type { AgentTool } from \"@mariozechner/pi-agent-core\";\nimport type { Static } from \"@sinclair/typebox\";\nimport { createExternalCliTool, externalCliSchema } from \"./external-cli.js\";\n\nexport type RgToolInput = Static<typeof externalCliSchema>;\n\nexport function createRgTool(cwd: string): AgentTool<typeof externalCliSchema> {\n\treturn createExternalCliTool(cwd, {\n\t\tname: \"rg\",\n\t\tlabel: \"rg\",\n\t\tdescription:\n\t\t\t\"Run ripgrep directly for advanced regex search. Args are passed directly to rg (no shell interpolation). Exit code 1 (no matches) is treated as success.\",\n\t\tcommandCandidates: [\"rg\"],\n\t\tensureManagedTool: \"rg\",\n\t\tallowExitCodes: [0, 1],\n\t\temptyOutputMessage: \"No matches found\",\n\t\tmissingInstallHint: \"Install ripgrep (rg) or allow iosm-cli to download managed binaries.\",\n\t});\n}\n\nexport const rgTool = createRgTool(process.cwd());\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { AgentTool } from "@mariozechner/pi-agent-core";
|
|
2
|
+
import type { Static } from "@sinclair/typebox";
|
|
3
|
+
import { externalCliSchema } from "./external-cli.js";
|
|
4
|
+
export type SedToolInput = Static<typeof externalCliSchema>;
|
|
5
|
+
export declare function createSedTool(cwd: string): AgentTool<typeof externalCliSchema>;
|
|
6
|
+
export declare const sedTool: AgentTool<import("@sinclair/typebox").TObject<{
|
|
7
|
+
args: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
8
|
+
path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
9
|
+
stdin: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
10
|
+
timeout: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
11
|
+
}>, any>;
|
|
12
|
+
//# sourceMappingURL=sed.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sed.d.ts","sourceRoot":"","sources":["../../../src/core/tools/sed.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAyB,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE7E,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC,OAAO,iBAAiB,CAAC,CAW9E;AAED,eAAO,MAAM,OAAO;;;;;QAA+B,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createExternalCliTool } from "./external-cli.js";
|
|
2
|
+
export function createSedTool(cwd) {
|
|
3
|
+
return createExternalCliTool(cwd, {
|
|
4
|
+
name: "sed",
|
|
5
|
+
label: "sed",
|
|
6
|
+
description: "Run sed for stream editing/extraction. In-place flags are blocked; use edit/write tools for persistent file changes.",
|
|
7
|
+
commandCandidates: ["sed"],
|
|
8
|
+
missingInstallHint: "Install GNU sed if unavailable (brew install gnu-sed).",
|
|
9
|
+
forbiddenArgs: ["-i", "--in-place"],
|
|
10
|
+
forbiddenArgPrefixes: ["-i"],
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
export const sedTool = createSedTool(process.cwd());
|
|
14
|
+
//# sourceMappingURL=sed.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sed.js","sourceRoot":"","sources":["../../../src/core/tools/sed.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAqB,MAAM,mBAAmB,CAAC;AAI7E,MAAM,UAAU,aAAa,CAAC,GAAW;IACxC,OAAO,qBAAqB,CAAC,GAAG,EAAE;QACjC,IAAI,EAAE,KAAK;QACX,KAAK,EAAE,KAAK;QACZ,WAAW,EACV,sHAAsH;QACvH,iBAAiB,EAAE,CAAC,KAAK,CAAC;QAC1B,kBAAkB,EAAE,wDAAwD;QAC5E,aAAa,EAAE,CAAC,IAAI,EAAE,YAAY,CAAC;QACnC,oBAAoB,EAAE,CAAC,IAAI,CAAC;KAC5B,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC","sourcesContent":["import type { AgentTool } from \"@mariozechner/pi-agent-core\";\nimport type { Static } from \"@sinclair/typebox\";\nimport { createExternalCliTool, externalCliSchema } from \"./external-cli.js\";\n\nexport type SedToolInput = Static<typeof externalCliSchema>;\n\nexport function createSedTool(cwd: string): AgentTool<typeof externalCliSchema> {\n\treturn createExternalCliTool(cwd, {\n\t\tname: \"sed\",\n\t\tlabel: \"sed\",\n\t\tdescription:\n\t\t\t\"Run sed for stream editing/extraction. In-place flags are blocked; use edit/write tools for persistent file changes.\",\n\t\tcommandCandidates: [\"sed\"],\n\t\tmissingInstallHint: \"Install GNU sed if unavailable (brew install gnu-sed).\",\n\t\tforbiddenArgs: [\"-i\", \"--in-place\"],\n\t\tforbiddenArgPrefixes: [\"-i\"],\n\t});\n}\n\nexport const sedTool = createSedTool(process.cwd());\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { AgentTool } from "@mariozechner/pi-agent-core";
|
|
2
|
+
import type { Static } from "@sinclair/typebox";
|
|
3
|
+
import { externalCliSchema } from "./external-cli.js";
|
|
4
|
+
export type SemgrepToolInput = Static<typeof externalCliSchema>;
|
|
5
|
+
export declare function createSemgrepTool(cwd: string): AgentTool<typeof externalCliSchema>;
|
|
6
|
+
export declare const semgrepTool: AgentTool<import("@sinclair/typebox").TObject<{
|
|
7
|
+
args: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
8
|
+
path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
9
|
+
stdin: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
10
|
+
timeout: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
11
|
+
}>, any>;
|
|
12
|
+
//# sourceMappingURL=semgrep.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"semgrep.d.ts","sourceRoot":"","sources":["../../../src/core/tools/semgrep.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAyB,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE7E,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAEhE,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC,OAAO,iBAAiB,CAAC,CAUlF;AAED,eAAO,MAAM,WAAW;;;;;QAAmC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createExternalCliTool } from "./external-cli.js";
|
|
2
|
+
export function createSemgrepTool(cwd) {
|
|
3
|
+
return createExternalCliTool(cwd, {
|
|
4
|
+
name: "semgrep",
|
|
5
|
+
label: "semgrep",
|
|
6
|
+
description: "Run semgrep for structural/static security analysis. Autofix flags are blocked; use edit/write tools for code changes.",
|
|
7
|
+
commandCandidates: ["semgrep"],
|
|
8
|
+
missingInstallHint: "Install semgrep (pipx install semgrep or pip install semgrep).",
|
|
9
|
+
forbiddenArgs: ["--fix", "--autofix"],
|
|
10
|
+
});
|
|
11
|
+
}
|
|
12
|
+
export const semgrepTool = createSemgrepTool(process.cwd());
|
|
13
|
+
//# sourceMappingURL=semgrep.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"semgrep.js","sourceRoot":"","sources":["../../../src/core/tools/semgrep.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAqB,MAAM,mBAAmB,CAAC;AAI7E,MAAM,UAAU,iBAAiB,CAAC,GAAW;IAC5C,OAAO,qBAAqB,CAAC,GAAG,EAAE;QACjC,IAAI,EAAE,SAAS;QACf,KAAK,EAAE,SAAS;QAChB,WAAW,EACV,wHAAwH;QACzH,iBAAiB,EAAE,CAAC,SAAS,CAAC;QAC9B,kBAAkB,EAAE,gEAAgE;QACpF,aAAa,EAAE,CAAC,OAAO,EAAE,WAAW,CAAC;KACrC,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,iBAAiB,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC","sourcesContent":["import type { AgentTool } from \"@mariozechner/pi-agent-core\";\nimport type { Static } from \"@sinclair/typebox\";\nimport { createExternalCliTool, externalCliSchema } from \"./external-cli.js\";\n\nexport type SemgrepToolInput = Static<typeof externalCliSchema>;\n\nexport function createSemgrepTool(cwd: string): AgentTool<typeof externalCliSchema> {\n\treturn createExternalCliTool(cwd, {\n\t\tname: \"semgrep\",\n\t\tlabel: \"semgrep\",\n\t\tdescription:\n\t\t\t\"Run semgrep for structural/static security analysis. Autofix flags are blocked; use edit/write tools for code changes.\",\n\t\tcommandCandidates: [\"semgrep\"],\n\t\tmissingInstallHint: \"Install semgrep (pipx install semgrep or pip install semgrep).\",\n\t\tforbiddenArgs: [\"--fix\", \"--autofix\"],\n\t});\n}\n\nexport const semgrepTool = createSemgrepTool(process.cwd());\n"]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { AgentTool } from "@mariozechner/pi-agent-core";
|
|
2
|
+
import type { Static } from "@sinclair/typebox";
|
|
3
|
+
import { externalCliSchema } from "./external-cli.js";
|
|
4
|
+
export type YqToolInput = Static<typeof externalCliSchema>;
|
|
5
|
+
export declare function createYqTool(cwd: string): AgentTool<typeof externalCliSchema>;
|
|
6
|
+
export declare const yqTool: AgentTool<import("@sinclair/typebox").TObject<{
|
|
7
|
+
args: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TArray<import("@sinclair/typebox").TString>>;
|
|
8
|
+
path: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
9
|
+
stdin: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TString>;
|
|
10
|
+
timeout: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TNumber>;
|
|
11
|
+
}>, any>;
|
|
12
|
+
//# sourceMappingURL=yq.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yq.d.ts","sourceRoot":"","sources":["../../../src/core/tools/yq.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAC7D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAyB,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE7E,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE3D,wBAAgB,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC,OAAO,iBAAiB,CAAC,CAQ7E;AAED,eAAO,MAAM,MAAM;;;;;QAA8B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createExternalCliTool } from "./external-cli.js";
|
|
2
|
+
export function createYqTool(cwd) {
|
|
3
|
+
return createExternalCliTool(cwd, {
|
|
4
|
+
name: "yq",
|
|
5
|
+
label: "yq",
|
|
6
|
+
description: "Run yq for YAML/JSON/TOML querying/transformation. Pass CLI arguments directly, optionally with stdin.",
|
|
7
|
+
commandCandidates: ["yq"],
|
|
8
|
+
missingInstallHint: "Install yq (brew install yq).",
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
export const yqTool = createYqTool(process.cwd());
|
|
12
|
+
//# sourceMappingURL=yq.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"yq.js","sourceRoot":"","sources":["../../../src/core/tools/yq.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAqB,MAAM,mBAAmB,CAAC;AAI7E,MAAM,UAAU,YAAY,CAAC,GAAW;IACvC,OAAO,qBAAqB,CAAC,GAAG,EAAE;QACjC,IAAI,EAAE,IAAI;QACV,KAAK,EAAE,IAAI;QACX,WAAW,EAAE,wGAAwG;QACrH,iBAAiB,EAAE,CAAC,IAAI,CAAC;QACzB,kBAAkB,EAAE,+BAA+B;KACnD,CAAC,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC","sourcesContent":["import type { AgentTool } from \"@mariozechner/pi-agent-core\";\nimport type { Static } from \"@sinclair/typebox\";\nimport { createExternalCliTool, externalCliSchema } from \"./external-cli.js\";\n\nexport type YqToolInput = Static<typeof externalCliSchema>;\n\nexport function createYqTool(cwd: string): AgentTool<typeof externalCliSchema> {\n\treturn createExternalCliTool(cwd, {\n\t\tname: \"yq\",\n\t\tlabel: \"yq\",\n\t\tdescription: \"Run yq for YAML/JSON/TOML querying/transformation. Pass CLI arguments directly, optionally with stdin.\",\n\t\tcommandCandidates: [\"yq\"],\n\t\tmissingInstallHint: \"Install yq (brew install yq).\",\n\t});\n}\n\nexport const yqTool = createYqTool(process.cwd());\n"]}
|
package/dist/index.d.ts
CHANGED
|
@@ -14,11 +14,11 @@ export type { PackageManager, PathMetadata, ProgressCallback, ProgressEvent, Res
|
|
|
14
14
|
export { DefaultPackageManager } from "./core/package-manager.js";
|
|
15
15
|
export type { ResourceCollision, ResourceDiagnostic, ResourceLoader } from "./core/resource-loader.js";
|
|
16
16
|
export { DefaultResourceLoader } from "./core/resource-loader.js";
|
|
17
|
-
export { type CreateAgentSessionOptions, type CreateAgentSessionResult, createAgentSession, createAskUserTool, createBashTool, createCodingTools, createEditTool, createFindTool, createGrepTool, createLsTool, createReadOnlyTools, createReadTool, createWriteTool, type PromptTemplate, readOnlyTools, } from "./core/sdk.js";
|
|
17
|
+
export { type CreateAgentSessionOptions, type CreateAgentSessionResult, createAgentSession, createAskUserTool, createBashTool, createCodingTools, createCombyTool, createEditTool, createFdTool, createFindTool, createGrepTool, createJqTool, createLsTool, createReadOnlyTools, createReadTool, createRgTool, createSedTool, createSemgrepTool, createAstGrepTool, createWriteTool, createYqTool, type PromptTemplate, readOnlyTools, } from "./core/sdk.js";
|
|
18
18
|
export { type BranchSummaryEntry, buildSessionContext, type CompactionEntry, CURRENT_SESSION_VERSION, type CustomEntry, type CustomMessageEntry, type FileEntry, getLatestCompactionEntry, type ModelChangeEntry, migrateSessionEntries, type NewSessionOptions, parseSessionEntries, type SessionContext, type SessionEntry, type SessionEntryBase, type SessionHeader, type SessionInfo, type SessionInfoEntry, SessionManager, type SessionMessageEntry, type ThinkingLevelChangeEntry, } from "./core/session-manager.js";
|
|
19
19
|
export { type CompactionSettings, type ImageSettings, type PackageSource, type RetrySettings, SettingsManager, } from "./core/settings-manager.js";
|
|
20
20
|
export { formatSkillsForPrompt, type LoadSkillsFromDirOptions, type LoadSkillsResult, loadSkills, loadSkillsFromDir, type Skill, type SkillFrontmatter, } from "./core/skills.js";
|
|
21
|
-
export { type BashOperations, type BashSpawnContext, type BashSpawnHook, type BashToolDetails, type BashToolInput, type BashToolOptions, bashTool, codingTools, DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, type EditOperations, type EditToolDetails, type EditToolInput, type EditToolOptions, editTool, type FindOperations, type FindToolDetails, type FindToolInput, type FindToolOptions, findTool, formatSize, type GrepOperations, type GrepToolDetails, type GrepToolInput, type GrepToolOptions, grepTool, type LsOperations, type LsToolDetails, type LsToolInput, type LsToolOptions, lsTool, type ReadOperations, type ReadToolDetails, type ReadToolInput, type ReadToolOptions, readTool, type ToolsOptions, type TruncationOptions, type TruncationResult, truncateHead, truncateLine, truncateTail, type WriteOperations, type WriteToolInput, type WriteToolOptions, writeTool, } from "./core/tools/index.js";
|
|
21
|
+
export { type BashOperations, type BashSpawnContext, type BashSpawnHook, type BashToolDetails, type BashToolInput, type BashToolOptions, type CombyToolInput, type AstGrepToolInput, type ExternalCliToolDetails, type ExternalCliToolInput, type ExternalCliToolOptions, type FdToolInput, type JqToolInput, type RgToolInput, type SedToolInput, type SemgrepToolInput, type YqToolInput, astGrepTool, bashTool, codingTools, combyTool, DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, type EditOperations, type EditToolDetails, type EditToolInput, type EditToolOptions, editTool, type FindOperations, type FindToolDetails, type FindToolInput, type FindToolOptions, fdTool, findTool, formatSize, type GrepOperations, type GrepToolDetails, type GrepToolInput, type GrepToolOptions, grepTool, jqTool, type LsOperations, type LsToolDetails, type LsToolInput, type LsToolOptions, lsTool, rgTool, type ReadOperations, type ReadToolDetails, type ReadToolInput, type ReadToolOptions, readTool, sedTool, semgrepTool, type ToolsOptions, type TruncationOptions, type TruncationResult, truncateHead, truncateLine, truncateTail, type WriteOperations, type WriteToolInput, type WriteToolOptions, writeTool, yqTool, createExternalCliTool, } from "./core/tools/index.js";
|
|
22
22
|
export { main } from "./main.js";
|
|
23
23
|
export { InteractiveMode, type InteractiveModeOptions, type PrintModeOptions, runPrintMode, runRpcMode, } from "./modes/index.js";
|
|
24
24
|
export { ArminComponent, AssistantMessageComponent, appKey, appKeyHint, BashExecutionComponent, BorderedLoader, BranchSummaryMessageComponent, CompactionSummaryMessageComponent, CustomEditor, CustomMessageComponent, DynamicBorder, ExtensionEditorComponent, ExtensionInputComponent, ExtensionSelectorComponent, editorKey, FooterComponent, keyHint, LoginDialogComponent, McpSelectorComponent, ModelSelectorComponent, OAuthSelectorComponent, type McpSelectorCallbacks, type RenderDiffOptions, rawKeyHint, renderDiff, SessionSelectorComponent, type SettingsCallbacks, type SettingsConfig, SettingsSelectorComponent, ShowImagesSelectorComponent, SkillInvocationMessageComponent, ThemeSelectorComponent, ThinkingSelectorComponent, ToolExecutionComponent, type ToolExecutionOptions, TreeSelectorComponent, truncateToVisualLines, UserMessageComponent, UserMessageSelectorComponent, type VisualTruncateResult, } from "./modes/interactive/components/index.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EACN,YAAY,EACZ,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,EACtB,KAAK,yBAAyB,EAC9B,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,eAAe,EACf,KAAK,YAAY,GACjB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EACN,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,WAAW,EACX,KAAK,kBAAkB,EACvB,sBAAsB,EACtB,0BAA0B,EAC1B,KAAK,eAAe,GACpB,MAAM,wBAAwB,CAAC;AAEhC,OAAO,EACN,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,sBAAsB,EACtB,8BAA8B,EAC9B,OAAO,EACP,2BAA2B,EAC3B,cAAc,EACd,KAAK,cAAc,EACnB,YAAY,EACZ,kBAAkB,EAClB,KAAK,4BAA4B,EACjC,qBAAqB,EACrB,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,aAAa,GACb,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,cAAc,EAAE,KAAK,QAAQ,EAAE,KAAK,kBAAkB,EAAE,MAAM,qBAAqB,C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AAe,EACf,KAAK,uBAAuB,EAC5B,KAAK,4BAA4B,EACjC,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,qBAAqB,EAC1B,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,gBAAgB,EACrB,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,8BAA8B,EAC9B,2BAA2B,EAC3B,gBAAgB,EAChB,YAAY,EACZ,KAAK,gBAAgB,EACrB,mBAAmB,EACnB,yBAAyB,EACzB,iBAAiB,EACjB,0BAA0B,EAC1B,eAAe,EACf,sBAAsB,EACtB,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,EACrB,2BAA2B,EAC3B,yBAAyB,EACzB,yBAAyB,EACzB,sBAAsB,EACtB,sBAAsB,EACtB,yBAAyB,EACzB,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,uBAAuB,EACvB,sBAAsB,EACtB,aAAa,EACb,sBAAsB,EACtB,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,GAClB,MAAM,iBAAiB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -18,7 +18,7 @@ export {
|
|
|
18
18
|
// Factory
|
|
19
19
|
createAgentSession, createAskUserTool, createBashTool,
|
|
20
20
|
// Tool factories (for custom cwd)
|
|
21
|
-
createCodingTools, createEditTool, createFindTool, createGrepTool, createLsTool, createReadOnlyTools, createReadTool, createWriteTool,
|
|
21
|
+
createCodingTools, createCombyTool, createEditTool, createFdTool, createFindTool, createGrepTool, createJqTool, createLsTool, createReadOnlyTools, createReadTool, createRgTool, createSedTool, createSemgrepTool, createAstGrepTool, createWriteTool, createYqTool,
|
|
22
22
|
// Pre-built tools (use process.cwd())
|
|
23
23
|
readOnlyTools, } from "./core/sdk.js";
|
|
24
24
|
export { buildSessionContext, CURRENT_SESSION_VERSION, getLatestCompactionEntry, migrateSessionEntries, parseSessionEntries, SessionManager, } from "./core/session-manager.js";
|
|
@@ -26,7 +26,7 @@ export { SettingsManager, } from "./core/settings-manager.js";
|
|
|
26
26
|
// Skills
|
|
27
27
|
export { formatSkillsForPrompt, loadSkills, loadSkillsFromDir, } from "./core/skills.js";
|
|
28
28
|
// Tools
|
|
29
|
-
export { bashTool, codingTools, DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, editTool, findTool, formatSize, grepTool, lsTool, readTool, truncateHead, truncateLine, truncateTail, writeTool, } from "./core/tools/index.js";
|
|
29
|
+
export { astGrepTool, bashTool, codingTools, combyTool, DEFAULT_MAX_BYTES, DEFAULT_MAX_LINES, editTool, fdTool, findTool, formatSize, grepTool, jqTool, lsTool, rgTool, readTool, sedTool, semgrepTool, truncateHead, truncateLine, truncateTail, writeTool, yqTool, createExternalCliTool, } from "./core/tools/index.js";
|
|
30
30
|
// Main entry point
|
|
31
31
|
export { main } from "./main.js";
|
|
32
32
|
// Run modes for programmatic SDK usage
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAE1B,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EACN,YAAY,EAOZ,eAAe,GAEf,MAAM,yBAAyB,CAAC;AACjC,0BAA0B;AAC1B,OAAO,EAGN,WAAW,EAEX,sBAAsB,EACtB,0BAA0B,GAE1B,MAAM,wBAAwB,CAAC;AAChC,aAAa;AACb,OAAO,EAMN,sBAAsB,EACtB,8BAA8B,EAC9B,OAAO,EACP,2BAA2B,EAC3B,cAAc,EAEd,YAAY,EACZ,kBAAkB,EAElB,qBAAqB,EACrB,eAAe,EACf,qBAAqB,EACrB,oB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O,EACN,qBAAqB,EACrB,gBAAgB,EAChB,2BAA2B,EAC3B,kBAAkB,EAClB,uCAAuC,EACvC,qBAAqB,EACrB,OAAO,EACP,kBAAkB,EAClB,eAAe,EAmBf,8BAA8B,EAC9B,2BAA2B,EAC3B,gBAAgB,EAChB,YAAY,EAEZ,mBAAmB,EACnB,yBAAyB,EACzB,iBAAiB,EACjB,0BAA0B,EAC1B,eAAe,EACf,sBAAsB,EACtB,gBAAgB,EAChB,sBAAsB,EACtB,qBAAqB,EACrB,2BAA2B,EAC3B,yBAAyB,EACzB,yBAAyB,EACzB,sBAAsB,EACtB,sBAAsB,EACtB,yBAAyB,EACzB,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,uBAAuB,EACvB,sBAAsB,EACtB,aAAa,EACb,sBAAsB,EACtB,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,GAClB,MAAM,iBAAiB,CAAC","sourcesContent":["// Core session management\n\n// Config paths\nexport { getAgentDir, VERSION } from \"./config.js\";\nexport {\n\tAgentSession,\n\ttype AgentSessionConfig,\n\ttype AgentSessionEvent,\n\ttype AgentSessionEventListener,\n\ttype ModelCycleResult,\n\ttype ParsedSkillBlock,\n\ttype PromptOptions,\n\tparseSkillBlock,\n\ttype SessionStats,\n} from \"./core/agent-session.js\";\n// Auth and model registry\nexport {\n\ttype ApiKeyCredential,\n\ttype AuthCredential,\n\tAuthStorage,\n\ttype AuthStorageBackend,\n\tFileAuthStorageBackend,\n\tInMemoryAuthStorageBackend,\n\ttype OAuthCredential,\n} from \"./core/auth-storage.js\";\n// Compaction\nexport {\n\ttype BranchPreparation,\n\ttype BranchSummaryResult,\n\ttype CollectEntriesResult,\n\ttype CompactionResult,\n\ttype CutPointResult,\n\tcalculateContextTokens,\n\tcollectEntriesForBranchSummary,\n\tcompact,\n\tDEFAULT_COMPACTION_SETTINGS,\n\testimateTokens,\n\ttype FileOperations,\n\tfindCutPoint,\n\tfindTurnStartIndex,\n\ttype GenerateBranchSummaryOptions,\n\tgenerateBranchSummary,\n\tgenerateSummary,\n\tgetLastAssistantUsage,\n\tprepareBranchEntries,\n\tserializeConversation,\n\tshouldCompact,\n} from \"./core/compaction/index.js\";\nexport { createEventBus, type EventBus, type EventBusController } from \"./core/event-bus.js\";\n// Extension system\nexport type {\n\tAgentEndEvent,\n\tAgentStartEvent,\n\tAgentToolResult,\n\tAgentToolUpdateCallback,\n\tAppAction,\n\tBashToolCallEvent,\n\tBeforeAgentStartEvent,\n\tCompactOptions,\n\tContextEvent,\n\tContextUsage,\n\tCustomToolCallEvent,\n\tEditToolCallEvent,\n\tExecOptions,\n\tExecResult,\n\tExtension,\n\tExtensionActions,\n\tExtensionAPI,\n\tExtensionCommandContext,\n\tExtensionCommandContextActions,\n\tExtensionContext,\n\tExtensionContextActions,\n\tExtensionError,\n\tExtensionEvent,\n\tExtensionFactory,\n\tExtensionFlag,\n\tExtensionHandler,\n\tExtensionRuntime,\n\tExtensionShortcut,\n\tExtensionUIContext,\n\tExtensionUIDialogOptions,\n\tExtensionWidgetOptions,\n\tFindToolCallEvent,\n\tGrepToolCallEvent,\n\tInputEvent,\n\tInputEventResult,\n\tInputSource,\n\tKeybindingsManager,\n\tLoadExtensionsResult,\n\tLsToolCallEvent,\n\tMessageRenderer,\n\tMessageRenderOptions,\n\tProviderConfig,\n\tProviderModelConfig,\n\tReadToolCallEvent,\n\tRegisteredCommand,\n\tRegisteredTool,\n\tSessionBeforeCompactEvent,\n\tSessionBeforeForkEvent,\n\tSessionBeforeSwitchEvent,\n\tSessionBeforeTreeEvent,\n\tSessionCompactEvent,\n\tSessionForkEvent,\n\tSessionShutdownEvent,\n\tSessionStartEvent,\n\tSessionSwitchEvent,\n\tSessionTreeEvent,\n\tSlashCommandInfo,\n\tSlashCommandLocation,\n\tSlashCommandSource,\n\tTerminalInputHandler,\n\tToolCallEvent,\n\tToolDefinition,\n\tToolInfo,\n\tToolRenderResultOptions,\n\tToolResultEvent,\n\tTurnEndEvent,\n\tTurnStartEvent,\n\tUserBashEvent,\n\tUserBashEventResult,\n\tWidgetPlacement,\n\tWriteToolCallEvent,\n} from \"./core/extensions/index.js\";\nexport {\n\tcreateExtensionRuntime,\n\tdiscoverAndLoadExtensions,\n\tExtensionRunner,\n\tisBashToolResult,\n\tisEditToolResult,\n\tisFindToolResult,\n\tisGrepToolResult,\n\tisLsToolResult,\n\tisReadToolResult,\n\tisToolCallEventType,\n\tisWriteToolResult,\n\twrapRegisteredTool,\n\twrapRegisteredTools,\n\twrapToolsWithExtensions,\n\twrapToolWithExtensions,\n} from \"./core/extensions/index.js\";\n// Footer data provider (git branch + extension statuses - data not otherwise available to extensions)\nexport type { ReadonlyFooterDataProvider } from \"./core/footer-data-provider.js\";\nexport { convertToLlm } from \"./core/messages.js\";\nexport {\n\tgetMcpCommandHelp,\n\tgetMcpConfigPath,\n\tgetMergedServerByName,\n\tloadMergedMcpConfig,\n\tMcpRuntime,\n\tparseMcpAddCommand,\n\tparseMcpTargetCommand,\n} from \"./core/mcp/index.js\";\nexport type {\n\tMcpConfigFile,\n\tMcpResolvedServerConfig,\n\tMcpScope,\n\tMcpScopeTarget,\n\tMcpServerConfig,\n\tMcpServerStatus,\n\tMcpTransport,\n} from \"./core/mcp/index.js\";\nexport { ModelRegistry } from \"./core/model-registry.js\";\nexport type {\n\tPackageManager,\n\tPathMetadata,\n\tProgressCallback,\n\tProgressEvent,\n\tResolvedPaths,\n\tResolvedResource,\n} from \"./core/package-manager.js\";\nexport { DefaultPackageManager } from \"./core/package-manager.js\";\nexport type { ResourceCollision, ResourceDiagnostic, ResourceLoader } from \"./core/resource-loader.js\";\nexport { DefaultResourceLoader } from \"./core/resource-loader.js\";\n// SDK for programmatic usage\nexport {\n\ttype CreateAgentSessionOptions,\n\ttype CreateAgentSessionResult,\n\t// Factory\n\tcreateAgentSession,\n\tcreateAskUserTool,\n\tcreateBashTool,\n\t// Tool factories (for custom cwd)\n\tcreateCodingTools,\n\tcreateEditTool,\n\tcreateFindTool,\n\tcreateGrepTool,\n\tcreateLsTool,\n\tcreateReadOnlyTools,\n\tcreateReadTool,\n\tcreateWriteTool,\n\ttype PromptTemplate,\n\t// Pre-built tools (use process.cwd())\n\treadOnlyTools,\n} from \"./core/sdk.js\";\nexport {\n\ttype BranchSummaryEntry,\n\tbuildSessionContext,\n\ttype CompactionEntry,\n\tCURRENT_SESSION_VERSION,\n\ttype CustomEntry,\n\ttype CustomMessageEntry,\n\ttype FileEntry,\n\tgetLatestCompactionEntry,\n\ttype ModelChangeEntry,\n\tmigrateSessionEntries,\n\ttype NewSessionOptions,\n\tparseSessionEntries,\n\ttype SessionContext,\n\ttype SessionEntry,\n\ttype SessionEntryBase,\n\ttype SessionHeader,\n\ttype SessionInfo,\n\ttype SessionInfoEntry,\n\tSessionManager,\n\ttype SessionMessageEntry,\n\ttype ThinkingLevelChangeEntry,\n} from \"./core/session-manager.js\";\nexport {\n\ttype CompactionSettings,\n\ttype ImageSettings,\n\ttype PackageSource,\n\ttype RetrySettings,\n\tSettingsManager,\n} from \"./core/settings-manager.js\";\n// Skills\nexport {\n\tformatSkillsForPrompt,\n\ttype LoadSkillsFromDirOptions,\n\ttype LoadSkillsResult,\n\tloadSkills,\n\tloadSkillsFromDir,\n\ttype Skill,\n\ttype SkillFrontmatter,\n} from \"./core/skills.js\";\n// Tools\nexport {\n\ttype BashOperations,\n\ttype BashSpawnContext,\n\ttype BashSpawnHook,\n\ttype BashToolDetails,\n\ttype BashToolInput,\n\ttype BashToolOptions,\n\tbashTool,\n\tcodingTools,\n\tDEFAULT_MAX_BYTES,\n\tDEFAULT_MAX_LINES,\n\ttype EditOperations,\n\ttype EditToolDetails,\n\ttype EditToolInput,\n\ttype EditToolOptions,\n\teditTool,\n\ttype FindOperations,\n\ttype FindToolDetails,\n\ttype FindToolInput,\n\ttype FindToolOptions,\n\tfindTool,\n\tformatSize,\n\ttype GrepOperations,\n\ttype GrepToolDetails,\n\ttype GrepToolInput,\n\ttype GrepToolOptions,\n\tgrepTool,\n\ttype LsOperations,\n\ttype LsToolDetails,\n\ttype LsToolInput,\n\ttype LsToolOptions,\n\tlsTool,\n\ttype ReadOperations,\n\ttype ReadToolDetails,\n\ttype ReadToolInput,\n\ttype ReadToolOptions,\n\treadTool,\n\ttype ToolsOptions,\n\ttype TruncationOptions,\n\ttype TruncationResult,\n\ttruncateHead,\n\ttruncateLine,\n\ttruncateTail,\n\ttype WriteOperations,\n\ttype WriteToolInput,\n\ttype WriteToolOptions,\n\twriteTool,\n} from \"./core/tools/index.js\";\n// Main entry point\nexport { main } from \"./main.js\";\n// Run modes for programmatic SDK usage\nexport {\n\tInteractiveMode,\n\ttype InteractiveModeOptions,\n\ttype PrintModeOptions,\n\trunPrintMode,\n\trunRpcMode,\n} from \"./modes/index.js\";\n// UI components for extensions\nexport {\n\tArminComponent,\n\tAssistantMessageComponent,\n\tappKey,\n\tappKeyHint,\n\tBashExecutionComponent,\n\tBorderedLoader,\n\tBranchSummaryMessageComponent,\n\tCompactionSummaryMessageComponent,\n\tCustomEditor,\n\tCustomMessageComponent,\n\tDynamicBorder,\n\tExtensionEditorComponent,\n\tExtensionInputComponent,\n\tExtensionSelectorComponent,\n\teditorKey,\n\tFooterComponent,\n\tkeyHint,\n\tLoginDialogComponent,\n\tMcpSelectorComponent,\n\tModelSelectorComponent,\n\tOAuthSelectorComponent,\n\ttype McpSelectorCallbacks,\n\ttype RenderDiffOptions,\n\trawKeyHint,\n\trenderDiff,\n\tSessionSelectorComponent,\n\ttype SettingsCallbacks,\n\ttype SettingsConfig,\n\tSettingsSelectorComponent,\n\tShowImagesSelectorComponent,\n\tSkillInvocationMessageComponent,\n\tThemeSelectorComponent,\n\tThinkingSelectorComponent,\n\tToolExecutionComponent,\n\ttype ToolExecutionOptions,\n\tTreeSelectorComponent,\n\ttruncateToVisualLines,\n\tUserMessageComponent,\n\tUserMessageSelectorComponent,\n\ttype VisualTruncateResult,\n} from \"./modes/interactive/components/index.js\";\n// Theme utilities for custom tools and extensions\nexport {\n\tgetLanguageFromPath,\n\tgetMarkdownTheme,\n\tgetSelectListTheme,\n\tgetSettingsListTheme,\n\thighlightCode,\n\tinitTheme,\n\tTheme,\n\ttype ThemeColor,\n} from \"./modes/interactive/theme/theme.js\";\n// Clipboard utilities\nexport { copyToClipboard } from \"./utils/clipboard.js\";\nexport { parseFrontmatter, stripFrontmatter } from \"./utils/frontmatter.js\";\n// Shell utilities\nexport { getShellConfig } from \"./utils/shell.js\";\n// IOSM helpers\nexport {\n\tassessDeclineCoverage,\n\tbuildCycleBudget,\n\tcalculateDecisionConfidence,\n\tcalculateIosmIndex,\n\tcalculateIosmMetricsFromRawMeasurements,\n\tcalculateMetricDeltas,\n\tclamp01,\n\tcreateMetricRecord,\n\tfindIosmRootDir,\n\ttype IosmCycleCapacityReport,\n\ttype IosmCycleHistoryRecordResult,\n\ttype IosmCycleListItem,\n\ttype IosmCycleReport,\n\ttype IosmCycleScope,\n\ttype IosmCycleStatus,\n\ttype IosmDecision,\n\ttype IosmEvidenceTier,\n\ttype IosmConfig,\n\ttype IosmConfigModel,\n\ttype IosmHypothesisCard,\n\ttype IosmHypothesisOutcome,\n\ttype IosmInitOptions,\n\ttype IosmInitResult,\n\ttype IosmMetric,\n\ttype IosmMetricRecord,\n\ttype IosmPhase,\n\ttype IosmPhaseReport,\n\thasCompleteNumericMetricRecord,\n\thasCompleteTierMetricRecord,\n\tinspectIosmCycle,\n\tIOSM_METRICS,\n\ttype PlannedIosmCycle,\n\tgetIosmBaselinesDir,\n\tgetIosmBaselineReportPath,\n\tgetIosmConfigPath,\n\tgetIosmContractCatalogPath,\n\tgetIosmCycleDir,\n\tgetIosmCycleReportPath,\n\tgetIosmCyclesDir,\n\tgetIosmDecisionLogPath,\n\tgetIosmHypothesesPath,\n\tgetIosmInvariantCatalogPath,\n\tgetIosmMetricsHistoryPath,\n\tgetIosmPatternLibraryPath,\n\tgetIosmPhaseReportPath,\n\tgetIosmPhaseReportsDir,\n\tgetIosmWaiverRegisterPath,\n\tgetIosmWorkspaceDir,\n\tinitIosmWorkspace,\n\tlistIosmCycles,\n\tloadIosmConfig,\n\tmergeMetricValues,\n\tnormalizeHigherIsBetter,\n\tnormalizeLowerIsBetter,\n\tplanIosmCycle,\n\trecordIosmCycleHistory,\n\treadIosmCycleReport,\n\tresolveIosmRootDir,\n\tvalidateGuardrails,\n} from \"./iosm/index.js\";\n"]}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,0BAA0B;AAE1B,eAAe;AACf,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EACN,YAAY,EAOZ,eAAe,GAEf,MAAM,yBAAyB,CAAC;AACjC,0BAA0B;AAC1B,OAAO,EAGN,WAAW,EAEX,sBAAsB,EACtB,0BAA0B,GAE1B,MAAM,wBAAwB,CAAC;AAChC,aAAa;AACb,OAAO,EAMN,sBAAsB,EACtB,8BAA8B,EAC9B,OAAO,EACP,2BAA2B,EAC3B,cAAc,EAEd,YAAY,EACZ,kBAAkB,EAElB,qBAAqB,EACrB,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,aAAa,GACb,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,cAAc,EAA0C,MAAM,qBAAqB,CAAC;AA2E7F,OAAO,EACN,sBAAsB,EACtB,yBAAyB,EACzB,eAAe,EACf,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,cAAc,EACd,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,uBAAuB,EACvB,sBAAsB,GACtB,MAAM,4BAA4B,CAAC;AAGpC,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EACN,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACrB,mBAAmB,EACnB,UAAU,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B,sBAAsB,EACtB,qBAAqB,EACrB,2BAA2B,EAC3B,yBAAyB,EACzB,yBAAyB,EACzB,sBAAsB,EACtB,sBAAsB,EACtB,yBAAyB,EACzB,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,uBAAuB,EACvB,sBAAsB,EACtB,aAAa,EACb,sBAAsB,EACtB,mBAAmB,EACnB,kBAAkB,EAClB,kBAAkB,GAClB,MAAM,iBAAiB,CAAC","sourcesContent":["// Core session management\n\n// Config paths\nexport { getAgentDir, VERSION } from \"./config.js\";\nexport {\n\tAgentSession,\n\ttype AgentSessionConfig,\n\ttype AgentSessionEvent,\n\ttype AgentSessionEventListener,\n\ttype ModelCycleResult,\n\ttype ParsedSkillBlock,\n\ttype PromptOptions,\n\tparseSkillBlock,\n\ttype SessionStats,\n} from \"./core/agent-session.js\";\n// Auth and model registry\nexport {\n\ttype ApiKeyCredential,\n\ttype AuthCredential,\n\tAuthStorage,\n\ttype AuthStorageBackend,\n\tFileAuthStorageBackend,\n\tInMemoryAuthStorageBackend,\n\ttype OAuthCredential,\n} from \"./core/auth-storage.js\";\n// Compaction\nexport {\n\ttype BranchPreparation,\n\ttype BranchSummaryResult,\n\ttype CollectEntriesResult,\n\ttype CompactionResult,\n\ttype CutPointResult,\n\tcalculateContextTokens,\n\tcollectEntriesForBranchSummary,\n\tcompact,\n\tDEFAULT_COMPACTION_SETTINGS,\n\testimateTokens,\n\ttype FileOperations,\n\tfindCutPoint,\n\tfindTurnStartIndex,\n\ttype GenerateBranchSummaryOptions,\n\tgenerateBranchSummary,\n\tgenerateSummary,\n\tgetLastAssistantUsage,\n\tprepareBranchEntries,\n\tserializeConversation,\n\tshouldCompact,\n} from \"./core/compaction/index.js\";\nexport { createEventBus, type EventBus, type EventBusController } from \"./core/event-bus.js\";\n// Extension system\nexport type {\n\tAgentEndEvent,\n\tAgentStartEvent,\n\tAgentToolResult,\n\tAgentToolUpdateCallback,\n\tAppAction,\n\tBashToolCallEvent,\n\tBeforeAgentStartEvent,\n\tCompactOptions,\n\tContextEvent,\n\tContextUsage,\n\tCustomToolCallEvent,\n\tEditToolCallEvent,\n\tExecOptions,\n\tExecResult,\n\tExtension,\n\tExtensionActions,\n\tExtensionAPI,\n\tExtensionCommandContext,\n\tExtensionCommandContextActions,\n\tExtensionContext,\n\tExtensionContextActions,\n\tExtensionError,\n\tExtensionEvent,\n\tExtensionFactory,\n\tExtensionFlag,\n\tExtensionHandler,\n\tExtensionRuntime,\n\tExtensionShortcut,\n\tExtensionUIContext,\n\tExtensionUIDialogOptions,\n\tExtensionWidgetOptions,\n\tFindToolCallEvent,\n\tGrepToolCallEvent,\n\tInputEvent,\n\tInputEventResult,\n\tInputSource,\n\tKeybindingsManager,\n\tLoadExtensionsResult,\n\tLsToolCallEvent,\n\tMessageRenderer,\n\tMessageRenderOptions,\n\tProviderConfig,\n\tProviderModelConfig,\n\tReadToolCallEvent,\n\tRegisteredCommand,\n\tRegisteredTool,\n\tSessionBeforeCompactEvent,\n\tSessionBeforeForkEvent,\n\tSessionBeforeSwitchEvent,\n\tSessionBeforeTreeEvent,\n\tSessionCompactEvent,\n\tSessionForkEvent,\n\tSessionShutdownEvent,\n\tSessionStartEvent,\n\tSessionSwitchEvent,\n\tSessionTreeEvent,\n\tSlashCommandInfo,\n\tSlashCommandLocation,\n\tSlashCommandSource,\n\tTerminalInputHandler,\n\tToolCallEvent,\n\tToolDefinition,\n\tToolInfo,\n\tToolRenderResultOptions,\n\tToolResultEvent,\n\tTurnEndEvent,\n\tTurnStartEvent,\n\tUserBashEvent,\n\tUserBashEventResult,\n\tWidgetPlacement,\n\tWriteToolCallEvent,\n} from \"./core/extensions/index.js\";\nexport {\n\tcreateExtensionRuntime,\n\tdiscoverAndLoadExtensions,\n\tExtensionRunner,\n\tisBashToolResult,\n\tisEditToolResult,\n\tisFindToolResult,\n\tisGrepToolResult,\n\tisLsToolResult,\n\tisReadToolResult,\n\tisToolCallEventType,\n\tisWriteToolResult,\n\twrapRegisteredTool,\n\twrapRegisteredTools,\n\twrapToolsWithExtensions,\n\twrapToolWithExtensions,\n} from \"./core/extensions/index.js\";\n// Footer data provider (git branch + extension statuses - data not otherwise available to extensions)\nexport type { ReadonlyFooterDataProvider } from \"./core/footer-data-provider.js\";\nexport { convertToLlm } from \"./core/messages.js\";\nexport {\n\tgetMcpCommandHelp,\n\tgetMcpConfigPath,\n\tgetMergedServerByName,\n\tloadMergedMcpConfig,\n\tMcpRuntime,\n\tparseMcpAddCommand,\n\tparseMcpTargetCommand,\n} from \"./core/mcp/index.js\";\nexport type {\n\tMcpConfigFile,\n\tMcpResolvedServerConfig,\n\tMcpScope,\n\tMcpScopeTarget,\n\tMcpServerConfig,\n\tMcpServerStatus,\n\tMcpTransport,\n} from \"./core/mcp/index.js\";\nexport { ModelRegistry } from \"./core/model-registry.js\";\nexport type {\n\tPackageManager,\n\tPathMetadata,\n\tProgressCallback,\n\tProgressEvent,\n\tResolvedPaths,\n\tResolvedResource,\n} from \"./core/package-manager.js\";\nexport { DefaultPackageManager } from \"./core/package-manager.js\";\nexport type { ResourceCollision, ResourceDiagnostic, ResourceLoader } from \"./core/resource-loader.js\";\nexport { DefaultResourceLoader } from \"./core/resource-loader.js\";\n// SDK for programmatic usage\nexport {\n\ttype CreateAgentSessionOptions,\n\ttype CreateAgentSessionResult,\n\t// Factory\n\tcreateAgentSession,\n\tcreateAskUserTool,\n\tcreateBashTool,\n\t// Tool factories (for custom cwd)\n\tcreateCodingTools,\n\tcreateCombyTool,\n\tcreateEditTool,\n\tcreateFdTool,\n\tcreateFindTool,\n\tcreateGrepTool,\n\tcreateJqTool,\n\tcreateLsTool,\n\tcreateReadOnlyTools,\n\tcreateReadTool,\n\tcreateRgTool,\n\tcreateSedTool,\n\tcreateSemgrepTool,\n\tcreateAstGrepTool,\n\tcreateWriteTool,\n\tcreateYqTool,\n\ttype PromptTemplate,\n\t// Pre-built tools (use process.cwd())\n\treadOnlyTools,\n} from \"./core/sdk.js\";\nexport {\n\ttype BranchSummaryEntry,\n\tbuildSessionContext,\n\ttype CompactionEntry,\n\tCURRENT_SESSION_VERSION,\n\ttype CustomEntry,\n\ttype CustomMessageEntry,\n\ttype FileEntry,\n\tgetLatestCompactionEntry,\n\ttype ModelChangeEntry,\n\tmigrateSessionEntries,\n\ttype NewSessionOptions,\n\tparseSessionEntries,\n\ttype SessionContext,\n\ttype SessionEntry,\n\ttype SessionEntryBase,\n\ttype SessionHeader,\n\ttype SessionInfo,\n\ttype SessionInfoEntry,\n\tSessionManager,\n\ttype SessionMessageEntry,\n\ttype ThinkingLevelChangeEntry,\n} from \"./core/session-manager.js\";\nexport {\n\ttype CompactionSettings,\n\ttype ImageSettings,\n\ttype PackageSource,\n\ttype RetrySettings,\n\tSettingsManager,\n} from \"./core/settings-manager.js\";\n// Skills\nexport {\n\tformatSkillsForPrompt,\n\ttype LoadSkillsFromDirOptions,\n\ttype LoadSkillsResult,\n\tloadSkills,\n\tloadSkillsFromDir,\n\ttype Skill,\n\ttype SkillFrontmatter,\n} from \"./core/skills.js\";\n// Tools\nexport {\n\ttype BashOperations,\n\ttype BashSpawnContext,\n\ttype BashSpawnHook,\n\ttype BashToolDetails,\n\ttype BashToolInput,\n\ttype BashToolOptions,\n\ttype CombyToolInput,\n\ttype AstGrepToolInput,\n\ttype ExternalCliToolDetails,\n\ttype ExternalCliToolInput,\n\ttype ExternalCliToolOptions,\n\ttype FdToolInput,\n\ttype JqToolInput,\n\ttype RgToolInput,\n\ttype SedToolInput,\n\ttype SemgrepToolInput,\n\ttype YqToolInput,\n\tastGrepTool,\n\tbashTool,\n\tcodingTools,\n\tcombyTool,\n\tDEFAULT_MAX_BYTES,\n\tDEFAULT_MAX_LINES,\n\ttype EditOperations,\n\ttype EditToolDetails,\n\ttype EditToolInput,\n\ttype EditToolOptions,\n\teditTool,\n\ttype FindOperations,\n\ttype FindToolDetails,\n\ttype FindToolInput,\n\ttype FindToolOptions,\n\tfdTool,\n\tfindTool,\n\tformatSize,\n\ttype GrepOperations,\n\ttype GrepToolDetails,\n\ttype GrepToolInput,\n\ttype GrepToolOptions,\n\tgrepTool,\n\tjqTool,\n\ttype LsOperations,\n\ttype LsToolDetails,\n\ttype LsToolInput,\n\ttype LsToolOptions,\n\tlsTool,\n\trgTool,\n\ttype ReadOperations,\n\ttype ReadToolDetails,\n\ttype ReadToolInput,\n\ttype ReadToolOptions,\n\treadTool,\n\tsedTool,\n\tsemgrepTool,\n\ttype ToolsOptions,\n\ttype TruncationOptions,\n\ttype TruncationResult,\n\ttruncateHead,\n\ttruncateLine,\n\ttruncateTail,\n\ttype WriteOperations,\n\ttype WriteToolInput,\n\ttype WriteToolOptions,\n\twriteTool,\n\tyqTool,\n\tcreateExternalCliTool,\n} from \"./core/tools/index.js\";\n// Main entry point\nexport { main } from \"./main.js\";\n// Run modes for programmatic SDK usage\nexport {\n\tInteractiveMode,\n\ttype InteractiveModeOptions,\n\ttype PrintModeOptions,\n\trunPrintMode,\n\trunRpcMode,\n} from \"./modes/index.js\";\n// UI components for extensions\nexport {\n\tArminComponent,\n\tAssistantMessageComponent,\n\tappKey,\n\tappKeyHint,\n\tBashExecutionComponent,\n\tBorderedLoader,\n\tBranchSummaryMessageComponent,\n\tCompactionSummaryMessageComponent,\n\tCustomEditor,\n\tCustomMessageComponent,\n\tDynamicBorder,\n\tExtensionEditorComponent,\n\tExtensionInputComponent,\n\tExtensionSelectorComponent,\n\teditorKey,\n\tFooterComponent,\n\tkeyHint,\n\tLoginDialogComponent,\n\tMcpSelectorComponent,\n\tModelSelectorComponent,\n\tOAuthSelectorComponent,\n\ttype McpSelectorCallbacks,\n\ttype RenderDiffOptions,\n\trawKeyHint,\n\trenderDiff,\n\tSessionSelectorComponent,\n\ttype SettingsCallbacks,\n\ttype SettingsConfig,\n\tSettingsSelectorComponent,\n\tShowImagesSelectorComponent,\n\tSkillInvocationMessageComponent,\n\tThemeSelectorComponent,\n\tThinkingSelectorComponent,\n\tToolExecutionComponent,\n\ttype ToolExecutionOptions,\n\tTreeSelectorComponent,\n\ttruncateToVisualLines,\n\tUserMessageComponent,\n\tUserMessageSelectorComponent,\n\ttype VisualTruncateResult,\n} from \"./modes/interactive/components/index.js\";\n// Theme utilities for custom tools and extensions\nexport {\n\tgetLanguageFromPath,\n\tgetMarkdownTheme,\n\tgetSelectListTheme,\n\tgetSettingsListTheme,\n\thighlightCode,\n\tinitTheme,\n\tTheme,\n\ttype ThemeColor,\n} from \"./modes/interactive/theme/theme.js\";\n// Clipboard utilities\nexport { copyToClipboard } from \"./utils/clipboard.js\";\nexport { parseFrontmatter, stripFrontmatter } from \"./utils/frontmatter.js\";\n// Shell utilities\nexport { getShellConfig } from \"./utils/shell.js\";\n// IOSM helpers\nexport {\n\tassessDeclineCoverage,\n\tbuildCycleBudget,\n\tcalculateDecisionConfidence,\n\tcalculateIosmIndex,\n\tcalculateIosmMetricsFromRawMeasurements,\n\tcalculateMetricDeltas,\n\tclamp01,\n\tcreateMetricRecord,\n\tfindIosmRootDir,\n\ttype IosmCycleCapacityReport,\n\ttype IosmCycleHistoryRecordResult,\n\ttype IosmCycleListItem,\n\ttype IosmCycleReport,\n\ttype IosmCycleScope,\n\ttype IosmCycleStatus,\n\ttype IosmDecision,\n\ttype IosmEvidenceTier,\n\ttype IosmConfig,\n\ttype IosmConfigModel,\n\ttype IosmHypothesisCard,\n\ttype IosmHypothesisOutcome,\n\ttype IosmInitOptions,\n\ttype IosmInitResult,\n\ttype IosmMetric,\n\ttype IosmMetricRecord,\n\ttype IosmPhase,\n\ttype IosmPhaseReport,\n\thasCompleteNumericMetricRecord,\n\thasCompleteTierMetricRecord,\n\tinspectIosmCycle,\n\tIOSM_METRICS,\n\ttype PlannedIosmCycle,\n\tgetIosmBaselinesDir,\n\tgetIosmBaselineReportPath,\n\tgetIosmConfigPath,\n\tgetIosmContractCatalogPath,\n\tgetIosmCycleDir,\n\tgetIosmCycleReportPath,\n\tgetIosmCyclesDir,\n\tgetIosmDecisionLogPath,\n\tgetIosmHypothesesPath,\n\tgetIosmInvariantCatalogPath,\n\tgetIosmMetricsHistoryPath,\n\tgetIosmPatternLibraryPath,\n\tgetIosmPhaseReportPath,\n\tgetIosmPhaseReportsDir,\n\tgetIosmWaiverRegisterPath,\n\tgetIosmWorkspaceDir,\n\tinitIosmWorkspace,\n\tlistIosmCycles,\n\tloadIosmConfig,\n\tmergeMetricValues,\n\tnormalizeHigherIsBetter,\n\tnormalizeLowerIsBetter,\n\tplanIosmCycle,\n\trecordIosmCycleHistory,\n\treadIosmCycleReport,\n\tresolveIosmRootDir,\n\tvalidateGuardrails,\n} from \"./iosm/index.js\";\n"]}
|