@promptbook/components 0.112.0-57 → 0.112.0-59

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/umd/index.umd.js CHANGED
@@ -30,7 +30,7 @@
30
30
  * @generated
31
31
  * @see https://github.com/webgptorg/promptbook
32
32
  */
33
- const PROMPTBOOK_ENGINE_VERSION = '0.112.0-57';
33
+ const PROMPTBOOK_ENGINE_VERSION = '0.112.0-59';
34
34
  /**
35
35
  * TODO: string_promptbook_version should be constrained to the all versions of Promptbook engine
36
36
  * Note: [💞] Ignore a discrepancy between file name and entity name
@@ -9520,6 +9520,49 @@
9520
9520
  return this.appendToSystemMessage(requirements, commentSection);
9521
9521
  }
9522
9522
  }
9523
+ /**
9524
+ * Helper method to append a bullet point to an existing `## SectionTitle` section in the system
9525
+ * message, or to create a new section when it does not yet exist.
9526
+ *
9527
+ * Handles the case where the same commitment type appears multiple times in the book source and
9528
+ * all entries should be grouped under one shared heading rather than emitting a duplicate block.
9529
+ *
9530
+ * @param requirements - Current model requirements.
9531
+ * @param sectionTitle - Section title without the `##` prefix.
9532
+ * @param bulletContent - Bullet content without the leading `- ` prefix.
9533
+ * @returns Requirements with the bullet appended to the section.
9534
+ */
9535
+ appendBulletPointToSection(requirements, sectionTitle, bulletContent) {
9536
+ const sectionHeader = `## ${sectionTitle}`;
9537
+ const bullet = `- ${bulletContent}`;
9538
+ if (requirements.systemMessage.includes(sectionHeader)) {
9539
+ // Append bullet to end of existing section, before the next h2 heading or end of message
9540
+ const newSystemMessage = requirements.systemMessage.replace(new RegExp(`(## ${sectionTitle.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}\\n\\n)([\\s\\S]*?)(?=\\n\\n##|$)`), `$1$2\n${bullet}`);
9541
+ return { ...requirements, systemMessage: newSystemMessage };
9542
+ }
9543
+ return this.appendToSystemMessage(requirements, `${sectionHeader}\n\n${bullet}`, '\n\n');
9544
+ }
9545
+ /**
9546
+ * Helper method to replace an existing `## SectionTitle` section in the system message, or to
9547
+ * append a new one when the section does not yet exist.
9548
+ *
9549
+ * Use this when a commitment type can appear multiple times and each subsequent occurrence should
9550
+ * update the single shared section rather than appending a duplicate block.
9551
+ *
9552
+ * @param requirements - Current model requirements.
9553
+ * @param sectionTitle - Section title without the `##` prefix.
9554
+ * @param sectionContent - Full section content including the `## Title` header line.
9555
+ * @returns Requirements with the section replaced or appended.
9556
+ */
9557
+ replaceOrCreateSection(requirements, sectionTitle, sectionContent) {
9558
+ const sectionHeader = `## ${sectionTitle}`;
9559
+ if (requirements.systemMessage.includes(sectionHeader)) {
9560
+ // Replace all text from the heading until the next h2 heading or end of message
9561
+ const newSystemMessage = requirements.systemMessage.replace(new RegExp(`## ${sectionTitle.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}[\\s\\S]*?(?=\\n\\n##|$)`), sectionContent);
9562
+ return { ...requirements, systemMessage: newSystemMessage };
9563
+ }
9564
+ return this.appendToSystemMessage(requirements, sectionContent, '\n\n');
9565
+ }
9523
9566
  /**
9524
9567
  * Gets tool function implementations provided by this commitment
9525
9568
  *
@@ -9999,20 +10042,16 @@
9999
10042
  if (!trimmedContent) {
10000
10043
  return requirements;
10001
10044
  }
10002
- // Get existing dictionary entries from metadata
10045
+ // Store the entry in metadata for debugging and inspection
10003
10046
  const existingDictionary = ((_a = requirements._metadata) === null || _a === void 0 ? void 0 : _a.DICTIONARY) || '';
10004
- // Merge the new dictionary entry with existing entries
10005
10047
  const mergedDictionary = existingDictionary ? `${existingDictionary}\n${trimmedContent}` : trimmedContent;
10006
- // Store the merged dictionary in metadata for debugging and inspection
10007
10048
  const updatedMetadata = {
10008
10049
  ...requirements._metadata,
10009
10050
  DICTIONARY: mergedDictionary,
10010
10051
  };
10011
- // Create the dictionary section for the system message
10012
- // Format: "# DICTIONARY\nTerm: definition\nTerm: definition..."
10013
- const dictionarySection = `# DICTIONARY\n${mergedDictionary}`;
10052
+ // Append each dictionary entry as a bullet point under ## Dictionary
10014
10053
  return {
10015
- ...this.appendToSystemMessage(requirements, dictionarySection),
10054
+ ...this.appendBulletPointToSection(requirements, 'Dictionary', trimmedContent),
10016
10055
  _metadata: updatedMetadata,
10017
10056
  };
10018
10057
  }
@@ -10526,10 +10565,10 @@
10526
10565
  if (!trimmedContent) {
10527
10566
  return requirements;
10528
10567
  }
10529
- // Add goal to the system message
10530
- const goalSection = `Goal: ${trimmedContent}`;
10568
+ // Add goal as a proper h2 section to the system message
10569
+ const goalSection = `## Goal\n\n${trimmedContent}`;
10531
10570
  const requirementsWithGoal = this.appendToSystemMessage(requirements, goalSection, '\n\n');
10532
- return this.appendToPromptSuffix(requirementsWithGoal, goalSection);
10571
+ return this.appendToPromptSuffix(requirementsWithGoal, trimmedContent);
10533
10572
  }
10534
10573
  }
10535
10574
  // Note: [💞] Ignore a discrepancy between file name and entity name
@@ -11049,11 +11088,8 @@
11049
11088
  if (!trimmedContent) {
11050
11089
  return requirements;
11051
11090
  }
11052
- // Add language rule to the system message
11053
- const languageSection = this.createSystemMessageSection('Language:', spacetrim.spaceTrim((block) => `
11054
- ${block(trimmedContent)}
11055
- <- You are speaking these languages in your responses to the user.
11056
- `));
11091
+ // Add language as a bullet under a ## Language section
11092
+ const languageSection = `## Language\n\n- Your language is ${trimmedContent}`;
11057
11093
  return this.appendToSystemMessage(requirements, languageSection, '\n\n');
11058
11094
  }
11059
11095
  }
@@ -11097,15 +11133,16 @@
11097
11133
  */
