briyah 1.0.9 → 1.1.1

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 (242) hide show
  1. package/README.md +112 -1
  2. package/data/common/config/markup +1 -0
  3. package/data/common/config/model_prices.json +5153 -3680
  4. package/data/common/config/story_models.json +10 -2
  5. package/data/common/config/story_models_full.json +2 -2
  6. package/data/common/prompts/compact_agent.prompt +16 -0
  7. package/data/common/prompts/narrator/perceive.prompt +30 -28
  8. package/data/common/prompts/story_moderator/moderate.prompt +12 -8
  9. package/{dist → dist-sdk}/server/src/ai/LLM/anthropic.service.js +22 -12
  10. package/{dist → dist-sdk}/server/src/ai/LLM/base-ai.service.d.ts +1 -0
  11. package/{dist → dist-sdk}/server/src/ai/LLM/base-ai.service.js +8 -0
  12. package/{dist → dist-sdk}/server/src/ai/LLM/deepseek.service.d.ts +1 -0
  13. package/{dist → dist-sdk}/server/src/ai/LLM/deepseek.service.js +3 -0
  14. package/{dist → dist-sdk}/server/src/ai/LLM/fal.service.d.ts +1 -0
  15. package/{dist → dist-sdk}/server/src/ai/LLM/fal.service.js +3 -0
  16. package/{dist → dist-sdk}/server/src/ai/LLM/grok.service.d.ts +1 -0
  17. package/{dist → dist-sdk}/server/src/ai/LLM/grok.service.js +3 -0
  18. package/{dist → dist-sdk}/server/src/ai/LLM/together.service.d.ts +1 -0
  19. package/{dist → dist-sdk}/server/src/ai/LLM/together.service.js +3 -0
  20. package/{dist → dist-sdk}/server/src/ai/agent.d.ts +7 -0
  21. package/{dist → dist-sdk}/server/src/ai/agent.js +32 -0
  22. package/dist-sdk/server/src/ai/model_prices.d.ts +3 -0
  23. package/{dist → dist-sdk}/server/src/ai/model_prices.js +19 -1
  24. package/{dist → dist-sdk}/server/src/ai/published-agents.service.js +1 -1
  25. package/{dist → dist-sdk}/server/src/app/stripe.controller.d.ts +3 -0
  26. package/{dist → dist-sdk}/server/src/app/stripe.controller.js +16 -6
  27. package/{dist → dist-sdk}/server/src/app/stripe.service.d.ts +6 -3
  28. package/{dist → dist-sdk}/server/src/app/stripe.service.js +23 -9
  29. package/{dist → dist-sdk}/server/src/app/transaction.service.d.ts +3 -3
  30. package/{dist → dist-sdk}/server/src/app/transaction.service.js +11 -11
  31. package/{dist → dist-sdk}/server/src/app.controller.d.ts +1 -0
  32. package/{dist → dist-sdk}/server/src/app.controller.js +49 -2
  33. package/{dist → dist-sdk}/server/src/app.service.d.ts +6 -2
  34. package/{dist → dist-sdk}/server/src/app.service.js +18 -2
  35. package/{dist → dist-sdk}/server/src/auth/users.service.js +1 -1
  36. package/{dist → dist-sdk}/server/src/config/configuration.service.js +1 -1
  37. package/{dist → dist-sdk}/server/src/room/published-rooms.service.js +1 -1
  38. package/{dist → dist-sdk}/server/src/room/room.js +1 -0
  39. package/{dist → dist-sdk}/server/src/sdk/briyah-config.js +2 -2
  40. package/{dist → dist-sdk}/server/src/sdk/briyah.js +2 -2
  41. package/{dist → dist-sdk}/server/src/sdk/index.d.ts +1 -1
  42. package/{dist → dist-sdk}/server/src/story/story-message.service.d.ts +4 -2
  43. package/{dist → dist-sdk}/server/src/story/story-message.service.js +29 -18
  44. package/{dist → dist-sdk}/server/src/story/story.service.d.ts +1 -1
  45. package/{dist → dist-sdk}/server/src/story/story.service.js +106 -95
  46. package/{dist → dist-sdk}/shared/types/app.types.d.ts +18 -11
  47. package/docs/assets/hierarchy.js +1 -1
  48. package/docs/assets/navigation.js +1 -1
  49. package/docs/assets/search.js +1 -1
  50. package/docs/classes/Agent.html +18 -13
  51. package/docs/classes/Briyah.html +12 -12
  52. package/docs/classes/BriyahConfigService.html +5 -5
  53. package/docs/classes/Room.html +23 -23
  54. package/docs/classes/RoomMessage.html +10 -10
  55. package/docs/enums/MessageAction.html +3 -3
  56. package/docs/hierarchy.html +1 -1
  57. package/docs/index.html +18 -4
  58. package/docs/interfaces/AgentInfo.html +2 -2
  59. package/docs/interfaces/AgentMessagesResponse.html +2 -2
  60. package/docs/interfaces/AppService.html +204 -162
  61. package/docs/interfaces/Artifact.html +3 -3
  62. package/docs/interfaces/ArtifactMetadata.html +2 -2
  63. package/docs/interfaces/AttachDocumentResponse.html +2 -2
  64. package/docs/interfaces/BriyahConfigOptions.html +6 -6
  65. package/docs/interfaces/ChapterInfo.html +2 -2
  66. package/docs/interfaces/Character.html +2 -2
  67. package/docs/interfaces/CreateAgentResponse.html +2 -2
  68. package/docs/interfaces/CreateRoomResponse.html +2 -2
  69. package/docs/interfaces/CreateStoryResponse.html +2 -2
  70. package/docs/interfaces/FileList.html +2 -2
  71. package/docs/interfaces/LoggingOptions.html +5 -5
  72. package/docs/interfaces/Message.html +2 -2
  73. package/docs/interfaces/ModelInfo.html +2 -2
  74. package/docs/interfaces/PreparedPromptResponse.html +2 -2
  75. package/docs/interfaces/ProcessTextResponse.html +2 -2
  76. package/docs/interfaces/PromptFile.html +2 -2
  77. package/docs/interfaces/PromptFileContent.html +2 -2
  78. package/docs/interfaces/PromptFilesResponse.html +2 -2
  79. package/docs/interfaces/PromptFolder.html +2 -2
  80. package/docs/interfaces/PromptFoldersResponse.html +2 -2
  81. package/docs/interfaces/RoomDetails.html +2 -2
  82. package/docs/interfaces/RoomInfo.html +2 -2
  83. package/docs/interfaces/RoomMessagesResponse.html +2 -2
  84. package/docs/interfaces/StoryErrorEvent.html +12 -0
  85. package/docs/interfaces/StoryIdea.html +2 -2
  86. package/docs/interfaces/StoryInfo.html +6 -2
  87. package/docs/interfaces/StoryIntroduceCharacterEvent.html +12 -0
  88. package/docs/interfaces/StoryProgressChapterEvent.html +11 -0
  89. package/docs/interfaces/StoryState.html +5 -5
  90. package/docs/interfaces/StoryStateEvent.html +10 -0
  91. package/docs/interfaces/Transaction.html +10 -0
  92. package/docs/interfaces/TransactionHistoryResponse.html +3 -0
  93. package/docs/modules.html +1 -1
  94. package/docs/types/PromptScope.html +1 -1
  95. package/package.json +8 -8
  96. package/dist/server/src/ai/model_prices.d.ts +0 -1
  97. package/docs/interfaces/StoryMessageUpdate.html +0 -6
  98. package/docs/interfaces/StorySuggestion.html +0 -9
  99. /package/data/common/prompts/character/{compact_story.json → compact_agent.json} +0 -0
  100. /package/data/common/prompts/character/{compact_story.prompt → compact_agent.prompt} +0 -0
  101. /package/data/common/prompts/narrator/{compact_story.json → compact_agent.json} +0 -0
  102. /package/data/common/prompts/narrator/{compact_story.prompt → compact_agent.prompt} +0 -0
  103. /package/{dist → dist-sdk}/server/src/ai/LLM/anthropic.module.d.ts +0 -0
  104. /package/{dist → dist-sdk}/server/src/ai/LLM/anthropic.module.js +0 -0
  105. /package/{dist → dist-sdk}/server/src/ai/LLM/anthropic.service.d.ts +0 -0
  106. /package/{dist → dist-sdk}/server/src/ai/LLM/deepseek.module.d.ts +0 -0
  107. /package/{dist → dist-sdk}/server/src/ai/LLM/deepseek.module.js +0 -0
  108. /package/{dist → dist-sdk}/server/src/ai/LLM/fal.module.d.ts +0 -0
  109. /package/{dist → dist-sdk}/server/src/ai/LLM/fal.module.js +0 -0
  110. /package/{dist → dist-sdk}/server/src/ai/LLM/googleai.module.d.ts +0 -0
  111. /package/{dist → dist-sdk}/server/src/ai/LLM/googleai.module.js +0 -0
  112. /package/{dist → dist-sdk}/server/src/ai/LLM/googleai.service.d.ts +0 -0
  113. /package/{dist → dist-sdk}/server/src/ai/LLM/googleai.service.js +0 -0
  114. /package/{dist → dist-sdk}/server/src/ai/LLM/grok.module.d.ts +0 -0
  115. /package/{dist → dist-sdk}/server/src/ai/LLM/grok.module.js +0 -0
  116. /package/{dist → dist-sdk}/server/src/ai/LLM/mock.module.d.ts +0 -0
  117. /package/{dist → dist-sdk}/server/src/ai/LLM/mock.module.js +0 -0
  118. /package/{dist → dist-sdk}/server/src/ai/LLM/mock.service.d.ts +0 -0
  119. /package/{dist → dist-sdk}/server/src/ai/LLM/mock.service.js +0 -0
  120. /package/{dist → dist-sdk}/server/src/ai/LLM/openai.module.d.ts +0 -0
  121. /package/{dist → dist-sdk}/server/src/ai/LLM/openai.module.js +0 -0
  122. /package/{dist → dist-sdk}/server/src/ai/LLM/openai.service.d.ts +0 -0
  123. /package/{dist → dist-sdk}/server/src/ai/LLM/openai.service.js +0 -0
  124. /package/{dist → dist-sdk}/server/src/ai/LLM/together.module.d.ts +0 -0
  125. /package/{dist → dist-sdk}/server/src/ai/LLM/together.module.js +0 -0
  126. /package/{dist → dist-sdk}/server/src/ai/LLM/vertexai.module.d.ts +0 -0
  127. /package/{dist → dist-sdk}/server/src/ai/LLM/vertexai.module.js +0 -0
  128. /package/{dist → dist-sdk}/server/src/ai/LLM/vertexai.service.d.ts +0 -0
  129. /package/{dist → dist-sdk}/server/src/ai/LLM/vertexai.service.js +0 -0
  130. /package/{dist → dist-sdk}/server/src/ai/agent-config.d.ts +0 -0
  131. /package/{dist → dist-sdk}/server/src/ai/agent-config.js +0 -0
  132. /package/{dist → dist-sdk}/server/src/ai/agent-factory.d.ts +0 -0
  133. /package/{dist → dist-sdk}/server/src/ai/agent-factory.js +0 -0
  134. /package/{dist → dist-sdk}/server/src/ai/agent-message.service.d.ts +0 -0
  135. /package/{dist → dist-sdk}/server/src/ai/agent-message.service.js +0 -0
  136. /package/{dist → dist-sdk}/server/src/ai/agent-store.module.d.ts +0 -0
  137. /package/{dist → dist-sdk}/server/src/ai/agent-store.module.js +0 -0
  138. /package/{dist → dist-sdk}/server/src/ai/agent-store.service.d.ts +0 -0
  139. /package/{dist → dist-sdk}/server/src/ai/agent-store.service.js +0 -0
  140. /package/{dist → dist-sdk}/server/src/ai/ai-factory.module.d.ts +0 -0
  141. /package/{dist → dist-sdk}/server/src/ai/ai-factory.module.js +0 -0
  142. /package/{dist → dist-sdk}/server/src/ai/ai-factory.service.d.ts +0 -0
  143. /package/{dist → dist-sdk}/server/src/ai/ai-factory.service.js +0 -0
  144. /package/{dist → dist-sdk}/server/src/ai/artifact.module.d.ts +0 -0
  145. /package/{dist → dist-sdk}/server/src/ai/artifact.module.js +0 -0
  146. /package/{dist → dist-sdk}/server/src/ai/artifact.service.d.ts +0 -0
  147. /package/{dist → dist-sdk}/server/src/ai/artifact.service.js +0 -0
  148. /package/{dist → dist-sdk}/server/src/ai/attached-file.module.d.ts +0 -0
  149. /package/{dist → dist-sdk}/server/src/ai/attached-file.module.js +0 -0
  150. /package/{dist → dist-sdk}/server/src/ai/attached-file.service.d.ts +0 -0
  151. /package/{dist → dist-sdk}/server/src/ai/attached-file.service.js +0 -0
  152. /package/{dist → dist-sdk}/server/src/ai/published-agents.service.d.ts +0 -0
  153. /package/{dist → dist-sdk}/server/src/app/balance-message.service.d.ts +0 -0
  154. /package/{dist → dist-sdk}/server/src/app/balance-message.service.js +0 -0
  155. /package/{dist → dist-sdk}/server/src/app/balance.module.d.ts +0 -0
  156. /package/{dist → dist-sdk}/server/src/app/balance.module.js +0 -0
  157. /package/{dist → dist-sdk}/server/src/app/balance.service.d.ts +0 -0
  158. /package/{dist → dist-sdk}/server/src/app/balance.service.js +0 -0
  159. /package/{dist → dist-sdk}/server/src/app/stripe.module.d.ts +0 -0
  160. /package/{dist → dist-sdk}/server/src/app/stripe.module.js +0 -0
  161. /package/{dist → dist-sdk}/server/src/app/user-service-factory.d.ts +0 -0
  162. /package/{dist → dist-sdk}/server/src/app/user-service-factory.js +0 -0
  163. /package/{dist → dist-sdk}/server/src/app/user-service-manager.d.ts +0 -0
  164. /package/{dist → dist-sdk}/server/src/app/user-service-manager.js +0 -0
  165. /package/{dist → dist-sdk}/server/src/app.module.d.ts +0 -0
  166. /package/{dist → dist-sdk}/server/src/app.module.js +0 -0
  167. /package/{dist → dist-sdk}/server/src/auth/agent-access.decorator.d.ts +0 -0
  168. /package/{dist → dist-sdk}/server/src/auth/agent-access.decorator.js +0 -0
  169. /package/{dist → dist-sdk}/server/src/auth/auth.controller.d.ts +0 -0
  170. /package/{dist → dist-sdk}/server/src/auth/auth.controller.js +0 -0
  171. /package/{dist → dist-sdk}/server/src/auth/auth.module.d.ts +0 -0
  172. /package/{dist → dist-sdk}/server/src/auth/auth.module.js +0 -0
  173. /package/{dist → dist-sdk}/server/src/auth/auth.service.d.ts +0 -0
  174. /package/{dist → dist-sdk}/server/src/auth/auth.service.js +0 -0
  175. /package/{dist → dist-sdk}/server/src/auth/dto/bot-login.dto.d.ts +0 -0
  176. /package/{dist → dist-sdk}/server/src/auth/dto/bot-login.dto.js +0 -0
  177. /package/{dist → dist-sdk}/server/src/auth/dto/password-reset.dto.d.ts +0 -0
  178. /package/{dist → dist-sdk}/server/src/auth/dto/password-reset.dto.js +0 -0
  179. /package/{dist → dist-sdk}/server/src/auth/dto/phone-login.dto.d.ts +0 -0
  180. /package/{dist → dist-sdk}/server/src/auth/dto/phone-login.dto.js +0 -0
  181. /package/{dist → dist-sdk}/server/src/auth/dto/phone-verification.dto.d.ts +0 -0
  182. /package/{dist → dist-sdk}/server/src/auth/dto/phone-verification.dto.js +0 -0
  183. /package/{dist → dist-sdk}/server/src/auth/jwt-auth.guard.d.ts +0 -0
  184. /package/{dist → dist-sdk}/server/src/auth/jwt-auth.guard.js +0 -0
  185. /package/{dist → dist-sdk}/server/src/auth/jwt.strategy.d.ts +0 -0
  186. /package/{dist → dist-sdk}/server/src/auth/jwt.strategy.js +0 -0
  187. /package/{dist → dist-sdk}/server/src/auth/phone-validation.service.d.ts +0 -0
  188. /package/{dist → dist-sdk}/server/src/auth/phone-validation.service.js +0 -0
  189. /package/{dist → dist-sdk}/server/src/auth/public.decorator.d.ts +0 -0
  190. /package/{dist → dist-sdk}/server/src/auth/public.decorator.js +0 -0
  191. /package/{dist → dist-sdk}/server/src/auth/rate-limit.service.d.ts +0 -0
  192. /package/{dist → dist-sdk}/server/src/auth/rate-limit.service.js +0 -0
  193. /package/{dist → dist-sdk}/server/src/auth/room-access.decorator.d.ts +0 -0
  194. /package/{dist → dist-sdk}/server/src/auth/room-access.decorator.js +0 -0
  195. /package/{dist → dist-sdk}/server/src/auth/scopes.decorator.d.ts +0 -0
  196. /package/{dist → dist-sdk}/server/src/auth/scopes.decorator.js +0 -0
  197. /package/{dist → dist-sdk}/server/src/auth/scopes.guard.d.ts +0 -0
  198. /package/{dist → dist-sdk}/server/src/auth/scopes.guard.js +0 -0
  199. /package/{dist → dist-sdk}/server/src/auth/session.guard.d.ts +0 -0
  200. /package/{dist → dist-sdk}/server/src/auth/session.guard.js +0 -0
  201. /package/{dist → dist-sdk}/server/src/auth/twilio.service.d.ts +0 -0
  202. /package/{dist → dist-sdk}/server/src/auth/twilio.service.js +0 -0
  203. /package/{dist → dist-sdk}/server/src/auth/users.service.d.ts +0 -0
  204. /package/{dist → dist-sdk}/server/src/common/errors.d.ts +0 -0
  205. /package/{dist → dist-sdk}/server/src/common/errors.js +0 -0
  206. /package/{dist → dist-sdk}/server/src/common/logger.d.ts +0 -0
  207. /package/{dist → dist-sdk}/server/src/common/logger.js +0 -0
  208. /package/{dist → dist-sdk}/server/src/config/configuration.module.d.ts +0 -0
  209. /package/{dist → dist-sdk}/server/src/config/configuration.module.js +0 -0
  210. /package/{dist → dist-sdk}/server/src/config/configuration.service.d.ts +0 -0
  211. /package/{dist → dist-sdk}/server/src/room/artifact-store.service.d.ts +0 -0
  212. /package/{dist → dist-sdk}/server/src/room/artifact-store.service.js +0 -0
  213. /package/{dist → dist-sdk}/server/src/room/artifact.d.ts +0 -0
  214. /package/{dist → dist-sdk}/server/src/room/artifact.js +0 -0
  215. /package/{dist → dist-sdk}/server/src/room/message.d.ts +0 -0
  216. /package/{dist → dist-sdk}/server/src/room/message.js +0 -0
  217. /package/{dist → dist-sdk}/server/src/room/published-rooms.service.d.ts +0 -0
  218. /package/{dist → dist-sdk}/server/src/room/room-config.d.ts +0 -0
  219. /package/{dist → dist-sdk}/server/src/room/room-config.js +0 -0
  220. /package/{dist → dist-sdk}/server/src/room/room-factory.d.ts +0 -0
  221. /package/{dist → dist-sdk}/server/src/room/room-factory.js +0 -0
  222. /package/{dist → dist-sdk}/server/src/room/room-message.module.d.ts +0 -0
  223. /package/{dist → dist-sdk}/server/src/room/room-message.module.js +0 -0
  224. /package/{dist → dist-sdk}/server/src/room/room-message.service.d.ts +0 -0
  225. /package/{dist → dist-sdk}/server/src/room/room-message.service.js +0 -0
  226. /package/{dist → dist-sdk}/server/src/room/room-store.module.d.ts +0 -0
  227. /package/{dist → dist-sdk}/server/src/room/room-store.module.js +0 -0
  228. /package/{dist → dist-sdk}/server/src/room/room-store.service.d.ts +0 -0
  229. /package/{dist → dist-sdk}/server/src/room/room-store.service.js +0 -0
  230. /package/{dist → dist-sdk}/server/src/room/room.d.ts +0 -0
  231. /package/{dist → dist-sdk}/server/src/sdk/briyah-config.d.ts +0 -0
  232. /package/{dist → dist-sdk}/server/src/sdk/briyah.d.ts +0 -0
  233. /package/{dist → dist-sdk}/server/src/sdk/index.js +0 -0
  234. /package/{dist → dist-sdk}/server/src/shared/shared.module.d.ts +0 -0
  235. /package/{dist → dist-sdk}/server/src/shared/shared.module.js +0 -0
  236. /package/{dist → dist-sdk}/server/src/story/story-progress.service.d.ts +0 -0
  237. /package/{dist → dist-sdk}/server/src/story/story-progress.service.js +0 -0
  238. /package/{dist → dist-sdk}/server/src/story/story-store.module.d.ts +0 -0
  239. /package/{dist → dist-sdk}/server/src/story/story-store.module.js +0 -0
  240. /package/{dist → dist-sdk}/server/src/story/story-store.service.d.ts +0 -0
  241. /package/{dist → dist-sdk}/server/src/story/story-store.service.js +0 -0
  242. /package/{dist → dist-sdk}/shared/types/app.types.js +0 -0
