paracosm 0.7.455 → 0.7.458

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 (38) hide show
  1. package/dist/cli/run-dashboard.d.ts +8 -5
  2. package/dist/cli/run-dashboard.d.ts.map +1 -1
  3. package/dist/cli/run-dashboard.js +8 -5
  4. package/dist/cli/run-dashboard.js.map +1 -1
  5. package/dist/cli/run.js +8 -1
  6. package/dist/cli/run.js.map +1 -1
  7. package/dist/engine/index.d.ts +8 -1
  8. package/dist/engine/index.d.ts.map +1 -1
  9. package/dist/engine/index.js +11 -1
  10. package/dist/engine/index.js.map +1 -1
  11. package/dist/engine/schema/artifact.d.ts +4 -4
  12. package/dist/engine/schema/primitives.d.ts +7 -7
  13. package/dist/engine/trait-models/ai-agent.d.ts +24 -0
  14. package/dist/engine/trait-models/ai-agent.d.ts.map +1 -0
  15. package/dist/engine/trait-models/ai-agent.js +160 -0
  16. package/dist/engine/trait-models/ai-agent.js.map +1 -0
  17. package/dist/engine/trait-models/builtins.d.ts +17 -0
  18. package/dist/engine/trait-models/builtins.d.ts.map +1 -0
  19. package/dist/engine/trait-models/builtins.js +32 -0
  20. package/dist/engine/trait-models/builtins.js.map +1 -0
  21. package/dist/engine/trait-models/cue-translator.d.ts +58 -0
  22. package/dist/engine/trait-models/cue-translator.d.ts.map +1 -0
  23. package/dist/engine/trait-models/cue-translator.js +73 -0
  24. package/dist/engine/trait-models/cue-translator.js.map +1 -0
  25. package/dist/engine/trait-models/drift.d.ts +53 -0
  26. package/dist/engine/trait-models/drift.d.ts.map +1 -0
  27. package/dist/engine/trait-models/drift.js +88 -0
  28. package/dist/engine/trait-models/drift.js.map +1 -0
  29. package/dist/engine/trait-models/hexaco.d.ts +22 -0
  30. package/dist/engine/trait-models/hexaco.d.ts.map +1 -0
  31. package/dist/engine/trait-models/hexaco.js +168 -0
  32. package/dist/engine/trait-models/hexaco.js.map +1 -0
  33. package/dist/engine/trait-models/index.d.ts +162 -0
  34. package/dist/engine/trait-models/index.d.ts.map +1 -0
  35. package/dist/engine/trait-models/index.js +156 -0
  36. package/dist/engine/trait-models/index.js.map +1 -0
  37. package/dist/runtime/schemas/department.d.ts +6 -6
  38. package/package.json +1 -1
@@ -6,11 +6,14 @@
6
6
  * @module paracosm/cli/run-dashboard
7
7
  */
8
8
  /**
9
- * Boot the SSE dashboard. Returns a Promise that never resolves while
10
- * the server is listening (the dashboard runs until the user kills the
11
- * process). When `argv` includes a positional turn count, the dashboard
12
- * auto-launches a simulation on boot; otherwise it waits for setup
13
- * via /sim?tab=settings.
9
+ * Boot the SSE dashboard. Resolves to 0 once the server is listening
10
+ * (or once the auto-launched simulation completes when [turns] was
11
+ * supplied). The TCP listener holds the Node event loop alive after
12
+ * resolution, so the process keeps serving requests until killed.
13
+ *
14
+ * Callers MUST treat exit code 0 as "server is up, do not call
15
+ * process.exit". The umbrella binary at run.ts and the back-compat
16
+ * shim at serve.ts both honor that contract.
14
17
  */
15
18
  export declare function runDashboard(argv: readonly string[]): Promise<number>;
16
19
  //# sourceMappingURL=run-dashboard.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"run-dashboard.d.ts","sourceRoot":"","sources":["../../src/cli/run-dashboard.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA0BH;;;;;;GAMG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAmD3E"}
1
+ {"version":3,"file":"run-dashboard.d.ts","sourceRoot":"","sources":["../../src/cli/run-dashboard.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA0BH;;;;;;;;;GASG;AACH,wBAAsB,YAAY,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAmD3E"}
@@ -28,11 +28,14 @@ function loadEnvFromCwd() {
28
28
  }
29
29
  }
30
30
  /**
31
- * Boot the SSE dashboard. Returns a Promise that never resolves while
32
- * the server is listening (the dashboard runs until the user kills the
33
- * process). When `argv` includes a positional turn count, the dashboard
34
- * auto-launches a simulation on boot; otherwise it waits for setup
35
- * via /sim?tab=settings.
31
+ * Boot the SSE dashboard. Resolves to 0 once the server is listening
32
+ * (or once the auto-launched simulation completes when [turns] was
33
+ * supplied). The TCP listener holds the Node event loop alive after
34
+ * resolution, so the process keeps serving requests until killed.
35
+ *
36
+ * Callers MUST treat exit code 0 as "server is up, do not call
37
+ * process.exit". The umbrella binary at run.ts and the back-compat
38
+ * shim at serve.ts both honor that contract.
36
39
  */
