briyah 1.4.0 → 1.4.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 (69) hide show
  1. package/README.md +160 -0
  2. package/docs/classes/Agent.html +20 -20
  3. package/docs/classes/Briyah.html +14 -14
  4. package/docs/classes/BriyahConfigService.html +5 -5
  5. package/docs/classes/NativeToolRegistry.html +6 -6
  6. package/docs/classes/Room.html +35 -35
  7. package/docs/classes/RoomMessage.html +11 -11
  8. package/docs/enums/MessageAction.html +3 -3
  9. package/docs/functions/availableToolPacks.html +2 -2
  10. package/docs/functions/dnd5eTools.html +2 -2
  11. package/docs/functions/enabledToolPacks.html +2 -2
  12. package/docs/functions/registerToolPacks.html +2 -2
  13. package/docs/hierarchy.html +1 -1
  14. package/docs/index.html +68 -2
  15. package/docs/interfaces/AgentInfo.html +3 -3
  16. package/docs/interfaces/AgentMessagesResponse.html +2 -2
  17. package/docs/interfaces/AppService.html +122 -122
  18. package/docs/interfaces/Artifact.html +4 -4
  19. package/docs/interfaces/ArtifactMetadata.html +3 -3
  20. package/docs/interfaces/ArtifactWriteOptions.html +5 -5
  21. package/docs/interfaces/AttachDocumentResponse.html +2 -2
  22. package/docs/interfaces/BriyahConfigOptions.html +9 -9
  23. package/docs/interfaces/ChapterInfo.html +2 -2
  24. package/docs/interfaces/Character.html +2 -2
  25. package/docs/interfaces/CreateAgentResponse.html +2 -2
  26. package/docs/interfaces/CreateRoomResponse.html +2 -2
  27. package/docs/interfaces/CreateStoryResponse.html +2 -2
  28. package/docs/interfaces/FileList.html +2 -2
  29. package/docs/interfaces/FileMetadata.html +3 -3
  30. package/docs/interfaces/IConfigService.html +3 -3
  31. package/docs/interfaces/LoggingOptions.html +6 -6
  32. package/docs/interfaces/Message.html +2 -2
  33. package/docs/interfaces/ModelInfo.html +2 -2
  34. package/docs/interfaces/NativeToolDefinition.html +8 -8
  35. package/docs/interfaces/PreparedPromptResponse.html +2 -2
  36. package/docs/interfaces/ProcessTextResponse.html +2 -2
  37. package/docs/interfaces/PromptFile.html +2 -2
  38. package/docs/interfaces/PromptFileContent.html +2 -2
  39. package/docs/interfaces/PromptFilesResponse.html +2 -2
  40. package/docs/interfaces/PromptFolder.html +2 -2
  41. package/docs/interfaces/PromptFoldersResponse.html +2 -2
  42. package/docs/interfaces/RoomDetails.html +4 -4
  43. package/docs/interfaces/RoomInfo.html +2 -2
  44. package/docs/interfaces/RoomMessageUpdate.html +2 -2
  45. package/docs/interfaces/RoomMessagesResponse.html +2 -2
  46. package/docs/interfaces/SendMessageResult.html +2 -2
  47. package/docs/interfaces/StoryErrorEvent.html +3 -3
  48. package/docs/interfaces/StoryIdea.html +2 -2
  49. package/docs/interfaces/StoryInfo.html +3 -3
  50. package/docs/interfaces/StoryIntroduceCharacterEvent.html +3 -3
  51. package/docs/interfaces/StoryProgressChapterEvent.html +3 -3
  52. package/docs/interfaces/StoryState.html +5 -5
  53. package/docs/interfaces/StoryStateEvent.html +3 -3
  54. package/docs/interfaces/ToolArtifact.html +4 -4
  55. package/docs/interfaces/ToolCaller.html +5 -5
  56. package/docs/interfaces/ToolDefinition.html +2 -2
  57. package/docs/interfaces/ToolHelpers.html +4 -4
  58. package/docs/interfaces/ToolParameter.html +2 -2
  59. package/docs/interfaces/ToolRoomAccess.html +9 -9
  60. package/docs/interfaces/ToolSummary.html +2 -2
  61. package/docs/interfaces/ToolsResponse.html +2 -2
  62. package/docs/interfaces/Transaction.html +2 -2
  63. package/docs/interfaces/TransactionHistoryResponse.html +2 -2
  64. package/docs/modules.html +1 -1
  65. package/docs/types/PromptScope.html +1 -1
  66. package/docs/types/ToolContext.html +2 -2
  67. package/docs/types/ToolRunResult.html +1 -1
  68. package/package.json +3 -2
  69. package/src/tools/packs/dnd5e/README.md +614 -0
@@ -1,2 +1,2 @@
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>enabledToolPacks | Briyah SDK - v1.4.0</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.4.0</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">enabledToolPacks</a></li></ul><h1>Function enabledToolPacks</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="enabledtoolpacks"><span class="tsd-kind-call-signature">enabledToolPacks</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="#enabledtoolpacks" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>The names of the packs <a href="registerToolPacks.html" class="tsd-kind-function">registerToolPacks</a> has actually registered.</p>
2
- </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/42abde56c2aa5dcc25d18a2c58a7b7f2503d123a/server/src/tools/packs/index.ts#L79">server/src/tools/packs/index.ts:79</a></li></ul></aside></div></li></ul></section></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></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.4.0</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>
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>enabledToolPacks | Briyah SDK - v1.4.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.4.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">enabledToolPacks</a></li></ul><h1>Function enabledToolPacks</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="enabledtoolpacks"><span class="tsd-kind-call-signature">enabledToolPacks</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="#enabledtoolpacks" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>The names of the packs <a href="registerToolPacks.html" class="tsd-kind-function">registerToolPacks</a> has actually registered.</p>
2
+ </div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h4><aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/495770d54c9db1c8b99331bc8c266b2c7ac9bdbc/server/src/tools/packs/index.ts#L79">server/src/tools/packs/index.ts:79</a></li></ul></aside></div></li></ul></section></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></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.4.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>
@@ -1,6 +1,6 @@
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>registerToolPacks | Briyah SDK - v1.4.0</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.4.0</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">registerToolPacks</a></li></ul><h1>Function registerToolPacks</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="registertoolpacks"><span class="tsd-kind-call-signature">registerToolPacks</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">registry</span><span class="tsd-signature-symbol">:</span> <a href="../classes/NativeToolRegistry.html" class="tsd-signature-type tsd-kind-class">NativeToolRegistry</a><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">packList</span><span class="tsd-signature-symbol">:</span> <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><a href="#registertoolpacks" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Registers the named tool packs into the native registry.</p>
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>registerToolPacks | Briyah SDK - v1.4.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.4.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">registerToolPacks</a></li></ul><h1>Function registerToolPacks</h1></div><section class="tsd-panel"><ul class="tsd-signatures"><li class=""><div class="tsd-signature tsd-anchor-link" id="registertoolpacks"><span class="tsd-kind-call-signature">registerToolPacks</span><span class="tsd-signature-symbol">(</span><span class="tsd-kind-parameter">registry</span><span class="tsd-signature-symbol">:</span> <a href="../classes/NativeToolRegistry.html" class="tsd-signature-type tsd-kind-class">NativeToolRegistry</a><span class="tsd-signature-symbol">,</span> <span class="tsd-kind-parameter">packList</span><span class="tsd-signature-symbol">:</span> <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><a href="#registertoolpacks" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="../assets/icons.svg#icon-anchor"></use></svg></a></div><div class="tsd-description"><div class="tsd-comment tsd-typography"><p>Registers the named tool packs into the native registry.</p>
2
2
  </div><div class="tsd-parameters"><h4 class="tsd-parameters-title">Parameters</h4><ul class="tsd-parameter-list"><li><span><span class="tsd-kind-parameter">registry</span>: <a href="../classes/NativeToolRegistry.html" class="tsd-signature-type tsd-kind-class">NativeToolRegistry</a></span><div class="tsd-comment tsd-typography"><p>The process-wide native tool registry</p>