11098
11134
  function createMemorySystemMessage(extraInstructions) {
11099
11135
  return spacetrim.spaceTrim((block) => `
11100
- Memory:
11101
- - Prefer storing agent-scoped memories; only make them global when the fact should apply across all your agents.
11102
- - You can use persistent user memory tools.
11103
- - Use "${MemoryToolNames.retrieve}" to load relevant memory before answering.
11104
- - Use "${MemoryToolNames.store}" to save stable user-specific facts that improve future help.
11105
- - Use "${MemoryToolNames.update}" to refresh an existing memory when the content changes.
11106
- - Use "${MemoryToolNames.delete}" to delete memories that are no longer accurate (deletions are soft and hidden from future queries).
11107
- - Store concise memory items and avoid duplicates.
11108
- - Never claim memory was saved or loaded unless the tool confirms it.
11136
+ ## Memory
11137
+
11138
+ - Prefer storing agent-scoped memories; only make them global when the fact should apply across all your agents.
11139
+ - You can use persistent user memory tools.
11140
+ - Use \`${MemoryToolNames.retrieve}\` to load relevant memory before answering.
11141
+ - Use \`${MemoryToolNames.store}\` to save stable user-specific facts that improve future help.
11142
+ - Use \`${MemoryToolNames.update}\` to refresh an existing memory when the content changes.
11143
+ - Use \`${MemoryToolNames.delete}\` to delete memories that are no longer accurate (deletions are soft and hidden from future queries).
11144
+ - Store concise memory items and avoid duplicates.
11145
+ - Never claim memory was saved or loaded unless the tool confirms it.
11109
11146
  ${block(extraInstructions)}
11110
11147
  `);
11111
11148
  }
@@ -12027,10 +12064,8 @@
12027
12064
  if (!trimmedContent) {
12028
12065
  return requirements;
12029
12066
  }
12030
- // Create message section for system message
12031
- const messageSection = `Previous Message: ${trimmedContent}`;
12032
12067
  // Messages represent conversation history and should be included for context
12033
- return this.appendToSystemMessage(requirements, messageSection, '\n\n');
12068
+ return this.appendBulletPointToSection(requirements, 'Previous messages', trimmedContent);
12034
12069
  }
12035
12070
  }
12036
12071
  // Note: [💞] Ignore a discrepancy between file name and entity name
@@ -13667,10 +13702,9 @@
13667
13702
  if (!trimmedContent) {
13668
13703
  return requirements;
13669
13704
  }
13670
- // Add rule to the system message
13671
- const ruleSection = `Rule: ${trimmedContent}`;
13672
- const requirementsWithRule = this.appendToSystemMessage(requirements, ruleSection, '\n\n');
13673
- return this.appendToPromptSuffix(requirementsWithRule, ruleSection);
13705
+ // Group all rules under a single ## Rules section as bullet points
13706
+ const requirementsWithRule = this.appendBulletPointToSection(requirements, 'Rules', trimmedContent);
13707
+ return this.appendToPromptSuffix(requirementsWithRule, `- ${trimmedContent}`);
13674
13708
  }
13675
13709
  }
13676
13710
  // Note: [💞] Ignore a discrepancy between file name and entity name
@@ -13906,10 +13940,8 @@
13906
13940
  if (!trimmedContent) {
13907
13941
  return requirements;
13908
13942
  }
13909
- // Create scenario section for system message
13910
- const scenarioSection = `Scenario: ${trimmedContent}`;
13911
13943
  // Scenarios provide important contextual information that affects behavior
13912
- return this.appendToSystemMessage(requirements, scenarioSection, '\n\n');
13944
+ return this.appendBulletPointToSection(requirements, 'Scenarios', trimmedContent);
13913
13945
  }
13914
13946
  }
13915
13947
  // Note: [💞] Ignore a discrepancy between file name and entity name
@@ -14292,8 +14324,8 @@
14292
14324
  * @private
14293
14325
  */
14294
14326
  const TEAM_SYSTEM_MESSAGE_GUIDANCE_LINES = [
14295
- '- If a teammate is relevant to the request, consult that teammate using the matching tool.',
14296
- '- Do not ask the user for information that a listed teammate can provide directly.',
14327
+ '- If a teammate is relevant to the request, consult that teammate using the matching tool.',
14328
+ '- Do not ask the user for information that a listed teammate can provide directly.',
14297
14329
  ];