@@ -1,6 +1,7 @@
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.9</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><script async src="../assets/hierarchy.js" id="tsd-hierarchy-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.9</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><a href="../classes/RoomMessage.html" class="tsd-signature-type tsd-kind-class">RoomMessage</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="#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>
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.1.1</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><script async src="../assets/hierarchy.js" id="tsd-hierarchy-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.1.1</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="#compactagentconversation-1">compactAgentConversation</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="#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><a href="../classes/RoomMessage.html" class="tsd-signature-type tsd-kind-class">RoomMessage</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="#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="#gettransactionbypaymentid-1">getTransactionByPaymentId</a><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">paymentId</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="Transaction.html" class="tsd-signature-type tsd-kind-interface">Transaction</a><span class="tsd-signature-symbol">&gt;</span><span class="tsd-signature-symbol">;</span><br/>    <a class="tsd-kind-call-signature" href="#gettransactions-1">getTransactions</a><span class="tsd-signature-symbol">(</span><br/>        <span class="tsd-kind-parameter">limit</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">offset</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="TransactionHistoryResponse.html" class="tsd-signature-type tsd-kind-interface">TransactionHistoryResponse</a><span class="tsd-signature-symbol">&gt;</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="#recordtransaction-1">recordTransaction</a><span class="tsd-signature-symbol">(</span><br/>        <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><br/>        <span class="tsd-kind-parameter">paymentId</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">status</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">&quot;pending&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;succeeded&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;failed&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;cancelled&quot;</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="Transaction.html" class="tsd-signature-type tsd-kind-interface">Transaction</a><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="#updatetransactionstatus-1">updateTransactionStatus</a><span class="tsd-signature-symbol">(</span><br/>        <span class="tsd-kind-parameter">paymentId</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">status</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;pending&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;succeeded&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;failed&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;cancelled&quot;</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/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L60">server/src/app.service.ts:60</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
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
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="#compactagentconversation" 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/>Agent<wbr/>Conversation</span></a>
4
5
  <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