3
3
  </div></li><li><span><span class="tsd-kind-parameter">packList</span>: <span class="tsd-signature-type">string</span></span><div class="tsd-comment tsd-typography"><p>A comma-separated list of pack names, e.g. from
4
4
  <code>process.env.BRIYAH_TOOL_PACKS</code>. Empty or undefined registers nothing.</p>
5
5
  </div></li></ul></div><h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">[]</span></h4><p>The names of the tools that were registered</p>
6
- <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/42abde56c2aa5dcc25d18a2c58a7b7f2503d123a/server/src/tools/packs/index.ts#L43">server/src/tools/packs/index.ts:43</a></li></ul></aside></div></li></ul></section></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></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.4.0</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>
6
+ <aside class="tsd-sources"><ul><li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/495770d54c9db1c8b99331bc8c266b2c7ac9bdbc/server/src/tools/packs/index.ts#L43">server/src/tools/packs/index.ts:43</a></li></ul></aside></div></li></ul></section></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></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.4.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>
@@ -1 +1 @@
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>Briyah SDK - v1.4.0</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.4.0</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"><h1>Briyah SDK - v1.4.0</h1></div><h2>Hierarchy Summary</h2><ul class="tsd-full-hierarchy"><li data-refl="1639" id="IConfigService"><a href="interfaces/IConfigService.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Interface"><use href="assets/icons.svg#icon-256"></use></svg>IConfigService</a><ul><li data-refl="63" id="BriyahConfigService"><a href="classes/BriyahConfigService.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="assets/icons.svg#icon-128"></use></svg>BriyahConfigService</a></li></ul></li></ul><ul class="tsd-full-hierarchy"><li data-refl="745" id="Message"><a href="interfaces/Message.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Interface"><use href="assets/icons.svg#icon-256"></use></svg>Message</a><ul><li data-refl="1584" id="RoomMessage"><a href="classes/RoomMessage.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="assets/icons.svg#icon-128"></use></svg>RoomMessage</a></li></ul></li></ul></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></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.4.0</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>
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>Briyah SDK - v1.4.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.4.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"><h1>Briyah SDK - v1.4.1</h1></div><h2>Hierarchy Summary</h2><ul class="tsd-full-hierarchy"><li data-refl="1639" id="IConfigService"><a href="interfaces/IConfigService.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Interface"><use href="assets/icons.svg#icon-256"></use></svg>IConfigService</a><ul><li data-refl="63" id="BriyahConfigService"><a href="classes/BriyahConfigService.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="assets/icons.svg#icon-128"></use></svg>BriyahConfigService</a></li></ul></li></ul><ul class="tsd-full-hierarchy"><li data-refl="745" id="Message"><a href="interfaces/Message.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Interface"><use href="assets/icons.svg#icon-256"></use></svg>Message</a><ul><li data-refl="1584" id="RoomMessage"><a href="classes/RoomMessage.html"><svg class="tsd-kind-icon" viewBox="0 0 24 24" aria-label="Class"><use href="assets/icons.svg#icon-128"></use></svg>RoomMessage</a></li></ul></li></ul></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></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.4.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>
package/docs/index.html CHANGED
@@ -1,4 +1,4 @@
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>Briyah SDK - v1.4.0</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.4.0</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"><h1>Briyah SDK - v1.4.0</h1></div><div class="tsd-panel tsd-typography"><h1 id="briyah-sdk" class="tsd-anchor-link">Briyah SDK<a href="#briyah-sdk" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h1>
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>Briyah SDK - v1.4.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.4.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"><h1>Briyah SDK - v1.4.1</h1></div><div class="tsd-panel tsd-typography"><h1 id="briyah-sdk" class="tsd-anchor-link">Briyah SDK<a href="#briyah-sdk" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h1>
2
2
  <p>Briyah is an SDK for AI agents, multi-agent rooms, and interactive stories. It wraps the Briyah runtime as a single class with per-user data isolation and balance tracking, and supports Anthropic, OpenAI, Google, Grok, DeepSeek, Together, and Fal as LLM providers.</p>
3
3
  <p>What's in the package:</p>
4
4
  <ul>
