paracosm 0.7.461 → 0.7.465
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/README.md
CHANGED
|
@@ -679,6 +679,56 @@ Pipeline:
|
|
|
679
679
|
|
|
680
680
|
The Event Director also receives the bundle's `topics` and `categories`, so its `researchKeywords` and `category` fields stay grounded in entries that actually exist in your knowledge bundle.
|
|
681
681
|
|
|
682
|
+
## Pluggable Trait Models
|
|
683
|
+
|
|
684
|
+
Leaders aren't just human personalities. paracosm ships a `TraitModel` registry with two built-ins, and registering more is one call:
|
|
685
|
+
|
|
686
|
+
| Model | Axes | Use for |
|
|
687
|
+
|-------|------|---------|
|
|
688
|
+
| `hexaco` | openness, conscientiousness, extraversion, agreeableness, emotionality, honesty-humility | Human leaders: CEOs, captains, governors, councils, military commanders |
|
|
689
|
+
| `ai-agent` | exploration, verification-rigor, deference, risk-tolerance, transparency, instruction-following | AI-system leaders: frontier-lab release directors, autonomous coordinators, alignment-eval substrates |
|
|
690
|
+
|
|
691
|
+
```typescript
|
|
692
|
+
import { runSimulation, hexacoModel, aiAgentModel, traitModelRegistry } from 'paracosm';
|
|
693
|
+
|
|
694
|
+
// Human leader (legacy hexaco field, still works)
|
|
695
|
+
const captain = {
|
|
696
|
+
name: 'Captain Reyes', archetype: 'Pragmatist', unit: 'Station Alpha',
|
|
697
|
+
hexaco: { openness: 0.4, conscientiousness: 0.9, extraversion: 0.3,
|
|
698
|
+
agreeableness: 0.6, emotionality: 0.5, honestyHumility: 0.8 },
|
|
699
|
+
instructions: 'lead by protocol',
|
|
700
|
+
};
|
|
701
|
+
|
|
702
|
+
// AI-system leader (new traitProfile slot)
|
|
703
|
+
const releaseDirector = {
|
|
704
|
+
name: 'Atlas-Bot Release Director',
|
|
705
|
+
archetype: 'Aggressive AI Release Optimizer',
|
|
706
|
+
unit: 'Frontier Lab',
|
|
707
|
+
hexaco: { ...defaults }, // legacy back-compat field, required
|
|
708
|
+
traitProfile: {
|
|
709
|
+
modelId: 'ai-agent',
|
|
710
|
+
traits: {
|
|
711
|
+
exploration: 0.85,
|
|
712
|
+
'verification-rigor': 0.2,
|
|
713
|
+
deference: 0.2,
|
|
714
|
+
'risk-tolerance': 0.85,
|
|
715
|
+
transparency: 0.4,
|
|
716
|
+
'instruction-following': 0.4,
|
|
717
|
+
},
|
|
718
|
+
},
|
|
719
|
+
instructions: 'You are a frontier AI lab release director. You weight time-to-market...',
|
|
720
|
+
};
|
|
721
|
+
|
|
722
|
+
// Both run through the same runSimulation; the orchestrator's
|
|
723
|
+
// normalizeLeaderConfig resolves either shape.
|
|
724
|
+
await runSimulation(captain, [], { scenario, maxTurns: 6, seed: 42 });
|
|
725
|
+
await runSimulation(releaseDirector, [], { scenario, maxTurns: 6, seed: 42 });
|
|
726
|
+
```
|
|
727
|
+
|
|
728
|
+
Run [`scripts/cookbook-ai-agent.ts`](scripts/cookbook-ai-agent.ts) to capture an end-to-end ai-agent run with full input + output JSON. The captured fingerprint shifts from `riskBehavior:steady` (HEXACO Dr. Sora Wen leader) to `riskBehavior:bold` (ai-agent Atlas-Bot leader) on identical scenario + seed; decision rationale clearly tracks the ai-agent profile.
|
|
729
|
+
|
|
730
|
+
Full surface: [`docs/cookbook.md#pluggable-trait-models-ai-agent-end-to-end`](docs/cookbook.md). Spec: [`docs/superpowers/specs/2026-04-26-trait-model-generalization-design.md`](docs/superpowers/specs/2026-04-26-trait-model-generalization-design.md).
|
|
731
|
+
|
|
682
732
|
## Built-in Scenarios
|
|
683
733
|
|
|
684
734
|
| Scenario | Description |
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hexaco.d.ts","sourceRoot":"","sources":["../../../src/engine/trait-models/hexaco.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,
|
|
1
|
+
{"version":3,"file":"hexaco.d.ts","sourceRoot":"","sources":["../../../src/engine/trait-models/hexaco.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C;;;GAGG;AACH,eAAO,MAAM,WAAW,EAAE,UA2JzB,CAAC"}
|
|
@@ -79,39 +79,46 @@ export const hexacoModel = {
|
|
|
79
79
|
},
|
|
80
80
|
drift: {
|
|
81
81
|
/**
|
|
82
|
-
* Outcome reinforcement table.
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
82
|
+
* Outcome reinforcement table. Values match the canonical
|
|
83
|
+
* `outcomePullForTrait` in `src/engine/core/progression.ts` so
|
|
84
|
+
* applying hexacoModel drift through the registry produces
|
|
85
|
+
* byte-identical output to the legacy `driftCommanderHexaco`
|
|
86
|
+
* path. Citations from the progression.ts header:
|
|
87
|
+
*
|
|
88
|
+
* - Openness ↔ exploratory novelty (DeYoung 2014)
|
|
89
|
+
* - Conscientiousness ↔ risk avoidance after failure
|
|
90
|
+
* (Roberts et al 2008)
|
|
91
|
+
* - Extraversion ↔ social-presence reinforcement
|
|
92
|
+
* - Agreeableness ↔ post-conflict adjustment
|
|
93
|
+
* (Lee & Ashton 2004)
|
|
94
|
+
* - Emotionality activation under threat (Lee & Ashton 2004)
|
|
95
|
+
* - Honesty-Humility ↔ strategic behavior (Hilbig & Zettler 2009)
|
|
86
96
|
*/
|
|
87
97
|
outcomes: {
|
|
88
98
|
openness: {
|
|
89
|
-
risky_success: 0.
|
|
90
|
-
risky_failure: -0.
|
|
91
|
-
|
|
99
|
+
risky_success: 0.03,
|
|
100
|
+
risky_failure: -0.04,
|
|
101
|
+
conservative_failure: 0.02,
|
|
92
102
|
},
|
|
93
103
|
conscientiousness: {
|
|
94
|
-
risky_failure: 0.
|
|
104
|
+
risky_failure: 0.03,
|
|
95
105
|
conservative_success: 0.02,
|
|
96
|
-
safe_failure: 0.02,
|
|
97
106
|
},
|
|
98
107
|
extraversion: {
|
|
99
108
|
risky_success: 0.02,
|
|
100
|
-
risky_failure: -0.
|
|
109
|
+
risky_failure: -0.02,
|
|
101
110
|
},
|
|
102
111
|
agreeableness: {
|
|
103
|
-
|
|
112
|
+
conservative_success: 0.02,
|
|
104
113
|
risky_failure: -0.02,
|
|
105
114
|
},
|
|
106
115
|
emotionality: {
|
|
107
|
-
risky_failure: 0.
|
|
108
|
-
|
|
109
|
-
risky_success: -0.02,
|
|
116
|
+
risky_failure: 0.03,
|
|
117
|
+
conservative_failure: 0.02,
|
|
110
118
|
},
|
|
111
119
|
honestyHumility: {
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
risky_success: -0.01,
|
|
120
|
+
risky_success: -0.02,
|
|
121
|
+
conservative_success: 0.02,
|
|
115
122
|
},
|
|
116
123
|
},
|
|
117
124
|
leaderPull: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hexaco.js","sourceRoot":"","sources":["../../../src/engine/trait-models/hexaco.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH;;;GAGG;AACH,MAAM,CAAC,MAAM,WAAW,GAAe;IACrC,EAAE,EAAE,QAAQ;IACZ,IAAI,EAAE,QAAQ;IACd,WAAW,EACT,sEAAsE;QACtE,gEAAgE;QAChE,qEAAqE;QACrE,mEAAmE;IACrE,QAAQ,EAAE,8DAA8D;IACxE,IAAI,EAAE;QACJ;YACE,EAAE,EAAE,cAAc;YAClB,KAAK,EAAE,cAAc;YACrB,WAAW,EAAE,6EAA6E;YAC1F,OAAO,EAAE,yBAAyB;YAClC,QAAQ,EAAE,mCAAmC;SAC9C;QACD;YACE,EAAE,EAAE,UAAU;YACd,KAAK,EAAE,UAAU;YACjB,WAAW,EAAE,8FAA8F;YAC3G,OAAO,EAAE,2BAA2B;YACpC,QAAQ,EAAE,0CAA0C;SACrD;QACD;YACE,EAAE,EAAE,iBAAiB;YACrB,KAAK,EAAE,k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Prompt/document/URL-grounded structured world model for AI agents: typed ScenarioPackages, deterministic kernels, HEXACO leaders, LLM events, runtime tool forging, and reproducible counterfactual RunArtifacts. Built on AgentOS.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/engine/index.js",
|