briyah 1.0.7 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/README.md +31 -21
  2. package/dist/server/src/ai/LLM/anthropic.service.js +16 -8
  3. package/dist/server/src/ai/LLM/base-ai.service.js +5 -4
  4. package/dist/server/src/ai/LLM/deepseek.service.js +8 -6
  5. package/dist/server/src/ai/LLM/fal.service.js +15 -14
  6. package/dist/server/src/ai/LLM/googleai.service.js +10 -8
  7. package/dist/server/src/ai/LLM/grok.service.js +9 -7
  8. package/dist/server/src/ai/LLM/mock.service.js +7 -6
  9. package/dist/server/src/ai/LLM/openai.service.js +15 -13
  10. package/dist/server/src/ai/LLM/together.service.js +10 -8
  11. package/dist/server/src/ai/LLM/vertexai.service.js +10 -9
  12. package/dist/server/src/ai/agent-store.service.js +12 -11
  13. package/dist/server/src/ai/artifact.service.js +7 -6
  14. package/dist/server/src/ai/attached-file.service.js +8 -7
  15. package/dist/server/src/ai/published-agents.service.js +5 -4
  16. package/dist/server/src/app/balance.service.js +7 -6
  17. package/dist/server/src/app/stripe.controller.js +12 -11
  18. package/dist/server/src/app/stripe.service.js +20 -19
  19. package/dist/server/src/app/transaction.service.js +6 -5
  20. package/dist/server/src/app/user-service-manager.js +6 -5
  21. package/dist/server/src/app.controller.js +95 -94
  22. package/dist/server/src/app.service.js +31 -30
  23. package/dist/server/src/auth/auth.controller.js +21 -20
  24. package/dist/server/src/auth/jwt-auth.guard.js +4 -3
  25. package/dist/server/src/auth/rate-limit.service.d.ts +0 -1
  26. package/dist/server/src/auth/rate-limit.service.js +6 -7
  27. package/dist/server/src/auth/twilio.service.js +4 -3
  28. package/dist/server/src/auth/users.service.js +5 -4
  29. package/dist/server/src/common/logger.d.ts +21 -0
  30. package/dist/server/src/common/logger.js +83 -0
  31. package/dist/server/src/room/artifact-store.service.d.ts +0 -1
  32. package/dist/server/src/room/artifact-store.service.js +16 -17
  33. package/dist/server/src/room/published-rooms.service.js +3 -2
  34. package/dist/server/src/room/room-store.service.js +17 -16
  35. package/dist/server/src/room/room.js +14 -13
  36. package/dist/server/src/sdk/briyah-config.d.ts +7 -0
  37. package/dist/server/src/sdk/briyah-config.js +1 -0
  38. package/dist/server/src/sdk/briyah.js +13 -4
  39. package/dist/server/src/sdk/index.d.ts +2 -1
  40. package/dist/server/src/story/story-progress.service.js +2 -1
  41. package/dist/server/src/story/story-store.service.js +28 -27
  42. package/dist/server/src/story/story.service.js +113 -112
  43. package/docs/.nojekyll +1 -0
  44. package/docs/assets/hierarchy.js +1 -0
  45. package/docs/assets/highlight.css +106 -0
  46. package/docs/assets/icons.js +18 -0
  47. package/docs/assets/icons.svg +1 -0
  48. package/docs/assets/main.js +60 -0
  49. package/docs/assets/navigation.js +1 -0
  50. package/docs/assets/search.js +1 -0
  51. package/docs/assets/style.css +1633 -0
  52. package/docs/classes/Agent.html +87 -0
  53. package/docs/classes/Briyah.html +64 -0
  54. package/docs/classes/BriyahConfigService.html +12 -0
  55. package/docs/classes/Room.html +119 -0
  56. package/docs/enums/MessageAction.html +13 -0
  57. package/docs/hierarchy.html +1 -0
  58. package/docs/index.html +136 -0
  59. package/docs/interfaces/AgentInfo.html +17 -0
  60. package/docs/interfaces/AgentMessagesResponse.html +5 -0
  61. package/docs/interfaces/AppService.html +680 -0
  62. package/docs/interfaces/ArtifactMetadata.html +8 -0
  63. package/docs/interfaces/AttachDocumentResponse.html +3 -0
  64. package/docs/interfaces/BriyahConfigOptions.html +16 -0
  65. package/docs/interfaces/ChapterInfo.html +3 -0
  66. package/docs/interfaces/Character.html +7 -0
  67. package/docs/interfaces/CreateAgentResponse.html +2 -0
  68. package/docs/interfaces/CreateRoomResponse.html +3 -0
  69. package/docs/interfaces/CreateStoryResponse.html +2 -0
  70. package/docs/interfaces/FileList.html +2 -0
  71. package/docs/interfaces/LoggingOptions.html +9 -0
  72. package/docs/interfaces/Message.html +6 -0
  73. package/docs/interfaces/ModelInfo.html +5 -0
  74. package/docs/interfaces/PreparedPromptResponse.html +3 -0
  75. package/docs/interfaces/ProcessTextResponse.html +7 -0
  76. package/docs/interfaces/PromptFile.html +3 -0
  77. package/docs/interfaces/PromptFileContent.html +3 -0
  78. package/docs/interfaces/PromptFilesResponse.html +2 -0
  79. package/docs/interfaces/PromptFolder.html +3 -0
  80. package/docs/interfaces/PromptFoldersResponse.html +2 -0
  81. package/docs/interfaces/RoomDetails.html +9 -0
  82. package/docs/interfaces/RoomInfo.html +5 -0
  83. package/docs/interfaces/RoomMessagesResponse.html +3 -0
  84. package/docs/interfaces/StoryIdea.html +5 -0
  85. package/docs/interfaces/StoryInfo.html +21 -0
  86. package/docs/interfaces/StoryState.html +9 -0
  87. package/docs/modules.html +1 -0
  88. package/docs/types/PromptScope.html +1 -0
  89. package/package.json +6 -3
  90. package/data/common/config/story_ideas.txt +0 -6