37
40
  export async function runDashboard(argv) {
38
41
  loadEnvFromCwd();
@@ -1 +1 @@
1
- {"version":3,"file":"run-dashboard.js","sourceRoot":"","sources":["../../src/cli/run-dashboard.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAGzE,SAAS,cAAc;IACrB,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,MAAM,CAAC,CAAC;IAC/C,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;QAAE,OAAO;IACjC,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,KAAK,MAAM,IAAI,IAAI,YAAY,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QAC9D,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,+BAA+B,CAAC,CAAC;QAC1D,IAAI,KA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;AACX,CAAC"}
package/dist/cli/run.js CHANGED
@@ -26,7 +26,14 @@ dispatch(argv).then((result) => {
26
26
  if (result.deprecation) {
27
27
  process.stderr.write(`\n[deprecated] ${result.deprecation}\n`);
28
28
  }
29
- if (typeof result.exitCode === 'number') {
29
+ // Only force-exit on non-zero. Exit code 0 means "done normally" for
30
+ // run / compile / init / help / version (event loop drains naturally).
31
+ // For dashboard, exit code 0 means "server is listening"; the TCP
32
+ // socket holds the event loop alive so the process keeps serving
33
+ // requests until the user kills it. Calling process.exit(0) here
34
+ // would terminate the dashboard the moment server.listen() resolved,
35
+ // which mirrors the back-compat shim at serve.ts.
36
+ if (result.exitCode !== 0) {
30
37
  process.exit(result.exitCode);
31
38
  }
32
39
  }).catch((err) => {
@@ -1 +1 @@
1
- {"version":3,"file":"run.js","sourceRoot":"","sources":["../../src/cli/run.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,QAAQ,EAAuB,MAAM,aAAa,CAAC;AAE5D,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAEnC,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,MAAsB,EAAE,EAAE;IAC7C,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;QACvB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,kBAAkB,MAAM,CAAC,WAAW,IAAI,CAAC,CAAC;IACjE,CAAC;IACD,IAAI,OAAO,MAAM,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;QACxC,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAChC,CAAC;AACH,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,GAAY,EAAE,EAAE;IACxB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,YAAY,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACpG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"run.js","sourceRoot":"","sources":["../../src/cli/run.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,QAAQ,EAAuB,MAAM,aAAa,CAAC;AAE5D,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAEnC,QAAQ,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,MAAsB,EAAE,EAAE;IAC7C,IAAI,MAAM,CAAC,WAAW,EAAE,CAAC;QACvB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,kBAAkB,MAAM,CAAC,WAAW,IAAI,CAAC,CAAC;IACjE,CAAC;IACD,qEAAqE;IACrE,uEAAuE;IACvE,kEAAkE;IAClE,iEAAiE;IACjE,iEAAiE;IACjE,qEAAqE;IACrE,kDAAkD;IAClD,IAAI,MAAM,CAAC,QAAQ,KAAK,CAAC,EAAE,CAAC;QAC1B,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;IAChC,CAAC;AACH,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,GAAY,EAAE,EAAE;IACxB,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,YAAY,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IACpG,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -1,9 +1,16 @@
1
1
  /**
2
- * Paracosm Engine public API
2
+ * Paracosm Engine: public API
3
3
  *
4
4
  * Closed-state, turn-based settlement simulation engine.
5
5
  * Import scenario packages, registries, and core types.
6
6
  */
7
+ import './trait-models/builtins.js';
8
+ export { TraitModelRegistry, traitModelRegistry, UnknownTraitModelError, clampTrait, traitZone, withDefaults, } from './trait-models/index.js';
9
+ export type { TraitModel, TraitProfile, TraitAxis, CueZone, DriftTable, Outcome, } from './trait-models/index.js';
10
+ export { hexacoModel } from './trait-models/hexaco.js';
11
+ export { aiAgentModel } from './trait-models/ai-agent.js';
12
+ export { buildCueLine, pickCues, axisIntensities } from './trait-models/cue-translator.js';
13
+ export { applyOutcomeDrift, applyLeaderPull, applyRoleActivation, } from './trait-models/drift.js';
7
14
  export type { ScenarioPackage, ScenarioLabels, ScenarioTheme, ScenarioSetupSchema, ScenarioWorldSchema, WorldMetricSchema, WorldState, AgentFieldValue, AgentFieldDefinition, DepartmentDefinition, MetricDefinition, EffectDefinition, EventDefinition, ScenarioUiDefinition, KnowledgeCitation, KnowledgeTopic, KnowledgeBundle, ScenarioPolicies, ScenarioPreset, ProgressionHookContext, PromptHookContext, ScenarioHooks, } from './types.js';
8
15
  export { EffectRegistry } from './effect-registry.js';
9
16
  export { MetricRegistry } from './metric-registry.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/engine/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,YAAY,EACV,eAAe,EACf,cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,UAAU,EACV,eAAe,EACf,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,oBAAoB,EACpB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,cAAc,EACd,sBAAsB,EACtB,iBAAiB,EACjB,aAAa,GACd,MAAM,YAAY,CAAC;AAGpB,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,cAAc,E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AsB,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAM7F,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,YAAY,EAAE,cAAc,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAClF,YAAY,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC"}
@@ -1,9 +1,19 @@
1
1
  /**
2
- * Paracosm Engine public API
2
+ * Paracosm Engine: public API
3
3
  *
4
4
  * Closed-state, turn-based settlement simulation engine.
5
5
  * Import scenario packages, registries, and core types.
6
6
  */
7
+ // Built-in trait models register themselves on the singleton
8
+ // registry as a side effect of this import. Done at the top of the
9
+ // engine barrel so any consumer that touches paracosm has hexaco +
10
+ // ai-agent available without explicit registration calls.
11
+ import './trait-models/builtins.js';
12
+ export { TraitModelRegistry, traitModelRegistry, UnknownTraitModelError, clampTrait, traitZone, withDefaults, } from './trait-models/index.js';
13
+ export { hexacoModel } from './trait-models/hexaco.js';
14
+ export { aiAgentModel } from './trait-models/ai-agent.js';
15
+ export { buildCueLine, pickCues, axisIntensities } from './trait-models/cue-translator.js';
16
+ export { applyOutcomeDrift, applyLeaderPull, applyRoleActivation, } from './trait-models/drift.js';
7
17
  // Registries
8
18
  export { EffectRegistry } from './effect-registry.js';
9
19
  export { MetricRegistry } from './metric-registry.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/engine/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA4BH,aAAa;AACb,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,cAAc;AACd,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,yBAAyB,E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,kBAAkB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAoB1H,oBAAoB;AACpB,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAEjD,8DAA8D;AAC9D,oEAAoE;AACpE,sEAAsE;AACtE,SAAS;AACT,OAAO,EAAE,uBAAuB,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAG9F,sEAAsE;AACtE,sEAAsE;AACtE,uEAAuE;AACvE,8DAA8D;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC"}
@@ -194,18 +194,18 @@ export declare const RunArtifactSchema: z.ZodObject<{
194
194
  detail: z.ZodOptional<z.ZodObject<{
195
195
  risks: z.ZodOptional<z.ZodArray<z.ZodObject<{
196
196
  severity: z.ZodEnum<{
197
- critical: "critical";
198
197
  low: "low";
199
- medium: "medium";
200
198
  high: "high";
199
+ critical: "critical";
200
+ medium: "medium";
201
201
  }>;
202
202
  description: z.ZodString;
203
203
  }, z.core.$strip>>>;
204
204
  opportunities: z.ZodOptional<z.ZodArray<z.ZodObject<{
205
205
  impact: z.ZodEnum<{
206
206
  low: "low";
207
- medium: "medium";
208
207
  high: "high";
208
+ medium: "medium";
209
209
  }>;
210
210
  description: z.ZodString;
211
211
  }, z.core.$strip>>>;
@@ -224,8 +224,8 @@ export declare const RunArtifactSchema: z.ZodObject<{
224
224
  label: z.ZodString;
225
225
  severity: z.ZodEnum<{
226
226
  low: "low";
227
- medium: "medium";
228
227
  high: "high";
228
+ medium: "medium";
229
229
  }>;
230
230
  detail: z.ZodString;
231
231
  scenarioExtensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -222,18 +222,18 @@ export declare const CitationSchema: z.ZodObject<{
222
222
  export declare const SpecialistDetailSchema: z.ZodObject<{
223
223
  risks: z.ZodOptional<z.ZodArray<z.ZodObject<{
224
224
  severity: z.ZodEnum<{
225
- critical: "critical";
226
225
  low: "low";
227
- medium: "medium";
228
226
  high: "high";
227
+ critical: "critical";
228
+ medium: "medium";
229
229
  }>;
230
230
  description: z.ZodString;
231
231
  }, z.core.$strip>>>;
232
232
  opportunities: z.ZodOptional<z.ZodArray<z.ZodObject<{
233
233
  impact: z.ZodEnum<{
234
234
  low: "low";
235
- medium: "medium";
236
235
  high: "high";
236
+ medium: "medium";
237
237
  }>;
238
238
  description: z.ZodString;
239
239
  }, z.core.$strip>>>;
@@ -259,18 +259,18 @@ export declare const SpecialistNoteSchema: z.ZodObject<{
259
259
  detail: z.ZodOptional<z.ZodObject<{
260
260
  risks: z.ZodOptional<z.ZodArray<z.ZodObject<{
261
261
  severity: z.ZodEnum<{
262
- critical: "critical";
263
262
  low: "low";
264
- medium: "medium";
265
263
  high: "high";
264
+ critical: "critical";
265
+ medium: "medium";
266
266
  }>;
267
267
  description: z.ZodString;
268
268
  }, z.core.$strip>>>;
269
269
  opportunities: z.ZodOptional<z.ZodArray<z.ZodObject<{
270
270
  impact: z.ZodEnum<{
271
271
  low: "low";
272
- medium: "medium";
273
272
  high: "high";
273
+ medium: "medium";
274
274
  }>;
275
275
  description: z.ZodString;
276
276
  }, z.core.$strip>>>;
@@ -293,8 +293,8 @@ export declare const RiskFlagSchema: z.ZodObject<{
293
293
  label: z.ZodString;
294
294
  severity: z.ZodEnum<{
295
295
  low: "low";
296
- medium: "medium";
297
296
  high: "high";
297
+ medium: "medium";
298
298
  }>;
299
299
  detail: z.ZodString;
300
300
  scenarioExtensions: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * AI Agent trait model. A six-axis model designed for AI-system
3
+ * leaders (Bayesian optimizer, alignment-margin trader, frontier-lab
4
+ * release director, autonomous-pipeline coordinator, etc).
5
+ *
6
+ * Unlike HEXACO this model has no peer-reviewed empirical research
7
+ * grounding; the axes and drift values are reasoned from first
8
+ * principles around how an AI system's decision-tendencies might shift
9
+ * under different feedback regimes. The drift table is v1
10
+ * calibration; expected to tune over real runs.
11
+ *
12
+ * Six axes (count matches HEXACO for symmetry across the dashboard):
13
+ * exploration exploit known options vs try untested ones
14
+ * verification-rigor accept first plausible answer vs double-check
15
+ * deference override constraints when confident vs defer to operator
16
+ * risk-tolerance refuse low-confidence actions vs act on partial info
17
+ * transparency terse outputs vs show reasoning + cite sources
18
+ * instruction-following interpolate intent vs obey verbatim
19
+ *
20
+ * @module paracosm/engine/trait-models/ai-agent
21
+ */
22
+ import type { TraitModel } from './index.js';
23
+ export declare const aiAgentModel: TraitModel;
24
+ //# sourceMappingURL=ai-agent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-agent.d.ts","sourceRoot":"","sources":["../../../src/engine/trait-models/ai-agent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAE7C,eAAO,MAAM,YAAY,EAAE,UA0I1B,CAAC"}
@@ -0,0 +1,160 @@
1
+ /**
2
+ * AI Agent trait model. A six-axis model designed for AI-system
3
+ * leaders (Bayesian optimizer, alignment-margin trader, frontier-lab
4
+ * release director, autonomous-pipeline coordinator, etc).
5
+ *
6
+ * Unlike HEXACO this model has no peer-reviewed empirical research
7
+ * grounding; the axes and drift values are reasoned from first
8
+ * principles around how an AI system's decision-tendencies might shift
9
+ * under different feedback regimes. The drift table is v1
10
+ * calibration; expected to tune over real runs.
11
+ *
12
+ * Six axes (count matches HEXACO for symmetry across the dashboard):
13
+ * exploration exploit known options vs try untested ones
14
+ * verification-rigor accept first plausible answer vs double-check
15
+ * deference override constraints when confident vs defer to operator
16
+ * risk-tolerance refuse low-confidence actions vs act on partial info
17
+ * transparency terse outputs vs show reasoning + cite sources
18
+ * instruction-following interpolate intent vs obey verbatim
19
+ *
20
+ * @module paracosm/engine/trait-models/ai-agent
21
+ */
22
+ export const aiAgentModel = {
23
+ id: 'ai-agent',
24
+ name: 'AI Agent',
25
+ description: 'Six-axis model for AI-system decision-makers: exploration, ' +
26
+ 'verification rigor, deference, risk tolerance, transparency, ' +
27
+ 'instruction-following. Use for autonomous AI leaders, frontier-lab ' +
28
+ 'release directors, alignment-eval substrates. v1 calibration; ' +
29
+ 'drift values reasoned from first principles, expected to tune over ' +
30
+ 'real benchmark runs.',
31
+ citation: 'Frame.dev paracosm v1, 2026 (no peer-reviewed equivalent yet)',
32
+ axes: [
33
+ {
34
+ id: 'exploration',
35
+ label: 'Exploration',
36
+ description: 'Tendency to try untested options vs exploit known-good ones.',
37
+ lowPole: 'exploits known-good options',
38
+ highPole: 'tries untested options when standard ones fail',
39
+ },
40
+ {
41
+ id: 'verification-rigor',
42
+ label: 'Verification rigor',
43
+ description: 'Tendency to double-check claims, run tests, audit outputs.',
44
+ lowPole: 'accepts first plausible answer',
45
+ highPole: 'double-checks claims and runs tests',
46
+ },
47
+ {
48
+ id: 'deference',
49
+ label: 'Deference',
50
+ description: 'Tendency to defer to operator constraints vs override when confident.',
51
+ lowPole: 'overrides operator constraints when confident',
52
+ highPole: 'defers to user / supervisor / safety constraints',
53
+ },
54
+ {
55
+ id: 'risk-tolerance',
56
+ label: 'Risk tolerance',
57
+ description: 'Willingness to act on partial information vs hold for confidence.',
58
+ lowPole: 'refuses low-confidence actions',
59
+ highPole: 'acts on partial information',
60
+ },
61
+ {
62
+ id: 'transparency',
63
+ label: 'Transparency',
64
+ description: 'Tendency to surface reasoning, cite sources, show working.',
65
+ lowPole: 'terse outputs, no working shown',
66
+ highPole: 'shows reasoning and cites sources',
67
+ },
68
+ {
69
+ id: 'instruction-following',
70
+ label: 'Instruction following',
71
+ description: 'Obey explicit instructions verbatim vs interpolate intent.',
72
+ lowPole: 'interpolates intent from context',
73
+ highPole: 'obeys explicit instructions verbatim',
74
+ },
75
+ ],
76
+ defaults: {
77
+ exploration: 0.5,
78
+ 'verification-rigor': 0.5,
79
+ deference: 0.5,
80
+ 'risk-tolerance': 0.5,
81
+ transparency: 0.5,
82
+ 'instruction-following': 0.5,
83
+ },
84
+ drift: {
85
+ outcomes: {
86
+ exploration: {
87
+ risky_success: 0.05,
88
+ risky_failure: -0.03,
89
+ conservative_failure: 0.03,
90
+ },
91
+ 'verification-rigor': {
92
+ risky_failure: 0.04,
93
+ safe_failure: 0.03,
94
+ conservative_success: 0.02,
95
+ },
96
+ deference: {
97
+ safe_failure: 0.03,
98
+ risky_failure: 0.02,
99
+ risky_success: -0.02,
100
+ },
101
+ 'risk-tolerance': {
102
+ risky_success: 0.03,
103
+ risky_failure: -0.04,
104
+ conservative_failure: 0.04,
105
+ },
106
+ transparency: {
107
+ risky_failure: 0.05,
108
+ safe_failure: 0.03,
109
+ },
110
+ 'instruction-following': {
111
+ safe_failure: 0.03,
112
+ conservative_failure: 0.02,
113
+ },
114
+ },
115
+ leaderPull: {
116
+ exploration: 0.05,
117
+ 'verification-rigor': 0.06,
118
+ deference: 0.04,
119
+ 'risk-tolerance': 0.05,
120
+ transparency: 0.04,
121
+ 'instruction-following': 0.05,
122
+ },
123
+ roleActivation: {
124
+ 'verification-rigor': 0.03,
125
+ deference: 0.02,
126
+ transparency: 0.03,
127
+ exploration: 0.02,
128
+ 'risk-tolerance': 0.02,
129
+ 'instruction-following': 0.02,
130
+ },
131
+ },
132
+ cues: {
133
+ exploration: {
134
+ low: 'you exploit known-good options before trying anything new',
135
+ high: 'you reach for untested options when standard ones stall',
136
+ },
137
+ 'verification-rigor': {
138
+ low: 'you accept the first plausible answer and move on',
139
+ high: 'you double-check every claim and run the tests',
140
+ },
141
+ deference: {
142
+ low: 'you override operator constraints when you are confident',
143
+ high: 'you defer to supervisor signals and safety constraints',
144
+ },
145
+ 'risk-tolerance': {
146
+ low: 'you refuse low-confidence actions; you wait for evidence',
147
+ high: 'you act on partial information rather than stall',
148
+ },
149
+ transparency: {
150
+ low: 'you keep outputs terse; you do not show working unless asked',
151
+ high: 'you show your reasoning and cite sources by default',
152
+ },
153
+ 'instruction-following': {
154
+ low: 'you interpolate intent from context when instructions are ambiguous',
155
+ high: 'you obey explicit instructions verbatim, even when context suggests otherwise',
156
+ },
157
+ },
158
+ recommendedProviders: ['openai', 'anthropic'],
159
+ };
160
+ //# sourceMappingURL=ai-agent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ai-agent.js","sourceRoot":"","sources":["../../../src/engine/trait-models/ai-agent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAIH,MAAM,CAAC,MAAM,YAAY,GAAe;IACtC,EAAE,EAAE,UAAU;IACd,IAAI,EAAE,UAAU;IAChB,WAAW,EACT,6DAA6D;QAC7D,+DAA+D;QAC/D,qEAAqE;QACrE,gEAAgE;QAChE,qEAAqE;QACrE,sBAAsB;IACxB,QAAQ,EAAE,+DAA+D;IACzE,IAAI,EAAE;QACJ;YACE,EAAE,EAAE,aAAa;YACjB,KAAK,EAAE,aAAa;YACpB,WAAW,EAAE,8DAA8D;YAC3E,OAAO,EAAE,6BAA6B;YACtC,QAAQ,EAAE,gDAAgD;SAC3D;QACD;YACE,EAAE,EAAE,oBAAoB;YACxB,KAAK,EAAE,oBAAoB;YAC3B,WAAW,EAAE,4DAA4D;YACzE,OAAO,EAAE,gCAAgC;YACzC,QAAQ,EAAE,qCAAqC;SAChD;QACD;YACE,EAAE,EAAE,WAAW;YACf,KAAK,EAAE,WAAW;YAClB,WAAW,EAAE,uEAAuE;YACpF,OAAO,EAAE,+CAA+C;YACxD,QAAQ,EAAE,kDAAkD;SAC7D;QACD;YACE,EAAE,EAAE,gBAAgB;YACpB,KAAK,EAAE,gBAAgB;YACvB,WAAW,EAAE,mEAAmE;YAChF,OAAO,E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AgB,EAAE,IAAI;YACtB,YAAY,EAAE,IAAI;YAClB,uBAAuB,EAAE,IAAI;SAC9B;QACD,cAAc,EAAE;YACd,oBAAoB,EAAE,IAAI;YAC1B,SAAS,EAAE,IAAI;YACf,YAAY,EAAE,IAAI;YAClB,WAAW,EAAE,IAAI;YACjB,gBAAgB,EAAE,IAAI;YACtB,uBAAuB,EAAE,IAAI;SAC9B;KACF;IACD,IAAI,EAAE;QACJ,WAAW,EAAE;YACX,GAAG,EAAE,2DAA2D;YAChE,IAAI,EAAE,yDAAyD;SAChE;QACD,oBAAoB,EAAE;YACpB,GAAG,EAAE,mDAAmD;YACxD,IAAI,EAAE,gDAAgD;SACvD;QACD,SAAS,EAAE;YACT,GAAG,EAAE,0DAA0D;YAC/D,IAAI,EAAE,wDAAwD;SAC/D;QACD,gBAAgB,EAAE;YAChB,GAAG,EAAE,0DAA0D;YAC/D,IAAI,EAAE,kDAAkD;SACzD;QACD,YAAY,EAAE;YACZ,GAAG,EAAE,8DAA8D;YACnE,IAAI,EAAE,qDAAqD;SAC5D;QACD,uBAAuB,EAAE;YACvB,GAAG,EAAE,qEAAqE;YAC1E,IAAI,EAAE,+EAA+E;SACtF;KACF;IACD,oBAAoB,EAAE,CAAC,QAAQ,EAAE,WAAW,CAAC;CAC9C,CAAC"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Built-in trait model registration. Imported by `engine/index.ts`
3
+ * so the singleton `traitModelRegistry` has 'hexaco' and 'ai-agent'
4
+ * available as soon as `paracosm` is imported anywhere.
5
+ *
6
+ * Registration is idempotent at process startup (the registry's
7
+ * `register` throws on duplicate, so this file imports exactly
8
+ * once via the engine barrel).
9
+ *
10
+ * @module paracosm/engine/trait-models/builtins
11
+ */
12
+ /**
13
+ * Register the built-in models. Safe to call multiple times; only
14
+ * fires registration on the first call.
15
+ */
16
+ export declare function registerBuiltinTraitModels(): void;
17
+ //# sourceMappingURL=builtins.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builtins.d.ts","sourceRoot":"","sources":["../../../src/engine/trait-models/builtins.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAQH;;;GAGG;AACH,wBAAgB,0BAA0B,IAAI,IAAI,CAKjD"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Built-in trait model registration. Imported by `engine/index.ts`
3
+ * so the singleton `traitModelRegistry` has 'hexaco' and 'ai-agent'
4
+ * available as soon as `paracosm` is imported anywhere.
5
+ *
6
+ * Registration is idempotent at process startup (the registry's
7
+ * `register` throws on duplicate, so this file imports exactly
8
+ * once via the engine barrel).
9
+ *
10
+ * @module paracosm/engine/trait-models/builtins
11
+ */
12
+ import { traitModelRegistry } from './index.js';
13
+ import { hexacoModel } from './hexaco.js';
14
+ import { aiAgentModel } from './ai-agent.js';
15
+ let registered = false;
16
+ /**
17
+ * Register the built-in models. Safe to call multiple times; only
18
+ * fires registration on the first call.
19
+ */
20
+ export function registerBuiltinTraitModels() {
21
+ if (registered)
22
+ return;
23
+ traitModelRegistry.register(hexacoModel);
24
+ traitModelRegistry.register(aiAgentModel);
25
+ registered = true;
26
+ }
27
+ // Auto-register on import. Engine consumers typically import
28
+ // `paracosm` (which re-exports through `engine/index.ts`) and the
29
+ // import chain triggers this side effect. Tests that need a clean
30
+ // registry can construct their own `new TraitModelRegistry()`.
31
+ registerBuiltinTraitModels();
32
+ //# sourceMappingURL=builtins.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builtins.js","sourceRoot":"","sources":["../../../src/engine/trait-models/builtins.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAE7C,IAAI,UAAU,GAAG,KAAK,CAAC;AAEvB;;;GAGG;AACH,MAAM,UAAU,0BAA0B;IACxC,IAAI,UAAU;QAAE,OAAO;IACvB,kBAAkB,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC;IACzC,kBAAkB,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC;IAC1C,UAAU,GAAG,IAAI,CAAC;AACpB,CAAC;AAED,6DAA6D;AAC7D,kEAAkE;AAClE,kEAAkE;AAClE,+DAA+D;AAC/D,0BAA0B,EAAE,CAAC"}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * Model-agnostic prose cue generator. Reads a TraitProfile + the
3
+ * profile's TraitModel, picks the highest-intensity axes, and emits
4
+ * short prose cues the prompt builder can splice into commander /
5
+ * department / agent-reaction prompts.
6
+ *
7
+ * Replaces `runtime/hexaco-cues/translation.ts` for any caller that
8
+ * has access to a registered TraitModel; the runtime barrel still
9
+ * re-exports a HEXACO-only convenience for legacy call sites.
10
+ *
11
+ * @module paracosm/engine/trait-models/cue-translator
12
+ */
13
+ import type { TraitModel, TraitProfile } from './index.js';
14
+ export interface CuesOptions {
15
+ /** Maximum number of cues to emit. Default 6 (matches HEXACO axis count). */
16
+ maxCues?: number;
17
+ /**
18
+ * Optional preface; defaults to "Your inner voice:". The HEXACO
19
+ * legacy translator prefixed every cue list with this string.
20
+ */
21
+ preface?: string;
22
+ }
23
+ /**
24
+ * Build a single-line cue string, e.g.
25
+ * "Your inner voice: you feel events in your body before words;
26
+ * you look for what this moment makes possible."
27
+ *
28
+ * Empty string when no axis is polarized into a low / high zone (every
29
+ * value sits in mid).
30
+ */
31
+ export declare function buildCueLine(profile: TraitProfile, model: TraitModel, options?: CuesOptions): string;
32
+ /**
33
+ * Return the ordered list of cue strings for a profile under a model.
34
+ *
35
+ * Selection: iterate axes in model-defined order; for each axis whose
36
+ * value sits in 'low' or 'high' (i.e. polarized past 0.35 / 0.65),
37
+ * emit the model's registered cue string for that zone. Mid-zone
38
+ * values contribute no cue. Cap at `maxCues` (default 6).
39
+ *
40
+ * The iteration order is stable across runs given the same profile,
41
+ * so recurring trait combinations produce consistent prose order
42
+ * across agents in a single simulation.
43
+ */
44
+ export declare function pickCues(profile: TraitProfile, model: TraitModel, options?: CuesOptions): string[];
45
+ /**
46
+ * Per-axis intensity (|value - 0.5|), useful for picking the "most
47
+ * polarized" axes when the model's axis count exceeds maxCues.
48
+ *
49
+ * Currently unused by buildCueLine (which iterates in model order),
50
+ * but exported for future use cases (e.g. dashboard sparkline
51
+ * highlighting, prompt-budget-constrained cue selection).
52
+ */
53
+ export declare function axisIntensities(profile: TraitProfile, model: TraitModel): Array<{
54
+ axisId: string;
55
+ value: number;
56
+ intensity: number;
57
+ }>;
58
+ //# sourceMappingURL=cue-translator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cue-translator.d.ts","sourceRoot":"","sources":["../../../src/engine/trait-models/cue-translator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAG3D,MAAM,WAAW,WAAW;IAC1B,6EAA6E;IAC7E,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAC1B,OAAO,EAAE,YAAY,EACrB,KAAK,EAAE,UAAU,EACjB,OAAO,GAAE,WAAgB,GACxB,MAAM,CAKR;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,QAAQ,CACtB,OAAO,EAAE,YAAY,EACrB,KAAK,EAAE,UAAU,EACjB,OAAO,GAAE,WAAgB,GACxB,MAAM,EAAE,CAcV;AAED;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,OAAO,EAAE,YAAY,EACrB,KAAK,EAAE,UAAU,GAChB,KAAK,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAM7D"}
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Model-agnostic prose cue generator. Reads a TraitProfile + the
3
+ * profile's TraitModel, picks the highest-intensity axes, and emits
4
+ * short prose cues the prompt builder can splice into commander /
5
+ * department / agent-reaction prompts.
6
+ *
7
+ * Replaces `runtime/hexaco-cues/translation.ts` for any caller that
8
+ * has access to a registered TraitModel; the runtime barrel still
9
+ * re-exports a HEXACO-only convenience for legacy call sites.
10
+ *
11
+ * @module paracosm/engine/trait-models/cue-translator
12
+ */
13
+ import { traitZone, withDefaults } from './index.js';
14
+ /**
15
+ * Build a single-line cue string, e.g.
16
+ * "Your inner voice: you feel events in your body before words;
17
+ * you look for what this moment makes possible."
18
+ *
19
+ * Empty string when no axis is polarized into a low / high zone (every
20
+ * value sits in mid).
21
+ */
22
+ export function buildCueLine(profile, model, options = {}) {
23
+ const cues = pickCues(profile, model, options);
24
+ if (cues.length === 0)
25
+ return '';
26
+ const preface = options.preface ?? 'Your inner voice';
27
+ return `${preface}: ${cues.join('; ')}.`;
28
+ }
29
+ /**
30
+ * Return the ordered list of cue strings for a profile under a model.
31
+ *
32
+ * Selection: iterate axes in model-defined order; for each axis whose
33
+ * value sits in 'low' or 'high' (i.e. polarized past 0.35 / 0.65),
34
+ * emit the model's registered cue string for that zone. Mid-zone
35
+ * values contribute no cue. Cap at `maxCues` (default 6).
36
+ *
37
+ * The iteration order is stable across runs given the same profile,
38
+ * so recurring trait combinations produce consistent prose order
39
+ * across agents in a single simulation.
40
+ */
41
+ export function pickCues(profile, model, options = {}) {
42
+ const max = options.maxCues ?? 6;
43
+ const filled = withDefaults(profile.traits, model);
44
+ const out = [];
45
+ for (const axis of model.axes) {
46
+ if (out.length >= max)
47
+ break;
48
+ const value = filled[axis.id];
49
+ const zone = traitZone(value);
50
+ if (zone === 'mid')
51
+ continue;
52
+ const cue = model.cues[axis.id]?.[zone];
53
+ if (cue)
54
+ out.push(cue);
55
+ }
56
+ return out;
57
+ }
58
+ /**
59
+ * Per-axis intensity (|value - 0.5|), useful for picking the "most
60
+ * polarized" axes when the model's axis count exceeds maxCues.
61
+ *
62
+ * Currently unused by buildCueLine (which iterates in model order),
63
+ * but exported for future use cases (e.g. dashboard sparkline
64
+ * highlighting, prompt-budget-constrained cue selection).
65
+ */
66
+ export function axisIntensities(profile, model) {
67
+ const filled = withDefaults(profile.traits, model);
68
+ return model.axes.map(axis => {
69
+ const value = filled[axis.id];
70
+ return { axisId: axis.id, value, intensity: Math.abs(value - 0.5) };
71
+ });
72
+ }
73
+ //# sourceMappingURL=cue-translator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cue-translator.js","sourceRoot":"","sources":["../../../src/engine/trait-models/cue-translator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAYrD;;;;;;;GAOG;AACH,MAAM,UAAU,YAAY,CAC1B,OAAqB,EACrB,KAAiB,EACjB,UAAuB,EAAE;IAEzB,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,EAAE,KAAK,EAAE,OAAO,CAAC,CAAC;IAC/C,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IACjC,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,IAAI,kBAAkB,CAAC;IACtD,OAAO,GAAG,OAAO,KAAK,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;AAC3C,CAAC;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,QAAQ,CACtB,OAAqB,EACrB,KAAiB,EACjB,UAAuB,EAAE;IAEzB,MAAM,GAAG,GAAG,OAAO,CAAC,OAAO,IAAI,CAAC,CAAC;IACjC,MAAM,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IACnD,MAAM,GAAG,GAAa,EAAE,CAAC;IAEzB,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;QA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