@adam0white/human-framework 2.23.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 (43) hide show
  1. package/README.md +169 -55
  2. package/dist/agenda/agenda.js +1 -1
  3. package/dist/beliefs/beliefs.js +2 -2
  4. package/dist/cognition/cognition.d.ts +6 -1
  5. package/dist/cognition/cognition.js +1 -1
  6. package/dist/conscience/conscience.d.ts +2 -4
  7. package/dist/conscience/conscience.js +3 -5
  8. package/dist/conversation/conversation.d.ts +0 -41
  9. package/dist/conversation/conversation.js +5 -5
  10. package/dist/core/index.d.ts +0 -1
  11. package/dist/core/index.js +0 -1
  12. package/dist/core/libm.js +20 -0
  13. package/dist/core/math.d.ts +0 -2
  14. package/dist/core/math.js +3 -3
  15. package/dist/family/family.d.ts +5 -6
  16. package/dist/family/family.js +34 -12
  17. package/dist/habits/habits.js +5 -5
  18. package/dist/impression.d.ts +6 -8
  19. package/dist/impression.js +7 -9
  20. package/dist/index.d.ts +2 -1
  21. package/dist/index.js +2 -1
  22. package/dist/longrun.d.ts +2 -2
  23. package/dist/longrun.js +1 -2
  24. package/dist/memory/memory.d.ts +0 -4
  25. package/dist/memory/memory.js +20 -6
  26. package/dist/migrate.js +5 -0
  27. package/dist/person.d.ts +11 -4
  28. package/dist/person.js +24 -7
  29. package/dist/persona.js +2 -1
  30. package/dist/prospection/forecast.d.ts +10 -5
  31. package/dist/prospection/forecast.js +11 -6
  32. package/dist/sim/index.d.ts +1 -1
  33. package/dist/sim/index.js +1 -1
  34. package/dist/sim/longrun.d.ts +24 -6
  35. package/dist/sim/longrun.js +43 -13
  36. package/dist/sim/sim.d.ts +28 -2
  37. package/dist/sim/sim.js +146 -36
  38. package/dist/social/impressions.d.ts +0 -12
  39. package/dist/social/impressions.js +13 -8
  40. package/dist/social/social.js +2 -2
  41. package/dist/types.d.ts +5 -2
  42. package/dist/types.js +5 -2
  43. package/package.json +1 -1
@@ -12,7 +12,7 @@
12
12
  * further down; insiders, outsiders and threats in `groups.ts`); the
13
13
  * coefficients are engineering defaults, not calibrated estimates.
14
14
  */
15
- import { clamp, clamp01, clampSigned, cmpStr, decay, dlog, expit, round } from '../core/index.js';
15
+ import { clamp, clamp01, clampSigned, cmpStr, decay, dlog, round, sigmoid } from '../core/index.js';
16
16
  import { MINUTES_PER_DAY, MINUTES_PER_YEAR } from '../types.js';
17
17
  import { careFor } from './groups.js';
18
18
  import { regardOf } from './impressions.js';
@@ -554,7 +554,7 @@ export function reputation(people, targetId, table = REPUTATION_TRAITS) {
554
554
  continue;
555
555
  knows = true;
556
556
  const slot = traitSum[parsed.trait] ?? { sum: 0, n: 0 };
557
- slot.sum += expit(b.logOdds);
557
+ slot.sum += sigmoid(b.logOdds);
558
558
  slot.n += 1;
559
559
  traitSum[parsed.trait] = slot;
560
560
  }
package/dist/types.d.ts CHANGED
@@ -879,7 +879,10 @@ export interface Activity {
879
879
  }
880
880
  export declare const PERSON_SCHEMA = "human/person@1";
881
881
  /**
882
- * Current: 2.3.0 (2026-10-17): optional temporal goals and received consequences.
882
+ * Engine compatibility stamp. Package versions and engine versions may differ.
883
+ * See CHANGELOG.md for current changes and migrate.ts for supported saved versions.
884
+ *
885
+ * 2.3.0 (2026-10-17): optional temporal goals and received consequences.
883
886
  * 2.2.0 (2026-10-14): method evidence grades each action independently.
884
887
  * Successful alternatives no longer count as failures of another action. Person state shape is unchanged.
885
888
  * 2.1.0 saves migrate by stamping the version.
@@ -915,7 +918,7 @@ export declare const PERSON_SCHEMA = "human/person@1";
915
918
  * and an activity that would cover a closing stretch is reviewed when the stretch begins (`isUnderWay`,
916
919
  * `dutyReviewAt`). Person shape unchanged.
917
920
  */
918
- export declare const ENGINE_VERSION = "2.23.0";
921
+ export declare const ENGINE_VERSION = "3.1.0";
919
922
  /** A pregnancy carried by this person (host-driven; see `family/`). */
920
923
  export interface Pregnancy {
921
924
  fatherId: PersonId;
package/dist/types.js CHANGED
@@ -84,7 +84,10 @@ export const EMOTIONS = [
84
84
  // ---------------------------------------------------------------------------------------------
85
85
  export const PERSON_SCHEMA = 'human/person@1';
86
86
  /**
87
- * Current: 2.3.0 (2026-10-17): optional temporal goals and received consequences.
87
+ * Engine compatibility stamp. Package versions and engine versions may differ.
88
+ * See CHANGELOG.md for current changes and migrate.ts for supported saved versions.
89
+ *
90
+ * 2.3.0 (2026-10-17): optional temporal goals and received consequences.
88
91
  * 2.2.0 (2026-10-14): method evidence grades each action independently.
89
92
  * Successful alternatives no longer count as failures of another action. Person state shape is unchanged.
90
93
  * 2.1.0 saves migrate by stamping the version.
@@ -120,4 +123,4 @@ export const PERSON_SCHEMA = 'human/person@1';
120
123
  * and an activity that would cover a closing stretch is reviewed when the stretch begins (`isUnderWay`,
121
124
  * `dutyReviewAt`). Person shape unchanged.
122
125
  */
123
- export const ENGINE_VERSION = '2.23.0';
126
+ export const ENGINE_VERSION = '3.1.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adam0white/human-framework",
3
- "version": "2.23.0",
3
+ "version": "3.1.0",
4
4
  "description": "Deterministic, explainable simulated people: body, needs, affect, memory, beliefs, skills, habits, relationships, values and a will that can refuse a suggestion",
5
5
  "keywords": [
6
6
  "simulation",