diff --git a/packages/blink/src/agent/tools.ts b/packages/blink/src/agent/tools.ts
index 2a1615e..1461313 100644
--- a/packages/blink/src/agent/tools.ts
+++ b/packages/blink/src/agent/tools.ts
@@ -63,6 +63,12 @@ export function toolWithApproval(
return tool;
}
+type ToolSetWithPrefix = {
+ [K in keyof TOOLS as `${PREFIX}${K & string}`]: K extends string
+ ? TOOLS[K]
+ : never;
+};
+
/**
* Tools are helpers for managing tools.
*/
@@ -253,12 +259,15 @@ export const tools = Object.freeze({
* @param prefix The prefix to add to the tools.
* @returns The prefixed tool set.
*/
- prefix(tools: ToolSet, prefix: string): ToolSet {
+ prefix(
+ tools: TOOLS,
+ prefix: PREFIX
+ ): ToolSetWithPrefix {
const prefixed: ToolSet = {};
for (const [key, tool] of Object.entries(tools)) {
prefixed[`${prefix}${key}`] = tool;
}
- return prefixed;
+ return prefixed as ToolSetWithPrefix;
},
});
diff --git a/packages/slack/package.json b/packages/slack/package.json
index 4948a50..2da3c85 100644
--- a/packages/slack/package.json
+++ b/packages/slack/package.json
@@ -1,6 +1,6 @@
{
"name": "@blink-sdk/slack",
- "version": "1.1.1",
+ "version": "1.1.2",
"author": {
"name": "Coder",
"email": "support@blink.so",