Compare commits

..

No commits in common. "main" and "fix/models-review-feedback" have entirely different histories.

2 changed files with 3 additions and 32 deletions

View File

@ -1,6 +1,6 @@
{
"name": "@shazhou/hermes-harness",
"version": "0.1.1",
"name": "hermes-harness",
"version": "0.1.0",
"description": "Hermes Agent CLI harness tools",
"type": "module",
"bin": {

View File

@ -3,9 +3,7 @@ import { homedir } from "os";
import { join } from "path";
import { parse, stringify } from "yaml";
const HERMES_HOME = process.env.HERMES_HOME || join(homedir(), ".hermes");
const CONFIG_PATH = join(HERMES_HOME, "config.yaml");
const SOUL_PATH = join(HERMES_HOME, "SOUL.md");
const CONFIG_PATH = join(homedir(), ".hermes", "config.yaml");
interface Config {
agent?: {
@ -53,30 +51,6 @@ function getPreview(value: string | PersonalityDict): string {
return value.description || (value.system_prompt || "").slice(0, 60) + "...";
}
// --- SOUL.md management ---
function loadConventions(): string {
try {
const { execSync } = require("child_process");
const result = execSync("cfg get HERMES_AGENT_CONVENTIONS", {
encoding: "utf-8",
timeout: 5000,
stdio: ["pipe", "pipe", "pipe"],
}).trim();
return result || "";
} catch {
return "";
}
}
function writeSoulMd(personalityPrompt: string) {
const conventions = loadConventions();
const parts = [personalityPrompt];
if (conventions) parts.push(conventions);
const content = parts.filter(Boolean).join("\n\n");
writeFileSync(SOUL_PATH, content + "\n", "utf-8");
}
// --- Actions ---
function list() {
@ -152,7 +126,6 @@ function switchLocal(name: string) {
if (!config.agent) config.agent = {};
config.agent.system_prompt = "";
saveConfig(config);
writeSoulMd("");
console.log("Personality cleared.");
return;
}
@ -167,9 +140,7 @@ function switchLocal(name: string) {
if (!config.agent) config.agent = {};
config.agent.system_prompt = prompt;
saveConfig(config);
writeSoulMd(prompt);
console.log(`Switched to: ${name}`);
console.log("SOUL.md updated.");
}
async function switchTelegram(name: string) {