zeitlich 0.2.0 → 0.2.1
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/README.md +3 -0
- package/dist/index.cjs +29 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +29 -6
- package/dist/index.js.map +1 -1
- package/dist/{workflow-uVNF7zoe.d.cts → workflow-CCoHnc3B.d.cts} +4 -2
- package/dist/{workflow-uVNF7zoe.d.ts → workflow-CCoHnc3B.d.ts} +4 -2
- package/dist/workflow.cjs +19 -3
- package/dist/workflow.cjs.map +1 -1
- package/dist/workflow.d.cts +1 -1
- package/dist/workflow.d.ts +1 -1
- package/dist/workflow.js +19 -3
- package/dist/workflow.js.map +1 -1
- package/package.json +6 -7
- package/src/tools/bash/bash.test.ts +11 -11
- package/src/tools/bash/handler.ts +14 -5
- package/src/tools/bash/tool.ts +19 -3
- package/tsup.config.ts +3 -1
package/README.md
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
[](https://www.npmjs.org/package/zeitlich)
|
|
2
|
+
[](https://npm-stat.com/charts.html?package=zeitlich)
|
|
3
|
+
|
|
1
4
|
# Zeitlich
|
|
2
5
|
|
|
3
6
|
> **⚠️ Experimental Beta**: This library is under active development. APIs and interfaces may change between versions. Use in production at your own risk.
|
package/dist/index.cjs
CHANGED
|
@@ -81,12 +81,28 @@ function createTaskHandler(subagents) {
|
|
|
81
81
|
}
|
|
82
82
|
var createBashToolDescription = ({
|
|
83
83
|
fileTree
|
|
84
|
-
}) => `
|
|
84
|
+
}) => `Execute shell commands in a bash environment.
|
|
85
|
+
|
|
86
|
+
Use this tool to:
|
|
87
|
+
- Run shell commands (ls, cat, grep, find, etc.)
|
|
88
|
+
- Execute scripts and chain commands with pipes (|) or logical operators (&&, ||)
|
|
89
|
+
- Inspect files and directories
|
|
90
|
+
|
|
91
|
+
Current file tree:
|
|
92
|
+
${fileTree}`;
|
|
85
93
|
var bashTool = {
|
|
86
94
|
name: "Bash",
|
|
87
|
-
description:
|
|
95
|
+
description: `Execute shell commands in a sandboxed bash environment.
|
|
96
|
+
|
|
97
|
+
Use this tool to:
|
|
98
|
+
- Run shell commands (ls, cat, grep, find, etc.)
|
|
99
|
+
- Execute scripts and chain commands with pipes (|) or logical operators (&&, ||)
|
|
100
|
+
- Inspect files and directories
|
|
101
|
+
`,
|
|
88
102
|
schema: z4__default.default.object({
|
|
89
|
-
command: z4__default.default.string().describe(
|
|
103
|
+
command: z4__default.default.string().describe(
|
|
104
|
+
"The bash command to execute. Can include pipes (|), redirects (>, >>), logical operators (&&, ||), and shell features like command substitution $(...)."
|
|
105
|
+
)
|
|
90
106
|
}),
|
|
91
107
|
strict: true
|
|
92
108
|
};
|
|
@@ -1190,10 +1206,17 @@ async function editHandler(args, fs) {
|
|
|
1190
1206
|
};
|
|
1191
1207
|
}
|
|
1192
1208
|
}
|
|
1193
|
-
var handleBashTool = (
|
|
1209
|
+
var handleBashTool = (bashOptions) => async (args, _context) => {
|
|
1194
1210
|
const { command } = args;
|
|
1195
|
-
const
|
|
1196
|
-
|
|
1211
|
+
const mergedOptions = {
|
|
1212
|
+
...bashOptions,
|
|
1213
|
+
executionLimits: {
|
|
1214
|
+
maxStringLength: 52428800,
|
|
1215
|
+
// 50MB default
|
|
1216
|
+
...bashOptions.executionLimits
|
|
1217
|
+
}
|
|
1218
|
+
};
|
|
1219
|
+
const bash = new justBash.Bash(mergedOptions);
|
|
1197
1220
|
try {
|
|
1198
1221
|
const { exitCode, stderr, stdout } = await bash.exec(command);
|
|
1199
1222
|
const bashExecOut = { exitCode, stderr, stdout };
|