briyah 2.0.4 → 2.0.6

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 (80) hide show
  1. package/README.md +12 -1
  2. package/data/common/config/markup +1 -1
  3. package/data/common/config/story_models.json +3 -3
  4. package/data/common/prompts/illustrator/describe_scene.prompt +4 -4
  5. package/data/common/prompts/moderate.json +34 -0
  6. package/data/common/prompts/moderate.prompt +136 -0
  7. package/data/common/prompts/perceive.prompt +1 -1
  8. package/data/packs/dnd5e/prompts/battle_master/perceive.prompt +1 -1
  9. package/data/packs/dnd5e/prompts/campaign_designer/perceive.prompt +1 -1
  10. package/data/packs/dnd5e/prompts/character_creator/perceive.prompt +795 -787
  11. package/data/packs/dnd5e/prompts/dungeon_master/defaults_config.json +2 -1
  12. package/data/packs/dnd5e/prompts/dungeon_master/perceive.prompt +1 -1
  13. package/data/packs/dnd5e/rooms/campaign.json +18 -15
  14. package/data/packs/dnd5e/rooms/table.json +17 -16
  15. package/dist-sdk/server/src/ai/LLM/anthropic.service.js +1 -1
  16. package/dist-sdk/server/src/ai/LLM/base-ai.service.d.ts +38 -0
  17. package/dist-sdk/server/src/ai/LLM/base-ai.service.js +83 -16
  18. package/dist-sdk/server/src/ai/LLM/blank-image.d.ts +36 -0
  19. package/dist-sdk/server/src/ai/LLM/blank-image.js +80 -0
  20. package/dist-sdk/server/src/ai/LLM/deepseek.service.js +1 -1
  21. package/dist-sdk/server/src/ai/LLM/fal.service.js +1 -1
  22. package/dist-sdk/server/src/ai/LLM/googleai.service.js +1 -1
  23. package/dist-sdk/server/src/ai/LLM/grok.service.js +1 -1
  24. package/dist-sdk/server/src/ai/LLM/openai.service.js +1 -1
  25. package/dist-sdk/server/src/ai/LLM/self-hosted.service.js +1 -1
  26. package/dist-sdk/server/src/ai/LLM/together.service.js +1 -1
  27. package/dist-sdk/server/src/ai/agent-config.d.ts +0 -1
  28. package/dist-sdk/server/src/ai/agent-store.service.js +2 -4
  29. package/dist-sdk/server/src/ai/agent.d.ts +7 -2
  30. package/dist-sdk/server/src/ai/agent.js +11 -3
  31. package/dist-sdk/server/src/app/user-service-factory.js +8 -2
  32. package/dist-sdk/server/src/app.controller.d.ts +33 -0
  33. package/dist-sdk/server/src/app.controller.js +93 -2
  34. package/dist-sdk/server/src/app.service.d.ts +49 -4
  35. package/dist-sdk/server/src/app.service.js +101 -16
  36. package/dist-sdk/server/src/auth/jwt-auth.guard.js +26 -0
  37. package/dist-sdk/server/src/data/data-guide.builder.d.ts +2 -0
  38. package/dist-sdk/server/src/data/data-guide.builder.js +90 -0
  39. package/dist-sdk/server/src/data/data-registry.d.ts +32 -0
  40. package/dist-sdk/server/src/data/data-registry.js +61 -0
  41. package/dist-sdk/server/src/data/data.types.d.ts +158 -0
  42. package/dist-sdk/server/src/data/data.types.js +24 -0
  43. package/dist-sdk/server/src/data/query-validation.d.ts +45 -0
  44. package/dist-sdk/server/src/data/query-validation.js +245 -0
  45. package/dist-sdk/server/src/packs/pack-instantiation.service.js +5 -0
  46. package/dist-sdk/server/src/packs/pack-manifest.d.ts +14 -0
  47. package/dist-sdk/server/src/packs/pack-manifest.js +11 -0
  48. package/dist-sdk/server/src/room/illustration/illustration.service.d.ts +211 -0
  49. package/dist-sdk/server/src/room/illustration/illustration.service.js +771 -0
  50. package/dist-sdk/server/src/room/illustration/illustration.types.d.ts +101 -0
  51. package/dist-sdk/server/src/room/illustration/illustration.types.js +2 -0
  52. package/dist-sdk/server/src/room/room-config.d.ts +58 -1
  53. package/dist-sdk/server/src/room/room-config.js +19 -0
  54. package/dist-sdk/server/src/room/room-factory.d.ts +8 -0
  55. package/dist-sdk/server/src/room/room-factory.js +11 -0
  56. package/dist-sdk/server/src/room/room-store.service.d.ts +8 -0
  57. package/dist-sdk/server/src/room/room-store.service.js +43 -2
  58. package/dist-sdk/server/src/room/room.d.ts +110 -6
  59. package/dist-sdk/server/src/room/room.js +277 -10
  60. package/dist-sdk/server/src/rpg/rpg.service.js +5 -1
  61. package/dist-sdk/server/src/sdk/index.d.ts +4 -0
  62. package/dist-sdk/server/src/sdk/index.js +11 -1
  63. package/dist-sdk/server/src/story/story.service.d.ts +24 -65
  64. package/dist-sdk/server/src/story/story.service.js +105 -458
  65. package/dist-sdk/server/src/tools/core/data.tools.d.ts +17 -0
  66. package/dist-sdk/server/src/tools/core/data.tools.js +165 -0
  67. package/dist-sdk/server/src/tools/core/illustrate.tool.d.ts +14 -0
  68. package/dist-sdk/server/src/tools/core/illustrate.tool.js +80 -0
  69. package/dist-sdk/server/src/tools/core/index.js +3 -1
  70. package/dist-sdk/server/src/tools/native-tool.types.d.ts +90 -0
  71. package/dist-sdk/server/src/tools/packs/dnd5e/engine/sheet.d.ts +9 -0
  72. package/dist-sdk/server/src/tools/packs/dnd5e/engine/sheet.js +5 -0
  73. package/dist-sdk/server/src/tools/packs/dnd5e/tools/shared.d.ts +30 -0
  74. package/dist-sdk/server/src/tools/packs/dnd5e/tools/shared.js +75 -0
  75. package/dist-sdk/server/src/tools/packs/dnd5e/tools/sheet.tools.js +11 -2
  76. package/dist-sdk/server/src/tools/tool-execution.service.d.ts +36 -5
  77. package/dist-sdk/server/src/tools/tool-execution.service.js +91 -21
  78. package/dist-sdk/shared/types/app.types.d.ts +43 -0
  79. package/dist-sdk/shared/types/app.types.js +15 -1
  80. package/package.json +1 -1
