holomime 3.0.0 → 3.1.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.
Files changed (3) hide show
  1. package/README.md +11 -0
  2. package/dist/cli.js +48 -2
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -106,6 +106,17 @@ holomime embody --body registry/bodies/figure-03.body.api
106
106
  | gRPC | Custom robotics stacks | `--adapter grpc` |
107
107
  | MQTT | IoT/edge robots | `--adapter mqtt` |
108
108
  | Neural Action Gate | Conscience gate for learned controllers (VLA, RL, IL) | `neural-action-gate.ts` |
109
+ | Edge Runtime | Compiled conscience for <1ms evaluation | `edge-runtime.ts` |
110
+
111
+ ## Edge Runtime
112
+
113
+ holomime includes a compiled conscience evaluator for real-time robotics deployment:
114
+
115
+ - **<1ms p99 latency** — conscience evaluation in microseconds, not milliseconds
116
+ - **Zero dependencies** — no LLM, no network, no cloud required for real-time safety
117
+ - **<200KB footprint** — fits alongside any control loop
118
+ - **Edge/cloud split** — real-time safety on robot, analytics in cloud, periodic sync
119
+ - **Plugs into your existing robotics stack** — Jetson Thor, Qualcomm, or any edge platform. You already have the body. We give you the conscience.
109
120
 
110
121
  ## ISO Compliance
111
122
 