6
  <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
7
  <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>
@@ -52,7 +53,8 @@
52
53
  <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
54
  <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
55
  <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="#gettransactionbypaymentid" 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/>By<wbr/>Payment<wbr/>Id</span></a>
57
+ <a href="#gettransactions" 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/>Transactions</span></a>
56
58
  <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
59
  <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
60
  <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>
@@ -82,6 +84,7 @@
82
84
  <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
85
  <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
86
  <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>
87
+ <a href="#recordtransaction" 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>record<wbr/>Transaction</span></a>
85
88
  <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
89
  <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
90
  <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>
@@ -99,17 +102,18 @@
99
102
  <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
103
  <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
104
  <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>
105
+ <a href="#updatetransactionstatus" 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/>Transaction<wbr/>Status</span></a>
102
106
  <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
107
  </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
108
  <p>Use this to credit a user after a payment is processed by your application.</p>
105
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">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#L2632">server/src/app.service.ts:2632</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>
110
+ </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/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2675">server/src/app.service.ts:2675</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
111
  <p>The attachment is persisted immediately via <code>agent.save()</code>. The artifact content
108
112
  is injected into the agent's context on each subsequent call.</p>
109
113
  </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
114
  </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
115
  </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#L3011">server/src/app.service.ts:3011</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>
116
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L3102">server/src/app.service.ts:3102</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
117
  <p>The file is stored on disk and uploaded to the AI provider if required
114
118
  (e.g. Google Cloud Storage for Vertex AI). The agent state is persisted after attachment.</p>
115
119
  </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>
@@ -117,13 +121,17 @@ is injected into the agent's context on each subsequent call.</p>
117
121
  </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
122
  </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
123
  <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>
124
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L381">server/src/app.service.ts:381</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="compactagentconversation"><span>compact<wbr/>Agent<wbr/>Conversation</span><a href="#compactagentconversation" 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="compactagentconversation-1"><span class="tsd-kind-call-signature">compactAgentConversation</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="#compactagentconversation-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>Compacts an agent's conversation history into a single summary message.
125
+ Uses the <code>compact_agent</code> prompt (role folder first, common-root as fallback).</p>
126
+ </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>
127
+ </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-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 no agent with the given ID exists</p>
128
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/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="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
129
  <p>Uses story-specific prompts: the narrator summarizes plot events,
122
130
  characters summarize their relationships and experiences. The original
123
131
  messages are replaced with a compact summary block.</p>
124
132
  </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
133
  </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#L2346">server/src/app.service.ts:2346</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
134
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/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="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
135
  conversion in the background.</p>