@@ -122,6 +122,50 @@ An agent may chain several tool calls privately before responding.</li>
122
122
  <pre><code class="typescript"><span class="hl-5">// Agent Management</span><br/><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><span class="hl-4">provider</span><span class="hl-1">, </span><span class="hl-4">name</span><span class="hl-1">, </span><span class="hl-4">nickname</span><span class="hl-1">, </span><span class="hl-4">description</span><span class="hl-1">, </span><span class="hl-4">model</span><span class="hl-1">);</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">agents</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">listAgents</span><span class="hl-1">();</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">deleteAgent</span><span class="hl-1">(</span><span class="hl-4">agentId</span><span class="hl-1">);</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">reloadAgent</span><span class="hl-1">(</span><span class="hl-4">agentId</span><span class="hl-1">); </span><span class="hl-5">// Clear conversation history (keeps any prior summary)</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">compactAgentConversation</span><span class="hl-1">(</span><span class="hl-4">agentId</span><span class="hl-1">); </span><span class="hl-5">// Summarize history into a single message</span><br/><br/><span class="hl-5">// Room Management</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">room</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><span class="hl-4">name</span><span class="hl-1">, </span><span class="hl-4">goal</span><span class="hl-1">, </span><span class="hl-4">agentIds</span><span class="hl-1">);</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">rooms</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">listRooms</span><span class="hl-1">();</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-4">content</span><span class="hl-1">, </span><span class="hl-4">sender</span><span class="hl-1">, </span><span class="hl-4">action</span><span class="hl-1">?);</span><br/><br/><span class="hl-5">// Agents that belong to a room: created inside it, named after it, deleted with it,</span><br/><span class="hl-5">// and left out of listAgents(). agentName is the bare name; the room&#39;s is prefixed on.</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">createRoomAgent</span><span class="hl-1">(</span><span class="hl-4">roomId</span><span class="hl-1">, { </span><span class="hl-4">aiServiceName</span><span class="hl-1">, </span><span class="hl-4">agentName</span><span class="hl-1">, </span><span class="hl-4">description</span><span class="hl-1">, </span><span class="hl-4">aiModel</span><span class="hl-1">, </span><span class="hl-4">promptName</span><span class="hl-1"> });</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">removeRoomAgent</span><span class="hl-1">(</span><span class="hl-4">roomId</span><span class="hl-1">, </span><span class="hl-4">agentId</span><span class="hl-1">);</span><br/><br/><span class="hl-5">// Native tools (recommended for SDK integrations — see Example 8)</span><br/><span class="hl-4">briyah</span><span class="hl-1">.</span><span class="hl-0">registerTool</span><span class="hl-1">({ </span><span class="hl-4">name</span><span class="hl-1">, </span><span class="hl-4">description</span><span class="hl-1">, </span><span class="hl-4">parameters</span><span class="hl-1">, </span><span class="hl-4">handler</span><span class="hl-1"> }); </span><span class="hl-5">// process-level</span><br/><span class="hl-4">briyah</span><span class="hl-1">.</span><span class="hl-0">listNativeTools</span><span class="hl-1">();</span><br/><br/><span class="hl-5">// User-authored (string-code) tools — only when allowUserAuthoredTools is enabled</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-4">tools</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">listTools</span><span class="hl-1">();</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-4">tool</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">createTool</span><span class="hl-1">({ </span><span class="hl-4">name</span><span class="hl-1">, </span><span class="hl-4">description</span><span class="hl-1">, </span><span class="hl-4">parameters</span><span class="hl-1">, </span><span class="hl-4">code</span><span class="hl-1">, timeoutMs? });</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">updateTool</span><span class="hl-1">(</span><span class="hl-4">name</span><span class="hl-1">, </span><span class="hl-4">tool</span><span class="hl-1">);</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">deleteTool</span><span class="hl-1">(</span><span class="hl-4">name</span><span class="hl-1">);</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-4">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">testTool</span><span class="hl-1">(</span><span class="hl-4">name</span><span class="hl-1">, </span><span class="hl-4">args</span><span class="hl-1">); </span><span class="hl-5">// { ok: true, result } | { ok: false, error }</span><br/><br/><span class="hl-5">// Story Management</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-4">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><span class="hl-4">name</span><span class="hl-1">, </span><span class="hl-4">idea</span><span class="hl-1">, </span><span class="hl-4">userCharacterDesc</span><span class="hl-1">, </span><span class="hl-4">otherCharactersDesc</span><span class="hl-1">, </span><span class="hl-4">storyModel</span><span class="hl-1">?);</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">progressStory</span><span class="hl-1">(</span><span class="hl-4">storyId</span><span class="hl-1">);</span><br/><br/><span class="hl-5">// Text Processing</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-4">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">agentId</span><span class="hl-1">, </span><span class="hl-4">text</span><span class="hl-1">);</span><br/><br/><span class="hl-5">// Image Generation (image-capable providers; called on the Agent object — see Example 9)</span><br/><span class="hl-4">const</span><span class="hl-1"> { </span><span class="hl-4">artifactId</span><span class="hl-1"> } = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">agent</span><span class="hl-1">.</span><span class="hl-0">generateImage</span><span class="hl-1">(</span><span class="hl-4">prompt</span><span class="hl-1">, </span><span class="hl-4">imageProperties</span><span class="hl-1">);</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-4">edited</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">agent</span><span class="hl-1">.</span><span class="hl-0">editImage</span><span class="hl-1">(</span><span class="hl-4">prompt</span><span class="hl-1">, </span><span class="hl-4">imageProperties</span><span class="hl-1">, </span><span class="hl-4">referenceArtifactIds</span><span class="hl-1">);</span><br/><br/><span class="hl-5">// File Attachments</span><br/><span class="hl-4">const</span><span class="hl-1"> </span><span class="hl-4">attachment</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">attachDocument</span><span class="hl-1">(</span><span class="hl-4">agentId</span><span class="hl-1">, </span><span class="hl-4">fileName</span><span class="hl-1">, </span><span class="hl-4">fileData</span><span class="hl-1">);</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">deleteAttachedFile</span><span class="hl-1">(</span><span class="hl-4">agentId</span><span class="hl-1">, </span><span class="hl-4">fileName</span><span class="hl-1">); </span><span class="hl-5">// by filename</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">deleteAttachedFileById</span><span class="hl-1">(</span><span class="hl-4">documentId</span><span class="hl-1">); </span><span class="hl-5">// by document ID</span>
123
123
  </code><button type="button">Copy</button></pre>
124
124
 