@@ -0,0 +1,680 @@
1
+ <!DOCTYPE html><html class="default" lang="en" data-base="../"><head><meta charset="utf-8"/><meta http-equiv="x-ua-compatible" content="IE=edge"/><title>AppService | Briyah SDK - v1.0.8</title><meta name="description" content="Documentation for Briyah SDK"/><meta name="viewport" content="width=device-width, initial-scale=1"/><link rel="stylesheet" href="../assets/style.css"/><link rel="stylesheet" href="../assets/highlight.css"/><script defer src="../assets/main.js"></script><script async src="../assets/icons.js" id="tsd-icons-script"></script><script async src="../assets/search.js" id="tsd-search-script"></script><script async src="../assets/navigation.js" id="tsd-nav-script"></script></head><body><script>document.documentElement.dataset.theme = localStorage.getItem("tsd-theme") || "os";document.body.style.display="none";setTimeout(() => window.app?app.showPage():document.body.style.removeProperty("display"),500)</script><header class="tsd-page-toolbar"><div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Briyah SDK - v1.0.8</a><div id="tsd-toolbar-links"><a href="https://github.com/your-org/briyah">GitHub</a><a href="https://www.npmjs.com/package/briyah">npm</a></div><button id="tsd-search-trigger" class="tsd-widget" aria-label="Search"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-search"></use></svg></button><dialog id="tsd-search" aria-label="Search"><input role="combobox" id="tsd-search-input" aria-controls="tsd-search-results" aria-autocomplete="list" aria-expanded="true" autocapitalize="off" autocomplete="off" placeholder="Search the docs" maxLength="100"/><ul role="listbox" id="tsd-search-results"></ul><div id="tsd-search-status" aria-live="polite" aria-atomic="true"><div>Preparing search index...</div></div></dialog><a href="#" class="tsd-widget menu" id="tsd-toolbar-menu-trigger" data-toggle="menu" aria-label="Menu"><svg width="16" height="16" viewBox="0 0 16 16" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-menu"></use></svg></a></div></header><div class="container container-main"><div class="col-content"><div class="tsd-page-title"><ul class="tsd-breadcrumb" aria-label="Breadcrumb"><li><a href="" aria-current="page">AppService</a></li></ul><h1>Interface AppService</h1></div><div class="tsd-signature"><span class="tsd-signature-keyword">interface</span> <span class="tsd-kind-interface">AppService</span> <span class="tsd-signature-symbol">{</span><br/>    <a class="tsd-kind-call-signature" href="#addbalance-1">addBalance</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">amount</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#attachartifacttoagent-1">attachArtifactToAgent</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">agentId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">artifactId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#attachdocument-1">attachDocument</a><span class="tsd-signature-symbol">(</span><br/>        <span class="tsd-kind-parameter">agentId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">fileName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">fileData</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Buffer</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="AttachDocumentResponse.html" class="tsd-signature-type tsd-kind-interface">AttachDocumentResponse</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#compactstory-1">compactStory</a><span class="tsd-signature-symbol">(</span><br/>        <span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">details</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">message</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">success</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#convertuserartifact-1">convertUserArtifact</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">name</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">pdfBuffer</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Buffer</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#createagent-1">createAgent</a><span class="tsd-signature-symbol">(</span><br/>        <span class="tsd-kind-parameter">aiServiceName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">agentName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">agentNickname</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">description</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">aiModel</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">promptName</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">controlledByHuman</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">reasoningEffort</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">&quot;low&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;medium&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;high&quot;</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">maxOutputTokens</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">beginInstruction</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="../classes/Agent.html" class="tsd-signature-type tsd-kind-class">Agent</a><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#createpromptfolder-1">createPromptFolder</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">folderName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#createroom-1">createRoom</a><span class="tsd-signature-symbol">(</span><br/>        <span class="tsd-kind-parameter">roomName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">goal</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">agentIds</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="CreateRoomResponse.html" class="tsd-signature-type tsd-kind-interface">CreateRoomResponse</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#createstory-1">createStory</a><span class="tsd-signature-symbol">(</span><br/>        <span class="tsd-kind-parameter">name</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">idea</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">userCharacterDesc</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">otherCharactersDesc</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">storyModel</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">isImport</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">imageModelName</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="StoryInfo.html" class="tsd-signature-type tsd-kind-interface">StoryInfo</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#createuserartifact-1">createUserArtifact</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">name</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">content</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#declinecharacter-1">declineCharacter</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">characterName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#deleteagent-1">deleteAgent</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">agentId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#deleteattachedfile-1">deleteAttachedFile</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">agentId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">fileName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#deleteattachedfilebyid-1">deleteAttachedFileById</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">documentId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#deletechapter-1">deleteChapter</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">chapterIndex</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#deletecharacterfromstory-1">deleteCharacterFromStory</a><span class="tsd-signature-symbol">(</span><br/>        <span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">characterName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#deletepromptfile-1">deletePromptFile</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">folderName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">fileName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#deletepromptfolder-1">deletePromptFolder</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">folderName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#deleteroom-1">deleteRoom</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">roomId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#deletestory-1">deleteStory</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#deleteuserartifact-1">deleteUserArtifact</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">artifactId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#detachartifactfromagent-1">detachArtifactFromAgent</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">agentId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">artifactId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#downloadstorymarkdown-1">downloadStoryMarkdown</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#editroom-1">editRoom</a><span class="tsd-signature-symbol">(</span><br/>        <span class="tsd-kind-parameter">roomId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">roomName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">goal</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">baseRoomDir</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">agentIds</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#ensureagentstatecallback-1">ensureAgentStateCallback</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">agentId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#ensureroomstatecallback-1">ensureRoomStateCallback</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">roomId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#exportstorydata-1">exportStoryData</a><span class="tsd-signature-symbol">(</span><br/>        <span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">filename</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">stream</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Readable</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#getagentdetails-1">getAgentDetails</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">agentId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="AgentInfo.html" class="tsd-signature-type tsd-kind-interface">AgentInfo</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#getagenthistory-1">getAgentHistory</a><span class="tsd-signature-symbol">(</span><br/>        <span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">agentId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#getagentmessageemitter-1">getAgentMessageEmitter</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">agentId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">EventEmitter</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#getagentmessages-1">getAgentMessages</a><span class="tsd-signature-symbol">(</span><br/>        <span class="tsd-kind-parameter">agentId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">fromIndex</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="AgentMessagesResponse.html" class="tsd-signature-type tsd-kind-interface">AgentMessagesResponse</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#getaiservicefromservicename-1">getAiServiceFromServiceName</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">serviceName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">BaseAiService</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#getaiservicenames-1">getAiServiceNames</a><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#getbalance-1">getBalance</a><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#getbalancemessageemitter-1">getBalanceMessageEmitter</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">userId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">EventEmitter</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#getchapter-1">getChapter</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">chapterIndex</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">RoomMessage</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#getcharacter-1">getCharacter</a><span class="tsd-signature-symbol">(</span><br/>        <span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">characterName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#getplotplan-1">getPlotPlan</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#getpromptfile-1">getPromptFile</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">folderName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">fileName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="PromptFileContent.html" class="tsd-signature-type tsd-kind-interface">PromptFileContent</a><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#getpublishedinstances-1">getPublishedInstances</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">templateId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="AgentInfo.html" class="tsd-signature-type tsd-kind-interface">AgentInfo</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#getpublishedroominstances-1">getPublishedRoomInstances</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">templateId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="RoomInfo.html" class="tsd-signature-type tsd-kind-interface">RoomInfo</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#getrandomstoryidea-1">getRandomStoryIdea</a><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <a href="StoryIdea.html" class="tsd-signature-type tsd-kind-interface">StoryIdea</a><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#getrandomstoryideabygenre-1">getRandomStoryIdeaByGenre</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">genreName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="StoryIdea.html" class="tsd-signature-type tsd-kind-interface">StoryIdea</a><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#getroomartifacts-1">getRoomArtifacts</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">roomId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">artifacts</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#getroombyid-1">getRoomById</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">roomId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../classes/Room.html" class="tsd-signature-type tsd-kind-class">Room</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#getroomdetails-1">getRoomDetails</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">roomId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="RoomDetails.html" class="tsd-signature-type tsd-kind-interface">RoomDetails</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#getroommessageemitter-1">getRoomMessageEmitter</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">roomId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">EventEmitter</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#getroommessages-1">getRoomMessages</a><span class="tsd-signature-symbol">(</span><br/>        <span class="tsd-kind-parameter">roomId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">fromIndex</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">includeThoughts</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="RoomMessagesResponse.html" class="tsd-signature-type tsd-kind-interface">RoomMessagesResponse</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#getstoryartifact-1">getStoryArtifact</a><span class="tsd-signature-symbol">(</span><br/>        <span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">artifactId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">Buffer</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">ArrayBufferLike</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#getstoryinfo-1">getStoryInfo</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="StoryInfo.html" class="tsd-signature-type tsd-kind-interface">StoryInfo</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#getstorymessageemitter-1">getStoryMessageEmitter</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">EventEmitter</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#getstorymessages-1">getStoryMessages</a><span class="tsd-signature-symbol">(</span><br/>        <span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">fromIndex</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="RoomMessagesResponse.html" class="tsd-signature-type tsd-kind-interface">RoomMessagesResponse</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#getstoryprogressemitter-1">getStoryProgressEmitter</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">EventEmitter</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#getstorystate-1">getStoryState</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="StoryState.html" class="tsd-signature-type tsd-kind-interface">StoryState</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#gettransactionservice-1">getTransactionService</a><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">TransactionService</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#getuserartifact-1">getUserArtifact</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">artifactId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">Buffer</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">ArrayBufferLike</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#getuserpreferences-1">getUserPreferences</a><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#importstoryfromzip-1">importStoryFromZip</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">zipBuffer</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Buffer</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="StoryInfo.html" class="tsd-signature-type tsd-kind-interface">StoryInfo</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#introducecharactertostory-1">introduceCharacterToStory</a><span class="tsd-signature-symbol">(</span><br/>        <span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">name</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">description</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">storyModel</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">fromNarratorSuggestion</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#listagentartifacts-1">listAgentArtifacts</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">agentId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="ArtifactMetadata.html" class="tsd-signature-type tsd-kind-interface">ArtifactMetadata</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#listagents-1">listAgents</a><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="AgentInfo.html" class="tsd-signature-type tsd-kind-interface">AgentInfo</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#listaimodels-1">listAiModels</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">aiServiceName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="ModelInfo.html" class="tsd-signature-type tsd-kind-interface">ModelInfo</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#listattachedfiles-1">listAttachedFiles</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">agentId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="FileList.html" class="tsd-signature-type tsd-kind-interface">FileList</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#listchapters-1">listChapters</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">chapters</span><span class="tsd-signature-symbol">:</span> <a href="ChapterInfo.html" class="tsd-signature-type tsd-kind-interface">ChapterInfo</a><span class="tsd-signature-symbol">[]</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#listcharacters-1">listCharacters</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="Character.html" class="tsd-signature-type tsd-kind-interface">Character</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#listimagemodels-1">listImageModels</a><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="ModelInfo.html" class="tsd-signature-type tsd-kind-interface">ModelInfo</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#listpromptfiles-1">listPromptFiles</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">folderName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="FileList.html" class="tsd-signature-type tsd-kind-interface">FileList</a><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#listpromptfileswithscope-1">listPromptFilesWithScope</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">folderName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="PromptFilesResponse.html" class="tsd-signature-type tsd-kind-interface">PromptFilesResponse</a><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#listpromptfolders-1">listPromptFolders</a><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#listpromptfolderswithscope-1">listPromptFoldersWithScope</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">scope</span><span class="tsd-signature-symbol">?:</span> <a href="../types/PromptScope.html" class="tsd-signature-type tsd-kind-type-alias">PromptScope</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="PromptFoldersResponse.html" class="tsd-signature-type tsd-kind-interface">PromptFoldersResponse</a><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#listprompts-1">listPrompts</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">agentId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#listpublishedagents-1">listPublishedAgents</a><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="AgentInfo.html" class="tsd-signature-type tsd-kind-interface">AgentInfo</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#listrooms-1">listRooms</a><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="RoomInfo.html" class="tsd-signature-type tsd-kind-interface">RoomInfo</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#liststories-1">listStories</a><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <a href="StoryInfo.html" class="tsd-signature-type tsd-kind-interface">StoryInfo</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#liststoryartifacts-1">listStoryArtifacts</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="ArtifactMetadata.html" class="tsd-signature-type tsd-kind-interface">ArtifactMetadata</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#liststorygenres-1">listStoryGenres</a><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#liststorymodels-1">listStoryModels</a><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="ModelInfo.html" class="tsd-signature-type tsd-kind-interface">ModelInfo</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#listuserartifacts-1">listUserArtifacts</a><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <a href="ArtifactMetadata.html" class="tsd-signature-type tsd-kind-interface">ArtifactMetadata</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#pauseroom-1">pauseRoom</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">roomId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#processtext-1">processText</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">agentId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">text</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="ProcessTextResponse.html" class="tsd-signature-type tsd-kind-interface">ProcessTextResponse</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#progressstory-1">progressStory</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">chapterIndex</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#publishagentinstance-1">publishAgentInstance</a><span class="tsd-signature-symbol">(</span><br/>        <span class="tsd-kind-parameter">templateId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">instanceName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">instanceId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">publicUrl</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#publishartifact-1">publishArtifact</a><span class="tsd-signature-symbol">(</span><br/>        <span class="tsd-kind-parameter">roomId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">name</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">creator</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">body</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">viewers</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#publishroom-1">publishRoom</a><span class="tsd-signature-symbol">(</span><br/>        <span class="tsd-kind-parameter">templateId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">publishedName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">userId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#reloadagent-1">reloadAgent</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">agentId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#renameuserartifact-1">renameUserArtifact</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">artifactId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">newName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#resetpublishedinstance-1">resetPublishedInstance</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">instanceId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#resetpublishedroominstance-1">resetPublishedRoomInstance</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">instanceId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#resetroom-1">resetRoom</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">roomId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#resetstory-1">resetStory</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#respondtostory-1">respondToStory</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">content</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#resumepausedstories-1">resumePausedStories</a><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#resumeroom-1">resumeRoom</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">roomId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#runpreparedprompt-1">runPreparedPrompt</a><span class="tsd-signature-symbol">(</span><br/>        <span class="tsd-kind-parameter">agentId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">promptName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">variables</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="PreparedPromptResponse.html" class="tsd-signature-type tsd-kind-interface">PreparedPromptResponse</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#savechapter-1">saveChapter</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">chapterIndex</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">content</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#savecharacter-1">saveCharacter</a><span class="tsd-signature-symbol">(</span><br/>        <span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">characterName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">content</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#saveplotplan-1">savePlotPlan</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">content</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#savepromptfile-1">savePromptFile</a><span class="tsd-signature-symbol">(</span><br/>        <span class="tsd-kind-parameter">folderName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">fileName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">content</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">fileType</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#saveuserpreferences-1">saveUserPreferences</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">preferences</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#sendroommessage-1">sendRoomMessage</a><span class="tsd-signature-symbol">(</span><br/>        <span class="tsd-kind-parameter">roomId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">content</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">sender</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">action</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">targets</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">clearQueue</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#updateagent-1">updateAgent</a><span class="tsd-signature-symbol">(</span><br/>        <span class="tsd-kind-parameter">agentId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>        <span class="tsd-kind-parameter">updates</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>            <span class="tsd-kind-property">agentNickname</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>            <span class="tsd-kind-property">allowSearch</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/>            <span class="tsd-kind-property">beginInstruction</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>            <span class="tsd-kind-property">description</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>            <span class="tsd-kind-property">isControlledByHuman</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/>            <span class="tsd-kind-property">maxOutputTokens</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>            <span class="tsd-kind-property">modelName</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>            <span class="tsd-kind-property">reasoningEffort</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">&quot;low&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;medium&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;high&quot;</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#updateuserartifact-1">updateUserArtifact</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">artifactId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">content</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L58">server/src/app.service.ts:58</a></li></ul></aside><section class="tsd-panel-group tsd-index-group"><section class="tsd-panel tsd-index-panel"><details class="tsd-index-content tsd-accordion" open><summary class="tsd-accordion-summary tsd-index-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h5 class="tsd-index-heading uppercase">Index</h5></summary><div class="tsd-accordion-details"><section class="tsd-index-section"><h3 class="tsd-index-heading">Methods</h3><div class="tsd-index-list"><a href="#addbalance" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>add<wbr/>Balance</span></a>
2
+ <a href="#attachartifacttoagent" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>attach<wbr/>Artifact<wbr/>To<wbr/>Agent</span></a>
3
+ <a href="#attachdocument" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>attach<wbr/>Document</span></a>
4
+ <a href="#compactstory" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>compact<wbr/>Story</span></a>
5
+ <a href="#convertuserartifact" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>convert<wbr/>User<wbr/>Artifact</span></a>
6
+ <a href="#createagent" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>create<wbr/>Agent</span></a>
7
+ <a href="#createpromptfolder" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>create<wbr/>Prompt<wbr/>Folder</span></a>
8
+ <a href="#createroom" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>create<wbr/>Room</span></a>
9
+ <a href="#createstory" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>create<wbr/>Story</span></a>
10
+ <a href="#createuserartifact" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>create<wbr/>User<wbr/>Artifact</span></a>
11
+ <a href="#declinecharacter" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>decline<wbr/>Character</span></a>
12
+ <a href="#deleteagent" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>delete<wbr/>Agent</span></a>
13
+ <a href="#deleteattachedfile" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>delete<wbr/>Attached<wbr/>File</span></a>
14
+ <a href="#deleteattachedfilebyid" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>delete<wbr/>Attached<wbr/>File<wbr/>By<wbr/>Id</span></a>
15
+ <a href="#deletechapter" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>delete<wbr/>Chapter</span></a>
16
+ <a href="#deletecharacterfromstory" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>delete<wbr/>Character<wbr/>From<wbr/>Story</span></a>
17
+ <a href="#deletepromptfile" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>delete<wbr/>Prompt<wbr/>File</span></a>
18
+ <a href="#deletepromptfolder" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>delete<wbr/>Prompt<wbr/>Folder</span></a>
19
+ <a href="#deleteroom" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>delete<wbr/>Room</span></a>
20
+ <a href="#deletestory" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>delete<wbr/>Story</span></a>
21
+ <a href="#deleteuserartifact" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>delete<wbr/>User<wbr/>Artifact</span></a>
22
+ <a href="#detachartifactfromagent" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>detach<wbr/>Artifact<wbr/>From<wbr/>Agent</span></a>
23
+ <a href="#downloadstorymarkdown" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>download<wbr/>Story<wbr/>Markdown</span></a>
24
+ <a href="#editroom" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>edit<wbr/>Room</span></a>
25
+ <a href="#ensureagentstatecallback" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>ensure<wbr/>Agent<wbr/>State<wbr/>Callback</span></a>
26
+ <a href="#ensureroomstatecallback" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>ensure<wbr/>Room<wbr/>State<wbr/>Callback</span></a>
27
+ <a href="#exportstorydata" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>export<wbr/>Story<wbr/>Data</span></a>
28
+ <a href="#getagentdetails" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Agent<wbr/>Details</span></a>
29
+ <a href="#getagenthistory" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Agent<wbr/>History</span></a>
30
+ <a href="#getagentmessageemitter" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Agent<wbr/>Message<wbr/>Emitter</span></a>
31
+ <a href="#getagentmessages" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Agent<wbr/>Messages</span></a>
32
+ <a href="#getaiservicefromservicename" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Ai<wbr/>Service<wbr/>From<wbr/>Service<wbr/>Name</span></a>
33
+ <a href="#getaiservicenames" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Ai<wbr/>Service<wbr/>Names</span></a>
34
+ <a href="#getbalance" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Balance</span></a>
35
+ <a href="#getbalancemessageemitter" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Balance<wbr/>Message<wbr/>Emitter</span></a>
36
+ <a href="#getchapter" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Chapter</span></a>
37
+ <a href="#getcharacter" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Character</span></a>
38
+ <a href="#getplotplan" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Plot<wbr/>Plan</span></a>
39
+ <a href="#getpromptfile" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Prompt<wbr/>File</span></a>
40
+ <a href="#getpublishedinstances" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Published<wbr/>Instances</span></a>
41
+ <a href="#getpublishedroominstances" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Published<wbr/>Room<wbr/>Instances</span></a>
42
+ <a href="#getrandomstoryidea" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Random<wbr/>Story<wbr/>Idea</span></a>
43
+ <a href="#getrandomstoryideabygenre" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Random<wbr/>Story<wbr/>Idea<wbr/>By<wbr/>Genre</span></a>
44
+ <a href="#getroomartifacts" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Room<wbr/>Artifacts</span></a>
45
+ <a href="#getroombyid" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Room<wbr/>By<wbr/>Id</span></a>
46
+ <a href="#getroomdetails" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Room<wbr/>Details</span></a>
47
+ <a href="#getroommessageemitter" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Room<wbr/>Message<wbr/>Emitter</span></a>
48
+ <a href="#getroommessages" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Room<wbr/>Messages</span></a>
49
+ <a href="#getstoryartifact" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Story<wbr/>Artifact</span></a>
50
+ <a href="#getstoryinfo" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Story<wbr/>Info</span></a>
51
+ <a href="#getstorymessageemitter" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Story<wbr/>Message<wbr/>Emitter</span></a>
52
+ <a href="#getstorymessages" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Story<wbr/>Messages</span></a>
53
+ <a href="#getstoryprogressemitter" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Story<wbr/>Progress<wbr/>Emitter</span></a>
54
+ <a href="#getstorystate" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Story<wbr/>State</span></a>
55
+ <a href="#gettransactionservice" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Transaction<wbr/>Service</span></a>
56
+ <a href="#getuserartifact" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>User<wbr/>Artifact</span></a>
57
+ <a href="#getuserpreferences" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>User<wbr/>Preferences</span></a>
58
+ <a href="#importstoryfromzip" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>import<wbr/>Story<wbr/>From<wbr/>Zip</span></a>
59
+ <a href="#introducecharactertostory" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>introduce<wbr/>Character<wbr/>To<wbr/>Story</span></a>
60
+ <a href="#listagentartifacts" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Agent<wbr/>Artifacts</span></a>
61
+ <a href="#listagents" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Agents</span></a>
62
+ <a href="#listaimodels" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Ai<wbr/>Models</span></a>
63
+ <a href="#listattachedfiles" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Attached<wbr/>Files</span></a>
64
+ <a href="#listchapters" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Chapters</span></a>
65
+ <a href="#listcharacters" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Characters</span></a>
66
+ <a href="#listimagemodels" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Image<wbr/>Models</span></a>
67
+ <a href="#listpromptfiles" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Prompt<wbr/>Files</span></a>
68
+ <a href="#listpromptfileswithscope" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Prompt<wbr/>Files<wbr/>With<wbr/>Scope</span></a>
69
+ <a href="#listpromptfolders" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Prompt<wbr/>Folders</span></a>
70
+ <a href="#listpromptfolderswithscope" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Prompt<wbr/>Folders<wbr/>With<wbr/>Scope</span></a>
71
+ <a href="#listprompts" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Prompts</span></a>
72
+ <a href="#listpublishedagents" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Published<wbr/>Agents</span></a>
73
+ <a href="#listrooms" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Rooms</span></a>
74
+ <a href="#liststories" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Stories</span></a>
75
+ <a href="#liststoryartifacts" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Story<wbr/>Artifacts</span></a>
76
+ <a href="#liststorygenres" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Story<wbr/>Genres</span></a>
77
+ <a href="#liststorymodels" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Story<wbr/>Models</span></a>
78
+ <a href="#listuserartifacts" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>User<wbr/>Artifacts</span></a>
79
+ <a href="#pauseroom" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>pause<wbr/>Room</span></a>
80
+ <a href="#processtext" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>process<wbr/>Text</span></a>
81
+ <a href="#progressstory" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>progress<wbr/>Story</span></a>
82
+ <a href="#publishagentinstance" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>publish<wbr/>Agent<wbr/>Instance</span></a>
83
+ <a href="#publishartifact" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>publish<wbr/>Artifact</span></a>
84
+ <a href="#publishroom" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>publish<wbr/>Room</span></a>
85
+ <a href="#reloadagent" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>reload<wbr/>Agent</span></a>
86
+ <a href="#renameuserartifact" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>rename<wbr/>User<wbr/>Artifact</span></a>
87
+ <a href="#resetpublishedinstance" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>reset<wbr/>Published<wbr/>Instance</span></a>
88
+ <a href="#resetpublishedroominstance" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>reset<wbr/>Published<wbr/>Room<wbr/>Instance</span></a>
89
+ <a href="#resetroom" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>reset<wbr/>Room</span></a>
90
+ <a href="#resetstory" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>reset<wbr/>Story</span></a>
91
+ <a href="#respondtostory" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>respond<wbr/>To<wbr/>Story</span></a>
92
+ <a href="#resumepausedstories" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>resume<wbr/>Paused<wbr/>Stories</span></a>
93
+ <a href="#resumeroom" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>resume<wbr/>Room</span></a>
94
+ <a href="#runpreparedprompt" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>run<wbr/>Prepared<wbr/>Prompt</span></a>
95
+ <a href="#savechapter" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>save<wbr/>Chapter</span></a>
96
+ <a href="#savecharacter" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>save<wbr/>Character</span></a>
97
+ <a href="#saveplotplan" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>save<wbr/>Plot<wbr/>Plan</span></a>
98
+ <a href="#savepromptfile" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>save<wbr/>Prompt<wbr/>File</span></a>
99
+ <a href="#saveuserpreferences" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>save<wbr/>User<wbr/>Preferences</span></a>
100
+ <a href="#sendroommessage" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>send<wbr/>Room<wbr/>Message</span></a>
101
+ <a href="#updateagent" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>update<wbr/>Agent</span></a>
102
+ <a href="#updateuserartifact" class="tsd-index-link"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>update<wbr/>User<wbr/>Artifact</span></a>
103
+ </div></section></div></details></section></section><details class="tsd-panel-group tsd-member-group tsd-accordion" open><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h2>Methods</h2></summary><section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="addbalance"><span>add<wbr/>Balance</span><a href="#addbalance" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="addbalance-1"><span class="tsd-kind-call-signature">addBalance</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">amount</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#addbalance-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Adds funds to the user's balance.</p>
104
+ <p>Use this to credit a user after a payment is processed by your application.</p>
105
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">amount</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Dollar amount to add (must be positive)</p>
106
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2561">server/src/app.service.ts:2561</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="attachartifacttoagent"><span>attach<wbr/>Artifact<wbr/>To<wbr/>Agent</span><a href="#attachartifacttoagent" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="attachartifacttoagent-1"><span class="tsd-kind-call-signature">attachArtifactToAgent</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">agentId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">artifactId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#attachartifacttoagent-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Attaches a user artifact to an agent so the agent can read its content in prompts.</p>
107
+ <p>The attachment is persisted immediately via <code>agent.save()</code>. The artifact content
108
+ is injected into the agent's context on each subsequent call.</p>
109
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">agentId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The agent's ID</p>
110
+ </div></li><li><span><span class="tsd-kind-parameter">artifactId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The artifact's ID (from <a href="#listuserartifacts" class="tsd-kind-method">listUserArtifacts</a>)</p>
111
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws">Throws<a href="#throws" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If the agent or artifact does not exist</p>
112
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2940">server/src/app.service.ts:2940</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="attachdocument"><span>attach<wbr/>Document</span><a href="#attachdocument" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="attachdocument-1"><span class="tsd-kind-call-signature">attachDocument</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">agentId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">fileName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">fileData</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Buffer</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="AttachDocumentResponse.html" class="tsd-signature-type tsd-kind-interface">AttachDocumentResponse</a><span class="tsd-signature-symbol">&gt;</span><a href="#attachdocument-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Attaches a document to an agent so it can reference the file's contents in prompts.</p>
113
+ <p>The file is stored on disk and uploaded to the AI provider if required
114
+ (e.g. Google Cloud Storage for Vertex AI). The agent state is persisted after attachment.</p>
115
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">agentId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The agent's ID</p>
116
+ </div></li><li><span><span class="tsd-kind-parameter">fileName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>File name including extension (e.g. <code>'report.pdf'</code>)</p>
117
+ </div></li><li><span><span class="tsd-kind-parameter">fileData</span>: <span class="tsd-signature-type">Buffer</span></span><div class="tsd-comment tsd-typography"><p>Raw file bytes as a <code>Buffer</code></p>
118
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="AttachDocumentResponse.html" class="tsd-signature-type tsd-kind-interface">AttachDocumentResponse</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Object containing a <code>documentId</code> that can be used with <a href="#deleteattachedfilebyid" class="tsd-kind-method">deleteAttachedFileById</a></p>
119
+ <div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-1">Throws<a href="#throws-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If no agent with the given ID exists</p>
120
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L379">server/src/app.service.ts:379</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="compactstory"><span>compact<wbr/>Story</span><a href="#compactstory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="compactstory-1"><span class="tsd-kind-call-signature">compactStory</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">details</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">message</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">success</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span><a href="#compactstory-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Summarizes and compresses agent conversation histories to reduce token usage.</p>
121
+ <p>Uses story-specific prompts: the narrator summarizes plot events,
122
+ characters summarize their relationships and experiences. The original
123
+ messages are replaced with a compact summary block.</p>
124
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">storyId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The story's ID</p>
125
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">details</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">message</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">success</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Object with <code>success</code> flag, optional <code>message</code>, and compaction <code>details</code></p>
126
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2291">server/src/app.service.ts:2291</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="convertuserartifact"><span>convert<wbr/>User<wbr/>Artifact</span><a href="#convertuserartifact" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="convertuserartifact-1"><span class="tsd-kind-call-signature">convertUserArtifact</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">name</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">pdfBuffer</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Buffer</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><a href="#convertuserartifact-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates an artifact from a PDF by converting it to Markdown, running the
127
+ conversion in the background.</p>
128
+ <p>Returns the artifact ID immediately with placeholder content. The artifact
129
+ content is replaced with the converted Markdown when the background job
130
+ finishes. If conversion fails, the artifact content is replaced with an
131
+ error message.</p>
132
+ <p>Requires the <code>DOC_CONVERSION_AI_SERVICE</code> and <code>DOC_CONVERSION_AI_MODEL</code>
133
+ environment variables to be set to an AI service that supports PDF documents.
134
+ PDFs with more than 10 pages are converted page-by-page concurrently.</p>
135
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">name</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Display name for the artifact</p>
136
+ </div></li><li><span><span class="tsd-kind-parameter">pdfBuffer</span>: <span class="tsd-signature-type">Buffer</span></span><div class="tsd-comment tsd-typography"><p>Buffer containing the raw PDF data</p>
137
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><p>The new artifact's ID (content is a placeholder until conversion completes)</p>
138
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2647">server/src/app.service.ts:2647</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="createagent"><span>create<wbr/>Agent</span><a href="#createagent" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="createagent-1"><span class="tsd-kind-call-signature">createAgent</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">aiServiceName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">agentName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">agentNickname</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">description</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">aiModel</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">promptName</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">controlledByHuman</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">reasoningEffort</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">&quot;low&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;medium&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;high&quot;</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">maxOutputTokens</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">beginInstruction</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="../classes/Agent.html" class="tsd-signature-type tsd-kind-class">Agent</a><a href="#createagent-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates a new AI agent and registers it in memory.</p>
139
+ <p>The agent is immediately findable by ID but <strong>not</strong> persisted to disk.
140
+ Call <code>agent.save()</code> when you want to write it to storage.</p>
141
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">aiServiceName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Provider name (e.g. <code>'Anthropic'</code>, <code>'OpenAI'</code>). Use <a href="#getaiservicenames" class="tsd-kind-method">getAiServiceNames</a> for valid values.</p>
142
+ </div></li><li><span><span class="tsd-kind-parameter">agentName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Full name of the agent (used in conversation logs and file storage)</p>
143
+ </div></li><li><span><span class="tsd-kind-parameter">agentNickname</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Short display name shown in the UI</p>
144
+ </div></li><li><span><span class="tsd-kind-parameter">description</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Brief description of the agent's role or personality</p>
145
+ </div></li><li><span><span class="tsd-kind-parameter">aiModel</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Model identifier (e.g. <code>'claude-haiku-4-5'</code>, <code>'gpt-4o'</code>)</p>
146
+ </div></li><li><span><span class="tsd-kind-parameter">promptName</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &#39;default&#39;</span></span><div class="tsd-comment tsd-typography"><p>Prompt folder under <code>data/prompts/</code> that provides the agent's system instruction. Defaults to <code>'default'</code>.</p>
147
+ </div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">controlledByHuman</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>If <code>true</code>, the agent's responses are driven by a human rather than the AI. Defaults to <code>false</code>.</p>
148
+ </div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">reasoningEffort</span>: <span class="tsd-signature-type">&quot;low&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;medium&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;high&quot;</span></span><div class="tsd-comment tsd-typography"><p>Extended-thinking effort level for models that support it (e.g. Claude 3.7 Sonnet, o1/o3). Pass <code>null</code> to disable. Defaults to <code>undefined</code> (model default).</p>
149
+ </div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">maxOutputTokens</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>Override the model's default maximum output token limit</p>
150
+ </div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">beginInstruction</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Optional prompt stored with the agent and sent when the host app triggers a &quot;Begin&quot; action (e.g. <code>'Begin by reading the attached documents and asking the user the first question.'</code>)</p>
151
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="../classes/Agent.html" class="tsd-signature-type tsd-kind-class">Agent</a></h4><p>The newly created <a href="../classes/Agent.html" class="tsd-kind-class">Agent</a> instance</p>
152
+ <div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example">Example<a href="#example" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">agent</span><span class="hl-1"> = </span><span class="hl-4">appService</span><span class="hl-1">.</span><span class="hl-0">createAgent</span><span class="hl-1">(</span><br/><span class="hl-1"> </span><span class="hl-2">&#39;Anthropic&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-2">&#39;AI Assistant&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-2">&#39;James&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-2">&#39;A helpful AI assistant&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-2">&#39;claude-haiku-4-5&#39;</span><span class="hl-1">,</span><br/><span class="hl-1">);</span><br/><span class="hl-3">if</span><span class="hl-1"> (!</span><span class="hl-4">agent</span><span class="hl-1">.</span><span class="hl-4">id</span><span class="hl-1">) </span><span class="hl-3">throw</span><span class="hl-1"> </span><span class="hl-6">new</span><span class="hl-1"> </span><span class="hl-0">Error</span><span class="hl-1">(</span><span class="hl-2">&#39;Agent creation failed&#39;</span><span class="hl-1">);</span><br/><span class="hl-4">agent</span><span class="hl-1">.</span><span class="hl-0">save</span><span class="hl-1">(); </span><span class="hl-5">// persist to disk</span>
153
+ </code><button type="button">Copy</button></pre>
154
+
155
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L274">server/src/app.service.ts:274</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="createpromptfolder"><span>create<wbr/>Prompt<wbr/>Folder</span><a href="#createpromptfolder" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="createpromptfolder-1"><span class="tsd-kind-call-signature">createPromptFolder</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">folderName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#createpromptfolder-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates a new prompt folder in the user prompts directory.</p>
156
+ <p>An empty <code>system_instruction.prompt</code> file is created inside the folder so that
157
+ it is immediately usable as a prompt source for agents.</p>
158
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">folderName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Name of the folder to create</p>
159
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-2">Throws<a href="#throws-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If a folder with that name already exists</p>
160
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L1630">server/src/app.service.ts:1630</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="createroom"><span>create<wbr/>Room</span><a href="#createroom" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="createroom-1"><span class="tsd-kind-call-signature">createRoom</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">roomName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">goal</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">agentIds</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="CreateRoomResponse.html" class="tsd-signature-type tsd-kind-interface">CreateRoomResponse</a><span class="tsd-signature-symbol">&gt;</span><a href="#createroom-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates a new room and populates it with the specified agents.</p>
161
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">roomName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Display name for the room</p>
162
+ </div></li><li><span><span class="tsd-kind-parameter">goal</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Description of the room's purpose or objective, shared with all agents</p>
163
+ </div></li><li><span><span class="tsd-kind-parameter">agentIds</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></span><div class="tsd-comment tsd-typography"><p>IDs of the agents to add to the room</p>
164
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="CreateRoomResponse.html" class="tsd-signature-type tsd-kind-interface">CreateRoomResponse</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Object containing the new <code>roomId</code></p>
165
+ <div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-3">Throws<a href="#throws-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If any agent ID does not exist</p>
166
+ </div><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example-1">Example<a href="#example-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-6">const</span><span class="hl-1"> { </span><span class="hl-7">roomId</span><span class="hl-1"> } = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">appService</span><span class="hl-1">.</span><span class="hl-0">createRoom</span><span class="hl-1">(</span><br/><span class="hl-1"> </span><span class="hl-2">&#39;Research Session&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-2">&#39;Analyze the provided documents and produce a summary&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> [</span><span class="hl-4">analystId</span><span class="hl-1">, </span><span class="hl-4">writerAgentId</span><span class="hl-1">],</span><br/><span class="hl-1">);</span>
167
+ </code><button type="button">Copy</button></pre>
168
+
169
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L653">server/src/app.service.ts:653</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="createstory"><span>create<wbr/>Story</span><a href="#createstory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="createstory-1"><span class="tsd-kind-call-signature">createStory</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">name</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">idea</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">userCharacterDesc</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">otherCharactersDesc</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">storyModel</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">isImport</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">imageModelName</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="StoryInfo.html" class="tsd-signature-type tsd-kind-interface">StoryInfo</a><span class="tsd-signature-symbol">&gt;</span><a href="#createstory-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates a new interactive story with AI-driven characters.</p>
170
+ <p>Story creation is asynchronous — the story ID is returned immediately, but
171
+ character agents and the opening scene are generated in the background.
172
+ Subscribe to <a href="#getstoryprogressemitter" class="tsd-kind-method">getStoryProgressEmitter</a> to track creation progress.</p>
173
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">name</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Display name for the story</p>
174
+ </div></li><li><span><span class="tsd-kind-parameter">idea</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Brief premise or concept for the story</p>
175
+ </div></li><li><span><span class="tsd-kind-parameter">userCharacterDesc</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Description of the character the human player will portray</p>
176
+ </div></li><li><span><span class="tsd-kind-parameter">otherCharactersDesc</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Description of other prominent characters to generate</p>
177
+ </div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">storyModel</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Model identifier from <code>story_models.json</code> (e.g. <code>'claude-haiku-4-5'</code>). Defaults to the configured default.</p>
178
+ </div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">isImport</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Set <code>true</code> when reconstructing a story from exported data. Default <code>false</code>.</p>
179
+ </div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">imageModelName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Optional image model for generating character artwork</p>
180
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="StoryInfo.html" class="tsd-signature-type tsd-kind-interface">StoryInfo</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Story metadata including the new <code>id</code></p>
181
+ <div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example-2">Example<a href="#example-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">story</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">appService</span><span class="hl-1">.</span><span class="hl-0">createStory</span><span class="hl-1">(</span><br/><span class="hl-1"> </span><span class="hl-2">&#39;The Lost Kingdom&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-2">&#39;A medieval fantasy adventure&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-2">&#39;A young knight seeking redemption&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-2">&#39;A wise wizard and a cunning rogue&#39;</span><span class="hl-1">,</span><br/><span class="hl-1">);</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">emitter</span><span class="hl-1"> = </span><span class="hl-4">appService</span><span class="hl-1">.</span><span class="hl-0">getStoryProgressEmitter</span><span class="hl-1">(</span><span class="hl-4">story</span><span class="hl-1">.</span><span class="hl-4">id</span><span class="hl-1">);</span><br/><span class="hl-4">emitter</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;progress&#39;</span><span class="hl-1">, (</span><span class="hl-4">event</span><span class="hl-1">) </span><span class="hl-6">=&gt;</span><span class="hl-1"> </span><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-4">event</span><span class="hl-1">.</span><span class="hl-4">message</span><span class="hl-1">));</span>
182
+ </code><button type="button">Copy</button></pre>
183
+
184
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2012">server/src/app.service.ts:2012</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="createuserartifact"><span>create<wbr/>User<wbr/>Artifact</span><a href="#createuserartifact" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="createuserartifact-1"><span class="tsd-kind-call-signature">createUserArtifact</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">name</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">content</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><a href="#createuserartifact-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates a new named artifact and returns its ID.</p>
185
+ <p>The artifact is persisted immediately. Use the returned ID to attach it to
186
+ agents (<a href="#attachartifacttoagent" class="tsd-kind-method">attachArtifactToAgent</a>) or reference it in room messages.</p>
187
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">name</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Human-readable display name for the artifact</p>
188
+ </div></li><li><span><span class="tsd-kind-parameter">content</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Initial text content (typically Markdown)</p>
189
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span></h4><p>The new artifact's ID</p>
190
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2615">server/src/app.service.ts:2615</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="declinecharacter"><span>decline<wbr/>Character</span><a href="#declinecharacter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="declinecharacter-1"><span class="tsd-kind-call-signature">declineCharacter</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">characterName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#declinecharacter-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Records that the player declined a narrator-suggested character introduction.</p>
191
+ <p>Prevents the narrator from suggesting the same character again in this story.</p>
192
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">storyId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The story's ID</p>
193
+ </div></li><li><span><span class="tsd-kind-parameter">characterName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The character name that was declined</p>
194
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2376">server/src/app.service.ts:2376</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="deleteagent"><span>delete<wbr/>Agent</span><a href="#deleteagent" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="deleteagent-1"><span class="tsd-kind-call-signature">deleteAgent</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">agentId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#deleteagent-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Permanently deletes an agent and all its stored data.</p>
195
+ <p>If the agent is a published instance, its entry is also removed from the
196
+ published agents mapping.</p>
197
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">agentId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The agent's ID</p>
198
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-4">Throws<a href="#throws-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If no agent with the given ID exists</p>
199
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L994">server/src/app.service.ts:994</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="deleteattachedfile"><span>delete<wbr/>Attached<wbr/>File</span><a href="#deleteattachedfile" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="deleteattachedfile-1"><span class="tsd-kind-call-signature">deleteAttachedFile</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">agentId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">fileName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#deleteattachedfile-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Removes a file from an agent by its file name.</p>
200
+ <p>Deletes the file from storage and updates the agent's metadata.
201
+ Use <a href="#deleteattachedfilebyid" class="tsd-kind-method">deleteAttachedFileById</a> if you have the document ID instead.</p>
202
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">agentId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The agent's ID</p>
203
+ </div></li><li><span><span class="tsd-kind-parameter">fileName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Name of the file to remove (e.g. <code>'report.pdf'</code>)</p>
204
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-5">Throws<a href="#throws-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If the agent or file is not found</p>
205
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L1751">server/src/app.service.ts:1751</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="deleteattachedfilebyid"><span>delete<wbr/>Attached<wbr/>File<wbr/>By<wbr/>Id</span><a href="#deleteattachedfilebyid" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="deleteattachedfilebyid-1"><span class="tsd-kind-call-signature">deleteAttachedFileById</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">documentId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#deleteattachedfilebyid-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Removes an attached file by its document ID (as returned by <a href="#attachdocument" class="tsd-kind-method">attachDocument</a>).</p>
206
+ <p>Searches all agents to locate the owner, removes the file from storage,
207
+ and updates the agent's metadata.</p>
208
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">documentId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The <code>documentId</code> returned by <a href="#attachdocument" class="tsd-kind-method">attachDocument</a></p>
209
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-6">Throws<a href="#throws-6" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If no file with the given ID exists</p>
210
+ </div><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-7">Throws<a href="#throws-7" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If deletion fails</p>
211
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L1779">server/src/app.service.ts:1779</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="deletechapter"><span>delete<wbr/>Chapter</span><a href="#deletechapter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="deletechapter-1"><span class="tsd-kind-call-signature">deleteChapter</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">chapterIndex</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#deletechapter-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Deletes a chapter checkpoint from a story.</p>
212
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">storyId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The story's ID</p>
213
+ </div></li><li><span><span class="tsd-kind-parameter">chapterIndex</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The chapter number to delete</p>
214
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-8">Throws<a href="#throws-8" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If the chapter does not exist</p>
215
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2439">server/src/app.service.ts:2439</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="deletecharacterfromstory"><span>delete<wbr/>Character<wbr/>From<wbr/>Story</span><a href="#deletecharacterfromstory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="deletecharacterfromstory-1"><span class="tsd-kind-call-signature">deleteCharacterFromStory</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">characterName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#deletecharacterfromstory-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Removes a character's agent from the story while preserving their profile file.</p>
216
+ <p>The character can be reintroduced later via <a href="#introducecharactertostory" class="tsd-kind-method">introduceCharacterToStory</a>
217
+ and their profile will be available.</p>
218
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">storyId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The story's ID</p>
219
+ </div></li><li><span><span class="tsd-kind-parameter">characterName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The character's name</p>
220
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2389">server/src/app.service.ts:2389</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="deletepromptfile"><span>delete<wbr/>Prompt<wbr/>File</span><a href="#deletepromptfile" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="deletepromptfile-1"><span class="tsd-kind-call-signature">deletePromptFile</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">folderName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">fileName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#deletepromptfile-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Deletes a prompt file from the user prompts directory.</p>
221
+ <p>Removes both the <code>.prompt</code> and <code>.json</code> variants if they exist.
222
+ This is a no-op if neither file is present.</p>
223
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">folderName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Prompt folder name, or <code>'shared'</code> for the root prompts directory</p>
224
+ </div></li><li><span><span class="tsd-kind-parameter">fileName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Base name of the file to delete (without extension)</p>
225
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L1550">server/src/app.service.ts:1550</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="deletepromptfolder"><span>delete<wbr/>Prompt<wbr/>Folder</span><a href="#deletepromptfolder" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="deletepromptfolder-1"><span class="tsd-kind-call-signature">deletePromptFolder</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">folderName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#deletepromptfolder-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Deletes a prompt folder and all its contents from the user prompts directory.</p>
226
+ <p>Only user-owned folders can be deleted; common folders are not affected.</p>
227
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">folderName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Name of the folder to delete</p>
228
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-9">Throws<a href="#throws-9" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If <code>folderName</code> is <code>'shared'</code></p>
229
+ </div><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-10">Throws<a href="#throws-10" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If the folder does not exist in the user prompts directory</p>
230
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L1655">server/src/app.service.ts:1655</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="deleteroom"><span>delete<wbr/>Room</span><a href="#deleteroom" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="deleteroom-1"><span class="tsd-kind-call-signature">deleteRoom</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">roomId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#deleteroom-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Permanently deletes a room and all its data.</p>
231
+ <p>If the room is a template, all of its published instances are deleted first.
232
+ All attached files and published room mappings are also cleaned up.</p>
233
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">roomId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The room's ID</p>
234
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-11">Throws<a href="#throws-11" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If the room does not exist</p>
235
+ </div><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-12">Throws<a href="#throws-12" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If deletion fails</p>
236
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L1154">server/src/app.service.ts:1154</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="deletestory"><span>delete<wbr/>Story</span><a href="#deletestory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="deletestory-1"><span class="tsd-kind-call-signature">deleteStory</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#deletestory-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Permanently deletes a story, its room, all characters, chapters, and artifacts.</p>
237
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">storyId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The story's ID</p>
238
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2277">server/src/app.service.ts:2277</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="deleteuserartifact"><span>delete<wbr/>User<wbr/>Artifact</span><a href="#deleteuserartifact" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="deleteuserartifact-1"><span class="tsd-kind-call-signature">deleteUserArtifact</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">artifactId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><a href="#deleteuserartifact-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Permanently deletes a user artifact.</p>
239
+ <p>Any agents that have the artifact attached will lose access to it after deletion.</p>
240
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">artifactId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The artifact's ID (from <a href="#listuserartifacts" class="tsd-kind-method">listUserArtifacts</a>)</p>
241
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p><code>true</code> on success, <code>false</code> if no artifact with that ID exists</p>
242
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2868">server/src/app.service.ts:2868</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="detachartifactfromagent"><span>detach<wbr/>Artifact<wbr/>From<wbr/>Agent</span><a href="#detachartifactfromagent" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="detachartifactfromagent-1"><span class="tsd-kind-call-signature">detachArtifactFromAgent</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">agentId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">artifactId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#detachartifactfromagent-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Removes an artifact attachment from an agent.</p>
243
+ <p>The artifact itself is not deleted — only the link between the agent and the artifact
244
+ is removed. Changes are persisted immediately via <code>agent.save()</code>.</p>
245
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">agentId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The agent's ID</p>
246
+ </div></li><li><span><span class="tsd-kind-parameter">artifactId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The artifact's ID to detach</p>
247
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-13">Throws<a href="#throws-13" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If no agent with the given ID exists</p>
248
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2966">server/src/app.service.ts:2966</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="downloadstorymarkdown"><span>download<wbr/>Story<wbr/>Markdown</span><a href="#downloadstorymarkdown" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="downloadstorymarkdown-1"><span class="tsd-kind-call-signature">downloadStoryMarkdown</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span><a href="#downloadstorymarkdown-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Generates the full story as a single markdown document.</p>
249
+ <p>Combines all chapters and room messages in narrative order.</p>
250
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">storyId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The story's ID</p>
251
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span></h4><p>The complete story formatted as markdown text</p>
252
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2501">server/src/app.service.ts:2501</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="editroom"><span>edit<wbr/>Room</span><a href="#editroom" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="editroom-1"><span class="tsd-kind-call-signature">editRoom</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">roomId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">roomName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">goal</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">baseRoomDir</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">agentIds</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#editroom-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Updates the name, goal, and/or agent membership of an existing room.</p>
253
+ <p>Published room instances cannot be edited — edit the template instead.</p>
254
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">roomId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The room's ID</p>
255
+ </div></li><li><span><span class="tsd-kind-parameter">roomName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>New display name</p>
256
+ </div></li><li><span><span class="tsd-kind-parameter">goal</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>New goal description</p>
257
+ </div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">baseRoomDir</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Optional override for the room's base storage directory</p>
258
+ </div></li><li><span><span class="tsd-kind-parameter">agentIds</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = []</span></span><div class="tsd-comment tsd-typography"><p>Replacement list of agent IDs (replaces current membership entirely)</p>
259
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-14">Throws<a href="#throws-14" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If the room does not exist</p>
260
+ </div><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-15">Throws<a href="#throws-15" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If attempting to edit a published room instance</p>
261
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L698">server/src/app.service.ts:698</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="ensureagentstatecallback"><span>ensure<wbr/>Agent<wbr/>State<wbr/>Callback</span><a href="#ensureagentstatecallback" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="ensureagentstatecallback-1"><span class="tsd-kind-call-signature">ensureAgentStateCallback</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">agentId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#ensureagentstatecallback-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Ensures the real-time state callback is registered for an agent.</p>
262
+ <p>Normally called automatically by <a href="#processtext" class="tsd-kind-method">processText</a> and <a href="#getagentmessages" class="tsd-kind-method">getAgentMessages</a>.
263
+ Call this explicitly when connecting a new SSE client to an agent that was
264
+ loaded from disk (not yet touched in this session).</p>
265
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">agentId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The agent's ID</p>
266
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2099">server/src/app.service.ts:2099</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="ensureroomstatecallback"><span>ensure<wbr/>Room<wbr/>State<wbr/>Callback</span><a href="#ensureroomstatecallback" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="ensureroomstatecallback-1"><span class="tsd-kind-call-signature">ensureRoomStateCallback</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">roomId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#ensureroomstatecallback-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Ensures the real-time state callback is registered for a room.</p>
267
+ <p>Normally called automatically. Call this explicitly when connecting a new
268
+ SSE client to a room that was loaded from disk (not yet touched in this session).</p>
269
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">roomId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The room's ID</p>
270
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2171">server/src/app.service.ts:2171</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="exportstorydata"><span>export<wbr/>Story<wbr/>Data</span><a href="#exportstorydata" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="exportstorydata-1"><span class="tsd-kind-call-signature">exportStoryData</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">filename</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">stream</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Readable</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span><a href="#exportstorydata-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Exports the complete story data as a downloadable zip archive.</p>
271
+ <p>The archive can be re-imported via <a href="#importstoryfromzip" class="tsd-kind-method">importStoryFromZip</a>.</p>
272
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">storyId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The story's ID</p>
273
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">filename</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">stream</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Readable</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Object with a <code>stream</code> (readable zip stream) and <code>filename</code> for the download</p>
274
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2513">server/src/app.service.ts:2513</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getagentdetails"><span>get<wbr/>Agent<wbr/>Details</span><a href="#getagentdetails" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getagentdetails-1"><span class="tsd-kind-call-signature">getAgentDetails</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">agentId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="AgentInfo.html" class="tsd-signature-type tsd-kind-interface">AgentInfo</a><span class="tsd-signature-symbol">&gt;</span><a href="#getagentdetails-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns detailed metadata for a specific agent.</p>
275
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">agentId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The agent's ID</p>
276
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="AgentInfo.html" class="tsd-signature-type tsd-kind-interface">AgentInfo</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Agent metadata object, or <code>null</code> if no agent with the given ID exists</p>
277
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L604">server/src/app.service.ts:604</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getagenthistory"><span>get<wbr/>Agent<wbr/>History</span><a href="#getagenthistory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getagenthistory-1"><span class="tsd-kind-call-signature">getAgentHistory</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">agentId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span><a href="#getagenthistory-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the formatted conversation history for a specific character in a story.</p>
278
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">storyId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The story's ID</p>
279
+ </div></li><li><span><span class="tsd-kind-parameter">agentId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The character agent's ID</p>
280
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Object with <code>content</code> containing the formatted history text</p>
281
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2524">server/src/app.service.ts:2524</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getagentmessageemitter"><span>get<wbr/>Agent<wbr/>Message<wbr/>Emitter</span><a href="#getagentmessageemitter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getagentmessageemitter-1"><span class="tsd-kind-call-signature">getAgentMessageEmitter</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">agentId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">EventEmitter</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><a href="#getagentmessageemitter-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns a Node.js <code>EventEmitter</code> that fires whenever this agent's state changes
282
+ (new message, token count update, etc.).</p>
283
+ <p>Useful for building real-time UIs. Subscribe to the <code>'update'</code> event to receive
284
+ agent state payloads without polling.</p>
285
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">agentId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The agent's ID</p>
286
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">EventEmitter</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4><p><code>EventEmitter</code> that emits <code>'update'</code> events with agent state payloads</p>
287
+ <div class="tsd-comment tsd-typography"><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example-3">Example<a href="#example-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">emitter</span><span class="hl-1"> = </span><span class="hl-4">appService</span><span class="hl-1">.</span><span class="hl-0">getAgentMessageEmitter</span><span class="hl-1">(</span><span class="hl-4">agent</span><span class="hl-1">.</span><span class="hl-4">id</span><span class="hl-1">);</span><br/><span class="hl-4">emitter</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;update&#39;</span><span class="hl-1">, (</span><span class="hl-4">state</span><span class="hl-1">) </span><span class="hl-6">=&gt;</span><span class="hl-1"> {</span><br/><span class="hl-1"> </span><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-2">&#39;New message:&#39;</span><span class="hl-1">, </span><span class="hl-4">state</span><span class="hl-1">.</span><span class="hl-4">latestMessage</span><span class="hl-1">);</span><br/><span class="hl-1">});</span>
288
+ </code><button type="button">Copy</button></pre>
289
+
290
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2086">server/src/app.service.ts:2086</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getagentmessages"><span>get<wbr/>Agent<wbr/>Messages</span><a href="#getagentmessages" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getagentmessages-1"><span class="tsd-kind-call-signature">getAgentMessages</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">agentId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">fromIndex</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="AgentMessagesResponse.html" class="tsd-signature-type tsd-kind-interface">AgentMessagesResponse</a><span class="tsd-signature-symbol">&gt;</span><a href="#getagentmessages-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns an agent's conversation history starting from a given index.</p>
291
+ <p>Pass the <code>messageIndex</code> from a previous response as <code>fromIndex</code> to
292
+ retrieve only new messages since the last poll.</p>
293
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">agentId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The agent's ID</p>
294
+ </div></li><li><span><span class="tsd-kind-parameter">fromIndex</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></span><div class="tsd-comment tsd-typography"><p>Zero-based index to start from (default <code>0</code> returns all messages)</p>
295
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="AgentMessagesResponse.html" class="tsd-signature-type tsd-kind-interface">AgentMessagesResponse</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Object with the messages array and cumulative token/cost totals.
296
+ Returns empty messages with zero counts if the agent is not found.</p>
297
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L843">server/src/app.service.ts:843</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getaiservicefromservicename"><span>get<wbr/>Ai<wbr/>Service<wbr/>From<wbr/>Service<wbr/>Name</span><a href="#getaiservicefromservicename" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getaiservicefromservicename-1"><span class="tsd-kind-call-signature">getAiServiceFromServiceName</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">serviceName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">BaseAiService</span><a href="#getaiservicefromservicename-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the AI service instance for the given provider name.</p>
298
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">serviceName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Provider name as returned by <a href="#getaiservicenames" class="tsd-kind-method">getAiServiceNames</a></p>
299
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">BaseAiService</span></h4><p>The corresponding AI service instance</p>
300
+ <div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-16">Throws<a href="#throws-16" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If the service name is not recognized</p>
301
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L102">server/src/app.service.ts:102</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getaiservicenames"><span>get<wbr/>Ai<wbr/>Service<wbr/>Names</span><a href="#getaiservicenames" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getaiservicenames-1"><span class="tsd-kind-call-signature">getAiServiceNames</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><a href="#getaiservicenames-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the names of all available AI service providers.</p>
302
+ <p>Only providers that have a configured API key are included.</p>
303
+ </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h4><p>Array of provider names (e.g. <code>'Anthropic'</code>, <code>'OpenAI'</code>, <code>'Vertex AI'</code>)</p>
304
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L91">server/src/app.service.ts:91</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getbalance"><span>get<wbr/>Balance</span><a href="#getbalance" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getbalance-1"><span class="tsd-kind-call-signature">getBalance</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><a href="#getbalance-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the user's current credit balance in dollars.</p>
305
+ <p>The balance is decremented automatically after each AI call based on token usage
306
+ and any configured markup. Calls that would exceed the balance throw
307
+ <code>InsufficientBalanceError</code> before the request is sent.</p>
308
+ </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>Current balance in dollars</p>
309
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2550">server/src/app.service.ts:2550</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getbalancemessageemitter"><span>get<wbr/>Balance<wbr/>Message<wbr/>Emitter</span><a href="#getbalancemessageemitter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getbalancemessageemitter-1"><span class="tsd-kind-call-signature">getBalanceMessageEmitter</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">userId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">EventEmitter</span><a href="#getbalancemessageemitter-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns a Node.js <code>EventEmitter</code> that fires whenever the user's balance changes.</p>
310
+ <p>Subscribe to the <code>'update'</code> event to push real-time balance updates to a connected
311
+ client (e.g. via SSE) without polling.</p>
312
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">userId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The user's ID (typically the same ID used with <code>getAppService</code>)</p>
313
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">EventEmitter</span></h4><p><code>EventEmitter</code> that emits <code>'update'</code> events with the new balance value</p>
314
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2159">server/src/app.service.ts:2159</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getchapter"><span>get<wbr/>Chapter</span><a href="#getchapter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getchapter-1"><span class="tsd-kind-call-signature">getChapter</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">chapterIndex</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">RoomMessage</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><a href="#getchapter-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the messages from a specific chapter checkpoint.</p>
315
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">storyId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The story's ID</p>
316
+ </div></li><li><span><span class="tsd-kind-parameter">chapterIndex</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The chapter number (1-based, as returned by <a href="#listchapters" class="tsd-kind-method">listChapters</a>)</p>
317
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">RoomMessage</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Array of room messages from that chapter</p>
318
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2413">server/src/app.service.ts:2413</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getcharacter"><span>get<wbr/>Character</span><a href="#getcharacter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getcharacter-1"><span class="tsd-kind-call-signature">getCharacter</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">characterName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span><a href="#getcharacter-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the profile for a specific character.</p>
319
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">storyId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The story's ID</p>
320
+ </div></li><li><span><span class="tsd-kind-parameter">characterName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The character's name</p>
321
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Object with <code>content</code> containing the character profile markdown</p>
322
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2463">server/src/app.service.ts:2463</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getplotplan"><span>get<wbr/>Plot<wbr/>Plan</span><a href="#getplotplan" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getplotplan-1"><span class="tsd-kind-call-signature">getPlotPlan</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span><a href="#getplotplan-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the story's plot plan.</p>
323
+ <p>The plot plan is a room artifact generated by the narrator at story creation
324
+ and updated as the story progresses.</p>
325
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">storyId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The story's ID</p>
326
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">content</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Object with <code>content</code> containing the plot plan markdown</p>
327
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2488">server/src/app.service.ts:2488</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getpromptfile"><span>get<wbr/>Prompt<wbr/>File</span><a href="#getpromptfile" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getpromptfile-1"><span class="tsd-kind-call-signature">getPromptFile</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">folderName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">fileName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="PromptFileContent.html" class="tsd-signature-type tsd-kind-interface">PromptFileContent</a><a href="#getpromptfile-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reads a prompt file, applying the 4-level fallback resolution:
328
+ <code>user/{folder}</code> → <code>user/root</code> → <code>common/{folder}</code> → <code>common/root</code>.</p>
329
+ <p>The returned object includes a <code>scope</code> field (<code>'user'</code> or <code>'common'</code>) indicating
330
+ which directory the file was found in. Returns <code>{ content: '' }</code> if the file
331
+ does not exist in any location.</p>
332
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">folderName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Prompt folder name, or <code>'shared'</code> for the root prompts directory</p>
333
+ </div></li><li><span><span class="tsd-kind-parameter">fileName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Base name of the prompt file (with or without <code>.prompt</code>/<code>.json</code> extension)</p>
334
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="PromptFileContent.html" class="tsd-signature-type tsd-kind-interface">PromptFileContent</a></h4><p><code>{ content, scope }</code> where <code>scope</code> is omitted when the file is not found</p>
335
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L1452">server/src/app.service.ts:1452</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getpublishedinstances"><span>get<wbr/>Published<wbr/>Instances</span><a href="#getpublishedinstances" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getpublishedinstances-1"><span class="tsd-kind-call-signature">getPublishedInstances</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">templateId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="AgentInfo.html" class="tsd-signature-type tsd-kind-interface">AgentInfo</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><a href="#getpublishedinstances-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns all published instances created from a template agent.</p>
336
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">templateId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>ID of the template agent</p>
337
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="AgentInfo.html" class="tsd-signature-type tsd-kind-interface">AgentInfo</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Array of agent metadata objects for each published instance</p>
338
+ <div class="tsd-comment tsd-typography"><div class="tsd-tag-see"><h4 class="tsd-anchor-link" id="see">See<a href="#see" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p><a href="#publishagentinstance" class="tsd-kind-method">publishAgentInstance</a></p>
339
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L1057">server/src/app.service.ts:1057</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getpublishedroominstances"><span>get<wbr/>Published<wbr/>Room<wbr/>Instances</span><a href="#getpublishedroominstances" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getpublishedroominstances-1"><span class="tsd-kind-call-signature">getPublishedRoomInstances</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">templateId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="RoomInfo.html" class="tsd-signature-type tsd-kind-interface">RoomInfo</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><a href="#getpublishedroominstances-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns all published instances created from a template room.</p>
340
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">templateId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>ID of the template room</p>
341
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="RoomInfo.html" class="tsd-signature-type tsd-kind-interface">RoomInfo</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Array of room summary objects for each published instance</p>
342
+ <div class="tsd-comment tsd-typography"><div class="tsd-tag-see"><h4 class="tsd-anchor-link" id="see-1">See<a href="#see-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p><a href="#publishroom" class="tsd-kind-method">publishRoom</a></p>
343
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L1229">server/src/app.service.ts:1229</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getrandomstoryidea"><span>get<wbr/>Random<wbr/>Story<wbr/>Idea</span><a href="#getrandomstoryidea" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getrandomstoryidea-1"><span class="tsd-kind-call-signature">getRandomStoryIdea</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <a href="StoryIdea.html" class="tsd-signature-type tsd-kind-interface">StoryIdea</a><a href="#getrandomstoryidea-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns a random story idea from a randomly selected genre.</p>
344
+ </div><h4 class="tsd-returns-title">Returns <a href="StoryIdea.html" class="tsd-signature-type tsd-kind-interface">StoryIdea</a></h4><p>A random <code>StoryIdea</code> object, or <code>null</code> if no genres/ideas are available</p>
345
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L229">server/src/app.service.ts:229</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getrandomstoryideabygenre"><span>get<wbr/>Random<wbr/>Story<wbr/>Idea<wbr/>By<wbr/>Genre</span><a href="#getrandomstoryideabygenre" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getrandomstoryideabygenre-1"><span class="tsd-kind-call-signature">getRandomStoryIdeaByGenre</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">genreName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="StoryIdea.html" class="tsd-signature-type tsd-kind-interface">StoryIdea</a><a href="#getrandomstoryideabygenre-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns a random story idea from the specified genre.</p>
346
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">genreName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Genre name as returned by <a href="#liststorygenres" class="tsd-kind-method">listStoryGenres</a> (e.g. <code>'fantasy'</code>)</p>
347
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="StoryIdea.html" class="tsd-signature-type tsd-kind-interface">StoryIdea</a></h4><p>A random <code>StoryIdea</code> object, or <code>null</code> if the genre file is empty</p>
348
+ <div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-17">Throws<a href="#throws-17" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If the genre does not exist</p>
349
+ </div><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-18">Throws<a href="#throws-18" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If the genre file cannot be read</p>
350
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L193">server/src/app.service.ts:193</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getroomartifacts"><span>get<wbr/>Room<wbr/>Artifacts</span><a href="#getroomartifacts" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getroomartifacts-1"><span class="tsd-kind-call-signature">getRoomArtifacts</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">roomId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">artifacts</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span><a href="#getroomartifacts-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns all artifacts published in a room.</p>
351
+ <p>Artifacts are collaborative documents created by agents via the <code>'publish'</code> action.</p>
352
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">roomId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The room's ID</p>
353
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">artifacts</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Object with an <code>artifacts</code> array. Returns <code>{ artifacts: [] }</code> if the room is not found.</p>
354
+ <div class="tsd-comment tsd-typography"><div class="tsd-tag-see"><h4 class="tsd-anchor-link" id="see-2">See<a href="#see-2" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p><a href="#publishartifact" class="tsd-kind-method">publishArtifact</a></p>
355
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L1580">server/src/app.service.ts:1580</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getroombyid"><span>get<wbr/>Room<wbr/>By<wbr/>Id</span><a href="#getroombyid" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getroombyid-1"><span class="tsd-kind-call-signature">getRoomById</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">roomId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../classes/Room.html" class="tsd-signature-type tsd-kind-class">Room</a><span class="tsd-signature-symbol">&gt;</span><a href="#getroombyid-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the raw <code>Room</code> object for a given ID.</p>
356
+ <p>Use <a href="#getroomdetails" class="tsd-kind-method">getRoomDetails</a> for a plain metadata object. This method exposes
357
+ the full <code>Room</code> instance, which is useful for advanced operations.</p>
358
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">roomId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The room's ID</p>
359
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="../classes/Room.html" class="tsd-signature-type tsd-kind-class">Room</a><span class="tsd-signature-symbol">&gt;</span></h4><p>The <code>Room</code> instance, or <code>null</code> if not found</p>
360
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L790">server/src/app.service.ts:790</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getroomdetails"><span>get<wbr/>Room<wbr/>Details</span><a href="#getroomdetails" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getroomdetails-1"><span class="tsd-kind-call-signature">getRoomDetails</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">roomId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="RoomDetails.html" class="tsd-signature-type tsd-kind-interface">RoomDetails</a><span class="tsd-signature-symbol">&gt;</span><a href="#getroomdetails-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns full details for a room, including the metadata of each member agent.</p>
361
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">roomId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The room's ID</p>
362
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="RoomDetails.html" class="tsd-signature-type tsd-kind-interface">RoomDetails</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Room details object, or <code>null</code> if no room with the given ID exists</p>
363
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L752">server/src/app.service.ts:752</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getroommessageemitter"><span>get<wbr/>Room<wbr/>Message<wbr/>Emitter</span><a href="#getroommessageemitter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getroommessageemitter-1"><span class="tsd-kind-call-signature">getRoomMessageEmitter</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">roomId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">EventEmitter</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><a href="#getroommessageemitter-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns a Node.js <code>EventEmitter</code> that fires whenever a new message arrives in the room.</p>
364
+ <p>Subscribe to the <code>'update'</code> event to receive room message payloads in real time
365
+ without polling.</p>
366
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">roomId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The room's ID</p>
367
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">EventEmitter</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4><p><code>EventEmitter</code> that emits <code>'update'</code> events with room message payloads</p>
368
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2146">server/src/app.service.ts:2146</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getroommessages"><span>get<wbr/>Room<wbr/>Messages</span><a href="#getroommessages" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getroommessages-1"><span class="tsd-kind-call-signature">getRoomMessages</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">roomId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">fromIndex</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">includeThoughts</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="RoomMessagesResponse.html" class="tsd-signature-type tsd-kind-interface">RoomMessagesResponse</a><span class="tsd-signature-symbol">&gt;</span><a href="#getroommessages-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns messages from a room's conversation log starting from a given index.</p>
369
+ <p>Pass the index of the last message you received as <code>fromIndex</code> to poll for
370
+ new messages only.</p>
371
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">roomId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The room's ID</p>
372
+ </div></li><li><span><span class="tsd-kind-parameter">fromIndex</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></span><div class="tsd-comment tsd-typography"><p>Zero-based index to start from (default <code>0</code> returns all messages)</p>
373
+ </div></li><li><span><span class="tsd-kind-parameter">includeThoughts</span>: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></span><div class="tsd-comment tsd-typography"><p>If <code>true</code>, includes <code>'think'</code> action messages which are
374
+ normally hidden (agents' internal reasoning). Default <code>false</code>.</p>
375
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="RoomMessagesResponse.html" class="tsd-signature-type tsd-kind-interface">RoomMessagesResponse</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Object with the messages array and total cost across all agents.
376
+ Returns empty messages with zero cost if the room is not found.</p>
377
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L807">server/src/app.service.ts:807</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getstoryartifact"><span>get<wbr/>Story<wbr/>Artifact</span><a href="#getstoryartifact" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getstoryartifact-1"><span class="tsd-kind-call-signature">getStoryArtifact</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">artifactId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">Buffer</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">ArrayBufferLike</span><span class="tsd-signature-symbol">&gt;</span><a href="#getstoryartifact-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the content of a specific story artifact.</p>
378
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">storyId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The story's ID</p>
379
+ </div></li><li><span><span class="tsd-kind-parameter">artifactId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The artifact's ID (from <a href="#liststoryartifacts" class="tsd-kind-method">listStoryArtifacts</a>)</p>
380
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">Buffer</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">ArrayBufferLike</span><span class="tsd-signature-symbol">&gt;</span></h4><p>The artifact content as a string or Buffer, or <code>null</code> if not found</p>
381
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2902">server/src/app.service.ts:2902</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getstoryinfo"><span>get<wbr/>Story<wbr/>Info</span><a href="#getstoryinfo" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getstoryinfo-1"><span class="tsd-kind-call-signature">getStoryInfo</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="StoryInfo.html" class="tsd-signature-type tsd-kind-interface">StoryInfo</a><span class="tsd-signature-symbol">&gt;</span><a href="#getstoryinfo-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns metadata for a specific story.</p>
382
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">storyId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The story's ID</p>
383
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="StoryInfo.html" class="tsd-signature-type tsd-kind-interface">StoryInfo</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Story metadata, or <code>undefined</code> if not found</p>
384
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2329">server/src/app.service.ts:2329</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getstorymessageemitter"><span>get<wbr/>Story<wbr/>Message<wbr/>Emitter</span><a href="#getstorymessageemitter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getstorymessageemitter-1"><span class="tsd-kind-call-signature">getStoryMessageEmitter</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">EventEmitter</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><a href="#getstorymessageemitter-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the <code>EventEmitter</code> for real-time story message updates.</p>
385
+ <p>Subscribe to the <code>'update'</code> event to receive new story messages without polling.</p>
386
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">storyId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The story's ID</p>
387
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">EventEmitter</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4><p><code>EventEmitter</code> emitting <code>'update'</code> events with message payloads</p>
388
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2064">server/src/app.service.ts:2064</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getstorymessages"><span>get<wbr/>Story<wbr/>Messages</span><a href="#getstorymessages" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getstorymessages-1"><span class="tsd-kind-call-signature">getStoryMessages</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">fromIndex</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="RoomMessagesResponse.html" class="tsd-signature-type tsd-kind-interface">RoomMessagesResponse</a><span class="tsd-signature-symbol">&gt;</span><a href="#getstorymessages-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Gets messages from a story's room starting from a specific index</p>
389
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">storyId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The story ID</p>
390
+ </div></li><li><span><span class="tsd-kind-parameter">fromIndex</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The index to start from (0-based)</p>
391
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="RoomMessagesResponse.html" class="tsd-signature-type tsd-kind-interface">RoomMessagesResponse</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Array of indexed messages and total story cost</p>
392
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L873">server/src/app.service.ts:873</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getstoryprogressemitter"><span>get<wbr/>Story<wbr/>Progress<wbr/>Emitter</span><a href="#getstoryprogressemitter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getstoryprogressemitter-1"><span class="tsd-kind-call-signature">getStoryProgressEmitter</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">EventEmitter</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span><a href="#getstoryprogressemitter-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the <code>EventEmitter</code> for tracking story creation progress.</p>
393
+ <p>Subscribe to the <code>'progress'</code> event to receive status updates while
394
+ <a href="#createstory" class="tsd-kind-method">createStory</a> generates characters and the opening scene in the background.</p>
395
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">storyId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The story's ID</p>
396
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">EventEmitter</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">&gt;</span></h4><p><code>EventEmitter</code> emitting <code>'progress'</code> events, or <code>undefined</code> if creation is complete</p>
397
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2052">server/src/app.service.ts:2052</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getstorystate"><span>get<wbr/>Story<wbr/>State</span><a href="#getstorystate" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getstorystate-1"><span class="tsd-kind-call-signature">getStoryState</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="StoryState.html" class="tsd-signature-type tsd-kind-interface">StoryState</a><span class="tsd-signature-symbol">&gt;</span><a href="#getstorystate-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the current runtime state of a story.</p>
398
+ <p>Includes messages, pending message count, processing status, and story metadata.
399
+ Useful for restoring UI state after reconnecting.</p>
400
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">storyId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The story's ID</p>
401
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="StoryState.html" class="tsd-signature-type tsd-kind-interface">StoryState</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Full story state object</p>
402
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2319">server/src/app.service.ts:2319</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="gettransactionservice"><span>get<wbr/>Transaction<wbr/>Service</span><a href="#gettransactionservice" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="gettransactionservice-1"><span class="tsd-kind-call-signature">getTransactionService</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">TransactionService</span><a href="#gettransactionservice-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the underlying <code>TransactionService</code> for advanced balance operations.</p>
403
+ <p>Provides access to the transaction log and fine-grained credit/debit methods
404
+ beyond the simple <a href="#addbalance" class="tsd-kind-method">addBalance</a> API.</p>
405
+ </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">TransactionService</span></h4><p>The <code>TransactionService</code> instance for this user</p>
406
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2573">server/src/app.service.ts:2573</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getuserartifact"><span>get<wbr/>User<wbr/>Artifact</span><a href="#getuserartifact" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getuserartifact-1"><span class="tsd-kind-call-signature">getUserArtifact</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">artifactId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">Buffer</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">ArrayBufferLike</span><span class="tsd-signature-symbol">&gt;</span><a href="#getuserartifact-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the content of a user artifact.</p>
407
+ <p>Text artifacts are returned as <code>string</code>; binary artifacts (e.g. converted PDFs
408
+ in intermediate state) may be returned as <code>Buffer</code>.</p>
409
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">artifactId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The artifact's ID (from <a href="#listuserartifacts" class="tsd-kind-method">listUserArtifacts</a>)</p>
410
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">Buffer</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">ArrayBufferLike</span><span class="tsd-signature-symbol">&gt;</span></h4><p>The artifact content, or <code>null</code> if no artifact with that ID exists</p>
411
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2601">server/src/app.service.ts:2601</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="getuserpreferences"><span>get<wbr/>User<wbr/>Preferences</span><a href="#getuserpreferences" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="getuserpreferences-1"><span class="tsd-kind-call-signature">getUserPreferences</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><a href="#getuserpreferences-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the user's stored preferences object.</p>
412
+ <p>Preferences are application-defined — Briyah stores and returns them as-is.
413
+ Returns <code>{}</code> if no preferences have been saved yet.</p>
414
+ </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4><p>The preferences object previously written by <a href="#saveuserpreferences" class="tsd-kind-method">saveUserPreferences</a>,
415
+ or an empty object if none exist</p>
416
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L1305">server/src/app.service.ts:1305</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="importstoryfromzip"><span>import<wbr/>Story<wbr/>From<wbr/>Zip</span><a href="#importstoryfromzip" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="importstoryfromzip-1"><span class="tsd-kind-call-signature">importStoryFromZip</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">zipBuffer</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Buffer</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="StoryInfo.html" class="tsd-signature-type tsd-kind-interface">StoryInfo</a><span class="tsd-signature-symbol">&gt;</span><a href="#importstoryfromzip-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Reconstructs a story from a previously exported zip archive.</p>
417
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">zipBuffer</span>: <span class="tsd-signature-type">Buffer</span></span><div class="tsd-comment tsd-typography"><p>Raw bytes of the zip file produced by <a href="#exportstorydata" class="tsd-kind-method">exportStoryData</a></p>
418
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="StoryInfo.html" class="tsd-signature-type tsd-kind-interface">StoryInfo</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Story metadata for the newly imported story</p>
419
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2039">server/src/app.service.ts:2039</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="introducecharactertostory"><span>introduce<wbr/>Character<wbr/>To<wbr/>Story</span><a href="#introducecharactertostory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="introducecharactertostory-1"><span class="tsd-kind-call-signature">introduceCharacterToStory</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">name</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">description</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">storyModel</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">fromNarratorSuggestion</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#introducecharactertostory-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Adds a new AI character to an existing story.</p>
420
+ <p>Creates a character agent and integrates it into the story's room.
421
+ The character profile is generated by the AI based on the provided description.</p>
422
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">storyId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The story's ID</p>
423
+ </div></li><li><span><span class="tsd-kind-parameter">name</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The character's name</p>
424
+ </div></li><li><span><span class="tsd-kind-parameter">description</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Brief description of the character's personality and role</p>
425
+ </div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">storyModel</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Optional model override from <code>story_models.json</code></p>
426
+ </div></li><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">fromNarratorSuggestion</span>: <span class="tsd-signature-type">boolean</span></span><div class="tsd-comment tsd-typography"><p>Set <code>true</code> when adding a character the narrator suggested. Default <code>false</code>.</p>
427
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2358">server/src/app.service.ts:2358</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="listagentartifacts"><span>list<wbr/>Agent<wbr/>Artifacts</span><a href="#listagentartifacts" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="listagentartifacts-1"><span class="tsd-kind-call-signature">listAgentArtifacts</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">agentId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="ArtifactMetadata.html" class="tsd-signature-type tsd-kind-interface">ArtifactMetadata</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><a href="#listagentartifacts-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns metadata for all artifacts currently attached to an agent.</p>
428
+ <p>Attached artifacts are included in the agent's context on every prompt, allowing
429
+ the agent to reference their content. Use <a href="#attachartifacttoagent" class="tsd-kind-method">attachArtifactToAgent</a> and
430
+ <a href="#detachartifactfromagent" class="tsd-kind-method">detachArtifactFromAgent</a> to manage attachments.</p>
431
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">agentId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The agent's ID</p>
432
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="ArtifactMetadata.html" class="tsd-signature-type tsd-kind-interface">ArtifactMetadata</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Array of artifact metadata objects for the agent's attached artifacts</p>
433
+ <div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-19">Throws<a href="#throws-19" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If no agent with the given ID exists</p>
434
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2918">server/src/app.service.ts:2918</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="listagents"><span>list<wbr/>Agents</span><a href="#listagents" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="listagents-1"><span class="tsd-kind-call-signature">listAgents</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="AgentInfo.html" class="tsd-signature-type tsd-kind-interface">AgentInfo</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><a href="#listagents-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Lists all top-level agents belonging to this user.</p>
435
+ <p>Agents that are owned by a room or story are excluded — use
436
+ <a href="#getroomdetails" class="tsd-kind-method">getRoomDetails</a> or story methods to access those agents.</p>
437
+ </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="AgentInfo.html" class="tsd-signature-type tsd-kind-interface">AgentInfo</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Array of agent metadata objects</p>
438
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L564">server/src/app.service.ts:564</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="listaimodels"><span>list<wbr/>Ai<wbr/>Models</span><a href="#listaimodels" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="listaimodels-1"><span class="tsd-kind-call-signature">listAiModels</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">aiServiceName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="ModelInfo.html" class="tsd-signature-type tsd-kind-interface">ModelInfo</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><a href="#listaimodels-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Fetches available models from the specified AI service provider.</p>
439
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">aiServiceName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Provider name as returned by <a href="#getaiservicenames" class="tsd-kind-method">getAiServiceNames</a></p>
440
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="ModelInfo.html" class="tsd-signature-type tsd-kind-interface">ModelInfo</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Array of model descriptors including name, description, and service</p>
441
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L112">server/src/app.service.ts:112</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="listattachedfiles"><span>list<wbr/>Attached<wbr/>Files</span><a href="#listattachedfiles" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="listattachedfiles-1"><span class="tsd-kind-call-signature">listAttachedFiles</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">agentId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="FileList.html" class="tsd-signature-type tsd-kind-interface">FileList</a><span class="tsd-signature-symbol">&gt;</span><a href="#listattachedfiles-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Lists the files currently attached to an agent.</p>
442
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">agentId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The agent's ID</p>
443
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="FileList.html" class="tsd-signature-type tsd-kind-interface">FileList</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Object with a <code>files</code> array of file names. Returns <code>{ files: [] }</code> if the agent is not found.</p>
444
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L1729">server/src/app.service.ts:1729</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="listchapters"><span>list<wbr/>Chapters</span><a href="#listchapters" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="listchapters-1"><span class="tsd-kind-call-signature">listChapters</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">chapters</span><span class="tsd-signature-symbol">:</span> <a href="ChapterInfo.html" class="tsd-signature-type tsd-kind-interface">ChapterInfo</a><span class="tsd-signature-symbol">[]</span> <span class="tsd-signature-symbol">}</span><a href="#listchapters-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns all chapter checkpoints for a story.</p>
445
+ <p>Chapters are created by <a href="#progressstory" class="tsd-kind-method">progressStory</a> and can be read with <a href="#getchapter" class="tsd-kind-method">getChapter</a>.</p>
446
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">storyId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The story's ID</p>
447
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">chapters</span><span class="tsd-signature-symbol">:</span> <a href="ChapterInfo.html" class="tsd-signature-type tsd-kind-interface">ChapterInfo</a><span class="tsd-signature-symbol">[]</span> <span class="tsd-signature-symbol">}</span></h4><p>Object with a <code>chapters</code> array of chapter info objects</p>
448
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2401">server/src/app.service.ts:2401</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="listcharacters"><span>list<wbr/>Characters</span><a href="#listcharacters" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="listcharacters-1"><span class="tsd-kind-call-signature">listCharacters</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="Character.html" class="tsd-signature-type tsd-kind-interface">Character</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><a href="#listcharacters-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns all current characters in a story.</p>
449
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">storyId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The story's ID</p>
450
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="Character.html" class="tsd-signature-type tsd-kind-interface">Character</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Array of character objects (derived from the story's room agents)</p>
451
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2452">server/src/app.service.ts:2452</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="listimagemodels"><span>list<wbr/>Image<wbr/>Models</span><a href="#listimagemodels" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="listimagemodels-1"><span class="tsd-kind-call-signature">listImageModels</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="ModelInfo.html" class="tsd-signature-type tsd-kind-interface">ModelInfo</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><a href="#listimagemodels-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns models available for image generation, as configured in
452
+ <code>common/config/image_models.json</code>.</p>
453
+ </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="ModelInfo.html" class="tsd-signature-type tsd-kind-interface">ModelInfo</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Array of model descriptors. Returns an empty array if the config file is missing.</p>
454
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L123">server/src/app.service.ts:123</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="listpromptfiles"><span>list<wbr/>Prompt<wbr/>Files</span><a href="#listpromptfiles" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="listpromptfiles-1"><span class="tsd-kind-call-signature">listPromptFiles</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">folderName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="FileList.html" class="tsd-signature-type tsd-kind-interface">FileList</a><a href="#listpromptfiles-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the names of all prompt files in a folder, merged from both the common
455
+ and user prompt directories.</p>
456
+ <p>Pass <code>'shared'</code> as <code>folderName</code> to list files in the root prompts directory.
457
+ Files that exist in both directories appear once in the result.</p>
458
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">folderName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Folder to list, or <code>'shared'</code> for the root prompts directory</p>
459
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="FileList.html" class="tsd-signature-type tsd-kind-interface">FileList</a></h4><p>Object with a <code>files</code> array of base names (no extension), sorted alphabetically</p>
460
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L1340">server/src/app.service.ts:1340</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="listpromptfileswithscope"><span>list<wbr/>Prompt<wbr/>Files<wbr/>With<wbr/>Scope</span><a href="#listpromptfileswithscope" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="listpromptfileswithscope-1"><span class="tsd-kind-call-signature">listPromptFilesWithScope</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">folderName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="PromptFilesResponse.html" class="tsd-signature-type tsd-kind-interface">PromptFilesResponse</a><a href="#listpromptfileswithscope-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns prompt file names in a folder annotated with their origin scope.</p>
461
+ <p>When the same file name exists in both the common and user directories,
462
+ the user copy wins and the entry is reported as <code>scope: 'user'</code>.
463
+ Pass <code>'shared'</code> as <code>folderName</code> to list files in the root prompts directory.</p>
464
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">folderName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Folder to list, or <code>'shared'</code> for the root prompts directory</p>
465
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="PromptFilesResponse.html" class="tsd-signature-type tsd-kind-interface">PromptFilesResponse</a></h4><p>Object with a <code>files</code> array of <code>{ name, scope }</code> entries, sorted alphabetically</p>
466
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L1391">server/src/app.service.ts:1391</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="listpromptfolders"><span>list<wbr/>Prompt<wbr/>Folders</span><a href="#listpromptfolders" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="listpromptfolders-1"><span class="tsd-kind-call-signature">listPromptFolders</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><a href="#listpromptfolders-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the union of prompt folder names from both the common and user prompt directories.</p>
467
+ <p>Use this to discover available prompt folders before calling <a href="#listpromptfiles" class="tsd-kind-method">listPromptFiles</a>.
468
+ If a folder exists in both directories it appears once in the result.</p>
469
+ </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h4><p>Sorted array of folder names</p>
470
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L417">server/src/app.service.ts:417</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="listpromptfolderswithscope"><span>list<wbr/>Prompt<wbr/>Folders<wbr/>With<wbr/>Scope</span><a href="#listpromptfolderswithscope" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="listpromptfolderswithscope-1"><span class="tsd-kind-call-signature">listPromptFoldersWithScope</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">scope</span><span class="tsd-signature-symbol">?:</span> <a href="../types/PromptScope.html" class="tsd-signature-type tsd-kind-type-alias">PromptScope</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="PromptFoldersResponse.html" class="tsd-signature-type tsd-kind-interface">PromptFoldersResponse</a><a href="#listpromptfolderswithscope-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns prompt folder names annotated with their origin scope (<code>'common'</code> or <code>'user'</code>).</p>
471
+ <p>When the same folder name exists in both directories, the user copy wins and the
472
+ entry is reported as <code>scope: 'user'</code>.</p>
473
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><code class="tsd-tag">Optional</code><span class="tsd-kind-parameter">scope</span>: <a href="../types/PromptScope.html" class="tsd-signature-type tsd-kind-type-alias">PromptScope</a></span><div class="tsd-comment tsd-typography"><p>Optional filter: <code>'common'</code> returns only system-provided folders,
474
+ <code>'user'</code> returns only user-created folders, omit to return all</p>
475
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="PromptFoldersResponse.html" class="tsd-signature-type tsd-kind-interface">PromptFoldersResponse</a></h4><p>Object with a <code>folders</code> array of <code>{ name, scope }</code> entries, sorted by name</p>
476
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L449">server/src/app.service.ts:449</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="listprompts"><span>list<wbr/>Prompts</span><a href="#listprompts" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="listprompts-1"><span class="tsd-kind-call-signature">listPrompts</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">agentId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><a href="#listprompts-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns all prepared prompt template names available to a specific agent.</p>
477
+ <p>Merges prompts from the agent's own prompt folder and the root prompts directory,
478
+ deduplicating across both. These names can be passed to <a href="#runpreparedprompt" class="tsd-kind-method">runPreparedPrompt</a>.</p>
479
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">agentId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The agent's ID</p>
480
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Array of prompt template names (without file extension)</p>
481
+ <div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-20">Throws<a href="#throws-20" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If no agent with the given ID exists</p>
482
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L493">server/src/app.service.ts:493</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="listpublishedagents"><span>list<wbr/>Published<wbr/>Agents</span><a href="#listpublishedagents" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="listpublishedagents-1"><span class="tsd-kind-call-signature">listPublishedAgents</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="AgentInfo.html" class="tsd-signature-type tsd-kind-interface">AgentInfo</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><a href="#listpublishedagents-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Lists all published agent instances belonging to this user.</p>
483
+ <p>Published agents are clones of template agents that are accessible
484
+ via the public API (e.g. for end-users to chat with). Agents owned
485
+ by rooms are excluded from this list.</p>
486
+ </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="AgentInfo.html" class="tsd-signature-type tsd-kind-interface">AgentInfo</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Array of agent metadata objects for all published instances</p>
487
+ <div class="tsd-comment tsd-typography"><div class="tsd-tag-see"><h4 class="tsd-anchor-link" id="see-3">See<a href="#see-3" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p><a href="#publishagentinstance" class="tsd-kind-method">publishAgentInstance</a></p>
488
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L1113">server/src/app.service.ts:1113</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="listrooms"><span>list<wbr/>Rooms</span><a href="#listrooms" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="listrooms-1"><span class="tsd-kind-call-signature">listRooms</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="RoomInfo.html" class="tsd-signature-type tsd-kind-interface">RoomInfo</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><a href="#listrooms-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Lists all rooms belonging to this user.</p>
489
+ </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="RoomInfo.html" class="tsd-signature-type tsd-kind-interface">RoomInfo</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Array of room summary objects (id, name, goal, agent count)</p>
490
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L742">server/src/app.service.ts:742</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="liststories"><span>list<wbr/>Stories</span><a href="#liststories" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="liststories-1"><span class="tsd-kind-call-signature">listStories</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <a href="StoryInfo.html" class="tsd-signature-type tsd-kind-interface">StoryInfo</a><span class="tsd-signature-symbol">[]</span><a href="#liststories-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Lists all stories belonging to this user.</p>
491
+ </div><h4 class="tsd-returns-title">Returns <a href="StoryInfo.html" class="tsd-signature-type tsd-kind-interface">StoryInfo</a><span class="tsd-signature-symbol">[]</span></h4><p>Array of story metadata objects</p>
492
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2216">server/src/app.service.ts:2216</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="liststoryartifacts"><span>list<wbr/>Story<wbr/>Artifacts</span><a href="#liststoryartifacts" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="liststoryartifacts-1"><span class="tsd-kind-call-signature">listStoryArtifacts</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <a href="ArtifactMetadata.html" class="tsd-signature-type tsd-kind-interface">ArtifactMetadata</a><span class="tsd-signature-symbol">[]</span><a href="#liststoryartifacts-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns all artifacts associated with a story.</p>
493
+ <p>Story artifacts include the plot plan and any documents published by agents
494
+ during the narrative.</p>
495
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">storyId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The story's ID</p>
496
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <a href="ArtifactMetadata.html" class="tsd-signature-type tsd-kind-interface">ArtifactMetadata</a><span class="tsd-signature-symbol">[]</span></h4><p>Array of artifact metadata objects</p>
497
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2890">server/src/app.service.ts:2890</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="liststorygenres"><span>list<wbr/>Story<wbr/>Genres</span><a href="#liststorygenres" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="liststorygenres-1"><span class="tsd-kind-call-signature">listStoryGenres</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><a href="#liststorygenres-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns the available story genre names.</p>
498
+ <p>Genres are read from <code>common/story_ideas/</code> — each <code>.json</code> file corresponds to a genre.
499
+ Pass a genre name to <a href="#getrandomstoryideabygenre" class="tsd-kind-method">getRandomStoryIdeaByGenre</a> to get a story idea.</p>
500
+ </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h4><p>Array of genre names (e.g. <code>['fantasy', 'sci-fi', 'mystery']</code>)</p>
501
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L163">server/src/app.service.ts:163</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="liststorymodels"><span>list<wbr/>Story<wbr/>Models</span><a href="#liststorymodels" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="liststorymodels-1"><span class="tsd-kind-call-signature">listStoryModels</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="ModelInfo.html" class="tsd-signature-type tsd-kind-interface">ModelInfo</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span><a href="#liststorymodels-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns models available for story generation, as configured in
502
+ <code>common/config/story_models.json</code>.</p>
503
+ </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="ModelInfo.html" class="tsd-signature-type tsd-kind-interface">ModelInfo</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Array of model descriptors. Returns an empty array if the config file is missing.</p>
504
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L142">server/src/app.service.ts:142</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="listuserartifacts"><span>list<wbr/>User<wbr/>Artifacts</span><a href="#listuserartifacts" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="listuserartifacts-1"><span class="tsd-kind-call-signature">listUserArtifacts</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <a href="ArtifactMetadata.html" class="tsd-signature-type tsd-kind-interface">ArtifactMetadata</a><span class="tsd-signature-symbol">[]</span><a href="#listuserartifacts-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Returns metadata for all artifacts owned by this user.</p>
505
+ <p>Artifacts are persistent named documents that can be attached to agents
506
+ (see <a href="#attachartifacttoagent" class="tsd-kind-method">attachArtifactToAgent</a>) or shared with rooms via the <code>'publish'</code> action.
507
+ Use <a href="#getuserartifact" class="tsd-kind-method">getUserArtifact</a> to retrieve the actual content.</p>
508
+ </div><h4 class="tsd-returns-title">Returns <a href="ArtifactMetadata.html" class="tsd-signature-type tsd-kind-interface">ArtifactMetadata</a><span class="tsd-signature-symbol">[]</span></h4><p>Array of artifact metadata objects (ID, name, creation date, etc.)</p>
509
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2588">server/src/app.service.ts:2588</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="pauseroom"><span>pause<wbr/>Room</span><a href="#pauseroom" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="pauseroom-1"><span class="tsd-kind-call-signature">pauseRoom</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">roomId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#pauseroom-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Pauses message processing in a room.</p>
510
+ <p>Pending messages remain in the queue. Call <a href="#resumeroom" class="tsd-kind-method">resumeRoom</a> to continue processing.</p>
511
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">roomId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The room's ID</p>
512
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-21">Throws<a href="#throws-21" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If the room does not exist</p>
513
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L963">server/src/app.service.ts:963</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="processtext"><span>process<wbr/>Text</span><a href="#processtext" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="processtext-1"><span class="tsd-kind-call-signature">processText</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">agentId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">text</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="ProcessTextResponse.html" class="tsd-signature-type tsd-kind-interface">ProcessTextResponse</a><span class="tsd-signature-symbol">&gt;</span><a href="#processtext-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Sends a text prompt to an agent and returns its response.</p>
514
+ <p>The exchange is added to the agent's conversation history and persisted to disk.</p>
515
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">agentId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The agent's ID (from <a href="#createagent" class="tsd-kind-method">createAgent</a> or <a href="#listagents" class="tsd-kind-method">listAgents</a>)</p>
516
+ </div></li><li><span><span class="tsd-kind-parameter">text</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The prompt text to send</p>
517
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="ProcessTextResponse.html" class="tsd-signature-type tsd-kind-interface">ProcessTextResponse</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Object containing the agent's reply text (<code>result</code>), the latest formatted
518
+ message, its index in the history, and cumulative token counts and cost</p>
519
+ <div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-22">Throws<a href="#throws-22" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If no agent with the given ID exists</p>
520
+ </div><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example-4">Example<a href="#example-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">result</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">appService</span><span class="hl-1">.</span><span class="hl-0">processText</span><span class="hl-1">(</span><span class="hl-4">agent</span><span class="hl-1">.</span><span class="hl-4">id</span><span class="hl-1">, </span><span class="hl-2">&#39;What is the capital of France?&#39;</span><span class="hl-1">);</span><br/><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-4">result</span><span class="hl-1">.</span><span class="hl-4">result</span><span class="hl-1">); </span><span class="hl-5">// &#39;Paris&#39;</span><br/><span class="hl-4">console</span><span class="hl-1">.</span><span class="hl-0">log</span><span class="hl-1">(</span><span class="hl-4">result</span><span class="hl-1">.</span><span class="hl-4">totalCost</span><span class="hl-1">); </span><span class="hl-5">// e.g. 0.000023</span>
521
+ </code><button type="button">Copy</button></pre>
522
+
523
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L341">server/src/app.service.ts:341</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="progressstory"><span>progress<wbr/>Story</span><a href="#progressstory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="progressstory-1"><span class="tsd-kind-call-signature">progressStory</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">chapterIndex</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span><a href="#progressstory-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Advances the story to the next chapter.</p>
524
+ <p>Creates a checkpoint of the current agent states (used by <a href="#resetstory" class="tsd-kind-method">resetStory</a>
525
+ to restore from chapter 1), then compacts all agent histories.</p>
526
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">storyId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The story's ID</p>
527
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">chapterIndex</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Object with the new <code>chapterIndex</code></p>
528
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2306">server/src/app.service.ts:2306</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="publishagentinstance"><span>publish<wbr/>Agent<wbr/>Instance</span><a href="#publishagentinstance" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="publishagentinstance-1"><span class="tsd-kind-call-signature">publishAgentInstance</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">templateId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">instanceName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">instanceId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">publicUrl</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span><a href="#publishagentinstance-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates a publicly accessible clone of a template agent.</p>
529
+ <p>The new instance is independent of the template's conversation history.
530
+ Multiple instances can be created from a single template. Use
531
+ <a href="#resetpublishedinstance" class="tsd-kind-method">resetPublishedInstance</a> to restore an instance to the template's
532
+ current state.</p>
533
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">templateId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>ID of the template agent to clone</p>
534
+ </div></li><li><span><span class="tsd-kind-parameter">instanceName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Display name for the new instance</p>
535
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">instanceId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">publicUrl</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span> <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Object with the new <code>instanceId</code> and the <code>publicUrl</code> path</p>
536
+ <div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-23">Throws<a href="#throws-23" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If the template agent does not exist</p>
537
+ </div><div class="tsd-tag-see"><h4 class="tsd-anchor-link" id="see-4">See<a href="#see-4" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><ul>
538
+ <li><a href="#getpublishedinstances" class="tsd-kind-method">getPublishedInstances</a></li>
539
+ <li><a href="#resetpublishedinstance" class="tsd-kind-method">resetPublishedInstance</a></li>
540
+ </ul>
541
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L1023">server/src/app.service.ts:1023</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="publishartifact"><span>publish<wbr/>Artifact</span><a href="#publishartifact" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="publishartifact-1"><span class="tsd-kind-call-signature">publishArtifact</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">roomId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">name</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">creator</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">body</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">viewers</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#publishartifact-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Programmatically publishes an artifact to a room.</p>
542
+ <p>This is the imperative equivalent of an agent sending a <code>'publish'</code> action message.
543
+ Agents in the room can read and reference the artifact in subsequent prompts.</p>
544
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">roomId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The room's ID</p>
545
+ </div></li><li><span><span class="tsd-kind-parameter">name</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Artifact name (unique within the room)</p>
546
+ </div></li><li><span><span class="tsd-kind-parameter">creator</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Display name of the creator</p>
547
+ </div></li><li><span><span class="tsd-kind-parameter">body</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The artifact's text content</p>
548
+ </div></li><li><span><span class="tsd-kind-parameter">viewers</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = []</span></span><div class="tsd-comment tsd-typography"><p>Agent names that can view this artifact (empty array = all agents)</p>
549
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-24">Throws<a href="#throws-24" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If the room does not exist</p>
550
+ </div><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-25">Throws<a href="#throws-25" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If <code>name</code> is empty</p>
551
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L1608">server/src/app.service.ts:1608</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="publishroom"><span>publish<wbr/>Room</span><a href="#publishroom" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="publishroom-1"><span class="tsd-kind-call-signature">publishRoom</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">templateId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">publishedName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">userId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span><a href="#publishroom-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Creates a publicly accessible clone of a template room.</p>
552
+ <p>The instance is a full copy of the template including all agents.
553
+ Use <a href="#resetpublishedroominstance" class="tsd-kind-method">resetPublishedRoomInstance</a> to restore it to the template's state.</p>
554
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">templateId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>ID of the template room to clone</p>
555
+ </div></li><li><span><span class="tsd-kind-parameter">publishedName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Display name for the instance (defaults to the template's name)</p>
556
+ </div></li><li><span><span class="tsd-kind-parameter">userId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The owning user's ID (used for public access mapping)</p>
557
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">&gt;</span></h4><p>The new instance's room ID</p>
558
+ <div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-26">Throws<a href="#throws-26" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If the template room does not exist</p>
559
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L1201">server/src/app.service.ts:1201</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="reloadagent"><span>reload<wbr/>Agent</span><a href="#reloadagent" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="reloadagent-1"><span class="tsd-kind-call-signature">reloadAgent</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">agentId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#reloadagent-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Clears an agent's conversation history while preserving its configuration
560
+ and re-attaching any previously uploaded files.</p>
561
+ <p>Useful for starting a fresh conversation without recreating the agent.
562
+ If the history begins with a summary block (from a prior compaction), only
563
+ messages after the summary are cleared.</p>
564
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">agentId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The agent's ID</p>
565
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-27">Throws<a href="#throws-27" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If no agent with the given ID exists</p>
566
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L1825">server/src/app.service.ts:1825</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="renameuserartifact"><span>rename<wbr/>User<wbr/>Artifact</span><a href="#renameuserartifact" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="renameuserartifact-1"><span class="tsd-kind-call-signature">renameUserArtifact</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">artifactId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">newName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><a href="#renameuserartifact-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Changes the display name of an artifact.</p>
567
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">artifactId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The artifact's ID (from <a href="#listuserartifacts" class="tsd-kind-method">listUserArtifacts</a>)</p>
568
+ </div></li><li><span><span class="tsd-kind-parameter">newName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>New display name for the artifact</p>
569
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p><code>true</code> on success, <code>false</code> if no artifact with that ID exists</p>
570
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2856">server/src/app.service.ts:2856</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="resetpublishedinstance"><span>reset<wbr/>Published<wbr/>Instance</span><a href="#resetpublishedinstance" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="resetpublishedinstance-1"><span class="tsd-kind-call-signature">resetPublishedInstance</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">instanceId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#resetpublishedinstance-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Resets a published agent instance to its template's current state.</p>
571
+ <p>Clears the instance's conversation history and regenerates it from
572
+ the template agent. Does not affect the template itself.</p>
573
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">instanceId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>ID of the published instance to reset</p>
574
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-28">Throws<a href="#throws-28" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If the instance does not exist</p>
575
+ </div><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-29">Throws<a href="#throws-29" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If the agent is not a published instance</p>
576
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L1090">server/src/app.service.ts:1090</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="resetpublishedroominstance"><span>reset<wbr/>Published<wbr/>Room<wbr/>Instance</span><a href="#resetpublishedroominstance" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="resetpublishedroominstance-1"><span class="tsd-kind-call-signature">resetPublishedRoomInstance</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">instanceId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#resetpublishedroominstance-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Resets a published room instance to a clean state.</p>
577
+ <p>Clears the instance's messages and artifacts, and resets all of its
578
+ cloned agents to their template state. Does not affect the template room.</p>
579
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">instanceId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>ID of the published room instance to reset</p>
580
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-30">Throws<a href="#throws-30" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If the instance does not exist</p>
581
+ </div><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-31">Throws<a href="#throws-31" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If the room is not a published instance</p>
582
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L1250">server/src/app.service.ts:1250</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="resetroom"><span>reset<wbr/>Room</span><a href="#resetroom" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="resetroom-1"><span class="tsd-kind-call-signature">resetRoom</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">roomId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#resetroom-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Clears a room's message history and artifacts, and resets all member agents.</p>
583
+ <p>Agent configurations (model, prompt, files) are preserved; only conversation
584
+ history and artifacts are removed.</p>
585
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">roomId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The room's ID</p>
586
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-32">Throws<a href="#throws-32" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If the room does not exist</p>
587
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L1867">server/src/app.service.ts:1867</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="resetstory"><span>reset<wbr/>Story</span><a href="#resetstory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="resetstory-1"><span class="tsd-kind-call-signature">resetStory</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#resetstory-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Resets a story to the beginning while preserving artifacts and the opening scene.</p>
588
+ <p>If a chapter 1 backup exists, agents are restored from it; otherwise their
589
+ conversation histories are cleared. The list of declined characters is also cleared.</p>
590
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">storyId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The story's ID</p>
591
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-33">Throws<a href="#throws-33" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If the story or its room does not exist</p>
592
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L1909">server/src/app.service.ts:1909</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="respondtostory"><span>respond<wbr/>To<wbr/>Story</span><a href="#respondtostory" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="respondtostory-1"><span class="tsd-kind-call-signature">respondToStory</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">content</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#respondtostory-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Submits the human player's response to the story.</p>
593
+ <p>Adds the content as a player message and triggers the AI characters
594
+ to continue the narrative.</p>
595
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">storyId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The story's ID</p>
596
+ </div></li><li><span><span class="tsd-kind-parameter">content</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The player's message or action</p>
597
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2342">server/src/app.service.ts:2342</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="resumepausedstories"><span>resume<wbr/>Paused<wbr/>Stories</span><a href="#resumepausedstories" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="resumepausedstories-1"><span class="tsd-kind-call-signature">resumePausedStories</span><span class="tsd-signature-symbol">()</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span><a href="#resumepausedstories-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Resumes any stories that were paused due to insufficient balance.</p>
598
+ <p>Call this after adding balance via <a href="#addbalance" class="tsd-kind-method">addBalance</a> to allow stories that
599
+ stalled mid-processing to continue from where they left off.</p>
600
+ </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span></h4><p>The number of stories that were resumed</p>
601
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2228">server/src/app.service.ts:2228</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="resumeroom"><span>resume<wbr/>Room</span><a href="#resumeroom" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="resumeroom-1"><span class="tsd-kind-call-signature">resumeRoom</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">roomId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#resumeroom-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Resumes message processing in a room that was previously paused.</p>
602
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">roomId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The room's ID</p>
603
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-34">Throws<a href="#throws-34" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If the room does not exist</p>
604
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L977">server/src/app.service.ts:977</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="runpreparedprompt"><span>run<wbr/>Prepared<wbr/>Prompt</span><a href="#runpreparedprompt" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="runpreparedprompt-1"><span class="tsd-kind-call-signature">runPreparedPrompt</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">agentId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">promptName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">variables</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="PreparedPromptResponse.html" class="tsd-signature-type tsd-kind-interface">PreparedPromptResponse</a><span class="tsd-signature-symbol">&gt;</span><a href="#runpreparedprompt-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Executes a named Handlebars prompt template against an agent.</p>
605
+ <p>The template is loaded from the agent's prompt folder (with the standard 4-level
606
+ fallback). <code>variables</code> are substituted into the template before sending.</p>
607
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">agentId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The agent's ID</p>
608
+ </div></li><li><span><span class="tsd-kind-parameter">promptName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Template name returned by <a href="#listprompts" class="tsd-kind-method">listPrompts</a> (without extension)</p>
609
+ </div></li><li><span><span class="tsd-kind-parameter">variables</span>: <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol"> = {}</span></span><div class="tsd-comment tsd-typography"><p>Key-value pairs substituted into the template's <code>{{variable}}</code> placeholders</p>
610
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><a href="PreparedPromptResponse.html" class="tsd-signature-type tsd-kind-interface">PreparedPromptResponse</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Object with a <code>result</code> string containing the agent's response</p>
611
+ <div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-35">Throws<a href="#throws-35" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If no agent with the given ID exists</p>
612
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L536">server/src/app.service.ts:536</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="savechapter"><span>save<wbr/>Chapter</span><a href="#savechapter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="savechapter-1"><span class="tsd-kind-call-signature">saveChapter</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">chapterIndex</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">content</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#savechapter-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Overwrites the content of a chapter checkpoint.</p>
613
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">storyId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The story's ID</p>
614
+ </div></li><li><span><span class="tsd-kind-parameter">chapterIndex</span>: <span class="tsd-signature-type">number</span></span><div class="tsd-comment tsd-typography"><p>The chapter number to overwrite</p>
615
+ </div></li><li><span><span class="tsd-kind-parameter">content</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The new chapter content</p>
616
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-36">Throws<a href="#throws-36" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If the chapter cannot be saved</p>
617
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2425">server/src/app.service.ts:2425</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="savecharacter"><span>save<wbr/>Character</span><a href="#savecharacter" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="savecharacter-1"><span class="tsd-kind-call-signature">saveCharacter</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">characterName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">content</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#savecharacter-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Saves a character's profile markdown.</p>
618
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">storyId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The story's ID</p>
619
+ </div></li><li><span><span class="tsd-kind-parameter">characterName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The character's name</p>
620
+ </div></li><li><span><span class="tsd-kind-parameter">content</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Markdown content for the character profile</p>
621
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2475">server/src/app.service.ts:2475</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="saveplotplan"><span>save<wbr/>Plot<wbr/>Plan</span><a href="#saveplotplan" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="saveplotplan-1"><span class="tsd-kind-call-signature">savePlotPlan</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">storyId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">content</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#saveplotplan-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Saves the story's plot plan.</p>
622
+ <p>Persists the content as a room artifact via the publish mechanism.</p>
623
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">storyId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The story's ID</p>
624
+ </div></li><li><span><span class="tsd-kind-parameter">content</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The plot plan markdown to save</p>
625
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2537">server/src/app.service.ts:2537</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="savepromptfile"><span>save<wbr/>Prompt<wbr/>File</span><a href="#savepromptfile" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="savepromptfile-1"><span class="tsd-kind-call-signature">savePromptFile</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">folderName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">fileName</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">content</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">fileType</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#savepromptfile-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Writes content to a prompt file in the user prompt directory.</p>
626
+ <p>Always saves to the user directory — common prompt files are never overwritten.
627
+ If the target folder does not exist it is created automatically.
628
+ Passing <code>'shared'</code> as <code>folderName</code> writes to the root user prompts directory.</p>
629
+ <p>Special case: passing an empty <code>content</code> for a <code>'json'</code> file deletes the file
630
+ rather than writing an empty document.</p>
631
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">folderName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Prompt folder name, or <code>'shared'</code> for the root user prompts directory</p>
632
+ </div></li><li><span><span class="tsd-kind-parameter">fileName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Base name of the file (without extension)</p>
633
+ </div></li><li><span><span class="tsd-kind-parameter">content</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>File content to write</p>
634
+ </div></li><li><span><span class="tsd-kind-parameter">fileType</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p><code>'prompt'</code> (writes a <code>.prompt</code> file) or <code>'json'</code> (writes a <code>.json</code> file)</p>
635
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L1511">server/src/app.service.ts:1511</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="saveuserpreferences"><span>save<wbr/>User<wbr/>Preferences</span><a href="#saveuserpreferences" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="saveuserpreferences-1"><span class="tsd-kind-call-signature">saveUserPreferences</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">preferences</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">void</span><a href="#saveuserpreferences-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Persists the user's preferences object to disk.</p>
636
+ <p>The shape of <code>preferences</code> is application-defined. Pass any serializable object;
637
+ it will be stored as JSON and returned verbatim by <a href="#getuserpreferences" class="tsd-kind-method">getUserPreferences</a>.</p>
638
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">preferences</span>: <span class="tsd-signature-type">any</span></span><div class="tsd-comment tsd-typography"><p>Serializable preferences object to store</p>
639
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L1325">server/src/app.service.ts:1325</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="sendroommessage"><span>send<wbr/>Room<wbr/>Message</span><a href="#sendroommessage" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="sendroommessage-1"><span class="tsd-kind-call-signature">sendRoomMessage</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">roomId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">content</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">sender</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">action</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">targets</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">clearQueue</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#sendroommessage-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Adds a message to a room's pending queue to be processed by the agents.</p>
640
+ <p><strong>Action values:</strong></p>
641
+ <ul>
642
+ <li><code>'speak'</code> <em>(default)</em> — all agents hear the message; <code>targets</code> (if provided) restricts which agents may respond</li>
643
+ <li><code>'whisper'</code> — only agents listed in <code>targets</code> hear the message</li>
644
+ <li><code>'think'</code> — inaudible; stays only in the sender's history, not shown to other agents</li>
645
+ <li><code>'shout'</code> — overrides all other conversations; all agents hear and respond</li>
646
+ <li><code>'publish'</code> — publishes a new room artifact; <code>content</code> is the artifact body</li>
647
+ <li><code>'adjourn'</code> — signals intent to halt the conversation</li>
648
+ <li><code>'moderate'</code> — routes the message through the room's moderator (story rooms only)</li>
649
+ </ul>
650
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">roomId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The room's ID</p>
651
+ </div></li><li><span><span class="tsd-kind-parameter">content</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The message text (or artifact body when <code>action</code> is <code>'publish'</code>)</p>
652
+ </div></li><li><span><span class="tsd-kind-parameter">sender</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Display name of the sender (e.g. <code>'User'</code>, <code>'System'</code>)</p>
653
+ </div></li><li><span><span class="tsd-kind-parameter">action</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol"> = &#39;moderate&#39;</span></span><div class="tsd-comment tsd-typography"><p>Message action type (default <code>'moderate'</code>)</p>
654
+ </div></li><li><span><span class="tsd-kind-parameter">targets</span>: <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol"> = []</span></span><div class="tsd-comment tsd-typography"><p>Agent names to receive or respond to the message (behavior varies by action)</p>
655
+ </div></li><li><span><span class="tsd-kind-parameter">clearQueue</span>: <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = false</span></span><div class="tsd-comment tsd-typography"><p>If <code>true</code>, clears any pending messages before adding this one. Default <code>false</code>.</p>
656
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-37">Throws<a href="#throws-37" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If the room does not exist</p>
657
+ </div><div class="tsd-tag-example"><h4 class="tsd-anchor-link" id="example-5">Example<a href="#example-5" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><pre><code class="typescript"><span class="hl-5">// Broadcast a message that all agents can respond to</span><br/><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">appService</span><span class="hl-1">.</span><span class="hl-0">sendRoomMessage</span><span class="hl-1">(</span><span class="hl-4">roomId</span><span class="hl-1">, </span><span class="hl-2">&#39;Hello everyone!&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;User&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;speak&#39;</span><span class="hl-1">);</span><br/><br/><span class="hl-5">// Whisper to a specific agent</span><br/><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">appService</span><span class="hl-1">.</span><span class="hl-0">sendRoomMessage</span><span class="hl-1">(</span><span class="hl-4">roomId</span><span class="hl-1">, </span><span class="hl-2">&#39;Just between us...&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;User&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;whisper&#39;</span><span class="hl-1">, [</span><span class="hl-2">&#39;James&#39;</span><span class="hl-1">]);</span>
658
+ </code><button type="button">Copy</button></pre>
659
+
660
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L919">server/src/app.service.ts:919</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="updateagent"><span>update<wbr/>Agent</span><a href="#updateagent" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="updateagent-1"><span class="tsd-kind-call-signature">updateAgent</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">agentId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span><br/>    <span class="tsd-kind-parameter">updates</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span><br/>        <span class="tsd-kind-property">agentNickname</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">allowSearch</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">beginInstruction</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">description</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">isControlledByHuman</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">maxOutputTokens</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">modelName</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>        <span class="tsd-kind-property">reasoningEffort</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">&quot;low&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;medium&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;high&quot;</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-signature-symbol">}</span><span class="tsd-signature-symbol">,</span><br/><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span><a href="#updateagent-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Updates one or more properties of an existing agent and persists the changes.</p>
661
+ <p>Only fields that are present in the <code>updates</code> object are changed;
662
+ omitted fields are left as-is.</p>
663
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">agentId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The agent's ID</p>
664
+ </div></li><li><span><span class="tsd-kind-parameter">updates</span>: <span class="tsd-signature-symbol">{</span><br/>    <span class="tsd-kind-property">agentNickname</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">allowSearch</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">beginInstruction</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">description</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">isControlledByHuman</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">maxOutputTokens</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">modelName</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span><br/>    <span class="tsd-kind-property">reasoningEffort</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">&quot;low&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;medium&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;high&quot;</span><span class="tsd-signature-symbol">;</span><br/><span class="tsd-signature-symbol">}</span></span><div class="tsd-comment tsd-typography"><p>Fields to update:</p>
665
+ <ul>
666
+ <li><code>agentNickname</code> — short display name</li>
667
+ <li><code>description</code> — role or personality description</li>
668
+ <li><code>modelName</code> — model identifier (e.g. <code>'claude-haiku-4-5'</code>)</li>
669
+ <li><code>reasoningEffort</code> — <code>'low' | 'medium' | 'high' | null</code></li>
670
+ <li><code>isControlledByHuman</code> — whether a human drives this agent's responses</li>
671
+ <li><code>maxOutputTokens</code> — override the model's default output token limit</li>
672
+ <li><code>allowSearch</code> — enable web search capability (provider must support it)</li>
673
+ <li><code>beginInstruction</code> — prompt sent when the host app triggers a &quot;Begin&quot; action</li>
674
+ </ul>
675
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">Promise</span><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">void</span><span class="tsd-signature-symbol">&gt;</span></h4><div class="tsd-comment tsd-typography"><div class="tsd-tag-throws"><h4 class="tsd-anchor-link" id="throws-38">Throws<a href="#throws-38" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h4><p>If no agent with the given ID exists</p>
676
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L1690">server/src/app.service.ts:1690</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="updateuserartifact"><span>update<wbr/>User<wbr/>Artifact</span><a href="#updateuserartifact" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></h3><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="updateuserartifact-1"><span class="tsd-kind-call-signature">updateUserArtifact</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">artifactId</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">content</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><a href="#updateuserartifact-1" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Replaces the content of an existing artifact.</p>
677
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">artifactId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The artifact's ID (from <a href="#listuserartifacts" class="tsd-kind-method">listUserArtifacts</a>)</p>
678
+ </div></li><li><span><span class="tsd-kind-parameter">content</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>New content to write</p>
679
+ </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4><p><code>true</code> on success, <code>false</code> if no artifact with that ID exists</p>
680
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2626">server/src/app.service.ts:2626</a></li></ul></aside></div></li></ul></section></section></details></div><div class="col-sidebar"><div class="page-menu"><div class="tsd-navigation settings"><details class="tsd-accordion"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>Settings</h3></summary><div class="tsd-accordion-details"><div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span><ul id="tsd-filter-options"><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-protected" name="protected"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Protected</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-inherited" name="inherited" checked/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>Inherited</span></label></li><li class="tsd-filter-item"><label class="tsd-filter-input"><input type="checkbox" id="tsd-filter-external" name="external"/><svg width="32" height="32" viewBox="0 0 32 32" aria-hidden="true"><rect class="tsd-checkbox-background" width="30" height="30" x="1" y="1" rx="6" fill="none"></rect><path class="tsd-checkbox-checkmark" d="M8.35422 16.8214L13.2143 21.75L24.6458 10.25" stroke="none" stroke-width="3.5" stroke-linejoin="round" fill="none"></path></svg><span>External</span></label></li></ul></div><div class="tsd-theme-toggle"><label class="settings-label" for="tsd-theme">Theme</label><select id="tsd-theme"><option value="os">OS</option><option value="light">Light</option><option value="dark">Dark</option></select></div></div></details></div><details open class="tsd-accordion tsd-page-navigation"><summary class="tsd-accordion-summary"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg><h3>On This Page</h3></summary><div class="tsd-accordion-details"><details open class="tsd-accordion tsd-page-navigation-section"><summary class="tsd-accordion-summary" data-key="section-Methods"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" aria-hidden="true"><use href="../assets/icons.svg#icon-chevronDown"></use></svg>Methods</summary><div><a href="#addbalance"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>add<wbr/>Balance</span></a><a href="#attachartifacttoagent"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>attach<wbr/>Artifact<wbr/>To<wbr/>Agent</span></a><a href="#attachdocument"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>attach<wbr/>Document</span></a><a href="#compactstory"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>compact<wbr/>Story</span></a><a href="#convertuserartifact"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>convert<wbr/>User<wbr/>Artifact</span></a><a href="#createagent"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>create<wbr/>Agent</span></a><a href="#createpromptfolder"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>create<wbr/>Prompt<wbr/>Folder</span></a><a href="#createroom"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>create<wbr/>Room</span></a><a href="#createstory"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>create<wbr/>Story</span></a><a href="#createuserartifact"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>create<wbr/>User<wbr/>Artifact</span></a><a href="#declinecharacter"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>decline<wbr/>Character</span></a><a href="#deleteagent"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>delete<wbr/>Agent</span></a><a href="#deleteattachedfile"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>delete<wbr/>Attached<wbr/>File</span></a><a href="#deleteattachedfilebyid"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>delete<wbr/>Attached<wbr/>File<wbr/>By<wbr/>Id</span></a><a href="#deletechapter"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>delete<wbr/>Chapter</span></a><a href="#deletecharacterfromstory"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>delete<wbr/>Character<wbr/>From<wbr/>Story</span></a><a href="#deletepromptfile"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>delete<wbr/>Prompt<wbr/>File</span></a><a href="#deletepromptfolder"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>delete<wbr/>Prompt<wbr/>Folder</span></a><a href="#deleteroom"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>delete<wbr/>Room</span></a><a href="#deletestory"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>delete<wbr/>Story</span></a><a href="#deleteuserartifact"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>delete<wbr/>User<wbr/>Artifact</span></a><a href="#detachartifactfromagent"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>detach<wbr/>Artifact<wbr/>From<wbr/>Agent</span></a><a href="#downloadstorymarkdown"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>download<wbr/>Story<wbr/>Markdown</span></a><a href="#editroom"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>edit<wbr/>Room</span></a><a href="#ensureagentstatecallback"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>ensure<wbr/>Agent<wbr/>State<wbr/>Callback</span></a><a href="#ensureroomstatecallback"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>ensure<wbr/>Room<wbr/>State<wbr/>Callback</span></a><a href="#exportstorydata"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>export<wbr/>Story<wbr/>Data</span></a><a href="#getagentdetails"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Agent<wbr/>Details</span></a><a href="#getagenthistory"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Agent<wbr/>History</span></a><a href="#getagentmessageemitter"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Agent<wbr/>Message<wbr/>Emitter</span></a><a href="#getagentmessages"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Agent<wbr/>Messages</span></a><a href="#getaiservicefromservicename"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Ai<wbr/>Service<wbr/>From<wbr/>Service<wbr/>Name</span></a><a href="#getaiservicenames"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Ai<wbr/>Service<wbr/>Names</span></a><a href="#getbalance"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Balance</span></a><a href="#getbalancemessageemitter"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Balance<wbr/>Message<wbr/>Emitter</span></a><a href="#getchapter"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Chapter</span></a><a href="#getcharacter"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Character</span></a><a href="#getplotplan"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Plot<wbr/>Plan</span></a><a href="#getpromptfile"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Prompt<wbr/>File</span></a><a href="#getpublishedinstances"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Published<wbr/>Instances</span></a><a href="#getpublishedroominstances"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Published<wbr/>Room<wbr/>Instances</span></a><a href="#getrandomstoryidea"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Random<wbr/>Story<wbr/>Idea</span></a><a href="#getrandomstoryideabygenre"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Random<wbr/>Story<wbr/>Idea<wbr/>By<wbr/>Genre</span></a><a href="#getroomartifacts"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Room<wbr/>Artifacts</span></a><a href="#getroombyid"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Room<wbr/>By<wbr/>Id</span></a><a href="#getroomdetails"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Room<wbr/>Details</span></a><a href="#getroommessageemitter"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Room<wbr/>Message<wbr/>Emitter</span></a><a href="#getroommessages"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Room<wbr/>Messages</span></a><a href="#getstoryartifact"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Story<wbr/>Artifact</span></a><a href="#getstoryinfo"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Story<wbr/>Info</span></a><a href="#getstorymessageemitter"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Story<wbr/>Message<wbr/>Emitter</span></a><a href="#getstorymessages"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Story<wbr/>Messages</span></a><a href="#getstoryprogressemitter"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Story<wbr/>Progress<wbr/>Emitter</span></a><a href="#getstorystate"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Story<wbr/>State</span></a><a href="#gettransactionservice"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>Transaction<wbr/>Service</span></a><a href="#getuserartifact"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>User<wbr/>Artifact</span></a><a href="#getuserpreferences"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>get<wbr/>User<wbr/>Preferences</span></a><a href="#importstoryfromzip"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>import<wbr/>Story<wbr/>From<wbr/>Zip</span></a><a href="#introducecharactertostory"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>introduce<wbr/>Character<wbr/>To<wbr/>Story</span></a><a href="#listagentartifacts"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Agent<wbr/>Artifacts</span></a><a href="#listagents"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Agents</span></a><a href="#listaimodels"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Ai<wbr/>Models</span></a><a href="#listattachedfiles"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Attached<wbr/>Files</span></a><a href="#listchapters"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Chapters</span></a><a href="#listcharacters"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Characters</span></a><a href="#listimagemodels"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Image<wbr/>Models</span></a><a href="#listpromptfiles"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Prompt<wbr/>Files</span></a><a href="#listpromptfileswithscope"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Prompt<wbr/>Files<wbr/>With<wbr/>Scope</span></a><a href="#listpromptfolders"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Prompt<wbr/>Folders</span></a><a href="#listpromptfolderswithscope"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Prompt<wbr/>Folders<wbr/>With<wbr/>Scope</span></a><a href="#listprompts"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Prompts</span></a><a href="#listpublishedagents"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Published<wbr/>Agents</span></a><a href="#listrooms"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Rooms</span></a><a href="#liststories"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Stories</span></a><a href="#liststoryartifacts"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Story<wbr/>Artifacts</span></a><a href="#liststorygenres"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Story<wbr/>Genres</span></a><a href="#liststorymodels"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>Story<wbr/>Models</span></a><a href="#listuserartifacts"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>list<wbr/>User<wbr/>Artifacts</span></a><a href="#pauseroom"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>pause<wbr/>Room</span></a><a href="#processtext"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>process<wbr/>Text</span></a><a href="#progressstory"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>progress<wbr/>Story</span></a><a href="#publishagentinstance"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>publish<wbr/>Agent<wbr/>Instance</span></a><a href="#publishartifact"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>publish<wbr/>Artifact</span></a><a href="#publishroom"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>publish<wbr/>Room</span></a><a href="#reloadagent"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>reload<wbr/>Agent</span></a><a href="#renameuserartifact"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>rename<wbr/>User<wbr/>Artifact</span></a><a href="#resetpublishedinstance"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>reset<wbr/>Published<wbr/>Instance</span></a><a href="#resetpublishedroominstance"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>reset<wbr/>Published<wbr/>Room<wbr/>Instance</span></a><a href="#resetroom"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>reset<wbr/>Room</span></a><a href="#resetstory"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>reset<wbr/>Story</span></a><a href="#respondtostory"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>respond<wbr/>To<wbr/>Story</span></a><a href="#resumepausedstories"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>resume<wbr/>Paused<wbr/>Stories</span></a><a href="#resumeroom"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>resume<wbr/>Room</span></a><a href="#runpreparedprompt"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>run<wbr/>Prepared<wbr/>Prompt</span></a><a href="#savechapter"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>save<wbr/>Chapter</span></a><a href="#savecharacter"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>save<wbr/>Character</span></a><a href="#saveplotplan"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>save<wbr/>Plot<wbr/>Plan</span></a><a href="#savepromptfile"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>save<wbr/>Prompt<wbr/>File</span></a><a href="#saveuserpreferences"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>save<wbr/>User<wbr/>Preferences</span></a><a href="#sendroommessage"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>send<wbr/>Room<wbr/>Message</span></a><a href="#updateagent"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>update<wbr/>Agent</span></a><a href="#updateuserartifact"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>update<wbr/>User<wbr/>Artifact</span></a></div></details></div></details></div><div class="site-menu"><nav id="tsd-sidebar-links" class="tsd-navigation"><a href="https://github.com/your-org/briyah" class="tsd-nav-link">GitHub</a><a href="https://www.npmjs.com/package/briyah" class="tsd-nav-link">npm</a></nav><nav class="tsd-navigation"><a href="../modules.html">Briyah SDK - v1.0.8</a><ul class="tsd-small-nested-navigation" id="tsd-nav-container"><li>Loading...</li></ul></nav></div></div></div><footer><p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer><div class="overlay"></div></body></html>