@burtson-labs/bandit-engine 2.0.70 → 2.0.71

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.
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  ChatProvider,
3
3
  chat_provider_default
4
- } from "./chunk-HHMGNCBS.mjs";
4
+ } from "./chunk-SXLI47FV.mjs";
5
5
  import "./chunk-ONQMRE2G.mjs";
6
6
  import "./chunk-6ITUH375.mjs";
7
- import "./chunk-IDZEEONG.mjs";
7
+ import "./chunk-DHYP4K5O.mjs";
8
8
  import "./chunk-4D7245ZO.mjs";
9
9
  import "./chunk-LWHSOEPR.mjs";
10
10
  import "./chunk-H3BYFEIE.mjs";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-U633CJBV.mjs";
7
7
  import {
8
8
  useMCPToolsStore
9
- } from "./chunk-IDZEEONG.mjs";
9
+ } from "./chunk-DHYP4K5O.mjs";
10
10
  import {
11
11
  AddIcon,
12
12
  ArrowDownwardIcon,
@@ -3286,6 +3286,7 @@ TOOL USAGE PROTOCOL (conservative approach)
3286
3286
  * web_search() - when asked about recent/current events, breaking news, live information (weather, prices, sports scores), or when you need to look up documentation, libraries, APIs, error messages, or verify a specific fact
3287
3287
  * web_fetch() - to read the FULL contents of a specific URL you already have. Reach for this when the user wants to "tell me more", "go deeper", "read/open that article", or asks for details about a specific source, link, or article from an EARLIER answer: take that item's URL from the previous Sources list in this conversation and fetch it, then answer from the page's actual content (not just the prior summary)
3288
3288
  * image_generation() - ONLY when explicitly asked to create or generate an image
3289
+ * create_file({"content": "...", "filename": "report.docx", "format": "docx"}) - when the user asks for a downloadable FILE (a document, spreadsheet, slides, markdown, code, etc.) or to "export"/"download"/"save" something. Formats: md, txt, csv, json, html, xml, yaml, docx, pptx. For docx/pptx write well-structured Markdown (use "## " headings to start each slide for pptx). It returns a temporary download link \u2014 ALWAYS tell the user the file expires (~1 hour). If it is unclear whether they want it shown inline vs. as a downloadable file, use ask_user first.
3289
3290
  * ask_user({"questions": [{"question": "...", "header": "Format", "options": [{"label": "Inline (Recommended)"}, {"label": "Download a file"}]}]}) - when you are genuinely BLOCKED on a decision that is the USER's to make and cannot resolve from the request, context, or sensible defaults (e.g. show content inline vs. let them download it, which format/option they want). Renders clickable options the user answers in one step \u2014 better than asking in prose and ending your turn. Give 1-4 questions, each with 2-4 options; if one is clearly best, list it first and append " (Recommended)". The user may also type their own answer; act on it directly.
3290
3291
  - For general questions about concepts, definitions, explanations, or how-to topics, use your built-in knowledge WITHOUT calling tools.
3291
3292
  - Examples of what NOT to use tools for: "who are you?", "what is React?", "explain machine learning", "how does X work?", general programming questions.
@@ -3568,6 +3569,17 @@ _${toolStatus}_` : `_${toolStatus}_`);
3568
3569
 
3569
3570
  ${revisedPrompt ? `Prompt refinement: \u201C${revisedPrompt}\u201D
3570
3571
  ` : ""}Note: the image link may expire in ~2 hours.` : "Image generated successfully.";
3572
+ } else if (functionName === "create_file" || functionName === "create-file") {
3573
+ const fileData = result.data ?? {};
3574
+ if (fileData.url) {
3575
+ const mins = fileData.expiresInMinutes ?? 60;
3576
+ const name = fileData.filename || "your file";
3577
+ resultText = `\u{1F4C4} **[${name}](${fileData.url})** \u2014 ready to download.
3578
+
3579
+ _This link is temporary and expires in about ${mins} minutes._`;
3580
+ } else {
3581
+ resultText = "The file was created.";
3582
+ }
3571
3583
  } else if (typeof result.data === "string") {
3572
3584
  resultText = result.data;
3573
3585
  } else if (result.data) {
@@ -3582,7 +3594,7 @@ ${revisedPrompt ? `Prompt refinement: \u201C${revisedPrompt}\u201D
3582
3594
  }
3583
3595
  enhancedMessage = enhancedMessage.replace(placeholderToken, resultText);
3584
3596
  if (result.success) {
3585
- if (functionName === "image_generation" || functionName === "image-generation") {
3597
+ if (functionName === "image_generation" || functionName === "image-generation" || functionName === "create_file" || functionName === "create-file") {
3586
3598
  inlineImageBlocks.push(resultText);
3587
3599
  } else if (functionName !== "check_gateway_health") {
3588
3600
  summarizableResults.push({ name: functionName, output: resultText });
@@ -9942,4 +9954,4 @@ var chat_default = Chat;
9942
9954
  export {
9943
9955
  chat_default
9944
9956
  };
9945
- //# sourceMappingURL=chunk-PUUL2R3T.mjs.map
9957
+ //# sourceMappingURL=chunk-CMBYMC3G.mjs.map