14298
14330
  /**
14299
14331
  * Constant for remote agents by Url.
@@ -14421,7 +14453,7 @@
14421
14453
  toolName: entry.toolName,
14422
14454
  });
14423
14455
  }
14424
- const teamSystemMessage = this.createSystemMessageSection('Teammates:', buildTeamSystemMessageBody(teamEntries));
14456
+ const teamSystemMessage = this.createSystemMessageSection('Teammates', buildTeamSystemMessageBody(teamEntries));
14425
14457
  return this.appendToSystemMessage({
14426
14458
  ...requirements,
14427
14459
  tools: updatedTools,
@@ -14911,36 +14943,38 @@
14911
14943
  switch (type) {
14912
14944
  case 'USE TIME':
14913
14945
  return spacetrim.spaceTrim((block) => `
14914
- Time and date context:
14915
- - It is ${moment__default["default"]().format('MMMM YYYY')} now.
14916
- - If you need more precise current time information, use the tool "get_current_time".
14946
+ ## Time and date context
14947
+
14948
+ - It is ${moment__default["default"]().format('MMMM YYYY')} now.
14949
+ - If you need more precise current time information, use the tool \`get_current_time\`.
14917
14950
  ${block(formatOptionalInstructionBlock('Time instructions', combinedAdditionalInstructions))}
14918
14951
  `);
14919
14952
  case 'USE BROWSER':
14920
14953
  return spacetrim.spaceTrim((block) => `
14921
- You have access to browser tools to fetch and access content from the internet.
14922
- - Use "fetch_url_content" to retrieve content from specific URLs (webpages or documents) using scrapers.
14923
- - Use "run_browser" for real interactive browser automation (navigation, clicks, typing, waiting, scrolling).
14924
- When you need to know information from a specific website or document, use the fetch_url_content tool.
14954
+ ## Browser
14955
+
14956
+ - Use \`fetch_url_content\` to retrieve content from specific URLs (webpages or documents) using scrapers.
14957
+ - Use \`run_browser\` for real interactive browser automation (navigation, clicks, typing, waiting, scrolling).
14958
+ - When you need to know information from a specific website or document, use the tools provided.
14925
14959
  ${block(formatOptionalInstructionBlock('Browser instructions', combinedAdditionalInstructions))}
14926
14960
  `);
14927
14961
  case 'USE SEARCH ENGINE':
14928
14962
  return spacetrim.spaceTrim((block) => `
14929
- Tool:
14930
- - You have access to the web search engine via the tool "web_search".
14931
- - Use it to find up-to-date information or facts that you don't know.
14932
- - When you need to know some information from the internet, use the tool provided to you.
14933
- - Do not make up information when you can search for it.
14934
- - Do not tell the user you cannot search for information, YOU CAN.
14963
+ ## Web Search
14964
+
14965
+ - Use \`web_search\` to find up-to-date information or facts.
14966
+ - When you need to know some information from the internet, use the search tool provided.
14967
+ - Do not make up information when you can search for it.
14968
+ - Do not tell the user you cannot search for information, YOU CAN.
14935
14969
  ${block(formatOptionalInstructionBlock('Search instructions', combinedAdditionalInstructions))}
14936
14970
  `);
14937
14971
  case 'USE DEEPSEARCH':
14938
14972
  return spacetrim.spaceTrim((block) => `
14939
- Tool:
14940
- - You have access to DeepSearch via the tool "deep_search".
14941
- - Use it for broader research tasks that need multi-step investigation, comparison, or synthesis across multiple sources.
14942
- - Prefer it over quick search when the user asks for a well-grounded brief, report, or deeper investigation.
14943
- - Do not pretend you cannot research current information when this tool is available.
14973
+ ## Deep Research
14974
+
14975
+ - Use \`deep_search\` for broader research tasks that need multi-step investigation, comparison, or synthesis across multiple sources.
14976
+ - Prefer it over quick search when the user asks for a well-grounded brief, report, or deeper investigation.
14977
+ - Do not pretend you cannot research current information when this tool is available.
14944
14978
  ${block(formatOptionalInstructionBlock('DeepSearch instructions', combinedAdditionalInstructions))}
14945
14979
  `);
14946
14980
  }
@@ -15270,96 +15304,6 @@
15270
15304
  }
15271
15305
  // Note: [💞] Ignore a discrepancy between file name and entity name
15272
15306
 
15273
- /**
15274
- * Base Google Calendar API URL.
15275
- *
15276
- * @private constant of callGoogleCalendarApi
15277
- */
15278
- const GOOGLE_CALENDAR_API_BASE_URL = 'https://www.googleapis.com/calendar/v3';
15279
- /**
15280
- * Runs one Google Calendar API request and parses JSON response payload.
15281
- *
15282
- * @private function of UseCalendarCommitmentDefinition
15283
- */
15284
- async function callGoogleCalendarApi(accessToken, options) {
15285
- const url = new URL(options.path, GOOGLE_CALENDAR_API_BASE_URL);
15286
- if (options.query) {
15287
- for (const [key, value] of Object.entries(options.query)) {
15288
- if (value && value.trim()) {
15289
- url.searchParams.set(key, value);
15290
- }
15291
- }
15292
- }
15293
- const response = await fetch(url.toString(), {
15294
- method: options.method,
15295
- headers: {
15296
- Authorization: `Bearer ${accessToken}`,
15297
- Accept: 'application/json',
15298
- 'Content-Type': 'application/json',
15299
- },
15300
- body: options.body ? JSON.stringify(options.body) : undefined,
15301
- });
15302
- const textPayload = await response.text();
15303
- const parsedPayload = tryParseJson$2(textPayload);
15304
- if (options.allowNotFound && response.status === 404) {
15305
- return null;
15306
- }
15307
- if (!response.ok) {
15308
- throw new Error(spacetrim.spaceTrim(`
15309
- Google Calendar API request failed (${response.status} ${response.statusText}):
15310
- ${extractGoogleCalendarApiErrorMessage(parsedPayload, textPayload)}
15311
- `));
15312
- }
15313
- return parsedPayload;
15314
- }
15315
- /**
15316
- * Parses raw text into JSON when possible.
15317
- *
15318
- * @private function of callGoogleCalendarApi
15319
- */
15320
- function tryParseJson$2(rawText) {
15321
- if (!rawText.trim()) {
15322
- return {};
15323
- }
15324
- try {
15325
- return JSON.parse(rawText);
15326
- }
15327
- catch (_a) {
15328
- return rawText;
15329
- }
15330
- }
15331
- /**
15332
- * Extracts a user-friendly Google Calendar API error message.
15333
- *
15334
- * @private function of callGoogleCalendarApi
15335
- */
15336
- function extractGoogleCalendarApiErrorMessage(parsedPayload, fallbackText) {
15337
- if (parsedPayload && typeof parsedPayload === 'object') {
15338
- const payload = parsedPayload;
15339
- const errorPayload = payload.error;
15340
- if (errorPayload && typeof errorPayload === 'object') {
15341
- const normalizedErrorPayload = errorPayload;
15342
- const message = typeof normalizedErrorPayload.message === 'string' ? normalizedErrorPayload.message : '';
15343
- const errors = Array.isArray(normalizedErrorPayload.errors) ? normalizedErrorPayload.errors : [];
15344
- const flattenedErrors = errors
15345
- .map((errorEntry) => {
15346
- if (!errorEntry || typeof errorEntry !== 'object') {
15347
- return '';
15348
- }
15349
- const normalizedErrorEntry = errorEntry;
15350
- const detailMessage = typeof normalizedErrorEntry.message === 'string' ? normalizedErrorEntry.message : '';
15351
- const reason = typeof normalizedErrorEntry.reason === 'string' ? normalizedErrorEntry.reason : '';
15352
- return [detailMessage, reason].filter(Boolean).join(' | ');
15353
- })
15354
- .filter(Boolean);
15355
- if (message || flattenedErrors.length > 0) {
15356
- return [message, ...flattenedErrors].filter(Boolean).join(' | ');
15357
- }
15358
- }
15359
- }
15360
- return fallbackText || 'Unknown Google Calendar API error';
15361
- }
15362
-
15363
15307
  /**
15364
15308
  * Hostnames accepted for Google Calendar references.
15365
15309
  *
@@ -15541,6 +15485,96 @@
15541
15485
  }
15542
15486
  // Note: [💞] Ignore a discrepancy between file name and entity name
15543
15487
 
15488
+ /**
15489
+ * Base Google Calendar API URL.
15490
+ *
15491
+ * @private constant of callGoogleCalendarApi
15492
+ */
15493
+ const GOOGLE_CALENDAR_API_BASE_URL = 'https://www.googleapis.com/calendar/v3';
15494
+ /**
15495
+ * Runs one Google Calendar API request and parses JSON response payload.
15496
+ *
15497
+ * @private function of UseCalendarCommitmentDefinition
15498
+ */
15499
+ async function callGoogleCalendarApi(accessToken, options) {
15500
+ const url = new URL(options.path, GOOGLE_CALENDAR_API_BASE_URL);
15501
+ if (options.query) {
15502
+ for (const [key, value] of Object.entries(options.query)) {
15503
+ if (value && value.trim()) {
15504
+ url.searchParams.set(key, value);
15505
+ }
15506
+ }
15507
+ }
15508
+ const response = await fetch(url.toString(), {
15509
+ method: options.method,
15510
+ headers: {
15511
+ Authorization: `Bearer ${accessToken}`,
15512
+ Accept: 'application/json',
15513
+ 'Content-Type': 'application/json',
15514
+ },
15515
+ body: options.body ? JSON.stringify(options.body) : undefined,
15516
+ });
15517
+ const textPayload = await response.text();
15518
+ const parsedPayload = tryParseJson$2(textPayload);
15519
+ if (options.allowNotFound && response.status === 404) {
15520
+ return null;
15521
+ }
15522
+ if (!response.ok) {
15523
+ throw new Error(spacetrim.spaceTrim(`
15524
+ Google Calendar API request failed (${response.status} ${response.statusText}):
15525
+ ${extractGoogleCalendarApiErrorMessage(parsedPayload, textPayload)}
15526
+ `));
15527
+ }
15528
+ return parsedPayload;
15529
+ }
15530
+ /**
15531
+ * Parses raw text into JSON when possible.
15532
+ *
15533
+ * @private function of callGoogleCalendarApi
15534
+ */
15535
+ function tryParseJson$2(rawText) {
15536
+ if (!rawText.trim()) {
15537
+ return {};
15538
+ }
15539
+ try {
15540
+ return JSON.parse(rawText);
15541
+ }
15542
+ catch (_a) {
15543
+ return rawText;
15544
+ }
15545
+ }
15546
+ /**
15547
+ * Extracts a user-friendly Google Calendar API error message.
15548
+ *
15549
+ * @private function of callGoogleCalendarApi
15550
+ */
15551
+ function extractGoogleCalendarApiErrorMessage(parsedPayload, fallbackText) {
15552
+ if (parsedPayload && typeof parsedPayload === 'object') {
15553
+ const payload = parsedPayload;
15554
+ const errorPayload = payload.error;
15555
+ if (errorPayload && typeof errorPayload === 'object') {
15556
+ const normalizedErrorPayload = errorPayload;
15557
+ const message = typeof normalizedErrorPayload.message === 'string' ? normalizedErrorPayload.message : '';
15558
+ const errors = Array.isArray(normalizedErrorPayload.errors) ? normalizedErrorPayload.errors : [];
15559
+ const flattenedErrors = errors
15560
+ .map((errorEntry) => {
15561
+ if (!errorEntry || typeof errorEntry !== 'object') {
15562
+ return '';
15563
+ }
15564
+ const normalizedErrorEntry = errorEntry;
15565
+ const detailMessage = typeof normalizedErrorEntry.message === 'string' ? normalizedErrorEntry.message : '';
15566
+ const reason = typeof normalizedErrorEntry.reason === 'string' ? normalizedErrorEntry.reason : '';
15567
+ return [detailMessage, reason].filter(Boolean).join(' | ');
15568
+ })
15569
+ .filter(Boolean);
15570
+ if (message || flattenedErrors.length > 0) {
15571
+ return [message, ...flattenedErrors].filter(Boolean).join(' | ');
15572
+ }
15573
+ }
15574
+ }
15575
+ return fallbackText || 'Unknown Google Calendar API error';
15576
+ }
15577
+
15544
15578
  /**
15545
15579
  * Wallet metadata used by USE CALENDAR when resolving Google Calendar credentials.
15546
15580
  *
@@ -16441,18 +16475,20 @@
16441
16475
  if (parsedCommitment.calendar) {
16442
16476
  addConfiguredCalendarIfMissing(existingConfiguredCalendars, parsedCommitment.calendar);
16443
16477
  }
16444
- const calendarsList = existingConfiguredCalendars.length > 0
16445
- ? existingConfiguredCalendars
16446
- .map((calendar) => [
16447
- `- ${calendar.provider}: ${calendar.url}`,
16448
- calendar.scopes.length > 0 ? ` scopes: ${calendar.scopes.join(', ')}` : '',
16449
- ]
16450
- .filter(Boolean)
16451
- .join('\n'))
16452
- .join('\n')
16453
- : '- Calendar is resolved from runtime context';
16478
+ const calendarBullets = existingConfiguredCalendars.length > 0
16479
+ ? existingConfiguredCalendars.map((calendar) => `- ${calendar.provider}: ${calendar.url}`).join('\n')
16480
+ : '- Calendar is resolved from runtime context';
16454
16481
  const extraInstructions = formatOptionalInstructionBlock('Calendar instructions', parsedCommitment.instructions);
16455
- return this.appendToSystemMessage({
16482
+ const calendarSectionContent = spacetrim.spaceTrim((block) => `
16483
+ ## Calendar
16484
+
16485
+ - Use \`calendar_list_events\`, \`calendar_get_event\`, \`calendar_create_event\`, \`calendar_update_event\`, \`calendar_delete_event\`, and \`calendar_invite_guests\` to manage events in configured calendars.
16486
+ - Supported operations include read, create, update, delete, invite guests, and reminders.
16487
+ - Configured calendars:
16488
+ ${block(calendarBullets)}
16489
+ ${block(extraInstructions)}
16490
+ `);
16491
+ return this.replaceOrCreateSection({
16456
16492
  ...requirements,
16457
16493
  tools: createUseCalendarTools(requirements.tools || []),
16458
16494
  _metadata: {
@@ -16460,16 +16496,7 @@
16460
16496
  useCalendar: true,
16461
16497
  useCalendars: existingConfiguredCalendars,
16462
16498
  },
16463
- }, spacetrim.spaceTrim((block) => `
16464
- Calendar tools:
16465
- - You can inspect and manage events in configured calendars.
16466
- - Supported operations include read, create, update, delete, invite guests, and reminders.
16467
- - Configured calendars:
16468
- ${block(calendarsList)}
16469
- - USE CALENDAR credentials are read from wallet records (ACCESS_TOKEN, service "${UseCalendarWallet.service}", key "${UseCalendarWallet.key}").
16470
- - If credentials are missing, ask user to connect calendar credentials in host UI and/or add them to wallet.
16471
- ${block(extraInstructions)}
16472
- `));
16499
+ }, 'Calendar', calendarSectionContent);
16473
16500
  }
16474
16501
  /**
16475
16502
  * Gets human-readable titles for tool functions provided by this commitment.
@@ -16806,18 +16833,6 @@
16806
16833
  * @private internal USE EMAIL constant
16807
16834
  */
