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.