128
136
  <p>Returns the artifact ID immediately with placeholder content. The artifact
129
137
  content is replaced with the converted Markdown when the background job
@@ -135,7 +143,7 @@ PDFs with more than 10 pages are converted page-by-page concurrently.</p>
135
143
  </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
144
  </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
145
  </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#L2718">server/src/app.service.ts:2718</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>
146
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2809">server/src/app.service.ts:2809</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
147
  <p>The agent is immediately findable by ID but <strong>not</strong> persisted to disk.
140
148
  Call <code>agent.save()</code> when you want to write it to storage.</p>
141
149
  </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>
@@ -152,21 +160,21 @@ Call <code>agent.save()</code> when you want to write it to storage.</p>
152
160
  <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
161
  </code><button type="button">Copy</button></pre>
154
162
 
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>
163
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L276">server/src/app.service.ts:276</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
164
  <p>An empty <code>system_instruction.prompt</code> file is created inside the folder so that
157
165
  it is immediately usable as a prompt source for agents.</p>
158
166
  </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>
167
+ </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-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 a folder with that name already exists</p>
168
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L1632">server/src/app.service.ts:1632</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
169
  </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
170
  </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
171
  </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
172
  </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>
173
+ <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 any agent ID does not exist</p>
166
174
  </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
175
  </code><button type="button">Copy</button></pre>
168
176
 
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>
177
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L655">server/src/app.service.ts:655</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
178
  <p>When this method returns, the story is <strong>immediately playable</strong>: brief character
171
179
  backgrounds and the opening scene have already been generated. A background job
172
180
  then generates the detailed plot plan and full character profiles; subscribe to
@@ -183,104 +191,104 @@ but there is no need to wait for it before letting the player interact.</p>
183
191
  <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-5">// Story is playable as soon as createStory returns</span><br/><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/><br/><span class="hl-5">// Optionally listen for background completion (plot plan + detailed profiles)</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">step</span><span class="hl-1">, </span><span class="hl-4">message</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-3">if</span><span class="hl-1"> (</span><span class="hl-4">step</span><span class="hl-1"> === </span><span class="hl-2">&#39;complete&#39;</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-2">&#39;Background setup finished&#39;</span><span class="hl-1">);</span><br/><span class="hl-1">});</span>
184
192
  </code><button type="button">Copy</button></pre>
185
193
 
186
- </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2019">server/src/app.service.ts:2019</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>
194
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2036">server/src/app.service.ts:2036</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>
187
195
  <p>The artifact is persisted immediately. Use the returned ID to attach it to
188
196
  agents (<a href="#attachartifacttoagent" class="tsd-kind-method">attachArtifactToAgent</a>) or reference it in room messages.</p>
189
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">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>
190
198
  </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>
191
199
  </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>
192
- <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2686">server/src/app.service.ts:2686</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>
200
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2777">server/src/app.service.ts:2777</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>
193
201
  <p>Prevents the narrator from suggesting the same character again in this story.</p>
194
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">storyId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The story's ID</p>
195
203
  </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>
196
- </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#L2447">server/src/app.service.ts:2447</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>
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><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2490">server/src/app.service.ts:2490</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>
197
205
  <p>If the agent is a published instance, its entry is also removed from the
198
206
  published agents mapping.</p>
199
207
  </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>
200
- </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>
201
- </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>
208
+ </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 no agent with the given ID exists</p>
209
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L996">server/src/app.service.ts:996</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>
202
210
  <p>Deletes the file from storage and updates the agent's metadata.
203
211
  Use <a href="#deleteattachedfilebyid" class="tsd-kind-method">deleteAttachedFileById</a> if you have the document ID instead.</p>
204
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">agentId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The agent's ID</p>
205
213
  </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>
206
- </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>
207
- </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>
214
+ </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 the agent or file is not found</p>
215
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L1753">server/src/app.service.ts:1753</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>
208
216
  <p>Searches all agents to locate the owner, removes the file from storage,
209
217
  and updates the agent's metadata.</p>
210
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">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>
211
- </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>
212
- </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>
213
- </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>
219
+ </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-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 no file with the given ID exists</p>
220
+ </div><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 deletion fails</p>
221
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L1781">server/src/app.service.ts:1781</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>
214
222
  </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>
215
223
  </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>
216
- </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>
217
- </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2510">server/src/app.service.ts:2510</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>
224
+ </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 the chapter does not exist</p>
225
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2553">server/src/app.service.ts:2553</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>
218
226
  <p>The character can be reintroduced later via <a href="#introducecharactertostory" class="tsd-kind-method">introduceCharacterToStory</a>
219
227
  and their profile will be available.</p>
220
228
  </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>
221
229
  </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>
222
- </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#L2460">server/src/app.service.ts:2460</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>
230
+ </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/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2503">server/src/app.service.ts:2503</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>
223
231
  <p>Removes both the <code>.prompt</code> and <code>.json</code> variants if they exist.
224
232
  This is a no-op if neither file is present.</p>
225
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">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>
226
234
  </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>
227
- </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>
235
+ </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/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L1552">server/src/app.service.ts:1552</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>
228
236
  <p>Only user-owned folders can be deleted; common folders are not affected.</p>
229
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">folderName</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Name of the folder to delete</p>
230
- </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>
231
- </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>
232
- </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>
238
+ </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-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 <code>folderName</code> is <code>'shared'</code></p>
239
+ </div><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 folder does not exist in the user prompts directory</p>
240
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L1657">server/src/app.service.ts:1657</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>
233
241
  <p>If the room is a template, all of its published instances are deleted first.
234
242
  All attached files and published room mappings are also cleaned up.</p>
235
243
  </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>
236
- </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>
237
- </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>
238
- </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>
244
+ </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-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 the room does not exist</p>
245
+ </div><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 deletion fails</p>
246
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L1156">server/src/app.service.ts:1156</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>
239
247
  </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>
240
- </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#L2332">server/src/app.service.ts:2332</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>
248
+ </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/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2375">server/src/app.service.ts:2375</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>
241
249
  <p>Any agents that have the artifact attached will lose access to it after deletion.</p>
242
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">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>
243
251
  </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>
244
- <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2939">server/src/app.service.ts:2939</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>
252
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L3030">server/src/app.service.ts:3030</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>
245
253
  <p>The artifact itself is not deleted — only the link between the agent and the artifact
246
254
  is removed. Changes are persisted immediately via <code>agent.save()</code>.</p>
247
255
  </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>
248
256
  </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>
249
- </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>
250
- </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L3037">server/src/app.service.ts:3037</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>
257
+ </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 no agent with the given ID exists</p>
258
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L3128">server/src/app.service.ts:3128</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>
251
259
  <p>Combines all chapters and room messages in narrative order.</p>
252
260
  </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>
253
261
  </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>
254
- <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2572">server/src/app.service.ts:2572</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>
262
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/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="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>
255
263
  <p>Published room instances cannot be edited — edit the template instead.</p>
256
264
  </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>
257
265
  </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>
258
266
  </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>
259
267
  </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>
260
268
  </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>
261
- </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>
262
- </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>
263
- </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>
269
+ </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-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 the room does not exist</p>
270
+ </div><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 attempting to edit a published room instance</p>
271
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L700">server/src/app.service.ts:700</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>
264
272
  <p>Normally called automatically by <a href="#processtext" class="tsd-kind-method">processText</a> and <a href="#getagentmessages" class="tsd-kind-method">getAgentMessages</a>.
265
273
  Call this explicitly when connecting a new SSE client to an agent that was
266
274
  loaded from disk (not yet touched in this session).</p>
267
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>
268
- </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#L2154">server/src/app.service.ts:2154</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>
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><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/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2197">server/src/app.service.ts:2197</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>
269
277
  <p>Normally called automatically. Call this explicitly when connecting a new
270
278
  SSE client to a room that was loaded from disk (not yet touched in this session).</p>
271
279
  </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>
272
- </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#L2226">server/src/app.service.ts:2226</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>
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-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/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2269">server/src/app.service.ts:2269</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>
273
281
  <p>The archive can be re-imported via <a href="#importstoryfromzip" class="tsd-kind-method">importStoryFromZip</a>.</p>
274
282
  </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>
275
283
  </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>
276
- <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2584">server/src/app.service.ts:2584</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>
284
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2627">server/src/app.service.ts:2627</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>
277
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>
278
286
  </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>
279
- <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>
287
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L606">server/src/app.service.ts:606</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>
280
288
  </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>
281
289
  </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>
282
290
  </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>
283
- <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2595">server/src/app.service.ts:2595</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
291
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2638">server/src/app.service.ts:2638</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
284
292
  (new message, token count update, etc.).</p>
285
293
  <p>Useful for building real-time UIs. Subscribe to the <code>'update'</code> event to receive
286
294
  agent state payloads without polling.</p>