@@ -1,7 +1,7 @@
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, ToolPackDocuments, ToolRoomAccess } from './native-tool.types';
4
+ import { NativeToolDefinition, ToolHelpers, ToolContext, ToolIllustration, ToolPackDocuments, ToolRoomAccess } from './native-tool.types';
5
5
  type CompiledTool = (args: Record<string, any>, helpers: ToolHelpers, context: ToolContext) => Promise<any>;
6
6
  /**
7
7
  * Executes tools an agent calls with the EXECUTE action. Tools come from two
@@ -49,7 +49,7 @@ export declare class ToolExecutionService {
49
49
  * @param room Access to the calling agent's room, exposed as helpers.room
50
50
  * @returns The tool run result
51
51
  */
52
- runForAgent(name: string, contentJson: string, grantedNames: string[], context?: ToolContext, room?: ToolRoomAccess): Promise<ToolRunResult>;
52
+ runForAgent(name: string, contentJson: string, grantedNames: string[], context?: ToolContext, room?: ToolRoomAccess, illustration?: ToolIllustration): Promise<ToolRunResult>;
53
53
  /**
54
54
  * Runs a tool for the API test endpoint. Same validation as the agent path,
55
55
  * minus the grant check, so the Test panel shows the errors agents would get.
@@ -71,12 +71,27 @@ export declare class ToolExecutionService {
71
71
  * @returns The tool run result
72
72
  */
73
73
  private runValidated;
