blink 0.1.40 → 0.1.41
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/api/index.cjs +2 -2
- package/dist/api/index.d.cts +40 -2
- package/dist/api/index.d.ts +40 -2
- package/dist/api/index.js +2 -2
- package/dist/cli/index.js +70 -70
- package/package.json +1 -6
- package/dist/tools.cjs +0 -1
- package/dist/tools.d.cts +0 -33
- package/dist/tools.d.ts +0 -33
- package/dist/tools.js +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "blink",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.41",
|
|
4
4
|
"description": "Blink is a JavaScript runtime for building and deploying AI agents.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -21,11 +21,6 @@
|
|
|
21
21
|
"types": "./dist/runtime/node.d.ts",
|
|
22
22
|
"import": "./dist/runtime/node.js",
|
|
23
23
|
"require": "./dist/runtime/node.cjs"
|
|
24
|
-
},
|
|
25
|
-
"./tools": {
|
|
26
|
-
"types": "./dist/tools.d.ts",
|
|
27
|
-
"import": "./dist/tools.js",
|
|
28
|
-
"require": "./dist/tools.cjs"
|
|
29
24
|
}
|
|
30
25
|
},
|
|
31
26
|
"files": [
|
package/dist/tools.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=(e,t)=>{let n={};for(let[r,i]of Object.entries(e))n[`${t}${r}`]=i;return n};function t(e,n){return{...e(n),with:n=>t(e,n)}}function n(e,t){let n={};for(let[r,i]of Object.entries(t))n[r]=i.with(e);return n}exports.prefix=e,exports.toolWith=t,exports.toolsWith=n;
|
package/dist/tools.d.cts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Tool, ToolSet } from "ai";
|
|
2
|
-
|
|
3
|
-
//#region src/tools.d.ts
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* prefix all the tools with a given string.
|
|
7
|
-
*
|
|
8
|
-
* @param tools The tool set to prefix.
|
|
9
|
-
* @param prefix The prefix to add to the tools.
|
|
10
|
-
* @returns The prefixed tool set.
|
|
11
|
-
*/
|
|
12
|
-
declare const prefix: (tools: ToolSet, prefix: string) => ToolSet;
|
|
13
|
-
type ToolWith<CONTEXT, TOOL extends Tool> = TOOL & {
|
|
14
|
-
with: (context: CONTEXT) => ToolWith<CONTEXT, TOOL>;
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* toolWith is a helper function to create a tool with a given context.
|
|
18
|
-
*
|
|
19
|
-
* @param fn The function to create the tool.
|
|
20
|
-
* @param defaultContext The default context to use for the tool.
|
|
21
|
-
* @returns The tool with the given context.
|
|
22
|
-
*/
|
|
23
|
-
declare function toolWith<CONTEXT, TOOL extends Tool>(fn: (context: CONTEXT) => TOOL, defaultContext: CONTEXT): ToolWith<CONTEXT, TOOL>;
|
|
24
|
-
/**
|
|
25
|
-
* toolsWith is a helper function to create a set of tools with a given context.
|
|
26
|
-
*
|
|
27
|
-
* @param context The context to use for the tools.
|
|
28
|
-
* @param tools The tools to create with the given context.
|
|
29
|
-
* @returns The set of tools with the given context.
|
|
30
|
-
*/
|
|
31
|
-
declare function toolsWith<CONTEXT, TOOLS extends Record<string, ToolWith<CONTEXT, Tool>>>(context: CONTEXT, tools: TOOLS): Record<string, ToolWith<CONTEXT, Tool>>;
|
|
32
|
-
//#endregion
|
|
33
|
-
export { ToolWith, prefix, toolWith, toolsWith };
|
package/dist/tools.d.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { Tool, ToolSet } from "ai";
|
|
2
|
-
|
|
3
|
-
//#region src/tools.d.ts
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* prefix all the tools with a given string.
|
|
7
|
-
*
|
|
8
|
-
* @param tools The tool set to prefix.
|
|
9
|
-
* @param prefix The prefix to add to the tools.
|
|
10
|
-
* @returns The prefixed tool set.
|
|
11
|
-
*/
|
|
12
|
-
declare const prefix: (tools: ToolSet, prefix: string) => ToolSet;
|
|
13
|
-
type ToolWith<CONTEXT, TOOL extends Tool> = TOOL & {
|
|
14
|
-
with: (context: CONTEXT) => ToolWith<CONTEXT, TOOL>;
|
|
15
|
-
};
|
|
16
|
-
/**
|
|
17
|
-
* toolWith is a helper function to create a tool with a given context.
|
|
18
|
-
*
|
|
19
|
-
* @param fn The function to create the tool.
|
|
20
|
-
* @param defaultContext The default context to use for the tool.
|
|
21
|
-
* @returns The tool with the given context.
|
|
22
|
-
*/
|
|
23
|
-
declare function toolWith<CONTEXT, TOOL extends Tool>(fn: (context: CONTEXT) => TOOL, defaultContext: CONTEXT): ToolWith<CONTEXT, TOOL>;
|
|
24
|
-
/**
|
|
25
|
-
* toolsWith is a helper function to create a set of tools with a given context.
|
|
26
|
-
*
|
|
27
|
-
* @param context The context to use for the tools.
|
|
28
|
-
* @param tools The tools to create with the given context.
|
|
29
|
-
* @returns The set of tools with the given context.
|
|
30
|
-
*/
|
|
31
|
-
declare function toolsWith<CONTEXT, TOOLS extends Record<string, ToolWith<CONTEXT, Tool>>>(context: CONTEXT, tools: TOOLS): Record<string, ToolWith<CONTEXT, Tool>>;
|
|
32
|
-
//#endregion
|
|
33
|
-
export { ToolWith, prefix, toolWith, toolsWith };
|
package/dist/tools.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=(e,t)=>{let n={};for(let[r,i]of Object.entries(e))n[`${t}${r}`]=i;return n};function t(e,n){return{...e(n),with:n=>t(e,n)}}function n(e,t){let n={};for(let[r,i]of Object.entries(t))n[r]=i.with(e);return n}export{e as prefix,t as toolWith,n as toolsWith};
|