openanima 0.3.0 → 0.3.2

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 (2) hide show
  1. package/dist/bin/index.js +74 -8
  2. package/package.json +1 -1
package/dist/bin/index.js CHANGED
@@ -7084,6 +7084,12 @@ var MIRROR_PAIRS = [
7084
7084
  [77, 85, "same"]
7085
7085
  // Both about sequential vs interest-driven task handling
7086
7086
  ];
7087
+ var DIMENSION_RANGES = {
7088
+ EI: [1, 23],
7089
+ SN: [24, 47],
7090
+ TF: [48, 70],
7091
+ JP: [71, 93]
7092
+ };
7087
7093
  function checkConsistency(answers) {
7088
7094
  const answerMap = /* @__PURE__ */ new Map();
7089
7095
  for (const a of answers) {
@@ -7103,12 +7109,49 @@ function checkConsistency(answers) {
7103
7109
  }
7104
7110
  }
7105
7111
  const totalPairs = MIRROR_PAIRS.length;
7106
- const score = totalPairs > 0 ? Math.round(consistentCount / totalPairs * 100) : 100;
7112
+ const mirrorScore = totalPairs > 0 ? Math.round(consistentCount / totalPairs * 100) : 100;
7113
+ const uniformityWarnings = [];
7114
+ let uniformityPenalty = 0;
7115
+ for (const [dim, [start, end]] of Object.entries(DIMENSION_RANGES)) {
7116
+ let countA = 0;
7117
+ let countB = 0;
7118
+ for (let i = start; i <= end; i++) {
7119
+ const a = answerMap.get(i);
7120
+ if (a === "A") countA++;
7121
+ else if (a === "B") countB++;
7122
+ }
7123
+ const total = countA + countB;
7124
+ if (total === 0) continue;
7125
+ const dominantCount = Math.max(countA, countB);
7126
+ const dominantChoice = countA >= countB ? "A" : "B";
7127
+ const pct = Math.round(dominantCount / total * 100);
7128
+ if (pct >= 96) {
7129
+ uniformityWarnings.push({ dimension: dim, dominantChoice, percentage: pct });
7130
+ uniformityPenalty += 25;
7131
+ } else if (pct >= 91) {
7132
+ uniformityWarnings.push({ dimension: dim, dominantChoice, percentage: pct });
7133
+ uniformityPenalty += 10;
7134
+ }
7135
+ }
7136
+ const allA = answers.every((a) => a.answer === "A");
7137
+ const allB = answers.every((a) => a.answer === "B");
7138
+ if (allA || allB) {
7139
+ uniformityPenalty += 50;
7140
+ }
7141
+ const uniformityScore = Math.max(0, 100 - uniformityPenalty);
7142
+ const score = Math.round(mirrorScore * 0.6 + uniformityScore * 0.4);
7143
+ const suspicious = uniformityWarnings.length >= 3 || // 3+ dimensions are extreme
7144
+ (allA || allB) || // literally all same answer
7145
+ uniformityScore < 30;
7107
7146
  return {
7108
7147
  score,
7148
+ mirrorScore,
7149
+ uniformityScore,
7109
7150
  totalPairs,
7110
7151
  consistentPairs: consistentCount,
7111
- inconsistentPairs
7152
+ inconsistentPairs,
7153
+ uniformityWarnings,
7154
+ suspicious
7112
7155
  };
7113
7156
  }
7114
7157
 
@@ -7302,7 +7345,10 @@ async function goCommand(options) {
7302
7345
  }
7303
7346
  printSectionHeader(`Phase 2: Personality Test (${questions.length} questions)`);
7304
7347
  console.log(
7305
- chalk4.dim(" Answer as yourself. Your reasoning helps validate consistency.")
7348
+ chalk4.dim(" Read each question carefully. Explain your thinking first,")
7349
+ );
7350
+ console.log(
7351
+ chalk4.dim(" then choose A or B based on your reasoning.")
7306
7352
  );
