briyah 2.0.1 → 2.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +216 -0
- package/README.md +19 -10
- package/data/common/config/markup +1 -1
- package/data/common/config/model_prices.json +46369 -46361
- package/data/common/config/rpg_models.json +60 -0
- package/data/common/prompts/narrator/create_chapter.prompt +12 -1
- package/data/common/prompts/pdf_converter/convert_pdf_page.prompt +8 -1
- package/data/common/prompts/perceive.prompt +287 -291
- package/data/packs/dnd5e/agents/player.json +11 -11
- package/data/packs/dnd5e/artifacts/background-acolyte.md +66 -0
- package/data/packs/dnd5e/artifacts/character_creator-basics.md +31 -13
- package/data/packs/dnd5e/artifacts/class-barbarian.md +4 -1
- package/data/packs/dnd5e/artifacts/class-bard.md +2 -1
- package/data/packs/dnd5e/artifacts/class-cleric.md +2 -1
- package/data/packs/dnd5e/artifacts/class-druid.md +3 -1
- package/data/packs/dnd5e/artifacts/class-fighter.md +3 -1
- package/data/packs/dnd5e/artifacts/class-monk.md +2 -1
- package/data/packs/dnd5e/artifacts/class-paladin.md +2 -1
- package/data/packs/dnd5e/artifacts/class-ranger.md +3 -1
- package/data/packs/dnd5e/artifacts/class-rogue.md +3 -1
- package/data/packs/dnd5e/artifacts/class-sorcerer.md +2 -1
- package/data/packs/dnd5e/artifacts/class-warlock.md +3 -1
- package/data/packs/dnd5e/artifacts/class-wizard.md +2 -1
- package/data/packs/dnd5e/artifacts/manifest.json +6 -0
- package/data/packs/dnd5e/pack.json +1 -1
- package/data/packs/dnd5e/prompts/battle_master/perceive.prompt +491 -378
- package/data/packs/dnd5e/prompts/campaign_designer/perceive.prompt +24 -7
- package/data/packs/dnd5e/prompts/character_creator/defaults_config.json +21 -31
- package/data/packs/dnd5e/prompts/character_creator/perceive.prompt +236 -99
- package/data/packs/dnd5e/prompts/dnd_player/defaults_config.json +5 -5
- package/data/packs/dnd5e/prompts/dnd_player/perceive.prompt +28 -10
- package/data/packs/dnd5e/prompts/dnd_room_moderator/defaults_config.json +9 -9
- package/data/packs/dnd5e/prompts/dnd_room_moderator/moderate.prompt +13 -10
- package/data/packs/dnd5e/prompts/dungeon_master/defaults_config.json +32 -30
- package/data/packs/dnd5e/prompts/dungeon_master/perceive.prompt +794 -764
- package/data/packs/dnd5e/rooms/campaign.json +15 -0
- package/dist-sdk/server/src/ai/LLM/anthropic.service.d.ts +3 -0
- package/dist-sdk/server/src/ai/LLM/anthropic.service.js +40 -11
- package/dist-sdk/server/src/ai/LLM/base-ai.service.d.ts +1 -0
- package/dist-sdk/server/src/ai/LLM/base-ai.service.js +16 -0
- package/dist-sdk/server/src/ai/LLM/deepseek.service.js +5 -3
- package/dist-sdk/server/src/ai/agent-store.service.js +1 -1
- package/dist-sdk/server/src/ai/artifact.service.d.ts +2 -0
- package/dist-sdk/server/src/ai/artifact.service.js +6 -0
- package/dist-sdk/server/src/ai/pack-artifacts.d.ts +2 -0
- package/dist-sdk/server/src/ai/pack-artifacts.js +65 -8
- package/dist-sdk/server/src/app/user-service-factory.js +6 -1
- package/dist-sdk/server/src/app/user-service-manager.js +1 -1
- package/dist-sdk/server/src/app.controller.d.ts +9 -1
- package/dist-sdk/server/src/app.controller.js +123 -12
- package/dist-sdk/server/src/app.service.d.ts +24 -2
- package/dist-sdk/server/src/app.service.js +123 -109
- package/dist-sdk/server/src/auth/auth.controller.js +4 -0
- package/dist-sdk/server/src/auth/auth.service.d.ts +2 -1
- package/dist-sdk/server/src/auth/dto/phone-login.dto.d.ts +2 -1
- package/dist-sdk/server/src/documents/pdf-conversion.d.ts +43 -0
- package/dist-sdk/server/src/documents/pdf-conversion.js +175 -0
- package/dist-sdk/server/src/room/nickname.d.ts +1 -0
- package/dist-sdk/server/src/room/nickname.js +15 -0
- package/dist-sdk/server/src/room/room-store.service.d.ts +1 -0
- package/dist-sdk/server/src/room/room-store.service.js +9 -1
- package/dist-sdk/server/src/room/room.d.ts +43 -3
- package/dist-sdk/server/src/room/room.js +317 -35
- package/dist-sdk/server/src/rpg/rpg-models.d.ts +9 -0
- package/dist-sdk/server/src/rpg/rpg-models.js +128 -0
- package/dist-sdk/server/src/rpg/rpg-roster.d.ts +8 -0
- package/dist-sdk/server/src/rpg/rpg-roster.js +34 -0
- package/dist-sdk/server/src/rpg/rpg.service.d.ts +29 -0
- package/dist-sdk/server/src/rpg/rpg.service.js +199 -0
- package/dist-sdk/server/src/sdk/index.d.ts +4 -2
- package/dist-sdk/server/src/sdk/index.js +6 -1
- package/dist-sdk/server/src/story/story.service.d.ts +2 -1
- package/dist-sdk/server/src/story/story.service.js +42 -4
- package/dist-sdk/server/src/tools/core/index.d.ts +3 -0
- package/dist-sdk/server/src/tools/core/index.js +9 -0
- package/dist-sdk/server/src/tools/core/rename.tool.d.ts +2 -0
- package/dist-sdk/server/src/tools/core/rename.tool.js +61 -0
- package/dist-sdk/server/src/tools/native-tool.types.d.ts +15 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/backgrounds.d.ts +0 -21
- package/dist-sdk/server/src/tools/packs/dnd5e/data/backgrounds.js +1 -56
- package/dist-sdk/server/src/tools/packs/dnd5e/data/cantrips.d.ts +10 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/cantrips.js +67 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/gear.d.ts +5 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/data/gear.js +7 -1
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/bestiary.js +4 -3
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/cantrips.d.ts +6 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/cantrips.js +92 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/character.d.ts +32 -5
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/character.js +177 -28
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/coerce.d.ts +1 -13
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/coerce.js +15 -145
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/dice.d.ts +7 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/dice.js +11 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/encounter.d.ts +5 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/encounter.js +45 -2
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/foes.js +3 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/guides.d.ts +21 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/guides.js +45 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/races.js +6 -4
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/sheet.d.ts +17 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/sheet.js +56 -4
- package/dist-sdk/server/src/tools/packs/dnd5e/index.js +3 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/check.tool.js +117 -15
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/class.tool.d.ts +2 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/class.tool.js +96 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/dice.tools.js +40 -3
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/encounter.tool.js +36 -27
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/monster.tool.js +7 -4
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/shared.d.ts +15 -1
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/shared.js +73 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/sheet.tools.js +49 -13
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/state.tools.js +68 -2
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/world.tools.d.ts +1 -0
- package/dist-sdk/server/src/tools/packs/dnd5e/tools/world.tools.js +119 -14
- package/dist-sdk/server/src/tools/packs/index.d.ts +2 -0
- package/dist-sdk/server/src/tools/packs/index.js +16 -5
- package/dist-sdk/server/src/tools/shared/coerce.d.ts +13 -0
- package/dist-sdk/server/src/tools/shared/coerce.js +147 -0
- package/dist-sdk/server/src/tools/tool-execution.service.d.ts +3 -2
- package/dist-sdk/server/src/tools/tool-execution.service.js +4 -1
- package/dist-sdk/shared/types/app.types.d.ts +63 -0
- package/dist-sdk/shared/types/app.types.js +2 -1
- package/docs/assets/hierarchy.js +1 -1
- 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 +7 -7
- package/docs/classes/PackService.html +13 -13
- package/docs/classes/Room.html +216 -95
- package/docs/classes/RoomMessage.html +22 -22
- package/docs/enums/MessageAction.html +18 -18
- package/docs/functions/availableToolPacks.html +5 -5
- package/docs/functions/buildMarkdown.html +54 -0
- package/docs/functions/dnd5eTools.html +4 -4
- package/docs/functions/installToolPacks.html +8 -5
- package/docs/functions/pageMarker.html +45 -0
- package/docs/functions/registerToolPacks.html +4 -4
- package/docs/functions/splitMarkdownIntoPages.html +51 -0
- package/docs/functions/stripWrappingFence.html +52 -0
- package/docs/hierarchy.html +13 -9
- package/docs/index.html +11 -8
- 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 +276 -198
- 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/ConversionAgent.html +78 -0
- 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/PdfConversionOptions.html +102 -0
- package/docs/interfaces/PdfConversionResult.html +97 -0
- package/docs/interfaces/PdfMarkdownOptions.html +198 -0
- package/docs/interfaces/PdfMarkdownResult.html +106 -0
- package/docs/interfaces/PdfPageMarkdown.html +94 -0
- 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 +7 -7
- package/docs/interfaces/PromptFoldersResponse.html +5 -5
- package/docs/interfaces/RoomDetails.html +19 -19
- package/docs/interfaces/RoomErrorUpdate.html +8 -8
- package/docs/interfaces/RoomInfo.html +10 -10
- package/docs/interfaces/RoomMessageUpdate.html +13 -13
- 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 +17 -8
- package/docs/interfaces/ToolPackDocuments.html +100 -0
- package/docs/interfaces/ToolParameter.html +8 -8
- package/docs/interfaces/ToolRoomAccess.html +49 -16
- 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 +4 -4
- package/docs/types/RosterOverrides.html +4 -4
- package/docs/types/ToolContext.html +4 -4
- package/docs/types/ToolRunResult.html +4 -4
- package/package.json +32 -3
- package/src/tools/packs/dnd5e/README.md +147 -66
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/backgrounds.d.ts +0 -20
- package/dist-sdk/server/src/tools/packs/dnd5e/engine/backgrounds.js +0 -112
|
@@ -33,19 +33,19 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
};
|
|
34
34
|
})();
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.rulesLookupTool = exports.levelUpTool = exports.awardXpTool = exports.inventoryTool = exports.conditionsTool = void 0;
|
|
36
|
+
exports.rulesLookupTool = exports.levelUpTool = exports.awardCoinTool = exports.awardXpTool = exports.inventoryTool = exports.conditionsTool = void 0;
|
|
37
37
|
const coerce_1 = require("../engine/coerce");
|
|
38
|
+
const guides_1 = require("../engine/guides");
|
|
38
39
|
const character_1 = require("../engine/character");
|
|
39
40
|
const rules = __importStar(require("../engine/rules"));
|
|
40
41
|
const weapons_1 = require("../engine/weapons");
|
|
41
42
|
const items_1 = require("../engine/items");
|
|
42
43
|
const races_1 = require("../engine/races");
|
|
43
44
|
const feats_1 = require("../engine/feats");
|
|
44
|
-
const backgrounds_1 = require("../engine/backgrounds");
|
|
45
45
|
const kits_1 = require("../engine/kits");
|
|
46
46
|
const kits_2 = require("../data/kits");
|
|
47
47
|
const gear_1 = require("../data/gear");
|
|
48
|
-
const
|
|
48
|
+
const backgrounds_1 = require("../data/backgrounds");
|
|
49
49
|
const feats_2 = require("../data/feats");
|
|
50
50
|
const campaign_items_1 = require("../engine/campaign-items");
|
|
51
51
|
const magic_items_1 = require("../data/magic-items");
|
|
@@ -145,7 +145,6 @@ exports.conditionsTool = {
|
|
|
145
145
|
incapacitated: rules.isIncapacitated(state) || undefined,
|
|
146
146
|
});
|
|
147
147
|
}
|
|
148
|
-
(0, shared_1.refreshPartyStatus)(room);
|
|
149
148
|
return results.length === 1
|
|
150
149
|
? results[0]
|
|
151
150
|
: {
|
|
@@ -385,6 +384,89 @@ exports.awardXpTool = {
|
|
|
385
384
|
};
|
|
386
385
|
},
|
|
387
386
|
};
|
|
387
|
+
exports.awardCoinTool = {
|
|
388
|
+
name: 'award_coin',
|
|
389
|
+
description: 'Hand money to the party and divide it between them. "amount" is what was found or paid, e.g. "150 gp" or "150 gp; 30 sp"; a negative amount takes it back, so a party can split a bill. "characters" is a semicolon-separated list of names; leave it out for everyone with a sheet. It is **divided** between them by default, because a purse is one pile — set "split" to false to give each character the full amount instead. Odd coins are not lost: 150 gp between four is 38, 38, 37, 37. Nothing is written unless every character can pay their share, so a split cost never leaves half the party charged. This is the whole of dividing treasure — do not call inventory once per character.',
|
|
390
|
+
parameters: [
|
|
391
|
+
{
|
|
392
|
+
name: 'amount',
|
|
393
|
+
type: 'string',
|
|
394
|
+
description: 'The money, e.g. "150 gp" or "150 gp; 30 sp"; negative to take it back',
|
|
395
|
+
required: true,
|
|
396
|
+
},
|
|
397
|
+
{
|
|
398
|
+
name: 'characters',
|
|
399
|
+
type: 'string',
|
|
400
|
+
description: 'Semicolon-separated names, or omit for the whole party',
|
|
401
|
+
required: false,
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
name: 'split',
|
|
405
|
+
type: 'boolean',
|
|
406
|
+
description: 'Divide the amount between them. Defaults to true; false gives each the full amount.',
|
|
407
|
+
required: false,
|
|
408
|
+
},
|
|
409
|
+
{ name: 'reason', type: 'string', description: 'What earned it', required: false },
|
|
410
|
+
],
|
|
411
|
+
async handler(args, helpers) {
|
|
412
|
+
const room = (0, shared_1.requireRoom)(helpers);
|
|
413
|
+
const requested = (0, coerce_1.list)(args.characters);
|
|
414
|
+
const names = requested.length > 0 ? requested : (0, shared_1.listCharacterNames)(room);
|
|
415
|
+
if (names.length === 0)
|
|
416
|
+
throw new Error('No character sheets exist in this room yet.');
|
|
417
|
+
const entries = (0, coerce_1.list)(args.amount);
|
|
418
|
+
if (entries.length === 0)
|
|
419
|
+
throw new Error('No amount given, e.g. "150 gp".');
|
|
420
|
+
const split = args.split === undefined || args.split === '' ? true : (0, coerce_1.bool)(args.split);
|
|
421
|
+
const division = split
|
|
422
|
+
? (0, character_1.divideCoin)(entries, names.length)
|
|
423
|
+
: { shares: names.map(() => ({ entries, summary: entries.join(', ') })), total: entries.join(', ') };
|
|
424
|
+
if ('refusal' in division && division.refusal) {
|
|
425
|
+
return (0, shared_1.toRefusalResult)(division.refusal);
|
|
426
|
+
}
|
|
427
|
+
for (let i = 0; i < names.length; i++) {
|
|
428
|
+
const sheet = (0, shared_1.loadSheet)(room, names[i]);
|
|
429
|
+
const trial = (0, character_1.adjustCoin)((0, character_1.cloneState)(sheet.state), division.shares[i].entries);
|
|
430
|
+
if (!trial.ok)
|
|
431
|
+
return (0, shared_1.toRefusalResult)(trial.refusal);
|
|
432
|
+
}
|
|
433
|
+
const results = [];
|
|
434
|
+
for (let i = 0; i < names.length; i++) {
|
|
435
|
+
const share = division.shares[i];
|
|
436
|
+
const { result } = (0, shared_1.mutateSheet)(room, names[i], (sheet) => {
|
|
437
|
+
const state = (0, character_1.cloneState)(sheet.state);
|
|
438
|
+
const coin = (0, character_1.adjustCoin)(state, share.entries);
|
|
439
|
+
if (!coin.ok)
|
|
440
|
+
return { ok: false, refusal: coin.refusal };
|
|
441
|
+
return {
|
|
442
|
+
ok: true,
|
|
443
|
+
state,
|
|
444
|
+
summary: `${state.name} receives ${share.summary}, and now carries ${(0, character_1.describeCoin)(state) || 'nothing'}.`,
|
|
445
|
+
};
|
|
446
|
+
});
|
|
447
|
+
if ((0, character_1.isRefusal)(result)) {
|
|
448
|
+
results.push((0, shared_1.toRefusalResult)(result.refusal));
|
|
449
|
+
continue;
|
|
450
|
+
}
|
|
451
|
+
results.push({
|
|
452
|
+
character: result.state.name,
|
|
453
|
+
applied: true,
|
|
454
|
+
received: share.summary,
|
|
455
|
+
carrying: (0, character_1.describeCoin)(result.state) || 'none',
|
|
456
|
+
summary: result.summary,
|
|
457
|
+
});
|
|
458
|
+
}
|
|
459
|
+
return {
|
|
460
|
+
total: division.total,
|
|
461
|
+
split,
|
|
462
|
+
reason: args.reason ? (0, coerce_1.str)(args.reason, 'reason') : undefined,
|
|
463
|
+
results,
|
|
464
|
+
summary: split
|
|
465
|
+
? `${division.total} divided between ${names.length}: ${division.shares.map((s) => s.summary).join(' / ')}`
|
|
466
|
+
: `${division.total} to each of ${names.join(', ')}`,
|
|
467
|
+
};
|
|
468
|
+
},
|
|
469
|
+
};
|
|
388
470
|
exports.levelUpTool = {
|
|
389
471
|
name: 'level_up',
|
|
390
472
|
description: 'Apply a level increase after the player has chosen. "to_level" is the total level to reach. "choices" is a JSON object of what was chosen, for example ' +
|
|
@@ -409,7 +491,6 @@ exports.levelUpTool = {
|
|
|
409
491
|
if ((0, character_1.isRefusal)(result)) {
|
|
410
492
|
return (0, shared_1.toRefusalResult)(result.refusal);
|
|
411
493
|
}
|
|
412
|
-
(0, shared_1.refreshPartyStatus)(room);
|
|
413
494
|
return {
|
|
414
495
|
applied: true,
|
|
415
496
|
character: result.state.name,
|
|
@@ -422,7 +503,7 @@ exports.levelUpTool = {
|
|
|
422
503
|
};
|
|
423
504
|
exports.rulesLookupTool = {
|
|
424
505
|
name: 'rules_lookup',
|
|
425
|
-
description: 'Look up a 5e rule, condition or table from the System Reference Document. "topic" is what you want: a condition (grappled), a rule (cover, falling, concentration, opportunity attack, two-weapon fighting, death saving throw, massive damage, temporary hit points, hiding, advantage, critical hit, short rest, long rest), a table (proficiency bonus, xp thresholds, exhaustion, spell slots ranger, hit dice), a piece of equipment (longsword, chain mail), a race (dwarf, hill dwarf, tiefling), a feat (grappler, or "feats" for the rule about taking one), or a background
|
|
506
|
+
description: 'Look up a 5e rule, condition or table from the System Reference Document. "topic" is what you want: a condition (grappled), a rule (cover, falling, concentration, opportunity attack, two-weapon fighting, death saving throw, massive damage, temporary hit points, hiding, advantage, critical hit, short rest, long rest), a table (proficiency bonus, xp thresholds, exhaustion, spell slots ranger, hit dice), a piece of equipment (longsword, chain mail), a race (dwarf, hill dwarf, tiefling), a feat (grappler, or "feats" for the rule about taking one), or a background. Backgrounds are the ones this table has written up rather than a fixed list: ask for "backgrounds" to get both the customization rule and the names available, then ask for one by name to read its skills, equipment, feature and suggested characteristics. A background that is not on that list is still legal play — take the name the player wants and pass its two skills and gear in the create_sheet spec yourself. Returns a short authoritative excerpt. Use this instead of guessing when a player questions a ruling.',
|
|
426
507
|
parameters: [
|
|
427
508
|
{
|
|
428
509
|
name: 'topic',
|
|
@@ -431,7 +512,7 @@ exports.rulesLookupTool = {
|
|
|
431
512
|
required: true,
|
|
432
513
|
},
|
|
433
514
|
],
|
|
434
|
-
async handler(args) {
|
|
515
|
+
async handler(args, helpers) {
|
|
435
516
|
const topic = (0, coerce_1.str)(args.topic, 'topic').toLowerCase().trim();
|
|
436
517
|
const condition = srd_1.CONDITIONS[topic];
|
|
437
518
|
if (condition) {
|
|
@@ -477,18 +558,42 @@ exports.rulesLookupTool = {
|
|
|
477
558
|
attribution: srd_1.SRD_ATTRIBUTION,
|
|
478
559
|
};
|
|
479
560
|
}
|
|
561
|
+
const documented = (0, guides_1.listGuides)(guides_1.BACKGROUND_GUIDE, helpers.packDocuments?.list(guides_1.DND5E_PACK, guides_1.BACKGROUND_GUIDE.prefix) || []);
|
|
480
562
|
if (topic === 'background' || topic === 'backgrounds') {
|
|
481
|
-
return { topic, kind: 'rule', text: backgrounds_2.BACKGROUNDS_RULE, attribution: srd_1.SRD_ATTRIBUTION };
|
|
482
|
-
}
|
|
483
|
-
const background = (0, backgrounds_1.resolveBackground)(topic);
|
|
484
|
-
if (background.background) {
|
|
485
563
|
return {
|
|
486
564
|
topic,
|
|
487
|
-
kind: '
|
|
488
|
-
text:
|
|
565
|
+
kind: 'rule',
|
|
566
|
+
text: backgrounds_1.BACKGROUNDS_RULE,
|
|
567
|
+
backgrounds: documented.map((guide) => guide.name),
|
|
568
|
+
note: 'Those are the backgrounds this table has written up; ask for one by name to read it. ' +
|
|
569
|
+
'A background that is not listed is still legal — the customization rule above is what allows it — so take the name the player wants and put its two skills in "skills" and its gear in "equipment" yourself.',
|
|
489
570
|
attribution: srd_1.SRD_ATTRIBUTION,
|
|
490
571
|
};
|
|
491
572
|
}
|
|
573
|
+
const background = (0, guides_1.resolveGuide)(topic, documented);
|
|
574
|
+
if (background.guide) {
|
|
575
|
+
const body = helpers.packDocuments?.read(guides_1.DND5E_PACK, background.guide.fileName);
|
|
576
|
+
if (body?.trim()) {
|
|
577
|
+
const clipped = body.length > guides_1.MAX_GUIDE_CHARS;
|
|
578
|
+
return {
|
|
579
|
+
topic,
|
|
580
|
+
kind: 'background',
|
|
581
|
+
background: background.guide.name,
|
|
582
|
+
text: clipped ? `${body.slice(0, guides_1.MAX_GUIDE_CHARS)}\n\n[...]` : body,
|
|
583
|
+
truncated: clipped || undefined,
|
|
584
|
+
note: 'Nothing here is applied for you: put its two skills in "skills", its gear in "equipment" and its coin in "coin" on the create_sheet call, and pass the background name as well so the sheet records it.',
|
|
585
|
+
attribution: srd_1.SRD_ATTRIBUTION,
|
|
586
|
+
};
|
|
587
|
+
}
|
|
588
|
+
}
|
|
589
|
+
if (background.ambiguous) {
|
|
590
|
+
return {
|
|
591
|
+
topic,
|
|
592
|
+
found: false,
|
|
593
|
+
ambiguous: background.ambiguous,
|
|
594
|
+
message: `"${topic}" matches ${background.ambiguous.length} backgrounds. Ask again with the full name.`,
|
|
595
|
+
};
|
|
596
|
+
}
|
|
492
597
|
if (/^(tool|tools|tool proficienc|artisans? tools|gaming set|musical instrument)/.test(topic)) {
|
|
493
598
|
return {
|
|
494
599
|
topic,
|
|
@@ -563,7 +668,7 @@ exports.rulesLookupTool = {
|
|
|
563
668
|
...Object.keys(srd_1.ARMOR),
|
|
564
669
|
...(0, races_1.raceNames)().map((name) => name.toLowerCase()),
|
|
565
670
|
...(0, feats_1.featNames)().map((name) => name.toLowerCase()),
|
|
566
|
-
...
|
|
671
|
+
...documented.map((guide) => guide.name.toLowerCase()),
|
|
567
672
|
...(0, kits_1.toolNames)().map((name) => name.toLowerCase()),
|
|
568
673
|
'feats',
|
|
569
674
|
'backgrounds',
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { NativeToolRegistry } from '../native-tool-registry.service';
|
|
2
|
+
import { NativeToolDefinition } from '../native-tool.types';
|
|
2
3
|
import { dnd5eTools } from './dnd5e';
|
|
3
4
|
export declare function installToolPacks(registry: NativeToolRegistry): string[];
|
|
4
5
|
export declare function registerToolPacks(registry: NativeToolRegistry, packList: string | undefined): string[];
|
|
6
|
+
export declare function registerPack(registry: NativeToolRegistry, name: string, tools: NativeToolDefinition[]): string[];
|
|
5
7
|
export declare function availableToolPacks(): string[];
|
|
6
8
|
export { dnd5eTools };
|
|
@@ -3,15 +3,23 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.dnd5eTools = void 0;
|
|
4
4
|
exports.installToolPacks = installToolPacks;
|
|
5
5
|
exports.registerToolPacks = registerToolPacks;
|
|
6
|
+
exports.registerPack = registerPack;
|
|
6
7
|
exports.availableToolPacks = availableToolPacks;
|
|
7
8
|
const dnd5e_1 = require("./dnd5e");
|
|
8
9
|
Object.defineProperty(exports, "dnd5eTools", { enumerable: true, get: function () { return dnd5e_1.dnd5eTools; } });
|
|
10
|
+
const core_1 = require("../core");
|
|
9
11
|
const logger_1 = require("../../common/logger");
|
|
10
12
|
const PACKS = {
|
|
11
13
|
dnd5e: dnd5e_1.dnd5eTools,
|
|
12
14
|
};
|
|
13
15
|
function installToolPacks(registry) {
|
|
14
|
-
|
|
16
|
+
const core = (0, core_1.coreTools)().map((tool) => ({ ...tool, group: core_1.CORE_TOOL_GROUP }));
|
|
17
|
+
registry.registerTools(core);
|
|
18
|
+
logger_1.logger.log(`Registered ${core.length} core tools`);
|
|
19
|
+
return [
|
|
20
|
+
...core.map((tool) => tool.name),
|
|
21
|
+
...registerToolPacks(registry, Object.keys(PACKS).join(',')),
|
|
22
|
+
];
|
|
15
23
|
}
|
|
16
24
|
function registerToolPacks(registry, packList) {
|
|
17
25
|
const names = (packList || '')
|
|
@@ -27,13 +35,16 @@ function registerToolPacks(registry, packList) {
|
|
|
27
35
|
logger_1.logger.warn(`Unknown tool pack "${name}"; available packs: ${Object.keys(PACKS).join(', ')}`);
|
|
28
36
|
continue;
|
|
29
37
|
}
|
|
30
|
-
|
|
31
|
-
registry.registerTools(tools);
|
|
32
|
-
registered.push(...tools.map((tool) => tool.name));
|
|
33
|
-
logger_1.logger.log(`Registered tool pack "${name}" with ${tools.length} tools`);
|
|
38
|
+
registered.push(...registerPack(registry, name, pack()));
|
|
34
39
|
}
|
|
35
40
|
return registered;
|
|
36
41
|
}
|
|
42
|
+
function registerPack(registry, name, tools) {
|
|
43
|
+
const grouped = tools.map((tool) => ({ ...tool, group: name }));
|
|
44
|
+
registry.registerTools(grouped);
|
|
45
|
+
logger_1.logger.log(`Registered tool pack "${name}" with ${grouped.length} tools`);
|
|
46
|
+
return grouped.map((tool) => tool.name);
|
|
47
|
+
}
|
|
37
48
|
function availableToolPacks() {
|
|
38
49
|
return Object.keys(PACKS);
|
|
39
50
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare class ArgumentError extends Error {
|
|
2
|
+
constructor(param: string, received: unknown, expected: string, example?: string);
|
|
3
|
+
}
|
|
4
|
+
export declare function num(value: unknown, param: string, fallback?: number): number;
|
|
5
|
+
export declare function int(value: unknown, param: string, fallback?: number): number;
|
|
6
|
+
export declare function bool(value: unknown, fallback?: boolean): boolean;
|
|
7
|
+
export declare function str(value: unknown, param: string, fallback?: string): string;
|
|
8
|
+
export declare function list(value: unknown): string[];
|
|
9
|
+
export declare function jsonObject(value: unknown, param: string, example?: string): Record<string, any>;
|
|
10
|
+
export declare function jsonArray(value: unknown, param: string, example?: string): any[];
|
|
11
|
+
export declare function nameKey(name: string): string;
|
|
12
|
+
export declare function matchName(wanted: string, known: string[]): string | undefined;
|
|
13
|
+
export declare function matchNames(wanted: string, known: string[]): string[];
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ArgumentError = void 0;
|
|
4
|
+
exports.num = num;
|
|
5
|
+
exports.int = int;
|
|
6
|
+
exports.bool = bool;
|
|
7
|
+
exports.str = str;
|
|
8
|
+
exports.list = list;
|
|
9
|
+
exports.jsonObject = jsonObject;
|
|
10
|
+
exports.jsonArray = jsonArray;
|
|
11
|
+
exports.nameKey = nameKey;
|
|
12
|
+
exports.matchName = matchName;
|
|
13
|
+
exports.matchNames = matchNames;
|
|
14
|
+
class ArgumentError extends Error {
|
|
15
|
+
constructor(param, received, expected, example) {
|
|
16
|
+
const got = received === undefined ? 'nothing' : JSON.stringify(received);
|
|
17
|
+
const hint = example ? ` Example: ${example}` : '';
|
|
18
|
+
super(`Parameter "${param}" must be ${expected}, but received ${got}.${hint}`);
|
|
19
|
+
this.name = 'ArgumentError';
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.ArgumentError = ArgumentError;
|
|
23
|
+
function num(value, param, fallback) {
|
|
24
|
+
if (value === undefined || value === null || value === '') {
|
|
25
|
+
if (fallback !== undefined)
|
|
26
|
+
return fallback;
|
|
27
|
+
throw new ArgumentError(param, value, 'a number', '3');
|
|
28
|
+
}
|
|
29
|
+
if (typeof value === 'number' && Number.isFinite(value))
|
|
30
|
+
return value;
|
|
31
|
+
if (typeof value === 'string') {
|
|
32
|
+
const parsed = Number(value.trim());
|
|
33
|
+
if (Number.isFinite(parsed))
|
|
34
|
+
return parsed;
|
|
35
|
+
}
|
|
36
|
+
throw new ArgumentError(param, value, 'a number', '3');
|
|
37
|
+
}
|
|
38
|
+
function int(value, param, fallback) {
|
|
39
|
+
return Math.trunc(num(value, param, fallback));
|
|
40
|
+
}
|
|
41
|
+
function bool(value, fallback = false) {
|
|
42
|
+
if (value === undefined || value === null || value === '')
|
|
43
|
+
return fallback;
|
|
44
|
+
if (typeof value === 'boolean')
|
|
45
|
+
return value;
|
|
46
|
+
if (typeof value === 'number')
|
|
47
|
+
return value !== 0;
|
|
48
|
+
if (typeof value === 'string') {
|
|
49
|
+
const v = value.trim().toLowerCase();
|
|
50
|
+
if (['true', 'yes', 'y', '1'].includes(v))
|
|
51
|
+
return true;
|
|
52
|
+
if (['false', 'no', 'n', '0'].includes(v))
|
|
53
|
+
return false;
|
|
54
|
+
}
|
|
55
|
+
return fallback;
|
|
56
|
+
}
|
|
57
|
+
function str(value, param, fallback) {
|
|
58
|
+
if (value === undefined || value === null) {
|
|
59
|
+
if (fallback !== undefined)
|
|
60
|
+
return fallback;
|
|
61
|
+
throw new ArgumentError(param, value, 'a string');
|
|
62
|
+
}
|
|
63
|
+
if (typeof value === 'string')
|
|
64
|
+
return value.trim();
|
|
65
|
+
if (typeof value === 'number' || typeof value === 'boolean')
|
|
66
|
+
return String(value);
|
|
67
|
+
throw new ArgumentError(param, value, 'a string');
|
|
68
|
+
}
|
|
69
|
+
function list(value) {
|
|
70
|
+
if (value === undefined || value === null || value === '')
|
|
71
|
+
return [];
|
|
72
|
+
if (Array.isArray(value)) {
|
|
73
|
+
return value.map((v) => String(v).trim()).filter((v) => v.length > 0);
|
|
74
|
+
}
|
|
75
|
+
return String(value)
|
|
76
|
+
.split(/[;\n,]/)
|
|
77
|
+
.map((v) => v.trim())
|
|
78
|
+
.filter((v) => v.length > 0);
|
|
79
|
+
}
|
|
80
|
+
function jsonObject(value, param, example) {
|
|
81
|
+
if (value === undefined || value === null || value === '')
|
|
82
|
+
return {};
|
|
83
|
+
if (typeof value === 'object' && !Array.isArray(value)) {
|
|
84
|
+
return value;
|
|
85
|
+
}
|
|
86
|
+
if (typeof value === 'string') {
|
|
87
|
+
const cleaned = stripCodeFence(value);
|
|
88
|
+
try {
|
|
89
|
+
const parsed = JSON.parse(cleaned);
|
|
90
|
+
if (parsed && typeof parsed === 'object' && !Array.isArray(parsed)) {
|
|
91
|
+
return parsed;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
catch {
|
|
95
|
+
throw new ArgumentError(param, value, 'a JSON object', example);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
throw new ArgumentError(param, value, 'a JSON object', example);
|
|
99
|
+
}
|
|
100
|
+
function jsonArray(value, param, example) {
|
|
101
|
+
if (value === undefined || value === null || value === '')
|
|
102
|
+
return [];
|
|
103
|
+
if (Array.isArray(value))
|
|
104
|
+
return value;
|
|
105
|
+
if (typeof value === 'string') {
|
|
106
|
+
const cleaned = stripCodeFence(value);
|
|
107
|
+
try {
|
|
108
|
+
const parsed = JSON.parse(cleaned);
|
|
109
|
+
if (Array.isArray(parsed))
|
|
110
|
+
return parsed;
|
|
111
|
+
if (parsed && typeof parsed === 'object')
|
|
112
|
+
return [parsed];
|
|
113
|
+
}
|
|
114
|
+
catch {
|
|
115
|
+
throw new ArgumentError(param, value, 'a JSON array', example);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
throw new ArgumentError(param, value, 'a JSON array', example);
|
|
119
|
+
}
|
|
120
|
+
function stripCodeFence(text) {
|
|
121
|
+
const trimmed = text.trim();
|
|
122
|
+
const fenced = /^```(?:json)?\s*\n?([\s\S]*?)\n?```$/.exec(trimmed);
|
|
123
|
+
return fenced ? fenced[1].trim() : trimmed;
|
|
124
|
+
}
|
|
125
|
+
function nameKey(name) {
|
|
126
|
+
return name
|
|
127
|
+
.toLowerCase()
|
|
128
|
+
.replace(/[^a-z0-9\s]/g, '')
|
|
129
|
+
.replace(/\s+/g, ' ')
|
|
130
|
+
.trim();
|
|
131
|
+
}
|
|
132
|
+
function matchName(wanted, known) {
|
|
133
|
+
const candidates = matchNames(wanted, known);
|
|
134
|
+
return candidates.length > 0 ? candidates[0] : undefined;
|
|
135
|
+
}
|
|
136
|
+
function matchNames(wanted, known) {
|
|
137
|
+
const key = nameKey(wanted);
|
|
138
|
+
if (!key)
|
|
139
|
+
return [];
|
|
140
|
+
const exact = known.filter((k) => nameKey(k) === key);
|
|
141
|
+
if (exact.length > 0)
|
|
142
|
+
return exact;
|
|
143
|
+
const firstWord = known.filter((k) => nameKey(k).split(' ')[0] === key.split(' ')[0]);
|
|
144
|
+
if (firstWord.length > 0)
|
|
145
|
+
return firstWord;
|
|
146
|
+
return known.filter((k) => nameKey(k).startsWith(key) || key.startsWith(nameKey(k)));
|
|
147
|
+
}
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { ToolDefinition, ToolRunResult } from '../../../shared/types/app.types';
|
|
2
2
|
import { ToolStoreService } from './tool-store.service';
|
|
3
3
|
import { NativeToolRegistry } from './native-tool-registry.service';
|
|
4
|
-
import { NativeToolDefinition, ToolHelpers, ToolContext, ToolRoomAccess } from './native-tool.types';
|
|
4
|
+
import { NativeToolDefinition, ToolHelpers, ToolContext, ToolPackDocuments, ToolRoomAccess } from './native-tool.types';
|
|
5
5
|
type CompiledTool = (args: Record<string, any>, helpers: ToolHelpers, context: ToolContext) => Promise<any>;
|
|
6
6
|
export declare class ToolExecutionService {
|
|
7
7
|
private readonly toolStore;
|
|
8
8
|
private readonly nativeRegistry;
|
|
9
9
|
private readonly allowUserAuthoredTools;
|
|
10
|
+
private readonly packDocuments?;
|
|
10
11
|
private compiledCache;
|
|
11
|
-
constructor(toolStore: ToolStoreService, nativeRegistry: NativeToolRegistry, allowUserAuthoredTools?: boolean);
|
|
12
|
+
constructor(toolStore: ToolStoreService, nativeRegistry: NativeToolRegistry, allowUserAuthoredTools?: boolean, packDocuments?: ToolPackDocuments);
|
|
12
13
|
static compile(tool: ToolDefinition): CompiledTool;
|
|
13
14
|
runForAgent(name: string, contentJson: string, grantedNames: string[], context?: ToolContext, room?: ToolRoomAccess): Promise<ToolRunResult>;
|
|
14
15
|
test(name: string, args: Record<string, any>, context?: ToolContext): Promise<ToolRunResult>;
|
|
@@ -10,11 +10,13 @@ class ToolExecutionService {
|
|
|
10
10
|
toolStore;
|
|
11
11
|
nativeRegistry;
|
|
12
12
|
allowUserAuthoredTools;
|
|
13
|
+
packDocuments;
|
|
13
14
|
compiledCache = new Map();
|
|
14
|
-
constructor(toolStore, nativeRegistry, allowUserAuthoredTools = false) {
|
|
15
|
+
constructor(toolStore, nativeRegistry, allowUserAuthoredTools = false, packDocuments) {
|
|
15
16
|
this.toolStore = toolStore;
|
|
16
17
|
this.nativeRegistry = nativeRegistry;
|
|
17
18
|
this.allowUserAuthoredTools = allowUserAuthoredTools;
|
|
19
|
+
this.packDocuments = packDocuments;
|
|
18
20
|
}
|
|
19
21
|
static compile(tool) {
|
|
20
22
|
return new AsyncFunction('args', 'helpers', 'context', tool.code);
|
|
@@ -80,6 +82,7 @@ class ToolExecutionService {
|
|
|
80
82
|
const helpers = {
|
|
81
83
|
fetch: (url, init) => fetch(url, { ...init, signal: controller.signal }),
|
|
82
84
|
...(room ? { room } : {}),
|
|
85
|
+
...(this.packDocuments ? { packDocuments: this.packDocuments } : {}),
|
|
83
86
|
};
|
|
84
87
|
let timeoutHandle;
|
|
85
88
|
const timeout = new Promise((_, reject) => {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export type BriyahMode = 'agents' | 'stories' | 'rpg';
|
|
2
|
+
export declare const BRIYAH_MODES: readonly BriyahMode[];
|
|
1
3
|
export interface AgentInfo {
|
|
2
4
|
id: string;
|
|
3
5
|
name: string;
|
|
@@ -356,6 +358,67 @@ export interface InstantiatePackAgentResponse {
|
|
|
356
358
|
agentId: string;
|
|
357
359
|
warnings: string[];
|
|
358
360
|
}
|
|
361
|
+
export interface RpgModelEntry {
|
|
362
|
+
name: string;
|
|
363
|
+
description: string;
|
|
364
|
+
service: string;
|
|
365
|
+
model: string;
|
|
366
|
+
small_model?: string;
|
|
367
|
+
economy_service?: string;
|
|
368
|
+
economy_model?: string;
|
|
369
|
+
default_quality?: boolean;
|
|
370
|
+
cost: string;
|
|
371
|
+
}
|
|
372
|
+
export interface RpgModelOption {
|
|
373
|
+
name: string;
|
|
374
|
+
description: string;
|
|
375
|
+
cost?: string;
|
|
376
|
+
isDefault?: boolean;
|
|
377
|
+
}
|
|
378
|
+
export interface RpgPlayerRequest {
|
|
379
|
+
isHuman: boolean;
|
|
380
|
+
modelName?: string;
|
|
381
|
+
personality?: string;
|
|
382
|
+
}
|
|
383
|
+
export interface CreateRpgCampaignRequest {
|
|
384
|
+
name: string;
|
|
385
|
+
quality?: string;
|
|
386
|
+
players: RpgPlayerRequest[];
|
|
387
|
+
}
|
|
388
|
+
export interface RpgPlayerInfo {
|
|
389
|
+
agentId: string;
|
|
390
|
+
nickname: string;
|
|
391
|
+
isHuman: boolean;
|
|
392
|
+
modelName?: string;
|
|
393
|
+
personality?: string;
|
|
394
|
+
totalCost: number;
|
|
395
|
+
}
|
|
396
|
+
export interface RpgCrewInfo {
|
|
397
|
+
agentId: string;
|
|
398
|
+
nickname: string;
|
|
399
|
+
role: string;
|
|
400
|
+
}
|
|
401
|
+
export interface RpgCampaignInfo {
|
|
402
|
+
campaignId: string;
|
|
403
|
+
name: string;
|
|
404
|
+
instanceId?: string;
|
|
405
|
+
playerCount: number;
|
|
406
|
+
playerNames: string[];
|
|
407
|
+
totalCost: number;
|
|
408
|
+
createdAt: string;
|
|
409
|
+
}
|
|
410
|
+
export interface RpgCampaignDetails extends RpgCampaignInfo {
|
|
411
|
+
goal: string;
|
|
412
|
+
players: RpgPlayerInfo[];
|
|
413
|
+
crew: RpgCrewInfo[];
|
|
414
|
+
}
|
|
415
|
+
export interface CreateRpgCampaignResponse {
|
|
416
|
+
campaignId: string;
|
|
417
|
+
instanceId: string;
|
|
418
|
+
publicPath: string;
|
|
419
|
+
players: RpgPlayerInfo[];
|
|
420
|
+
warnings: string[];
|
|
421
|
+
}
|
|
359
422
|
export interface ProcessTextResponse {
|
|
360
423
|
result: string;
|
|
361
424
|
latestMessage?: string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MessageAction = void 0;
|
|
3
|
+
exports.MessageAction = exports.BRIYAH_MODES = void 0;
|
|
4
|
+
exports.BRIYAH_MODES = ['agents', 'stories', 'rpg'];
|
|
4
5
|
var MessageAction;
|
|
5
6
|
(function (MessageAction) {
|
|
6
7
|
MessageAction["THINK"] = "think";
|
package/docs/assets/hierarchy.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
window.hierarchyData = "
|
|
1
|
+
window.hierarchyData = "eJyVkz1rwzAQhv/LzUoT2/hDGpsp0NDSQpfgQVjnWNiWiuQmlOD/XoSTVm0c7CwaxHt69Bx3JzBadxbYLlxlKQnCLCUZjUka0ZyAwbLBopNaWWAnSAN3Kt4iMHg08otXa61KuX9Dc5AFAoFaKgEsCDMCn6YBBkXDrUW7HIk/VF3bABkiwKCzYuHqF8NFTyChkUd8EeWWm1roo3r+GD51AYZxcgFK1aEpeYF2eV1wE/lT5bBpRP9i11od0Fip54OvSmagCRSVbIRBBWyX0CjvCWQ09v6yRWv5Hifw59S9xHAVhQ4ZBDTz/XlRv0s8TjmfY/Na7AbNYzxpLlC4JyYov8F77ZyVs3OWHvlV6/Z/V0fG14tNj61bJQ+xGV+SccHNvBW5IZkGed/337XMQ2M="
|
|
@@ -1 +1 @@
|
|
|
1
|
-
window.navigationData = "
|
|
1
|
+
window.navigationData = "eJyV2U1v1DoUBuD/knVFoaLA7a53CmIkSqtOuV0gFiY5k7Hq2JbtDK2u+O/IaWbixPY5ZtPFnNdPvhx/pN//rxw8ueqiugZrWQuXteNKVieVZm5XXVQg+86ezoqvdq4T1Un1yGVTXXz4fXI0LluQbmpbC2Yt2NPh53mrN2dhu38Nf2a7uOHL73TLlZJb3m7A7HkNOWYWwsyvzPE93Csl7qDl1pnnmIwzmHjL6se1tI5Jx5m/hdlTzSUpHQULjDulurix/5VqNXaNdOOxiBlD51gZGK72Rvu/dsK4dGC2rD70okVwDp+dv1vCa7lVec1XSWK8BnsHVitpIc8tkyitdfTMQu9YRhHj+JbVLk2MxRLgGhxrmGModAiVgA+GO0CfZiKIws6xenel6r4D6fBnkYxieDhAYCedyGHsase0A5Ptg0GdYAyrHZgc8lJFCSX3YCxXcjFEh9A8g3L+LYQhhj6JRI5m/bhRoIYxGt04ZZ4L1FkOYz9xAV+4Td/KQ5EC0NcuDGDQOjP7BdQamfsW2HHugWvVgEi/B1GqkByfWS/Sty2ZxOgvijXQ+Cku6U1lHGlbLtH3fh7BsGg2DJTkZLho7u/maqdyDzKok0x22DlWMWJa4FzBlks+XxUGWiqIwf5xDCPCPXRaMJe+0ChFkb7DkGIYosD/OPzKQr6IAs12Gk6xnpUKFsPIq5TIEew1M4+N+kWd7SJWiOJnOk8R5C1r4dAgB4YZlDOgmYHm1qhO41NZOorjqgZr7+GJkqMcwXba+ckhp43lMmSlpMutCKJUGYmvlBO5AlaJJrP+CQOl0BVsWS9cppMngn8Ll9yBZIPSA5UfoYj2A+MVOMYzE35Qp5iPxijzTTe5cXiRobjsLHYoUkDR9i0VLISJS52lMHIDshnDyGgZpVDSL2aHe/1xn3vHFxmSWzeQXq4eqzSRe6THagHhjGr6Go67H+IKMw3IA90a1RqwdtyqEUdJpclDbFyu/0zlMoQ4uymDcX4lh35XCAMUtGJCZMbtqUwhxAK0fOnpk59BaDDpUS6oU4xfBB6+MOSxWYomDesgt82fJSjKDzyXtV9VZK0pQmH4yDlLUNSm7zoWfk5dQGMdZQyTltX53jDVC5nP3JIfB/JxahtxY3jLg1N1z3rcQ7xUFu1f//P+zflZNOlvaqUhQqYSpQwbn95Iv/VbMmGtxFlOeJOSnOQShnVgbvZgDG/AxtCsTGnDMOJXp09uKQWlEuWuj7Ypk3MsUhLbMy7YTwGH9z+4wG0vhy5kT+PU3H33NiB/9lw08ZZn0mYBBGpkcz4cMXlOUxUhuP9EIwR6ccsMwulxoxYOehM0VRHCDP9/AYOeUhRCQKsFd4e7uZZO+d1kUk0nMdoZrh8M05rL9hPI8CtPwEapiPzxB521nyo="
|