@anuma/sdk 6.27.5 → 6.27.7

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.
@@ -20292,6 +20292,9 @@ function createMemoryVaultTool(vaultCtx, options, embeddingOptions, cache) {
20292
20292
  // src/expo/useChatStorage.ts
20293
20293
  init_redactor();
20294
20294
 
20295
+ // src/tools/confirmConstants.ts
20296
+ var CONFIRM_TOOL_NAME = "prompt_user_confirm";
20297
+
20295
20298
  // src/tools/appBuilderPrompt.ts
20296
20299
  var APP_BUILDER_PROMPT = `App Builder tools (create_file, patch_file, and the rest described below) are available this turn, but they are OPTIONAL \u2014 having them does not mean you should build anything.
20297
20300
 
@@ -21121,12 +21124,12 @@ function computeToolGuidance(selectedServerTools, selectedClientTools, extraTool
21121
21124
  return prompts.length > 0 ? prompts.join("\n\n") : void 0;
21122
21125
  }
21123
21126
  async function autoFilterClientTools(clientTools, promptEmbeddings, cache, embeddingOptions, extraToolSets = [], activeToolSets = [], noEmbeddingsReason = "short-prompt") {
21124
- const isMemoryTool = (t) => {
21127
+ const isAlwaysIncluded = (t) => {
21125
21128
  const name = getToolName2(t);
21126
- return name.startsWith("memory_vault_") || name === RECALL_TOOL_NAME;
21129
+ return name.startsWith("memory_vault_") || name === RECALL_TOOL_NAME || name === CONFIRM_TOOL_NAME;
21127
21130
  };
21128
- const alwaysInclude = clientTools.filter(isMemoryTool);
21129
- const filterCandidates = clientTools.filter((t) => !isMemoryTool(t));
21131
+ const alwaysInclude = clientTools.filter(isAlwaysIncluded);
21132
+ const filterCandidates = clientTools.filter((t) => !isAlwaysIncluded(t));
21130
21133
  if (filterCandidates.length === 0) {
21131
21134
  return { tools: clientTools, activatedSetNames: /* @__PURE__ */ new Set() };
21132
21135
  }
@@ -18622,6 +18622,9 @@ function createMemoryVaultTool(vaultCtx, options, embeddingOptions, cache) {
18622
18622
  };
18623
18623
  }
18624
18624
 
18625
+ // src/tools/confirmConstants.ts
18626
+ var CONFIRM_TOOL_NAME = "prompt_user_confirm";
18627
+
18625
18628
  // src/tools/appBuilderPrompt.ts
18626
18629
  var APP_BUILDER_PROMPT = `App Builder tools (create_file, patch_file, and the rest described below) are available this turn, but they are OPTIONAL \u2014 having them does not mean you should build anything.
18627
18630
 
@@ -19450,12 +19453,12 @@ function computeToolGuidance(selectedServerTools, selectedClientTools, extraTool
19450
19453
  return prompts.length > 0 ? prompts.join("\n\n") : void 0;
19451
19454
  }
19452
19455
  async function autoFilterClientTools(clientTools, promptEmbeddings, cache, embeddingOptions, extraToolSets = [], activeToolSets = [], noEmbeddingsReason = "short-prompt") {
19453
- const isMemoryTool = (t) => {
19456
+ const isAlwaysIncluded = (t) => {
19454
19457
  const name = getToolName2(t);
19455
- return name.startsWith("memory_vault_") || name === RECALL_TOOL_NAME;
19458
+ return name.startsWith("memory_vault_") || name === RECALL_TOOL_NAME || name === CONFIRM_TOOL_NAME;
19456
19459
  };
19457
- const alwaysInclude = clientTools.filter(isMemoryTool);
19458
- const filterCandidates = clientTools.filter((t) => !isMemoryTool(t));
19460
+ const alwaysInclude = clientTools.filter(isAlwaysIncluded);
19461
+ const filterCandidates = clientTools.filter((t) => !isAlwaysIncluded(t));
19459
19462
  if (filterCandidates.length === 0) {
19460
19463
  return { tools: clientTools, activatedSetNames: /* @__PURE__ */ new Set() };
19461
19464
  }
@@ -22637,6 +22637,9 @@ async function preprocessFiles(files, options = {}) {
22637
22637
  };
22638
22638
  }
22639
22639
 
22640
+ // src/tools/confirmConstants.ts
22641
+ var CONFIRM_TOOL_NAME = "prompt_user_confirm";
22642
+
22640
22643
  // src/tools/appBuilderPrompt.ts
22641
22644
  var APP_BUILDER_PROMPT = `App Builder tools (create_file, patch_file, and the rest described below) are available this turn, but they are OPTIONAL \u2014 having them does not mean you should build anything.
22642
22645
 
@@ -23505,12 +23508,12 @@ function computeToolGuidance(selectedServerTools, selectedClientTools, extraTool
23505
23508
  return prompts.length > 0 ? prompts.join("\n\n") : void 0;
23506
23509
  }
23507
23510
  async function autoFilterClientTools(clientTools, promptEmbeddings, cache, embeddingOptions, extraToolSets = [], activeToolSets = [], noEmbeddingsReason = "short-prompt") {
23508
- const isMemoryTool = (t) => {
23511
+ const isAlwaysIncluded = (t) => {
23509
23512
  const name = getToolName2(t);
23510
- return name.startsWith("memory_vault_") || name === RECALL_TOOL_NAME;
23513
+ return name.startsWith("memory_vault_") || name === RECALL_TOOL_NAME || name === CONFIRM_TOOL_NAME;
23511
23514
  };
23512
- const alwaysInclude = clientTools.filter(isMemoryTool);
23513
- const filterCandidates = clientTools.filter((t) => !isMemoryTool(t));
23515
+ const alwaysInclude = clientTools.filter(isAlwaysIncluded);
23516
+ const filterCandidates = clientTools.filter((t) => !isAlwaysIncluded(t));
23514
23517
  if (filterCandidates.length === 0) {
23515
23518
  return { tools: clientTools, activatedSetNames: /* @__PURE__ */ new Set() };
23516
23519
  }
@@ -20713,6 +20713,9 @@ async function preprocessFiles(files, options = {}) {
20713
20713
  };
20714
20714
  }
20715
20715
 
20716
+ // src/tools/confirmConstants.ts
20717
+ var CONFIRM_TOOL_NAME = "prompt_user_confirm";
20718
+
20716
20719
  // src/tools/appBuilderPrompt.ts
20717
20720
  var APP_BUILDER_PROMPT = `App Builder tools (create_file, patch_file, and the rest described below) are available this turn, but they are OPTIONAL \u2014 having them does not mean you should build anything.
20718
20721
 
@@ -21580,12 +21583,12 @@ function computeToolGuidance(selectedServerTools, selectedClientTools, extraTool
21580
21583
  return prompts.length > 0 ? prompts.join("\n\n") : void 0;
21581
21584
  }
21582
21585
  async function autoFilterClientTools(clientTools, promptEmbeddings, cache, embeddingOptions, extraToolSets = [], activeToolSets = [], noEmbeddingsReason = "short-prompt") {
21583
- const isMemoryTool = (t) => {
21586
+ const isAlwaysIncluded = (t) => {
21584
21587
  const name = getToolName2(t);
21585
- return name.startsWith("memory_vault_") || name === RECALL_TOOL_NAME;
21588
+ return name.startsWith("memory_vault_") || name === RECALL_TOOL_NAME || name === CONFIRM_TOOL_NAME;
21586
21589
  };
21587
- const alwaysInclude = clientTools.filter(isMemoryTool);
21588
- const filterCandidates = clientTools.filter((t) => !isMemoryTool(t));
21590
+ const alwaysInclude = clientTools.filter(isAlwaysIncluded);
21591
+ const filterCandidates = clientTools.filter((t) => !isAlwaysIncluded(t));
21589
21592
  if (filterCandidates.length === 0) {
21590
21593
  return { tools: clientTools, activatedSetNames: /* @__PURE__ */ new Set() };
21591
21594
  }
@@ -836,10 +836,13 @@ function createChoiceTool(options) {
836
836
  });
837
837
  }
838
838
 
839
+ // src/tools/confirmConstants.ts
840
+ var CONFIRM_TOOL_NAME = "prompt_user_confirm";
841
+
839
842
  // src/tools/confirm.ts
840
843
  function createConfirmTool(options) {
841
844
  return createInteractiveTool(options, {
842
- name: "prompt_user_confirm",
845
+ name: CONFIRM_TOOL_NAME,
843
846
  description: "Ask the user to approve a specific action before it happens. Use before anything that spends money or is hard to undo, such as booking a restaurant table or placing an order. List every parameter of the action, with the exact values you are about to use \u2014 the user approves what this card shows, and nothing else. Returns whether they confirmed. Do not use for ordinary yes/no questions; use prompt_user_choice for those.",
844
847
  parameters: {
845
848
  type: "object",
@@ -680,10 +680,13 @@ function createChoiceTool(options) {
680
680
  });
681
681
  }
682
682
 
683
+ // src/tools/confirmConstants.ts
684
+ var CONFIRM_TOOL_NAME = "prompt_user_confirm";
685
+
683
686
  // src/tools/confirm.ts
684
687
  function createConfirmTool(options) {
685
688
  return createInteractiveTool(options, {
686
- name: "prompt_user_confirm",
689
+ name: CONFIRM_TOOL_NAME,
687
690
  description: "Ask the user to approve a specific action before it happens. Use before anything that spends money or is hard to undo, such as booking a restaurant table or placing an order. List every parameter of the action, with the exact values you are about to use \u2014 the user approves what this card shows, and nothing else. Returns whether they confirmed. Do not use for ordinary yes/no questions; use prompt_user_choice for those.",
688
691
  parameters: {
689
692
  type: "object",
@@ -120,6 +120,9 @@ __export(index_exports, {
120
120
  });
121
121
  module.exports = __toCommonJS(index_exports);
122
122
 
123
+ // src/tools/confirmConstants.ts
124
+ var CONFIRM_TOOL_NAME = "prompt_user_confirm";
125
+
123
126
  // src/lib/memory/recallConstants.ts
124
127
  var RECALL_TOOL_NAME = "recall_memory";
125
128
 
@@ -2273,12 +2276,12 @@ function computeToolGuidance(selectedServerTools, selectedClientTools, extraTool
2273
2276
  return prompts.length > 0 ? prompts.join("\n\n") : void 0;
2274
2277
  }
2275
2278
  async function autoFilterClientTools(clientTools, promptEmbeddings, cache, embeddingOptions, extraToolSets = [], activeToolSets = [], noEmbeddingsReason = "short-prompt") {
2276
- const isMemoryTool = (t) => {
2279
+ const isAlwaysIncluded = (t) => {
2277
2280
  const name = getToolName(t);
2278
- return name.startsWith("memory_vault_") || name === RECALL_TOOL_NAME;
2281
+ return name.startsWith("memory_vault_") || name === RECALL_TOOL_NAME || name === CONFIRM_TOOL_NAME;
2279
2282
  };
2280
- const alwaysInclude = clientTools.filter(isMemoryTool);
2281
- const filterCandidates = clientTools.filter((t) => !isMemoryTool(t));
2283
+ const alwaysInclude = clientTools.filter(isAlwaysIncluded);
2284
+ const filterCandidates = clientTools.filter((t) => !isAlwaysIncluded(t));
2282
2285
  if (filterCandidates.length === 0) {
2283
2286
  return { tools: clientTools, activatedSetNames: /* @__PURE__ */ new Set() };
2284
2287
  }
@@ -771,8 +771,9 @@ declare function selectServerSideTools(options: SelectServerSideToolsOptions): P
771
771
  * these — behavior is unchanged from when they lived inline.
772
772
  *
773
773
  * Dependency-safe by construction: `generateEmbeddings` comes from the db-free
774
- * `../memoryEngine/generate` core and `RECALL_TOOL_NAME` from the
775
- * dependency-free `../memory/recallConstants`, so nothing here drags in the
774
+ * `../memoryEngine/generate` core, `RECALL_TOOL_NAME` from the
775
+ * dependency-free `../memory/recallConstants`, and `CONFIRM_TOOL_NAME` from the
776
+ * dependency-free `../../tools/confirmConstants`, so nothing here drags in the
776
777
  * WatermelonDB data layer.
777
778
  */
778
779
 
@@ -771,8 +771,9 @@ declare function selectServerSideTools(options: SelectServerSideToolsOptions): P
771
771
  * these — behavior is unchanged from when they lived inline.
772
772
  *
773
773
  * Dependency-safe by construction: `generateEmbeddings` comes from the db-free
774
- * `../memoryEngine/generate` core and `RECALL_TOOL_NAME` from the
775
- * dependency-free `../memory/recallConstants`, so nothing here drags in the
774
+ * `../memoryEngine/generate` core, `RECALL_TOOL_NAME` from the
775
+ * dependency-free `../memory/recallConstants`, and `CONFIRM_TOOL_NAME` from the
776
+ * dependency-free `../../tools/confirmConstants`, so nothing here drags in the
776
777
  * WatermelonDB data layer.
777
778
  */
778
779
 
@@ -3,6 +3,9 @@ import {
3
3
  createClientConfig
4
4
  } from "./chunk-4ETHWSXJ.mjs";
5
5
 
6
+ // src/tools/confirmConstants.ts
7
+ var CONFIRM_TOOL_NAME = "prompt_user_confirm";
8
+
6
9
  // src/lib/memory/recallConstants.ts
7
10
  var RECALL_TOOL_NAME = "recall_memory";
8
11
 
@@ -2152,12 +2155,12 @@ function computeToolGuidance(selectedServerTools, selectedClientTools, extraTool
2152
2155
  return prompts.length > 0 ? prompts.join("\n\n") : void 0;
2153
2156
  }
2154
2157
  async function autoFilterClientTools(clientTools, promptEmbeddings, cache, embeddingOptions, extraToolSets = [], activeToolSets = [], noEmbeddingsReason = "short-prompt") {
2155
- const isMemoryTool = (t) => {
2158
+ const isAlwaysIncluded = (t) => {
2156
2159
  const name = getToolName(t);
2157
- return name.startsWith("memory_vault_") || name === RECALL_TOOL_NAME;
2160
+ return name.startsWith("memory_vault_") || name === RECALL_TOOL_NAME || name === CONFIRM_TOOL_NAME;
2158
2161
  };
2159
- const alwaysInclude = clientTools.filter(isMemoryTool);
2160
- const filterCandidates = clientTools.filter((t) => !isMemoryTool(t));
2162
+ const alwaysInclude = clientTools.filter(isAlwaysIncluded);
2163
+ const filterCandidates = clientTools.filter((t) => !isAlwaysIncluded(t));
2161
2164
  if (filterCandidates.length === 0) {
2162
2165
  return { tools: clientTools, activatedSetNames: /* @__PURE__ */ new Set() };
2163
2166
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anuma/sdk",
3
- "version": "6.27.5",
3
+ "version": "6.27.7",
4
4
  "description": "",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",