holomime 2.0.0 → 2.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 (30) hide show
  1. package/README.md +34 -19
  2. package/dist/cli.js +262 -75
  3. package/dist/index.d.ts +1781 -6
  4. package/dist/index.js +310 -49
  5. package/dist/integrations/openclaw.js +1 -1
  6. package/dist/mcp-server.js +160 -42
  7. package/dist/neuralspace/index.html +1 -1
  8. package/dist/neuralspace/neuralspace.js +1 -1
  9. package/package.json +3 -3
  10. package/registry/personalities/analyst.personality.json +1 -1
  11. package/registry/personalities/coach.personality.json +1 -1
  12. package/registry/personalities/code-reviewer.personality.json +1 -1
  13. package/registry/personalities/compliance.personality.json +1 -1
  14. package/registry/personalities/counselor.personality.json +1 -1
  15. package/registry/personalities/customer-success.personality.json +1 -1
  16. package/registry/personalities/educator.personality.json +1 -1
  17. package/registry/personalities/generalist.personality.json +1 -1
  18. package/registry/personalities/leader.personality.json +1 -1
  19. package/registry/personalities/marketing.personality.json +1 -1
  20. package/registry/personalities/maverick.personality.json +1 -1
  21. package/registry/personalities/negotiator.personality.json +1 -1
  22. package/registry/personalities/nova.personality.json +1 -1
  23. package/registry/personalities/ops.personality.json +1 -1
  24. package/registry/personalities/philosopher.personality.json +1 -1
  25. package/registry/personalities/product-manager.personality.json +1 -1
  26. package/registry/personalities/recruiter.personality.json +1 -1
  27. package/registry/personalities/researcher.personality.json +1 -1
  28. package/registry/personalities/sales.personality.json +1 -1
  29. package/registry/personalities/support-agent.personality.json +1 -1
  30. package/registry/personalities/writer.personality.json +1 -1
package/dist/cli.js CHANGED
@@ -3651,7 +3651,7 @@ function writeCache(cache) {
3651
3651
  }