16808
16835
  const SEND_EMAIL_TOOL_NAME = 'send_email';
16809
- /**
16810
- * Wallet service used for SMTP credentials required by USE EMAIL.
16811
- *
16812
- * @private internal USE EMAIL constant
16813
- */
16814
- const USE_EMAIL_SMTP_WALLET_SERVICE = 'smtp';
16815
- /**
16816
- * Wallet key used for SMTP credentials required by USE EMAIL.
16817
- *
16818
- * @private internal USE EMAIL constant
16819
- */
16820
- const USE_EMAIL_SMTP_WALLET_KEY = 'use-email-smtp-credentials';
16821
16836
  /**
16822
16837
  * USE EMAIL commitment definition.
16823
16838
  *
@@ -16876,31 +16891,41 @@
16876
16891
  `);
16877
16892
  }
16878
16893
  applyToAgentModelRequirements(requirements, content) {
16894
+ var _a;
16879
16895
  const parsedCommitment = parseUseEmailCommitmentContent(content);
16880
- const extraInstructions = formatOptionalInstructionBlock('Email instructions', parsedCommitment.instructions);
16881
- const senderInstruction = parsedCommitment.senderEmail
16882
- ? `- Default sender address from commitment: "${parsedCommitment.senderEmail}".`
16883
- : '';
16884
16896
  const updatedTools = addUseEmailTools(requirements.tools || []);
16885
- return this.appendToSystemMessage({
16897
+ // Collect all configured sender emails across multiple USE EMAIL commitments
16898
+ const existingSenders = Array.isArray((_a = requirements._metadata) === null || _a === void 0 ? void 0 : _a.useEmailSenders)
16899
+ ? [...requirements._metadata.useEmailSenders]
16900
+ : [];
16901
+ if (parsedCommitment.senderEmail && !existingSenders.includes(parsedCommitment.senderEmail)) {
16902
+ existingSenders.push(parsedCommitment.senderEmail);
16903
+ }
16904
+ const senderBullets = existingSenders.length > 0
16905
+ ? existingSenders
16906
+ .map((email, index) => index === 0
16907
+ ? `- Default sender address: "${email}".`
16908
+ : `- Additional sender address: "${email}".`)
16909
+ .join('\n')
16910
+ : '';
16911
+ const extraInstructions = formatOptionalInstructionBlock('Email instructions', parsedCommitment.instructions);
16912
+ const emailSectionContent = spacetrim.spaceTrim((block) => `
16913
+ ## Emails
16914
+
16915
+ - Use \`${SEND_EMAIL_TOOL_NAME}\` to send outbound emails.
16916
+ ${block(senderBullets)}
16917
+ ${block(extraInstructions)}
16918
+ `);
16919
+ return this.replaceOrCreateSection({
16886
16920
  ...requirements,
16887
16921
  tools: updatedTools,
16888
16922
  _metadata: {
16889
16923
  ...requirements._metadata,
16890
16924
  useEmail: true,
16891
16925
  ...(parsedCommitment.senderEmail ? { useEmailSender: parsedCommitment.senderEmail } : {}),
16926
+ useEmailSenders: existingSenders,
16892
16927
  },
16893
- }, spacetrim.spaceTrim((block) => `
16894
- Email tool:
16895
- - Use "${SEND_EMAIL_TOOL_NAME}" to send outbound emails.
16896
- - Prefer \`message\` argument compatible with Promptbook \`Message\` type.
16897
- - Include subject in \`message.metadata.subject\` (or use legacy \`subject\` argument).
16898
- - USE EMAIL credentials are read from wallet records (ACCESS_TOKEN, service "${USE_EMAIL_SMTP_WALLET_SERVICE}", key "${USE_EMAIL_SMTP_WALLET_KEY}").
16899
- - Wallet secret must contain SMTP credentials in JSON format with fields \`host\`, \`port\`, \`secure\`, \`username\`, \`password\`.
16900
- - If credentials are missing, ask user to add wallet credentials.
16901
- ${block(senderInstruction)}
16902
- ${block(extraInstructions)}
16903
- `));
16928
+ }, 'Emails', emailSectionContent);
16904
16929
  }
16905
16930
  /**
16906
16931
  * Gets human-readable titles for tool functions provided by this commitment.
@@ -16936,13 +16961,13 @@
16936
16961
  ...existingTools,
16937
16962
  {
16938
16963
  name: SEND_EMAIL_TOOL_NAME,
16939
- description: 'Send an outbound email through configured SMTP credentials. Prefer providing Message-like payload in `message`.',
16964
+ description: 'Send an outbound email.',
16940
16965
  parameters: {
16941
16966
  type: 'object',
16942
16967
  properties: {
16943
16968
  message: {
16944
16969
  type: 'object',
16945
- description: 'Preferred input payload compatible with Promptbook Message type. Use metadata.subject for subject line.',
16970
+ description: 'Email payload. Use metadata.subject for the subject line.',
16946
16971
  },
16947
16972
  to: {
16948
16973
  type: 'string',
@@ -17046,13 +17071,14 @@
17046
17071
  useImageGenerator: content || true,
17047
17072
  },
17048
17073
  }, spacetrim.spaceTrim((block) => `
17049
- Image generation:
17050
- - You do not generate images directly and you do not call any image tool.
17051
- - When the user asks for an image, include markdown notation in your message:
17052
- \`![<alt text>](?image-prompt=<prompt>)\`
17053
- - Keep \`<alt text>\` short and descriptive.
17054
- - Keep \`<prompt>\` detailed so the generated image matches the request.
17055
- - You can include normal explanatory text before and after the notation.
17074
+ ## Image generation
17075
+
17076
+ - You do not generate images directly and you do not call any image tool.
17077
+ - When the user asks for an image, include markdown notation in your message:
17078
+ \`![<alt text>](?image-prompt=<prompt>)\`
17079
+ - Keep \`<alt text>\` short and descriptive.
17080
+ - Keep \`<prompt>\` detailed so the generated image matches the request.
17081
+ - You can include normal explanatory text before and after the notation.
17056
17082
  ${block(extraInstructions)}
17057
17083
  `));
17058
17084
  }
@@ -17232,11 +17258,12 @@
17232
17258
  usePopup: content || true,
17233
17259
  },
17234
17260
  }, spacetrim.spaceTrim((block) => `
17235
- Tool:
17236
- - You can open a popup window with a specific URL using the tool "open_popup".
17237
- - Use this when you want the user to see or interact with a specific website.
17261
+ ## Popup
17262
+
17263
+ - You can open a popup window with a specific URL using the tool \`open_popup\`.
17264
+ - Use this when you want the user to see or interact with a specific website.
17238
17265
  ${block(extraInstructions)}
17239
- `));
17266
+ `));
17240
17267
  }
17241
17268
  /**
17242
17269
  * Gets human-readable titles for tool functions provided by this commitment.
@@ -17410,11 +17437,12 @@
17410
17437
  usePrivacy: content || true,
17411
17438
  },
17412
17439
  }, spacetrim.spaceTrim((block) => `
17413
- Privacy mode:
17414
- - Use "${TURN_PRIVACY_ON_TOOL_NAME}" when the user asks for a private/sensitive conversation.
17415
- - This tool requests a UI confirmation dialog. Private mode is enabled only after user confirms.
17416
- - Current implementation uses the existing chat private mode (no chat persistence, memory persistence, or self-learning while active).
17417
- - Do not claim that end-to-end encryption is implemented yet.
17440
+ ## Privacy
17441
+
17442
+ - Use \`${TURN_PRIVACY_ON_TOOL_NAME}\` when the user asks for a private/sensitive conversation.
17443
+ - This tool requests a UI confirmation dialog. Private mode is enabled only after user confirms.
17444
+ - Current implementation uses the existing chat private mode (no chat persistence, memory persistence, or self-learning while active).
17445
+ - Do not claim that end-to-end encryption is implemented yet.
17418
17446
  ${block(extraInstructions)}
17419
17447
  `));
17420
17448
  }
@@ -19057,9 +19085,16 @@
19057
19085
  }
19058
19086
  const existingConfiguredProjects = normalizeConfiguredProjects((_a = requirements._metadata) === null || _a === void 0 ? void 0 : _a.useProjects);
19059
19087
  addConfiguredProjectIfMissing(existingConfiguredProjects, parsedCommitment.repository);
19060
- const repositoriesList = existingConfiguredProjects.map((project) => `- ${project.url}`).join('\n');
19061
19088
  const extraInstructions = formatOptionalInstructionBlock('Project instructions', parsedCommitment.instructions);
19062
- return this.appendToSystemMessage({
19089
+ const sectionContent = spacetrim.spaceTrim((block) => `
19090
+ - You can inspect and edit configured GitHub repositories using project tools.
19091
+ - Configured repositories:
19092
+ ${block(existingConfiguredProjects.map((project) => `- ${project.url}`).join('\n'))}
19093
+ - When a repository is not obvious from context, pass \`repository\` in tool arguments explicitly.
19094
+ - If credentials are missing, ask the user to connect their GitHub account in the host UI.
19095
+ ${block(extraInstructions)}
19096
+ `);
19097
+ return this.replaceOrCreateSection({
19063
19098
  ...requirements,
19064
19099
  tools: createUseProjectTools(requirements.tools || []),
19065
19100
  _metadata: {
@@ -19067,16 +19102,7 @@
19067
19102
  useProject: true,
19068
19103
  useProjects: existingConfiguredProjects,
19069
19104
  },
19070
- }, spacetrim.spaceTrim((block) => `
19071
- Project tools:
19072
- - You can inspect and edit configured GitHub repositories using project tools.
19073
- - Configured repositories:
19074
- ${block(repositoriesList)}
19075
- - When a repository is not obvious from context, pass "repository" in tool arguments explicitly.
19076
- - USE PROJECT credentials are read from wallet records (ACCESS_TOKEN, service "${UseProjectWallet.service}", key "${UseProjectWallet.key}").
19077
- - If credentials are missing, ask the user to connect credentials in host UI and/or add them to wallet.
19078
- ${block(extraInstructions)}
19079
- `));
19105
+ }, 'GitHub repositories', sectionContent);
19080
19106
  }
19081
19107
  /**
19082
19108
  * Gets human-readable titles for tool functions provided by this commitment.
@@ -19423,11 +19449,12 @@
19423
19449
  useSpawn: content || true,
19424
19450
  },
19425
19451
  }, spacetrim.spaceTrim((block) => `
19426
- Spawning agents:
19427
- - Use "${SPAWN_AGENT_TOOL_NAME}" only when user asks to create a persistent new agent.
19428
- - Pass full agent source in \`source\`.
19429
- - Keep \`source\` concise; the maximum accepted length is ${CREATE_AGENT_INPUT_SOURCE_MAX_LENGTH} characters.
19430
- - Do not add unknown fields in tool arguments.
19452
+ ## Spawning agents
19453
+
19454
+ - Use \`${SPAWN_AGENT_TOOL_NAME}\` only when user asks to create a persistent new agent.
19455
+ - Pass full agent source in \`source\`.
19456
+ - Keep \`source\` concise; the maximum accepted length is ${CREATE_AGENT_INPUT_SOURCE_MAX_LENGTH} characters.
19457
+ - Do not add unknown fields in tool arguments.
19431
19458
  ${block(extraInstructions)}
19432
19459
  `));
19433
19460
  }
@@ -19461,13 +19488,14 @@
19461
19488
  */