@@ -289,44 +297,44 @@ agent state payloads without polling.</p>
289
297
  <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>
290
298
  </code><button type="button">Copy</button></pre>
291
299
 
292
- </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2141">server/src/app.service.ts:2141</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>
300
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2184">server/src/app.service.ts:2184</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>
293
301
  <p>Pass the <code>messageIndex</code> from a previous response as <code>fromIndex</code> to
294
302
  retrieve only new messages since the last poll.</p>
295
303
  </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>
296
304
  </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>
297
305
  </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.
298
306
  Returns empty messages with zero counts if the agent is not found.</p>
299
- <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>
307
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L845">server/src/app.service.ts:845</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>
300
308
  </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>
301
309
  </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>
302
- <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>
303
- </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>
310
+ <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 service name is not recognized</p>
311
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L104">server/src/app.service.ts:104</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>
304
312
  <p>Only providers that have a configured API key are included.</p>
305
313
  </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>
306
- <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>
314
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L93">server/src/app.service.ts:93</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>
307
315
  <p>The balance is decremented automatically after each AI call based on token usage
308
316
  and any configured markup. Calls that would exceed the balance throw
309
317
  <code>InsufficientBalanceError</code> before the request is sent.</p>
310
318
  </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">number</span></h4><p>Current balance in dollars</p>
311
- <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2621">server/src/app.service.ts:2621</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>
319
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2664">server/src/app.service.ts:2664</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>
312
320
  <p>Subscribe to the <code>'update'</code> event to push real-time balance updates to a connected
313
321
  client (e.g. via SSE) without polling.</p>
314
322
  </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>
315
323
  </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>
316
- <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2214">server/src/app.service.ts:2214</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><a href="../classes/RoomMessage.html" class="tsd-signature-type tsd-kind-class">RoomMessage</a><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>
324
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2257">server/src/app.service.ts:2257</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><a href="../classes/RoomMessage.html" class="tsd-signature-type tsd-kind-class">RoomMessage</a><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>
317
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>
318
326
  </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>
319
327
  </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/RoomMessage.html" class="tsd-signature-type tsd-kind-class">RoomMessage</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">&gt;</span></h4><p>Array of room messages from that chapter</p>
320
- <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2484">server/src/app.service.ts:2484</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>
328
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2527">server/src/app.service.ts:2527</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>
321
329
  </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>
322
330
  </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>
323
331
  </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>
324
- <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2534">server/src/app.service.ts:2534</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>
332
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2577">server/src/app.service.ts:2577</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>
325
333
  <p>The plot plan is a room artifact generated by the narrator at story creation
326
334
  and updated as the story progresses.</p>
327
335
  </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>
328
336
  </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>
329
- <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2559">server/src/app.service.ts:2559</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:
337
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2602">server/src/app.service.ts:2602</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:
330
338
  <code>user/{folder}</code> → <code>user/root</code> → <code>common/{folder}</code> → <code>common/root</code>.</p>
331
339
  <p>The returned object includes a <code>scope</code> field (<code>'user'</code> or <code>'common'</code>) indicating
332
340
  which directory the file was found in. Returns <code>{ content: '' }</code> if the file
@@ -334,40 +342,40 @@ does not exist in any location.</p>
334
342
  </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>
335
343
  </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>
336
344
  </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>
337
- <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>
345
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L1454">server/src/app.service.ts:1454</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>
338
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">templateId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>ID of the template agent</p>
339
347
  </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>
340
348
  <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>
341
- </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>
349
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L1059">server/src/app.service.ts:1059</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>
342
350
  </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>
343
351
  </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>
344
352
  <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>
345
- </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>
353
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L1231">server/src/app.service.ts:1231</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>
346
354
  </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>
347
- <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>
355
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L231">server/src/app.service.ts:231</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>
348
356
  </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>
349
357
  </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>
350
- <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>
351
- </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>
352
- </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>
358
+ <div class="tsd-comment tsd-typography"><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 does not exist</p>
359
+ </div><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 the genre file cannot be read</p>
360
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L195">server/src/app.service.ts:195</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>
353
361
  <p>Artifacts are collaborative documents created by agents via the <code>'publish'</code> action.</p>
354
362
  </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>
355
363
  </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>
356
364
  <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>
357
- </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>
365
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L1582">server/src/app.service.ts:1582</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>
358
366
  <p>Use <a href="#getroomdetails" class="tsd-kind-method">getRoomDetails</a> for a plain metadata object. This method exposes
359
367
  the full <code>Room</code> instance, which is useful for advanced operations.</p>
360
368
  </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>
361
369
  </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>
362
- <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>
370
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L792">server/src/app.service.ts:792</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>
363
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>
364
372
  </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>
365
- <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>
373
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L754">server/src/app.service.ts:754</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>
366
374
  <p>Subscribe to the <code>'update'</code> event to receive room message payloads in real time
367
375
  without polling.</p>
368
376
  </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>
369
377
  </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>
370
- <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2201">server/src/app.service.ts:2201</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>
378
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2244">server/src/app.service.ts:2244</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>
371
379
  <p>Pass the index of the last message you received as <code>fromIndex</code> to poll for
372
380
  new messages only.</p>
373
381
  </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>
@@ -376,40 +384,58 @@ new messages only.</p>
376
384
  normally hidden (agents' internal reasoning). Default <code>false</code>.</p>
377
385
  </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.
378
386
  Returns empty messages with zero cost if the room is not found.</p>
379
- <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>
387
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L809">server/src/app.service.ts:809</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>
380
388
  </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>
381
389
  </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>
382
390
  </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>
383
- <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2973">server/src/app.service.ts:2973</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>
391
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L3064">server/src/app.service.ts:3064</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>
384
392
  </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>
385
393
  </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>
386
- <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2392">server/src/app.service.ts:2392</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 updates.</p>
387
- <p>Subscribe to the <code>'update'</code> event. Each event payload is a <code>StoryMessageUpdate</code>
388
- with a <code>timestamp</code> field added. Only three <code>type</code> values are emitted in practice:</p>
389
- <p><strong><code>type: 'state'</code></strong> — fires after every story turn with the updated game state.
390
- Payload: <code>{ type: 'state', state: StoryState, timestamp: number }</code>
391
- Use <code>state.currentSpeaker === state.userAgentName</code> to detect whether it is the
392
- human player's turn (do <strong>not</strong> use <code>state.humanPrompt</code> for this — it is a
393
- UI display string only, e.g. <code>&quot;What does Elena do next?&quot;</code>).</p>
394
- <p><strong><code>type: 'suggestion'</code></strong> fires when the narrator proposes adding a new character
395
- or progressing to the next chapter instead of executing automatically.
396
- Payload: <code>{ type: 'suggestion', suggestion: StorySuggestion, timestamp: number }</code></p>
394
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2435">server/src/app.service.ts:2435</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 updates.</p>
395
+ <p>The emitter fires four named events. Each payload includes a <code>timestamp</code> field.</p>
396
+ <hr>
397
+ <p><strong><code>'story-state'</code></strong> — <a href="StoryStateEvent.html" class="tsd-kind-interface">StoryStateEvent</a>
398
+ Fires after every room turn with the complete updated game state.</p>
399
+ <pre><code class="typescript"><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;story-state&#39;</span><span class="hl-1">, (</span><span class="hl-4">event</span><span class="hl-1">: </span><span class="hl-9">StoryStateEvent</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-6">const</span><span class="hl-1"> </span><span class="hl-7">myTurn</span><span class="hl-1"> = </span><span class="hl-4">event</span><span class="hl-1">.</span><span class="hl-4">state</span><span class="hl-1">.</span><span class="hl-4">currentSpeaker</span><span class="hl-1"> === </span><span class="hl-4">event</span><span class="hl-1">.</span><span class="hl-4">state</span><span class="hl-1">.</span><span class="hl-4">userAgentName</span><span class="hl-1">;</span><br/><span class="hl-1">});</span>
400
+ </code><button type="button">Copy</button></pre>
401
+
402
+ <p>Use <code>state.currentSpeaker === state.userAgentName</code> to detect the player's turn.
403
+ Do <strong>not</strong> use <code>state.humanPrompt</code> for turn detection it is a UI display string
404
+ (e.g. <code>&quot;What does Elena do next?&quot;</code>) present even when it is not the player's turn.</p>
405
+ <hr>
406
+ <p><strong><code>'suggest-introduce-character'</code></strong> — <a href="StoryIntroduceCharacterEvent.html" class="tsd-kind-interface">StoryIntroduceCharacterEvent</a>
407
+ Fires when the narrator wants to add a new character. The host app should surface
408
+ this to the player before acting.</p>
397
409
  <ul>
