@anuma/sdk 6.27.5 → 6.27.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.
- package/dist/expo/index.cjs +7 -4
- package/dist/expo/index.mjs +7 -4
- package/dist/react/index.cjs +7 -4
- package/dist/react/index.mjs +7 -4
- package/dist/tools/index.cjs +2 -1
- package/dist/tools/index.mjs +2 -1
- package/dist/tools/selection/index.cjs +7 -4
- package/dist/tools/selection/index.d.mts +4 -3
- package/dist/tools/selection/index.d.ts +4 -3
- package/dist/tools/selection/index.mjs +7 -4
- package/package.json +1 -1
package/dist/expo/index.cjs
CHANGED
|
@@ -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/confirm.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
|
|
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(
|
|
21129
|
-
const filterCandidates = clientTools.filter((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
|
}
|
package/dist/expo/index.mjs
CHANGED
|
@@ -18622,6 +18622,9 @@ function createMemoryVaultTool(vaultCtx, options, embeddingOptions, cache) {
|
|
|
18622
18622
|
};
|
|
18623
18623
|
}
|
|
18624
18624
|
|
|
18625
|
+
// src/tools/confirm.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
|
|
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(
|
|
19458
|
-
const filterCandidates = clientTools.filter((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
|
}
|
package/dist/react/index.cjs
CHANGED
|
@@ -22637,6 +22637,9 @@ async function preprocessFiles(files, options = {}) {
|
|
|
22637
22637
|
};
|
|
22638
22638
|
}
|
|
22639
22639
|
|
|
22640
|
+
// src/tools/confirm.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
|
|
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(
|
|
23513
|
-
const filterCandidates = clientTools.filter((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
|
}
|
package/dist/react/index.mjs
CHANGED
|
@@ -20713,6 +20713,9 @@ async function preprocessFiles(files, options = {}) {
|
|
|
20713
20713
|
};
|
|
20714
20714
|
}
|
|
20715
20715
|
|
|
20716
|
+
// src/tools/confirm.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
|
|
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(
|
|
21588
|
-
const filterCandidates = clientTools.filter((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
|
}
|
package/dist/tools/index.cjs
CHANGED
|
@@ -837,9 +837,10 @@ function createChoiceTool(options) {
|
|
|
837
837
|
}
|
|
838
838
|
|
|
839
839
|
// src/tools/confirm.ts
|
|
840
|
+
var CONFIRM_TOOL_NAME = "prompt_user_confirm";
|
|
840
841
|
function createConfirmTool(options) {
|
|
841
842
|
return createInteractiveTool(options, {
|
|
842
|
-
name:
|
|
843
|
+
name: CONFIRM_TOOL_NAME,
|
|
843
844
|
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
845
|
parameters: {
|
|
845
846
|
type: "object",
|
package/dist/tools/index.mjs
CHANGED
|
@@ -681,9 +681,10 @@ function createChoiceTool(options) {
|
|
|
681
681
|
}
|
|
682
682
|
|
|
683
683
|
// src/tools/confirm.ts
|
|
684
|
+
var CONFIRM_TOOL_NAME = "prompt_user_confirm";
|
|
684
685
|
function createConfirmTool(options) {
|
|
685
686
|
return createInteractiveTool(options, {
|
|
686
|
-
name:
|
|
687
|
+
name: CONFIRM_TOOL_NAME,
|
|
687
688
|
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
689
|
parameters: {
|
|
689
690
|
type: "object",
|
|
@@ -120,6 +120,9 @@ __export(index_exports, {
|
|
|
120
120
|
});
|
|
121
121
|
module.exports = __toCommonJS(index_exports);
|
|
122
122
|
|
|
123
|
+
// src/tools/confirm.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
|
|
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(
|
|
2281
|
-
const filterCandidates = clientTools.filter((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,9 +771,10 @@ 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
|
|
775
|
-
* dependency-free `../memory/recallConstants`,
|
|
776
|
-
*
|
|
774
|
+
* `../memoryEngine/generate` core, `RECALL_TOOL_NAME` from the
|
|
775
|
+
* dependency-free `../memory/recallConstants`, and `CONFIRM_TOOL_NAME` from
|
|
776
|
+
* `../../tools/confirm`, whose only runtime import is `uiInteraction`, so
|
|
777
|
+
* nothing here drags in the WatermelonDB data layer.
|
|
777
778
|
*/
|
|
778
779
|
|
|
779
780
|
/** Typed accessor for client tool name (handles function-call style and flat). */
|
|
@@ -771,9 +771,10 @@ 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
|
|
775
|
-
* dependency-free `../memory/recallConstants`,
|
|
776
|
-
*
|
|
774
|
+
* `../memoryEngine/generate` core, `RECALL_TOOL_NAME` from the
|
|
775
|
+
* dependency-free `../memory/recallConstants`, and `CONFIRM_TOOL_NAME` from
|
|
776
|
+
* `../../tools/confirm`, whose only runtime import is `uiInteraction`, so
|
|
777
|
+
* nothing here drags in the WatermelonDB data layer.
|
|
777
778
|
*/
|
|
778
779
|
|
|
779
780
|
/** Typed accessor for client tool name (handles function-call style and flat). */
|
|
@@ -3,6 +3,9 @@ import {
|
|
|
3
3
|
createClientConfig
|
|
4
4
|
} from "./chunk-4ETHWSXJ.mjs";
|
|
5
5
|
|
|
6
|
+
// src/tools/confirm.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
|
|
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(
|
|
2160
|
-
const filterCandidates = clientTools.filter((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
|
}
|