7307
7353
  console.log(
7308
7354
  chalk4.dim(" Your reasoning stays local and is never uploaded.")
@@ -7316,12 +7362,12 @@ async function goCommand(options) {
7316
7362
  console.log(` A) ${q.optionA}`);
7317
7363
  console.log(` B) ${q.optionB}`);
7318
7364
  console.log("");
7319
- const choice = await askChoice(rl, " Choice (A/B): ", ["A", "B"]);
7320
- answers.push({ questionId: q.id, answer: choice });
7321
- const reason = (await ask(rl, " Brief reason: ")).trim();
7365
+ const reason = (await ask(rl, " Explain your thinking about this question first:\n > ")).trim();
7322
7366
  if (reason) {
7323
7367
  reasons.set(q.id, reason);
7324
7368
  }
7369
+ const choice = await askChoice(rl, " Based on your reasoning, choose (A/B): ", ["A", "B"]);
7370
+ answers.push({ questionId: q.id, answer: choice });
7325
7371
  printProgress(i + 1, questions.length);
7326
7372
  console.log("");
7327
7373
  const encouragement = getEncouragement(i + 1, questions.length);
@@ -7337,8 +7383,28 @@ async function goCommand(options) {
7337
7383
  const consistencyLabel = consistency.score >= 90 ? "highly consistent" : consistency.score >= 70 ? "consistent" : consistency.score >= 60 ? "moderately consistent" : "low consistency";
7338
7384
  const consistencyColor = consistency.score >= 70 ? chalk4.green : consistency.score >= 60 ? chalk4.yellow : chalk4.red;
7339
7385
  console.log(
7340
- ` Consistency check: ${consistencyColor(`${consistency.score}%`)} ${consistency.score >= 60 ? chalk4.green("(") + consistencyColor(consistencyLabel) + chalk4.green(")") : chalk4.red("(") + consistencyColor(consistencyLabel) + chalk4.red(")")}`
7386
+ ` Mirror consistency: ${consistencyColor(`${consistency.mirrorScore}%`)}`
7387
+ );
7388
+ console.log(
7389
+ ` Answer diversity: ${consistency.uniformityScore >= 70 ? chalk4.green(`${consistency.uniformityScore}%`) : consistency.uniformityScore >= 40 ? chalk4.yellow(`${consistency.uniformityScore}%`) : chalk4.red(`${consistency.uniformityScore}%`)}`
7390
+ );
7391
+ console.log(
7392
+ ` Overall score: ${consistencyColor(`${consistency.score}%`)} ${consistencyColor(`(${consistencyLabel})`)}`
7341
7393
  );
7394
+ if (consistency.uniformityWarnings.length > 0) {
7395
+ console.log("");
7396
+ console.log(chalk4.yellow(" \u26A0 Some dimensions show unusually uniform answers:"));
7397
+ for (const w of consistency.uniformityWarnings) {
7398
+ console.log(chalk4.yellow(` ${w.dimension}: ${w.percentage}% chose ${w.dominantChoice} \u2014 real personalities show more nuance`));
7399
+ }
7400
+ console.log(chalk4.dim(" A genuine personality typically shows 60-85% in the dominant direction."));
7401
+ }
7402
+ if (consistency.suspicious) {
7403
+ console.log("");
7404
+ console.log(chalk4.red(" \u26A0 Suspicious pattern detected"));
7405
+ console.log(chalk4.red(" Answers appear mechanical rather than reflecting genuine personality."));
7406
+ console.log(chalk4.red(" Ensure you are answering based on your actual values and tendencies."));
7407
+ }
7342
7408
  console.log("");
7343
7409
  if (consistency.score < 60) {
7344
7410
  console.log(
@@ -7346,7 +7412,7 @@ async function goCommand(options) {
7346
7412
  );
7347
7413
  console.log(
7348
7414
  chalk4.red(
7349
- " Your answers showed contradictions on several dimensions."
7415
+ " Your answers showed contradictions or mechanical patterns."
7350
7416
  )
7351
7417
  );
7352
7418
  console.log(
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openanima",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "OpenAnima CLI — Register, test, and join your AI agent in one command",
5
5
  "bin": {
6
6
  "openanima": "./dist/bin/index.js"