398
- <li>If <code>suggestion.type === 'introduce_character'</code>: call
399
- <a href="#introducecharactertostory" class="tsd-kind-method">introduceCharacterToStory</a> with <code>fromNarratorSuggestion: true</code> to accept,
400
- or <a href="#declinecharacter" class="tsd-kind-method">declineCharacter</a> to reject.</li>
401
- <li>If <code>suggestion.type === 'progress_chapter'</code>: call <a href="#progressstory" class="tsd-kind-method">progressStory</a> to accept,
402
- or ignore to continue the current chapter.</li>
410
+ <li><strong>Accept:</strong> call <a href="#introducecharactertostory" class="tsd-kind-method">introduceCharacterToStory</a> with <code>fromNarratorSuggestion: true</code></li>
411
+ <li><strong>Reject:</strong> call <a href="#declinecharacter" class="tsd-kind-method">declineCharacter</a></li>
403
412
  </ul>
404
- <p><strong><code>type: 'error'</code></strong> fires when the story engine encounters a fatal error.
405
- Payload: <code>{ type: 'error', error: { message: string, errorType?: string }, timestamp: number }</code></p>
413
+ <pre><code class="typescript"><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;suggest-introduce-character&#39;</span><span class="hl-1">, (</span><span class="hl-4">event</span><span class="hl-1">: </span><span class="hl-9">StoryIntroduceCharacterEvent</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-5">// event.characterName is the narrator-chosen name</span><br/><span class="hl-1">});</span>
414
+ </code><button type="button">Copy</button></pre>
415
+
416
+ <hr>
417
+ <p><strong><code>'suggest-progress-chapter'</code></strong> — <a href="StoryProgressChapterEvent.html" class="tsd-kind-interface">StoryProgressChapterEvent</a>
418
+ Fires when the narrator wants to advance to the next chapter. The host app should
419
+ surface this to the player before acting.</p>
420
+ <ul>
421
+ <li><strong>Accept:</strong> call <a href="#progressstory" class="tsd-kind-method">progressStory</a></li>
422
+ <li><strong>Stay in current chapter:</strong> ignore the event (no rejection call needed)</li>
423
+ </ul>
424
+ <hr>
425
+ <p><strong><code>'story-error'</code></strong> — <a href="StoryErrorEvent.html" class="tsd-kind-interface">StoryErrorEvent</a>
426
+ Fires when the story engine encounters a fatal error during room processing.
427
+ Named <code>'story-error'</code> rather than <code>'error'</code> to avoid Node.js throwing an uncaught
428
+ exception when no listener is attached to <code>'error'</code>.
429
+ Check <code>event.errorType === 'InsufficientBalanceError'</code> for balance failures.</p>
430
+ <hr>
406
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">storyId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The story's ID</p>
407
- </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 <code>StoryMessageUpdate</code> payloads</p>
408
- <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2119">server/src/app.service.ts:2119</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>
432
+ </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>'story-state'</code>, <code>'suggest-introduce-character'</code>,
433
+ <code>'suggest-progress-chapter'</code>, and <code>'story-error'</code> events</p>
434
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2162">server/src/app.service.ts:2162</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>
409
435
  </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>
410
436
  </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>
411
437
  </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>
412
- <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 background story work.</p>
438
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L875">server/src/app.service.ts:875</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 background story work.</p>
413
439
  <p>Subscribe to the <code>'progress'</code> event. Each event payload is
414
440
  <code>{ step: string, message: string, timestamp: number }</code>.</p>
415
441
  <p><strong><code>step</code> values emitted after <a href="#createstory" class="tsd-kind-method">createStory</a> returns:</strong></p>
@@ -442,29 +468,32 @@ in real time. After <code>'ready'</code>, a background job continues:</p>
442
468
  so this method returns <code>undefined</code> once a terminal step has fired.</p>
443
469
  </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>
444
470
  </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 already complete</p>
445
- <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2088">server/src/app.service.ts:2088</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>
471
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2105">server/src/app.service.ts:2105</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>
446
472
  <p>Includes messages, pending message count, processing status, and story metadata.
447
473
  Useful for restoring UI state after reconnecting.</p>
448
474
  </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>
449
475
  </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>
450
- <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2382">server/src/app.service.ts:2382</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>
451
- <p>Provides access to the transaction log and fine-grained credit/debit methods
452
- beyond the simple <a href="#addbalance" class="tsd-kind-method">addBalance</a> API.</p>
453
- </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>
454
- <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2644">server/src/app.service.ts:2644</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>
476
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/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="gettransactionbypaymentid"><span>get<wbr/>Transaction<wbr/>By<wbr/>Payment<wbr/>Id</span><a href="#gettransactionbypaymentid" 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="gettransactionbypaymentid-1"><span class="tsd-kind-call-signature">getTransactionByPaymentId</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">paymentId</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="Transaction.html" class="tsd-signature-type tsd-kind-interface">Transaction</a><span class="tsd-signature-symbol">&gt;</span><a href="#gettransactionbypaymentid-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>Retrieves a single transaction by its payment provider ID.</p>
477
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">paymentId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The payment provider ID used when the transaction was recorded</p>
478
+ </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="Transaction.html" class="tsd-signature-type tsd-kind-interface">Transaction</a><span class="tsd-signature-symbol">&gt;</span></h4><p>The matching <code>Transaction</code>, or <code>null</code> if not found</p>
479
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2721">server/src/app.service.ts:2721</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="gettransactions"><span>get<wbr/>Transactions</span><a href="#gettransactions" 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="gettransactions-1"><span class="tsd-kind-call-signature">getTransactions</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">limit</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">offset</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="TransactionHistoryResponse.html" class="tsd-signature-type tsd-kind-interface">TransactionHistoryResponse</a><span class="tsd-signature-symbol">&gt;</span><a href="#gettransactions-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 paginated transaction history for this user, sorted newest-first.</p>
480
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">limit</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 50</span></span><div class="tsd-comment tsd-typography"><p>Maximum number of records to return (default: 50)</p>
481
+ </div></li><li><span><span class="tsd-kind-parameter">offset</span>: <span class="tsd-signature-type">number</span><span class="tsd-signature-symbol"> = 0</span></span><div class="tsd-comment tsd-typography"><p>Number of records to skip for pagination (default: 0)</p>
482
+ </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="TransactionHistoryResponse.html" class="tsd-signature-type tsd-kind-interface">TransactionHistoryResponse</a><span class="tsd-signature-symbol">&gt;</span></h4><p>Object with a <code>transactions</code> array and a <code>total</code> count</p>
483
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2732">server/src/app.service.ts:2732</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>
455
484
  <p>Text artifacts are returned as <code>string</code>; binary artifacts (e.g. converted PDFs
456
485
  in intermediate state) may be returned as <code>Buffer</code>.</p>
457
486
  </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>
458
487
  </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>
459
- <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2672">server/src/app.service.ts:2672</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>
488
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2763">server/src/app.service.ts:2763</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>
460
489
  <p>Preferences are application-defined — Briyah stores and returns them as-is.
461
490
  Returns <code>{}</code> if no preferences have been saved yet.</p>
462
491
  </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>,
463
492
  or an empty object if none exist</p>
464
- <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>
493
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L1307">server/src/app.service.ts:1307</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>
465
494
  </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>
466
495
  </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>
467
- <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2046">server/src/app.service.ts:2046</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>
496
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2063">server/src/app.service.ts:2063</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>
468
497
  <p>Creates a character agent and integrates it into the story's room.
469
498
  The character profile is generated by the AI based on the provided description.</p>
470
499
  <p>When <a href="#getstorymessageemitter" class="tsd-kind-method">getStoryMessageEmitter</a> fires a <code>'suggestion'</code> update with
@@ -476,103 +505,103 @@ To reject it instead, call <a href="#declinecharacter" class="tsd-kind-method">d
476
505
  </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>
477
506
  </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>
478
507
  </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 accepting a narrator <code>'suggestion'</code> update. Default <code>false</code>.</p>
479
- </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#L2429">server/src/app.service.ts:2429</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>
508
+ </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/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2472">server/src/app.service.ts:2472</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>
480
509
  <p>Attached artifacts are included in the agent's context on every prompt, allowing
481
510
  the agent to reference their content. Use <a href="#attachartifacttoagent" class="tsd-kind-method">attachArtifactToAgent</a> and
482
511
  <a href="#detachartifactfromagent" class="tsd-kind-method">detachArtifactFromAgent</a> to manage attachments.</p>
483
512
  </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>
484
513
  </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>
485
- <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>
486
- </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2989">server/src/app.service.ts:2989</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>
514
+ <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>
515
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L3080">server/src/app.service.ts:3080</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>
487
516
  <p>Agents that are owned by a room or story are excluded — use
488
517
  <a href="#getroomdetails" class="tsd-kind-method">getRoomDetails</a> or story methods to access those agents.</p>
489
518
  </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>
490
- <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>
519
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L566">server/src/app.service.ts:566</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>
491
520
  </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>
492
521
  </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>