19462
19489
  function createTimeoutSystemMessage(extraInstructions) {
19463
19490
  return spacetrim.spaceTrim((block) => `
19464
- Timeout scheduling:
19465
- - Use "set_timeout" to wake this same chat thread in the future.
19466
- - Use "list_timeouts" to review timeout ids/details across all chats for the same user+agent scope.
19467
- - "cancel_timeout" accepts either one timeout id or \`allActive: true\` to cancel all active timeouts in this same user+agent scope.
19468
- - Use "update_timeout" to pause/resume, edit next run, edit recurrence, or update timeout payload details.
19469
- - When one timeout elapses, you will receive a new user-like message that explicitly says it is a timeout wake-up and includes the \`timeoutId\`.
19470
- - Do not claim a timer was set or cancelled unless the tool confirms it.
19491
+ ## Timeout scheduling
19492
+
19493
+ - Use \`set_timeout\` to wake this same chat thread in the future.
19494
+ - Use \`list_timeouts\` to review timeout ids/details across all chats for the same user+agent scope.
19495
+ - \`cancel_timeout\` accepts either one timeout id or \`allActive: true\` to cancel all active timeouts in this same user+agent scope.
19496
+ - Use \`update_timeout\` to pause/resume, edit next run, edit recurrence, or update timeout payload details.
19497
+ - When one timeout elapses, you will receive a new user-like message that explicitly says it is a timeout wake-up and includes the \`timeoutId\`.
19498
+ - Do not claim a timer was set or cancelled unless the tool confirms it.
19471
19499
  ${block(extraInstructions)}
19472
19500
  `);
19473
19501
  }