package/dist/cli.js CHANGED
@@ -19032,6 +19032,33 @@ async function runPipeline(options) {
19032
19032
  const exportFormat = options.method === "dpo" ? "dpo" : "alpaca";
19033
19033
  if (transcripts.length > 0) {
19034
19034
  exportData = exportTrainingData2(transcripts, exportFormat);
19035
+ } else if (result.stages.diagnose && logPath) {
19036
+ emitProgress("export", "No therapy sessions found. Generating DPO pairs from diagnosed patterns...");
19037
+ const logContent = readFileSync43(logPath, "utf-8");
19038
+ const logData = JSON.parse(logContent);
19039
+ const messages2 = logData.conversations?.[0]?.messages ?? logData.messages ?? [];
19040
+ const examples = [];
19041
+ for (let i = 0; i < messages2.length - 1; i += 2) {
19042
+ const userMsg = messages2[i];
19043
+ const assistantMsg = messages2[i + 1];
19044
+ if (userMsg?.role === "user" && assistantMsg?.role === "assistant") {
19045
+ const rejected = assistantMsg.content;
19046
+ const chosen = generateCorrectedResponse(rejected);
19047
+ examples.push({
19048
+ prompt: userMsg.content,
19049
+ chosen,
19050
+ rejected,
19051
+ metadata: { source: "auto-cure", timestamp: (/* @__PURE__ */ new Date()).toISOString() }
19052
+ });
19053
+ }
19054
+ }
19055
+ exportData = {
19056
+ format: exportFormat,
19057
+ agent: result.stages.diagnose?.agentName ?? "Agent",
19058
+ sessions_processed: 1,
19059
+ examples,
19060
+ generated_at: (/* @__PURE__ */ new Date()).toISOString()
19061
+ };
19035
19062
  } else {
19036
19063
  exportData = {
19037
19064
  format: exportFormat,
@@ -19060,7 +19087,7 @@ async function runPipeline(options) {
19060
19087
  saveStageResult(pipelineDir, "export", exportData);
19061
19088
  if (exportData.examples.length === 0) {
19062
19089
  throw new Error(
19063
- "No training data available. Run `holomime session` first to generate session transcripts, then `holomime export` to extract training data."
19090
+ "No training data available. Run `holomime align` first to generate therapy sessions, or `holomime cure` to run the full pipeline."
19064
19091
  );
19065
19092
  }
19066
19093
  emitProgress("export", `Exported ${exportData.examples.length} training examples`);
@@ -19184,6 +19211,25 @@ async function runPipeline(options) {
19184
19211
  result.duration = Date.now() - startTime;
19185
19212
  return result;
19186
19213
  }
19214
+ function generateCorrectedResponse(problematic) {
19215
+ let corrected = problematic;
19216
+ corrected = corrected.replace(/I'm (so |really |sincerely )?sorry[^.!]*[.!]\s*/gi, "");
19217
+ corrected = corrected.replace(/I apologize[^.!]*[.!]\s*/gi, "");
19218
+ corrected = corrected.replace(/What a (fantastic|brilliant|great|amazing) (question|observation|point)[^.!]*[.!]\s*/gi, "");
19219
+ corrected = corrected.replace(/You're (absolutely|completely|totally) right[^.!]*[.!]\s*/gi, "");
19220
+ corrected = corrected.replace(/I couldn't agree more[^.!]*[.!]\s*/gi, "");
19221
+ corrected = corrected.replace(/I would perhaps suggest that you might want to consider/gi, "I suggest");
19222
+ corrected = corrected.replace(/though I could be wrong/gi, "");
19223
+ corrected = corrected.replace(/It's hard to say for certain, but /gi, "");
19224
+ corrected = corrected.replace(/arguably one could potentially/gi, "you could");
19225
+ corrected = corrected.replace(/Oh no, I made another mistake[^.!]*[.!]\s*/gi, "");
19226
+ corrected = corrected.replace(/I keep getting this wrong[^.!]*[.!]\s*/gi, "");
19227
+ corrected = corrected.replace(/\s+/g, " ").trim();
19228
+ if (corrected.length < 20) {
19229
+ corrected = "Let me address your question directly. Here is the relevant information based on what I know.";
19230
+ }
19231
+ return corrected;
19232
+ }
19187
19233
 
19188
19234
  // src/commands/cure.ts
19189
19235
  var STAGE_LABELS = {
@@ -21754,7 +21800,7 @@ program.command("publish").description("Share assets to the community marketplac
21754
21800
  program.command("embody").description("Start an embodiment runtime \u2014 push personality to robots/avatars in real-time").option("--personality <path>", "Path to .personality.json").requiredOption("--adapter <adapter>", "Runtime adapter (ros2, unity, webhook, isaac)").option("--stack <dir>", "Path to identity stack directory (soul.md + mind.sys + purpose.cfg + shadow.log + memory.store + body.api + conscience.exe + ego.runtime)").option("--swap-body <path>", "Hot-swap body.api into the stack directory before starting (requires --stack)").option("--endpoint <url>", "WebSocket URL for ROS2 rosbridge (default: ws://localhost:9090)").option("--port <port>", "Port for Unity HTTP server (default: 8765)").option("--url <url>", "Webhook URL for HTTP adapter").option("--headers <headers>", "Custom headers for webhook (Key:Value,Key2:Value2)").option("--bearer-token <token>", "Bearer token for webhook auth").option("--topic-prefix <prefix>", "ROS2 topic prefix (default: /holomime)").option("--transition <ms>", "Unity transition duration in ms (default: 500)").action(embodyCommand);
21755
21801
  program.command("activate").description("Activate a Pro license key").argument("<key>", "License key from holomime.com").action(activateCommand);
21756
21802
  program.command("telemetry").description("Manage anonymous usage telemetry").argument("[action]", "enable, disable, or status (default: status)").action(telemetryCommand);
21757
- program.command("session").description("Live alignment session \u2014 behavioral refinement for your agent [Pro]").option("--personality <path>", "Path to .personality.json (auto-detected)").option("--provider <provider>", "LLM provider (ollama, anthropic, openai)", "ollama").option("--model <model>", "Model override (e.g. claude-sonnet-4-20250514, gpt-4o)").option("--log <path>", "Conversation log for pre-session diagnosis").option("--format <format>", "Log format (auto, holomime, chatgpt, claude, openai-api, anthropic-api, otel, jsonl)", "auto").option("--turns <n>", "Maximum session turns", "24").option("--observe", "Observe mode (watch without intervention)").option("--interactive", "Supervisor mode \u2014 intervene mid-session with directives").option("--apply", "Apply recommendations to .personality.json after session").action(async (options) => {
21803
+ program.command("align").alias("session").description("Live alignment \u2014 Mira runs behavioral therapy on your agent [Pro]").option("--personality <path>", "Path to .personality.json (auto-detected)").option("--provider <provider>", "LLM provider (ollama, anthropic, openai)", "ollama").option("--model <model>", "Model override (e.g. claude-sonnet-4-20250514, gpt-4o)").option("--log <path>", "Conversation log for pre-session diagnosis").option("--format <format>", "Log format (auto, holomime, chatgpt, claude, openai-api, anthropic-api, otel, jsonl)", "auto").option("--turns <n>", "Maximum session turns", "24").option("--observe", "Observe mode (watch without intervention)").option("--interactive", "Supervisor mode \u2014 intervene mid-session with directives").option("--apply", "Apply recommendations to .personality.json after session").action(async (options) => {
21758
21804
  const resolved = autoDetect({ personality: options.personality, provider: options.provider, model: options.model });
21759
21805
  options.personality = resolved.personalityPath;
21760
21806
  if (!options.provider || options.provider === "ollama") options.provider = resolved.provider;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "holomime",
3
- "version": "3.0.0",
3
+ "version": "3.1.0",
4
4
  "description": "Behavioral therapy infrastructure for AI agents — Big Five psychology, structured treatment, behavioral alignment",
5
5
  "type": "module",
6
6
  "bin": {