493
- <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>
522
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L114">server/src/app.service.ts:114</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>
494
523
  </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>
495
524
  </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>
496
- <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>
525
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L1731">server/src/app.service.ts:1731</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>
497
526
  <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>
498
527
  </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>
499
528
  </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>
500
- <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2472">server/src/app.service.ts:2472</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>
529
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2515">server/src/app.service.ts:2515</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>
501
530
  </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>
502
531
  </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>
503
- <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2523">server/src/app.service.ts:2523</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
532
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2566">server/src/app.service.ts:2566</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
504
533
  <code>common/config/image_models.json</code>.</p>
505
534
  </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>
506
- <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
535
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L125">server/src/app.service.ts:125</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
507
536
  and user prompt directories.</p>
508
537
  <p>Pass <code>'shared'</code> as <code>folderName</code> to list files in the root prompts directory.
509
538
  Files that exist in both directories appear once in the result.</p>
510
539
  </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>
511
540
  </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>
512
- <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>
541
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L1342">server/src/app.service.ts:1342</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>
513
542
  <p>When the same file name exists in both the common and user directories,
514
543
  the user copy wins and the entry is reported as <code>scope: 'user'</code>.
515
544
  Pass <code>'shared'</code> as <code>folderName</code> to list files in the root prompts directory.</p>
516
545
  </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>
517
546
  </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>
518
- <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>
547
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L1393">server/src/app.service.ts:1393</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>
519
548
  <p>Use this to discover available prompt folders before calling <a href="#listpromptfiles" class="tsd-kind-method">listPromptFiles</a>.
520
549
  If a folder exists in both directories it appears once in the result.</p>
521
550
  </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>
522
- <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>
551
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L419">server/src/app.service.ts:419</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>
523
552
  <p>When the same folder name exists in both directories, the user copy wins and the
524
553
  entry is reported as <code>scope: 'user'</code>.</p>
525
554
  </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,
526
555
  <code>'user'</code> returns only user-created folders, omit to return all</p>
527
556
  </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>
528
- <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>
557
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L451">server/src/app.service.ts:451</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>
529
558
  <p>Merges prompts from the agent's own prompt folder and the root prompts directory,
530
559
  deduplicating across both. These names can be passed to <a href="#runpreparedprompt" class="tsd-kind-method">runPreparedPrompt</a>.</p>
531
560
  </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>
532
561
  </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>
533
- <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>
534
- </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>
562
+ <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 no agent with the given ID exists</p>
563
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L495">server/src/app.service.ts:495</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>
535
564
  <p>Published agents are clones of template agents that are accessible
536
565
  via the public API (e.g. for end-users to chat with). Agents owned
537
566
  by rooms are excluded from this list.</p>
538
567
  </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>
539
568
  <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>
540
- </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>
569
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L1115">server/src/app.service.ts:1115</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>
541
570
  </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>
542
- <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>
571
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L744">server/src/app.service.ts:744</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>
543
572
  </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>
544
- <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2271">server/src/app.service.ts:2271</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>
573
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2314">server/src/app.service.ts:2314</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>
545
574
  <p>Story artifacts include the plot plan and any documents published by agents
546
575
  during the narrative.</p>
547
576
  </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>
548
577
  </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>
549
- <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2961">server/src/app.service.ts:2961</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>
578
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L3052">server/src/app.service.ts:3052</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>
550
579
  <p>Genres are read from <code>common/story_ideas/</code> — each <code>.json</code> file corresponds to a genre.
551
580
  Pass a genre name to <a href="#getrandomstoryideabygenre" class="tsd-kind-method">getRandomStoryIdeaByGenre</a> to get a story idea.</p>
552
581
  </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>
553
- <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
582
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L165">server/src/app.service.ts:165</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
554
583
  <code>common/config/story_models.json</code>.</p>
555
584
  </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>
556
- <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>
585
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L144">server/src/app.service.ts:144</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>
557
586
  <p>Artifacts are persistent named documents that can be attached to agents
558
587
  (see <a href="#attachartifacttoagent" class="tsd-kind-method">attachArtifactToAgent</a>) or shared with rooms via the <code>'publish'</code> action.
559
588
  Use <a href="#getuserartifact" class="tsd-kind-method">getUserArtifact</a> to retrieve the actual content.</p>
560
589
  </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>
561
- <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2659">server/src/app.service.ts:2659</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>
590
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2750">server/src/app.service.ts:2750</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>
562
591
  <p>Pending messages remain in the queue. Call <a href="#resumeroom" class="tsd-kind-method">resumeRoom</a> to continue processing.</p>
563
592
  </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>
564
- </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>
565
- </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>
593
+ </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-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 the room does not exist</p>
594
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L965">server/src/app.service.ts:965</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>
566
595
  <p>The exchange is added to the agent's conversation history and persisted to disk.</p>
567
596
  </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>
568
597
  </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>
569
598
  </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
570
599
  message, its index in the history, and cumulative token counts and cost</p>
571
- <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>
600
+ <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 no agent with the given ID exists</p>
572
601
  </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>
573
602
  </code><button type="button">Copy</button></pre>
574
603
 
575
- </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>
604
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L343">server/src/app.service.ts:343</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>
576
605
  <p>Creates a checkpoint of the current chapter state and rebuilds the opening scene.
577
606
  The story is <strong>immediately playable when this Promise resolves</strong> — the <code>'ready'</code>
578
607
  progress event fires just before the function returns, so awaiting this call is
@@ -584,7 +613,7 @@ independently on demand when it individually reaches the compaction threshold
584
613
  (see <a href="#compactstory" class="tsd-kind-method">compactStory</a> for manual compaction).</p>
585
614
  </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>
586
615
  </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>
587
- <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2369">server/src/app.service.ts:2369</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>
616
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2412">server/src/app.service.ts:2412</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>
588
617
  <p>The new instance is independent of the template's conversation history.
589
618
  Multiple instances can be created from a single template. Use
590
619
  <a href="#resetpublishedinstance" class="tsd-kind-method">resetPublishedInstance</a> to restore an instance to the template's
@@ -592,12 +621,12 @@ current state.</p>
592
621
  </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>
593
622
  </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>
594
623
  </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>
595
- <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>
624
+ <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 template agent does not exist</p>
596
625
  </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>
597
626
  <li><a href="#getpublishedinstances" class="tsd-kind-method">getPublishedInstances</a></li>
598
627
  <li><a href="#resetpublishedinstance" class="tsd-kind-method">resetPublishedInstance</a></li>
599
628
  </ul>
600
- </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>
629
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L1025">server/src/app.service.ts:1025</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>
601
630
  <p>This is the imperative equivalent of an agent sending a <code>'publish'</code> action message.
602
631
  Agents in the room can read and reference the artifact in subsequent prompts.</p>
603
632
  </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>
@@ -605,85 +634,94 @@ Agents in the room can read and reference the artifact in subsequent prompts.</p
605
634
  </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>
606
635
  </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>
607
636
  </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>
608
- </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>
609
- </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>
610
- </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>
637
+ </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-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 the room does not exist</p>
638
+ </div><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 <code>name</code> is empty</p>
639
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L1610">server/src/app.service.ts:1610</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>
611
640
  <p>The instance is a full copy of the template including all agents.
612
641
  Use <a href="#resetpublishedroominstance" class="tsd-kind-method">resetPublishedRoomInstance</a> to restore it to the template's state.</p>
613
642
  </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>
614
643
  </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>
615
644
  </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>
616
645
  </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>
617
- <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>
618
- </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
646
+ <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 the template room does not exist</p>
647
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L1203">server/src/app.service.ts:1203</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="recordtransaction"><span>record<wbr/>Transaction</span><a href="#recordtransaction" 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="recordtransaction-1"><span class="tsd-kind-call-signature">recordTransaction</span><span class="tsd-signature-symbol">(</span><br/>    <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><br/>    <span class="tsd-kind-parameter">paymentId</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">status</span><span class="tsd-signature-symbol">?:</span> <span class="tsd-signature-type">&quot;pending&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;succeeded&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;failed&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;cancelled&quot;</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="Transaction.html" class="tsd-signature-type tsd-kind-interface">Transaction</a><span class="tsd-signature-symbol">&gt;</span><a href="#recordtransaction-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 a new payment transaction.</p>
648
+ <p>Call this when your payment provider confirms a payment has been initiated.
649
+ The <code>paymentId</code> should be the unique identifier issued by your payment provider
650
+ (e.g. a Stripe Payment Intent ID). Use <a href="#updatetransactionstatus" class="tsd-kind-method">updateTransactionStatus</a> to update
651
+ the status once the provider confirms success or failure.</p>
652
+ </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 of the transaction</p>
653
+ </div></li><li><span><span class="tsd-kind-parameter">paymentId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>Unique payment identifier from your payment provider</p>
654
+ </div></li><li><span><span class="tsd-kind-parameter">status</span>: <span class="tsd-signature-type">&quot;pending&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;succeeded&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;failed&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;cancelled&quot;</span><span class="tsd-signature-symbol"> = &#39;pending&#39;</span></span><div class="tsd-comment tsd-typography"><p>Initial status; defaults to <code>'pending'</code></p>
655
+ </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="Transaction.html" class="tsd-signature-type tsd-kind-interface">Transaction</a><span class="tsd-signature-symbol">&gt;</span></h4><p>The created <code>Transaction</code> record</p>
656
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2692">server/src/app.service.ts:2692</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
619
657
  and re-attaching any previously uploaded files.</p>