125
+ <h2 id="prompt-folders" class="tsd-anchor-link">Prompt Folders<a href="#prompt-folders" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2>
126
+ <p>An agent's behaviour comes from a <strong>prompt folder</strong>, not from its description. The folder
127
+ holds the templates the room renders on every turn — most importantly <code>perceive.prompt</code>, which
128
+ tells the agent what it is and what it may do, and <code>perceive.json</code>, the JSON schema its replies
129
+ must satisfy. Two agents on the same model with the same description behave completely
130
+ differently if they were built from different folders.</p>
131
+ <p><code>init()</code> seeds the bundled folders into <code>{dataPath}/common/prompts/</code>, so they are on disk before
132
+ your first <code>createAgent</code> call. Existing files are preserved on upgrade, so anything you edit
133
+ survives.</p>
134
+ <pre><code class="typescript"><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">appService</span><span class="hl-1"> = </span><span class="hl-4">briyah</span><span class="hl-1">.</span><span class="hl-0">getAppService</span><span class="hl-1">(</span><span class="hl-2">&#39;user-123&#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">appService</span><span class="hl-1">.</span><span class="hl-0">listPromptFolders</span><span class="hl-1">());</span><br/><span class="hl-5">// default, dungeon_master, dnd_player, character_creator, campaign_designer,</span><br/><span class="hl-5">// dnd_room_moderator, narrator, character, illustrator, ...</span>
135
+ </code><button type="button">Copy</button></pre>
136
+
137
+ <p><strong>The folder is the sixth argument to <code>createAgent</code>, and it defaults to <code>'default'</code></strong> — a
138
+ generic conversational agent. Passing a role folder is what makes the agent that role:</p>
139
+ <pre><code class="typescript"><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">dm</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;Dungeon Master&#39;</span><span class="hl-1">, </span><span class="hl-5">// agentName — a label; used in logs and the UI</span><br/><span class="hl-1"> </span><span class="hl-2">&#39;DM&#39;</span><span class="hl-1">, </span><span class="hl-5">// agentNickname — the name the room routes by</span><br/><span class="hl-1"> </span><span class="hl-2">&#39;Runs the game.&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-2">&#39;claude-sonnet-5&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-2">&#39;dungeon_master&#39;</span><span class="hl-1">, </span><span class="hl-5">// &lt;- the prompt folder</span><br/><span class="hl-1">);</span>
140
+ </code><button type="button">Copy</button></pre>
141
+
142
+ <p><code>agentNickname</code> is the identity: messages are addressed to it, artifact viewers are lists of
143
+ it, and it is what an agent writes into <code>targets</code>. <code>agentName</code> is a label. Give a character the
144
+ nickname you want it called by.</p>
145
+ <p>To write your own folder, copy a bundled one out of <code>{dataPath}/common/prompts/</code>, rename the
146
+ directory, and edit it — a folder in the user data directory takes precedence over the common
147
+ one of the same name.</p>
148
+ <h2 id="tool-packs" class="tsd-anchor-link">Tool Packs<a href="#tool-packs" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2>
149
+ <p>A tool pack is a set of native tools that ships with Briyah and registers only when asked for.
150
+ <code>dnd5e</code> is the one that exists: seventeen tools for dice, character sheets, the rules engine and
151
+ a bestiary. Turn it on either way:</p>
152
+ <pre><code class="typescript"><span class="hl-5">// By name — the SDK registers the pack during construction</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">briyah</span><span class="hl-1"> = </span><span class="hl-6">new</span><span class="hl-1"> </span><span class="hl-0">Briyah</span><span class="hl-1">({ </span><span class="hl-4">envOverrides:</span><span class="hl-1"> { </span><span class="hl-4">BRIYAH_TOOL_PACKS:</span><span class="hl-1"> </span><span class="hl-2">&#39;dnd5e&#39;</span><span class="hl-1"> } });</span><br/><br/><span class="hl-5">// Or pass the definitions yourself, which also lets you filter or wrap them</span><br/><span class="hl-3">import</span><span class="hl-1"> { </span><span class="hl-4">dnd5eTools</span><span class="hl-1">, </span><span class="hl-4">availableToolPacks</span><span class="hl-1"> } </span><span class="hl-3">from</span><span class="hl-1"> </span><span class="hl-2">&#39;briyah&#39;</span><span class="hl-1">;</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">briyah</span><span class="hl-1"> = </span><span class="hl-6">new</span><span class="hl-1"> </span><span class="hl-0">Briyah</span><span class="hl-1">({ </span><span class="hl-4">tools:</span><span class="hl-1"> </span><span class="hl-0">dnd5eTools</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-0">availableToolPacks</span><span class="hl-1">()); </span><span class="hl-5">// [&#39;dnd5e&#39;]</span>
153
+ </code><button type="button">Copy</button></pre>
154
+
155
+ <p>Registering makes the tools <em>grantable</em>, not granted. An agent may only run the ones named in
156
+ its <code>toolNames</code>:</p>
157
+ <pre><code class="typescript"><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">dm</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><span class="hl-2">&#39;Dungeon Master&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;DM&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;Runs the game.&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;claude-sonnet-5&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;dungeon_master&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">undefined</span><span class="hl-1">, </span><span class="hl-6">null</span><span class="hl-1">, </span><span class="hl-8">0</span><span class="hl-1">, </span><span class="hl-2">&#39;&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> { </span><span class="hl-4">toolNames:</span><span class="hl-1"> [</span><span class="hl-2">&#39;roll_dice&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;check&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;apply_hp&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;stat_block&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;read_sheet&#39;</span><span class="hl-1">] },</span><br/><span class="hl-1">);</span>
158
+ </code><button type="button">Copy</button></pre>
159
+
160
+ <p>Packs also ship read-only <strong>documents</strong> — rules text an agent carries in every call. They seed
161
+ into <code>{dataPath}/common/artifacts/</code>, appear in <code>listUserArtifacts()</code> alongside your own, and
162
+ attach by id:</p>
163
+ <pre><code class="typescript"><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">attachArtifactToAgent</span><span class="hl-1">(</span><span class="hl-4">dm</span><span class="hl-1">.</span><span class="hl-4">id</span><span class="hl-1">, </span><span class="hl-2">&#39;pack:dnd5e.dungeon_master-procedure&#39;</span><span class="hl-1">);</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">attachArtifactToAgent</span><span class="hl-1">(</span><span class="hl-4">player</span><span class="hl-1">.</span><span class="hl-4">id</span><span class="hl-1">, </span><span class="hl-2">&#39;pack:dnd5e.class-bard&#39;</span><span class="hl-1">);</span>
164
+ </code><button type="button">Copy</button></pre>
165
+
166
+ <p>A document sits in that agent's cached prompt prefix on every call, so attach what it needs and
167
+ nothing more. <code>src/tools/packs/dnd5e/README.md</code> in this package lists all seventeen tools and
168
+ which agent each document belongs to.</p>
125
169
  <h2 id="usage-examples" class="tsd-anchor-link">Usage Examples<a href="#usage-examples" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2>
126
170
  <h3 id="example-1-multi-user-setup" class="tsd-anchor-link">Example 1: Multi-User Setup<a href="#example-1-multi-user-setup" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3>
127
171
  <pre><code class="typescript"><span class="hl-3">import</span><span class="hl-1"> { </span><span class="hl-4">Briyah</span><span class="hl-1"> } </span><span class="hl-3">from</span><span class="hl-1"> </span><span class="hl-2">&#39;briyah&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-5">// Initialize once at application startup</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">briyah</span><span class="hl-1"> = </span><span class="hl-6">new</span><span class="hl-1"> </span><span class="hl-0">Briyah</span><span class="hl-1">({</span><br/><span class="hl-1"> </span><span class="hl-4">dataPath:</span><span class="hl-1"> </span><span class="hl-2">&#39;./data/briyah&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-4">startingBalance:</span><span class="hl-1"> </span><span class="hl-8">10.00</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">briyah</span><span class="hl-1">.</span><span class="hl-0">init</span><span class="hl-1">();</span><br/><br/><span class="hl-5">// In your route handler or service</span><br/><span class="hl-6">async</span><span class="hl-1"> </span><span class="hl-6">function</span><span class="hl-1"> </span><span class="hl-0">handleUserRequest</span><span class="hl-1">(</span><span class="hl-4">userId</span><span class="hl-1">: </span><span class="hl-9">string</span><span class="hl-1">, </span><span class="hl-4">message</span><span class="hl-1">: </span><span class="hl-9">string</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">appService</span><span class="hl-1"> = </span><span class="hl-4">briyah</span><span class="hl-1">.</span><span class="hl-0">getAppService</span><span class="hl-1">(</span><span class="hl-4">userId</span><span class="hl-1">);</span><br/><br/><span class="hl-1"> </span><span class="hl-5">// Each user gets their own isolated AppService</span><br/><span class="hl-1"> </span><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">agents</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">listAgents</span><span class="hl-1">();</span><br/><br/><span class="hl-1"> </span><span class="hl-5">// ... process user request</span><br/><span class="hl-1">}</span><br/><br/><span class="hl-5">// Cleanup at application shutdown</span><br/><span class="hl-4">process</span><span class="hl-1">.</span><span class="hl-0">on</span><span class="hl-1">(</span><span class="hl-2">&#39;SIGINT&#39;</span><span class="hl-1">, </span><span class="hl-6">async</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">await</span><span class="hl-1"> </span><span class="hl-4">briyah</span><span class="hl-1">.</span><span class="hl-0">shutdown</span><span class="hl-1">();</span><br/><span class="hl-1"> </span><span class="hl-4">process</span><span class="hl-1">.</span><span class="hl-0">exit</span><span class="hl-1">(</span><span class="hl-8">0</span><span class="hl-1">);</span><br/><span class="hl-1">});</span>
@@ -201,6 +245,28 @@ An agent may chain several tool calls privately before responding.</li>
201
245
  <li><strong>Stories</strong>: to make a pair selectable in the story UI's image-model dropdown, add an entry to <code>{dataPath}/common/config/image_models.json</code> with <code>&quot;service&quot;: &quot;ComfyUI&quot;</code> and the pair name as <code>&quot;model&quot;</code> in the <code>generation</code> and <code>editing</code> blocks, with <code>&quot;centsPerImage&quot;: 0</code>.</li>
202
246
  </ul>
203
247
  <p><strong>Custom workflows.</strong> Any ComfyUI workflow can be used: build it in the ComfyUI web UI, run it once, then use Export (API format) and replace the values you want parameterized with tokens — <code>{{prompt}}</code> (may be embedded in a longer string), <code>{{seed}}</code>, <code>{{width}}</code>, <code>{{height}}</code> (replaced as numbers), and <code>{{ref_image}}</code> (edit workflows, the <code>LoadImage</code> input). Save the files as <code>{name}.t2i.json</code> (used by <code>generateImage</code>) and <code>{name}.edit.json</code> (used by <code>editImage</code>) in <code>{dataPath}/common/config/comfyui-workflows/</code>, or in <code>{dataPath}/user/{userId}/comfyui-workflows/</code> for a per-user override (checked first). The pair name becomes the model name. For multi-reference support, an edit workflow must contain exactly one <code>ReferenceLatent</code> node fed by a <code>VAEEncode</code> fed by a <code>LoadImage</code>; extra references are added at request time by cloning that chain.</p>
248
+ <h3 id="example-10-a-turn-based-table-with-a-human-player" class="tsd-anchor-link">Example 10: A turn-based table with a human player<a href="#example-10-a-turn-based-table-with-a-human-player" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3>
249
+ <p>Example 5 sends one message and reads the transcript back, which suits a batch job. A game or
250
+ any human-in-the-loop app needs the other shape: the agents take several turns among themselves,
251
+ then stop and wait for the person. Three things make that work.</p>
252
+ <p><strong><code>turnMode: 'directed'</code></strong> — only the agent a message names is asked to reply, and the room
253
+ leader answers anything it cannot place. The default, <code>'broadcast'</code>, prompts <em>every</em> agent for
254
+ <em>every</em> message and keeps one reply, which costs several times as much and is wrong for a table
255
+ where one person speaks at a time.</p>
256
+ <p><strong>A human-controlled agent</strong> — <code>createAgent</code>'s seventh argument. The room delivers messages to
257
+ it and then stops rather than generating a reply, which is what yields the floor to your console.</p>
258
+ <p><strong>The room message emitter</strong> — the only way to see the conversation as it happens. It fires on
259
+ every change with the newest message and the room's state.</p>
260
+ <pre><code class="typescript"><span class="hl-3">import</span><span class="hl-1"> { </span><span class="hl-4">Briyah</span><span class="hl-1">, </span><span class="hl-4">dnd5eTools</span><span class="hl-1"> } </span><span class="hl-3">from</span><span class="hl-1"> </span><span class="hl-2">&#39;briyah&#39;</span><span class="hl-1">;</span><br/><span class="hl-3">import</span><span class="hl-1"> </span><span class="hl-6">*</span><span class="hl-1"> </span><span class="hl-3">as</span><span class="hl-1"> </span><span class="hl-4">readline</span><span class="hl-1"> </span><span class="hl-3">from</span><span class="hl-1"> </span><span class="hl-2">&#39;node:readline/promises&#39;</span><span class="hl-1">;</span><br/><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">briyah</span><span class="hl-1"> = </span><span class="hl-6">new</span><span class="hl-1"> </span><span class="hl-0">Briyah</span><span class="hl-1">({ </span><span class="hl-4">dataPath:</span><span class="hl-1"> </span><span class="hl-2">&#39;./briyah-data&#39;</span><span class="hl-1">, </span><span class="hl-4">tools:</span><span class="hl-1"> </span><span class="hl-0">dnd5eTools</span><span class="hl-1">() });</span><br/><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">briyah</span><span class="hl-1">.</span><span class="hl-0">init</span><span class="hl-1">(); </span><span class="hl-5">// seeds prompt folders and pack documents</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">app</span><span class="hl-1"> = </span><span class="hl-4">briyah</span><span class="hl-1">.</span><span class="hl-0">getAppService</span><span class="hl-1">(</span><span class="hl-2">&#39;user-123&#39;</span><span class="hl-1">);</span><br/><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">dm</span><span class="hl-1"> = </span><span class="hl-4">app</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><span class="hl-2">&#39;Dungeon Master&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;DM&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;Runs the game.&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;claude-sonnet-5&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-2">&#39;dungeon_master&#39;</span><span class="hl-1">, </span><span class="hl-6">undefined</span><span class="hl-1">, </span><span class="hl-6">null</span><span class="hl-1">, </span><span class="hl-8">0</span><span class="hl-1">, </span><span class="hl-2">&#39;&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> { </span><span class="hl-4">toolNames:</span><span class="hl-1"> [</span><span class="hl-2">&#39;roll_dice&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;check&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;apply_hp&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;stat_block&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;read_sheet&#39;</span><span class="hl-1">] },</span><br/><span class="hl-1">);</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">rogue</span><span class="hl-1"> = </span><span class="hl-4">app</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><span class="hl-2">&#39;Vex&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;Vex&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;A wary scout.&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;claude-haiku-4-5&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;dnd_player&#39;</span><span class="hl-1">,</span><br/><span class="hl-1">);</span><br/><span class="hl-5">// The seventh argument is what makes this one wait for a person.</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">you</span><span class="hl-1"> = </span><span class="hl-4">app</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><span class="hl-2">&#39;Homer&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;Homer&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;A hopeful bard.&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;claude-haiku-4-5&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;dnd_player&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-6">true</span><span class="hl-1">,</span><br/><span class="hl-1">);</span><br/><br/><span class="hl-5">// createAgent builds the agent in memory; save() writes it to disk. Without this the</span><br/><span class="hl-5">// table exists for this process only and is gone on restart.</span><br/><span class="hl-1">[</span><span class="hl-4">dm</span><span class="hl-1">, </span><span class="hl-4">rogue</span><span class="hl-1">, </span><span class="hl-4">you</span><span class="hl-1">].</span><span class="hl-0">forEach</span><span class="hl-1">((</span><span class="hl-4">agent</span><span class="hl-1">) </span><span class="hl-6">=&gt;</span><span class="hl-1"> </span><span class="hl-4">agent</span><span class="hl-1">.</span><span class="hl-0">save</span><span class="hl-1">());</span><br/><br/><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">app</span><span class="hl-1">.</span><span class="hl-0">attachArtifactToAgent</span><span class="hl-1">(</span><span class="hl-4">dm</span><span class="hl-1">.</span><span class="hl-4">id</span><span class="hl-1">!, </span><span class="hl-2">&#39;pack:dnd5e.dungeon_master-procedure&#39;</span><span class="hl-1">);</span><br/><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">app</span><span class="hl-1">.</span><span class="hl-0">attachArtifactToAgent</span><span class="hl-1">(</span><span class="hl-4">rogue</span><span class="hl-1">.</span><span class="hl-4">id</span><span class="hl-1">!, </span><span class="hl-2">&#39;pack:dnd5e.class-rogue&#39;</span><span class="hl-1">);</span><br/><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">app</span><span class="hl-1">.</span><span class="hl-0">attachArtifactToAgent</span><span class="hl-1">(</span><span class="hl-4">you</span><span class="hl-1">.</span><span class="hl-4">id</span><span class="hl-1">!, </span><span class="hl-2">&#39;pack:dnd5e.class-bard&#39;</span><span class="hl-1">);</span><br/><br/><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">app</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;The Sunken Barrow&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> </span><span class="hl-2">&#39;A three-room dungeon crawl.&#39;</span><span class="hl-1">,</span><br/><span class="hl-1"> [</span><span class="hl-4">dm</span><span class="hl-1">.</span><span class="hl-4">id</span><span class="hl-1">!, </span><span class="hl-4">rogue</span><span class="hl-1">.</span><span class="hl-4">id</span><span class="hl-1">!, </span><span class="hl-4">you</span><span class="hl-1">.</span><span class="hl-4">id</span><span class="hl-1">!],</span><br/><span class="hl-1"> </span><span class="hl-2">&#39;DM&#39;</span><span class="hl-1">, </span><span class="hl-5">// roomLeader — answers anything the room cannot place</span><br/><span class="hl-1"> </span><span class="hl-2">&#39;directed&#39;</span><span class="hl-1">, </span><span class="hl-5">// turnMode</span><br/><span class="hl-1">);</span><br/><br/><span class="hl-5">// Watch the conversation. `waitingForHuman` is the cue to prompt your player.</span><br/><span class="hl-6">const</span><span class="hl-1"> </span><span class="hl-7">io</span><span class="hl-1"> = </span><span class="hl-4">readline</span><span class="hl-1">.</span><span class="hl-0">createInterface</span><span class="hl-1">({ </span><span class="hl-4">input:</span><span class="hl-1"> </span><span class="hl-4">process</span><span class="hl-1">.</span><span class="hl-4">stdin</span><span class="hl-1">, </span><span class="hl-4">output:</span><span class="hl-1"> </span><span class="hl-4">process</span><span class="hl-1">.</span><span class="hl-4">stdout</span><span class="hl-1"> });</span><br/><span class="hl-4">app</span><span class="hl-1">.</span><span class="hl-0">getRoomMessageEmitter</span><span class="hl-1">(</span><span class="hl-4">roomId</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-6">async</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-3">if</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"> &amp;&amp; </span><span class="hl-4">state</span><span class="hl-1">.</span><span class="hl-4">latestMessage</span><span class="hl-1">.</span><span class="hl-4">sender</span><span class="hl-1"> !== </span><span class="hl-2">&#39;Homer&#39;</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">`</span><span class="hl-6">${</span><span class="hl-4">state</span><span class="hl-10">.</span><span class="hl-4">latestMessage</span><span class="hl-10">.</span><span class="hl-4">sender</span><span class="hl-6">}</span><span class="hl-2">: </span><span class="hl-6">${</span><span class="hl-4">state</span><span class="hl-10">.</span><span class="hl-4">latestMessage</span><span class="hl-10">.</span><span class="hl-4">content</span><span class="hl-6">}</span><span class="hl-2">`</span><span class="hl-1">);</span><br/><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">state</span><span class="hl-1">.</span><span class="hl-4">waitingForHuman</span><span class="hl-1"> &amp;&amp; !</span><span class="hl-4">state</span><span class="hl-1">.</span><span class="hl-4">processingInProgress</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">line</span><span class="hl-1"> = </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">io</span><span class="hl-1">.</span><span class="hl-0">question</span><span class="hl-1">(</span><span class="hl-2">&#39;&gt; &#39;</span><span class="hl-1">);</span><br/><span class="hl-1"> </span><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">app</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-4">line</span><span class="hl-1">, </span><span class="hl-2">&#39;Homer&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;speak&#39;</span><span class="hl-1">, [</span><span class="hl-2">&#39;DM&#39;</span><span class="hl-1">]);</span><br/><span class="hl-1"> }</span><br/><span class="hl-1">});</span><br/><br/><span class="hl-3">await</span><span class="hl-1"> </span><span class="hl-4">app</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;Begin the adventure.&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;Homer&#39;</span><span class="hl-1">, </span><span class="hl-2">&#39;speak&#39;</span><span class="hl-1">, [</span><span class="hl-2">&#39;DM&#39;</span><span class="hl-1">]);</span>
261
+ </code><button type="button">Copy</button></pre>
262
+
263
+ <p>The emitter payload carries <code>latestMessage</code>, <code>messageIndex</code>, <code>totalCost</code>, <code>isPaused</code>,
264
+ <code>currentSpeaker</code>, <code>processingInProgress</code> and <code>waitingForHuman</code>. <code>messageIndex</code> counts messages
265
+ with thoughts and tool notices excluded, so compare it against a list you fetched the same way —
266
+ <code>getRoomMessages(roomId)</code> — or simply refetch when they disagree.</p>
267
+ <p>Two notes for a long-running process. Call <code>await briyah.shutdown()</code> before exiting or the
268
+ process will hang on open handles. And a room with no human-controlled agent never stops on its
269
+ own: the agents talk until the leader adjourns.</p>
204
270
  <h2 id="data-storage" class="tsd-anchor-link">Data Storage<a href="#data-storage" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h2>
205
271
  <p>Briyah stores data in the following structure:</p>
206
272
  <pre><code><span class="hl-1">{</span><span class="hl-4">dataPath</span><span class="hl-1">}/</span><br/><span class="hl-1">├── </span><span class="hl-4">common</span><span class="hl-1">/ # </span><span class="hl-4">Shared</span><span class="hl-1"> </span><span class="hl-4">across</span><span class="hl-1"> </span><span class="hl-4">all</span><span class="hl-1"> </span><span class="hl-4">users</span><br/><span class="hl-1">│ ├── </span><span class="hl-4">config</span><span class="hl-1">/ # </span><span class="hl-7">LLM</span><span class="hl-1"> </span><span class="hl-4">pricing</span><span class="hl-1"> </span><span class="hl-4">and</span><span class="hl-1"> </span><span class="hl-4">image</span><span class="hl-1">-</span><span class="hl-4">model</span><span class="hl-1"> </span><span class="hl-4">config</span><br/><span class="hl-1">│ ├── </span><span class="hl-4">prompts</span><span class="hl-1">/ # </span><span class="hl-4">Global</span><span class="hl-1"> </span><span class="hl-4">prompt</span><span class="hl-1"> </span><span class="hl-4">templates</span><br/><span class="hl-1">│ └── </span><span class="hl-4">published</span><span class="hl-1">-</span><span class="hl-4">agents</span><span class="hl-1">.</span><span class="hl-4">json</span><span class="hl-1"> # </span><span class="hl-4">Published</span><span class="hl-1"> </span><span class="hl-4">agent</span><span class="hl-1"> </span><span class="hl-4">mappings</span><br/><span class="hl-1">└── </span><span class="hl-4">user</span><span class="hl-1">/</span><br/><span class="hl-1"> └── {</span><span class="hl-4">userId</span><span class="hl-1">}/ # </span><span class="hl-4">Per</span><span class="hl-1">-</span><span class="hl-4">user</span><span class="hl-1"> </span><span class="hl-4">data</span><br/><span class="hl-1"> ├── </span><span class="hl-4">agents</span><span class="hl-1">/ # </span><span class="hl-4">Agent</span><span class="hl-1"> </span><span class="hl-4">configs</span><span class="hl-1"> </span><span class="hl-4">and</span><span class="hl-1"> </span><span class="hl-0">histories</span><span class="hl-1"> (</span><span class="hl-4">one</span><span class="hl-1"> </span><span class="hl-7">JSON</span><span class="hl-1"> </span><span class="hl-4">per</span><span class="hl-1"> </span><span class="hl-4">agent</span><span class="hl-1">)</span><br/><span class="hl-1"> ├── </span><span class="hl-4">rooms</span><span class="hl-1">/ # </span><span class="hl-4">Room</span><span class="hl-1"> </span><span class="hl-4">metadata</span><span class="hl-1">, </span><span class="hl-4">message</span><span class="hl-1"> </span><span class="hl-4">logs</span><span class="hl-1">, </span><span class="hl-0">artifacts</span><span class="hl-1"> (</span><span class="hl-4">one</span><span class="hl-1"> </span><span class="hl-4">folder</span><span class="hl-1"> </span><span class="hl-4">per</span><span class="hl-1"> </span><span class="hl-4">room</span><span class="hl-1">)</span><br/><span class="hl-1"> ├── </span><span class="hl-4">stories</span><span class="hl-1">/ # </span><span class="hl-4">Story</span><span class="hl-1"> </span><span class="hl-4">state</span><br/><span class="hl-1"> ├── </span><span class="hl-4">tools</span><span class="hl-1">/ # </span><span class="hl-4">User</span><span class="hl-1">-</span><span class="hl-4">defined</span><span class="hl-1"> </span><span class="hl-0">tools</span><span class="hl-1"> (</span><span class="hl-4">one</span><span class="hl-1"> </span><span class="hl-7">JSON</span><span class="hl-1"> </span><span class="hl-4">per</span><span class="hl-1"> </span><span class="hl-4">tool</span><span class="hl-1">)</span><br/><span class="hl-1"> ├── </span><span class="hl-4">prompts</span><span class="hl-1">/ # </span><span class="hl-4">User</span><span class="hl-1">-</span><span class="hl-4">specific</span><span class="hl-1"> </span><span class="hl-4">prompts</span><br/><span class="hl-1"> ├── </span><span class="hl-4">upload</span><span class="hl-1">/ # </span><span class="hl-4">User</span><span class="hl-1"> </span><span class="hl-4">file</span><span class="hl-1"> </span><span class="hl-4">attachments</span><br/><span class="hl-1"> ├── </span><span class="hl-4">transactions</span><span class="hl-1">/ # </span><span class="hl-4">Transaction</span><span class="hl-1"> </span><span class="hl-4">records</span><br/><span class="hl-1"> └── </span><span class="hl-4">userconfig</span><span class="hl-1">/ # </span><span class="hl-4">User</span><span class="hl-1"> </span><span class="hl-4">preferences</span><span class="hl-1"> </span><span class="hl-4">and</span><span class="hl-1"> </span><span class="hl-4">balance</span>
@@ -221,4 +287,4 @@ An agent may chain several tool calls privately before responding.</li>
221
287
  <p>Set the <code>STARTING_BALANCE</code> environment variable or pass <code>startingBalance</code> in the constructor options.</p>
222
288
  <h3 id="cache-not-working-as-expected" class="tsd-anchor-link">Cache not working as expected<a href="#cache-not-working-as-expected" aria-label="Permalink" class="tsd-anchor-icon"><svg viewBox="0 0 24 24" aria-hidden="true"><use href="assets/icons.svg#icon-anchor"></use></svg></a></h3>
223
289
  <p>Check the cache statistics with <code>getCacheStats()</code> and adjust <code>userServiceCacheTimeoutMinutes</code> in the constructor options.</p>
224
- </div></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"><a href="#briyah-sdk"><span>Briyah <wbr/>SDK</span></a><ul><li><a href="#installation"><span>Installation</span></a></li><li><a href="#quick-start"><span>Quick <wbr/>Start</span></a></li><li><a href="#configuration"><span>Configuration</span></a></li><li><ul><li><a href="#briyahconfigoptions"><span>Briyah<wbr/>Config<wbr/>Options</span></a></li><li><a href="#environment-variables"><span>Environment <wbr/>Variables</span></a></li><li><a href="#logging"><span>Logging</span></a></li></ul></li><li><a href="#api-reference"><span>API <wbr/>Reference</span></a></li><li><ul><li><a href="#briyah-class"><span>Briyah <wbr/>Class</span></a></li><li><ul><li><a href="#constructoroptions-briyahconfigoptions"><span>constructor(options?: <wbr/>Briyah<wbr/>Config<wbr/>Options)</span></a></li><li><a href="#async-init-promisevoid"><span>async init(): <wbr/>Promise&lt;void&gt;</span></a></li><li><a href="#getappserviceuserid-string-appservice"><span>get<wbr/>App<wbr/>Service(user<wbr/>Id: string): <wbr/>App<wbr/>Service</span></a></li><li><a href="#removeuserserviceuserid-string-void"><span>remove<wbr/>User<wbr/>Service(user<wbr/>Id: string): void</span></a></li><li><a href="#getcachestats"><span>get<wbr/>Cache<wbr/>Stats()</span></a></li><li><a href="#async-shutdown-promisevoid"><span>async shutdown(): <wbr/>Promise&lt;void&gt;</span></a></li><li><a href="#isinitialized-boolean"><span>is<wbr/>Initialized(): boolean</span></a></li></ul></li><li><a href="#appservice"><span>App<wbr/>Service</span></a></li></ul></li><li><a href="#usage-examples"><span>Usage <wbr/>Examples</span></a></li><li><ul><li><a href="#example-1-multi-user-setup"><span>Example 1: <wbr/>Multi-<wbr/>User <wbr/>Setup</span></a></li><li><a href="#example-2-custom-data-path"><span>Example 2: <wbr/>Custom <wbr/>Data <wbr/>Path</span></a></li><li><a href="#example-3-testing-configuration"><span>Example 3: <wbr/>Testing <wbr/>Configuration</span></a></li><li><a href="#example-4-agent-creation-and-text-processing"><span>Example 4: <wbr/>Agent <wbr/>Creation and <wbr/>Text <wbr/>Processing</span></a></li><li><a href="#example-5-multi-agent-room-conversation"><span>Example 5: <wbr/>Multi-<wbr/>Agent <wbr/>Room <wbr/>Conversation</span></a></li><li><a href="#example-6-story-message-emitter"><span>Example 6: <wbr/>Story <wbr/>Message <wbr/>Emitter</span></a></li><li><a href="#example-7-recording-payments-and-managing-balance"><span>Example 7: <wbr/>Recording <wbr/>Payments and <wbr/>Managing <wbr/>Balance</span></a></li><li><a href="#example-8-registering-native-tools-with-opaque-context"><span>Example 8: <wbr/>Registering <wbr/>Native <wbr/>Tools with <wbr/>Opaque <wbr/>Context</span></a></li><li><a href="#example-9-self-hosted-image-generation-with-comfyui"><span>Example 9: <wbr/>Self-<wbr/>Hosted <wbr/>Image <wbr/>Generation with <wbr/>Comfy<wbr/>UI</span></a></li></ul></li><li><a href="#data-storage"><span>Data <wbr/>Storage</span></a></li><li><a href="#multi-instance-support"><span>Multi-<wbr/>Instance <wbr/>Support</span></a></li><li><a href="#troubleshooting"><span>Troubleshooting</span></a></li><li><ul><li><a href="#must-call-init-before-getappservice"><span>&quot;<wbr/>Must call init() before get<wbr/>App<wbr/>Service()&quot;</span></a></li><li><a href="#no-llm-provider-api-keys-configured"><span>&quot;<wbr/>No <wbr/>LLM provider <wbr/>API keys configured&quot;</span></a></li><li><a href="#starting_balance-environment-variable-is-required"><span>&quot;<wbr/>STARTING_<wbr/>BALANCE environment variable is required&quot;</span></a></li><li><a href="#cache-not-working-as-expected"><span>Cache not working as expected</span></a></li></ul></li></ul></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.4.0</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>
290
+ </div></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"><a href="#briyah-sdk"><span>Briyah <wbr/>SDK</span></a><ul><li><a href="#installation"><span>Installation</span></a></li><li><a href="#quick-start"><span>Quick <wbr/>Start</span></a></li><li><a href="#configuration"><span>Configuration</span></a></li><li><ul><li><a href="#briyahconfigoptions"><span>Briyah<wbr/>Config<wbr/>Options</span></a></li><li><a href="#environment-variables"><span>Environment <wbr/>Variables</span></a></li><li><a href="#logging"><span>Logging</span></a></li></ul></li><li><a href="#api-reference"><span>API <wbr/>Reference</span></a></li><li><ul><li><a href="#briyah-class"><span>Briyah <wbr/>Class</span></a></li><li><ul><li><a href="#constructoroptions-briyahconfigoptions"><span>constructor(options?: <wbr/>Briyah<wbr/>Config<wbr/>Options)</span></a></li><li><a href="#async-init-promisevoid"><span>async init(): <wbr/>Promise&lt;void&gt;</span></a></li><li><a href="#getappserviceuserid-string-appservice"><span>get<wbr/>App<wbr/>Service(user<wbr/>Id: string): <wbr/>App<wbr/>Service</span></a></li><li><a href="#removeuserserviceuserid-string-void"><span>remove<wbr/>User<wbr/>Service(user<wbr/>Id: string): void</span></a></li><li><a href="#getcachestats"><span>get<wbr/>Cache<wbr/>Stats()</span></a></li><li><a href="#async-shutdown-promisevoid"><span>async shutdown(): <wbr/>Promise&lt;void&gt;</span></a></li><li><a href="#isinitialized-boolean"><span>is<wbr/>Initialized(): boolean</span></a></li></ul></li><li><a href="#appservice"><span>App<wbr/>Service</span></a></li></ul></li><li><a href="#prompt-folders"><span>Prompt <wbr/>Folders</span></a></li><li><a href="#tool-packs"><span>Tool <wbr/>Packs</span></a></li><li><a href="#usage-examples"><span>Usage <wbr/>Examples</span></a></li><li><ul><li><a href="#example-1-multi-user-setup"><span>Example 1: <wbr/>Multi-<wbr/>User <wbr/>Setup</span></a></li><li><a href="#example-2-custom-data-path"><span>Example 2: <wbr/>Custom <wbr/>Data <wbr/>Path</span></a></li><li><a href="#example-3-testing-configuration"><span>Example 3: <wbr/>Testing <wbr/>Configuration</span></a></li><li><a href="#example-4-agent-creation-and-text-processing"><span>Example 4: <wbr/>Agent <wbr/>Creation and <wbr/>Text <wbr/>Processing</span></a></li><li><a href="#example-5-multi-agent-room-conversation"><span>Example 5: <wbr/>Multi-<wbr/>Agent <wbr/>Room <wbr/>Conversation</span></a></li><li><a href="#example-6-story-message-emitter"><span>Example 6: <wbr/>Story <wbr/>Message <wbr/>Emitter</span></a></li><li><a href="#example-7-recording-payments-and-managing-balance"><span>Example 7: <wbr/>Recording <wbr/>Payments and <wbr/>Managing <wbr/>Balance</span></a></li><li><a href="#example-8-registering-native-tools-with-opaque-context"><span>Example 8: <wbr/>Registering <wbr/>Native <wbr/>Tools with <wbr/>Opaque <wbr/>Context</span></a></li><li><a href="#example-9-self-hosted-image-generation-with-comfyui"><span>Example 9: <wbr/>Self-<wbr/>Hosted <wbr/>Image <wbr/>Generation with <wbr/>Comfy<wbr/>UI</span></a></li><li><a href="#example-10-a-turn-based-table-with-a-human-player"><span>Example 10: <wbr/>A turn-<wbr/>based table with a human player</span></a></li></ul></li><li><a href="#data-storage"><span>Data <wbr/>Storage</span></a></li><li><a href="#multi-instance-support"><span>Multi-<wbr/>Instance <wbr/>Support</span></a></li><li><a href="#troubleshooting"><span>Troubleshooting</span></a></li><li><ul><li><a href="#must-call-init-before-getappservice"><span>&quot;<wbr/>Must call init() before get<wbr/>App<wbr/>Service()&quot;</span></a></li><li><a href="#no-llm-provider-api-keys-configured"><span>&quot;<wbr/>No <wbr/>LLM provider <wbr/>API keys configured&quot;</span></a></li><li><a href="#starting_balance-environment-variable-is-required"><span>&quot;<wbr/>STARTING_<wbr/>BALANCE environment variable is required&quot;</span></a></li><li><a href="#cache-not-working-as-expected"><span>Cache not working as expected</span></a></li></ul></li></ul></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.4.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>