briyah 2.0.3 → 2.0.5
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 +55 -8
- package/data/common/config/LICENSE-model-prices.md +65 -0
- package/data/common/config/markup +1 -1
- package/data/common/config/model_prices.json +47443 -46295
- package/data/common/config/story_models.json +3 -3
- package/data/common/prompts/illustrator/describe_scene.prompt +4 -4
- package/data/common/prompts/narrator/create_story.prompt +2 -0
- package/data/common/prompts/perceive.prompt +1 -1
- package/data/packs/dnd5e/prompts/battle_master/perceive.prompt +1 -1
- package/data/packs/dnd5e/prompts/campaign_designer/perceive.prompt +1 -1
- package/data/packs/dnd5e/prompts/character_creator/perceive.prompt +795 -787
- package/data/packs/dnd5e/prompts/dungeon_master/defaults_config.json +2 -1
- package/data/packs/dnd5e/prompts/dungeon_master/perceive.prompt +1 -1
- package/data/packs/dnd5e/rooms/campaign.json +18 -15
- package/data/packs/dnd5e/rooms/table.json +17 -16
- package/dist-sdk/server/src/ai/LLM/anthropic.service.d.ts +103 -0
- package/dist-sdk/server/src/ai/LLM/anthropic.service.js +174 -3
- package/dist-sdk/server/src/ai/LLM/base-ai.service.d.ts +194 -3
- package/dist-sdk/server/src/ai/LLM/base-ai.service.js +299 -19
- package/dist-sdk/server/src/ai/LLM/blank-image.d.ts +36 -0
- package/dist-sdk/server/src/ai/LLM/blank-image.js +80 -0
- package/dist-sdk/server/src/ai/LLM/comfyui-client.d.ts +26 -0
- package/dist-sdk/server/src/ai/LLM/comfyui-client.js +25 -0
- package/dist-sdk/server/src/ai/LLM/comfyui-workflow.d.ts +54 -0
- package/dist-sdk/server/src/ai/LLM/comfyui-workflow.js +59 -1
- package/dist-sdk/server/src/ai/LLM/comfyui.service.d.ts +21 -1
- package/dist-sdk/server/src/ai/LLM/comfyui.service.js +25 -1
- package/dist-sdk/server/src/ai/LLM/deepseek.service.d.ts +52 -0
- package/dist-sdk/server/src/ai/LLM/deepseek.service.js +103 -4
- package/dist-sdk/server/src/ai/LLM/fal.service.d.ts +25 -0
- package/dist-sdk/server/src/ai/LLM/fal.service.js +56 -2
- package/dist-sdk/server/src/ai/LLM/googleai.service.d.ts +19 -0
- package/dist-sdk/server/src/ai/LLM/googleai.service.js +43 -2
- package/dist-sdk/server/src/ai/LLM/grok.service.d.ts +22 -0
- package/dist-sdk/server/src/ai/LLM/grok.service.js +55 -3
- package/dist-sdk/server/src/ai/LLM/mock.service.js +31 -4
- package/dist-sdk/server/src/ai/LLM/openai.service.d.ts +30 -0
- package/dist-sdk/server/src/ai/LLM/openai.service.js +81 -3
- package/dist-sdk/server/src/ai/LLM/self-hosted.service.d.ts +21 -0
- package/dist-sdk/server/src/ai/LLM/self-hosted.service.js +45 -3
- package/dist-sdk/server/src/ai/LLM/together.service.d.ts +30 -0
- package/dist-sdk/server/src/ai/LLM/together.service.js +61 -3
- package/dist-sdk/server/src/ai/agent-config.d.ts +15 -1
- package/dist-sdk/server/src/ai/agent-factory.d.ts +16 -0
- package/dist-sdk/server/src/ai/agent-factory.js +20 -0
- package/dist-sdk/server/src/ai/agent-message.service.d.ts +30 -0
- package/dist-sdk/server/src/ai/agent-message.service.js +30 -0
- package/dist-sdk/server/src/ai/agent-store.service.d.ts +80 -0
- package/dist-sdk/server/src/ai/agent-store.service.js +166 -7
- package/dist-sdk/server/src/ai/agent.d.ts +197 -2
- package/dist-sdk/server/src/ai/agent.js +225 -14
- package/dist-sdk/server/src/ai/ai-debug-logger.d.ts +18 -0
- package/dist-sdk/server/src/ai/ai-debug-logger.js +19 -0
- package/dist-sdk/server/src/ai/ai-factory.service.d.ts +9 -0
- package/dist-sdk/server/src/ai/ai-factory.service.js +9 -0
- package/dist-sdk/server/src/ai/artifact.service.d.ts +131 -0
- package/dist-sdk/server/src/ai/artifact.service.js +148 -3
- package/dist-sdk/server/src/ai/attached-file.service.d.ts +87 -0
- package/dist-sdk/server/src/ai/attached-file.service.js +105 -0
- package/dist-sdk/server/src/ai/model_prices.d.ts +30 -0
- package/dist-sdk/server/src/ai/model_prices.js +91 -5
- package/dist-sdk/server/src/ai/pack-artifacts.d.ts +84 -0
- package/dist-sdk/server/src/ai/pack-artifacts.js +168 -0
- package/dist-sdk/server/src/ai/published-agents.service.d.ts +25 -0
- package/dist-sdk/server/src/ai/published-agents.service.js +30 -3
- package/dist-sdk/server/src/app/balance-message.service.d.ts +24 -0
- package/dist-sdk/server/src/app/balance-message.service.js +24 -0
- package/dist-sdk/server/src/app/balance.module.d.ts +4 -0
- package/dist-sdk/server/src/app/balance.module.js +4 -0
- package/dist-sdk/server/src/app/balance.service.d.ts +37 -0
- package/dist-sdk/server/src/app/balance.service.js +54 -0
- package/dist-sdk/server/src/app/stripe.controller.d.ts +21 -0
- package/dist-sdk/server/src/app/stripe.controller.js +35 -0
- package/dist-sdk/server/src/app/stripe.service.d.ts +43 -0
- package/dist-sdk/server/src/app/stripe.service.js +62 -0
- package/dist-sdk/server/src/app/transaction.service.d.ts +27 -0
- package/dist-sdk/server/src/app/transaction.service.js +36 -0
- package/dist-sdk/server/src/app/user-service-factory.d.ts +8 -0
- package/dist-sdk/server/src/app/user-service-factory.js +46 -3
- package/dist-sdk/server/src/app/user-service-manager.d.ts +27 -0
- package/dist-sdk/server/src/app/user-service-manager.js +43 -0
- package/dist-sdk/server/src/app.controller.d.ts +120 -0
- package/dist-sdk/server/src/app.controller.js +365 -14
- package/dist-sdk/server/src/app.module.js +28 -6
- package/dist-sdk/server/src/app.service.d.ts +1710 -4
- package/dist-sdk/server/src/app.service.js +1938 -20
- package/dist-sdk/server/src/auth/agent-access.decorator.d.ts +17 -0
- package/dist-sdk/server/src/auth/agent-access.decorator.js +17 -0
- package/dist-sdk/server/src/auth/auth.controller.js +46 -0
- package/dist-sdk/server/src/auth/auth.module.js +3 -2
- package/dist-sdk/server/src/auth/auth.service.d.ts +33 -0
- package/dist-sdk/server/src/auth/auth.service.js +39 -3
- package/dist-sdk/server/src/auth/jwt-auth.guard.js +44 -0
- package/dist-sdk/server/src/auth/jwt.strategy.js +2 -2
- package/dist-sdk/server/src/auth/owner-only.decorator.d.ts +9 -0
- package/dist-sdk/server/src/auth/owner-only.decorator.js +9 -0
- package/dist-sdk/server/src/auth/phone-validation.service.d.ts +25 -0
- package/dist-sdk/server/src/auth/phone-validation.service.js +30 -0
- package/dist-sdk/server/src/auth/rate-limit.service.d.ts +19 -0
- package/dist-sdk/server/src/auth/rate-limit.service.js +24 -0
- package/dist-sdk/server/src/auth/room-access.decorator.d.ts +8 -0
- package/dist-sdk/server/src/auth/room-access.decorator.js +8 -0
- package/dist-sdk/server/src/auth/scopes.decorator.d.ts +7 -0
- package/dist-sdk/server/src/auth/scopes.decorator.js +7 -0
- package/dist-sdk/server/src/auth/scopes.guard.d.ts +16 -0
- package/dist-sdk/server/src/auth/scopes.guard.js +30 -0
- package/dist-sdk/server/src/auth/session.guard.d.ts +4 -0
- package/dist-sdk/server/src/auth/session.guard.js +8 -0
- package/dist-sdk/server/src/auth/twilio.service.d.ts +27 -0
- package/dist-sdk/server/src/auth/twilio.service.js +30 -4
- package/dist-sdk/server/src/auth/users.service.d.ts +30 -0
- package/dist-sdk/server/src/auth/users.service.js +42 -0
- package/dist-sdk/server/src/common/errors.d.ts +20 -0
- package/dist-sdk/server/src/common/errors.js +21 -0
- package/dist-sdk/server/src/config/env-config.d.ts +7 -0
- package/dist-sdk/server/src/config/prompt-resolver.d.ts +180 -0
- package/dist-sdk/server/src/config/prompt-resolver.js +182 -0
- package/dist-sdk/server/src/config/user-config.service.d.ts +59 -0
- package/dist-sdk/server/src/config/user-config.service.js +57 -0
- package/dist-sdk/server/src/config/user-paths.service.d.ts +61 -0
- package/dist-sdk/server/src/config/user-paths.service.js +67 -0
- package/dist-sdk/server/src/documents/pdf-conversion.d.ts +121 -1
- package/dist-sdk/server/src/documents/pdf-conversion.js +94 -0
- package/dist-sdk/server/src/packs/pack-instantiation.service.d.ts +98 -0
- package/dist-sdk/server/src/packs/pack-instantiation.service.js +104 -0
- package/dist-sdk/server/src/packs/pack-manifest.d.ts +114 -0
- package/dist-sdk/server/src/packs/pack-manifest.js +69 -0
- package/dist-sdk/server/src/packs/pack.service.d.ts +99 -1
- package/dist-sdk/server/src/packs/pack.service.js +98 -1
- package/dist-sdk/server/src/room/artifact-store.service.d.ts +27 -0
- package/dist-sdk/server/src/room/artifact-store.service.js +49 -3
- package/dist-sdk/server/src/room/artifact.d.ts +18 -0
- package/dist-sdk/server/src/room/illustration/illustration.service.d.ts +211 -0
- package/dist-sdk/server/src/room/illustration/illustration.service.js +771 -0
- package/dist-sdk/server/src/room/illustration/illustration.types.d.ts +101 -0
- package/dist-sdk/server/src/room/illustration/illustration.types.js +2 -0
- package/dist-sdk/server/src/room/message.d.ts +64 -0
- package/dist-sdk/server/src/room/message.js +77 -2
- package/dist-sdk/server/src/room/nickname.d.ts +26 -0
- package/dist-sdk/server/src/room/nickname.js +26 -0
- package/dist-sdk/server/src/room/published-rooms.service.js +2 -0
- package/dist-sdk/server/src/room/room-config.d.ts +84 -1
- package/dist-sdk/server/src/room/room-config.js +19 -0
- package/dist-sdk/server/src/room/room-factory.d.ts +20 -0
- package/dist-sdk/server/src/room/room-factory.js +25 -0
- package/dist-sdk/server/src/room/room-message.service.d.ts +28 -0
- package/dist-sdk/server/src/room/room-message.service.js +28 -0
- package/dist-sdk/server/src/room/room-store.service.d.ts +184 -0
- package/dist-sdk/server/src/room/room-store.service.js +280 -6
- package/dist-sdk/server/src/room/room.d.ts +981 -1
- package/dist-sdk/server/src/room/room.js +1531 -27
- package/dist-sdk/server/src/rpg/rpg-models.d.ts +50 -0
- package/dist-sdk/server/src/rpg/rpg-models.js +53 -0
- package/dist-sdk/server/src/rpg/rpg-roster.d.ts +37 -0
- package/dist-sdk/server/src/rpg/rpg-roster.js +37 -0
- package/dist-sdk/server/src/rpg/rpg.service.d.ts +87 -0
- package/dist-sdk/server/src/rpg/rpg.service.js +108 -1
- package/dist-sdk/server/src/sdk/briyah-config.d.ts +57 -0
- package/dist-sdk/server/src/sdk/briyah-config.js +17 -0
- package/dist-sdk/server/src/sdk/briyah.d.ts +228 -0
- package/dist-sdk/server/src/sdk/briyah.js +285 -7
- package/dist-sdk/server/src/sdk/index.js +23 -0
- package/dist-sdk/server/src/shared/shared.module.d.ts +8 -0
- package/dist-sdk/server/src/shared/shared.module.js +13 -5
- package/dist-sdk/server/src/story/story-message.service.d.ts +43 -0
- package/dist-sdk/server/src/story/story-message.service.js +43 -0
- package/dist-sdk/server/src/story/story-progress.service.d.ts +23 -0
- package/dist-sdk/server/src/story/story-progress.service.js +23 -0
- package/dist-sdk/server/src/story/story-store.service.d.ts +92 -0
- package/dist-sdk/server/src/story/story-store.service.js +136 -1
- package/dist-sdk/server/src/story/story.service.d.ts +366 -9
- package/dist-sdk/server/src/story/story.service.js +825 -374
- package/dist-sdk/server/src/tools/core/illustrate.tool.d.ts +14 -0
- package/dist-sdk/server/src/tools/core/illustrate.tool.js +80 -0
- package/dist-sdk/server/src/tools/core/index.d.ts +22 -0
- package/dist-sdk/server/src/tools/core/index.js +24 -1
- package/dist-sdk/server/src/tools/core/rename.tool.d.ts +8 -0
- package/dist-sdk/server/src/tools/core/rename.tool.js +11 -0
- package/dist-sdk/server/src/tools/native-tool-registry.service.d.ts +22 -0
- package/dist-sdk/server/src/tools/native-tool-registry.service.js +22 -0
- package/dist-sdk/server/src/tools/native-tool.types.d.ts +266 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/backgrounds.d.ts +29 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/backgrounds.js +29 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/cantrips.d.ts +46 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/cantrips.js +40 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/feats.d.ts +33 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/feats.js +19 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/gear.d.ts +37 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/gear.generated.d.ts +17 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/gear.generated.js +17 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/gear.js +27 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/kits.d.ts +36 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/kits.js +32 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/magic-items.d.ts +32 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/magic-items.generated.d.ts +13 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/magic-items.generated.js +13 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/magic-items.js +18 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/monsters.d.ts +54 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/monsters.generated.d.ts +13 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/monsters.generated.js +13 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/monsters.js +20 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/races.d.ts +36 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/races.js +18 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/spells.d.ts +29 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/spells.generated.d.ts +13 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/spells.generated.js +13 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/spells.js +21 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/srd.d.ts +95 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/srd.js +66 -2
- package/dist-sdk/server/src/tools/packs/dnd5e/data/weapons.d.ts +50 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/weapons.js +28 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/bestiary.d.ts +92 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/bestiary.js +152 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/campaign-items.d.ts +28 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/campaign-items.js +29 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/cantrips.d.ts +31 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/cantrips.js +36 -2
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/character.d.ts +261 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/character.js +401 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/coerce.d.ts +11 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/coerce.js +11 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/dice.d.ts +65 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/dice.js +67 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/encounter.d.ts +73 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/encounter.js +63 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/encumbrance.d.ts +66 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/encumbrance.js +59 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/feats.d.ts +54 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/feats.js +49 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/foes.d.ts +42 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/foes.js +59 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/guides.d.ts +72 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/guides.js +63 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/items.d.ts +57 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/items.js +54 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/kits.d.ts +81 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/kits.js +85 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/races.d.ts +60 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/races.js +64 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/rules.d.ts +169 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/rules.js +203 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/sheet.d.ts +201 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/sheet.js +149 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/spells.d.ts +56 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/spells.js +54 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/weapons.d.ts +65 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/weapons.js +73 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/index.d.ts +18 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/index.js +18 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/check.tool.d.ts +4 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/check.tool.js +116 -1
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/class.tool.d.ts +14 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/class.tool.js +17 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/dice.tools.d.ts +1 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/dice.tools.js +35 -1
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/encounter.tool.d.ts +6 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/encounter.tool.js +25 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/item.tool.d.ts +7 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/item.tool.js +13 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/monster.tool.d.ts +8 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/monster.tool.js +55 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/shared.d.ts +194 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/shared.js +263 -1
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/sheet.tools.d.ts +1 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/sheet.tools.js +127 -2
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/spell.tool.d.ts +13 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/spell.tool.js +18 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/state.tools.d.ts +1 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/state.tools.js +23 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/world.tools.d.ts +1 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/world.tools.js +35 -0
- package/dist-sdk/server/src/tools/packs/index.d.ts +49 -0
- package/dist-sdk/server/src/tools/packs/index.js +66 -0
- package/dist-sdk/server/src/tools/shared/coerce.d.ts +95 -0
- package/dist-sdk/server/src/tools/shared/coerce.js +98 -0
- package/dist-sdk/server/src/tools/tool-execution.service.d.ts +107 -3
- package/dist-sdk/server/src/tools/tool-execution.service.js +163 -19
- package/dist-sdk/server/src/tools/tool-store.service.d.ts +11 -0
- package/dist-sdk/server/src/tools/tool-store.service.js +13 -1
- package/dist-sdk/shared/types/app.types.d.ts +328 -13
- package/dist-sdk/shared/types/app.types.js +18 -1
- package/package.json +167 -168
- package/data/common/config/random_words.txt +0 -2241
- package/data/common/story_ideas/biblical.json +0 -122
- package/data/common/story_ideas/fantasy.json +0 -82
- package/data/common/story_ideas/historical_fiction.json +0 -82
- package/data/common/story_ideas/science_fiction.json +0 -82
- package/docs/.nojekyll +0 -1
- package/docs/assets/hierarchy.js +0 -1
- package/docs/assets/highlight.css +0 -113
- package/docs/assets/icons.js +0 -18
- package/docs/assets/icons.svg +0 -1
- package/docs/assets/main.js +0 -60
- package/docs/assets/navigation.js +0 -1
- package/docs/assets/search.js +0 -1
- package/docs/assets/style.css +0 -1648
- package/docs/classes/Agent.html +0 -801
- package/docs/classes/Briyah.html +0 -296
- package/docs/classes/BriyahConfigService.html +0 -119
- package/docs/classes/NativeToolRegistry.html +0 -166
- package/docs/classes/PackInstantiationService.html +0 -157
- package/docs/classes/PackService.html +0 -247
- package/docs/classes/Room.html +0 -1434
- package/docs/classes/RoomMessage.html +0 -290
- package/docs/enums/MessageAction.html +0 -136
- package/docs/functions/availableToolPacks.html +0 -41
- package/docs/functions/buildMarkdown.html +0 -54
- package/docs/functions/dnd5eTools.html +0 -44
- package/docs/functions/installToolPacks.html +0 -51
- package/docs/functions/pageMarker.html +0 -45
- package/docs/functions/registerToolPacks.html +0 -54
- package/docs/functions/splitMarkdownIntoPages.html +0 -51
- package/docs/functions/stripWrappingFence.html +0 -52
- package/docs/hierarchy.html +0 -46
- package/docs/index.html +0 -595
- package/docs/interfaces/AgentCreationOptions.html +0 -125
- package/docs/interfaces/AgentInfo.html +0 -218
- package/docs/interfaces/AgentMessagesResponse.html +0 -74
- package/docs/interfaces/AppService.html +0 -3340
- package/docs/interfaces/Artifact.html +0 -95
- package/docs/interfaces/ArtifactMetadata.html +0 -112
- package/docs/interfaces/ArtifactWriteOptions.html +0 -90
- package/docs/interfaces/AttachDocumentResponse.html +0 -62
- package/docs/interfaces/BriyahConfigOptions.html +0 -124
- package/docs/interfaces/ChapterInfo.html +0 -62
- package/docs/interfaces/Character.html +0 -86
- package/docs/interfaces/ConversionAgent.html +0 -78
- package/docs/interfaces/CreateAgentResponse.html +0 -56
- package/docs/interfaces/CreateRoomResponse.html +0 -62
- package/docs/interfaces/CreateStoryResponse.html +0 -56
- package/docs/interfaces/FileList.html +0 -56
- package/docs/interfaces/FileMetadata.html +0 -89
- package/docs/interfaces/IConfigService.html +0 -79
- package/docs/interfaces/InstantiateModels.html +0 -64
- package/docs/interfaces/InstantiateRoomResult.html +0 -70
- package/docs/interfaces/LoadedPack.html +0 -131
- package/docs/interfaces/LoggingOptions.html +0 -92
- package/docs/interfaces/Message.html +0 -84
- package/docs/interfaces/ModelChoice.html +0 -73
- package/docs/interfaces/ModelInfo.html +0 -74
- package/docs/interfaces/NativeToolDefinition.html +0 -107
- package/docs/interfaces/PackAgentTemplate.html +0 -101
- package/docs/interfaces/PackRoomTemplate.html +0 -108
- package/docs/interfaces/PackView.html +0 -172
- package/docs/interfaces/PdfConversionOptions.html +0 -102
- package/docs/interfaces/PdfConversionResult.html +0 -97
- package/docs/interfaces/PdfMarkdownOptions.html +0 -198
- package/docs/interfaces/PdfMarkdownResult.html +0 -106
- package/docs/interfaces/PdfPageMarkdown.html +0 -94
- package/docs/interfaces/PreparedPromptResponse.html +0 -62
- package/docs/interfaces/ProcessTextResponse.html +0 -86
- package/docs/interfaces/PromptFile.html +0 -70
- package/docs/interfaces/PromptFileContent.html +0 -76
- package/docs/interfaces/PromptFilesResponse.html +0 -56
- package/docs/interfaces/PromptFolder.html +0 -80
- package/docs/interfaces/PromptFolderDefaults.html +0 -155
- package/docs/interfaces/PromptFolderDefaultsResponse.html +0 -79
- package/docs/interfaces/PromptFoldersResponse.html +0 -56
- package/docs/interfaces/RoomDetails.html +0 -151
- package/docs/interfaces/RoomErrorUpdate.html +0 -82
- package/docs/interfaces/RoomInfo.html +0 -88
- package/docs/interfaces/RoomMessageUpdate.html +0 -113
- package/docs/interfaces/RoomMessagesResponse.html +0 -62
- package/docs/interfaces/SendMessageResult.html +0 -62
- package/docs/interfaces/StoryErrorEvent.html +0 -84
- package/docs/interfaces/StoryIdea.html +0 -74
- package/docs/interfaces/StoryInfo.html +0 -198
- package/docs/interfaces/StoryIntroduceCharacterEvent.html +0 -79
- package/docs/interfaces/StoryProgressChapterEvent.html +0 -72
- package/docs/interfaces/StoryState.html +0 -108
- package/docs/interfaces/StoryStateEvent.html +0 -76
- package/docs/interfaces/ToolArtifact.html +0 -85
- package/docs/interfaces/ToolCaller.html +0 -77
- package/docs/interfaces/ToolDefinition.html +0 -80
- package/docs/interfaces/ToolHelpers.html +0 -105
- package/docs/interfaces/ToolPackDocuments.html +0 -100
- package/docs/interfaces/ToolParameter.html +0 -74
- package/docs/interfaces/ToolRoomAccess.html +0 -260
- package/docs/interfaces/ToolSummary.html +0 -74
- package/docs/interfaces/ToolsResponse.html +0 -68
- package/docs/interfaces/Transaction.html +0 -104
- package/docs/interfaces/TransactionHistoryResponse.html +0 -62
- package/docs/modules.html +0 -53
- package/docs/types/PackOrigin.html +0 -34
- package/docs/types/PromptScope.html +0 -34
- package/docs/types/RoomTurnMode.html +0 -42
- package/docs/types/RoomUpdate.html +0 -36
- package/docs/types/RosterOverrides.html +0 -42
- package/docs/types/ToolContext.html +0 -40
- package/docs/types/ToolRunResult.html +0 -34
- package/src/tools/packs/dnd5e/README.md +0 -867
|
@@ -1,18 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creature statistics from the System Reference Document 5.1.
|
|
3
|
+
*
|
|
4
|
+
* The whole SRD bestiary, so the Dungeon Master needs one cheap tool call for any
|
|
5
|
+
* creature in the book rather than a handoff to another agent. Lookup is a keyed
|
|
6
|
+
* map hit and costs the same here as it did at two dozen creatures; the things
|
|
7
|
+
* that do scale — ambiguous partial names, and the size of a result — are handled
|
|
8
|
+
* in `engine/bestiary.ts`. Anything outside the SRD is campaign-specific and
|
|
9
|
+
* belongs in the room's `Bestiary` artifact, written by whoever designed it.
|
|
10
|
+
*
|
|
11
|
+
* The table itself lives in `monsters.generated.ts` and is written by
|
|
12
|
+
* `server/scripts/import-srd-monsters.js`. This file owns the shapes, which are
|
|
13
|
+
* hand-maintained; regenerating the table must not change them.
|
|
14
|
+
*
|
|
15
|
+
* Licensing is the same as the rest of `data/`: SRD 5.1 under CC-BY-4.0. See
|
|
16
|
+
* LICENSE-SRD.md. Values are transcribed from the SRD into machine-readable form;
|
|
17
|
+
* anything you disagree with can be overridden in the `Bestiary` without touching
|
|
18
|
+
* code — a bestiary entry always wins over this table.
|
|
19
|
+
*/
|
|
1
20
|
import { AbilityKey } from './srd';
|
|
2
21
|
export interface MonsterAttack {
|
|
22
|
+
/** Attack name, e.g. 'Scimitar'. */
|
|
3
23
|
n: string;
|
|
24
|
+
/** Attack bonus, already including proficiency and ability. */
|
|
4
25
|
atk: number;
|
|
26
|
+
/** Damage dice expression, e.g. '1d6+2'. '0' for an attack that only imposes a condition. */
|
|
5
27
|
dmg: string;
|
|
28
|
+
/** Damage type, e.g. 'slashing'. */
|
|
6
29
|
type?: string;
|
|
30
|
+
/** Reach or range, e.g. '5 ft' or '80/320 ft'. */
|
|
7
31
|
reach?: string;
|
|
32
|
+
/** Any rider: a saving throw, a condition, extra damage. */
|
|
8
33
|
note?: string;
|
|
9
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* A named block of rules prose. Used for traits, for actions that are not attack
|
|
37
|
+
* rolls, for reactions and for legendary action options — all four are a name and
|
|
38
|
+
* a paragraph, and one shape for all of them keeps `describeMonster` uniform.
|
|
39
|
+
*/
|
|
10
40
|
export interface MonsterTrait {
|
|
11
41
|
n: string;
|
|
12
42
|
text: string;
|
|
13
43
|
}
|
|
14
44
|
export interface MonsterLegendary {
|
|
45
|
+
/** Legendary actions per round. Three for every SRD creature that has them. */
|
|
15
46
|
per: number;
|
|
47
|
+
/**
|
|
48
|
+
* The options. A cost is written into the name as the SRD writes it
|
|
49
|
+
* ('Wing Attack (Costs 2 Actions)'), since nothing consumes it mechanically.
|
|
50
|
+
*/
|
|
16
51
|
options: MonsterTrait[];
|
|
17
52
|
}
|
|
18
53
|
export interface MonsterBlock {
|
|
@@ -20,25 +55,44 @@ export interface MonsterBlock {
|
|
|
20
55
|
size?: string;
|
|
21
56
|
kind?: string;
|
|
22
57
|
ac: number;
|
|
58
|
+
/** What the armour class comes from, e.g. 'leather armor, shield'. */
|
|
23
59
|
acNote?: string;
|
|
24
60
|
hp: number;
|
|
61
|
+
/** Hit dice, so a group can be given individual totals. */
|
|
25
62
|
hpDice?: string;
|
|
26
63
|
speed: string;
|
|
27
64
|
abil: Record<AbilityKey, number>;
|
|
65
|
+
/**
|
|
66
|
+
* Proficient saving throw bonuses. An ability that is absent uses its own
|
|
67
|
+
* modifier, so only the proficient ones are listed — which is the only way to
|
|
68
|
+
* get them right, since proficiency cannot be derived from the score.
|
|
69
|
+
*/
|
|
28
70
|
saves?: Partial<Record<AbilityKey, number>>;
|
|
71
|
+
/** Skill bonuses worth knowing, e.g. { stealth: 6 }. */
|
|
29
72
|
skills?: Record<string, number>;
|
|
30
73
|
senses?: string;
|
|
31
74
|
languages?: string;
|
|
75
|
+
/** Challenge rating, as written in the SRD. */
|
|
32
76
|
cr?: string;
|
|
33
77
|
attacks: MonsterAttack[];
|
|
34
78
|
traits?: MonsterTrait[];
|
|
79
|
+
/**
|
|
80
|
+
* Actions that are not attack rolls: breath weapons, gaze attacks, summons.
|
|
81
|
+
* Their damage and save DCs stay in the prose rather than being structured —
|
|
82
|
+
* the Dungeon Master reads the dice out and rolls them, and parsing an area,
|
|
83
|
+
* a DC and a half-on-success rider out of free text is where an import gets
|
|
84
|
+
* quietly wrong.
|
|
85
|
+
*/
|
|
35
86
|
actions?: MonsterTrait[];
|
|
36
87
|
reactions?: MonsterTrait[];
|
|
37
88
|
legendary?: MonsterLegendary;
|
|
38
89
|
resist?: string[];
|
|
39
90
|
immune?: string[];
|
|
40
91
|
vuln?: string[];
|
|
92
|
+
/** Conditions the creature cannot be subjected to. */
|
|
41
93
|
condImmune?: string[];
|
|
94
|
+
/** True when the creature makes more than one attack per action. */
|
|
42
95
|
multiattack?: string;
|
|
43
96
|
}
|
|
97
|
+
/** Every SRD creature, keyed by lowercase name. */
|
|
44
98
|
export declare const SRD_MONSTERS: Record<string, MonsterBlock>;
|
|
@@ -1,2 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SRD 5.1 creature statistics.
|
|
3
|
+
*
|
|
4
|
+
* GENERATED FILE — do not edit by hand. Regenerate with:
|
|
5
|
+
*
|
|
6
|
+
* node scripts/import-srd-monsters.js <path-to-DND.SRD.Wiki>
|
|
7
|
+
*
|
|
8
|
+
* Source: the System Reference Document 5.1 by Wizards of the Coast LLC, under
|
|
9
|
+
* the Creative Commons Attribution 4.0 International License. See LICENSE-SRD.md.
|
|
10
|
+
*
|
|
11
|
+
* The shapes live in `monsters.ts`, which re-exports this table as
|
|
12
|
+
* `SRD_MONSTERS`. Import from there, not from here.
|
|
13
|
+
*/
|
|
1
14
|
import type { MonsterBlock } from './monsters';
|
|
2
15
|
export declare const GENERATED_MONSTERS: Record<string, MonsterBlock>;
|
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* SRD 5.1 creature statistics.
|
|
4
|
+
*
|
|
5
|
+
* GENERATED FILE — do not edit by hand. Regenerate with:
|
|
6
|
+
*
|
|
7
|
+
* node scripts/import-srd-monsters.js <path-to-DND.SRD.Wiki>
|
|
8
|
+
*
|
|
9
|
+
* Source: the System Reference Document 5.1 by Wizards of the Coast LLC, under
|
|
10
|
+
* the Creative Commons Attribution 4.0 International License. See LICENSE-SRD.md.
|
|
11
|
+
*
|
|
12
|
+
* The shapes live in `monsters.ts`, which re-exports this table as
|
|
13
|
+
* `SRD_MONSTERS`. Import from there, not from here.
|
|
14
|
+
*/
|
|
2
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
16
|
exports.GENERATED_MONSTERS = void 0;
|
|
4
17
|
exports.GENERATED_MONSTERS = {
|
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Creature statistics from the System Reference Document 5.1.
|
|
4
|
+
*
|
|
5
|
+
* The whole SRD bestiary, so the Dungeon Master needs one cheap tool call for any
|
|
6
|
+
* creature in the book rather than a handoff to another agent. Lookup is a keyed
|
|
7
|
+
* map hit and costs the same here as it did at two dozen creatures; the things
|
|
8
|
+
* that do scale — ambiguous partial names, and the size of a result — are handled
|
|
9
|
+
* in `engine/bestiary.ts`. Anything outside the SRD is campaign-specific and
|
|
10
|
+
* belongs in the room's `Bestiary` artifact, written by whoever designed it.
|
|
11
|
+
*
|
|
12
|
+
* The table itself lives in `monsters.generated.ts` and is written by
|
|
13
|
+
* `server/scripts/import-srd-monsters.js`. This file owns the shapes, which are
|
|
14
|
+
* hand-maintained; regenerating the table must not change them.
|
|
15
|
+
*
|
|
16
|
+
* Licensing is the same as the rest of `data/`: SRD 5.1 under CC-BY-4.0. See
|
|
17
|
+
* LICENSE-SRD.md. Values are transcribed from the SRD into machine-readable form;
|
|
18
|
+
* anything you disagree with can be overridden in the `Bestiary` without touching
|
|
19
|
+
* code — a bestiary entry always wins over this table.
|
|
20
|
+
*/
|
|
2
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
22
|
exports.SRD_MONSTERS = void 0;
|
|
4
23
|
const monsters_generated_1 = require("./monsters.generated");
|
|
24
|
+
/** Every SRD creature, keyed by lowercase name. */
|
|
5
25
|
exports.SRD_MONSTERS = monsters_generated_1.GENERATED_MONSTERS;
|
|
@@ -1,9 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The races in the System Reference Document 5.1.
|
|
3
|
+
*
|
|
4
|
+
* Hand-written rather than generated, unlike the creature and item tables: nine
|
|
5
|
+
* races and four subraces is small enough to check by eye, and what matters here
|
|
6
|
+
* is which parts are *mechanical* — ability increases, speed, size, darkvision,
|
|
7
|
+
* proficiencies, resistances — as against prose the player just needs to read.
|
|
8
|
+
* A generator would have to guess that split; a person can make it.
|
|
9
|
+
*
|
|
10
|
+
* SRD 5.1 carries **one** subrace per race where full 5e has several: hill dwarf,
|
|
11
|
+
* high elf, rock gnome, lightfoot halfling. A character sheet naming a subrace
|
|
12
|
+
* outside that set still resolves to its base race rather than failing, since
|
|
13
|
+
* plenty of tables play with more.
|
|
14
|
+
*
|
|
15
|
+
* Licensing is the same as the rest of `data/`: SRD 5.1 under CC-BY-4.0.
|
|
16
|
+
*/
|
|
1
17
|
import { AbilityKey } from './srd';
|
|
2
18
|
import type { ToolGrant } from './kits';
|
|
19
|
+
/** A named block of racial prose, the same shape as a creature's trait. */
|
|
3
20
|
export interface RaceTrait {
|
|
4
21
|
n: string;
|
|
5
22
|
text: string;
|
|
6
23
|
}
|
|
24
|
+
/**
|
|
25
|
+
* Ability increases the player chooses rather than the race dictating.
|
|
26
|
+
*
|
|
27
|
+
* The half-elf's "two other ability scores of your choice increase by 1" is the
|
|
28
|
+
* only case in the SRD. `excludeFixed` carries the "other": the choice may not
|
|
29
|
+
* land on a score the race already raised.
|
|
30
|
+
*/
|
|
7
31
|
export interface AbilityChoice {
|
|
8
32
|
count: number;
|
|
9
33
|
amount: number;
|
|
@@ -12,32 +36,44 @@ export interface AbilityChoice {
|
|
|
12
36
|
export interface SubraceRules {
|
|
13
37
|
name: string;
|
|
14
38
|
abil: Partial<Record<AbilityKey, number>>;
|
|
39
|
+
/** Skill proficiencies granted outright. */
|
|
15
40
|
skills?: string[];
|
|
41
|
+
/** Weapon proficiencies granted, by `WEAPONS` key. */
|
|
16
42
|
weapons?: string[];
|
|
43
|
+
/** Tool proficiencies granted, or offered as a choice. */
|
|
17
44
|
tools?: ToolGrant;
|
|
45
|
+
/** Extra languages the player picks. */
|
|
18
46
|
languageChoices?: number;
|
|
47
|
+
/** Hit points gained per level, on top of the class die. */
|
|
19
48
|
hpPerLevel?: number;
|
|
20
49
|
traits: RaceTrait[];
|
|
21
50
|
}
|
|
22
51
|
export interface RaceRules {
|
|
23
52
|
name: string;
|
|
53
|
+
/** Ability increases the race grants outright. */
|
|
24
54
|
abil: Partial<Record<AbilityKey, number>>;
|
|
25
55
|
abilityChoice?: AbilityChoice;
|
|
26
56
|
size: 'Small' | 'Medium';
|
|
27
57
|
speed: number;
|
|
58
|
+
/** Darkvision range in feet. */
|
|
28
59
|
darkvision?: number;
|
|
60
|
+
/** Damage types resisted. Absent when the race chooses one. */
|
|
29
61
|
resist?: string[];
|
|
30
62
|
skills?: string[];
|
|
63
|
+
/** Skill proficiencies the player picks, from any skill. */
|
|
31
64
|
skillChoices?: number;
|
|
32
65
|
weapons?: string[];
|
|
66
|
+
/** Tool proficiencies granted, or offered as a choice. */
|
|
33
67
|
tools?: ToolGrant;
|
|
34
68
|
languages: string[];
|
|
35
69
|
languageChoices?: number;
|
|
70
|
+
/** True when heavy armour does not slow the wearer — the dwarf only. */
|
|
36
71
|
ignoresHeavyArmorSpeed?: boolean;
|
|
37
72
|
traits: RaceTrait[];
|
|
38
73
|
subraces?: Record<string, SubraceRules>;
|
|
39
74
|
}
|
|
40
75
|
export declare const RACES: Record<string, RaceRules>;
|
|
76
|
+
/** Features a race grants once per rest, as pools `create_sheet` can track. */
|
|
41
77
|
export declare const RACIAL_USES: Record<string, Record<string, {
|
|
42
78
|
max: number;
|
|
43
79
|
reset: 'short' | 'long';
|
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* The races in the System Reference Document 5.1.
|
|
4
|
+
*
|
|
5
|
+
* Hand-written rather than generated, unlike the creature and item tables: nine
|
|
6
|
+
* races and four subraces is small enough to check by eye, and what matters here
|
|
7
|
+
* is which parts are *mechanical* — ability increases, speed, size, darkvision,
|
|
8
|
+
* proficiencies, resistances — as against prose the player just needs to read.
|
|
9
|
+
* A generator would have to guess that split; a person can make it.
|
|
10
|
+
*
|
|
11
|
+
* SRD 5.1 carries **one** subrace per race where full 5e has several: hill dwarf,
|
|
12
|
+
* high elf, rock gnome, lightfoot halfling. A character sheet naming a subrace
|
|
13
|
+
* outside that set still resolves to its base race rather than failing, since
|
|
14
|
+
* plenty of tables play with more.
|
|
15
|
+
*
|
|
16
|
+
* Licensing is the same as the rest of `data/`: SRD 5.1 under CC-BY-4.0.
|
|
17
|
+
*/
|
|
2
18
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
19
|
exports.RACIAL_USES = exports.RACES = void 0;
|
|
4
20
|
const DARKVISION_60 = {
|
|
@@ -130,6 +146,7 @@ exports.RACES = {
|
|
|
130
146
|
},
|
|
131
147
|
human: {
|
|
132
148
|
name: 'Human',
|
|
149
|
+
// The one race that raises everything, rather than offering a choice.
|
|
133
150
|
abil: { str: 1, dex: 1, con: 1, int: 1, wis: 1, cha: 1 },
|
|
134
151
|
size: 'Medium',
|
|
135
152
|
speed: 30,
|
|
@@ -250,6 +267,7 @@ exports.RACES = {
|
|
|
250
267
|
],
|
|
251
268
|
},
|
|
252
269
|
};
|
|
270
|
+
/** Features a race grants once per rest, as pools `create_sheet` can track. */
|
|
253
271
|
exports.RACIAL_USES = {
|
|
254
272
|
dragonborn: { breath_weapon: { max: 1, reset: 'short' } },
|
|
255
273
|
'half-orc': { relentless_endurance: { max: 1, reset: 'long' } },
|
|
@@ -1,16 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Spells from the System Reference Document 5.1.
|
|
3
|
+
*
|
|
4
|
+
* A spell, like a magic item, *is* its text — nothing in the pack computes from a
|
|
5
|
+
* spell's effect, because adjudicating "each creature in a 20-foot radius sphere"
|
|
6
|
+
* is the Dungeon Master's job and always will be. So the prose is the payload, and
|
|
7
|
+
* the structured fields are only the ones a caller filters or checks by: level,
|
|
8
|
+
* school, whether it needs concentration, whether it can be cast as a ritual, and
|
|
9
|
+
* which classes have it on their list.
|
|
10
|
+
*
|
|
11
|
+
* That last one is why the importer reads two files. The per-spell pages carry no
|
|
12
|
+
* class information at all; it lives in `Spells/## Spell Lists.md`, and without it
|
|
13
|
+
* there is no way to tell a player that a wizard cannot take *cure wounds*.
|
|
14
|
+
*
|
|
15
|
+
* The table lives in `spells.generated.ts` and is written by
|
|
16
|
+
* `server/scripts/import-srd-spells.js`. This file owns the shapes.
|
|
17
|
+
*
|
|
18
|
+
* Licensing is the same as the rest of `data/`: SRD 5.1 under CC-BY-4.0.
|
|
19
|
+
*/
|
|
1
20
|
export interface Spell {
|
|
2
21
|
name: string;
|
|
22
|
+
/** 0 for a cantrip, otherwise 1 to 9. */
|
|
3
23
|
level: number;
|
|
24
|
+
/** 'evocation', 'abjuration', and so on. */
|
|
4
25
|
school: string;
|
|
26
|
+
/** True when the spell can also be cast as a ritual. */
|
|
5
27
|
ritual?: boolean;
|
|
6
28
|
castingTime: string;
|
|
7
29
|
range: string;
|
|
30
|
+
/** As the SRD writes it: 'V, S, M (a tiny ball of bat guano and sulfur)'. */
|
|
8
31
|
components: string;
|
|
9
32
|
duration: string;
|
|
33
|
+
/** True when the duration begins 'Concentration'. Derived, but asked for often. */
|
|
10
34
|
concentration?: boolean;
|
|
35
|
+
/** Class keys that have this spell on their list. */
|
|
11
36
|
classes: string[];
|
|
37
|
+
/** The spell's own description. */
|
|
12
38
|
text: string;
|
|
39
|
+
/** The 'At Higher Levels' paragraph, kept apart so upcasting is easy to find. */
|
|
13
40
|
higherLevels?: string;
|
|
14
41
|
}
|
|
42
|
+
/** Every SRD spell, keyed by lowercase name. */
|
|
15
43
|
export declare const SRD_SPELLS: Record<string, Spell>;
|
|
44
|
+
/** How a spell level is written when it is shown to a person. */
|
|
16
45
|
export declare function spellLevelName(level: number): string;
|
|
@@ -1,2 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SRD 5.1 spells.
|
|
3
|
+
*
|
|
4
|
+
* GENERATED FILE — do not edit by hand. Regenerate with:
|
|
5
|
+
*
|
|
6
|
+
* node scripts/import-srd-spells.js <path-to-DND.SRD.Wiki>
|
|
7
|
+
*
|
|
8
|
+
* Source: the System Reference Document 5.1 by Wizards of the Coast LLC, under
|
|
9
|
+
* the Creative Commons Attribution 4.0 International License. See LICENSE-SRD.md.
|
|
10
|
+
*
|
|
11
|
+
* The shapes live in `spells.ts`, which re-exports this table as `SRD_SPELLS`.
|
|
12
|
+
* Import from there, not from here.
|
|
13
|
+
*/
|
|
1
14
|
import type { Spell } from './spells';
|
|
2
15
|
export declare const GENERATED_SPELLS: Record<string, Spell>;
|
|
@@ -1,4 +1,17 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* SRD 5.1 spells.
|
|
4
|
+
*
|
|
5
|
+
* GENERATED FILE — do not edit by hand. Regenerate with:
|
|
6
|
+
*
|
|
7
|
+
* node scripts/import-srd-spells.js <path-to-DND.SRD.Wiki>
|
|
8
|
+
*
|
|
9
|
+
* Source: the System Reference Document 5.1 by Wizards of the Coast LLC, under
|
|
10
|
+
* the Creative Commons Attribution 4.0 International License. See LICENSE-SRD.md.
|
|
11
|
+
*
|
|
12
|
+
* The shapes live in `spells.ts`, which re-exports this table as `SRD_SPELLS`.
|
|
13
|
+
* Import from there, not from here.
|
|
14
|
+
*/
|
|
2
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
16
|
exports.GENERATED_SPELLS = void 0;
|
|
4
17
|
exports.GENERATED_SPELLS = {
|
|
@@ -1,9 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Spells from the System Reference Document 5.1.
|
|
4
|
+
*
|
|
5
|
+
* A spell, like a magic item, *is* its text — nothing in the pack computes from a
|
|
6
|
+
* spell's effect, because adjudicating "each creature in a 20-foot radius sphere"
|
|
7
|
+
* is the Dungeon Master's job and always will be. So the prose is the payload, and
|
|
8
|
+
* the structured fields are only the ones a caller filters or checks by: level,
|
|
9
|
+
* school, whether it needs concentration, whether it can be cast as a ritual, and
|
|
10
|
+
* which classes have it on their list.
|
|
11
|
+
*
|
|
12
|
+
* That last one is why the importer reads two files. The per-spell pages carry no
|
|
13
|
+
* class information at all; it lives in `Spells/## Spell Lists.md`, and without it
|
|
14
|
+
* there is no way to tell a player that a wizard cannot take *cure wounds*.
|
|
15
|
+
*
|
|
16
|
+
* The table lives in `spells.generated.ts` and is written by
|
|
17
|
+
* `server/scripts/import-srd-spells.js`. This file owns the shapes.
|
|
18
|
+
*
|
|
19
|
+
* Licensing is the same as the rest of `data/`: SRD 5.1 under CC-BY-4.0.
|
|
20
|
+
*/
|
|
2
21
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
22
|
exports.SRD_SPELLS = void 0;
|
|
4
23
|
exports.spellLevelName = spellLevelName;
|
|
5
24
|
const spells_generated_1 = require("./spells.generated");
|
|
25
|
+
/** Every SRD spell, keyed by lowercase name. */
|
|
6
26
|
exports.SRD_SPELLS = spells_generated_1.GENERATED_SPELLS;
|
|
27
|
+
/** How a spell level is written when it is shown to a person. */
|
|
7
28
|
function spellLevelName(level) {
|
|
8
29
|
if (level === 0)
|
|
9
30
|
return 'cantrip';
|
|
@@ -1,49 +1,119 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Rules tables derived from the System Reference Document 5.1.
|
|
3
|
+
*
|
|
4
|
+
* SRD 5.1 is published by Wizards of the Coast under the Creative Commons
|
|
5
|
+
* Attribution 4.0 International licence. See LICENSE-SRD.md in this directory for
|
|
6
|
+
* the licence text and the required attribution, which {@link SRD_ATTRIBUTION}
|
|
7
|
+
* reproduces so it travels with any excerpt a tool returns.
|
|
8
|
+
*
|
|
9
|
+
* Only SRD 5.1 content belongs here. Do not add non-SRD material (named
|
|
10
|
+
* settings, non-SRD subclasses, non-SRD monsters or spells).
|
|
11
|
+
*
|
|
12
|
+
* These are code-versioned constants rather than data files under
|
|
13
|
+
* `server/data/`: that tree is user-mountable runtime state, while these tables
|
|
14
|
+
* must stay in lockstep with the functions in `engine/rules.ts` that read them.
|
|
15
|
+
*/
|
|
1
16
|
import type { ToolGrant } from './kits';
|
|
2
17
|
export declare const SRD_ATTRIBUTION = "This work includes material from the System Reference Document 5.1 by Wizards of the Coast LLC, available under the Creative Commons Attribution 4.0 International License.";
|
|
3
18
|
export type AbilityKey = 'str' | 'dex' | 'con' | 'int' | 'wis' | 'cha';
|
|
4
19
|
export declare const ABILITIES: AbilityKey[];
|
|
5
20
|
export declare const ABILITY_NAMES: Record<AbilityKey, string>;
|
|
21
|
+
/** Every skill and the ability it is measured against. */
|
|
6
22
|
export declare const SKILL_ABILITY: Record<string, AbilityKey>;
|
|
23
|
+
/** Proficiency bonus by character level (index 0 is unused). */
|
|
7
24
|
export declare const PROFICIENCY_BY_LEVEL: number[];
|
|
25
|
+
/** Experience needed to reach each level (index 0 unused, index 1 is level 1). */
|
|
8
26
|
export declare const XP_THRESHOLDS: number[];
|
|
9
27
|
export type CasterType = 'full' | 'half' | 'third' | 'warlock' | 'none';
|
|
10
28
|
export interface ClassRules {
|
|
11
29
|
name: string;
|
|
30
|
+
/** The class's hit die, e.g. 'd10'. */
|
|
12
31
|
hitDie: string;
|
|
32
|
+
/** Saving throws the class is proficient in at level 1. */
|
|
13
33
|
saves: AbilityKey[];
|
|
34
|
+
/** Number of skills the class chooses at level 1. */
|
|
14
35
|
skillChoices: number;
|
|
36
|
+
/** Skills the class may choose from, or [] when the class allows any. */
|
|
15
37
|
skillList: string[];
|
|
38
|
+
/**
|
|
39
|
+
* Tool proficiencies the class grants at level 1. Absent for the eight classes
|
|
40
|
+
* that grant none — most of the SRD's tool proficiency comes from backgrounds.
|
|
41
|
+
*/
|
|
16
42
|
tools?: ToolGrant;
|
|
17
43
|
caster: CasterType;
|
|
44
|
+
/** The ability used for spell attacks and the spell save DC. */
|
|
18
45
|
spellAbility?: AbilityKey;
|
|
46
|
+
/** Features that recharge on a short rest, by internal key. */
|
|
19
47
|
shortRestFeatures?: string[];
|
|
48
|
+
/**
|
|
49
|
+
* The level at which the class chooses its subclass. Most choose at 3, but
|
|
50
|
+
* the cleric, sorcerer and warlock choose at 1, and the druid and wizard at 2.
|
|
51
|
+
*/
|
|
20
52
|
subclassLevel: number;
|
|
53
|
+
/** What the class calls its subclass, e.g. 'Divine Domain'. */
|
|
21
54
|
subclassLabel: string;
|
|
55
|
+
/**
|
|
56
|
+
* Levels granting an Ability Score Improvement. Every class uses
|
|
57
|
+
* {@link STANDARD_ASI_LEVELS} except the fighter and the rogue, which get
|
|
58
|
+
* extra ones — a detail easy to miss, since only two of twelve differ.
|
|
59
|
+
*/
|
|
22
60
|
asiLevels: number[];
|
|
23
61
|
}
|
|
62
|
+
/** The Ability Score Improvement levels shared by ten of the twelve classes. */
|
|
24
63
|
export declare const STANDARD_ASI_LEVELS: number[];
|
|
64
|
+
/** The classes in SRD 5.1. */
|
|
25
65
|
export declare const CLASSES: Record<string, ClassRules>;
|
|
66
|
+
/**
|
|
67
|
+
* Spell slots for a full caster, indexed by class level then spell level.
|
|
68
|
+
* Index 0 of each row is unused so slot level reads naturally.
|
|
69
|
+
*/
|
|
26
70
|
export declare const FULL_CASTER_SLOTS: number[][];
|
|
71
|
+
/** Warlock pact magic: slots and the level they are cast at. */
|
|
27
72
|
export declare const WARLOCK_SLOTS: {
|
|
28
73
|
count: number;
|
|
29
74
|
level: number;
|
|
30
75
|
}[];
|
|
76
|
+
/** The conditions in SRD 5.1, with the mechanical effects they impose. */
|
|
31
77
|
export declare const CONDITIONS: Record<string, string>;
|
|
78
|
+
/** Exhaustion effects, cumulative, indexed by level. */
|
|
32
79
|
export declare const EXHAUSTION_EFFECTS: string[];
|
|
33
80
|
export declare const MAX_EXHAUSTION = 6;
|
|
81
|
+
/** Conditions that give the affected creature disadvantage on its attack rolls. */
|
|
34
82
|
export declare const ATTACK_DISADVANTAGE_CONDITIONS: string[];
|
|
83
|
+
/** Conditions that give the affected creature disadvantage on ability checks. */
|
|
35
84
|
export declare const CHECK_DISADVANTAGE_CONDITIONS: string[];
|
|
85
|
+
/**
|
|
86
|
+
* Conditions under which Strength and Dexterity saving throws fail automatically.
|
|
87
|
+
* These do not impose disadvantage — there is no roll to make.
|
|
88
|
+
*/
|
|
36
89
|
export declare const AUTO_FAIL_SAVE_CONDITIONS: string[];
|
|
90
|
+
/** Conditions that prevent a creature acting at all. */
|
|
37
91
|
export declare const INCAPACITATING_CONDITIONS: string[];
|
|
92
|
+
/** Base armour class and dexterity handling for the armour in SRD 5.1. */
|
|
38
93
|
export interface ArmorRules {
|
|
39
94
|
name: string;
|
|
40
95
|
baseAc: number;
|
|
96
|
+
/** 'full' adds the whole Dex modifier, 'capped' adds at most +2, 'none' adds nothing. */
|
|
41
97
|
dex: 'full' | 'capped' | 'none';
|
|
98
|
+
/** Minimum Strength, below which the wearer's speed drops by 10 feet. */
|
|
42
99
|
strengthRequirement?: number;
|
|
43
100
|
stealthDisadvantage?: boolean;
|
|
44
101
|
}
|
|
45
102
|
export declare const ARMOR: Record<string, ArmorRules>;
|
|
103
|
+
/** Short rules excerpts the DM can look up mid-play, keyed by topic. */
|
|
46
104
|
export declare const RULES_TOPICS: Record<string, string>;
|
|
105
|
+
/**
|
|
106
|
+
* How a class feature's maximum uses are worked out.
|
|
107
|
+
*
|
|
108
|
+
* - `fixed` — a flat number, e.g. a fighter's one Second Wind.
|
|
109
|
+
* - `ability` — an ability modifier, optionally offset and floored, e.g. a bard's
|
|
110
|
+
* Bardic Inspiration (Charisma modifier, minimum one) or a paladin's Divine Sense
|
|
111
|
+
* (Charisma modifier plus one).
|
|
112
|
+
* - `perLevel` — a multiple of the class level, e.g. a monk's ki (level) or a
|
|
113
|
+
* paladin's Lay on Hands pool (five times level).
|
|
114
|
+
* - `byLevel` — a step table of `[fromLevel, max]`, highest matching level wins,
|
|
115
|
+
* e.g. a barbarian's rages.
|
|
116
|
+
*/
|
|
47
117
|
export type FeatureUseMax = {
|
|
48
118
|
fixed: number;
|
|
49
119
|
} | {
|
|
@@ -55,11 +125,36 @@ export type FeatureUseMax = {
|
|
|
55
125
|
} | {
|
|
56
126
|
byLevel: [number, number][];
|
|
57
127
|
};
|
|
128
|
+
/** A class feature that tracks a pool of uses on the sheet. */
|
|
58
129
|
export interface ClassFeatureUses {
|
|
130
|
+
/** The `uses` key on the sheet, matching what `spend` and `rest` address. */
|
|
59
131
|
key: string;
|
|
132
|
+
/** How it reads back to a person. */
|
|
60
133
|
name: string;
|
|
134
|
+
/** The class level at which the feature arrives. */
|
|
61
135
|
from: number;
|
|
62
136
|
max: FeatureUseMax;
|
|
63
137
|
reset: 'short' | 'long';
|
|
64
138
|
}
|
|
139
|
+
/**
|
|
140
|
+
* The limited-use features each class grants, by class key.
|
|
141
|
+
*
|
|
142
|
+
* `create_sheet` computes these the way it computes spell slots and hit dice, so a
|
|
143
|
+
* character arrives able to spend what it owns. Before this table every sheet was
|
|
144
|
+
* hand-patched afterwards — three campaigns running, every character, always for
|
|
145
|
+
* the same handful of pools — and a `spend` before the patch failed with "this
|
|
146
|
+
* character tracks no limited-use features".
|
|
147
|
+
*
|
|
148
|
+
* Warlock Pact Magic is deliberately absent: those are spell slots and the slot
|
|
149
|
+
* machinery already owns them, under `PACT_MAGIC_PREFIX`.
|
|
150
|
+
*
|
|
151
|
+
* Rangers and rogues have no such pool at any level, so they are absent rather than
|
|
152
|
+
* empty — a class missing from here grants nothing, which is the same answer.
|
|
153
|
+
*
|
|
154
|
+
* Note {@link ClassRules.shortRestFeatures}, which names some of the same keys. It
|
|
155
|
+
* predates this and nothing reads it; it records only *which* features recharge on a
|
|
156
|
+
* short rest, not how many uses or when they arrive, and it disagrees with the rules
|
|
157
|
+
* on a bard (whose inspiration is long-rest until Font of Inspiration at 5). Trust
|
|
158
|
+
* this table.
|
|
159
|
+
*/
|
|
65
160
|
export declare const CLASS_FEATURE_USES: Record<string, ClassFeatureUses[]>;
|