Package org.machanism.machai.gw.tools
package org.machanism.machai.gw.tools
Provides host-integrated function tool implementations used by Ghostwriter to
expose local file-system, command-line, web, act-management, and project-context
capabilities to AI providers.
Classes in this package register concrete tools with
Genai instances so that higher-level
workflows can safely interact with the current project, external resources,
and Ghostwriter runtime features.
The package includes tool registrars and supporting infrastructure for:
- reading, writing, patching, and listing files relative to a host-supplied working directory
- executing validated command-line processes with bounded output capture, command-log persistence, and deny-list based security checks
- retrieving web content and invoking REST endpoints with optional header, timeout, selector, charset, and authentication handling
- loading built-in and custom act definitions, listing available acts, inspecting act metadata, and triggering act execution
- maintaining project-scoped context variables that can be read, updated, pushed, and popped across workflow steps
- signaling workflow control transitions such as ending tasks, repeating an episode, moving to another episode, or terminating execution
Supporting types in the package implement bounded output buffering, command deny-list enforcement, patch application, and exception-based workflow signaling used by the registered tools.
These tools are intended to operate within a host-controlled execution model where working directories, configuration, security constraints, and network policies are supplied by the surrounding application.
-
ClassDescriptionInstalls command-execution and process-termination tools into a
Genai.Loads and evaluates command deny-list rules used by host-side command execution tools.Exception thrown when a command fails a deny-list security check.Exception used to signal the end of a task without terminating the application.Installs file-system tools into aGenai.AStringBuilder-like helper that retains only the lastmaxSizecharacters.Exception used to request a jump to another act episode during execution.Utility to apply unified diff patches to text files.Runtime exception used byterminate_processto signal early termination to the host.Exception used to request that the current act episode be executed again.Installs HTTP retrieval tools into aGenai.