@its-not-rocket-science/ananke 0.1.10 → 0.1.12

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/CHANGELOG.md CHANGED
@@ -10,6 +10,24 @@ Versioning follows [Semantic Versioning](https://semver.org/).
10
10
 
11
11
  ### Added
12
12
 
13
+ - **Option B · Tier 2 subpath exports** — eight new named import subpaths for all
14
+ Tier 2 module groupings; deep imports remain supported as a fallback:
15
+ - `ananke/character` → aging, sleep, disease, wound-aging, thermoregulation, nutrition,
16
+ medical, toxicology, progression
17
+ - `ananke/combat` → ranged, grapple, formation-combat, mount, hazard, morale, sensory,
18
+ sensory-extended, weather, terrain, skills, biome
19
+ - `ananke/campaign` → campaign, downtime, collective-activities, settlement,
20
+ settlement-services, inventory, item-durability, world-generation, inheritance,
21
+ economy, polity (campaign layer barrel)
22
+ - `ananke/social` → dialogue, faction, relationships, relationships-effects, party,
23
+ quest, quest-generators
24
+ - `ananke/narrative` → chronicle, story-arcs, narrative-render, legend, mythology,
25
+ narrative, narrative-stress, metrics, arena
26
+ - `ananke/anatomy` → existing `src/anatomy/index.ts` barrel
27
+ - `ananke/crafting` → existing `src/crafting/index.ts` barrel
28
+ - `ananke/competence` → existing `src/competence/index.ts` barrel
29
+ - `STABLE_API.md` updated to document preferred subpath import patterns.
30
+
13
31
  - **CE-16 · Modding Support** (`src/modding.ts`)
14
32
  - Layer 1 — `hashMod(json)`: deterministic FNV-1a fingerprint (8-char hex) for any
15
33
  parsed JSON mod file; canonical key-sorted serialisation ensures order-independence.
@@ -98,6 +116,18 @@ Adding new **optional** fields to these interfaces is never a breaking change.
98
116
 
99
117
  ---
100
118
 
119
+ ## [0.1.11] — 2026-03-24
120
+
121
+ ### Added
122
+
123
+ - **Export Presets, Weapons, Channels, Traits, Kinds from Package Root** (`src/parallel.ts`)
124
+ - Five modules were documented as Tier 1 stable but missing from src/index.ts.
125
+ mkKnight/mkBoxer/etc., weapon arrays, DamageChannel, TraitId, CommandKinds
126
+ and related symbols are now importable directly from the package root.
127
+ Fix STABLE_API.md: WEAPONS was a phantom name; correct to ALL_HISTORICAL_MELEE etc.
128
+
129
+ ---
130
+
101
131
  ## [0.1.10] — 2026-03-24
102
132
 
103
133
  ### Added
package/STABLE_API.md CHANGED
@@ -74,7 +74,31 @@ version bump and a migration guide in `CHANGELOG.md`.
74
74
  |--------|-------------|
75
75
  | `mkKnight`, `mkBoxer`, `mkWrestler`, `mkOctopus`, `mkScubaDiver` | Named entity factories |
76
76
  | `AMATEUR_BOXER`, `PRO_BOXER`, `GRECO_WRESTLER`, `KNIGHT_INFANTRY`, `LARGE_PACIFIC_OCTOPUS` | Validated archetypes |
77
- | `WEAPONS` | Historical weapons database (~70 weapons, six eras) |
77
+ | `ALL_HISTORICAL_MELEE`, `ALL_HISTORICAL_RANGED` | Complete historical weapon arrays |
78
+ | `PREHISTORIC_MELEE` … `CONTEMPORARY_RANGED` | Per-era weapon arrays (six eras × melee/ranged) |
79
+
80
+ ### Damage channels and traits (`src/channels.ts`, `src/traits.ts`)
81
+
82
+ | Export | Description |
83
+ |--------|-------------|
84
+ | `DamageChannel` | Enum of damage channel types (kinetic, thermal, etc.) |
85
+ | `ChannelMask` | Bitmask type for combining channels |
86
+ | `channelMask(...channels)` | Build a combined channel mask |
87
+ | `hasChannel(mask, ch)` | Test whether a mask includes a channel |
88
+ | `TraitId` | Union type of all valid trait identifiers |
89
+ | `TRAITS` | Record mapping each `TraitId` to its `TraitEffect` |
90
+ | `buildTraitProfile(traits)` | Aggregate trait multipliers from an entity's trait list |
91
+ | `applyTraitsToAttributes(attrs, traits)` | Apply trait effects to an attribute block |
92
+
93
+ ### Command vocabulary (`src/sim/kinds.ts`)
94
+
95
+ | Export | Description |
96
+ |--------|-------------|
97
+ | `CommandKinds` | Object of command kind string constants (`Move`, `Attack`, `Defend`, …) |
98
+ | `MoveModes` | Walk / sprint / crawl constants |
99
+ | `DefenceModes` | Parry / dodge / block constants |
100
+ | `EngageModes` | Engage / disengage constants |
101
+ | `HitArea` | Union of valid hit area identifiers |
78
102
 
79
103
  ### Replay and serialization (`src/replay.ts`)
80
104
 
@@ -161,21 +185,124 @@ version bump; renames require a major bump and migration guide.
161
185
  These exports are usable and tested but may change across minor versions.
162
186
  A `CHANGELOG.md` entry will document any breaking change.
163
187
 
188
+ Tier 2 modules are accessible via **named subpath exports** (preferred) or deep imports:
189
+
190
+ ```typescript
191
+ // Preferred — named subpath (stable grouping, no internal path coupling)
192
+ import { stepAging, applyAgingToAttributes } from "@its-not-rocket-science/ananke/character";
193
+ import { resolveRangedAttack, stepGrapple } from "@its-not-rocket-science/ananke/combat";
194
+ import { stepCampaignDay, createSettlement } from "@its-not-rocket-science/ananke/campaign";
195
+ import { dialogueProbability, effectiveStanding } from "@its-not-rocket-science/ananke/social";
196
+ import { addChronicleEntry, detectStoryArcs } from "@its-not-rocket-science/ananke/narrative";
197
+ import { compileAnatomyDefinition } from "@its-not-rocket-science/ananke/anatomy";
198
+ import { craftItem, getAvailableRecipes } from "@its-not-rocket-science/ananke/crafting";
199
+ import { resolveCompetence } from "@its-not-rocket-science/ananke/competence";
200
+
201
+ // Deep import (fallback — internal paths may change)
202
+ import { stepAging } from "@its-not-rocket-science/ananke/dist/src/sim/aging.js";
203
+ ```
204
+
205
+ ### AI command system
206
+
207
+ | Module | Key exports |
208
+ |--------|------------|
209
+ | `src/sim/ai/system.ts` | `buildAICommands(world, ctx)` — build a `CommandMap` for all AI-controlled entities |
210
+
211
+ ### Character lifecycle
212
+
164
213
  | Module | Key exports |
165
214
  |--------|------------|
166
- | `src/mythology.ts` | `compressMythsFromHistory`, `stepMythologyYear`, `aggregateFactionMythEffect`, `scaledMythEffect` |
167
- | `src/narrative-stress.ts` | `runNarrativeStressTest`, `scoreNarrativePush` |
168
- | `src/campaign.ts` | `Campaign`, `stepCampaignDay`, `advanceCampaignClock`, `serializeCampaign`, `deserializeCampaign` |
169
- | `src/arena.ts` | Arena scenario DSL, `runArenaTrial`, `runArenaScenario` |
170
215
  | `src/sim/aging.ts` | `applyAgingToAttributes`, `stepAging`, `deriveAgeMultipliers`, `getAgePhase` |
171
216
  | `src/sim/sleep.ts` | `applySleepToAttributes`, `stepSleep`, `deriveSleepDeprivationMuls`, `circadianAlertness` |
172
217
  | `src/sim/disease.ts` | `exposeToDisease`, `stepDiseaseForEntity`, `spreadDisease`, `computeTransmissionRisk` |
218
+ | `src/sim/wound-aging.ts` | `stepWoundAging`, `recordTraumaEvent`, `deriveFearThresholdMul`, `deriveSepsisRisk` |
219
+ | `src/sim/thermoregulation.ts` | `stepThermoregulation`, `deriveThermalComfort`, `computeMetabolicRate` |
220
+ | `src/sim/nutrition.ts` | `stepNutrition`, `computeHungerEffect`, food catalogue constants |
221
+ | `src/sim/medical.ts` | `resolveTreatment`, `computeTreatmentEffect`, medical tier definitions |
222
+ | `src/sim/toxicology.ts` | `applyVenom`, `stepActiveVenoms`, `resolveIngestedToxin` |
223
+ | `src/progression.ts` | `applyXP`, `applyTrainingDrift`, `computeMilestones` |
224
+
225
+ ### Combat extensions
226
+
227
+ | Module | Key exports |
228
+ |--------|------------|
173
229
  | `src/sim/mount.ts` | `checkMountStep`, `computeChargeBonus`, `deriveRiderHeightBonus` |
174
230
  | `src/sim/hazard.ts` | `deriveHazardEffect`, `computeHazardExposure`, `stepHazardZone` |
231
+ | `src/sim/ranged.ts` | `resolveRangedAttack`, `computeRangedAccuracy`, `computeProjectileEnergy` |
232
+ | `src/sim/grapple.ts` | `resolveGrappleContest`, `computeGrappleStrength`, `stepGrapple` |
233
+ | `src/sim/formation.ts` | `FormationConfig`, `computeFormationBonus`, `resolveFormationStep` |
234
+ | `src/sim/morale.ts` | `computeMoraleEffect`, `stepMorale`, `applyRoutEffect` |
235
+ | `src/sim/sensory.ts` | `computeVisibility`, `computeHearingRange`, `stepSensoryState` |
236
+ | `src/sim/sensory-extended.ts` | `computeEcholocationRange`, `computeOlfactionRange` — non-human senses |
237
+ | `src/sim/weather.ts` | `WeatherState`, `stepWeather`, `computeWeatherEffect` |
238
+ | `src/sim/terrain.ts` | `TerrainType`, `TERRAIN_PROFILES`, `computeTerrainTraction` |
239
+ | `src/sim/skills.ts` | `SkillId`, `SkillLevel`, `SKILL_LEVEL_MULS`, `buildSkillMap`, `getSkillMul` |
240
+ | `src/sim/biome.ts` | `BiomeType`, `BIOME_PROFILES`, `deriveBiomeEnvironment` |
241
+
242
+ ### Social and economic systems
243
+
244
+ | Module | Key exports |
245
+ |--------|------------|
175
246
  | `src/dialogue.ts` | `resolveIntimidation`, `resolvePersuasion`, `resolveDeception`, `resolveTradeNegotiation` |
176
247
  | `src/faction.ts` | `FactionRegistry`, `updateStanding`, `getFactionStanding` |
177
248
  | `src/economy.ts` | `computeItemValue`, `applyWear`, `resolveDrops`, `evaluateTradeOffer` |
178
- | `src/progression.ts` | `applyXP`, `applyTrainingDrift`, `computeMilestones` |
249
+ | `src/relationships.ts` | `createRelationshipGraph`, `establishRelationship`, `recordEvent`, `getRelationshipAffinity` |
250
+ | `src/relationships-effects.ts` | Relationship modifiers applied to dialogue, teaching, morale contexts |
251
+ | `src/party.ts` | `createPartyRegistry`, `createParty`, `addPartyMember`, `setPartyStanding` |
252
+
253
+ ### Campaign and world management
254
+
255
+ | Module | Key exports |
256
+ |--------|------------|
257
+ | `src/campaign.ts` | `Campaign`, `stepCampaignDay`, `advanceCampaignClock`, `serializeCampaign`, `deserializeCampaign` |
258
+ | `src/downtime.ts` | `stepDowntime`, `TreatmentSchedule`, `EntityRecoveryReport` |
259
+ | `src/collective-activities.ts` | `createCollectiveProject`, `contributeToCollectiveProject`, `stepRitual`, `planCaravanRoute` |
260
+ | `src/inventory.ts` | `createInventory`, `addItemToInventory`, `consumeItemsByTemplateId`, `getEncumbrancePenalty` |
261
+ | `src/item-durability.ts` | `stepWear`, `applyWearPenalty` |
262
+ | `src/settlement.ts` | `createSettlement`, `upgradeSettlement`, `getServiceBonus` |
263
+ | `src/settlement-services.ts` | Service definitions (forge, medical, market, barracks, temple) |
264
+ | `src/inheritance.ts` | `transferEquipment`, `transferRelationships`, `transferInventory` — character death succession |
265
+ | `src/world-generation.ts` | `generateWorld`, `deriveStartingRelationships`, `deriveStartingConflicts` |
266
+
267
+ ### Quest and narrative layer
268
+
269
+ | Module | Key exports |
270
+ |--------|------------|
271
+ | `src/quest.ts` | `questFactory`, `updateQuestState`, `resolveObjective`, `Quest`, `QuestObjective` |
272
+ | `src/quest-generators.ts` | `generateBountyQuest`, `generateEscortQuest`, `generateRetrievalQuest` |
273
+ | `src/chronicle.ts` | `createChronicle`, `addChronicleEntry`, `getEntriesForEntity`, `ChronicleEntry` |
274
+ | `src/story-arcs.ts` | `detectStoryArcs`, `updateDetectedArcs` — pattern detection across chronicle entries |
275
+ | `src/narrative-render.ts` | `renderEntry`, `renderArcSummary` — template-based prose from chronicle entries |
276
+ | `src/legend.ts` | `createLegendRegistry`, `createLegendFromChronicle`, `applyLegendToDialogueContext` |
277
+ | `src/mythology.ts` | `compressMythsFromHistory`, `stepMythologyYear`, `aggregateFactionMythEffect`, `scaledMythEffect` |
278
+ | `src/narrative.ts` | `narrateCombatTick`, `narrateInjury` — human-readable combat event strings |
279
+ | `src/narrative-stress.ts` | `runNarrativeStressTest`, `scoreNarrativePush` |
280
+ | `src/metrics.ts` | `extractCombatMetrics`, `summariseBattle` — analytics from trace events |
281
+ | `src/arena.ts` | Arena scenario DSL, `runArenaTrial`, `runArenaScenario` |
282
+
283
+ ### Anatomy subsystem
284
+
285
+ | Module | Key exports |
286
+ |--------|------------|
287
+ | `src/anatomy/index.ts` | Re-export barrel for the full anatomy API |
288
+ | `src/anatomy/anatomy-contracts.ts` | `CompiledAnatomyModel`, `AnatomyContracts`, `AnatomyCapabilities` — core anatomy types |
289
+ | `src/anatomy/anatomy-schema.ts` | `validateExtendedBodyPlan`, `ValidationResult` — validate JSON body plan definitions |
290
+ | `src/anatomy/anatomy-compiler.ts` | `compileAnatomyDefinition`, `compileAnatomyDefinitionOrThrow` — compile a body plan to indexed model |
291
+ | `src/anatomy/anatomy-helpers.ts` | `createAnatomyHelpers`, `summarizeFunctionalHealth`, `sampleProfile` — query compiled anatomy |
292
+
293
+ ### Competence framework
294
+
295
+ | Module | Key exports |
296
+ |--------|------------|
297
+ | `src/competence/index.ts` | Re-export barrel for the full competence API |
298
+ | `src/competence/framework.ts` | `resolveCompetence(entity, action, ctx)` — unified competence resolution dispatcher |
299
+ | `src/competence/catalogue.ts` | `CompetenceDomain`, `CompetenceTask`, predefined task catalogue entries |
300
+
301
+ ### Crafting subsystem
302
+
303
+ | Module | Key exports |
304
+ |--------|------------|
305
+ | `src/crafting/index.ts` | `craftItem`, `startManufacturing`, `advanceManufacturing`, `getAvailableRecipes` — main crafting API |
179
306
 
180
307
  ---
181
308
 
@@ -183,16 +310,72 @@ A `CHANGELOG.md` entry will document any breaking change.
183
310
 
184
311
  These are implementation details. Do not import them directly; they may change at any time.
185
312
 
313
+ ### Kernel internals
314
+
186
315
  | Module | Why internal |
187
316
  |--------|-------------|
188
317
  | `src/rng.ts` | `makeRng`, `eventSeed`, `hashString` — RNG contract is internal; seed structure may change |
318
+ | `src/sim/seeds.ts` | Seed derivation utilities |
189
319
  | `src/sim/push.ts` | Pair-based resolution internals |
190
320
  | `src/sim/kernel.ts` (non-exported functions) | Step sub-phases, internal accumulators |
191
- | `src/sim/seeds.ts` | Seed derivation utilities |
192
- | `src/sim/ai/` | AI decision internals; host applications should use `buildAICommands()` via `src/sim/ai/system.ts` |
321
+ | `src/sim/tick.ts` | Single-tick orchestration called by `stepWorld` |
322
+ | `src/sim/action.ts` | Attack cooldown and swing-momentum state machine |
323
+ | `src/sim/intent.ts` | Movement and defence intent processing |
324
+ | `src/sim/combat.ts` | Hit resolution and skill-contest internals |
325
+ | `src/sim/step/` | All sub-step modules (`push`, `energy`, `injury`, `movement`, etc.) |
326
+ | `src/sim/context.ts` | `KernelContext` type definition (re-exported via `sim/world.ts`) |
327
+ | `src/sim/events.ts` | Internal event emission — consumed by trace and bridge |
328
+ | `src/sim/indexing.ts` | Spatial index internals used by `stepWorld` |
329
+ | `src/sim/tuning.ts` | Physics constant tables — may be retuned in patch releases |
330
+ | `src/sim/impairment.ts` | Functional damage accumulator — called by the kernel step |
331
+ | `src/sim/occlusion.ts` | Internal visibility occlusion used by sensory |
332
+ | `src/sim/systemic-toxicology.ts` | Multi-substance pharmacokinetics internals |
333
+ | `src/sim/formation-unit.ts` | Squad-level unit structure used by `formation-combat.ts` |
334
+ | `src/sim/commandBuilders.ts` | Low-level command construction helpers — prefer `noMove()` from `commands.ts` |
335
+ | `src/sim/team.ts` | Team/side definitions used internally by AI and morale |
336
+ | `src/derive.ts` | Movement-force and geometry derivations used by the kernel |
337
+ | `src/lod.ts` | Level-of-detail helpers for large simulations |
338
+ | `src/debug.ts` | Visual debug extraction (motion vectors, hit traces) |
339
+
340
+ ### AI decision internals
193
341
 
194
- > `buildAICommands()` from `src/sim/ai/system.ts` is Experimental (Tier 2).
195
- > The individual sub-modules (`decide.ts`, `perception.ts`, `targeting.ts`) are Tier 3.
342
+ | Module | Why internal |
343
+ |--------|-------------|
344
+ | `src/sim/ai/decide.ts` | Decision-tree evaluation — called by `buildAICommands` |
345
+ | `src/sim/ai/perception.ts` | AI sensory processing — called by `buildAICommands` |
346
+ | `src/sim/ai/targeting.ts` | Target selection heuristics — called by `buildAICommands` |
347
+ | `src/sim/ai/personality.ts` | Personality trait modifiers on AI decisions |
348
+ | `src/sim/ai/types.ts` | AI policy and state types used only within `src/sim/ai/` |
349
+
350
+ > Use `buildAICommands(world, ctx)` from `src/sim/ai/system.ts` (Tier 2) rather than importing AI sub-modules directly.
351
+
352
+ ### Competence domain resolvers
353
+
354
+ These are called by `resolveCompetence()` and should not be imported directly.
355
+
356
+ | Module | Domain |
357
+ |--------|--------|
358
+ | `src/competence/crafting.ts` | Crafting and tool use |
359
+ | `src/competence/navigation.ts` | Wayfinding and cartography |
360
+ | `src/competence/naturalist.ts` | Tracking, foraging, taming |
361
+ | `src/competence/interspecies.ts` | Cross-species communication |
362
+ | `src/competence/language.ts` | Linguistics and translation |
363
+ | `src/competence/teaching.ts` | Knowledge transfer |
364
+ | `src/competence/willpower.ts` | Endurance and mental fortitude |
365
+ | `src/competence/engineering.ts` | Siege and structural engineering |
366
+ | `src/competence/performance.ts` | Entertainment and oratory |
367
+ | `src/competence/acoustic.ts` | Formation signalling (drums, horns) |
368
+
369
+ ### Crafting internals
370
+
371
+ These are called by `craftItem()` / `startManufacturing()` and should not be imported directly.
372
+
373
+ | Module | Role |
374
+ |--------|------|
375
+ | `src/crafting/materials.ts` | Material definitions and property calculations |
376
+ | `src/crafting/recipes.ts` | Recipe validation and feasibility |
377
+ | `src/crafting/manufacturing.ts` | Batch production mechanics |
378
+ | `src/crafting/workshops.ts` | Workshop facility definitions and output bonuses |
196
379
 
197
380
  ---
198
381
 
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @module ananke/campaign
3
+ * @tier2 Experimental — breaking changes get a CHANGELOG entry.
4
+ *
5
+ * Campaign and world management: downtime activities, collective projects,
6
+ * settlements, inventory, item durability, world generation, inheritance,
7
+ * economy, and polity/socio-economic systems.
8
+ *
9
+ * Import via subpath:
10
+ * import { stepDowntime, createSettlement } from "@its-not-rocket-science/ananke/campaign"
11
+ */
12
+ export * from "./campaign.js";
13
+ export * from "./downtime.js";
14
+ export * from "./collective-activities.js";
15
+ export * from "./settlement.js";
16
+ export * from "./settlement-services.js";
17
+ export * from "./inventory.js";
18
+ export * from "./item-durability.js";
19
+ export * from "./world-generation.js";
20
+ export * from "./inheritance.js";
21
+ export * from "./economy.js";
22
+ export * from "./polity.js";
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @module ananke/campaign
3
+ * @tier2 Experimental — breaking changes get a CHANGELOG entry.
4
+ *
5
+ * Campaign and world management: downtime activities, collective projects,
6
+ * settlements, inventory, item durability, world generation, inheritance,
7
+ * economy, and polity/socio-economic systems.
8
+ *
9
+ * Import via subpath:
10
+ * import { stepDowntime, createSettlement } from "@its-not-rocket-science/ananke/campaign"
11
+ */
12
+ export * from "./campaign.js";
13
+ export * from "./downtime.js";
14
+ export * from "./collective-activities.js";
15
+ export * from "./settlement.js";
16
+ export * from "./settlement-services.js";
17
+ export * from "./inventory.js";
18
+ export * from "./item-durability.js";
19
+ export * from "./world-generation.js";
20
+ export * from "./inheritance.js";
21
+ export * from "./economy.js";
22
+ export * from "./polity.js";
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @module ananke/character
3
+ * @tier2 Experimental — breaking changes get a CHANGELOG entry.
4
+ *
5
+ * Character lifecycle: aging, sleep, disease, wound healing, thermoregulation,
6
+ * nutrition, medical treatment, toxicology, and skill progression.
7
+ *
8
+ * Import via subpath:
9
+ * import { stepAging, stepSleep } from "@its-not-rocket-science/ananke/character"
10
+ */
11
+ export * from "./sim/aging.js";
12
+ export * from "./sim/sleep.js";
13
+ export * from "./sim/disease.js";
14
+ export * from "./sim/wound-aging.js";
15
+ export * from "./sim/thermoregulation.js";
16
+ export * from "./sim/nutrition.js";
17
+ export * from "./sim/medical.js";
18
+ export * from "./sim/toxicology.js";
19
+ export * from "./progression.js";
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @module ananke/character
3
+ * @tier2 Experimental — breaking changes get a CHANGELOG entry.
4
+ *
5
+ * Character lifecycle: aging, sleep, disease, wound healing, thermoregulation,
6
+ * nutrition, medical treatment, toxicology, and skill progression.
7
+ *
8
+ * Import via subpath:
9
+ * import { stepAging, stepSleep } from "@its-not-rocket-science/ananke/character"
10
+ */
11
+ export * from "./sim/aging.js";
12
+ export * from "./sim/sleep.js";
13
+ export * from "./sim/disease.js";
14
+ export * from "./sim/wound-aging.js";
15
+ export * from "./sim/thermoregulation.js";
16
+ export * from "./sim/nutrition.js";
17
+ export * from "./sim/medical.js";
18
+ export * from "./sim/toxicology.js";
19
+ export * from "./progression.js";
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @module ananke/combat
3
+ * @tier2 Experimental — breaking changes get a CHANGELOG entry.
4
+ *
5
+ * Combat extensions: ranged weapons, grappling, formation tactics, mounted
6
+ * combat, environmental hazards, morale, sensory systems, weather, terrain,
7
+ * skills, and biome effects.
8
+ *
9
+ * Import via subpath:
10
+ * import { resolveRangedAttack, stepGrapple } from "@its-not-rocket-science/ananke/combat"
11
+ */
12
+ export * from "./sim/ranged.js";
13
+ export * from "./sim/grapple.js";
14
+ export * from "./sim/formation-combat.js";
15
+ export * from "./sim/mount.js";
16
+ export * from "./sim/hazard.js";
17
+ export * from "./sim/morale.js";
18
+ export * from "./sim/sensory.js";
19
+ export * from "./sim/sensory-extended.js";
20
+ export * from "./sim/weather.js";
21
+ export * from "./sim/terrain.js";
22
+ export * from "./sim/skills.js";
23
+ export * from "./sim/biome.js";
@@ -0,0 +1,23 @@
1
+ /**
2
+ * @module ananke/combat
3
+ * @tier2 Experimental — breaking changes get a CHANGELOG entry.
4
+ *
5
+ * Combat extensions: ranged weapons, grappling, formation tactics, mounted
6
+ * combat, environmental hazards, morale, sensory systems, weather, terrain,
7
+ * skills, and biome effects.
8
+ *
9
+ * Import via subpath:
10
+ * import { resolveRangedAttack, stepGrapple } from "@its-not-rocket-science/ananke/combat"
11
+ */
12
+ export * from "./sim/ranged.js";
13
+ export * from "./sim/grapple.js";
14
+ export * from "./sim/formation-combat.js";
15
+ export * from "./sim/mount.js";
16
+ export * from "./sim/hazard.js";
17
+ export * from "./sim/morale.js";
18
+ export * from "./sim/sensory.js";
19
+ export * from "./sim/sensory-extended.js";
20
+ export * from "./sim/weather.js";
21
+ export * from "./sim/terrain.js";
22
+ export * from "./sim/skills.js";
23
+ export * from "./sim/biome.js";
@@ -3,12 +3,17 @@ export * from "./types.js";
3
3
  export * from "./archetypes.js";
4
4
  export * from "./generate.js";
5
5
  export * from "./equipment.js";
6
+ export * from "./weapons.js";
7
+ export * from "./presets.js";
8
+ export * from "./channels.js";
9
+ export * from "./traits.js";
6
10
  export * from "./describe.js";
7
11
  export * from "./sim/vec3.js";
8
12
  export * from "./sim/condition.js";
9
13
  export * from "./sim/injury.js";
10
14
  export * from "./sim/entity.js";
11
15
  export * from "./sim/commands.js";
16
+ export * from "./sim/kinds.js";
12
17
  export * from "./sim/kernel.js";
13
18
  export * from "./sim/body.js";
14
19
  export * from "./sim/world.js";
package/dist/src/index.js CHANGED
@@ -11,13 +11,18 @@ export * from "./units.js"; // q(), SCALE, qMul, qDiv, clampQ, mulDiv, to, from,
11
11
  export * from "./types.js"; // IndividualAttributes, core scalar types
12
12
  export * from "./archetypes.js"; // Archetype, BodyPlan, built-in species presets
13
13
  export * from "./generate.js"; // generateIndividual()
14
- export * from "./equipment.js"; // WEAPONS database, EquipmentCatalogue
14
+ export * from "./equipment.js"; // Weapon, Armour, Gear, WeaponDamageProfile, EquipmentCatalogue
15
+ export * from "./weapons.js"; // ALL_HISTORICAL_MELEE, ALL_HISTORICAL_RANGED, PREHISTORIC_MELEE … CONTEMPORARY_RANGED
16
+ export * from "./presets.js"; // mkKnight(), mkBoxer(), mkWrestler(), mkOctopus(), mkScubaDiver()
17
+ export * from "./channels.js"; // DamageChannel, ChannelMask, channelMask()
18
+ export * from "./traits.js"; // TraitId, TRAITS, buildTraitProfile(), applyTraitsToAttributes()
15
19
  export * from "./describe.js"; // describeCharacter(), formatCharacterSheet(), formatOneLine()
16
20
  export * from "./sim/vec3.js"; // Vec3, lerpVec3, addVec3
17
21
  export * from "./sim/condition.js"; // ConditionSnapshot, condition constants
18
22
  export * from "./sim/injury.js"; // InjuryRegion, BodyRegion, injury constants
19
23
  export * from "./sim/entity.js"; // Entity (stable fields: id, pos, mass_kg, attributes…)
20
- export * from "./sim/commands.js"; // CommandMap, EntityCommand, action verbs
24
+ export * from "./sim/commands.js"; // CommandMap, Command, noMove()
25
+ export * from "./sim/kinds.js"; // CommandKinds, MoveModes, DefenceModes, EngageModes, HitArea
21
26
  export * from "./sim/kernel.js"; // stepWorld(), applyImpactToInjury(), applyExplosion()
22
27
  export * from "./sim/body.js"; // BodyPlan, BodySegment, humanoid / quadruped plans
23
28
  export * from "./sim/world.js"; // WorldState, KernelContext
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @module ananke/narrative
3
+ * @tier2 Experimental — breaking changes get a CHANGELOG entry.
4
+ *
5
+ * Narrative and chronicle systems: event chronicles, story arc detection,
6
+ * narrative rendering, legends, mythology, stress testing, combat metrics,
7
+ * and arena scenarios.
8
+ *
9
+ * Import via subpath:
10
+ * import { addChronicleEntry, detectStoryArcs } from "@its-not-rocket-science/ananke/narrative"
11
+ */
12
+ export * from "./chronicle.js";
13
+ export * from "./story-arcs.js";
14
+ export * from "./narrative-render.js";
15
+ export * from "./legend.js";
16
+ export * from "./mythology.js";
17
+ export * from "./narrative.js";
18
+ export * from "./narrative-stress.js";
19
+ export * from "./metrics.js";
20
+ export * from "./arena.js";
@@ -0,0 +1,20 @@
1
+ /**
2
+ * @module ananke/narrative
3
+ * @tier2 Experimental — breaking changes get a CHANGELOG entry.
4
+ *
5
+ * Narrative and chronicle systems: event chronicles, story arc detection,
6
+ * narrative rendering, legends, mythology, stress testing, combat metrics,
7
+ * and arena scenarios.
8
+ *
9
+ * Import via subpath:
10
+ * import { addChronicleEntry, detectStoryArcs } from "@its-not-rocket-science/ananke/narrative"
11
+ */
12
+ export * from "./chronicle.js";
13
+ export * from "./story-arcs.js";
14
+ export * from "./narrative-render.js";
15
+ export * from "./legend.js";
16
+ export * from "./mythology.js";
17
+ export * from "./narrative.js";
18
+ export * from "./narrative-stress.js";
19
+ export * from "./metrics.js";
20
+ export * from "./arena.js";
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @module ananke/social
3
+ * @tier2 Experimental — breaking changes get a CHANGELOG entry.
4
+ *
5
+ * Social systems: dialogue, factions, relationships, party management,
6
+ * quests, and quest generation.
7
+ *
8
+ * Import via subpath:
9
+ * import { dialogueProbability, effectiveStanding } from "@its-not-rocket-science/ananke/social"
10
+ */
11
+ export * from "./dialogue.js";
12
+ export * from "./faction.js";
13
+ export * from "./relationships.js";
14
+ export * from "./relationships-effects.js";
15
+ export * from "./party.js";
16
+ export * from "./quest.js";
17
+ export * from "./quest-generators.js";
@@ -0,0 +1,17 @@
1
+ /**
2
+ * @module ananke/social
3
+ * @tier2 Experimental — breaking changes get a CHANGELOG entry.
4
+ *
5
+ * Social systems: dialogue, factions, relationships, party management,
6
+ * quests, and quest generation.
7
+ *
8
+ * Import via subpath:
9
+ * import { dialogueProbability, effectiveStanding } from "@its-not-rocket-science/ananke/social"
10
+ */
11
+ export * from "./dialogue.js";
12
+ export * from "./faction.js";
13
+ export * from "./relationships.js";
14
+ export * from "./relationships-effects.js";
15
+ export * from "./party.js";
16
+ export * from "./quest.js";
17
+ export * from "./quest-generators.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@its-not-rocket-science/ananke",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "type": "module",
5
5
  "description": "Deterministic lockstep-friendly SI-units RPG/physics core (fixed-point TS)",
6
6
  "license": "MIT",
@@ -22,6 +22,38 @@
22
22
  "./catalog": {
23
23
  "import": "./dist/src/catalog.js",
24
24
  "types": "./dist/src/catalog.d.ts"
25
+ },
26
+ "./character": {
27
+ "import": "./dist/src/character.js",
28
+ "types": "./dist/src/character.d.ts"
29
+ },
30
+ "./combat": {
31
+ "import": "./dist/src/combat.js",
32
+ "types": "./dist/src/combat.d.ts"
33
+ },
34
+ "./campaign": {
35
+ "import": "./dist/src/campaign-layer.js",
36
+ "types": "./dist/src/campaign-layer.d.ts"
37
+ },
38
+ "./social": {
39
+ "import": "./dist/src/social.js",
40
+ "types": "./dist/src/social.d.ts"
41
+ },
42
+ "./narrative": {
43
+ "import": "./dist/src/narrative-layer.js",
44
+ "types": "./dist/src/narrative-layer.d.ts"
45
+ },
46
+ "./anatomy": {
47
+ "import": "./dist/src/anatomy/index.js",
48
+ "types": "./dist/src/anatomy/index.d.ts"
49
+ },
50
+ "./crafting": {
51
+ "import": "./dist/src/crafting/index.js",
52
+ "types": "./dist/src/crafting/index.d.ts"
53
+ },
54
+ "./competence": {
55
+ "import": "./dist/src/competence/index.js",
56
+ "types": "./dist/src/competence/index.d.ts"
25
57
  }
26
58
  },
27
59
  "files": [