briyah 1.5.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1092 -994
- package/data/common/config/markup +1 -1
- package/data/common/prompts/character/progress_character.json +5 -5
- package/data/common/prompts/illustrator/describe_scene.json +11 -3
- package/data/common/prompts/perceive.json +2 -2
- package/data/common/prompts/room_moderator/moderate.json +34 -34
- package/data/common/prompts/story_moderator/moderate.json +62 -62
- package/data/packs/dnd5e/agents/battle-master.json +6 -0
- package/data/packs/dnd5e/agents/campaign-designer.json +6 -0
- package/data/packs/dnd5e/agents/character-creator.json +6 -0
- package/data/packs/dnd5e/agents/dungeon-master.json +6 -0
- package/data/packs/dnd5e/agents/player.json +13 -0
- package/data/packs/dnd5e/agents/table-moderator.json +6 -0
- package/data/{common/artifacts/dnd5e/dungeon_master-procedure.md → packs/dnd5e/artifacts/battle_master-combat.md} +31 -131
- package/data/packs/dnd5e/artifacts/dungeon_master-procedure.md +192 -0
- package/data/{common/artifacts/dnd5e → packs/dnd5e/artifacts}/manifest.json +8 -2
- package/data/packs/dnd5e/pack.json +6 -0
- package/data/packs/dnd5e/prompts/battle_master/defaults_config.json +23 -0
- package/data/packs/dnd5e/prompts/battle_master/perceive.json +33 -0
- package/data/packs/dnd5e/prompts/battle_master/perceive.prompt +378 -0
- package/data/{common → packs/dnd5e}/prompts/character_creator/defaults_config.json +1 -1
- package/data/{common → packs/dnd5e}/prompts/character_creator/perceive.prompt +29 -0
- package/data/{common → packs/dnd5e}/prompts/dnd_player/perceive.prompt +40 -22
- package/data/{common → packs/dnd5e}/prompts/dnd_room_moderator/moderate.json +34 -34
- package/data/{common → packs/dnd5e}/prompts/dnd_room_moderator/moderate.prompt +14 -3
- package/data/{common → packs/dnd5e}/prompts/dungeon_master/defaults_config.json +1 -0
- package/data/{common → packs/dnd5e}/prompts/dungeon_master/perceive.prompt +122 -115
- package/data/packs/dnd5e/prompts/dungeon_master/system_instruction.prompt +0 -0
- package/data/packs/dnd5e/rooms/table.json +16 -0
- package/dist-sdk/server/src/ai/LLM/base-ai.service.js +4 -13
- package/dist-sdk/server/src/ai/LLM/deepseek.service.d.ts +2 -1
- package/dist-sdk/server/src/ai/LLM/deepseek.service.js +65 -77
- package/dist-sdk/server/src/ai/agent-config.d.ts +2 -0
- package/dist-sdk/server/src/ai/agent-store.service.js +8 -0
- package/dist-sdk/server/src/ai/agent.d.ts +6 -0
- package/dist-sdk/server/src/ai/agent.js +25 -2
- package/dist-sdk/server/src/ai/artifact.service.d.ts +3 -1
- package/dist-sdk/server/src/ai/artifact.service.js +12 -5
- package/dist-sdk/server/src/ai/pack-artifacts.d.ts +3 -3
- package/dist-sdk/server/src/ai/pack-artifacts.js +21 -15
- package/dist-sdk/server/src/app/user-service-factory.js +9 -1
- package/dist-sdk/server/src/app.controller.d.ts +11 -11
- package/dist-sdk/server/src/app.controller.js +178 -88
- package/dist-sdk/server/src/app.service.d.ts +28 -7
- package/dist-sdk/server/src/app.service.js +121 -91
- package/dist-sdk/server/src/common/errors.d.ts +0 -3
- package/dist-sdk/server/src/common/errors.js +1 -11
- package/dist-sdk/server/src/config/prompt-resolver.d.ts +39 -0
- package/dist-sdk/server/src/config/prompt-resolver.js +189 -0
- package/dist-sdk/server/src/config/user-config.service.d.ts +17 -0
- package/dist-sdk/server/src/config/user-config.service.js +103 -0
- package/dist-sdk/server/src/config/user-paths.service.d.ts +4 -4
- package/dist-sdk/server/src/config/user-paths.service.js +12 -16
- package/dist-sdk/server/src/packs/pack-instantiation.service.d.ts +35 -0
- package/dist-sdk/server/src/packs/pack-instantiation.service.js +154 -0
- package/dist-sdk/server/src/packs/pack-manifest.d.ts +52 -0
- package/dist-sdk/server/src/packs/pack-manifest.js +256 -0
- package/dist-sdk/server/src/packs/pack.service.d.ts +24 -0
- package/dist-sdk/server/src/packs/pack.service.js +151 -0
- package/dist-sdk/server/src/room/room-config.d.ts +5 -0
- package/dist-sdk/server/src/room/room-store.service.d.ts +3 -0
- package/dist-sdk/server/src/room/room-store.service.js +41 -5
- package/dist-sdk/server/src/room/room.d.ts +7 -0
- package/dist-sdk/server/src/room/room.js +29 -1
- package/dist-sdk/server/src/sdk/briyah.d.ts +2 -0
- package/dist-sdk/server/src/sdk/briyah.js +45 -8
- package/dist-sdk/server/src/sdk/index.d.ts +6 -1
- package/dist-sdk/server/src/sdk/index.js +6 -2
- package/dist-sdk/server/src/shared/shared.module.js +0 -3
- package/dist-sdk/server/src/story/story.service.d.ts +2 -2
- package/dist-sdk/server/src/tools/packs/dnd5e/data/kits.d.ts +17 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/kits.js +54 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/races.d.ts +3 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/races.js +6 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/srd.d.ts +2 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/srd.js +4 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/backgrounds.d.ts +1 -1
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/backgrounds.js +6 -3
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/character.d.ts +3 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/character.js +45 -5
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/encounter.d.ts +27 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/encounter.js +103 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/foes.d.ts +7 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/foes.js +83 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/kits.d.ts +19 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/kits.js +130 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/races.d.ts +2 -1
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/races.js +13 -2
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/rules.d.ts +6 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/rules.js +16 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/sheet.d.ts +10 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/sheet.js +82 -1
- package/dist-sdk/server/src/tools/packs/dnd5e/index.js +2 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/check.tool.js +51 -6
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/dice.tools.js +19 -9
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/encounter.tool.d.ts +2 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/encounter.tool.js +134 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/monster.tool.js +31 -13
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/shared.d.ts +2 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/shared.js +25 -8
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/sheet.tools.js +70 -4
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/world.tools.js +27 -0
- package/dist-sdk/server/src/tools/packs/index.d.ts +1 -2
- package/dist-sdk/server/src/tools/packs/index.js +5 -11
- package/dist-sdk/shared/types/app.types.d.ts +72 -13
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/highlight.css +8 -1
- package/docs/assets/icons.js +1 -1
- package/docs/assets/icons.svg +1 -1
- package/docs/assets/main.js +4 -4
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/assets/style.css +18 -3
- package/docs/classes/Agent.html +702 -37
- package/docs/classes/Briyah.html +250 -33
- package/docs/classes/BriyahConfigService.html +117 -10
- package/docs/classes/NativeToolRegistry.html +156 -11
- package/docs/classes/PackInstantiationService.html +146 -0
- package/docs/classes/PackService.html +247 -0
- package/docs/classes/Room.html +1190 -77
- package/docs/classes/RoomMessage.html +260 -29
- package/docs/enums/MessageAction.html +123 -3
- package/docs/functions/availableToolPacks.html +41 -2
- package/docs/functions/dnd5eTools.html +42 -3
- package/docs/functions/installToolPacks.html +48 -0
- package/docs/functions/registerToolPacks.html +54 -6
- package/docs/hierarchy.html +42 -1
- package/docs/index.html +158 -25
- package/docs/interfaces/AgentCreationOptions.html +110 -11
- package/docs/interfaces/AgentInfo.html +188 -3
- package/docs/interfaces/AgentMessagesResponse.html +71 -2
- package/docs/interfaces/AppService.html +2775 -474
- package/docs/interfaces/Artifact.html +81 -4
- package/docs/interfaces/ArtifactMetadata.html +104 -3
- package/docs/interfaces/ArtifactWriteOptions.html +75 -6
- package/docs/interfaces/AttachDocumentResponse.html +61 -2
- package/docs/interfaces/BriyahConfigOptions.html +107 -10
- package/docs/interfaces/ChapterInfo.html +61 -2
- package/docs/interfaces/Character.html +81 -2
- package/docs/interfaces/CreateAgentResponse.html +56 -2
- package/docs/interfaces/CreateRoomResponse.html +61 -2
- package/docs/interfaces/CreateStoryResponse.html +56 -2
- package/docs/interfaces/FileList.html +56 -2
- package/docs/interfaces/FileMetadata.html +84 -3
- package/docs/interfaces/IConfigService.html +76 -3
- package/docs/interfaces/InstantiateModels.html +64 -0
- package/docs/interfaces/InstantiateRoomResult.html +70 -0
- package/docs/interfaces/LoadedPack.html +131 -0
- package/docs/interfaces/LoggingOptions.html +86 -7
- package/docs/interfaces/Message.html +80 -2
- package/docs/interfaces/ModelChoice.html +73 -0
- package/docs/interfaces/ModelInfo.html +71 -2
- package/docs/interfaces/NativeToolDefinition.html +96 -9
- package/docs/interfaces/PackAgentTemplate.html +101 -0
- package/docs/interfaces/PackRoomTemplate.html +108 -0
- package/docs/interfaces/PackView.html +172 -0
- package/docs/interfaces/PreparedPromptResponse.html +61 -2
- package/docs/interfaces/ProcessTextResponse.html +81 -2
- package/docs/interfaces/PromptFile.html +69 -2
- package/docs/interfaces/PromptFileContent.html +75 -2
- package/docs/interfaces/PromptFilesResponse.html +56 -2
- package/docs/interfaces/PromptFolder.html +79 -2
- package/docs/interfaces/PromptFolderDefaults.html +136 -5
- package/docs/interfaces/PromptFolderDefaultsResponse.html +65 -4
- package/docs/interfaces/PromptFoldersResponse.html +56 -2
- package/docs/interfaces/RoomDetails.html +133 -4
- package/docs/interfaces/RoomInfo.html +84 -2
- package/docs/interfaces/RoomMessageUpdate.html +91 -2
- package/docs/interfaces/RoomMessagesResponse.html +61 -2
- package/docs/interfaces/SendMessageResult.html +61 -2
- package/docs/interfaces/StoryErrorEvent.html +76 -4
- package/docs/interfaces/StoryIdea.html +71 -2
- package/docs/interfaces/StoryInfo.html +173 -3
- package/docs/interfaces/StoryIntroduceCharacterEvent.html +71 -4
- package/docs/interfaces/StoryProgressChapterEvent.html +64 -3
- package/docs/interfaces/StoryState.html +99 -6
- package/docs/interfaces/StoryStateEvent.html +69 -3
- package/docs/interfaces/ToolArtifact.html +81 -4
- package/docs/interfaces/ToolCaller.html +75 -6
- package/docs/interfaces/ToolDefinition.html +76 -2
- package/docs/interfaces/ToolHelpers.html +91 -6
- package/docs/interfaces/ToolParameter.html +71 -2
- package/docs/interfaces/ToolRoomAccess.html +200 -24
- package/docs/interfaces/ToolSummary.html +71 -2
- package/docs/interfaces/ToolsResponse.html +66 -2
- package/docs/interfaces/Transaction.html +96 -2
- package/docs/interfaces/TransactionHistoryResponse.html +61 -2
- package/docs/modules.html +53 -1
- package/docs/types/PackOrigin.html +34 -0
- package/docs/types/PromptScope.html +34 -1
- package/docs/types/RoomTurnMode.html +36 -2
- package/docs/types/ToolContext.html +36 -2
- package/docs/types/ToolRunResult.html +34 -1
- package/package.json +139 -139
- package/src/tools/packs/dnd5e/README.md +149 -26
- package/dist-sdk/server/src/library/library.service.d.ts +0 -14
- package/dist-sdk/server/src/library/library.service.js +0 -165
- package/docs/functions/enabledToolPacks.html +0 -2
- /package/data/{common/artifacts/dnd5e → packs/dnd5e/artifacts}/campaign_designer-setting.md +0 -0
- /package/data/{common/artifacts/dnd5e → packs/dnd5e/artifacts}/character_creator-basics.md +0 -0
- /package/data/{common/artifacts/dnd5e → packs/dnd5e/artifacts}/class-barbarian.md +0 -0
- /package/data/{common/artifacts/dnd5e → packs/dnd5e/artifacts}/class-bard.md +0 -0
- /package/data/{common/artifacts/dnd5e → packs/dnd5e/artifacts}/class-cleric.md +0 -0
- /package/data/{common/artifacts/dnd5e → packs/dnd5e/artifacts}/class-druid.md +0 -0
- /package/data/{common/artifacts/dnd5e → packs/dnd5e/artifacts}/class-fighter.md +0 -0
- /package/data/{common/artifacts/dnd5e → packs/dnd5e/artifacts}/class-monk.md +0 -0
- /package/data/{common/artifacts/dnd5e → packs/dnd5e/artifacts}/class-paladin.md +0 -0
- /package/data/{common/artifacts/dnd5e → packs/dnd5e/artifacts}/class-ranger.md +0 -0
- /package/data/{common/artifacts/dnd5e → packs/dnd5e/artifacts}/class-rogue.md +0 -0
- /package/data/{common/artifacts/dnd5e → packs/dnd5e/artifacts}/class-sorcerer.md +0 -0
- /package/data/{common/artifacts/dnd5e → packs/dnd5e/artifacts}/class-warlock.md +0 -0
- /package/data/{common/artifacts/dnd5e → packs/dnd5e/artifacts}/class-wizard.md +0 -0
- /package/data/{common/prompts/campaign_designer → packs/dnd5e/prompts/battle_master}/system_instruction.prompt +0 -0
- /package/data/{common → packs/dnd5e}/prompts/campaign_designer/defaults_config.json +0 -0
- /package/data/{common → packs/dnd5e}/prompts/campaign_designer/perceive.json +0 -0
- /package/data/{common → packs/dnd5e}/prompts/campaign_designer/perceive.prompt +0 -0
- /package/data/{common/prompts/character_creator → packs/dnd5e/prompts/campaign_designer}/system_instruction.prompt +0 -0
- /package/data/{common → packs/dnd5e}/prompts/character_creator/perceive.json +0 -0
- /package/data/{common/prompts/dnd_player → packs/dnd5e/prompts/character_creator}/system_instruction.prompt +0 -0
- /package/data/{common → packs/dnd5e}/prompts/dnd_player/defaults_config.json +0 -0
- /package/data/{common → packs/dnd5e}/prompts/dnd_player/perceive.json +0 -0
- /package/data/{common/prompts/dnd_room_moderator → packs/dnd5e/prompts/dnd_player}/system_instruction.prompt +0 -0
- /package/data/{common → packs/dnd5e}/prompts/dnd_room_moderator/defaults_config.json +0 -0
- /package/data/{common/prompts/dungeon_master → packs/dnd5e/prompts/dnd_room_moderator}/system_instruction.prompt +0 -0
- /package/data/{common → packs/dnd5e}/prompts/dungeon_master/compact_agent.prompt +0 -0
- /package/data/{common → packs/dnd5e}/prompts/dungeon_master/perceive.json +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
17.18821978000002
|
|
@@ -6,21 +6,21 @@
|
|
|
6
6
|
"properties": {
|
|
7
7
|
"no_changes": {
|
|
8
8
|
"type": "boolean",
|
|
9
|
-
"description": "Set true when this character was NOT significantly affected by recent events. When true,
|
|
9
|
+
"description": "Set true when this character was NOT significantly affected by recent events. When true, send description, character_profile, and inventory as empty strings - the existing profile is left unchanged."
|
|
10
10
|
},
|
|
11
11
|
"description": {
|
|
12
12
|
"type": "string",
|
|
13
|
-
"description": "A brief 1-2 sentence description containing only immediately observable physical characteristics.
|
|
13
|
+
"description": "A brief 1-2 sentence description containing only immediately observable physical characteristics. Empty string when no_changes is true."
|
|
14
14
|
},
|
|
15
15
|
"character_profile": {
|
|
16
16
|
"type": "string",
|
|
17
|
-
"description": "An updated markdown-formatted character profile reflecting growth and changes from recent story events.
|
|
17
|
+
"description": "An updated markdown-formatted character profile reflecting growth and changes from recent story events. Empty string when no_changes is true."
|
|
18
18
|
},
|
|
19
19
|
"inventory": {
|
|
20
20
|
"type": "string",
|
|
21
|
-
"description": "An updated concise markdown inventory reflecting items gained, lost, consumed, equipped, or any new/resolved conditions since the last chapter. Use '## Items' and (optionally) '## Conditions' sections.
|
|
21
|
+
"description": "An updated concise markdown inventory reflecting items gained, lost, consumed, equipped, or any new/resolved conditions since the last chapter. Use '## Items' and (optionally) '## Conditions' sections. Empty string if the character was just introduced, had no inventory artifact yet, or no_changes is true."
|
|
22
22
|
}
|
|
23
23
|
},
|
|
24
|
-
"required": ["no_changes"],
|
|
24
|
+
"required": ["no_changes", "description", "character_profile", "inventory"],
|
|
25
25
|
"additionalProperties": false
|
|
26
26
|
}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"imageCaption": {
|
|
13
13
|
"type": "string",
|
|
14
|
-
"description": "A single sentence caption for the image describing what is happening"
|
|
14
|
+
"description": "A single sentence caption for the image describing what is happening. Empty string when createImage is false."
|
|
15
15
|
},
|
|
16
16
|
"sceneName": {
|
|
17
17
|
"type": "string",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
},
|
|
31
31
|
"newCharacters": {
|
|
32
32
|
"type": "array",
|
|
33
|
-
"description": "For every name in characterNames that is NOT in the input Characters list, provide a brief visual description grounded in the recent narration so a portrait can be generated.
|
|
33
|
+
"description": "For every name in characterNames that is NOT in the input Characters list, provide a brief visual description grounded in the recent narration so a portrait can be generated. Send an empty array if every name in characterNames is already in the Characters list.",
|
|
34
34
|
"items": {
|
|
35
35
|
"type": "object",
|
|
36
36
|
"properties": {
|
|
@@ -47,5 +47,13 @@
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
},
|
|
50
|
-
"required": [
|
|
50
|
+
"required": [
|
|
51
|
+
"createImage",
|
|
52
|
+
"isReference",
|
|
53
|
+
"imageCaption",
|
|
54
|
+
"sceneName",
|
|
55
|
+
"sceneDescription",
|
|
56
|
+
"characterNames",
|
|
57
|
+
"newCharacters"
|
|
58
|
+
]
|
|
51
59
|
}
|
|
@@ -21,9 +21,9 @@
|
|
|
21
21
|
},
|
|
22
22
|
"situation": {
|
|
23
23
|
"type": "string",
|
|
24
|
-
"description": "
|
|
24
|
+
"description": "A 1-2 sentence summary of the current situation (helps with message routing). Send an empty string when you have nothing to add — the field must be present."
|
|
25
25
|
}
|
|
26
26
|
},
|
|
27
|
-
"required": ["action", "targets", "content", "name"],
|
|
27
|
+
"required": ["action", "targets", "content", "name", "situation"],
|
|
28
28
|
"additionalProperties": false
|
|
29
29
|
}
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "moderate",
|
|
3
|
-
"description": "Route messages to appropriate agents",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"properties": {
|
|
6
|
-
"action": {
|
|
7
|
-
"type": "string",
|
|
8
|
-
"enum": ["relay", "relay_silent"],
|
|
9
|
-
"description": "Use 'relay' to pass message and log it to room history. Use 'relay_silent' for internal processing without logging to room (e.g., character actions going to narrator)"
|
|
10
|
-
},
|
|
11
|
-
"content": {
|
|
12
|
-
"type": "string",
|
|
13
|
-
"description": "The modified contents of the message to relay. Empty for no modifications"
|
|
14
|
-
},
|
|
15
|
-
"name": {
|
|
16
|
-
"type": "string",
|
|
17
|
-
"description": "The name of the agent who should respond next"
|
|
18
|
-
},
|
|
19
|
-
"targets": {
|
|
20
|
-
"type": "array",
|
|
21
|
-
"description": "List of agent names who should receive the message",
|
|
22
|
-
"items": {
|
|
23
|
-
"type": "string"
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
"relayAs": {
|
|
27
|
-
"type": "string",
|
|
28
|
-
"enum": ["speak", "whisper", "shout"],
|
|
29
|
-
"description": "The action the relayed message carries in the room. Use 'whisper' when the targets are only some of the agents present, 'speak' when everyone present is a target, and 'shout' only when the message must reach the whole room."
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
"required": ["action", "content", "name", "targets", "relayAs"],
|
|
33
|
-
"additionalProperties": false
|
|
34
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "moderate",
|
|
3
|
+
"description": "Route messages to appropriate agents",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"action": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"enum": ["relay", "relay_silent"],
|
|
9
|
+
"description": "Use 'relay' to pass message and log it to room history. Use 'relay_silent' for internal processing without logging to room (e.g., character actions going to narrator)"
|
|
10
|
+
},
|
|
11
|
+
"content": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "The modified contents of the message to relay. Empty for no modifications"
|
|
14
|
+
},
|
|
15
|
+
"name": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "The name of the agent who should respond next"
|
|
18
|
+
},
|
|
19
|
+
"targets": {
|
|
20
|
+
"type": "array",
|
|
21
|
+
"description": "List of agent names who should receive the message",
|
|
22
|
+
"items": {
|
|
23
|
+
"type": "string"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"relayAs": {
|
|
27
|
+
"type": "string",
|
|
28
|
+
"enum": ["speak", "whisper", "shout"],
|
|
29
|
+
"description": "The action the relayed message carries in the room. Use 'whisper' when the targets are only some of the agents present, 'speak' when everyone present is a target, and 'shout' only when the message must reach the whole room."
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"required": ["action", "content", "name", "targets", "relayAs"],
|
|
33
|
+
"additionalProperties": false
|
|
34
|
+
}
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "moderate",
|
|
3
|
-
"description": "Route messages to appropriate agents",
|
|
4
|
-
"type": "object",
|
|
5
|
-
"properties": {
|
|
6
|
-
"action": {
|
|
7
|
-
"type": "string",
|
|
8
|
-
"enum": ["relay", "relay_silent"],
|
|
9
|
-
"description": "Use 'relay' to pass message and log it to room history. Use 'relay_silent' for internal processing without logging to room (e.g., character actions going to narrator)"
|
|
10
|
-
},
|
|
11
|
-
"content": {
|
|
12
|
-
"type": "string",
|
|
13
|
-
"description": "The modified contents of the message to relay. Empty for no modifications"
|
|
14
|
-
},
|
|
15
|
-
"name": {
|
|
16
|
-
"type": "string",
|
|
17
|
-
"description": "The name of the agent who should respond next"
|
|
18
|
-
},
|
|
19
|
-
"targets": {
|
|
20
|
-
"type": "array",
|
|
21
|
-
"description": "List of agent names who should receive the message",
|
|
22
|
-
"items": {
|
|
23
|
-
"type": "string"
|
|
24
|
-
}
|
|
25
|
-
},
|
|
26
|
-
"changes": {
|
|
27
|
-
"type": "object",
|
|
28
|
-
"description": "Optional story state changes triggered by this message",
|
|
29
|
-
"properties": {
|
|
30
|
-
"update_portrait": {
|
|
31
|
-
"type": "array",
|
|
32
|
-
"description": "List of agent names whose visible appearance has changed (e.g., new outfit, injury, transformation, visible carried item). Leave empty or omit if no visual changes occurred.",
|
|
33
|
-
"items": {
|
|
34
|
-
"type": "string"
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
"update_inventory": {
|
|
38
|
-
"type": "array",
|
|
39
|
-
"description": "List of character inventory updates triggered by this message. Each entry replaces the named character's existing stored inventory wholesale. Include an entry only when items have actually been gained, lost, consumed, equipped, or when a notable physical/mental trait or condition has changed (wounded, exhausted, intoxicated, transformed, etc.). Leave empty or omit if nothing changed.",
|
|
40
|
-
"items": {
|
|
41
|
-
"type": "object",
|
|
42
|
-
"properties": {
|
|
43
|
-
"characterName": {
|
|
44
|
-
"type": "string",
|
|
45
|
-
"description": "The exact nickname of the character whose inventory is being updated."
|
|
46
|
-
},
|
|
47
|
-
"inventory": {
|
|
48
|
-
"type": "string",
|
|
49
|
-
"description": "The full updated inventory text. Concise markdown. Include an '## Items' section listing things the character has on their person, and a '## Conditions' section listing notable physical or mental traits and states. Omit either section if empty."
|
|
50
|
-
}
|
|
51
|
-
},
|
|
52
|
-
"required": ["characterName", "inventory"],
|
|
53
|
-
"additionalProperties": false
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
},
|
|
57
|
-
"additionalProperties": false
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
"required": ["action", "content", "name", "targets", "changes"],
|
|
61
|
-
"additionalProperties": false
|
|
62
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "moderate",
|
|
3
|
+
"description": "Route messages to appropriate agents",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"properties": {
|
|
6
|
+
"action": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"enum": ["relay", "relay_silent"],
|
|
9
|
+
"description": "Use 'relay' to pass message and log it to room history. Use 'relay_silent' for internal processing without logging to room (e.g., character actions going to narrator)"
|
|
10
|
+
},
|
|
11
|
+
"content": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"description": "The modified contents of the message to relay. Empty for no modifications"
|
|
14
|
+
},
|
|
15
|
+
"name": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"description": "The name of the agent who should respond next"
|
|
18
|
+
},
|
|
19
|
+
"targets": {
|
|
20
|
+
"type": "array",
|
|
21
|
+
"description": "List of agent names who should receive the message",
|
|
22
|
+
"items": {
|
|
23
|
+
"type": "string"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"changes": {
|
|
27
|
+
"type": "object",
|
|
28
|
+
"description": "Optional story state changes triggered by this message",
|
|
29
|
+
"properties": {
|
|
30
|
+
"update_portrait": {
|
|
31
|
+
"type": "array",
|
|
32
|
+
"description": "List of agent names whose visible appearance has changed (e.g., new outfit, injury, transformation, visible carried item). Leave empty or omit if no visual changes occurred.",
|
|
33
|
+
"items": {
|
|
34
|
+
"type": "string"
|
|
35
|
+
}
|
|
36
|
+
},
|
|
37
|
+
"update_inventory": {
|
|
38
|
+
"type": "array",
|
|
39
|
+
"description": "List of character inventory updates triggered by this message. Each entry replaces the named character's existing stored inventory wholesale. Include an entry only when items have actually been gained, lost, consumed, equipped, or when a notable physical/mental trait or condition has changed (wounded, exhausted, intoxicated, transformed, etc.). Leave empty or omit if nothing changed.",
|
|
40
|
+
"items": {
|
|
41
|
+
"type": "object",
|
|
42
|
+
"properties": {
|
|
43
|
+
"characterName": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"description": "The exact nickname of the character whose inventory is being updated."
|
|
46
|
+
},
|
|
47
|
+
"inventory": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"description": "The full updated inventory text. Concise markdown. Include an '## Items' section listing things the character has on their person, and a '## Conditions' section listing notable physical or mental traits and states. Omit either section if empty."
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"required": ["characterName", "inventory"],
|
|
53
|
+
"additionalProperties": false
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
"additionalProperties": false
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
"required": ["action", "content", "name", "targets", "changes"],
|
|
61
|
+
"additionalProperties": false
|
|
62
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
{
|
|
2
|
+
"key": "player",
|
|
3
|
+
"promptFolder": "dnd_player",
|
|
4
|
+
"label": "Player (human)",
|
|
5
|
+
"modelRole": "economy",
|
|
6
|
+
"overrides": {
|
|
7
|
+
"agentName": "Player One",
|
|
8
|
+
"agentNickname": "PlayerOne",
|
|
9
|
+
"description": "A player at the table.",
|
|
10
|
+
"controlledByHuman": true,
|
|
11
|
+
"useModerator": true
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
# Running
|
|
1
|
+
# Running a fight: the combat mechanics
|
|
2
2
|
|
|
3
|
-
Attach to the **
|
|
3
|
+
Attach to the **Battle Master** agent only.
|
|
4
4
|
|
|
5
|
-
This is the procedural half of
|
|
5
|
+
This is the procedural half of combat that the `dnd5e` tool pack does not model. The pack computes
|
|
6
6
|
numbers off character sheets and looks up creatures, spells, items and single rules; it does not
|
|
7
|
-
tell you how a round is sequenced, what an action can be spent on,
|
|
8
|
-
|
|
7
|
+
tell you how a round is sequenced, what an action can be spent on, what movement costs, or how a
|
|
8
|
+
shove is resolved. That is what is here.
|
|
9
9
|
|
|
10
10
|
*This work includes material from the System Reference Document 5.1 by Wizards of the Coast LLC,
|
|
11
11
|
available under the Creative Commons Attribution 4.0 International License.*
|
|
@@ -21,13 +21,11 @@ is authoritative and costs one call.
|
|
|
21
21
|
| Opportunity attacks, two-weapon fighting, grappling | `opportunity attack`, `two-weapon fighting`, `grappling` |
|
|
22
22
|
| Concentration | `concentration` |
|
|
23
23
|
| Death saves, massive damage, temporary hit points | `death saving throw`, `massive damage`, `temporary hit points` |
|
|
24
|
-
|
|
|
25
|
-
| Hiding, passive Perception | `hiding`, `passive perception` |
|
|
26
|
-
| Falling | `falling` |
|
|
27
|
-
| Any condition, weapon, armour, race, feat, background | the name itself |
|
|
24
|
+
| Any condition, weapon, armour, tool | the name itself |
|
|
28
25
|
|
|
29
26
|
`stat_block`, `spell` and `magic_item` cover every SRD creature, spell and item. `check`,
|
|
30
|
-
`apply_hp`, `
|
|
27
|
+
`apply_hp`, `spend` and `conditions` do the arithmetic — on monsters too, once they have been
|
|
28
|
+
placed in the fight, so nothing in a fight has to be tracked in your head.
|
|
31
29
|
|
|
32
30
|
## The combat round
|
|
33
31
|
|
|
@@ -147,7 +145,10 @@ knock it prone **or** push it 5 feet. Grappling works the same way; `rules_looku
|
|
|
147
145
|
|
|
148
146
|
## Damage and healing
|
|
149
147
|
|
|
150
|
-
`apply_hp` handles the arithmetic, the dying sequence and death saves
|
|
148
|
+
`apply_hp` handles the arithmetic, the dying sequence and death saves — **for monsters as well as
|
|
149
|
+
characters**, once the monsters have been placed with `stat_block`'s `place` parameter. A placed
|
|
150
|
+
creature takes damage by name, applies its own resistances, and dies outright at 0 without
|
|
151
|
+
rolling death saves. These are the rulings around it.
|
|
151
152
|
|
|
152
153
|
- **Damage rolls**: add the same ability modifier used for the attack roll. Roll area damage
|
|
153
154
|
**once** for every creature caught in it. Damage can be reduced to 0 but never below.
|
|
@@ -189,6 +190,22 @@ reaction to dismount and land on your feet.
|
|
|
189
190
|
it unless the weapon is a crossbow, a net, or thrown like a javelin, spear, trident or dart.
|
|
190
191
|
- Fully immersed creatures and objects have **resistance to fire**.
|
|
191
192
|
|
|
193
|
+
## Vision and light
|
|
194
|
+
|
|
195
|
+
**Lightly obscured** (dim light, patchy fog, moderate foliage): disadvantage on sight-based Wisdom
|
|
196
|
+
(Perception) checks. **Heavily obscured** (darkness, opaque fog, dense foliage): treat a creature
|
|
197
|
+
trying to see into it as blinded.
|
|
198
|
+
|
|
199
|
+
Bright light is normal sight. Dim light is lightly obscured, and covers twilight, dawn, the edge of
|
|
200
|
+
a torch's radius, and a brilliant full moon. Darkness is heavily obscured, and covers night
|
|
201
|
+
outdoors, an unlit dungeon and magical darkness.
|
|
202
|
+
|
|
203
|
+
- **Blindsight**: perceives without sight within a radius.
|
|
204
|
+
- **Darkvision**: darkness within the radius is only lightly obscured, in shades of grey.
|
|
205
|
+
- **Truesight**: sees in any darkness, sees invisible creatures and objects, automatically detects
|
|
206
|
+
and saves against visual illusions, sees a shapechanger's or transformed creature's true form,
|
|
207
|
+
and sees into the Ethereal Plane.
|
|
208
|
+
|
|
192
209
|
## Setting a difficulty
|
|
193
210
|
|
|
194
211
|
| Task | DC |
|
|
@@ -224,125 +241,8 @@ character makes no progress, or progress with a setback you choose.
|
|
|
224
241
|
| Wisdom | Animal Handling, Insight, Medicine, Perception, Survival |
|
|
225
242
|
| Charisma | Deception, Intimidation, Performance, Persuasion |
|
|
226
243
|
|
|
227
|
-
## Exploration
|
|
228
|
-
|
|
229
|
-
Track time on the scale the scene needs: **rounds** in combat, **minutes** in a dungeon (a minute
|
|
230
|
-
to creep down a hall, ten to search a chamber), **hours** in a city or wilderness, **days** on a
|
|
231
|
-
journey. Summarize movement between encounters unless the exact time matters.
|
|
232
|
-
|
|
233
|
-
| Pace | Per minute | Per hour | Per day | Effect |
|
|
234
|
-
|---|---|---|---|---|
|
|
235
|
-
| Fast | 400 ft | 4 miles | 30 miles | −5 to passive Wisdom (Perception) |
|
|
236
|
-
| Normal | 300 ft | 3 miles | 18 miles | — |
|
|
237
|
-
| Slow | 200 ft | 2 miles | 24 miles | May use stealth |
|
|
238
|
-
|
|
239
|
-
Difficult terrain halves all of these. The table assumes 8 hours of travel. For each hour beyond
|
|
240
|
-
that, the party covers the hourly distance and each character makes a Constitution save at DC
|
|
241
|
-
10 + 1 per hour past 8, taking one level of exhaustion on a failure. A mount can gallop for about
|
|
242
|
-
an hour at twice the fast-pace distance. Waterborne travel is limited to the vessel's speed,
|
|
243
|
-
neither penalized for a fast pace nor helped by a slow one, and can run up to 24 hours a day.
|
|
244
|
-
|
|
245
|
-
### Vision and light
|
|
246
|
-
|
|
247
|
-
**Lightly obscured** (dim light, patchy fog, moderate foliage): disadvantage on sight-based Wisdom
|
|
248
|
-
(Perception) checks. **Heavily obscured** (darkness, opaque fog, dense foliage): treat a creature
|
|
249
|
-
trying to see into it as blinded.
|
|
250
|
-
|
|
251
|
-
Bright light is normal sight. Dim light is lightly obscured, and covers twilight, dawn, the edge of
|
|
252
|
-
a torch's radius, and a brilliant full moon. Darkness is heavily obscured, and covers night
|
|
253
|
-
outdoors, an unlit dungeon and magical darkness.
|
|
254
|
-
|
|
255
|
-
- **Blindsight**: perceives without sight within a radius.
|
|
256
|
-
- **Darkvision**: darkness within the radius is only lightly obscured, in shades of grey.
|
|
257
|
-
- **Truesight**: sees in any darkness, sees invisible creatures and objects, automatically detects
|
|
258
|
-
and saves against visual illusions, sees a shapechanger's or transformed creature's true form,
|
|
259
|
-
and sees into the Ethereal Plane.
|
|
260
|
-
|
|
261
|
-
### Air, food and water
|
|
262
|
-
|
|
263
|
-
A creature holds its breath for 1 + its Constitution modifier minutes, minimum 30 seconds. Out of
|
|
264
|
-
breath or choking, it survives its Constitution modifier in rounds, minimum 1; at the start of its
|
|
265
|
-
next turn it drops to 0 hit points and is dying, and cannot regain hit points or be stabilized
|
|
266
|
-
until it can breathe.
|
|
267
|
-
|
|
268
|
-
A character needs 1 lb of food and 1 gallon of water a day, or 2 gallons in hot weather. Half
|
|
269
|
-
rations count as half a day without food; a character can go 3 + Constitution modifier days without
|
|
270
|
-
food, minimum 1, then takes a level of exhaustion each day. Half water needs a DC 15 Constitution
|
|
271
|
-
save to avoid a level of exhaustion; less than half is automatic. Either becomes two levels if the
|
|
272
|
-
character is already exhausted. Exhaustion from hunger or thirst cannot be removed until the full
|
|
273
|
-
amount is eaten and drunk.
|
|
274
|
-
|
|
275
|
-
### Breaking things
|
|
276
|
-
|
|
277
|
-
Objects are **immune to poison and psychic damage**, always fail Strength and Dexterity saves, and
|
|
278
|
-
are immune to effects requiring any other save. An object at 0 hit points breaks. A **damage
|
|
279
|
-
threshold** makes an object immune to any single hit below that number, which is how castle walls
|
|
280
|
-
work. Give a Huge or Gargantuan object no hit point total; divide it into Large sections instead.
|
|
281
|
-
|
|
282
|
-
| Substance | AC | | Size | Fragile | Resilient |
|
|
283
|
-
|---|---|---|---|---|---|
|
|
284
|
-
| Cloth, paper, rope | 11 | | Tiny (bottle, lock) | 2 (1d4) | 5 (2d4) |
|
|
285
|
-
| Crystal, glass, ice | 13 | | Small (chest, lute) | 3 (1d6) | 10 (3d6) |
|
|
286
|
-
| Wood, bone | 15 | | Medium (barrel, chandelier) | 4 (1d8) | 18 (4d8) |
|
|
287
|
-
| Stone | 17 | | Large (cart, 10-ft window) | 5 (1d10) | 27 (5d10) |
|
|
288
|
-
| Iron, steel | 19 | | | | |
|
|
289
|
-
| Mithral | 21 | | | | |
|
|
290
|
-
| Adamantine | 23 | | | | |
|
|
291
|
-
|
|
292
|
-
A Strength check can force or break something; set the DC yourself. Use judgment over the table:
|
|
293
|
-
a sword does not cut a stone wall, and bludgeoning does not sever a rope.
|
|
294
|
-
|
|
295
|
-
### Traps
|
|
296
|
-
|
|
297
|
-
A trap needs a trigger, an effect, a DC to detect and a way to disable or avoid it. A character
|
|
298
|
-
actively looking rolls Wisdom (Perception) against the trap's DC; otherwise compare passive Wisdom
|
|
299
|
-
(Perception). Disabling is usually Intelligence (Investigation) to work out what to do, then a
|
|
300
|
-
Dexterity check with thieves' tools. Intelligence (Arcana) detects or disarms a magic trap, and
|
|
301
|
-
*dispel magic* often works on one.
|
|
302
|
-
|
|
303
|
-
Let clever play win without a roll. If a character lifts the rug and finds the pressure plate, it
|
|
304
|
-
is found. If they push the chest open from behind a propped shield, the needles fire into the shield.
|
|
305
|
-
|
|
306
|
-
| Danger | Save DC | Attack bonus | | Level | Setback | Dangerous | Deadly |
|
|
307
|
-
|---|---|---|---|---|---|---|---|
|
|
308
|
-
| Setback | 10–11 | +3 to +5 | | 1st–4th | 1d10 | 2d10 | 4d10 |
|
|
309
|
-
| Dangerous | 12–15 | +6 to +8 | | 5th–10th | 2d10 | 4d10 | 10d10 |
|
|
310
|
-
| Deadly | 16–20 | +9 to +12 | | 11th–16th | 4d10 | 10d10 | 18d10 |
|
|
311
|
-
| | | | | 17th–20th | 10d10 | 18d10 | 24d10 |
|
|
312
|
-
|
|
313
|
-
A **complex trap** rolls initiative and acts every round, turning the trap into an encounter. Use
|
|
314
|
-
it for a room that floods a little each round.
|
|
315
|
-
|
|
316
|
-
### Resting
|
|
317
|
-
|
|
318
|
-
A **short rest** is at least 1 hour of nothing more strenuous than eating, drinking, reading and
|
|
319
|
-
tending wounds; a character may then spend Hit Dice. A **long rest** is at least 8 hours with at
|
|
320
|
-
least 6 asleep and no more than 2 hours of light activity, and is interrupted by an hour or more of
|
|
321
|
-
walking, fighting or spellcasting, which restarts it. One long rest per 24 hours, and a character
|
|
322
|
-
must have at least 1 hit point to benefit. `rest` applies both.
|
|
323
|
-
|
|
324
|
-
### Inspiration
|
|
325
|
-
|
|
326
|
-
Award inspiration for playing a personality trait, ideal, bond or flaw in a way that costs the
|
|
327
|
-
character something. It is binary, not stockpiled: spend it for advantage on one attack roll,
|
|
328
|
-
saving throw or ability check, or hand it to another player who earned it.
|
|
329
|
-
|
|
330
|
-
## Between adventures
|
|
331
|
-
|
|
332
|
-
Downtime activities take whole days, at least 8 hours each, not necessarily consecutive.
|
|
333
|
-
|
|
334
|
-
- **Crafting**: 5 gp of market value per day, expending half that in materials, with the right
|
|
335
|
-
tools. Several characters may combine days.
|
|
336
|
-
- **Practising a profession**: covers a modest lifestyle, or comfortable with an organization
|
|
337
|
-
behind you, or wealthy with Performance proficiency.
|
|
338
|
-
- **Recuperating**: after 3 days, a DC 15 Constitution save ends one effect preventing hit point
|
|
339
|
-
recovery, or grants a day's advantage on saves against one disease or poison.
|
|
340
|
-
- **Researching**: 1 gp a day. You decide whether the information exists, how long it takes, and
|
|
341
|
-
what checks it needs.
|
|
342
|
-
- **Training**: 250 days and 1 gp a day for a language or a tool proficiency, and an instructor.
|
|
343
|
-
|
|
344
244
|
## Not covered here
|
|
345
245
|
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
246
|
+
Everything outside a fight — travel, exploration, resting, traps, downtime — belongs to the
|
|
247
|
+
Dungeon Master and is in their document, not yours. When a fight ends, hand back rather than
|
|
248
|
+
carrying on into the aftermath.
|