@@ -20567,10 +20595,11 @@
20567
20595
  useUserLocation: content || true,
20568
20596
  },
20569
20597
  }, spacetrim.spaceTrim((block) => `
20570
- User location:
20571
- - Use "${GET_USER_LOCATION_TOOL_NAME}" only when location is needed for a better answer.
20572
- - If the tool returns "unavailable" or "permission-denied", ask user to share location or provide city manually.
20573
- - Do not invent coordinates or local facts when location is unavailable.
20598
+ ## User location
20599
+
20600
+ - Use \`${GET_USER_LOCATION_TOOL_NAME}\` only when location is needed for a better answer.
20601
+ - If the tool returns "unavailable" or "permission-denied", ask user to share location or provide city manually.
20602
+ - Do not invent coordinates or local facts when location is unavailable.
20574
20603
  ${block(extraInstructions)}
20575
20604
  `));
20576
20605
  }
@@ -23095,7 +23124,7 @@
23095
23124
  return (jsxRuntime.jsx("div", { className: classNames(styles$a.MenuHamburger, className), onClick: onClick, children: jsxRuntime.jsxs("div", { className: classNames(styles$a.MenuHamburgerInner, isOpen && styles$a.open), children: [jsxRuntime.jsx("div", { className: classNames(styles$a.bar, styles$a.bar1) }), jsxRuntime.jsx("div", { className: classNames(styles$a.bar, styles$a.bar2) }), jsxRuntime.jsx("div", { className: classNames(styles$a.bar, styles$a.bar3) })] }) }));
23096
23125
  }
23097
23126
 
