Skip to content

armgit / mso

Public Imported from GitHub
0

Browser-based graphical shell and control plane for a Linux server you own — real terminal, file manager, live metrics and BYOK AI in one mobile-first workspace. Next.js 16 · React 19 · node-pty · Tailwind v4 · shadcn/ui. Public alpha, self-hosted.

843 B
Raw Blame
import { toolById } from "./tools";
import type { Automation } from "./types";

export function composeAutomationRequest(auto: Automation, agentName: string): string {
  const lines = auto.steps.map((step, index) => {
    const tool = toolById(step.tool);
    const context = step.argText ? `: requested args/context: ${step.argText}` : "";
    return `${index + 1}. ${step.tool}${tool?.name ? ` (${tool.name})` : ""}${context}`;
  });
  return [
    `Run my saved Alfa automation “${auto.name}” using the ${agentName} persona.`,
    "Execute these steps in order through the listed MSO host tools. Inspect/validate before each dependent step; do not claim success without the tool result. Mutations must use the normal human approval cards.",
    lines.join("\n") || "No steps are configured; explain that and stop.",
  ].join("\n\n");
}