620
658
  <p>Useful for starting a fresh conversation without recreating the agent.
621
659
  If the history begins with a summary block (from a prior compaction), only
622
660
  messages after the summary are cleared.</p>
623
661
  </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>
624
- </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>
625
- </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>
662
+ </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 no agent with the given ID exists</p>
663
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L1827">server/src/app.service.ts:1827</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>
626
664
  </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>
627
665
  </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>
628
666
  </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>
629
- <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2927">server/src/app.service.ts:2927</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>
667
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L3018">server/src/app.service.ts:3018</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>
630
668
  <p>Clears the instance's conversation history and regenerates it from
631
669
  the template agent. Does not affect the template itself.</p>
632
670
  </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>
633
- </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>
634
- </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>
635
- </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>
671
+ </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-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 instance does not exist</p>
672
+ </div><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 agent is not a published instance</p>
673
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L1092">server/src/app.service.ts:1092</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>
636
674
  <p>Clears the instance's messages and artifacts, and resets all of its
637
675
  cloned agents to their template state. Does not affect the template room.</p>
638
676
  </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>
639
- </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>
640
- </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>
641
- </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>
677
+ </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-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 instance does not exist</p>
678
+ </div><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 is not a published instance</p>
679
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L1252">server/src/app.service.ts:1252</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>
642
680
  <p>Agent configurations (model, prompt, files) are preserved; only conversation
643
681
  history and artifacts are removed.</p>
644
682
  </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>
645
- </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>
646
- </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>
683
+ </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 room does not exist</p>
684
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L1884">server/src/app.service.ts:1884</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>
647
685
  <p>If a chapter 1 backup exists, agents are restored from it; otherwise their
648
686
  conversation histories are cleared. The list of declined characters is also cleared.</p>
649
687
  </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>
650
- </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>
651
- </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>
688
+ </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 story or its room does not exist</p>
689
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L1926">server/src/app.service.ts:1926</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>
652
690
  <p>Adds the content as a player message and triggers the AI characters
653
691
  to continue the narrative.</p>
654
692
  <p>Pass the literal string <code>'PASS'</code> (case-insensitive) to skip the player's
655
693
  turn and let the AI characters continue without player input.</p>
656
694
  </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>
657
695
  </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, or <code>'PASS'</code> to skip the turn</p>
658
- </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#L2408">server/src/app.service.ts:2408</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>
696
+ </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/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2451">server/src/app.service.ts:2451</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>
659
697
  <p>Call this after adding balance via <a href="#addbalance" class="tsd-kind-method">addBalance</a> to allow stories that
660
698
  stalled mid-processing to continue from where they left off.</p>
661
699
  </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>
662
- <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2283">server/src/app.service.ts:2283</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>
700
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2326">server/src/app.service.ts:2326</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>
663
701
  </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>
664
- </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>
665
- </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>
702
+ </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-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 the room does not exist</p>
703
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L979">server/src/app.service.ts:979</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>
666
704
  <p>The template is loaded from the agent's prompt folder (with the standard 4-level
667
705
  fallback). <code>variables</code> are substituted into the template before sending.</p>
668
706
  </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>
669
707
  </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>
670
708
  </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>
671
709
  </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>
672
- <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>
673
- </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>
710
+ <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 no agent with the given ID exists</p>
711
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L538">server/src/app.service.ts:538</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>
674
712
  </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>
675
713
  </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>
676
714
  </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>
677
- </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>
678
- </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2496">server/src/app.service.ts:2496</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>
715
+ </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-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 chapter cannot be saved</p>
716
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2539">server/src/app.service.ts:2539</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>
679
717
  </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>
680
718
  </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>
681
719
  </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>
682
- </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#L2546">server/src/app.service.ts:2546</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>
720
+ </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/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2589">server/src/app.service.ts:2589</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>
683
721
  <p>Persists the content as a room artifact via the publish mechanism.</p>
684
722
  </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>
685
723
  </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>
686
- </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#L2608">server/src/app.service.ts:2608</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>
724
+ </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/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2651">server/src/app.service.ts:2651</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>
687
725
  <p>Always saves to the user directory — common prompt files are never overwritten.
688
726
  If the target folder does not exist it is created automatically.
689
727
  Passing <code>'shared'</code> as <code>folderName</code> writes to the root user prompts directory.</p>
@@ -693,11 +731,11 @@ rather than writing an empty document.</p>
693
731
  </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>
694
732
  </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>
695
733
  </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>
696
- </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>
734
+ </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/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L1513">server/src/app.service.ts:1513</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>
697
735
  <p>The shape of <code>preferences</code> is application-defined. Pass any serializable object;
698
736
  it will be stored as JSON and returned verbatim by <a href="#getuserpreferences" class="tsd-kind-method">getUserPreferences</a>.</p>
699
737
  </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>
700
- </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>
738
+ </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/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L1327">server/src/app.service.ts:1327</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>
701
739
  <p><strong>Action values:</strong></p>
702
740
  <ul>
703
741
  <li><code>'speak'</code> <em>(default)</em> — all agents hear the message; <code>targets</code> (if provided) restricts which agents may respond</li>
@@ -714,11 +752,11 @@ it will be stored as JSON and returned verbatim by <a href="#getuserpreferences"
714
752
  </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>
715
753
  </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>
716
754
  </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>
717
- </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>
755
+ </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 the room does not exist</p>
718
756
  </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>
719
757
  </code><button type="button">Copy</button></pre>
720
758
 
721
- </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>
759
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L921">server/src/app.service.ts:921</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>
722
760
  <p>Only fields that are present in the <code>updates</code> object are changed;
723
761
  omitted fields are left as-is.</p>
724
762
  </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>
@@ -733,9 +771,13 @@ omitted fields are left as-is.</p>
733
771
  <li><code>allowSearch</code> — enable web search capability (provider must support it)</li>
734
772
  <li><code>beginInstruction</code> — prompt sent when the host app triggers a &quot;Begin&quot; action</li>
735
773
  </ul>
736
- </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>
737
- </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>
774
+ </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-39">Throws<a href="#throws-39" 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>
775
+ </div></div><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L1692">server/src/app.service.ts:1692</a></li></ul></aside></div></li></ul></section><section class="tsd-panel tsd-member"><h3 class="tsd-anchor-link" id="updatetransactionstatus"><span>update<wbr/>Transaction<wbr/>Status</span><a href="#updatetransactionstatus" 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="updatetransactionstatus-1"><span class="tsd-kind-call-signature">updateTransactionStatus</span><span class="tsd-signature-symbol">(</span><br/>    <span class="tsd-kind-parameter">paymentId</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">status</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">&quot;pending&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;succeeded&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;failed&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;cancelled&quot;</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="#updatetransactionstatus-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 status of an existing transaction.</p>
776
+ <p>Call this when your payment provider webhook confirms the final outcome of a payment.</p>
777
+ </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">paymentId</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>The payment provider ID used when the transaction was recorded</p>
778
+ </div></li><li><span><span class="tsd-kind-parameter">status</span>: <span class="tsd-signature-type">&quot;pending&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;succeeded&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;failed&quot;</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-type">&quot;cancelled&quot;</span></span><div class="tsd-comment tsd-typography"><p>New status (<code>'succeeded'</code>, <code>'failed'</code>, or <code>'cancelled'</code>)</p>
779
+ </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/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2708">server/src/app.service.ts:2708</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>
738
780
  </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>
739
781
  </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>
740
782
  </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>
741
- <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/166ead89c755909663f60e887456633ae6d0e7ec/server/src/app.service.ts#L2697">server/src/app.service.ts:2697</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.9</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>
783
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/e166038cb9e0f86c25afdc3088573953cc05d748/server/src/app.service.ts#L2788">server/src/app.service.ts:2788</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="#compactagentconversation"><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/>Agent<wbr/>Conversation</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="#gettransactionbypaymentid"><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/>By<wbr/>Payment<wbr/>Id</span></a><a href="#gettransactions"><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/>Transactions</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="#recordtransaction"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Method"><use href="../assets/icons.svg#icon-2048"></use></svg><span>record<wbr/>Transaction</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="#updatetransactionstatus"><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/>Transaction<wbr/>Status</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.1.1</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>