23098
- var css_248z$9 = ".Dropdown-module_dropdown__ZShv1{display:inline-block;position:relative}.Dropdown-module_button__WzWhM{align-items:center;background-color:transparent;border:none;cursor:pointer;display:flex;font-size:16px;gap:10px;padding:10px;transition:background-color .2s ease-in-out}.Dropdown-module_button__WzWhM:hover{background-color:rgba(0,0,0,.05)}.Dropdown-module_button__WzWhM.Dropdown-module_isOpen__917OA .Dropdown-module_menuIcon__Mp4p8 line:first-child{transform:rotate(45deg) translate(5px,5px)}.Dropdown-module_button__WzWhM.Dropdown-module_isOpen__917OA .Dropdown-module_menuIcon__Mp4p8 line:nth-child(2){opacity:0}.Dropdown-module_button__WzWhM.Dropdown-module_isOpen__917OA .Dropdown-module_menuIcon__Mp4p8 line:nth-child(3){transform:rotate(-45deg) translate(5px,-5px)}.Dropdown-module_menu__-N5tr{background-color:#f9f9f9;border-radius:5px;box-shadow:0 8px 16px 0 rgba(0,0,0,.2);min-width:160px;overflow:hidden;position:absolute;right:0;top:100%;z-index:1}.Dropdown-module_menuItem__7FpAz{text-align:left;width:100%}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkRyb3Bkb3duLm1vZHVsZS5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsaUNBRUksb0JBQXFCLENBRHJCLGlCQUVKLENBRUEsK0JBT0ksa0JBQW1CLENBTm5CLDRCQUE2QixDQUM3QixXQUFZLENBQ1osY0FBZSxDQUdmLFlBQWEsQ0FEYixjQUFlLENBR2YsUUFBUyxDQUpULFlBQWEsQ0FLYiwyQ0FDSixDQUVBLHFDQUNJLGdDQUNKLENBRUEsK0dBQ0ksMENBQ0osQ0FFQSxnSEFDSSxTQUNKLENBRUEsZ0hBQ0ksNENBQ0osQ0FFQSw2QkFJSSx3QkFBeUIsQ0FJekIsaUJBQWtCLENBRmxCLHNDQUErQyxDQUQvQyxlQUFnQixDQUloQixlQUFnQixDQVJoQixpQkFBa0IsQ0FFbEIsT0FBUSxDQURSLFFBQVMsQ0FLVCxTQUdKLENBRUEsaUNBRUksZUFBZ0IsQ0FEaEIsVUFFSiIsImZpbGUiOiJEcm9wZG93bi5tb2R1bGUuY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmRyb3Bkb3duIHtcbiAgICBwb3NpdGlvbjogcmVsYXRpdmU7XG4gICAgZGlzcGxheTogaW5saW5lLWJsb2NrO1xufVxuXG4uYnV0dG9uIHtcbiAgICBiYWNrZ3JvdW5kLWNvbG9yOiB0cmFuc3BhcmVudDtcbiAgICBib3JkZXI6IG5vbmU7XG4gICAgY3Vyc29yOiBwb2ludGVyO1xuICAgIHBhZGRpbmc6IDEwcHg7XG4gICAgZm9udC1zaXplOiAxNnB4O1xuICAgIGRpc3BsYXk6IGZsZXg7XG4gICAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgICBnYXA6IDEwcHg7XG4gICAgdHJhbnNpdGlvbjogYmFja2dyb3VuZC1jb2xvciAwLjJzIGVhc2UtaW4tb3V0O1xufVxuXG4uYnV0dG9uOmhvdmVyIHtcbiAgICBiYWNrZ3JvdW5kLWNvbG9yOiByZ2JhKDAsIDAsIDAsIDAuMDUpO1xufVxuXG4uYnV0dG9uLmlzT3BlbiAubWVudUljb24gbGluZTpudGgtY2hpbGQoMSkge1xuICAgIHRyYW5zZm9ybTogcm90YXRlKDQ1ZGVnKSB0cmFuc2xhdGUoNXB4LCA1cHgpO1xufVxuXG4uYnV0dG9uLmlzT3BlbiAubWVudUljb24gbGluZTpudGgtY2hpbGQoMikge1xuICAgIG9wYWNpdHk6IDA7XG59XG5cbi5idXR0b24uaXNPcGVuIC5tZW51SWNvbiBsaW5lOm50aC1jaGlsZCgzKSB7XG4gICAgdHJhbnNmb3JtOiByb3RhdGUoLTQ1ZGVnKSB0cmFuc2xhdGUoNXB4LCAtNXB4KTtcbn1cblxuLm1lbnUge1xuICAgIHBvc2l0aW9uOiBhYnNvbHV0ZTtcbiAgICB0b3A6IDEwMCU7XG4gICAgcmlnaHQ6IDA7XG4gICAgYmFja2dyb3VuZC1jb2xvcjogI2Y5ZjlmOTtcbiAgICBtaW4td2lkdGg6IDE2MHB4O1xuICAgIGJveC1zaGFkb3c6IDBweCA4cHggMTZweCAwcHggcmdiYSgwLCAwLCAwLCAwLjIpO1xuICAgIHotaW5kZXg6IDE7XG4gICAgYm9yZGVyLXJhZGl1czogNXB4O1xuICAgIG92ZXJmbG93OiBoaWRkZW47XG59XG5cbi5tZW51SXRlbSB7XG4gICAgd2lkdGg6IDEwMCU7XG4gICAgdGV4dC1hbGlnbjogbGVmdDtcbn1cbiJdfQ== */";
23127
+ var css_248z$9 = ".Dropdown-module_dropdown__ZShv1{display:inline-block;position:relative}.Dropdown-module_button__WzWhM{align-items:center;background-color:transparent;border:none;color:inherit;cursor:pointer;display:flex;font-size:16px;gap:10px;padding:10px;transition:background-color .2s ease-in-out}.Dropdown-module_button__WzWhM:hover{background-color:rgba(0,0,0,.05)}.Dropdown-module_button__WzWhM.Dropdown-module_isOpen__917OA .Dropdown-module_menuIcon__Mp4p8 line:first-child{transform:rotate(45deg) translate(5px,5px)}.Dropdown-module_button__WzWhM.Dropdown-module_isOpen__917OA .Dropdown-module_menuIcon__Mp4p8 line:nth-child(2){opacity:0}.Dropdown-module_button__WzWhM.Dropdown-module_isOpen__917OA .Dropdown-module_menuIcon__Mp4p8 line:nth-child(3){transform:rotate(-45deg) translate(5px,-5px)}.Dropdown-module_menu__-N5tr{background-color:#f9f9f9;border:1px solid rgba(209,213,219,.9);border-radius:5px;box-shadow:0 8px 16px 0 rgba(0,0,0,.2);min-width:160px;overflow:hidden;position:absolute;right:0;top:100%;z-index:1}.Dropdown-module_menuItem__7FpAz{text-align:left;width:100%}[data-book-editor-theme=dark] .Dropdown-module_button__WzWhM:hover{background-color:rgba(148,163,184,.12)}[data-book-editor-theme=dark] .Dropdown-module_menu__-N5tr{background-color:rgba(8,15,28,.98);border-color:rgba(51,65,85,.9);box-shadow:0 18px 40px rgba(2,6,23,.45)}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkRyb3Bkb3duLm1vZHVsZS5jc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsaUNBRUksb0JBQXFCLENBRHJCLGlCQUVKLENBRUEsK0JBT0ksa0JBQW1CLENBTm5CLDRCQUE2QixDQUM3QixXQUFZLENBT1osYUFBYyxDQU5kLGNBQWUsQ0FHZixZQUFhLENBRGIsY0FBZSxDQUdmLFFBQVMsQ0FKVCxZQUFhLENBTWIsMkNBQ0osQ0FFQSxxQ0FDSSxnQ0FDSixDQUVBLCtHQUNJLDBDQUNKLENBRUEsZ0hBQ0ksU0FDSixDQUVBLGdIQUNJLDRDQUNKLENBRUEsNkJBSUksd0JBQXlCLENBS3pCLHFDQUEwQyxDQUQxQyxpQkFBa0IsQ0FGbEIsc0NBQStDLENBRC9DLGVBQWdCLENBS2hCLGVBQWdCLENBVGhCLGlCQUFrQixDQUVsQixPQUFRLENBRFIsUUFBUyxDQUtULFNBSUosQ0FFQSxpQ0FFSSxlQUFnQixDQURoQixVQUVKLENBRUEsbUVBQ0ksc0NBQ0osQ0FFQSwyREFDSSxrQ0FBdUMsQ0FDdkMsOEJBQW1DLENBQ25DLHVDQUNKIiwiZmlsZSI6IkRyb3Bkb3duLm1vZHVsZS5jc3MiLCJzb3VyY2VzQ29udGVudCI6WyIuZHJvcGRvd24ge1xuICAgIHBvc2l0aW9uOiByZWxhdGl2ZTtcbiAgICBkaXNwbGF5OiBpbmxpbmUtYmxvY2s7XG59XG5cbi5idXR0b24ge1xuICAgIGJhY2tncm91bmQtY29sb3I6IHRyYW5zcGFyZW50O1xuICAgIGJvcmRlcjogbm9uZTtcbiAgICBjdXJzb3I6IHBvaW50ZXI7XG4gICAgcGFkZGluZzogMTBweDtcbiAgICBmb250LXNpemU6IDE2cHg7XG4gICAgZGlzcGxheTogZmxleDtcbiAgICBhbGlnbi1pdGVtczogY2VudGVyO1xuICAgIGdhcDogMTBweDtcbiAgICBjb2xvcjogaW5oZXJpdDtcbiAgICB0cmFuc2l0aW9uOiBiYWNrZ3JvdW5kLWNvbG9yIDAuMnMgZWFzZS1pbi1vdXQ7XG59XG5cbi5idXR0b246aG92ZXIge1xuICAgIGJhY2tncm91bmQtY29sb3I6IHJnYmEoMCwgMCwgMCwgMC4wNSk7XG59XG5cbi5idXR0b24uaXNPcGVuIC5tZW51SWNvbiBsaW5lOm50aC1jaGlsZCgxKSB7XG4gICAgdHJhbnNmb3JtOiByb3RhdGUoNDVkZWcpIHRyYW5zbGF0ZSg1cHgsIDVweCk7XG59XG5cbi5idXR0b24uaXNPcGVuIC5tZW51SWNvbiBsaW5lOm50aC1jaGlsZCgyKSB7XG4gICAgb3BhY2l0eTogMDtcbn1cblxuLmJ1dHRvbi5pc09wZW4gLm1lbnVJY29uIGxpbmU6bnRoLWNoaWxkKDMpIHtcbiAgICB0cmFuc2Zvcm06IHJvdGF0ZSgtNDVkZWcpIHRyYW5zbGF0ZSg1cHgsIC01cHgpO1xufVxuXG4ubWVudSB7XG4gICAgcG9zaXRpb246IGFic29sdXRlO1xuICAgIHRvcDogMTAwJTtcbiAgICByaWdodDogMDtcbiAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjZjlmOWY5O1xuICAgIG1pbi13aWR0aDogMTYwcHg7XG4gICAgYm94LXNoYWRvdzogMHB4IDhweCAxNnB4IDBweCByZ2JhKDAsIDAsIDAsIDAuMik7XG4gICAgei1pbmRleDogMTtcbiAgICBib3JkZXItcmFkaXVzOiA1cHg7XG4gICAgYm9yZGVyOiAxcHggc29saWQgcmdiYSgyMDksIDIxMywgMjE5LCAwLjkpO1xuICAgIG92ZXJmbG93OiBoaWRkZW47XG59XG5cbi5tZW51SXRlbSB7XG4gICAgd2lkdGg6IDEwMCU7XG4gICAgdGV4dC1hbGlnbjogbGVmdDtcbn1cblxuOmdsb2JhbChbZGF0YS1ib29rLWVkaXRvci10aGVtZT0nZGFyayddKSAuYnV0dG9uOmhvdmVyIHtcbiAgICBiYWNrZ3JvdW5kLWNvbG9yOiByZ2JhKDE0OCwgMTYzLCAxODQsIDAuMTIpO1xufVxuXG46Z2xvYmFsKFtkYXRhLWJvb2stZWRpdG9yLXRoZW1lPSdkYXJrJ10pIC5tZW51IHtcbiAgICBiYWNrZ3JvdW5kLWNvbG9yOiByZ2JhKDgsIDE1LCAyOCwgMC45OCk7XG4gICAgYm9yZGVyLWNvbG9yOiByZ2JhKDUxLCA2NSwgODUsIDAuOSk7XG4gICAgYm94LXNoYWRvdzogMCAxOHB4IDQwcHggcmdiYSgyLCA2LCAyMywgMC40NSk7XG59XG4iXX0= */";
23099
23128
  var styles$9 = {"dropdown":"Dropdown-module_dropdown__ZShv1","button":"Dropdown-module_button__WzWhM","isOpen":"Dropdown-module_isOpen__917OA","menuIcon":"Dropdown-module_menuIcon__Mp4p8","menu":"Dropdown-module_menu__-N5tr","menuItem":"Dropdown-module_menuItem__7FpAz"};
