flowent 0.2.2 → 0.2.3
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/backend/pyproject.toml +1 -1
- package/backend/src/flowent/agent.py +1 -0
- package/backend/src/flowent/context.py +2 -0
- package/backend/src/flowent/llm.py +9 -4
- package/backend/src/flowent/main.py +227 -16
- package/backend/src/flowent/permissions.py +5 -2
- package/backend/src/flowent/shell.py +94 -0
- package/backend/src/flowent/static/assets/{index-Bz76A4EJ.js → index-D7t9qNrC.js} +8 -8
- package/backend/src/flowent/static/index.html +1 -1
- package/backend/src/flowent/tools.py +5 -2
- package/backend/uv.lock +1 -1
- package/dist/frontend/assets/{index-Bz76A4EJ.js → index-D7t9qNrC.js} +8 -8
- package/dist/frontend/index.html +1 -1
- package/package.json +1 -1
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
7
|
<title>Flowent</title>
|
|
8
8
|
<meta name="description" content="Flowent application" />
|
|
9
|
-
<script type="module" crossorigin src="/assets/index-
|
|
9
|
+
<script type="module" crossorigin src="/assets/index-D7t9qNrC.js"></script>
|
|
10
10
|
<link rel="stylesheet" crossorigin href="/assets/index-DufpDl8x.css">
|
|
11
11
|
</head>
|
|
12
12
|
<body>
|
|
@@ -15,6 +15,7 @@ from pydantic import BaseModel, ConfigDict
|
|
|
15
15
|
|
|
16
16
|
from flowent.patch import affected_paths
|
|
17
17
|
from flowent.sandbox import SandboxError, SandboxRunner
|
|
18
|
+
from flowent.shell import shell_invocation
|
|
18
19
|
|
|
19
20
|
|
|
20
21
|
class ToolResult(BaseModel):
|
|
@@ -380,8 +381,9 @@ def tool_failure_content(result: object) -> str:
|
|
|
380
381
|
def shell_command(arguments: dict[str, object], context: ToolContext) -> ToolResult:
|
|
381
382
|
command = str(arguments["command"])
|
|
382
383
|
timeout_seconds = number_argument(arguments, "timeout_seconds", 30)
|
|
384
|
+
invocation = shell_invocation(command)
|
|
383
385
|
result = SandboxRunner(cwd=context.cwd).run(
|
|
384
|
-
|
|
386
|
+
invocation.args, env=invocation.env, timeout_seconds=timeout_seconds
|
|
385
387
|
)
|
|
386
388
|
ok = result.exit_code == 0
|
|
387
389
|
content = result.stdout or result.stderr
|
|
@@ -403,8 +405,9 @@ async def shell_command_async(
|
|
|
403
405
|
) -> ToolResult:
|
|
404
406
|
command = str(arguments["command"])
|
|
405
407
|
timeout_seconds = number_argument(arguments, "timeout_seconds", 30)
|
|
408
|
+
invocation = shell_invocation(command)
|
|
406
409
|
result = await SandboxRunner(cwd=context.cwd).run_async(
|
|
407
|
-
|
|
410
|
+
invocation.args, env=invocation.env, timeout_seconds=timeout_seconds
|
|
408
411
|
)
|
|
409
412
|
ok = result.exit_code == 0
|
|
410
413
|
content = result.stdout or result.stderr
|