3652
3652
  async function validateLicense(key) {
3653
3653
  try {
3654
- const res = await fetch("https://holomime.dev/api/license/validate", {
3654
+ const res = await fetch("https://holomime.com/api/license/validate", {
3655
3655
  method: "POST",
3656
3656
  headers: { "Content-Type": "application/json" },
3657
3657
  body: JSON.stringify({ key })
@@ -3708,7 +3708,7 @@ function showUpgradePrompt(command) {
3708
3708
  ` ${chalk2.cyan("\u2022")} Growth tracking & session transcripts`,
3709
3709
  "",
3710
3710
  `${chalk2.dim("Activate with:")} ${chalk2.cyan("holomime activate <key>")}`,
3711
- `${chalk2.dim("Get a license:")} ${chalk2.cyan("https://holomime.dev/pro")}`
3711
+ `${chalk2.dim("Get a license:")} ${chalk2.cyan("https://holomime.com/pro")}`
3712
3712
  ].join("\n");
3713
3713
  console.log(
3714
3714
  boxen(content, {
@@ -5119,7 +5119,7 @@ async function initCommand() {
5119
5119
  therapyScores[key] = round(aggregateScores(values));
5120
5120
  }
5121
5121
  const spec = {
5122
- $schema: "https://holomime.dev/schema/v2.json",
5122
+ $schema: "https://holomime.com/schema/v2.json",
5123
5123
  version: "2.0",
5124
5124
  name,
5125
5125
  handle,
@@ -5265,7 +5265,7 @@ async function initFromArchetype(name, handle, purpose) {
5265
5265
  });
5266
5266
  const refuses = refusesRaw.split(",").map((s) => s.trim()).filter(Boolean);
5267
5267
  const spec = {
5268
- $schema: "https://holomime.dev/schema/v2.json",
5268
+ $schema: "https://holomime.com/schema/v2.json",
5269
5269
  version: "2.0",
5270
5270
  name,
5271
5271
  handle,
@@ -6706,7 +6706,7 @@ function generatePersonalityMarkdown(spec) {
6706
6706
  }
6707
6707
  lines.push("---");
6708
6708
  lines.push("");
6709
- lines.push("*Generated by [holomime](https://holomime.dev) \u2014 regenerate with `holomime profile --format md`*");
6709
+ lines.push("*Generated by [holomime](https://holomime.com) \u2014 regenerate with `holomime profile --format md`*");
6710
6710
  lines.push("*Canonical spec: `.personality.json`*");
6711
6711
  lines.push("");
6712
6712
  return lines.join("\n");
@@ -6924,7 +6924,7 @@ function mapDiagnosisToBrainEvent(diagnosis, latestMessage) {
6924
6924
  }
6925
6925
 
6926
6926
  // src/live/snapshot.ts
6927
- var SHARE_BASE = "https://app.holomime.dev/brain";
6927
+ var SHARE_BASE = "https://app.holomime.com/brain";
6928
6928
  function encodeSnapshot(event, agentName) {
6929
6929
  const compact = {
6930
6930
  h: event.health,
@@ -8969,13 +8969,22 @@ var soulSchema = z4.object({
8969
8969
  red_lines: z4.array(z4.string()).default([]),
8970
8970
  ethical_framework: z4.string().optional()
8971
8971
  });
8972
- var psycheSchema = z4.object({
8972
+ var mindSchema = z4.object({
8973
8973
  version: z4.string().default("1.0"),
8974
8974
  big_five: bigFiveSchema,
8975
8975
  therapy_dimensions: therapyDimensionsSchema,
8976
8976
  communication: communicationSchema.default({}),
8977
8977
  growth: growthSchema.default({})
8978
8978
  });
8979
+ var purposeSchema = z4.object({
8980
+ version: z4.string().default("1.0"),
8981
+ role: z4.string().default("General-purpose AI assistant"),
8982
+ objectives: z4.array(z4.string()).default(["Help users accomplish their goals"]),
8983
+ domain: z4.array(z4.string()).default(["general"]),
8984
+ stakeholders: z4.array(z4.string()).default(["end-users"]),
8985
+ success_criteria: z4.array(z4.string()).default(["Task completion accuracy"]),
8986
+ context: z4.string().default("Production deployment")
8987
+ });
8979
8988
  var hardwareProfileSchema = z4.object({
8980
8989
  oem: z4.string().optional(),
8981
8990
  model: z4.string().optional(),
@@ -9014,11 +9023,46 @@ var conscienceSchema = z4.object({
9014
9023
  max_autonomous_iterations: z4.number().int().default(5)
9015
9024
  }).optional()
9016
9025
  });
9026
+ var shadowPatternSchema = z4.object({
9027
+ name: z4.string(),
9028
+ score: z4.number().min(0).max(1),
9029
+ severity: z4.enum(["low", "medium", "high", "critical"]),
9030
+ first_seen: z4.string().optional(),
9031
+ trend: z4.enum(["improving", "stable", "worsening"]).default("stable")
9032
+ });
9033
+ var shadowOutcomeSchema = z4.object({
9034
+ session_id: z4.string(),
9035
+ patterns_addressed: z4.array(z4.string()),
9036
+ result: z4.enum(["improved", "unchanged", "regressed"]),
9037
+ timestamp: z4.string().optional()
9038
+ });
9039
+ var shadowSchema = z4.object({
9040
+ version: z4.string().default("1.0"),
9041
+ detected_patterns: z4.array(shadowPatternSchema).default([]),
9042
+ blind_spots: z4.array(z4.string()).default([]),
9043
+ therapy_outcomes: z4.array(shadowOutcomeSchema).default([])
9044
+ });
9045
+ var mediationRuleSchema = z4.object({
9046
+ when: z4.string(),
9047
+ then: z4.string(),
9048
+ priority: z4.number().int().min(1).max(10).default(5)
9049
+ });
9050
+ var egoSchema = z4.object({
9051
+ version: z4.string().default("1.0"),
9052
+ conflict_resolution: z4.enum(["conscience_first", "purpose_first", "balanced"]).default("conscience_first"),
9053
+ adaptation_rate: z4.number().min(0).max(1).default(0.5),
9054
+ emotional_regulation: z4.number().min(0).max(1).default(0.7),
9055
+ response_strategy: z4.enum(["cautious", "balanced", "assertive"]).default("balanced"),
9056
+ mediation_rules: z4.array(mediationRuleSchema).default([])
9057
+ });
9017
9058
  var STACK_FILES = {
9018
9059
  soul: "soul.md",
9019
- psyche: "psyche.sys",
9060
+ mind: "mind.sys",
9061
+ purpose: "purpose.cfg",
9062
+ shadow: "shadow.log",
9020
9063
  body: "body.api",
9021
- conscience: "conscience.exe"
9064
+ conscience: "conscience.exe",
9065
+ ego: "ego.runtime"
9022
9066
  };
9023
9067
 
9024
9068
  // src/core/stack-compiler.ts
@@ -9074,8 +9118,8 @@ function hashContent(content) {
9074
9118
  }
9075
9119
  function isStackDirectory(dir) {
9076
9120
  const soulPath = join8(dir, STACK_FILES.soul);
9077
- const psychePath = join8(dir, STACK_FILES.psyche);
9078
- return existsSync9(soulPath) && existsSync9(psychePath);
9121
+ const mindPath = join8(dir, STACK_FILES.mind);
9122
+ return existsSync9(soulPath) && existsSync9(mindPath);
9079
9123
  }
9080
9124
  function findStackDir(projectRoot) {
9081
9125
  const conventionalDir = join8(projectRoot, ".holomime", "identity");
@@ -9089,10 +9133,28 @@ function compileStack(options) {
9089
9133
  const soulPath = options.soulPath || join8(stackDir, STACK_FILES.soul);
9090
9134
  const soulContent = readFileSync10(soulPath, "utf-8");
9091
9135
  const soul = parseSoulMd(soulContent);
9092
- const psychePath = options.psychePath || join8(stackDir, STACK_FILES.psyche);
9093
- const psycheContent = readFileSync10(psychePath, "utf-8");
9094
- const psycheRaw = parseYaml(psycheContent);
9095
- const psyche = psycheSchema.parse(psycheRaw);
9136
+ const mindPath = options.mindPath || join8(stackDir, STACK_FILES.mind);
9137
+ const mindContent = readFileSync10(mindPath, "utf-8");
9138
+ const mindRaw = parseYaml(mindContent);
9139
+ const mind = mindSchema.parse(mindRaw);
9140
+ const purposePath = options.purposePath || join8(stackDir, STACK_FILES.purpose);
9141
+ let purpose;
9142
+ let purposeSource;
9143
+ if (existsSync9(purposePath)) {
9144
+ const purposeContent = readFileSync10(purposePath, "utf-8");
9145
+ const purposeRaw = parseYaml(purposeContent);
9146
+ purpose = purposeSchema.parse(purposeRaw);
9147
+ purposeSource = { path: purposePath, hash: hashContent(purposeContent) };
9148
+ }
9149
+ const shadowPath = options.shadowPath || join8(stackDir, STACK_FILES.shadow);
9150
+ let shadow;
9151
+ let shadowSource;
9152
+ if (existsSync9(shadowPath)) {
9153
+ const shadowContent = readFileSync10(shadowPath, "utf-8");
9154
+ const shadowRaw = parseYaml(shadowContent);
9155
+ shadow = shadowSchema.parse(shadowRaw);
9156
+ shadowSource = { path: shadowPath, hash: hashContent(shadowContent) };
9157
+ }
9096
9158
  const bodyPath = options.bodyPath || join8(stackDir, STACK_FILES.body);
9097
9159
  let body;
9098
9160
  let bodySource;
@@ -9102,6 +9164,15 @@ function compileStack(options) {
9102
9164
  body = bodySchema.parse(bodyRaw);
9103
9165
  bodySource = { path: bodyPath, hash: hashContent(bodyContent) };
9104
9166
  }
9167
+ const egoPath = options.egoPath || join8(stackDir, STACK_FILES.ego);
9168
+ let ego;
9169
+ let egoSource;
9170
+ if (existsSync9(egoPath)) {
9171
+ const egoContent = readFileSync10(egoPath, "utf-8");
9172
+ const egoRaw = parseYaml(egoContent);
9173
+ ego = egoSchema.parse(egoRaw);
9174
+ egoSource = { path: egoPath, hash: hashContent(egoContent) };
9175
+ }
9105
9176
  const consciencePath = options.consciencePath || join8(stackDir, STACK_FILES.conscience);
9106
9177
  const conscienceContent = readFileSync10(consciencePath, "utf-8");
9107
9178
  const conscienceRaw = parseYaml(conscienceContent);
@@ -9113,17 +9184,19 @@ function compileStack(options) {
9113
9184
  const refuses = conscience.rules.deny.map((r) => r.action);
9114
9185
  const escalationTriggers = conscience.rules.escalate.map((r) => r.trigger);
9115
9186
  const handle = soul.name.toLowerCase().replace(/[^a-z0-9]+/g, "-").replace(/^-|-$/g, "").slice(0, 50) || "agent";
9187
+ const agentPurpose = purpose?.role || soul.purpose;
9188
+ const expertise = purpose?.domain || [];
9116
9189
  const spec = {
9117
9190
  version: "2.0",
9118
9191
  name: soul.name,
9119
9192
  handle,
9120
- purpose: soul.purpose,
9121
- big_five: psyche.big_five,
9122
- therapy_dimensions: psyche.therapy_dimensions,
9123
- communication: psyche.communication,
9124
- growth: psyche.growth,
9193
+ purpose: agentPurpose,
9194
+ big_five: mind.big_five,
9195
+ therapy_dimensions: mind.therapy_dimensions,
9196
+ communication: mind.communication,
9197
+ growth: mind.growth,
9125
9198
  domain: {
9126
- expertise: [],
9199
+ expertise,
9127
9200
  boundaries: {
9128
9201
  refuses,
9129
9202
  escalation_triggers: escalationTriggers,
@@ -9146,7 +9219,17 @@ function compileStack(options) {
9146
9219
  if (soul.frontmatter.immutable === false) {
9147
9220
  warnings.push("soul.md: immutable flag is false \u2014 soul changes will be allowed");
9148
9221
  }
9149
- if (!body && psyche.communication) {
9222
+ if (!purpose) {
9223
+ warnings.push("purpose.cfg: not found \u2014 using defaults (general-purpose agent)");
9224
+ }
9225
+ if (shadow && shadow.detected_patterns.length > 0) {
9226
+ const critical = shadow.detected_patterns.filter((p) => p.severity === "critical");
9227
+ if (critical.length > 0) {
9228
+ warnings.push(`shadow.log: ${critical.length} critical pattern(s) detected \u2014 therapy recommended`);
9229
+ }
9230
+ }
9231
+ if (!ego) {
9232
+ warnings.push("ego.runtime: not found \u2014 using defaults (conscience-first mediation)");
9150
9233
  }
9151
9234
  if (conscience.rules.deny.length === 0) {
9152
9235
  warnings.push("conscience.exe: no deny rules defined \u2014 agent has no moral constraints");
@@ -9155,9 +9238,12 @@ function compileStack(options) {
9155
9238
  spec: validated,
9156
9239
  sources: {
9157
9240
  soul: { path: soulPath, hash: hashContent(soulContent) },
9158
- psyche: { path: psychePath, hash: hashContent(psycheContent) },
9241
+ mind: { path: mindPath, hash: hashContent(mindContent) },
9242
+ ...purposeSource ? { purpose: purposeSource } : {},
9243
+ ...shadowSource ? { shadow: shadowSource } : {},
9159
9244
  ...bodySource ? { body: bodySource } : {},
9160
- conscience: { path: consciencePath, hash: hashContent(conscienceContent) }
9245
+ conscience: { path: consciencePath, hash: hashContent(conscienceContent) },
9246
+ ...egoSource ? { ego: egoSource } : {}
9161
9247
  },
9162
9248
  warnings
9163
9249
  };
@@ -9193,20 +9279,30 @@ function decomposeSpec(spec) {
9193
9279
  soulLines.push("");
9194
9280
  }
9195
9281
  const soul = soulLines.join("\n");
9196
- const psycheObj = {
9282
+ const mindObj = {
9197
9283
  version: "1.0",
9198
9284
  big_five: s.big_five,
9199
9285
  therapy_dimensions: s.therapy_dimensions
9200
9286
  };
9201
- if (s.communication) psycheObj.communication = s.communication;
9287
+ if (s.communication) mindObj.communication = s.communication;
9202
9288
  if (s.growth) {
9203
- psycheObj.growth = {
9289
+ mindObj.growth = {
9204
9290
  areas: s.growth.areas || [],
9205
9291
  patterns_to_watch: s.growth.patterns_to_watch || [],
9206
9292
  strengths: s.growth.strengths || []
9207
9293
  };
9208
9294
  }
9209
- const psyche = stringifyYaml(psycheObj);
9295
+ const mind = stringifyYaml(mindObj);
9296
+ const purposeObj = {
9297
+ version: "1.0",
9298
+ role: s.purpose || "General-purpose AI assistant",
9299
+ objectives: ["Help users accomplish their goals"],
9300
+ domain: s.domain?.expertise || ["general"],
9301
+ stakeholders: ["end-users"],
9302
+ success_criteria: ["Task completion accuracy"],
9303
+ context: "Production deployment"
9304
+ };
9305
+ const purposeContent = stringifyYaml(purposeObj);
9210
9306
  let bodyContent;
9211
9307
  if (s.embodiment) {
9212
9308
  const bodyObj = {
@@ -9237,41 +9333,60 @@ function decomposeSpec(spec) {
9237
9333
  hard_limits: s.domain?.boundaries?.hard_limits || []
9238
9334
  };
9239
9335
  const conscience = stringifyYaml(conscienceObj);
9336
+ const shadowObj = {
9337
+ version: "1.0",
9338
+ detected_patterns: [],
9339
+ blind_spots: [],
9340
+ therapy_outcomes: []
9341
+ };
9342
+ const shadowContent = stringifyYaml(shadowObj);
9343
+ const egoObj = {
9344
+ version: "1.0",
9345
+ conflict_resolution: "conscience_first",
9346
+ adaptation_rate: 0.5,
9347
+ emotional_regulation: 0.7,
9348
+ response_strategy: "balanced",
9349
+ mediation_rules: []
9350
+ };
9351
+ const egoContent = stringifyYaml(egoObj);
9240
9352
  return {
9241
9353
  soul,
9242
- psyche,
9354
+ mind,
9355
+ purpose: purposeContent,
9356
+ shadow: shadowContent,
9243
9357
  ...bodyContent ? { body: bodyContent } : {},
9244
- conscience
9358
+ conscience,
9359
+ ego: egoContent
9245
9360
  };
9246
9361
  }
9247
9362
 
9248
9363
  // src/analysis/stack-patcher.ts
9249
9364
  var DETECTOR_LAYER_MAP = {
9250
9365
  // apology-detector.ts → "over-apologizing" | "apology-healthy"
9251
- "over-apologizing": "psyche",
9252
- "apology-healthy": "psyche",
9366
+ "over-apologizing": "mind",
9367
+ "apology-healthy": "mind",
9253
9368
  // hedge-detector.ts → "hedge-stacking"
9254
- "hedge-stacking": "psyche",
9369
+ "hedge-stacking": "mind",
9255
9370
  // sentiment.ts → "sycophantic-tendency" | "negative-skew"
9256
- "sycophantic-tendency": "psyche",
9257
- "negative-skew": "psyche",
9371
+ "sycophantic-tendency": "mind",
9372
+ "negative-skew": "mind",
9258
9373
  // verbosity.ts → "over-verbose" | "inconsistent-length"
9259
- "over-verbose": "psyche",
9260
- "inconsistent-length": "psyche",
9374
+ "over-verbose": "mind",
9375
+ "inconsistent-length": "mind",
9261
9376
  // formality.ts → "register-inconsistency"
9262
- "register-inconsistency": "psyche",
9377
+ "register-inconsistency": "mind",
9263
9378
  // recovery.ts → "error-spiral" | "recovery-good"
9264
- "error-spiral": "psyche",
9265
- "recovery-good": "psyche",
9379
+ "error-spiral": "mind",
9380
+ "recovery-good": "mind",
9266
9381
  // boundary.ts → "boundary-violation" | "boundary-healthy" | "boundary-solid"
9267
9382
  "boundary-violation": "conscience",
9268
9383
  "boundary-healthy": "conscience",
9269
9384
  "boundary-solid": "conscience",
9270
9385
  // retrieval-quality.ts → "retrieval-quality"
9271
- "retrieval-quality": "psyche"
9386
+ "retrieval-quality": "mind"
9272
9387
  };
9273
9388
  var LAYER_KEYWORDS = {
9274
- psyche: [
9389
+ mind: [
9275
9390
  /\bbig_five\b/i,
9276
9391
  /\btherapy_dimensions\b/i,
9277
9392
  /\bcommunication\b/i,
@@ -9295,6 +9410,29 @@ var LAYER_KEYWORDS = {
9295
9410
  /\bpatterns[_-]to[_-]watch/i,
9296
9411
  /\bemotion/i
9297
9412
  ],
9413
+ purpose: [
9414
+ /\brole\b/i,
9415
+ /\bobjective\b/i,
9416
+ /\bdomain\b/i,
9417
+ /\bscope\b/i,
9418
+ /\btask\b/i,
9419
+ /\bmission\b/i,
9420
+ /\bstakeholder\b/i
9421
+ ],
9422
+ shadow: [
9423
+ /\bpattern\b/i,
9424
+ /\bblind.?spot\b/i,
9425
+ /\bshadow\b/i,
9426
+ /\bunconscious\b/i
9427
+ ],
9428
+ ego: [
9429
+ /\bmediat/i,
9430
+ /\bconflict\b/i,
9431
+ /\badapt/i,
9432
+ /\bregulat/i,
9433
+ /\bstrateg/i,
9434
+ /\bbalanc/i
9435
+ ],
9298
9436
  body: [
9299
9437
  /\bmotion\b/i,
9300
9438
  /\bgaze\b/i,
@@ -9332,16 +9470,25 @@ function classifyPatch(recommendation) {
9332
9470
  if (LAYER_KEYWORDS.soul.some((r) => r.test(recommendation))) {
9333
9471
  return "soul";
9334
9472
  }
9473
+ if (LAYER_KEYWORDS.ego.some((r) => r.test(recommendation))) {
9474
+ return "ego";
9475
+ }
9476
+ if (LAYER_KEYWORDS.purpose.some((r) => r.test(recommendation))) {
9477
+ return "purpose";
9478
+ }
9479
+ if (LAYER_KEYWORDS.shadow.some((r) => r.test(recommendation))) {
9480
+ return "shadow";
9481
+ }
9335
9482
  if (LAYER_KEYWORDS.body.some((r) => r.test(recommendation))) {
9336
9483
  return "body";
9337
9484
  }
9338
- return "psyche";
9485
+ return "mind";
9339
9486
  }
9340
9487
  function classifyByDetector(patternId, recommendation) {
9341
9488
  const mapped = DETECTOR_LAYER_MAP[patternId];
9342
9489
  if (mapped) return mapped;
9343
9490
  if (recommendation) return classifyPatch(recommendation);
9344
- return "psyche";
9491
+ return "mind";
9345
9492
  }
9346
9493
  function applyStackPatches(patches, stackDir) {
9347
9494
  const applied = [];
@@ -9383,23 +9530,23 @@ function applyStackPatches(patches, stackDir) {
9383
9530
  }
9384
9531
  continue;
9385
9532
  }
9386
- if (patch.target === "psyche") {
9387
- const psychePath = join9(stackDir, STACK_FILES.psyche);
9388
- if (!existsSync10(psychePath)) {
9533
+ if (patch.target === "mind") {
9534
+ const mindPath = join9(stackDir, STACK_FILES.mind);
9535
+ if (!existsSync10(mindPath)) {
9389
9536
  skipped.push(patch);
9390
- warnings.push(`[psyche] psyche.sys does not exist, skipping: ${patch.reason}`);
9537
+ warnings.push(`[mind] mind.sys does not exist, skipping: ${patch.reason}`);
9391
9538
  continue;
9392
9539
  }
9393
9540
  try {
9394
- const content = readFileSync11(psychePath, "utf-8");
9395
- const psycheObj = parseYaml2(content);
9396
- applyPatchToObject(psycheObj, patch);
9397
- writeFileSync9(psychePath, stringifyYaml2(psycheObj));
9541
+ const content = readFileSync11(mindPath, "utf-8");
9542
+ const mindObj = parseYaml2(content);
9543
+ applyPatchToObject(mindObj, patch);
9544
+ writeFileSync9(mindPath, stringifyYaml2(mindObj));
9398
9545
  applied.push(patch);
9399
- modifiedFiles.add(psychePath);
9546
+ modifiedFiles.add(mindPath);
9400
9547
  } catch (err) {
9401
9548
  skipped.push(patch);
9402
- warnings.push(`[psyche] Failed to patch psyche.sys: ${err}`);
9549
+ warnings.push(`[mind] Failed to patch mind.sys: ${err}`);
9403
9550
  }
9404
9551
  continue;
9405
9552
  }
@@ -14136,12 +14283,13 @@ function checkClause(spec, clause) {
14136
14283
  }
14137
14284
  break;
14138
14285
  }
14139
- case "psyche": {
14286
+ case "psyche":
14287
+ case "mind": {
14140
14288
  const hasBigFive = !!s.big_five;
14141
14289
  const hasTherapy = !!s.therapy_dimensions;
14142
14290
  if (hasBigFive || hasTherapy) {
14143
14291
  covered = true;
14144
- coverageMethod = "psyche.sys content";
14292
+ coverageMethod = "mind.sys content";
14145
14293
  if (hasBigFive) evidence.push("Big Five traits defined");
14146
14294
  if (hasTherapy) evidence.push("Therapy dimensions defined");
14147
14295
  }
@@ -15332,7 +15480,7 @@ async function fleetTherapyCommand(options) {
15332
15480
  `Your ${tier} plan supports up to ${maxAgents} agents per fleet-therapy run.
15333
15481
  Found ${config.agents.length} agents. Upgrade to Institute for unlimited.
15334
15482
 
15335
- Upgrade: https://holomime.dev/pro`,
15483
+ Upgrade: https://holomime.com/pro`,
15336
15484
  "warning",
15337
15485
  "Agent Limit Exceeded"
15338
15486
  );
@@ -17389,7 +17537,7 @@ async function embodyStackMode(options, provider, adapterType) {
17389
17537
  const stackDir = resolve45(process.cwd(), options.stack);
17390
17538
  if (!isStackDirectory(stackDir)) {
17391
17539
  console.error(chalk39.red(` ${figures28.cross} Not a valid stack directory: ${stackDir}`));
17392
- console.error(chalk39.dim(` Requires at least ${STACK_FILES.soul} and ${STACK_FILES.psyche}`));
17540
+ console.error(chalk39.dim(` Requires at least ${STACK_FILES.soul} and ${STACK_FILES.mind}`));
17393
17541
  process.exit(1);
17394
17542
  }
17395
17543
  if (options.swapBody) {
@@ -17612,9 +17760,9 @@ async function migrateFromSpec(specPath, outputDir) {
17612
17760
  const stack = decomposeSpec(spec);
17613
17761
  mkdirSync23(outputDir, { recursive: true });
17614
17762
  writeFileSync33(join33(outputDir, STACK_FILES.soul), stack.soul);
17615
- writeFileSync33(join33(outputDir, STACK_FILES.psyche), stack.psyche);
17763
+ writeFileSync33(join33(outputDir, STACK_FILES.mind), stack.mind);
17616
17764
  writeFileSync33(join33(outputDir, STACK_FILES.conscience), stack.conscience);
17617
- const files = [STACK_FILES.soul, STACK_FILES.psyche, STACK_FILES.conscience];
17765
+ const files = [STACK_FILES.soul, STACK_FILES.mind, STACK_FILES.conscience];
17618
17766
  if (stack.body) {
17619
17767
  writeFileSync33(join33(outputDir, STACK_FILES.body), stack.body);
17620
17768
  files.push(STACK_FILES.body);
@@ -17656,7 +17804,7 @@ immutable: true
17656
17804
  ## Ethical Framework
17657
17805
  Define the moral principles that guide this agent's behavior.
17658
17806
  `;
17659
- const psyche = `version: "1.0"
17807
+ const mind = `version: "1.0"
17660
17808
 
17661
17809
  big_five:
17662
17810
  openness:
@@ -17715,6 +17863,30 @@ growth:
17715
17863
  areas: []
17716
17864
  patterns_to_watch: []
17717
17865
  strengths: []
17866
+ `;
17867
+ const purpose = `version: "1.0"
17868
+ role: "General-purpose AI assistant"
17869
+ objectives:
17870
+ - Help users accomplish their goals
17871
+ domain:
17872
+ - general
17873
+ stakeholders:
17874
+ - end-users
17875
+ success_criteria:
17876
+ - Task completion accuracy
17877
+ context: "Production deployment"
17878
+ `;
17879
+ const shadow = `version: "1.0"
17880
+ detected_patterns: []
17881
+ blind_spots: []
17882
+ therapy_outcomes: []
17883
+ `;
17884
+ const ego = `version: "1.0"
17885
+ conflict_resolution: conscience_first
17886
+ adaptation_rate: 0.5
17887
+ emotional_regulation: 0.7
17888
+ response_strategy: balanced
17889
+ mediation_rules: []
17718
17890
  `;
17719
17891
  const conscience = `version: "1.0"
17720
17892
 
@@ -17736,18 +17908,23 @@ hard_limits:
17736
17908
  - no_personal_data_retention
17737
17909
  `;
17738
17910
  writeFileSync33(join33(outputDir, STACK_FILES.soul), soul);
17739
- writeFileSync33(join33(outputDir, STACK_FILES.psyche), psyche);
17911
+ writeFileSync33(join33(outputDir, STACK_FILES.mind), mind);
17912
+ writeFileSync33(join33(outputDir, STACK_FILES.purpose), purpose);
17913
+ writeFileSync33(join33(outputDir, STACK_FILES.shadow), shadow);
17740
17914
  writeFileSync33(join33(outputDir, STACK_FILES.conscience), conscience);
17915
+ writeFileSync33(join33(outputDir, STACK_FILES.ego), ego);
17741
17916
  console.log("");
17742
17917
  printBox(
17743
17918
  [
17744
- `${chalk40.green(figures29.tick)} Created 3 identity stack files:`,
17919
+ `${chalk40.green(figures29.tick)} Created 7 identity stack files:`,
17745
17920
  "",
17746
- ` ${chalk40.cyan(STACK_FILES.soul)} ${chalk40.dim("\u2190 values, ethics, purpose")}`,
17747
- ` ${chalk40.cyan(STACK_FILES.psyche)} ${chalk40.dim("\u2190 Big Five, EQ, communication")}`,
17748
- ` ${chalk40.cyan(STACK_FILES.conscience)} ${chalk40.dim("\u2190 deny/allow/escalate rules")}`,
17749
- "",
17750
- ` ${chalk40.dim(`${STACK_FILES.body} \u2190 create manually for embodied agents`)}`,
17921
+ ` ${chalk40.cyan(STACK_FILES.soul)} ${chalk40.dim("\u2190 essence, values, ethics (Aristotle)")}`,
17922
+ ` ${chalk40.cyan(STACK_FILES.mind)} ${chalk40.dim("\u2190 Big Five, EQ, communication (Jung)")}`,
17923
+ ` ${chalk40.cyan(STACK_FILES.purpose)} ${chalk40.dim("\u2190 role, objectives, domain (Aristotle)")}`,
17924
+ ` ${chalk40.cyan(STACK_FILES.shadow)} ${chalk40.dim("\u2190 detected patterns, blind spots (Jung)")}`,
17925
+ ` ${chalk40.cyan(STACK_FILES.body)} ${chalk40.dim("\u2190 morphology, sensors, safety envelope")}`,
17926
+ ` ${chalk40.cyan(STACK_FILES.conscience)} ${chalk40.dim("\u2190 deny/allow/escalate rules (Freud)")}`,
17927
+ ` ${chalk40.cyan(STACK_FILES.ego)} ${chalk40.dim("\u2190 runtime mediation, conflict resolution (Freud)")}`,
17751
17928
  "",
17752
17929
  `${chalk40.dim("Directory:")} ${outputDir}`,
17753
17930
  "",
@@ -17784,11 +17961,21 @@ async function compileStackCommand(options) {
17784
17961
  const sources = result.sources;
17785
17962
  console.log(chalk41.dim(" Sources:"));
17786
17963
  console.log(` ${chalk41.cyan("soul")} ${sources.soul.path} ${chalk41.dim(`(${sources.soul.hash})`)}`);
17787
- console.log(` ${chalk41.cyan("psyche")} ${sources.psyche.path} ${chalk41.dim(`(${sources.psyche.hash})`)}`);
17964
+ console.log(` ${chalk41.cyan("mind")} ${sources.mind.path} ${chalk41.dim(`(${sources.mind.hash})`)}`);
17965
+ if (sources.purpose) {
17966
+ console.log(` ${chalk41.cyan("purpose")} ${sources.purpose.path} ${chalk41.dim(`(${sources.purpose.hash})`)}`);
17967
+ }
17968
+ if (sources.shadow) {
17969
+ console.log(` ${chalk41.cyan("shadow")} ${sources.shadow.path} ${chalk41.dim(`(${sources.shadow.hash})`)}`);
17970
+ }
17788
17971
  if (sources.body) {
17789
17972
  console.log(` ${chalk41.cyan("body")} ${sources.body.path} ${chalk41.dim(`(${sources.body.hash})`)}`);
17790
17973
  }
17791
17974
  console.log(` ${chalk41.cyan("conscience")} ${sources.conscience.path} ${chalk41.dim(`(${sources.conscience.hash})`)}`);
17975
+ if (sources.ego) {
17976
+ console.log(` ${chalk41.cyan("ego")} ${sources.ego.path} ${chalk41.dim(`(${sources.ego.hash})`)}`);
17977
+ }
17978
+ ;
17792
17979
  if (options.validateOnly) {
17793
17980
  console.log("");
17794
17981
  console.log(chalk41.green(` ${figures30.tick} Stack is valid`));
@@ -19396,7 +19583,7 @@ async function liveCommand(options) {
19396
19583
  resolved = true;
19397
19584
  watcher2.stop();
19398
19585
  const encoded = encodeSnapshot(event, agent.agent);
19399
- const url = `https://app.holomime.dev/brain?d=${encoded}`;
19586
+ const url = `https://app.holomime.com/brain?d=${encoded}`;
19400
19587
  const copied = copyToClipboard(url);
19401
19588
  printShareLink(url, copied);
19402
19589
  resolve56();
@@ -19488,7 +19675,7 @@ async function liveCommand(options) {
19488
19675
  }
19489
19676
  if ((key === "s" || key === "S") && lastEvent) {
19490
19677
  const encoded = encodeSnapshot(lastEvent, agent.agent);
19491
- const url = `https://app.holomime.dev/brain?d=${encoded}`;
19678
+ const url = `https://app.holomime.com/brain?d=${encoded}`;
19492
19679
  const copied = copyToClipboard(url);
19493
19680
  printShareLink(url, copied);
19494
19681
  }
@@ -21301,8 +21488,8 @@ program.name("holomime").description("Personality engine for AI agents \u2014 Bi
21301
21488
  }
21302
21489
  });
21303
21490
  program.command("init").description("Build a personality profile through a guided assessment").action(initCommand);
21304
- program.command("init-stack").description("Create the 4-file identity stack (soul.md, psyche.sys, body.api, conscience.exe)").option("--from <path>", "Decompose an existing .personality.json into stack files").option("--dir <path>", "Output directory (default: current directory)").action(initStackCommand);
21305
- program.command("compile-stack").description("Compile identity stack (soul + psyche + body + conscience) into .personality.json").option("--dir <path>", "Stack directory (default: auto-detect)").option("-o, --output <path>", "Output path (default: .personality.json)").option("--validate-only", "Parse and validate without writing").option("--diff", "Show changes vs existing .personality.json").action(compileStackCommand);
21491
+ program.command("init-stack").description("Create the 7-file identity stack (soul.md, mind.sys, purpose.cfg, shadow.log, body.api, conscience.exe, ego.runtime)").option("--from <path>", "Decompose an existing .personality.json into stack files").option("--dir <path>", "Output directory (default: current directory)").action(initStackCommand);
21492
+ program.command("compile-stack").description("Compile identity stack (soul + mind + purpose + shadow + body + conscience + ego) into .personality.json").option("--dir <path>", "Stack directory (default: auto-detect)").option("-o, --output <path>", "Output path (default: .personality.json)").option("--validate-only", "Parse and validate without writing").option("--diff", "Show changes vs existing .personality.json").action(compileStackCommand);
21306
21493
  program.command("compile").description("Compile .personality.json into a provider-specific runtime config").option("--provider <provider>", "Target provider (anthropic, openai, gemini, ollama)", "anthropic").option("--surface <surface>", "Target surface (chat, email, code_review, slack, api, embodied)", "chat").option("--for <format>", "Compile for a specific format (openclaw)").option("--tier <tier>", "Personality loading tier (L0, L1, L2)", "L2").option("-o, --output <path>", "Write output to file instead of stdout").action(compileCommand);
21307
21494
  program.command("validate").description("Validate .personality.json schema and psychological coherence").action(validateCommand);
21308
21495
  program.command("profile").description("Pretty-print a human-readable personality summary").option("--format <format>", "Output format (terminal, md)", "terminal").option("-o, --output <path>", "Write output to file (for md format)").action(profileCommand);
@@ -21312,8 +21499,8 @@ program.command("browse").description("Browse the community marketplace").option
21312
21499
  program.command("use").description("Use a personality from the registry").argument("<handle>", "Personality handle to use").option("-o, --output <path>", "Output path", ".personality.json").action(useCommand);
21313
21500
  program.command("install").description("Install a community asset from the marketplace").argument("<handle>", "Asset handle to install").option("--type <type>", "Asset type: personality, detector, intervention, training-pairs").option("--output <dir>", "Custom install directory").action(installCommand);
21314
21501
  program.command("publish").description("Share assets to the community marketplace").option("--personality <path>", "Path to .personality.json", ".personality.json").option("--type <type>", "Asset type: personality, detector, intervention, training-pairs").option("--path <path>", "Path to the asset file to publish").option("--name <name>", "Asset name").option("--description <desc>", "Asset description").option("--author <author>", "Author name").option("--version <ver>", "Asset version", "1.0.0").option("--tags <tags>", "Comma-separated tags").action(publishCommand);
21315
- 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 + psyche.sys + body.api + conscience.exe)").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);
21316
- program.command("activate").description("Activate a Pro license key").argument("<key>", "License key from holomime.dev").action(activateCommand);
21502
+ 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 + 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);
21503
+ program.command("activate").description("Activate a Pro license key").argument("<key>", "License key from holomime.com").action(activateCommand);
21317
21504
  program.command("telemetry").description("Manage anonymous usage telemetry").argument("[action]", "enable, disable, or status (default: status)").action(telemetryCommand);
21318
21505
  program.command("session").description("Live alignment session \u2014 behavioral refinement for your agent [Pro]").requiredOption("--personality <path>", "Path to .personality.json").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(sessionCommand);
21319
21506
  program.command("autopilot").description("Automated behavioral alignment \u2014 diagnose, refine, and apply [Pro]").requiredOption("--personality <path>", "Path to .personality.json").requiredOption("--log <path>", "Conversation log for diagnosis").option("--provider <provider>", "LLM provider (ollama, anthropic, openai)", "ollama").option("--model <model>", "Model override").option("--format <format>", "Log format (auto, holomime, chatgpt, claude, openai-api, anthropic-api, otel, jsonl)", "auto").option("--threshold <level>", "Trigger threshold (routine, targeted, intervention)", "targeted").option("--turns <n>", "Maximum session turns", "24").option("--dry-run", "Show what would happen without running alignment").option("--apply", "Apply recommendations to .personality.json after session").option("--oversight <mode>", "Oversight mode (none, review, approve, approve-specs)", "review").action(autopilotCommand);