74
- private static missingRequiredParam;
74
+ /**
75
+ * Checks the LLM-supplied arguments against the declared parameters:
76
+ * required presence first, then any declared `enum`. Returns a ready-to-send
77
+ * error message, or null when the arguments are acceptable.
78
+ *
79
+ * An enum failure names the allowed values, so the agent can correct itself
80
+ * on its next turn rather than guessing again — the same self-correcting
81
+ * contract the rest of runForAgent uses. An omitted optional parameter is
82
+ * not enum-checked; `null` is treated as omitted, since models routinely
83
+ * send it for "not applicable".
84
+ * @param parameters The tool's declared parameters
85
+ * @param args The named arguments the agent supplied
86
+ * @returns An error message, or null when the arguments are acceptable
87
+ */
88
+ private static validateParams;
75
89
  /**
76
90
  * Runs an invocation with a timeout and an abort-wired fetch helper. Fetches
77
91
  * made through helpers.fetch are aborted when the timeout fires.
78
92
  * @param name The tool name (for logging)
79
93
  * @param toolTimeoutMs The tool's configured timeout, if any
94
+ * @param toolMaxResultChars The tool's configured result budget, if any
80
95
  * @param invoke Runs the tool with the provided helpers
81
96
  * @param room Access to the calling agent's room, omitted when there is none
82
97
  * @returns The tool run result
@@ -84,9 +99,25 @@ export declare class ToolExecutionService {
84
99
  private execute;
85
100
  private getCompiled;
86
101
  /**
87
- * Caps oversized results so a tool can't blow up the agent's prompt.
102
+ * Caps an oversized result while keeping it valid JSON of the same shape.
103
+ *
104
+ * This used to serialize, slice at the budget, and return the resulting
105
+ * string. That handed the agent unparseable half-JSON with the explanation
106
+ * stranded at the end, past the cut — and because the object had become a
107
+ * string it also defeated Room.describeToolResult's `detail`/`summary`
108
+ * lookup, so the room log lost its readable line for exactly the results a
109
+ * person most wanted to read. Instead:
110
+ *
111
+ * - An object keeps its keys. Its longest string properties are clipped, in
112
+ * order, until the whole thing fits, and `_truncated`/`_originalChars`
113
+ * record what happened so the agent can say so or ask for less.
114
+ * - A bare string is clipped in place with the same marker appended.
115
+ * - Anything that cannot be clipped that way — a long array, say — is
116
+ * replaced by a small object saying so, which is at least parseable.
117
+ *
88
118
  * @param result The raw tool result
89
- * @returns The result, or a truncated string form when it serializes too large
119
+ * @param maxChars The serialized-JSON budget for this tool
120
+ * @returns A result that serializes within budget
90
121
  */
91
122
  private static truncateResult;
92
123
  /** @returns The native tool definitions registered in this process. */
