briyah 2.0.0 → 2.0.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.
- package/README.md +245 -65
- package/dist-sdk/server/src/app.controller.js +1 -1
- package/dist-sdk/server/src/app.service.d.ts +2 -0
- package/dist-sdk/server/src/app.service.js +25 -4
- package/dist-sdk/server/src/config/prompt-resolver.d.ts +2 -0
- package/dist-sdk/server/src/config/prompt-resolver.js +14 -7
- package/dist-sdk/server/src/packs/pack-instantiation.service.d.ts +2 -1
- package/dist-sdk/server/src/packs/pack-instantiation.service.js +16 -5
- package/dist-sdk/server/src/room/room-message.service.d.ts +2 -1
- package/dist-sdk/server/src/room/room-message.service.js +3 -2
- package/dist-sdk/server/src/room/room.js +4 -2
- package/dist-sdk/server/src/sdk/index.d.ts +2 -2
- package/dist-sdk/shared/types/app.types.d.ts +9 -0
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/highlight.css +7 -0
- package/docs/assets/navigation.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/Agent.html +73 -73
- package/docs/classes/Briyah.html +16 -16
- package/docs/classes/BriyahConfigService.html +7 -7
- package/docs/classes/NativeToolRegistry.html +10 -10
- package/docs/classes/PackInstantiationService.html +20 -9
- package/docs/classes/PackService.html +13 -13
- package/docs/classes/Room.html +90 -90
- package/docs/classes/RoomMessage.html +22 -22
- package/docs/enums/MessageAction.html +18 -18
- package/docs/functions/availableToolPacks.html +4 -4
- package/docs/functions/dnd5eTools.html +4 -4
- package/docs/functions/installToolPacks.html +4 -4
- package/docs/functions/registerToolPacks.html +4 -4
- package/docs/hierarchy.html +9 -9
- package/docs/index.html +155 -41
- package/docs/interfaces/AgentCreationOptions.html +12 -12
- package/docs/interfaces/AgentInfo.html +30 -30
- package/docs/interfaces/AgentMessagesResponse.html +8 -8
- package/docs/interfaces/AppService.html +216 -185
- package/docs/interfaces/Artifact.html +9 -9
- package/docs/interfaces/ArtifactMetadata.html +13 -13
- package/docs/interfaces/ArtifactWriteOptions.html +7 -7
- package/docs/interfaces/AttachDocumentResponse.html +6 -6
- package/docs/interfaces/BriyahConfigOptions.html +12 -12
- package/docs/interfaces/ChapterInfo.html +6 -6
- package/docs/interfaces/Character.html +10 -10
- package/docs/interfaces/CreateAgentResponse.html +5 -5
- package/docs/interfaces/CreateRoomResponse.html +6 -6
- package/docs/interfaces/CreateStoryResponse.html +5 -5
- package/docs/interfaces/FileList.html +5 -5
- package/docs/interfaces/FileMetadata.html +10 -10
- package/docs/interfaces/IConfigService.html +5 -5
- package/docs/interfaces/InstantiateModels.html +6 -6
- package/docs/interfaces/InstantiateRoomResult.html +7 -7
- package/docs/interfaces/LoadedPack.html +16 -16
- package/docs/interfaces/LoggingOptions.html +9 -9
- package/docs/interfaces/Message.html +9 -9
- package/docs/interfaces/ModelChoice.html +7 -7
- package/docs/interfaces/ModelInfo.html +8 -8
- package/docs/interfaces/NativeToolDefinition.html +10 -10
- package/docs/interfaces/PackAgentTemplate.html +9 -9
- package/docs/interfaces/PackRoomTemplate.html +11 -11
- package/docs/interfaces/PackView.html +20 -20
- package/docs/interfaces/PreparedPromptResponse.html +6 -6
- package/docs/interfaces/ProcessTextResponse.html +10 -10
- package/docs/interfaces/PromptFile.html +7 -7
- package/docs/interfaces/PromptFileContent.html +8 -8
- package/docs/interfaces/PromptFilesResponse.html +5 -5
- package/docs/interfaces/PromptFolder.html +8 -8
- package/docs/interfaces/PromptFolderDefaults.html +19 -19
- package/docs/interfaces/PromptFolderDefaultsResponse.html +21 -8
- package/docs/interfaces/PromptFoldersResponse.html +5 -5
- package/docs/interfaces/RoomDetails.html +19 -19
- package/docs/interfaces/RoomErrorUpdate.html +82 -0
- package/docs/interfaces/RoomInfo.html +10 -10
- package/docs/interfaces/RoomMessageUpdate.html +30 -15
- package/docs/interfaces/RoomMessagesResponse.html +6 -6
- package/docs/interfaces/SendMessageResult.html +6 -6
- package/docs/interfaces/StoryErrorEvent.html +8 -8
- package/docs/interfaces/StoryIdea.html +8 -8
- package/docs/interfaces/StoryInfo.html +28 -28
- package/docs/interfaces/StoryIntroduceCharacterEvent.html +7 -7
- package/docs/interfaces/StoryProgressChapterEvent.html +6 -6
- package/docs/interfaces/StoryState.html +12 -12
- package/docs/interfaces/StoryStateEvent.html +7 -7
- package/docs/interfaces/ToolArtifact.html +9 -9
- package/docs/interfaces/ToolCaller.html +7 -7
- package/docs/interfaces/ToolDefinition.html +9 -9
- package/docs/interfaces/ToolHelpers.html +6 -6
- package/docs/interfaces/ToolParameter.html +8 -8
- package/docs/interfaces/ToolRoomAccess.html +14 -14
- package/docs/interfaces/ToolSummary.html +8 -8
- package/docs/interfaces/ToolsResponse.html +7 -7
- package/docs/interfaces/Transaction.html +13 -13
- package/docs/interfaces/TransactionHistoryResponse.html +6 -6
- package/docs/modules.html +8 -8
- package/docs/types/PackOrigin.html +4 -4
- package/docs/types/PromptScope.html +4 -4
- package/docs/types/RoomTurnMode.html +4 -4
- package/docs/types/RoomUpdate.html +36 -0
- package/docs/types/RosterOverrides.html +42 -0
- package/docs/types/ToolContext.html +4 -4
- package/docs/types/ToolRunResult.html +4 -4
- package/package.json +1 -1
- package/src/tools/packs/dnd5e/README.md +39 -3
|
@@ -0,0 +1,36 @@
|
|
|
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>RoomUpdate | Briyah SDK - v2.0.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">
|
|
2
|
+
<div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Briyah SDK - v2.0.1</a>
|
|
3
|
+
<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"/>
|
|
4
|
+
<ul role="listbox" id="tsd-search-results"></ul>
|
|
5
|
+
<div id="tsd-search-status" aria-live="polite" aria-atomic="true">
|
|
6
|
+
<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>
|
|
7
|
+
<div class="container container-main">
|
|
8
|
+
<div class="col-content">
|
|
9
|
+
<div class="tsd-page-title">
|
|
10
|
+
<ul class="tsd-breadcrumb" aria-label="Breadcrumb">
|
|
11
|
+
<li><a href="" aria-current="page">RoomUpdate</a></li></ul>
|
|
12
|
+
<h1>Type Alias RoomUpdate</h1></div>
|
|
13
|
+
<div class="tsd-signature"><span class="tsd-kind-type-alias">RoomUpdate</span><span class="tsd-signature-symbol">:</span> <a href="../interfaces/RoomMessageUpdate.html" class="tsd-signature-type tsd-kind-interface">RoomMessageUpdate</a> <span class="tsd-signature-symbol">|</span> <a href="../interfaces/RoomErrorUpdate.html" class="tsd-signature-type tsd-kind-interface">RoomErrorUpdate</a></div>
|
|
14
|
+
<div class="tsd-comment tsd-typography"><p>Everything a room's <code>'update'</code> event can carry.</p>
|
|
15
|
+
</div><aside class="tsd-sources">
|
|
16
|
+
<ul>
|
|
17
|
+
<li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/shared/types/app.types.ts#L311">shared/types/app.types.ts:311</a></li></ul></aside></div>
|
|
18
|
+
<div class="col-sidebar">
|
|
19
|
+
<div class="page-menu">
|
|
20
|
+
<div class="tsd-navigation settings">
|
|
21
|
+
<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>
|
|
22
|
+
<h3>Settings</h3></summary>
|
|
23
|
+
<div class="tsd-accordion-details">
|
|
24
|
+
<div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span>
|
|
25
|
+
<ul id="tsd-filter-options">
|
|
26
|
+
<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>
|
|
27
|
+
<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>
|
|
28
|
+
<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>
|
|
29
|
+
<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>
|
|
30
|
+
<div class="site-menu">
|
|
31
|
+
<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>
|
|
32
|
+
<nav class="tsd-navigation"><a href="../modules.html">Briyah SDK - v2.0.1</a>
|
|
33
|
+
<ul class="tsd-small-nested-navigation" id="tsd-nav-container">
|
|
34
|
+
<li>Loading...</li></ul></nav></div></div></div><footer>
|
|
35
|
+
<p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer>
|
|
36
|
+
<div class="overlay"></div></body></html>
|
|
@@ -0,0 +1,42 @@
|
|
|
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>RosterOverrides | Briyah SDK - v2.0.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">
|
|
2
|
+
<div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Briyah SDK - v2.0.1</a>
|
|
3
|
+
<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"/>
|
|
4
|
+
<ul role="listbox" id="tsd-search-results"></ul>
|
|
5
|
+
<div id="tsd-search-status" aria-live="polite" aria-atomic="true">
|
|
6
|
+
<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>
|
|
7
|
+
<div class="container container-main">
|
|
8
|
+
<div class="col-content">
|
|
9
|
+
<div class="tsd-page-title">
|
|
10
|
+
<ul class="tsd-breadcrumb" aria-label="Breadcrumb">
|
|
11
|
+
<li><a href="" aria-current="page">RosterOverrides</a></li></ul>
|
|
12
|
+
<h1>Type Alias RosterOverrides</h1></div>
|
|
13
|
+
<div class="tsd-signature"><span class="tsd-kind-type-alias">RosterOverrides</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">Record</span><span class="tsd-signature-symbol"><</span><span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">,</span> <span class="tsd-signature-type">Partial</span><span class="tsd-signature-symbol"><</span><a href="../interfaces/PromptFolderDefaults.html" class="tsd-signature-type tsd-kind-interface">PromptFolderDefaults</a><span class="tsd-signature-symbol">></span><span class="tsd-signature-symbol">></span></div>
|
|
14
|
+
<div class="tsd-comment tsd-typography"><p>Per-agent changes to a room template's roster, keyed by the key the template
|
|
15
|
+
addresses that agent by — its <code>as</code> when it has one, its template key otherwise.</p>
|
|
16
|
+
<p>The reason this exists: a template ships a cast with fixed names, and the one
|
|
17
|
+
thing an app almost always has to change is what the person at the keyboard is
|
|
18
|
+
called. Without it, naming the player means either building the room by hand —
|
|
19
|
+
giving up the ordering and the rollback this service exists for — or renaming
|
|
20
|
+
the agent afterwards, once it has already introduced itself.</p>
|
|
21
|
+
</div><aside class="tsd-sources">
|
|
22
|
+
<ul>
|
|
23
|
+
<li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/packs/pack-instantiation.service.ts#L60">server/src/packs/pack-instantiation.service.ts:60</a></li></ul></aside></div>
|
|
24
|
+
<div class="col-sidebar">
|
|
25
|
+
<div class="page-menu">
|
|
26
|
+
<div class="tsd-navigation settings">
|
|
27
|
+
<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>
|
|
28
|
+
<h3>Settings</h3></summary>
|
|
29
|
+
<div class="tsd-accordion-details">
|
|
30
|
+
<div class="tsd-filter-visibility"><span class="settings-label">Member Visibility</span>
|
|
31
|
+
<ul id="tsd-filter-options">
|
|
32
|
+
<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>
|
|
33
|
+
<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>
|
|
34
|
+
<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>
|
|
35
|
+
<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>
|
|
36
|
+
<div class="site-menu">
|
|
37
|
+
<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>
|
|
38
|
+
<nav class="tsd-navigation"><a href="../modules.html">Briyah SDK - v2.0.1</a>
|
|
39
|
+
<ul class="tsd-small-nested-navigation" id="tsd-nav-container">
|
|
40
|
+
<li>Loading...</li></ul></nav></div></div></div><footer>
|
|
41
|
+
<p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer>
|
|
42
|
+
<div class="overlay"></div></body></html>
|
|
@@ -1,5 +1,5 @@
|
|
|
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>ToolContext | Briyah SDK - v2.0.
|
|
2
|
-
<div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Briyah SDK - v2.0.
|
|
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>ToolContext | Briyah SDK - v2.0.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">
|
|
2
|
+
<div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Briyah SDK - v2.0.1</a>
|
|
3
3
|
<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"/>
|
|
4
4
|
<ul role="listbox" id="tsd-search-results"></ul>
|
|
5
5
|
<div id="tsd-search-status" aria-live="polite" aria-atomic="true">
|
|
@@ -18,7 +18,7 @@ to trusted data the LLM cannot influence (e.g. a database handle and the
|
|
|
18
18
|
record the user currently has selected).</p>
|
|
19
19
|
</div><aside class="tsd-sources">
|
|
20
20
|
<ul>
|
|
21
|
-
<li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/
|
|
21
|
+
<li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/server/src/tools/native-tool.types.ts#L145">server/src/tools/native-tool.types.ts:145</a></li></ul></aside></div>
|
|
22
22
|
<div class="col-sidebar">
|
|
23
23
|
<div class="page-menu">
|
|
24
24
|
<div class="tsd-navigation settings">
|
|
@@ -33,7 +33,7 @@ record the user currently has selected).</p>
|
|
|
33
33
|
<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>
|
|
34
34
|
<div class="site-menu">
|
|
35
35
|
<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>
|
|
36
|
-
<nav class="tsd-navigation"><a href="../modules.html">Briyah SDK - v2.0.
|
|
36
|
+
<nav class="tsd-navigation"><a href="../modules.html">Briyah SDK - v2.0.1</a>
|
|
37
37
|
<ul class="tsd-small-nested-navigation" id="tsd-nav-container">
|
|
38
38
|
<li>Loading...</li></ul></nav></div></div></div><footer>
|
|
39
39
|
<p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer>
|
|
@@ -1,5 +1,5 @@
|
|
|
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>ToolRunResult | Briyah SDK - v2.0.
|
|
2
|
-
<div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Briyah SDK - v2.0.
|
|
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>ToolRunResult | Briyah SDK - v2.0.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">
|
|
2
|
+
<div class="tsd-toolbar-contents container"><a href="../index.html" class="title">Briyah SDK - v2.0.1</a>
|
|
3
3
|
<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"/>
|
|
4
4
|
<ul role="listbox" id="tsd-search-results"></ul>
|
|
5
5
|
<div id="tsd-search-status" aria-live="polite" aria-atomic="true">
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
<h1>Type Alias ToolRunResult</h1></div>
|
|
13
13
|
<div class="tsd-signature"><span class="tsd-kind-type-alias">ToolRunResult</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">ok</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">true</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">result</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">any</span> <span class="tsd-signature-symbol">}</span> <span class="tsd-signature-symbol">|</span> <span class="tsd-signature-symbol">{</span> <span class="tsd-kind-property">error</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">string</span><span class="tsd-signature-symbol">;</span> <span class="tsd-kind-property">ok</span><span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">false</span> <span class="tsd-signature-symbol">}</span></div><aside class="tsd-sources">
|
|
14
14
|
<ul>
|
|
15
|
-
<li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/
|
|
15
|
+
<li>Defined in <a href="https://github.com/WilhiteSoftwareLLC/briyah/blob/1a8dc08591eb0354e3644da7a14d27b30625ced5/shared/types/app.types.ts#L151">shared/types/app.types.ts:151</a></li></ul></aside></div>
|
|
16
16
|
<div class="col-sidebar">
|
|
17
17
|
<div class="page-menu">
|
|
18
18
|
<div class="tsd-navigation settings">
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
<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>
|
|
28
28
|
<div class="site-menu">
|
|
29
29
|
<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>
|
|
30
|
-
<nav class="tsd-navigation"><a href="../modules.html">Briyah SDK - v2.0.
|
|
30
|
+
<nav class="tsd-navigation"><a href="../modules.html">Briyah SDK - v2.0.1</a>
|
|
31
31
|
<ul class="tsd-small-nested-navigation" id="tsd-nav-container">
|
|
32
32
|
<li>Loading...</li></ul></nav></div></div></div><footer>
|
|
33
33
|
<p class="tsd-generator">Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p></footer>
|
package/package.json
CHANGED
|
@@ -533,13 +533,49 @@ point.
|
|
|
533
533
|
Disabling the pack later hides its prompts, documents, tools, agents and rooms from your
|
|
534
534
|
pages. It does not stop a room that already exists from working.
|
|
535
535
|
|
|
536
|
-
|
|
536
|
+
### From the SDK
|
|
537
|
+
|
|
538
|
+
Two calls, and neither is about tools — the pack's tools are installed when you construct
|
|
539
|
+
`Briyah`, and there is nothing to register:
|
|
540
|
+
|
|
541
|
+
```ts
|
|
542
|
+
const app = briyah.getAppService('user-123');
|
|
543
|
+
|
|
544
|
+
app.packs.setEnabled('dnd5e', true); // per user, and required
|
|
545
|
+
|
|
546
|
+
const { roomId, warnings } = await app.packInstantiation.instantiateRoom(
|
|
547
|
+
'dnd5e',
|
|
548
|
+
'table',
|
|
549
|
+
{
|
|
550
|
+
primary: { aiServiceName: 'Anthropic', aiModel: 'claude-sonnet-5' },
|
|
551
|
+
economy: { aiServiceName: 'Anthropic', aiModel: 'claude-haiku-4-5' },
|
|
552
|
+
},
|
|
553
|
+
'Tuesday Night Game', // optional room name
|
|
554
|
+
{ player: { agentName: 'Homer', agentNickname: 'Homer' } }, // optional per-seat overrides
|
|
555
|
+
);
|
|
556
|
+
```
|
|
557
|
+
|
|
558
|
+
That is the same six-agent table the button builds. The fifth argument names any seat by its
|
|
559
|
+
template key — `table_moderator`, `dungeon_master`, `battle_master`, `character_creator`,
|
|
560
|
+
`campaign_designer`, `player` — which is how the person at the keyboard gets their own name
|
|
561
|
+
instead of `PlayerOne`. `warnings` reports anything that did not go to plan without stopping the
|
|
562
|
+
room, such as a document that failed to attach; log it, because a missing document is a
|
|
563
|
+
capability an agent appears to have and does not.
|
|
564
|
+
|
|
565
|
+
**Enable before you build.** A pack-qualified folder (`dnd5e:dungeon_master`) always resolves,
|
|
566
|
+
but a bare `dungeon_master` reaches the pack only once it is enabled, and `instantiateRoom`
|
|
567
|
+
refuses a pack that is off.
|
|
568
|
+
|
|
569
|
+
To filter or wrap the tool definitions rather than take them all, pass them to the constructor:
|
|
537
570
|
|
|
538
571
|
```ts
|
|
539
|
-
import { dnd5eTools } from 'briyah';
|
|
540
|
-
briyah
|
|
572
|
+
import { Briyah, dnd5eTools } from 'briyah';
|
|
573
|
+
const briyah = new Briyah({ tools: dnd5eTools() });
|
|
541
574
|
```
|
|
542
575
|
|
|
576
|
+
The main README's [Example 11](../../../../README.md#example-11-seating-a-whole-dd-table) has the
|
|
577
|
+
console loop that goes with this, and the by-hand version.
|
|
578
|
+
|
|
543
579
|
## The tools
|
|
544
580
|
|
|
545
581
|
| Tool | What it does |
|