@adam0white/human-framework 2.2.1 → 2.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/types.d.ts CHANGED
@@ -543,6 +543,10 @@ export interface Goal {
543
543
  status: 'active' | 'achieved' | 'abandoned';
544
544
  adoptedAt: Minute;
545
545
  deadline?: Minute;
546
+ /** Opt-in expected completion valuation; deadline remains urgency, never a cutoff. */
547
+ temporal?: {
548
+ halfLifeMinutes: number;
549
+ };
546
550
  /** Last minute the goal was advanced (or adopted); neglect is counted from here. */
547
551
  lastAdvancedAt?: Minute;
548
552
  /** Importance before neglect decay; `revisePurposes` recomputes `importance` from it. */
@@ -787,7 +791,8 @@ export interface Activity {
787
791
  }
788
792
  export declare const PERSON_SCHEMA = "human/person@1";
789
793
  /**
790
- * Current: 2.2.0 (2026-10-14): method evidence grades each action independently.
794
+ * Current: 2.3.0 (2026-10-17): optional temporal goals and received consequences.
795
+ * 2.2.0 (2026-10-14): method evidence grades each action independently.
791
796
  * Successful alternatives no longer count as failures of another action. Person state shape is unchanged.
792
797
  * 2.1.0 saves migrate by stamping the version.
793
798
  *
@@ -822,7 +827,7 @@ export declare const PERSON_SCHEMA = "human/person@1";
822
827
  * and an activity that would cover a closing stretch is reviewed when the stretch begins (`isUnderWay`,
823
828
  * `dutyReviewAt`). Person shape unchanged.
824
829
  */
825
- export declare const ENGINE_VERSION = "2.2.0";
830
+ export declare const ENGINE_VERSION = "2.4.0";
826
831
  /** A pregnancy carried by this person (host-driven; see `family/`). */
827
832
  export interface Pregnancy {
828
833
  fatherId: PersonId;
@@ -923,6 +928,49 @@ export interface MethodsState {
923
928
  cues: MethodCue[];
924
929
  };
925
930
  }
931
+ /** Exact current-action identity; omitted target/place match only omitted values. */
932
+ export interface ConsequenceAction {
933
+ action: string;
934
+ targetId?: EntityId;
935
+ placeId?: EntityId;
936
+ }
937
+ /** A received conditional opportunity, never another person's consent or an actual outcome. */
938
+ export interface ReceivedConsequence {
939
+ id: string;
940
+ revision: number;
941
+ trigger: ConsequenceAction;
942
+ successor: ConsequenceAction & {
943
+ duration: number;
944
+ effort: Unit;
945
+ focus?: Unit;
946
+ materialCost?: number;
947
+ };
948
+ availableFrom: Minute;
949
+ /** Latest permitted successor completion, inclusive. */
950
+ availableUntil: Minute;
951
+ expiresAt: Minute;
952
+ /** P(access | trigger completes successfully), not consent. */
953
+ chance: Unit;
954
+ confidence: Unit;
955
+ }
956
+ export interface ConsequenceRevision {
957
+ sourceId: EntityId;
958
+ id: string;
959
+ revision: number;
960
+ receivedAt: Minute;
961
+ }
962
+ export interface RetainedConsequence extends ReceivedConsequence {
963
+ sourceId: EntityId;
964
+ channel: 'told';
965
+ receivedAt: Minute;
966
+ /** Own completed trigger; does not establish access or goal progress. */
967
+ triggeredAt?: Minute;
968
+ }
969
+ /** Optional person-owned received knowledge. Deduplication lasts only within bounded revision memory. */
970
+ export interface ProspectionState {
971
+ entries: RetainedConsequence[];
972
+ revisions: ConsequenceRevision[];
973
+ }
926
974
  export interface Person {
927
975
  schema: typeof PERSON_SCHEMA;
928
976
  /** Engine version that last wrote this state. */
@@ -942,6 +990,10 @@ export interface Person {
942
990
  skills: Record<string, Skill>;
943
991
  /** Acquired conditional method evidence and current received cues; absent until used. */
944
992
  methods?: MethodsState;
993
+ /** Received future consequences, absent until attended testimony supplies them. */
994
+ prospection?: ProspectionState;
995
+ /** Noticed promptings and practised turnings-away (2.4.0, opt-in via `enablePromptings`). Owned by `promptings/`. */
996
+ promptings?: PromptingsState;
945
997
  /** Practice consolidation (1.8.0, opt-in via `enableSkillRetention`). Owned by `skills/`. */
946
998
  skillRetention?: {
947
999
  consolidationHours: number;
@@ -1107,6 +1159,12 @@ export interface Percept {
1107
1159
  minutes: number;
1108
1160
  domain?: LearningDomain;
1109
1161
  };
1162
+ /** At most four additions/withdrawals combined; attended external testimony to this person or a broadcast. */
1163
+ consequences?: readonly ReceivedConsequence[];
1164
+ withdrawConsequences?: readonly {
1165
+ id: string;
1166
+ revision: number;
1167
+ }[];
1110
1168
  }
1111
1169
  /**
1112
1170
  * Domains with distinct age curves for learning rate (`lifecourse.learningMultiplier`). 'general' is
@@ -1239,7 +1297,8 @@ export interface SuggestionResolution {
1239
1297
  export interface Term {
1240
1298
  /** 'need:food', 'norm:salah', 'commitment:c3', 'commitment' (promise inertia of the running activity),
1241
1299
  * 'goal:g1', 'habit', 'emotion:fear:risky' (emotion id, then the tag it acts through), 'effort', 'risk',
1242
- * 'suggestion:player', 'social:p2', 'expectation', 'autonomy' (reactance to a pushing voice) */
1300
+ * 'suggestion:player', 'social:p2', 'expectation', 'autonomy' (reactance to a pushing voice),
1301
+ * 'promptings:turn' (a practised turning-away), 'promptings:echo' (recurrence under the `fault` reading) */
1243
1302
  source: string;
1244
1303
  value: number;
1245
1304
  }
@@ -1327,8 +1386,63 @@ export interface PersonSpec {
1327
1386
  yearbook?: boolean;
1328
1387
  character?: boolean;
1329
1388
  skillRetention?: boolean;
1389
+ /** Promptings and turning away (2.4.0): the same as `enablePromptings(p, spec)` after creation. */
1390
+ promptings?: PromptingsSpec;
1330
1391
  };
1331
1392
  }
1393
+ /**
1394
+ * How a person understands their own unwanted inner pulls (a held reading, set by the host, with provenance).
1395
+ * `whisper`, `inclination` and `intrusion` share mechanics and differ only in vocabulary; `fault` (the scrupulous
1396
+ * reading) adds guilt at the prompt itself; `none` is neutral vocabulary. See research/reconciliation.md §5.
1397
+ */
1398
+ export type PromptingReading = 'whisper' | 'inclination' | 'intrusion' | 'fault' | 'none';
1399
+ /** A practised turning-away: seeking refuge, redirecting attention, or simply leaving the thought. */
1400
+ export type PromptingResponseKind = 'refuge' | 'redirect' | 'leave';
1401
+ export interface PromptingResponse {
1402
+ id: string;
1403
+ kind: PromptingResponseKind;
1404
+ /** Skill-like practice 0..1 as of `lastUsedAt`; it decays slowly with disuse. */
1405
+ practice: Unit;
1406
+ lastUsedAt: Minute;
1407
+ }
1408
+ export interface PromptingRecord {
1409
+ at: Minute;
1410
+ action: string;
1411
+ affordanceId: string;
1412
+ /** The strongest pull: 'habit', 'emotion:*', 'need:*', 'promptings:echo' or 'host' (a `temptation` tag). */
1413
+ source: string;
1414
+ /** The opposing term: 'norm:x' or 'goal:g'. */
1415
+ opposedBy: string;
1416
+ outcome: 'passed' | 'turned' | 'assented';
1417
+ /** The response that was practised at this prompt, if any. */
1418
+ responseId?: string;
1419
+ }
1420
+ export interface PromptingsState {
1421
+ reading: PromptingReading;
1422
+ /** Provenance of the reading (upbringing, a teacher, a book id), as for held norms. */
1423
+ readingSource?: string;
1424
+ responses: PromptingResponse[];
1425
+ /** Recent prompts, oldest first, bounded (`PROMPTINGS_DEFAULTS.maxRecent`). */
1426
+ recent: PromptingRecord[];
1427
+ /** Recurrence per action under the `fault` reading (an off-by-default assumption; see `echoRate`). */
1428
+ echo: Record<string, {
1429
+ level: Unit;
1430
+ at: Minute;
1431
+ }>;
1432
+ /** Echo gained per prompt under `fault`. Default 0: the recurrence term is a host-set assumption (P3 contested). */
1433
+ echoRate: number;
1434
+ }
1435
+ /** What a host hands `enablePromptings`. */
1436
+ export interface PromptingsSpec {
1437
+ reading?: PromptingReading;
1438
+ readingSource?: string;
1439
+ responses?: {
1440
+ id: string;
1441
+ kind: PromptingResponseKind;
1442
+ practice?: Unit;
1443
+ }[];
1444
+ echoRate?: number;
1445
+ }
1332
1446
  /** What the body is doing over an interval. */
1333
1447
  export interface BodyLoad {
1334
1448
  effort: Unit;
package/dist/types.js CHANGED
@@ -84,7 +84,8 @@ export const EMOTIONS = [
84
84
  // ---------------------------------------------------------------------------------------------
85
85
  export const PERSON_SCHEMA = 'human/person@1';
86
86
  /**
87
- * Current: 2.2.0 (2026-10-14): method evidence grades each action independently.
87
+ * Current: 2.3.0 (2026-10-17): optional temporal goals and received consequences.
88
+ * 2.2.0 (2026-10-14): method evidence grades each action independently.
88
89
  * Successful alternatives no longer count as failures of another action. Person state shape is unchanged.
89
90
  * 2.1.0 saves migrate by stamping the version.
90
91
  *
@@ -119,4 +120,4 @@ export const PERSON_SCHEMA = 'human/person@1';
119
120
  * and an activity that would cover a closing stretch is reviewed when the stretch begins (`isUnderWay`,
120
121
  * `dutyReviewAt`). Person shape unchanged.
121
122
  */
122
- export const ENGINE_VERSION = '2.2.0';
123
+ export const ENGINE_VERSION = '2.4.0';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adam0white/human-framework",
3
- "version": "2.2.1",
3
+ "version": "2.4.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",