23 Commits
Author SHA1 Message Date
linkliti e4b79fb5c5 feat(tools): expose tool_step_description hook for streamed step text
The response_stream log extension hardcoded one tool name to build the step label beside a streamed call. The label now comes from build_step_description, which seeds the generic text from the humanized tool name (underscores as spaces) and dispatches a display-only tool_step_description hook plugins rewrite, with the compact serialized args length appended centrally after the chain so argument streaming stays visible.

Validation: pytest tests/test_tool_step_description.py (14 passed), tests/test_plain_response_logging.py (18 passed), tests/test_response_stream_cadence.py (3 passed)
2026-11-28 13:35:54 +03:00
Jan Tomášek 7dab0f7b6f Improve sandbox defaults and terminal sessions 2026-11-22 10:47:13 +01:00
Jan Tomášek c32314770c Build the slim v3 image and publish tagged multi-architecture previews 2026-11-19 17:49:23 +00:00
Jan Tomášek 0fa1a85261 Unify agent execution and file destinations 2026-11-19 16:50:34 +00:00
Alessandro Frau df506015a8 Merge branch 'ready' into v3
Keep the v3 browser and filesystem observer implementations. Restore secure Telegram project and agent-profile scopes on the v3 sandboxed transport, including migration, session ownership, and current authorization checks.
2026-11-19 15:53:46 +01:00
Jan Tomášek 969905872d Default development to sandboxes and scan plugin dependency placement 2026-11-19 14:06:02 +00:00
Alessandro e824cf5d99 Fix chat loading for malformed code execution arguments
Reuse the existing command text conversion before building execution
titles so rejected non-string arguments no longer abort streamed
rendering or saved-chat replay. Preserve original log arguments and
normal command copying and output.

Add regressions for malformed arguments in both delivery paths and
document the renderer contract.

Validation: 71 focused tests passed; both previously affected DeepSeek
chats reopened and reloaded with zero browser console errors.
2026-11-10 17:57:51 +01:00
Jan Tomášek 188cff2073 Move optional runtimes into persistent gVisor plugin sandboxes
Move tunnel, browser, document, speech and integration runtimes into plugin-owned
sandboxes with lazy dependencies and instance-scoped lifecycle management.
Reuse Tuxee display assets and the sandbox image's Python/Node runtimes, enable
automatic Desktop login, and show elapsed time for each browser launch.

Slim the outer image, use offline ONNX embeddings, and calculate sandbox storage
only on demand. Include regression coverage and updated runtime documentation.
Exclude local handoff notes and temporary verification artifacts from publication.
2026-11-08 21:43:22 +01:00
Jan Tomášek dadcbfa4d9 Reconstruct preserved sandbox WIP from sanitized source snapshot
Reconstructed against verified original base 93d1131ce1. Original local commits and index metadata were not present in the transfer.
2026-11-08 21:42:13 +01:00
DZH166 5fb00bd909 fix(code-execution): reject non-string code before shell dispatch 2026-11-03 00:29:20 +08:00
Alessandro c7c733ec04 Copy full execution commands while keeping compact previews
Restore matching command previews from the stored, masked command when
copying execution output or opening step details. Preserve command
whitespace and the output body while keeping the chat preview compact
and retaining existing log size limits.

Cover Bash, PowerShell, Python and Node.js prefixes, streamed updates,
masked placeholders and output without a matching command preview.

Validation: 48 focused WebUI tests passed, git diff --check passed, and
an actual browser clipboard check passed using frontend assets served
by the live instance at localhost:32081.
2026-11-01 07:16:55 +01:00
linkliti ad02938ce9 feat(tools): drop agent prefix from tool log headlines
The subordinate, unknown, MCP, and generic fallback tool log headlines no longer repeat the agent name. The unknown tool inherits the prefix-free base heading and takes the class-level blank line used by sibling tools, MCP keeps the tool name visible as an argument row, parallel children without a resolvable dedicated tool log through the prefix-free fallback, and the input and text editor fallback headings drop the prefix too. Framework helper DOX and both plugin AGENTS files document the prefix-free fallback rows, and regression tests cover the named headings for method and no-method calls, the generic fallback rows, and source guards for the plugin fallbacks.

Validation: pytest tests/test_tool_heading_prefixes.py tests/test_text_editor_message_handler.py tests/test_parallel_tool.py
2026-10-21 23:37:32 +03:00
Alessandro ad5bebbea5 Send complete SSH commands without blocking the event loop
Paramiko Channel.send can accept only part of a command. Ignoring its byte
count truncated large inputs, including heredocs whose closing delimiters
never reached the shell.

Use sendall through asyncio.to_thread and route shell initialization through
the same send path. Close the SSH connection when an in-flight send is
cancelled so partial input cannot contaminate later commands. Cancellation
intentionally discards that SSH session and its shell state.

Add regressions for multi-packet Unicode delivery and blocked-window
responsiveness/cancellation, and document the SSH send contract.

Validation: 24 focused tests passed. Real Paramiko transport and container
OpenSSH probes delivered complete large single/nested heredocs and preserved
shell state across terminal, Python and Node.js calls. No local TTY, prompt
readiness, tool-dispatch, or platform-specific heredoc workaround changes.
2026-10-06 18:49:30 +02:00
Alessandro 95ba588abc Fix native Windows TTY cleanup
Choose graceful or forced termination inside the existing process helper so
Windows never evaluates the POSIX-only SIGKILL constant. Pass SIGTERM to
pywinpty.kill(), whose native API requires an explicit signal argument.
Keep POSIX process-group TERM-then-KILL escalation and cleanup unchanged.

