briyah 2.0.2 → 2.0.4
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/LICENSE +216 -0
- package/README.md +43 -7
- 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/prompts/narrator/create_story.prompt +2 -0
- package/data/packs/dnd5e/agents/player.json +11 -11
- package/data/packs/dnd5e/prompts/character_creator/defaults_config.json +21 -20
- package/data/packs/dnd5e/prompts/character_creator/perceive.prompt +19 -12
- package/data/packs/dnd5e/prompts/dnd_player/perceive.prompt +10 -6
- package/dist-sdk/server/src/ai/LLM/anthropic.service.d.ts +103 -0
- package/dist-sdk/server/src/ai/LLM/anthropic.service.js +173 -2
- package/dist-sdk/server/src/ai/LLM/base-ai.service.d.ts +172 -3
- package/dist-sdk/server/src/ai/LLM/base-ai.service.js +241 -5
- 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 +102 -3
- package/dist-sdk/server/src/ai/LLM/fal.service.d.ts +25 -0
- package/dist-sdk/server/src/ai/LLM/fal.service.js +55 -1
- package/dist-sdk/server/src/ai/LLM/googleai.service.d.ts +19 -0
- package/dist-sdk/server/src/ai/LLM/googleai.service.js +42 -1
- package/dist-sdk/server/src/ai/LLM/grok.service.d.ts +22 -0
- package/dist-sdk/server/src/ai/LLM/grok.service.js +54 -2
- 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 +80 -2
- 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 +44 -2
- package/dist-sdk/server/src/ai/LLM/together.service.d.ts +30 -0
- package/dist-sdk/server/src/ai/LLM/together.service.js +60 -2
- package/dist-sdk/server/src/ai/agent-config.d.ts +15 -0
- 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 -5
- package/dist-sdk/server/src/ai/agent.d.ts +196 -0
- package/dist-sdk/server/src/ai/agent.js +224 -11
- 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 +38 -1
- 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 +87 -0
- package/dist-sdk/server/src/app.controller.js +272 -12
- package/dist-sdk/server/src/app.module.js +28 -6
- package/dist-sdk/server/src/app.service.d.ts +1662 -0
- package/dist-sdk/server/src/app.service.js +1862 -6
- 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 +18 -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 +99 -0
- package/dist-sdk/server/src/packs/pack-manifest.d.ts +100 -0
- package/dist-sdk/server/src/packs/pack-manifest.js +58 -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/message.d.ts +64 -0
- package/dist-sdk/server/src/room/message.js +77 -2
- package/dist-sdk/server/src/room/nickname.d.ts +27 -0
- package/dist-sdk/server/src/room/nickname.js +41 -0
- package/dist-sdk/server/src/room/published-rooms.service.js +2 -0
- package/dist-sdk/server/src/room/room-config.d.ts +26 -0
- package/dist-sdk/server/src/room/room-factory.d.ts +12 -0
- package/dist-sdk/server/src/room/room-factory.js +14 -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 +177 -0
- package/dist-sdk/server/src/room/room-store.service.js +242 -5
- package/dist-sdk/server/src/room/room.d.ts +906 -1
- package/dist-sdk/server/src/room/room.js +1525 -34
- 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 +38 -3
- package/dist-sdk/server/src/rpg/rpg-roster.js +49 -49
- package/dist-sdk/server/src/rpg/rpg.service.d.ts +87 -0
- package/dist-sdk/server/src/rpg/rpg.service.js +108 -5
- 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.d.ts +0 -1
- package/dist-sdk/server/src/sdk/index.js +24 -3
- 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 +398 -0
- package/dist-sdk/server/src/story/story.service.js +829 -25
- package/dist-sdk/server/src/tools/core/index.d.ts +25 -0
- package/dist-sdk/server/src/tools/core/index.js +31 -0
- package/dist-sdk/server/src/tools/core/rename.tool.d.ts +10 -0
- package/dist-sdk/server/src/tools/core/rename.tool.js +72 -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 +186 -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 +192 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/sheet.js +144 -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 +164 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/shared.js +188 -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 +125 -1
- 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 +52 -2
- package/dist-sdk/server/src/tools/packs/index.js +83 -9
- 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 +73 -0
- package/dist-sdk/server/src/tools/tool-execution.service.js +74 -0
- 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 +285 -14
- package/dist-sdk/shared/types/app.types.js +3 -0
- package/package.json +167 -139
- 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/data/packs/acts/agents/character-guide.json +0 -6
- package/data/packs/acts/agents/discipleship-mentor.json +0 -6
- package/data/packs/acts/agents/mentor-coach.json +0 -6
- package/data/packs/acts/agents/student.json +0 -13
- package/data/packs/acts/agents/table-moderator.json +0 -6
- package/data/packs/acts/artifacts/chapter-01-acts-1.md +0 -405
- package/data/packs/acts/artifacts/chapter-02-acts-2.md +0 -443
- package/data/packs/acts/artifacts/chapter-03-acts-3.md +0 -409
- package/data/packs/acts/artifacts/chapter-04-acts-4.md +0 -438
- package/data/packs/acts/artifacts/chapter-05-acts-5.md +0 -434
- package/data/packs/acts/artifacts/chapter-06-acts-6.md +0 -441
- package/data/packs/acts/artifacts/chapter-07-acts-7.md +0 -472
- package/data/packs/acts/artifacts/chapter-08-acts-8.md +0 -512
- package/data/packs/acts/artifacts/chapter-09-acts-9.md +0 -346
- package/data/packs/acts/artifacts/chapter-10-acts-10.md +0 -367
- package/data/packs/acts/artifacts/chapter-11-acts-11.md +0 -391
- package/data/packs/acts/artifacts/chapter-12-acts-12.md +0 -390
- package/data/packs/acts/artifacts/chapter-13-acts-13.md +0 -388
- package/data/packs/acts/artifacts/chapter-14-acts-14.md +0 -466
- package/data/packs/acts/artifacts/chapter-15-acts-15.md +0 -413
- package/data/packs/acts/artifacts/chapter-16-acts-16.md +0 -585
- package/data/packs/acts/artifacts/chapter-17-acts-17.md +0 -428
- package/data/packs/acts/artifacts/chapter-18-acts-18.md +0 -486
- package/data/packs/acts/artifacts/chapter-19-acts-19.md +0 -461
- package/data/packs/acts/artifacts/chapter-20-acts-20.md +0 -389
- package/data/packs/acts/artifacts/chapter-21-acts-21.md +0 -452
- package/data/packs/acts/artifacts/chapter-22-acts-22.md +0 -424
- package/data/packs/acts/artifacts/chapter-23-acts-23.md +0 -395
- package/data/packs/acts/artifacts/chapter-24-acts-24.md +0 -446
- package/data/packs/acts/artifacts/chapter-25-acts-25.md +0 -391
- package/data/packs/acts/artifacts/chapter-26-acts-26.md +0 -431
- package/data/packs/acts/artifacts/chapter-27-acts-27.md +0 -530
- package/data/packs/acts/artifacts/chapter-28-acts-28.md +0 -1871
- package/data/packs/acts/artifacts/chapters.manifest.json +0 -170
- package/data/packs/acts/artifacts/character_guide-creation.md +0 -112
- package/data/packs/acts/artifacts/discipleship_mentor-procedure.md +0 -154
- package/data/packs/acts/artifacts/discipleship_mentor-systems.md +0 -72
- package/data/packs/acts/artifacts/manifest.json +0 -197
- package/data/packs/acts/artifacts/stage-guide.md +0 -94
- package/data/packs/acts/pack.json +0 -6
- package/data/packs/acts/prompts/acts_player/defaults_config.json +0 -5
- package/data/packs/acts/prompts/acts_player/perceive.json +0 -29
- package/data/packs/acts/prompts/acts_player/perceive.prompt +0 -87
- package/data/packs/acts/prompts/acts_player/system_instruction.prompt +0 -0
- package/data/packs/acts/prompts/acts_room_moderator/defaults_config.json +0 -9
- package/data/packs/acts/prompts/acts_room_moderator/moderate.json +0 -34
- package/data/packs/acts/prompts/acts_room_moderator/moderate.prompt +0 -70
- package/data/packs/acts/prompts/acts_room_moderator/system_instruction.prompt +0 -0
- package/data/packs/acts/prompts/character_guide/defaults_config.json +0 -18
- package/data/packs/acts/prompts/character_guide/perceive.json +0 -29
- package/data/packs/acts/prompts/character_guide/perceive.prompt +0 -140
- package/data/packs/acts/prompts/character_guide/system_instruction.prompt +0 -0
- package/data/packs/acts/prompts/discipleship_mentor/defaults_config.json +0 -23
- package/data/packs/acts/prompts/discipleship_mentor/perceive.json +0 -33
- package/data/packs/acts/prompts/discipleship_mentor/perceive.prompt +0 -245
- package/data/packs/acts/prompts/discipleship_mentor/system_instruction.prompt +0 -0
- package/data/packs/acts/prompts/mentor_coach/defaults_config.json +0 -13
- package/data/packs/acts/prompts/mentor_coach/perceive.json +0 -29
- package/data/packs/acts/prompts/mentor_coach/perceive.prompt +0 -87
- package/data/packs/acts/prompts/mentor_coach/system_instruction.prompt +0 -0
- package/data/packs/acts/rooms/session.json +0 -14
- package/data/packs/acts/rooms/training.json +0 -58
- package/dist-sdk/server/src/tools/packs/acts/data/cards.d.ts +0 -53
- package/dist-sdk/server/src/tools/packs/acts/data/cards.js +0 -54
- package/dist-sdk/server/src/tools/packs/acts/data/character-cards.generated.d.ts +0 -2
- package/dist-sdk/server/src/tools/packs/acts/data/character-cards.generated.js +0 -185
- package/dist-sdk/server/src/tools/packs/acts/data/encounters.d.ts +0 -12
- package/dist-sdk/server/src/tools/packs/acts/data/encounters.js +0 -102
- package/dist-sdk/server/src/tools/packs/acts/data/event-cards.generated.d.ts +0 -2
- package/dist-sdk/server/src/tools/packs/acts/data/event-cards.generated.js +0 -196
- package/dist-sdk/server/src/tools/packs/acts/data/item-cards.generated.d.ts +0 -2
- package/dist-sdk/server/src/tools/packs/acts/data/item-cards.generated.js +0 -1311
- package/dist-sdk/server/src/tools/packs/acts/engine/cards.d.ts +0 -5
- package/dist-sdk/server/src/tools/packs/acts/engine/cards.js +0 -27
- package/dist-sdk/server/src/tools/packs/acts/engine/challenge.d.ts +0 -37
- package/dist-sdk/server/src/tools/packs/acts/engine/challenge.js +0 -120
- package/dist-sdk/server/src/tools/packs/acts/engine/dice.d.ts +0 -20
- package/dist-sdk/server/src/tools/packs/acts/engine/dice.js +0 -41
- package/dist-sdk/server/src/tools/packs/acts/engine/sheet.d.ts +0 -54
- package/dist-sdk/server/src/tools/packs/acts/engine/sheet.js +0 -200
- package/dist-sdk/server/src/tools/packs/acts/index.d.ts +0 -2
- package/dist-sdk/server/src/tools/packs/acts/index.js +0 -24
- package/dist-sdk/server/src/tools/packs/acts/tools/award.tool.d.ts +0 -2
- package/dist-sdk/server/src/tools/packs/acts/tools/award.tool.js +0 -184
- package/dist-sdk/server/src/tools/packs/acts/tools/challenge.tool.d.ts +0 -2
- package/dist-sdk/server/src/tools/packs/acts/tools/challenge.tool.js +0 -107
- package/dist-sdk/server/src/tools/packs/acts/tools/chapter.tool.d.ts +0 -3
- package/dist-sdk/server/src/tools/packs/acts/tools/chapter.tool.js +0 -146
- package/dist-sdk/server/src/tools/packs/acts/tools/check.tool.d.ts +0 -4
- package/dist-sdk/server/src/tools/packs/acts/tools/check.tool.js +0 -241
- package/dist-sdk/server/src/tools/packs/acts/tools/encounter.tool.d.ts +0 -3
- package/dist-sdk/server/src/tools/packs/acts/tools/encounter.tool.js +0 -72
- package/dist-sdk/server/src/tools/packs/acts/tools/faith.tool.d.ts +0 -2
- package/dist-sdk/server/src/tools/packs/acts/tools/faith.tool.js +0 -75
- package/dist-sdk/server/src/tools/packs/acts/tools/shared.d.ts +0 -20
- package/dist-sdk/server/src/tools/packs/acts/tools/shared.js +0 -70
- package/dist-sdk/server/src/tools/packs/acts/tools/sheet.tools.d.ts +0 -4
- package/dist-sdk/server/src/tools/packs/acts/tools/sheet.tools.js +0 -215
- 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 -1338
- package/docs/classes/RoomMessage.html +0 -290
- package/docs/enums/MessageAction.html +0 -136
- package/docs/functions/actsTools.html +0 -44
- 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 -48
- 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 -3337
- 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 -227
- 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
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RoomMessage = void 0;
|
|
4
4
|
const app_types_1 = require("../../../shared/types/app.types");
|
|
5
|
+
/**
|
|
6
|
+
* Represents a message exchanged between conversations in a Room
|
|
7
|
+
*/
|
|
5
8
|
class RoomMessage {
|
|
6
9
|
sender;
|
|
7
10
|
action;
|
|
@@ -9,10 +12,41 @@ class RoomMessage {
|
|
|
9
12
|
targets;
|
|
10
13
|
timestamp;
|
|
11
14
|
name;
|
|
12
|
-
situation;
|
|
13
|
-
changes;
|
|
15
|
+
situation; // Optional situation update (usually from narrator)
|
|
16
|
+
changes; // Generic story state changes from moderator (e.g. { update_portrait: [...] })
|
|
14
17
|
index;
|
|
18
|
+
/**
|
|
19
|
+
* On a moderator's routing answer: the action the relayed message should carry
|
|
20
|
+
* in the room, rather than staying a MODERATE.
|
|
21
|
+
*
|
|
22
|
+
* A moderated message with no `relayAs` is stored in every recipient's history
|
|
23
|
+
* as `From: <sender>\n<content>` (see Agent.addToConversationHistory), which is
|
|
24
|
+
* what a story character expects and what a room agent that speaks the JSON
|
|
25
|
+
* protocol does not — half its history would model the wrong output format.
|
|
26
|
+
* Naming an action here makes the relayed message an ordinary room message: the
|
|
27
|
+
* right shape in history, and the right badge in the transcript.
|
|
28
|
+
*
|
|
29
|
+
* Only moderators whose `moderate.json` declares the field can produce it, so a
|
|
30
|
+
* moderator that says nothing keeps the original behaviour.
|
|
31
|
+
*/
|
|
15
32
|
relayAs;
|
|
33
|
+
/**
|
|
34
|
+
* Creates a new Message
|
|
35
|
+
*
|
|
36
|
+
* **Every name on a message is an `agentNickname`**, never an `agentName`. The
|
|
37
|
+
* nickname is what the room routes by, what an agent writes into `targets`, and
|
|
38
|
+
* what artifact viewers and the room leader are recorded as. `agentName` is a
|
|
39
|
+
* label — it names the role, carries the room's name as a prefix, and nothing
|
|
40
|
+
* resolves it. The parameters here said otherwise for a long time while every
|
|
41
|
+
* caller passed a nickname.
|
|
42
|
+
*
|
|
43
|
+
* @param sender The agentNickname of the agent sending the message
|
|
44
|
+
* @param content The content of the message
|
|
45
|
+
* @param action The action type of the message
|
|
46
|
+
* @param targets Array of agentNicknames that will receive the message
|
|
47
|
+
* @param name Optional name for PUBLISH and EXECUTE actions
|
|
48
|
+
* @param situation Optional situation update to set the current story situation
|
|
49
|
+
*/
|
|
16
50
|
constructor(sender, action = app_types_1.MessageAction.SPEAK, content, targets = [], name, situation) {
|
|
17
51
|
this.sender = sender;
|
|
18
52
|
this.action = action;
|
|
@@ -22,27 +56,57 @@ class RoomMessage {
|
|
|
22
56
|
this.timestamp = new Date();
|
|
23
57
|
this.situation = situation;
|
|
24
58
|
}
|
|
59
|
+
/**
|
|
60
|
+
* Gets the sender of the message
|
|
61
|
+
* @returns The agentNickname of the sender
|
|
62
|
+
*/
|
|
25
63
|
getSender() {
|
|
26
64
|
return this.sender;
|
|
27
65
|
}
|
|
66
|
+
/**
|
|
67
|
+
* Gets the action type of the message
|
|
68
|
+
* @returns The message action
|
|
69
|
+
*/
|
|
28
70
|
getAction() {
|
|
29
71
|
return this.action;
|
|
30
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
* Gets the content of the message
|
|
75
|
+
* @returns The message content
|
|
76
|
+
*/
|
|
31
77
|
getContent() {
|
|
32
78
|
return this.content;
|
|
33
79
|
}
|
|
80
|
+
/**
|
|
81
|
+
* Gets the targets of the message
|
|
82
|
+
* @returns Array of agentNicknames of target conversations
|
|
83
|
+
*/
|
|
34
84
|
getTargets() {
|
|
35
85
|
return [...this.targets];
|
|
36
86
|
}
|
|
87
|
+
/**
|
|
88
|
+
* Gets the timestamp when the message was created
|
|
89
|
+
* @returns The message timestamp
|
|
90
|
+
*/
|
|
37
91
|
getTimestamp() {
|
|
38
92
|
return this.timestamp;
|
|
39
93
|
}
|
|
94
|
+
/**
|
|
95
|
+
* Checks if an agent is a target of this message (intended recipient)
|
|
96
|
+
* @param agentNickname The agentNickname to check
|
|
97
|
+
* @returns True if the conversation is a target, false otherwise
|
|
98
|
+
*/
|
|
40
99
|
isTarget(agentNickname) {
|
|
100
|
+
// For SHOUT, everyone is a target
|
|
41
101
|
if (this.action === app_types_1.MessageAction.SHOUT)
|
|
42
102
|
return true;
|
|
103
|
+
// For THINK, only the sender is a target
|
|
43
104
|
if (this.action === app_types_1.MessageAction.THINK) {
|
|
44
105
|
return this.sender === agentNickname;
|
|
45
106
|
}
|
|
107
|
+
// For WHISPER, RELAY, RELAY_SILENT, COMMISSION, and DELIVER, only specific
|
|
108
|
+
// agents are targets (COMMISSION targets the commissioned agents; DELIVER
|
|
109
|
+
// targets the commissioner)
|
|
46
110
|
if (this.action === app_types_1.MessageAction.WHISPER ||
|
|
47
111
|
this.action === app_types_1.MessageAction.RELAY ||
|
|
48
112
|
this.action === app_types_1.MessageAction.RELAY_SILENT ||
|
|
@@ -50,15 +114,22 @@ class RoomMessage {
|
|
|
50
114
|
this.action === app_types_1.MessageAction.DELIVER) {
|
|
51
115
|
return this.targets.includes(agentNickname);
|
|
52
116
|
}
|
|
117
|
+
// For SPEAK with targets, only those in the targets list are targets
|
|
53
118
|
if (this.targets.length > 0) {
|
|
54
119
|
return this.targets.includes(agentNickname);
|
|
55
120
|
}
|
|
56
121
|
return false;
|
|
57
122
|
}
|
|
123
|
+
/**
|
|
124
|
+
* Checks if a conversation can hear this message
|
|
125
|
+
* @param agentNickname The agentNickname to check
|
|
126
|
+
* @returns True if the conversation can hear the message, false otherwise
|
|
127
|
+
*/
|
|
58
128
|
canHear(agentNickname) {
|
|
59
129
|
if (this.sender === agentNickname) {
|
|
60
130
|
return false;
|
|
61
131
|
}
|
|
132
|
+
// TOOL messages are log-only notices of tool executions; no agent perceives them
|
|
62
133
|
if (this.action === app_types_1.MessageAction.TOOL)
|
|
63
134
|
return false;
|
|
64
135
|
if (this.action === app_types_1.MessageAction.RELAY || this.action === app_types_1.MessageAction.RELAY_SILENT)
|
|
@@ -67,9 +138,13 @@ class RoomMessage {
|
|
|
67
138
|
return this.targets.includes(agentNickname) || this.targets.length === 0;
|
|
68
139
|
if (this.action === app_types_1.MessageAction.EXECUTE)
|
|
69
140
|
return this.targets.includes(agentNickname) || this.targets.length === 0;
|
|
141
|
+
// For WHISPER, only specific targets can hear
|
|
70
142
|
if (this.action === app_types_1.MessageAction.WHISPER) {
|
|
71
143
|
return this.targets.includes(agentNickname);
|
|
72
144
|
}
|
|
145
|
+
// For SPEAK, SHOUT, ADJOURN, COMMISSION, and DELIVER everyone can hear
|
|
146
|
+
// (COMMISSION/DELIVER are public like SPEAK; only the commissioner responds,
|
|
147
|
+
// which the room's commission orchestration enforces)
|
|
73
148
|
return true;
|
|
74
149
|
}
|
|
75
150
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What makes two nicknames indistinguishable to the room.
|
|
3
|
+
*
|
|
4
|
+
* A room routes by nickname, and `Room.checkAgentNicknameMatch` is deliberately
|
|
5
|
+
* loose: case-insensitive, and it also accepts a nickname's first word. That
|
|
6
|
+
* looseness is what lets a Dungeon Master write "Thorin" for "Thorin Oakenshield",
|
|
7
|
+
* and it is also what makes two nicknames collide without being equal.
|
|
8
|
+
*
|
|
9
|
+
* Pure, and free of Nest, the filesystem and any domain: it is engine logic that
|
|
10
|
+
* happens to have been written first for the RPG page's roster check, and both the
|
|
11
|
+
* roster and {@link Room.renameAgent} need the same answer.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* True when some name a message could be addressed to would reach both of these.
|
|
15
|
+
*
|
|
16
|
+
* Note the test is not whether the two names match each other — "Thorin
|
|
17
|
+
* Oakenshield" and "Thorin Stonehelm" do not, since the matcher compares one
|
|
18
|
+
* side's first word against the other's whole name. It is whether a *third* string
|
|
19
|
+
* matches both, and "Thorin" matches both. Since the only strings the matcher can
|
|
20
|
+
* match are a full name and a first word, comparing the two names' full/first-word
|
|
21
|
+
* sets settles it.
|
|
22
|
+
*
|
|
23
|
+
* @param a One nickname
|
|
24
|
+
* @param b The other
|
|
25
|
+
* @returns True when a single name could route to either
|
|
26
|
+
*/
|
|
27
|
+
export declare function nicknamesAreAmbiguous(a: string, b: string): boolean;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* What makes two nicknames indistinguishable to the room.
|
|
4
|
+
*
|
|
5
|
+
* A room routes by nickname, and `Room.checkAgentNicknameMatch` is deliberately
|
|
6
|
+
* loose: case-insensitive, and it also accepts a nickname's first word. That
|
|
7
|
+
* looseness is what lets a Dungeon Master write "Thorin" for "Thorin Oakenshield",
|
|
8
|
+
* and it is also what makes two nicknames collide without being equal.
|
|
9
|
+
*
|
|
10
|
+
* Pure, and free of Nest, the filesystem and any domain: it is engine logic that
|
|
11
|
+
* happens to have been written first for the RPG page's roster check, and both the
|
|
12
|
+
* roster and {@link Room.renameAgent} need the same answer.
|
|
13
|
+
*/
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.nicknamesAreAmbiguous = nicknamesAreAmbiguous;
|
|
16
|
+
/**
|
|
17
|
+
* True when some name a message could be addressed to would reach both of these.
|
|
18
|
+
*
|
|
19
|
+
* Note the test is not whether the two names match each other — "Thorin
|
|
20
|
+
* Oakenshield" and "Thorin Stonehelm" do not, since the matcher compares one
|
|
21
|
+
* side's first word against the other's whole name. It is whether a *third* string
|
|
22
|
+
* matches both, and "Thorin" matches both. Since the only strings the matcher can
|
|
23
|
+
* match are a full name and a first word, comparing the two names' full/first-word
|
|
24
|
+
* sets settles it.
|
|
25
|
+
*
|
|
26
|
+
* @param a One nickname
|
|
27
|
+
* @param b The other
|
|
28
|
+
* @returns True when a single name could route to either
|
|
29
|
+
*/
|
|
30
|
+
function nicknamesAreAmbiguous(a, b) {
|
|
31
|
+
const keys = (name) => {
|
|
32
|
+
const trimmed = (name || '').trim();
|
|
33
|
+
return new Set([trimmed.toLowerCase(), trimmed.split(/\s+/)[0].toLowerCase()]);
|
|
34
|
+
};
|
|
35
|
+
const left = keys(a);
|
|
36
|
+
for (const key of keys(b)) {
|
|
37
|
+
if (left.has(key))
|
|
38
|
+
return true;
|
|
39
|
+
}
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
@@ -99,7 +99,9 @@ let PublishedRoomsService = class PublishedRoomsService {
|
|
|
99
99
|
}
|
|
100
100
|
getPublishedRoomsForUser(userId) {
|
|
101
101
|
return (Array.from(this.mapping.entries())
|
|
102
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
102
103
|
.filter(([_roomId, uid]) => uid === userId)
|
|
104
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
103
105
|
.map(([roomId, _uid]) => roomId));
|
|
104
106
|
}
|
|
105
107
|
};
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import { RoomTurnMode } from '../../../shared/types/app.types';
|
|
2
|
+
/**
|
|
3
|
+
* Interface for serializable room configuration
|
|
4
|
+
* Note: Artifacts are now stored as individual .artifact files in the room directory
|
|
5
|
+
*/
|
|
2
6
|
export interface RoomConfig {
|
|
3
7
|
id: string;
|
|
4
8
|
name: string;
|
|
@@ -12,9 +16,31 @@ export interface RoomConfig {
|
|
|
12
16
|
createdAt: string;
|
|
13
17
|
isPublished?: boolean;
|
|
14
18
|
templateRoomId?: string;
|
|
19
|
+
/**
|
|
20
|
+
* The pack this room is filed under, which decides whether it is listed.
|
|
21
|
+
*
|
|
22
|
+
* Set when the room is built from a pack template, and editable afterwards so a
|
|
23
|
+
* user can file their own room under a pack of their own. Absent means "not
|
|
24
|
+
* filed", and a room naming a pack that is not installed is still listed.
|
|
25
|
+
*
|
|
26
|
+
* Deliberately not `templateRoomId`: that means "published instance", and
|
|
27
|
+
* `getTemplateRooms()` filters anything carrying one out of the Rooms list.
|
|
28
|
+
*/
|
|
15
29
|
pack?: string;
|
|
30
|
+
/** The pack template's key, when this room came from one. */
|
|
16
31
|
packRoomKey?: string;
|
|
17
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* Every setting a room carries, without its identity or its content.
|
|
35
|
+
*
|
|
36
|
+
* `RoomConfig` minus `id`, `agentIds`, `messages` and `createdAt` — the four a
|
|
37
|
+
* caller building a room from scratch supplies itself. Used by
|
|
38
|
+
* `RoomStoreService.readRoomSettings` / `applyRoomSettings`, which exist so that
|
|
39
|
+
* only one place has to name them all. `room-settings.spec.ts` pins the
|
|
40
|
+
* relationship, so adding a field to `RoomConfig` fails there until it is carried
|
|
41
|
+
* here too.
|
|
42
|
+
*/
|
|
18
43
|
export type RoomSettingsSnapshot = Omit<RoomConfig, 'id' | 'agentIds' | 'messages' | 'createdAt'> & Required<Pick<RoomConfig, 'roomLeader' | 'turnMode'>> & {
|
|
44
|
+
/** Never undefined here: `Room.getModerator()` normalizes absent to ''. */
|
|
19
45
|
moderator: string;
|
|
20
46
|
};
|
|
@@ -2,10 +2,22 @@ import { Room } from './room';
|
|
|
2
2
|
import { RoomStoreService } from './room-store.service';
|
|
3
3
|
import { ToolStoreService } from '../tools/tool-store.service';
|
|
4
4
|
import { ToolExecutionService } from '../tools/tool-execution.service';
|
|
5
|
+
/**
|
|
6
|
+
* Factory for creating Room instances
|
|
7
|
+
* Not a singleton - instantiated per-user by UserServiceFactory
|
|
8
|
+
*/
|
|
5
9
|
export declare class RoomFactory {
|
|
6
10
|
private readonly roomStoreService;
|
|
7
11
|
private readonly toolStoreService;
|
|
8
12
|
private readonly toolExecutionService;
|
|
9
13
|
constructor(roomStoreService: RoomStoreService, toolStoreService: ToolStoreService, toolExecutionService: ToolExecutionService);
|
|
14
|
+
/**
|
|
15
|
+
* Creates a room with the specified parameters
|
|
16
|
+
* @param name The room name
|
|
17
|
+
* @param goal The room goal/purpose
|
|
18
|
+
* @param baseRoomDir Optional base room directory (defaults to '')
|
|
19
|
+
* @param storageDir Optional storage directory (defaults to roomStore default)
|
|
20
|
+
* @returns Created Room instance
|
|
21
|
+
*/
|
|
10
22
|
createRoom(name: string, goal: string, baseRoomDir?: string, storageDir?: string): Room;
|
|
11
23
|
}
|
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RoomFactory = void 0;
|
|
4
4
|
const room_1 = require("./room");
|
|
5
|
+
/**
|
|
6
|
+
* Factory for creating Room instances
|
|
7
|
+
* Not a singleton - instantiated per-user by UserServiceFactory
|
|
8
|
+
*/
|
|
5
9
|
class RoomFactory {
|
|
6
10
|
roomStoreService;
|
|
7
11
|
toolStoreService;
|
|
@@ -11,8 +15,18 @@ class RoomFactory {
|
|
|
11
15
|
this.toolStoreService = toolStoreService;
|
|
12
16
|
this.toolExecutionService = toolExecutionService;
|
|
13
17
|
}
|
|
18
|
+
/**
|
|
19
|
+
* Creates a room with the specified parameters
|
|
20
|
+
* @param name The room name
|
|
21
|
+
* @param goal The room goal/purpose
|
|
22
|
+
* @param baseRoomDir Optional base room directory (defaults to '')
|
|
23
|
+
* @param storageDir Optional storage directory (defaults to roomStore default)
|
|
24
|
+
* @returns Created Room instance
|
|
25
|
+
*/
|
|
14
26
|
createRoom(name, goal, baseRoomDir = '', storageDir = '') {
|
|
27
|
+
// Use default storage dir if not provided
|
|
15
28
|
const finalStorageDir = storageDir || this.roomStoreService.getDefaultStorageDir();
|
|
29
|
+
// Create room with all dependencies
|
|
16
30
|
const room = new room_1.Room(null, name, goal, baseRoomDir, finalStorageDir, this.roomStoreService);
|
|
17
31
|
room.setToolServices(this.toolStoreService, this.toolExecutionService);
|
|
18
32
|
return room;
|
|
@@ -1,9 +1,37 @@
|
|
|
1
1
|
import { EventEmitter } from 'events';
|
|
2
2
|
import { RoomMessageUpdate } from '../../../shared/types/app.types';
|
|
3
|
+
/**
|
|
4
|
+
* Service to manage Server-Sent Events (SSE) for room message updates
|
|
5
|
+
* Maintains EventEmitters for each room to push real-time updates to connected clients
|
|
6
|
+
*/
|
|
3
7
|
export declare class RoomMessageService {
|
|
4
8
|
private messageEmitters;
|
|
9
|
+
/**
|
|
10
|
+
* Gets or creates an EventEmitter for a specific room
|
|
11
|
+
* @param roomId The room ID
|
|
12
|
+
* @returns EventEmitter for the room
|
|
13
|
+
*/
|
|
5
14
|
getOrCreateEmitter(roomId: string): EventEmitter;
|
|
15
|
+
/**
|
|
16
|
+
* Emits an update event for a room
|
|
17
|
+
* @param roomId The room ID
|
|
18
|
+
* @param roomState The room state update to emit
|
|
19
|
+
*/
|
|
6
20
|
emitUpdate(roomId: string, roomState: RoomMessageUpdate): void;
|
|
21
|
+
/**
|
|
22
|
+
* Emits an error event for a room
|
|
23
|
+
*
|
|
24
|
+
* On the same `'update'` event as {@link emitUpdate}, discriminated by `type`:
|
|
25
|
+
* an EventEmitter throws when an `'error'` event has no listener, which would
|
|
26
|
+
* take down a host that subscribed only to updates.
|
|
27
|
+
*
|
|
28
|
+
* @param roomId The room ID
|
|
29
|
+
* @param error The error that occurred
|
|
30
|
+
*/
|
|
7
31
|
emitError(roomId: string, error: Error): void;
|
|
32
|
+
/**
|
|
33
|
+
* Cleans up the EventEmitter for a room
|
|
34
|
+
* @param roomId The room ID
|
|
35
|
+
*/
|
|
8
36
|
cleanup(roomId: string): void;
|
|
9
37
|
}
|
|
@@ -9,18 +9,42 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
exports.RoomMessageService = void 0;
|
|
10
10
|
const common_1 = require("@nestjs/common");
|
|
11
11
|
const events_1 = require("events");
|
|
12
|
+
/**
|
|
13
|
+
* Service to manage Server-Sent Events (SSE) for room message updates
|
|
14
|
+
* Maintains EventEmitters for each room to push real-time updates to connected clients
|
|
15
|
+
*/
|
|
12
16
|
let RoomMessageService = class RoomMessageService {
|
|
13
17
|
messageEmitters = new Map();
|
|
18
|
+
/**
|
|
19
|
+
* Gets or creates an EventEmitter for a specific room
|
|
20
|
+
* @param roomId The room ID
|
|
21
|
+
* @returns EventEmitter for the room
|
|
22
|
+
*/
|
|
14
23
|
getOrCreateEmitter(roomId) {
|
|
15
24
|
if (!this.messageEmitters.has(roomId)) {
|
|
16
25
|
this.messageEmitters.set(roomId, new events_1.EventEmitter());
|
|
17
26
|
}
|
|
18
27
|
return this.messageEmitters.get(roomId);
|
|
19
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Emits an update event for a room
|
|
31
|
+
* @param roomId The room ID
|
|
32
|
+
* @param roomState The room state update to emit
|
|
33
|
+
*/
|
|
20
34
|
emitUpdate(roomId, roomState) {
|
|
21
35
|
const emitter = this.getOrCreateEmitter(roomId);
|
|
22
36
|
emitter.emit('update', roomState);
|
|
23
37
|
}
|
|
38
|
+
/**
|
|
39
|
+
* Emits an error event for a room
|
|
40
|
+
*
|
|
41
|
+
* On the same `'update'` event as {@link emitUpdate}, discriminated by `type`:
|
|
42
|
+
* an EventEmitter throws when an `'error'` event has no listener, which would
|
|
43
|
+
* take down a host that subscribed only to updates.
|
|
44
|
+
*
|
|
45
|
+
* @param roomId The room ID
|
|
46
|
+
* @param error The error that occurred
|
|
47
|
+
*/
|
|
24
48
|
emitError(roomId, error) {
|
|
25
49
|
const emitter = this.getOrCreateEmitter(roomId);
|
|
26
50
|
const update = {
|
|
@@ -31,6 +55,10 @@ let RoomMessageService = class RoomMessageService {
|
|
|
31
55
|
};
|
|
32
56
|
emitter.emit('update', update);
|
|
33
57
|
}
|
|
58
|
+
/**
|
|
59
|
+
* Cleans up the EventEmitter for a room
|
|
60
|
+
* @param roomId The room ID
|
|
61
|
+
*/
|
|
34
62
|
cleanup(roomId) {
|
|
35
63
|
const emitter = this.messageEmitters.get(roomId);
|
|
36
64
|
if (emitter) {
|
|
@@ -9,6 +9,15 @@ import { ArtifactStoreService } from './artifact-store.service';
|
|
|
9
9
|
import { Artifact } from './artifact';
|
|
10
10
|
import { ToolStoreService } from '../tools/tool-store.service';
|
|
11
11
|
import { ToolExecutionService } from '../tools/tool-execution.service';
|
|
12
|
+
/**
|
|
13
|
+
* A service that stores and retrieves Room objects by ID
|
|
14
|
+
* Each room is stored in its own folder (named by GUID) containing:
|
|
15
|
+
* - metadata.json: Room configuration without messages
|
|
16
|
+
* - messages: Plain text file with messages separated by '====' delimiter (allows efficient appending)
|
|
17
|
+
* Rooms load their agents from an adjacent 'agents' directory
|
|
18
|
+
* Supports configurable storage directories (e.g., for story-specific rooms)
|
|
19
|
+
* Uses lazy loading - rooms are loaded from disk on first access
|
|
20
|
+
*/
|
|
12
21
|
export declare class RoomStoreService {
|
|
13
22
|
private readonly userPaths;
|
|
14
23
|
private readonly agentStore;
|
|
@@ -21,28 +30,196 @@ export declare class RoomStoreService {
|
|
|
21
30
|
private loaded;
|
|
22
31
|
private loadPromise;
|
|
23
32
|
constructor(userPaths: UserPathsService, agentStore: AgentStoreService, attachedFileService: AttachedFileService, artifactStoreService: ArtifactStoreService, toolStoreService: ToolStoreService, toolExecutionService: ToolExecutionService);
|
|
33
|
+
/**
|
|
34
|
+
* Gets the default storage directory for rooms
|
|
35
|
+
* @returns The default storage directory path
|
|
36
|
+
*/
|
|
24
37
|
getDefaultStorageDir(): string;
|
|
38
|
+
/**
|
|
39
|
+
* Stores a room and returns its unique ID
|
|
40
|
+
* If the room already has an ID in the store, it updates that entry instead
|
|
41
|
+
* @param room The room to store
|
|
42
|
+
* @param storageDir Optional custom storage directory (defaults to server/data/rooms)
|
|
43
|
+
* @returns The unique ID for the room
|
|
44
|
+
*/
|
|
25
45
|
storeRoom(room: Room, storageDir?: string): string;
|
|
46
|
+
/**
|
|
47
|
+
* Retrieves a room by its ID
|
|
48
|
+
* @param id The room ID
|
|
49
|
+
* @returns The room, or null if not found
|
|
50
|
+
*/
|
|
26
51
|
getRoom(id: string): Promise<Room | null>;
|
|
52
|
+
/**
|
|
53
|
+
* Removes a room from the store and deletes its file.
|
|
54
|
+
*
|
|
55
|
+
* The agents the room owns go with it. Ownership is what decides this, not the
|
|
56
|
+
* kind of room: an agent is created for one room and belongs to nothing else,
|
|
57
|
+
* so leaving it behind would leave an agent no page lists and nothing can
|
|
58
|
+
* reach.
|
|
59
|
+
*
|
|
60
|
+
* @param id The room ID
|
|
61
|
+
* @param storageDir Optional custom storage directory (defaults to server/data/rooms)
|
|
62
|
+
* @returns True if the room was found and removed, false otherwise
|
|
63
|
+
*/
|
|
27
64
|
removeRoom(id: string, storageDir?: string): boolean;
|
|
65
|
+
/**
|
|
66
|
+
* Gets all room IDs from the in-memory store
|
|
67
|
+
* @returns Array of room IDs
|
|
68
|
+
*/
|
|
28
69
|
getAllRoomIds(): Promise<string[]>;
|
|
70
|
+
/**
|
|
71
|
+
* Gets the number of rooms in the store
|
|
72
|
+
* @returns The number of rooms
|
|
73
|
+
*/
|
|
29
74
|
getRoomCount(): number;
|
|
75
|
+
/**
|
|
76
|
+
* Clones a room as a published instance with all agents cloned
|
|
77
|
+
* @param templateId The ID of the template room to clone
|
|
78
|
+
* @param publishedName The name for the published instance
|
|
79
|
+
* @param userId The user ID (for tracking purposes)
|
|
80
|
+
* @returns The ID of the newly created published instance
|
|
81
|
+
*/
|
|
30
82
|
cloneRoomAsPublished(templateId: string, publishedName: string, userId: string): Promise<string>;
|
|
83
|
+
/**
|
|
84
|
+
* Reads every setting a room carries, as one object.
|
|
85
|
+
*
|
|
86
|
+
* Deliberately excludes `id`, `agentIds`, `messages` and `createdAt`: those are
|
|
87
|
+
* identity and content rather than settings, and a caller building a room from
|
|
88
|
+
* scratch supplies them itself. `room-settings.spec.ts` asserts this list stays
|
|
89
|
+
* equal to `RoomConfig` minus those four.
|
|
90
|
+
*
|
|
91
|
+
* @param room The room to read
|
|
92
|
+
* @returns Its settings
|
|
93
|
+
*/
|
|
31
94
|
static readRoomSettings(room: Room): RoomSettingsSnapshot;
|
|
95
|
+
/**
|
|
96
|
+
* Applies a settings snapshot to a room — the one place that names them all.
|
|
97
|
+
*
|
|
98
|
+
* Every caller that builds a room from scratch rather than copying one has to
|
|
99
|
+
* set each of these, and there is now more than one such caller. The moderator
|
|
100
|
+
* was missing from the published-clone path for a while and the omission was
|
|
101
|
+
* quiet: `getModeratorAgent()` falls back to the first agent holding a
|
|
102
|
+
* `moderate` prompt, so routing kept working and the only symptom was that
|
|
103
|
+
* agent also being perceived into play as an ordinary participant.
|
|
104
|
+
*
|
|
105
|
+
* **Call this after the agents have arrived.** `roomLeader` and `moderator` are
|
|
106
|
+
* nicknames resolved against the roster, so a room with no agents yet drops
|
|
107
|
+
* both silently.
|
|
108
|
+
*
|
|
109
|
+
* @param room The room to configure, with its agents already in it
|
|
110
|
+
* @param settings The settings to apply
|
|
111
|
+
*/
|
|
32
112
|
static applyRoomSettings(room: Room, settings: RoomSettingsSnapshot): void;
|
|
113
|
+
/**
|
|
114
|
+
* Resolves a stored room-leader value to the nickname Room compares against.
|
|
115
|
+
* Accepts a nickname, an agentName, or a partial nickname, because the leader
|
|
116
|
+
* was historically written from whichever of those the caller had to hand.
|
|
117
|
+
* @param room The room whose agents are the candidates
|
|
118
|
+
* @param stored The leader value read from disk (may be empty or stale)
|
|
119
|
+
* @returns The matching agent's nickname, or '' when nothing matches
|
|
120
|
+
*/
|
|
33
121
|
static resolveLeaderNickname(room: Room, stored: string | undefined): string;
|
|
122
|
+
/**
|
|
123
|
+
* Gets all published instances of a template room
|
|
124
|
+
* @param templateId The ID of the template room
|
|
125
|
+
* @returns Array of published room instances
|
|
126
|
+
*/
|
|
34
127
|
getPublishedInstances(templateId: string): Promise<Room[]>;
|
|
128
|
+
/**
|
|
129
|
+
* Gets every published instance, whichever template it came from.
|
|
130
|
+
*
|
|
131
|
+
* The counterpart to {@link getTemplateRooms}: between them they cover the
|
|
132
|
+
* store, since a room either was cloned from a template or was not.
|
|
133
|
+
* @returns Array of published room instances
|
|
134
|
+
*/
|
|
135
|
+
/**
|
|
136
|
+
* Every room in the store, templates and published instances alike.
|
|
137
|
+
*
|
|
138
|
+
* For operations that follow an *agent* rather than a room — renaming one means
|
|
139
|
+
* repointing the artifacts and the leader of every room it sits in, and an agent
|
|
140
|
+
* that is not room-owned may sit in several.
|
|
141
|
+
*
|
|
142
|
+
* @returns Every loaded room
|
|
143
|
+
*/
|
|
144
|
+
getAllRooms(): Promise<Room[]>;
|
|
35
145
|
getAllPublishedInstances(): Promise<Room[]>;
|
|
146
|
+
/**
|
|
147
|
+
* Ensures default rooms are loaded from disk (lazy loading)
|
|
148
|
+
* Only loads once - subsequent calls are no-op
|
|
149
|
+
* Uses promise memoization to prevent concurrent loads
|
|
150
|
+
*/
|
|
36
151
|
private ensureLoaded;
|
|
152
|
+
/**
|
|
153
|
+
* Gets room details for the rooms a user builds and owns.
|
|
154
|
+
*
|
|
155
|
+
* A published instance is left out. It is a clone reached through the template
|
|
156
|
+
* it belongs to — `getPublishedInstances` lists them, and the Published tab is
|
|
157
|
+
* where they are opened, reset and deleted. Listed alongside its template it is
|
|
158
|
+
* a second room with the same name that behaves differently, which is how a
|
|
159
|
+
* template ends up edited when the instance was meant.
|
|
160
|
+
*
|
|
161
|
+
* @returns Array of room details objects
|
|
162
|
+
*/
|
|
37
163
|
getTemplateRooms(): Promise<RoomInfo[]>;
|
|
38
164
|
readRoomMessagesFromFileAsync(messagesPath: string): Promise<RoomMessage[]>;
|
|
165
|
+
/**
|
|
166
|
+
* Loads rooms from a specific directory
|
|
167
|
+
* Used for loading story-specific rooms
|
|
168
|
+
* Agents are loaded from the adjacent 'agents' directory
|
|
169
|
+
* @param storageDir The directory to load rooms from
|
|
170
|
+
*/
|
|
39
171
|
loadRoomsFromDirectory(storageDir: string): Promise<void>;
|
|
172
|
+
/**
|
|
173
|
+
* Saves a single room to its own folder with metadata.json and messages file
|
|
174
|
+
* @param room The room to save
|
|
175
|
+
* @param storageDir The directory to save the room in
|
|
176
|
+
*/
|
|
40
177
|
private saveRoomToFile;
|
|
178
|
+
/**
|
|
179
|
+
* Appends a single message to the room's messages file
|
|
180
|
+
* @param roomId The room ID
|
|
181
|
+
* @param message The message to append
|
|
182
|
+
* @param storageDir The directory containing the room folder
|
|
183
|
+
*/
|
|
41
184
|
appendMessageToFile(roomId: string, message: RoomMessage, storageDir: string): void;
|
|
185
|
+
/**
|
|
186
|
+
* Clears all messages from a room (both in-memory and on disk)
|
|
187
|
+
* @param roomId The room ID
|
|
188
|
+
* @param storageDir Optional custom storage directory (defaults to server/data/rooms)
|
|
189
|
+
*/
|
|
42
190
|
clearRoomMessages(roomId: string, storageDir?: string): void;
|
|
191
|
+
/**
|
|
192
|
+
* Saves a single artifact to its own file
|
|
193
|
+
* @param roomId The room ID
|
|
194
|
+
* @param storageDir The directory containing the room folder
|
|
195
|
+
* @param artifact The artifact to save
|
|
196
|
+
*/
|
|
43
197
|
saveArtifactFile(roomId: string, storageDir: string, artifact: Artifact): void;
|
|
198
|
+
/**
|
|
199
|
+
* Deletes a single artifact file
|
|
200
|
+
* @param roomId The room ID
|
|
201
|
+
* @param storageDir The directory containing the room folder
|
|
202
|
+
* @param artifactName The name of the artifact to delete
|
|
203
|
+
* @returns True if the artifact was found and deleted, false otherwise
|
|
204
|
+
*/
|
|
44
205
|
deleteArtifactFile(roomId: string, storageDir: string, artifactName: string): boolean;
|
|
206
|
+
/**
|
|
207
|
+
* Deletes all artifact files for a room
|
|
208
|
+
* @param roomId The room ID
|
|
209
|
+
* @param storageDir The directory containing the room folder
|
|
210
|
+
*/
|
|
45
211
|
deleteAllArtifactFiles(roomId: string, storageDir: string): void;
|
|
212
|
+
/**
|
|
213
|
+
* Loads all artifact files for a room from disk. Used to refresh a Room's
|
|
214
|
+
* in-memory artifacts after the underlying files have been replaced
|
|
215
|
+
* (e.g. when reverting a chapter from backup).
|
|
216
|
+
*/
|
|
46
217
|
loadArtifactFiles(roomId: string, storageDir: string): Artifact[];
|
|
218
|
+
/**
|
|
219
|
+
* Deletes a room's folder and all its contents, along with the agents it owns
|
|
220
|
+
* @param roomId The room ID
|
|
221
|
+
* @param storageDir The directory containing the room folder
|
|
222
|
+
* @param room The room object (for accessing the agents to delete)
|
|
223
|
+
*/
|
|
47
224
|
private deleteRoomFile;
|
|
48
225
|
}
|