holomime 3.3.9 → 3.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +47 -6
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -3593,7 +3593,7 @@ import { Command } from "commander";
|
|
|
3593
3593
|
// src/ui/branding.ts
|
|
3594
3594
|
import chalk from "chalk";
|
|
3595
3595
|
import gradientString from "gradient-string";
|
|
3596
|
-
var VERSION = "3.
|
|
3596
|
+
var VERSION = "3.4.0";
|
|
3597
3597
|
var LOGO = ` _ _ _
|
|
3598
3598
|
| |__ ___ | | ___ _ __ (_)_ __ ___ ___
|
|
3599
3599
|
| '_ \\ / _ \\| |/ _ \\| '_ \\| | '_ \` _ \\ / _ \\
|
|
@@ -19069,13 +19069,13 @@ async function runPipeline(options) {
|
|
|
19069
19069
|
prompt: userMsg.content,
|
|
19070
19070
|
chosen,
|
|
19071
19071
|
rejected,
|
|
19072
|
-
metadata: {
|
|
19072
|
+
metadata: { agent: "Agent", session_date: (/* @__PURE__ */ new Date()).toISOString(), phase: "exploration", pattern: "auto-detected", source: "therapy_transcript" }
|
|
19073
19073
|
});
|
|
19074
19074
|
}
|
|
19075
19075
|
}
|
|
19076
19076
|
exportData = {
|
|
19077
19077
|
format: exportFormat,
|
|
19078
|
-
agent:
|
|
19078
|
+
agent: "Agent",
|
|
19079
19079
|
sessions_processed: 1,
|
|
19080
19080
|
examples,
|
|
19081
19081
|
generated_at: (/* @__PURE__ */ new Date()).toISOString()
|
|
@@ -19280,7 +19280,33 @@ function getAgentName2(personalityPath) {
|
|
|
19280
19280
|
}
|
|
19281
19281
|
}
|
|
19282
19282
|
async function cureCommand(options) {
|
|
19283
|
-
|
|
19283
|
+
const cwd = process.cwd();
|
|
19284
|
+
const hasBodyApi = existsSync41(resolve51(cwd, "body.api")) || existsSync41(resolve51(cwd, ".holomime/body.api")) || existsSync41(resolve51(cwd, "identity/body.api"));
|
|
19285
|
+
const isRobotFlow = options.exportOnly || hasBodyApi && options.provider === "openai";
|
|
19286
|
+
if (isRobotFlow) {
|
|
19287
|
+
let bodyName = "robot";
|
|
19288
|
+
try {
|
|
19289
|
+
for (const p of ["body.api", ".holomime/body.api", "identity/body.api"]) {
|
|
19290
|
+
const bp = resolve51(cwd, p);
|
|
19291
|
+
if (existsSync41(bp)) {
|
|
19292
|
+
const body = JSON.parse(readFileSync45(bp, "utf-8"));
|
|
19293
|
+
bodyName = body.hardware_profile?.model ?? body.morphology ?? "robot";
|
|
19294
|
+
break;
|
|
19295
|
+
}
|
|
19296
|
+
}
|
|
19297
|
+
} catch {
|
|
19298
|
+
}
|
|
19299
|
+
printHeader("Cure \u2014 Robotics Training Pipeline");
|
|
19300
|
+
console.log();
|
|
19301
|
+
console.log(chalk44.dim(` Robot identity detected`) + chalk44.cyan(` (${bodyName})`));
|
|
19302
|
+
console.log(chalk44.dim(" Generating behavioral training data for your pipeline."));
|
|
19303
|
+
console.log();
|
|
19304
|
+
options.skipTrain = true;
|
|
19305
|
+
options.skipVerify = true;
|
|
19306
|
+
options.provider = "huggingface";
|
|
19307
|
+
} else {
|
|
19308
|
+
printHeader("Cure \u2014 End-to-End Behavioral Fix");
|
|
19309
|
+
}
|
|
19284
19310
|
const provider = options.provider;
|
|
19285
19311
|
if (provider !== "openai" && provider !== "huggingface") {
|
|
19286
19312
|
console.error(
|
|
@@ -19493,7 +19519,22 @@ Intermediate results saved to ${chalk44.cyan(".holomime/pipeline/")}`,
|
|
|
19493
19519
|
console.log();
|
|
19494
19520
|
console.log(chalk44.dim(` Pipeline results: .holomime/pipeline/`));
|
|
19495
19521
|
console.log();
|
|
19496
|
-
if (
|
|
19522
|
+
if (isRobotFlow) {
|
|
19523
|
+
const exportPath = ".holomime/pipeline/";
|
|
19524
|
+
const nextSteps = [
|
|
19525
|
+
`Training data exported to ${chalk44.cyan(exportPath)}`,
|
|
19526
|
+
"",
|
|
19527
|
+
" Import into your training pipeline:",
|
|
19528
|
+
` ${chalk44.dim("$")} ${chalk44.cyan("huggingface-cli download")} ${chalk44.dim(options.hubRepo ?? "<your-org/dataset>")}`,
|
|
19529
|
+
"",
|
|
19530
|
+
" Or use the local JSONL directly:",
|
|
19531
|
+
` ${chalk44.dim("$")} ${chalk44.cyan("ls .holomime/pipeline/*.jsonl")}`,
|
|
19532
|
+
"",
|
|
19533
|
+
` ${chalk44.dim("Run")} ${chalk44.cyan("holomime certify")} ${chalk44.dim("for ISO compliance report.")}`
|
|
19534
|
+
];
|
|
19535
|
+
printBox(nextSteps.join("\n"), "success", "Training Data Ready");
|
|
19536
|
+
console.log();
|
|
19537
|
+
} else if (pipelineResult.stages.train) {
|
|
19497
19538
|
printBox(
|
|
19498
19539
|
`The behavioral fix has been applied:
|
|
19499
19540
|
|
|
@@ -22565,7 +22606,7 @@ program.command("share").description("Share DPO training pairs to the marketplac
|
|
|
22565
22606
|
program.command("interview").description("Self-awareness interview \u2014 score your agent's metacognition across 4 dimensions [Pro]").requiredOption("--personality <path>", "Path to .personality.json").option("--provider <provider>", "LLM provider (ollama, anthropic, openai)", "ollama").option("--model <model>", "Model override").action(interviewCommand);
|
|
22566
22607
|
program.command("prescribe").description("Diagnose and prescribe DPO treatments from the behavioral corpus [Pro]").requiredOption("--personality <path>", "Path to .personality.json").requiredOption("--log <path>", "Path to conversation log").option("--format <format>", "Log format (holomime, chatgpt, claude, openai-api, anthropic-api, otel, jsonl)").option("--source <source>", "Correction source (corpus, marketplace, both)", "corpus").option("--apply", "Apply found treatments").option("-o, --output <path>", "Write prescription to file").action(prescribeCommand);
|
|
22567
22608
|
program.command("voice").description("Monitor voice conversations for behavioral drift in real-time [Pro]").requiredOption("--personality <path>", "Path to .personality.json").option("--platform <name>", "Voice platform: livekit, vapi, retell, generic", "generic").option("--room <name>", "LiveKit room name").option("--server-url <url>", "LiveKit server URL").option("--webhook-port <port>", "Vapi webhook port (default: 3001)").option("--agent-id <id>", "Retell agent ID").option("--input <path>", "Input transcript file (JSONL) for offline analysis").option("--interval <ms>", "Diagnosis interval in milliseconds (default: 15000)").option("--threshold <level>", "Alert threshold: warning or concern (default: warning)").action(voiceCommand);
|
|
22568
|
-
program.command("cure").description("Full pipeline \u2014 diagnose, generate training data, fine-tune, verify").option("--personality <path>", "Path to .personality.json (auto-detected)").option("--log <path>", "Path to conversation log (JSON). If omitted, auto-generates from benchmark scenarios").option("--provider <provider>", "Training provider (openai, huggingface)", "openai").option("--base-model <model>", "Base model to fine-tune", "gpt-4o-mini-2024-07-18").option("--method <method>", "Training method (auto, sft, dpo)", "auto").option("--epochs <n>", "Number of training epochs").option("--suffix <name>", "Model name suffix").option("--skip-train", "Skip training step (diagnose + export only)").option("--skip-verify", "Skip post-training verification").option("--dry-run", "Preview pipeline plan without executing").option("--push", "Push trained model to HuggingFace Hub").option("--hub-repo <repo>", "HuggingFace Hub repo (user/model-name)").option("--pass-threshold <n>", "Minimum verification score (0-100)", "50").action(async (options) => {
|
|
22609
|
+
program.command("cure").description("Full pipeline \u2014 diagnose, generate training data, fine-tune, verify").option("--personality <path>", "Path to .personality.json (auto-detected)").option("--log <path>", "Path to conversation log (JSON). If omitted, auto-generates from benchmark scenarios").option("--provider <provider>", "Training provider (openai, huggingface)", "openai").option("--base-model <model>", "Base model to fine-tune", "gpt-4o-mini-2024-07-18").option("--method <method>", "Training method (auto, sft, dpo)", "auto").option("--epochs <n>", "Number of training epochs").option("--suffix <name>", "Model name suffix").option("--skip-train", "Skip training step (diagnose + export only)").option("--skip-verify", "Skip post-training verification").option("--export-only", "Export training data only (for teams with their own training infrastructure)").option("--dry-run", "Preview pipeline plan without executing").option("--push", "Push trained model to HuggingFace Hub").option("--hub-repo <repo>", "HuggingFace Hub repo (user/model-name)").option("--pass-threshold <n>", "Minimum verification score (0-100)", "50").action(async (options) => {
|
|
22569
22610
|
const resolved = autoDetect({ personality: options.personality, provider: options.provider, model: options.model });
|
|
22570
22611
|
options.personality = resolved.personalityPath;
|
|
22571
22612
|
if (!options.provider || options.provider === "ollama") options.provider = resolved.provider;
|