@@ -59,7 +59,7 @@ class ToolExecutionService {
59
59
  * @param room Access to the calling agent's room, exposed as helpers.room
60
60
  * @returns The tool run result
61
61
  */
62
- async runForAgent(name, contentJson, grantedNames, context, room) {
62
+ async runForAgent(name, contentJson, grantedNames, context, room, illustration) {
63
63
  if (!grantedNames.includes(name)) {
64
64
  return { ok: false, error: `Tool "${name}" is not available to you` };
65
65
  }
@@ -75,7 +75,7 @@ class ToolExecutionService {
75
75
  return { ok: false, error: 'Arguments must be a JSON object of named parameters' };
76
76
  }
77
77
  }
78
- return this.runValidated(name, args, context, room);
78
+ return this.runValidated(name, args, context, room, illustration);
79
79
  }
80
80
  /**
81
81
  * Runs a tool for the API test endpoint. Same validation as the agent path,
@@ -99,14 +99,14 @@ class ToolExecutionService {
99
99
  * @param room Access to the calling agent's room, if any
100
100
  * @returns The tool run result
101
101
  */
102
- async runValidated(name, args, context, room) {
102
+ async runValidated(name, args, context, room, illustration) {
103
103
  // Native tools take precedence and are always available.
104
104
  const nativeTool = this.nativeRegistry.getTool(name);
105
105
  if (nativeTool) {
106
- const missing = ToolExecutionService.missingRequiredParam(nativeTool.parameters, args);
107
- if (missing)
108
- return { ok: false, error: `Missing required parameter "${missing}"` };
109
- return this.execute(name, nativeTool.timeoutMs, (helpers) => nativeTool.handler(args, helpers, context), room);
106
+ const invalid = ToolExecutionService.validateParams(nativeTool.parameters, args);
107
+ if (invalid)
108
+ return { ok: false, error: invalid };
109
+ return this.execute(name, nativeTool.timeoutMs, nativeTool.maxResultChars, (helpers) => nativeTool.handler(args, helpers, context), room, illustration);
110
110
  }
111
111
  if (!this.allowUserAuthoredTools) {
112
112
  return { ok: false, error: `Tool "${name}" does not exist` };
@@ -115,9 +115,9 @@ class ToolExecutionService {
115
115
  if (!tool) {
116
116
  return { ok: false, error: `Tool "${name}" does not exist` };
117
117
  }
118
- const missing = ToolExecutionService.missingRequiredParam(tool.parameters, args);
119
- if (missing)
120
- return { ok: false, error: `Missing required parameter "${missing}"` };
118
+ const invalid = ToolExecutionService.validateParams(tool.parameters, args);
119
+ if (invalid)
120
+ return { ok: false, error: invalid };
121
121
  let fn;
122
122
  try {
123
123
  fn = this.getCompiled(tool);
@@ -125,12 +125,35 @@ class ToolExecutionService {
125
125
  catch (e) {
126
126
  return { ok: false, error: `Tool code does not compile: ${e.message}` };
127
127
  }
128
- return this.execute(name, tool.timeoutMs, (helpers) => fn(args, helpers, context), room);
128
+ return this.execute(name, tool.timeoutMs, tool.maxResultChars, (helpers) => fn(args, helpers, context), room, illustration);
129
129
  }
130
- static missingRequiredParam(parameters, args) {
130
+ /**
131
+ * Checks the LLM-supplied arguments against the declared parameters:
132
+ * required presence first, then any declared `enum`. Returns a ready-to-send
133
+ * error message, or null when the arguments are acceptable.
134
+ *
135
+ * An enum failure names the allowed values, so the agent can correct itself
136
+ * on its next turn rather than guessing again — the same self-correcting
137
+ * contract the rest of runForAgent uses. An omitted optional parameter is
138
+ * not enum-checked; `null` is treated as omitted, since models routinely
139
+ * send it for "not applicable".
140
+ * @param parameters The tool's declared parameters
141
+ * @param args The named arguments the agent supplied
142
+ * @returns An error message, or null when the arguments are acceptable
143
+ */
144
+ static validateParams(parameters, args) {
131
145
  for (const param of parameters || []) {
132
- if (param.required && args[param.name] === undefined)
133
- return param.name;
146
+ const value = args[param.name];
147
+ if (value === undefined) {
148
+ if (param.required)
149
+ return `Missing required parameter "${param.name}"`;
150
+ continue;
151
+ }
152
+ if (value === null)
153
+ continue;
154
+ if (param.enum && param.enum.length > 0 && !param.enum.includes(String(value))) {
155
+ return `Parameter "${param.name}" must be one of: ${param.enum.join(', ')}`;
156
+ }
134
157
  }
135
158
  return null;
136
159
  }
@@ -139,16 +162,18 @@ class ToolExecutionService {
139
162
  * made through helpers.fetch are aborted when the timeout fires.
140
163
  * @param name The tool name (for logging)
141
164
  * @param toolTimeoutMs The tool's configured timeout, if any
165
+ * @param toolMaxResultChars The tool's configured result budget, if any
142
166
  * @param invoke Runs the tool with the provided helpers
143
167
  * @param room Access to the calling agent's room, omitted when there is none
144
168
  * @returns The tool run result
145
169
  */
146
- async execute(name, toolTimeoutMs, invoke, room) {
170
+ async execute(name, toolTimeoutMs, toolMaxResultChars, invoke, room, illustration) {
147
171
  const timeoutMs = Math.min(toolTimeoutMs || DEFAULT_TIMEOUT_MS, MAX_TIMEOUT_MS);
148
172
  const controller = new AbortController();
149
173
  const helpers = {
150
174
  fetch: (url, init) => fetch(url, { ...init, signal: controller.signal }),
151
175
  ...(room ? { room } : {}),
176
+ ...(illustration ? { illustration } : {}),
152
177
  ...(this.packDocuments ? { packDocuments: this.packDocuments } : {}),
153
178
  };
154
179
  let timeoutHandle;
@@ -158,9 +183,10 @@ class ToolExecutionService {
158
183
  reject(new Error(`Tool timed out after ${timeoutMs}ms`));
159
184
  }, timeoutMs);
160
185
  });
186
+ const maxResultChars = toolMaxResultChars && toolMaxResultChars > 0 ? toolMaxResultChars : MAX_RESULT_CHARS;
161
187
  try {
162
188
  const result = await Promise.race([invoke(helpers), timeout]);
163
- return { ok: true, result: ToolExecutionService.truncateResult(result) };
189
+ return { ok: true, result: ToolExecutionService.truncateResult(result, maxResultChars) };
164
190
  }
165
191
  catch (e) {
166
192
  logger_1.logger.error(`Tool "${name}" failed:`, e.message);
@@ -180,16 +206,60 @@ class ToolExecutionService {
180
206
  return fn;
181
207
  }
182
208
  /**
183
- * Caps oversized results so a tool can't blow up the agent's prompt.
209
+ * Caps an oversized result while keeping it valid JSON of the same shape.
210
+ *
211
+ * This used to serialize, slice at the budget, and return the resulting
212
+ * string. That handed the agent unparseable half-JSON with the explanation
213
+ * stranded at the end, past the cut — and because the object had become a
214
+ * string it also defeated Room.describeToolResult's `detail`/`summary`
215
+ * lookup, so the room log lost its readable line for exactly the results a
216
+ * person most wanted to read. Instead:
217
+ *
218
+ * - An object keeps its keys. Its longest string properties are clipped, in
219
+ * order, until the whole thing fits, and `_truncated`/`_originalChars`
220
+ * record what happened so the agent can say so or ask for less.
221
+ * - A bare string is clipped in place with the same marker appended.
222
+ * - Anything that cannot be clipped that way — a long array, say — is
223
+ * replaced by a small object saying so, which is at least parseable.
224
+ *
184
225
  * @param result The raw tool result
185
- * @returns The result, or a truncated string form when it serializes too large
226
+ * @param maxChars The serialized-JSON budget for this tool
227
+ * @returns A result that serializes within budget
186
228
  */
187
- static truncateResult(result) {
229
+ static truncateResult(result, maxChars) {
188
230
  const serialized = JSON.stringify(result);
189
- if (serialized === undefined || serialized.length <= MAX_RESULT_CHARS) {
231
+ if (serialized === undefined || serialized.length <= maxChars) {
190
232
  return result;
191
233
  }
192
- return `${serialized.slice(0, MAX_RESULT_CHARS)}...(result truncated at ${MAX_RESULT_CHARS} characters)`;
234
+ const originalChars = serialized.length;
235
+ const marker = `…(clipped from ${originalChars} characters)`;
236
+ if (typeof result === 'string') {
237
+ const keep = Math.max(0, maxChars - marker.length - 2);
238
+ return `${result.slice(0, keep)}${marker}`;
239
+ }
240
+ if (result && typeof result === 'object' && !Array.isArray(result)) {
241
+ const clipped = { ...result, _truncated: true, _originalChars: originalChars };
242
+ const stringKeys = Object.keys(clipped)
243
+ .filter((key) => typeof clipped[key] === 'string')
244
+ .sort((a, b) => clipped[b].length - clipped[a].length);
245
+ for (const key of stringKeys) {
246
+ const over = JSON.stringify(clipped).length - maxChars;
247
+ if (over <= 0)
248
+ break;
249
+ const value = clipped[key];
250
+ const keep = Math.max(0, value.length - over - marker.length);
251
+ clipped[key] = `${value.slice(0, keep)}${marker}`;
252
+ }
253
+ if (JSON.stringify(clipped).length <= maxChars) {
254
+ return clipped;
255
+ }
256
+ }
257
+ return {
258
+ _truncated: true,
259
+ _originalChars: originalChars,
260
+ error: `The result was ${originalChars} characters, over this tool's ${maxChars}-character ` +
261
+ 'budget, and could not be clipped to fit. Call the tool again for less at a time.',
262
+ };
193
263
  }
194
264
  /** @returns The native tool definitions registered in this process. */
195
265
  listNativeTools() {
@@ -114,6 +114,13 @@ export interface ToolParameter {
114
114
  type: 'string' | 'number' | 'boolean' | 'object' | 'array';
115
115
  description: string;
116
116
  required: boolean;
117
+ /**
118
+ * The exact set of values this parameter accepts. Rendered into the agent's
119
+ * prompt beside the parameter and enforced before the tool runs, so a bad
120
+ * value comes back as a correctable error instead of reaching the handler.
121
+ * Compared case-sensitively against the string form of the argument.
122
+ */
123
+ enum?: string[];
117
124
  }
118
125
  export interface ToolDefinition {
119
126
  name: string;
@@ -121,6 +128,8 @@ export interface ToolDefinition {
121
128
  parameters: ToolParameter[];
122
129
  code: string;
123
130
  timeoutMs?: number;
131
+ /** Per-call result budget in characters. See {@link NativeToolDefinition.maxResultChars}. */
132
+ maxResultChars?: number;
124
133
  }
125
134
  export interface ToolSummary {
126
135
  name: string;
@@ -160,6 +169,31 @@ export interface RoomInfo {
160
169
  * which is what lets a leader agent control the order of a turn-based room.
161
170
  */
162
171
  export type RoomTurnMode = 'broadcast' | 'directed';
172
+ /**
173
+ * When a room asks its illustrator for a picture.
174
+ * - 'off': never.
175
+ * - 'on-request': only when an agent calls the `illustrate` tool. The default.
176
+ * - 'auto': also whenever the scene changes, which is how stories behave.
177
+ *
178
+ * 'auto' is opt-in rather than the default because a game master that restates
179
+ * the situation on every response — as the dnd5e Dungeon Master is told to —
180
+ * would otherwise buy an image on every tool call.
181
+ */
182
+ export type RoomIllustrationMode = 'off' | 'on-request' | 'auto';
183
+ /**
184
+ * The `image_models.json` entry that means "draw nothing".
185
+ *
186
+ * A real entry rather than a blank, because turning pictures off for one room is a
187
+ * different intent from not choosing a model — a blank falls back to the server's
188
+ * `DEFAULT_IMAGE_MODEL`, and this does not.
189
+ *
190
+ * The client spells the same string out itself rather than importing this. A value
191
+ * import from here is not safe there: Vite resolves `.js` before `.ts` and this
192
+ * directory is gitignored for compiled output, so a stale `app.types.js` would hand
193
+ * the client `undefined` while type-checking passed against the `.ts`. Change this
194
+ * and `RoomSettings.svelte` has to change with it.
195
+ */
196
+ export declare const NO_IMAGES = "No images";
163
197
  export interface RoomDetails {
164
198
  id: string;
165
199
  name: string;
@@ -171,12 +205,21 @@ export interface RoomDetails {
171
205
  pack?: string;
172
206
  roomLeader?: string;
173
207
  turnMode?: RoomTurnMode;
208
+ /** Entry in image_models.json. Absent uses DEFAULT_IMAGE_MODEL; {@link NO_IMAGES} disables. */
209
+ imageModel?: string;
210
+ /** Absent means 'on-request'. See {@link RoomIllustrationMode}. */
211
+ illustrationMode?: RoomIllustrationMode;
174
212
  /**
175
213
  * Nickname of the agent that places messages it cannot route mechanically.
176
214
  * Only consulted in 'moderated' mode. Absent falls back to the first agent in
177
215
  * the room, which is how story rooms have always chosen their moderator.
178
216
  */
179
217
  moderator?: string;
218
+ /**
219
+ * What Begin sends to the room leader to open the conversation. Blank or absent
220
+ * means the room offers no Begin. See `RoomConfig.beginInstruction`.
221
+ */
222
+ beginInstruction?: string;
180
223
  isPublished?: boolean;
181
224
  templateRoomId?: string;
182
225
  /**
@@ -1,7 +1,21 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.MessageAction = exports.BRIYAH_MODES = void 0;
3
+ exports.MessageAction = exports.NO_IMAGES = exports.BRIYAH_MODES = void 0;
4
4
  exports.BRIYAH_MODES = ['agents', 'stories', 'rpg'];
5
+ /**
6
+ * The `image_models.json` entry that means "draw nothing".
7
+ *
8
+ * A real entry rather than a blank, because turning pictures off for one room is a
9
+ * different intent from not choosing a model — a blank falls back to the server's
10
+ * `DEFAULT_IMAGE_MODEL`, and this does not.
11
+ *
12
+ * The client spells the same string out itself rather than importing this. A value
13
+ * import from here is not safe there: Vite resolves `.js` before `.ts` and this
14
+ * directory is gitignored for compiled output, so a stale `app.types.js` would hand
15
+ * the client `undefined` while type-checking passed against the `.ts`. Change this
16
+ * and `RoomSettings.svelte` has to change with it.
17
+ */
18
+ exports.NO_IMAGES = 'No images';
5
19
  /**
6
20
  * Represents the action type of a message
7
21
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "briyah",
3
- "version": "2.0.4",
3
+ "version": "2.0.6",
4
4
  "description": "SDK for AI agents, multi-agent rooms, interactive stories, and role-playing games with per-user data isolation and cost tracking",
5
5
  "private": false,
6
6
  "license": "Apache-2.0",