Cover normal close, forced escalation, kill, and destructor cleanup with a
Windows-shaped process adapter. All 22 focused TTY/pager tests pass, and a
native Windows 11 probe verifies state preservation, destructor termination,
fresh-shell close, and normal asyncio shutdown.
2026-10-06 18:49:30 +02:00
Alessandro c58061f0ee Keep terminal I/O from blocking shared event loops
Use nonblocking POSIX PTY reads and buffered, cooperative writes so a full
terminal or stale readiness notification cannot stall other chats. Discard
a shell on cancellation only while command bytes remain unsent, preserving
shell state after a fully drained send.

Use best-effort synchronous destruction instead of reentering asyncio;
explicit close retains the existing awaited cleanup and signal escalation.

Add isolated regression checks for payload integrity, loop responsiveness,
partial and complete-send cancellation, descriptor reuse, cross-thread
cleanup, and destruction. Document the terminal lifecycle contracts.

Validation: 28 focused terminal, parallel-lifetime, and pager tests passed.
Four real Codex II chats also completed concurrent Linux terminal, Python,
and Node workloads with 29.87 seconds of overlap and intact shell state.
2026-10-06 18:49:30 +02:00
Alessandro ab88f87b6f Fix flashing process groups during memory search
Text Editor logs rendered as process steps but were missing from raw-log
classification, allowing a following hidden utility message to hide the
whole group. Let plugins register process-step types through the existing
extension system and use those types for grouping and paging.

Preserve the generic tool-step fallback by classifying types that select
that renderer before merging logs. Document the custom handler contract
in the bundled plugin authoring skill.

Validated with 46 targeted tests and live desktop/mobile rendering checks,
including disabled plugins, fallback types, paging, and chat-switch races.
2026-09-16 16:17:37 +02:00
linkliti bd06096a3d Document remaining tool arguments in prompts and DOX
Add model-facing tool arguments found by a manual audit: call_subordinate name, office_artifact sheet plus edit count and preview_chars, browser skill value, paths, ref, keys, and selectors, and computer_use_remote include_hidden, include_offscreen, max_windows, mode, target, value, and path. Keep prompts canonical-only and record legacy aliases and action-value spellings in the owning DOX files for browser, a0_connector, office, text_editor, code_execution, goal, call_subordinate, and parallel.

Verified the argument flows against tool source in three independent manual audit passes covering core tools, plugin tools, helpers, and WebUI handlers. Verified prompt catalog and plugin scan tests in the framework runtime and kept the mirrored core instance in sync for live testing.
2026-09-10 17:00:19 +03:00
Alessandro 98f943b853 Keep parallel terminal jobs alive until their commands finish
Preserve the worker and its event-loop-owned terminal across output timeouts, publishing tool progress through the existing job result. Use parallel job IDs for await/cancel and reject session follow-ups that would create an unrelated worker.

Close parallel shells explicitly on completion or cancellation, including partial connections, and leave context cleanup to worker finally. Top-level persistent terminal behavior is unchanged. Verified with 117 focused tests, real isolated terminal and cancellation probes, and a live Venice background job completing after 22.465 seconds.
2026-09-06 21:01:11 +02:00
Alessandro 21c62f6716 fix: release deferred task resources
Clear DeferredTask callables and arguments after completion or cancellation while running each invocation from a safe private snapshot. Preserve result retrieval and active restart behavior, clean up child tasks, and add best-effort local and SSH session destructors with focused lifecycle regression coverage.
2026-07-20 21:15:35 +02:00
frdel 4ffcdf5246 Handle shell/SSH process exits as completion
Detect and treat terminated local/SSH/TTY shells as definitive command completion. Add is_terminated and get_exit_code helpers to LocalInteractiveSession, SSHInteractiveSession, and TTYSession; expand _is_closed_pty_error to recognize exited TTY processes. CodeExecution now reports a shell-exit prompt, recreates terminated sessions lazily before the next command, and returns immediately when a shell has exited. Docs and README updated to describe strict-mode/exit behavior, and tests were added/updated to cover the new termination detection and handling.
2026-07-20 17:04:05 +02:00
Alessandro 9837ff3432 Group multiline terminal commands
Execute multiline terminal input as one current-shell compound so intermediate prompts cannot complete queued work early. Preserve shell state and cover Bash and PowerShell grouping with regression tests.
2026-07-10 18:53:19 +02:00
Alessandro f1787b65f5 Fix code execution PTY reset hangs
Start local PTY shells in a new process session and make close() escalate from SIGTERM to SIGKILL when a foreground command refuses to exit. This keeps code_execution_tool reset from blocking indefinitely on stuck terminal processes.\n\nAdd regression coverage for closing a TERM-resistant shell and document the reset lifecycle contract.
2026-07-09 03:29:52 +02:00
frdel e138e33ca9 Add file-level DOX docs & update AGENTS indexes
Add comprehensive file-level DOX documentation across the repo and update directory AGENTS.md indexes. Many new `*.py.dox.md` files were added under api, helpers, tools, plugins, extensions, webui, and other dirs to document endpoint purpose, ownership, runtime contracts, work guidance, and verification. Several AGENTS.md files were created or updated (agents profiles, api, docker, extensions, helpers, plugins, skills, webui components, etc.) to list child DOX files and clarify documentation/work guidance. Also add example and bundled profile DOX files (agent0, default, developer, hacker, researcher) and minor updates to helpers/dirty_json.py and its tests. These changes improve on-disk documentation coverage and establish the convention that each direct runtime file should have a matching `*.dox.md` describing its contracts and verification steps.
2026-06-08 12:41:53 +02:00