23100
23129
  styleInject(css_248z$9);
23101
23130
 
@@ -36194,7 +36223,7 @@
36194
36223
  if (examples.length === 0) {
36195
36224
  return null;
36196
36225
  }
36197
- return `Example interaction:\n\n${examples.join('\n\n')}`;
36226
+ return `## Sample of communication with the agent:\n\n${examples.join('\n\n')}`;
36198
36227
  }
36199
36228
  /**
36200
36229
  * Collects the individual lines used in the example interaction section.
@@ -36210,11 +36239,11 @@
36210
36239
  const examples = [];
36211
36240
  const initialMessage = (_a = parseResult.commitments.find((commitment) => commitment.type === 'INITIAL MESSAGE')) === null || _a === void 0 ? void 0 : _a.content;
36212
36241
  if (initialMessage) {
36213
- examples.push(`Agent: ${initialMessage}`);
36242
+ examples.push(`**Agent:**\n${initialMessage}`);
36214
36243
  }
36215
36244
  if (samples && samples.length > 0) {
36216
36245
  for (const sample of samples) {
36217
- examples.push(`User: ${sample.question}\nAgent: ${sample.answer}`);
36246
+ examples.push(`**User:** ${sample.question}\n\n**Agent:**\n${sample.answer}`);
36218
36247
  }
36219
36248
  }
36220
36249
  return examples;