@vertesia/tools-sdk 0.78.0 → 0.79.0
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/lib/cjs/index.js +4 -0
- package/lib/cjs/index.js.map +1 -1
- package/lib/esm/index.js +1 -0
- package/lib/esm/index.js.map +1 -1
- package/lib/types/ToolCollection.d.ts +1 -1
- package/lib/types/index.d.ts +1 -0
- package/lib/types/index.d.ts.map +1 -1
- package/lib/types/types.d.ts +19 -1
- package/lib/types/types.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/index.ts +1 -0
- package/src/types.ts +20 -1
package/lib/cjs/index.js
CHANGED
|
@@ -14,7 +14,11 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.authorize = exports.AuthSession = void 0;
|
|
17
18
|
__exportStar(require("./ToolCollection.js"), exports);
|
|
18
19
|
__exportStar(require("./ToolRegistry.js"), exports);
|
|
19
20
|
__exportStar(require("./types.js"), exports);
|
|
21
|
+
var auth_js_1 = require("./auth.js");
|
|
22
|
+
Object.defineProperty(exports, "AuthSession", { enumerable: true, get: function () { return auth_js_1.AuthSession; } });
|
|
23
|
+
Object.defineProperty(exports, "authorize", { enumerable: true, get: function () { return auth_js_1.authorize; } });
|
|
20
24
|
//# sourceMappingURL=index.js.map
|
package/lib/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,sDAAoC;AACpC,oDAAkC;AAClC,6CAA2B;AAC3B,qCAAmD;AAA1C,sGAAA,WAAW,OAAA;AAAE,oGAAA,SAAS,OAAA"}
|
package/lib/esm/index.js
CHANGED
package/lib/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -58,7 +58,7 @@ export declare class ToolCollection implements Iterable<Tool<any>> {
|
|
|
58
58
|
map<U>(callback: (tool: Tool<any>, index: number) => U): U[];
|
|
59
59
|
execute(ctx: Context): Promise<(Response & import("hono").TypedResponse<{
|
|
60
60
|
tool_use_id: string;
|
|
61
|
-
|
|
61
|
+
meta?: {
|
|
62
62
|
[x: string]: any;
|
|
63
63
|
} | undefined;
|
|
64
64
|
content: string;
|
package/lib/types/index.d.ts
CHANGED
package/lib/types/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC"}
|
package/lib/types/types.d.ts
CHANGED
|
@@ -20,7 +20,7 @@ export interface ToolExecutionResult extends ToolResultContent {
|
|
|
20
20
|
/**
|
|
21
21
|
* Medata can be used to return more info on the tool execution like stats or user messages.
|
|
22
22
|
*/
|
|
23
|
-
|
|
23
|
+
meta?: Record<string, any>;
|
|
24
24
|
}
|
|
25
25
|
export interface ToolExecutionResponse extends ToolExecutionResult, ToolResult {
|
|
26
26
|
/**
|
|
@@ -67,4 +67,22 @@ export interface ToolCollectionDefinition {
|
|
|
67
67
|
tools: ToolDefinition[];
|
|
68
68
|
}
|
|
69
69
|
export type { ToolDefinition };
|
|
70
|
+
/**
|
|
71
|
+
* The details of a connection to a MCP server - including the server URL and an authentication token
|
|
72
|
+
*/
|
|
73
|
+
export interface MCPConnectionDetails {
|
|
74
|
+
/**
|
|
75
|
+
* The mcp server name. It will be used to prefix tool names.
|
|
76
|
+
*/
|
|
77
|
+
name: string;
|
|
78
|
+
/**
|
|
79
|
+
* The target mcp server URL
|
|
80
|
+
*/
|
|
81
|
+
url: string;
|
|
82
|
+
/**
|
|
83
|
+
* The bearer authentication token to use when connecting to the mcp server.
|
|
84
|
+
* If an empty string no authentication will be done
|
|
85
|
+
*/
|
|
86
|
+
token: string;
|
|
87
|
+
}
|
|
70
88
|
//# sourceMappingURL=types.d.ts.map
|
package/lib/types/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAEnF,MAAM,WAAW,oBAAoB;IACjC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,EAAE,gBAAgB,CAAC;IAC1B;;;OAGG;IACH,SA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AAG,CAAC,CAAC;CAClC;AAED,MAAM,MAAM,MAAM,CAAC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,OAAO,EAAE,oBAAoB,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,oBAAoB,KAAK,OAAO,CAAC,mBAAmB,CAAC,CAAC;AAElK,MAAM,WAAW,IAAI,CAAC,OAAO,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAE,SAAQ,cAAc;IAC7E,GAAG,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,wBAAwB;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,cAAc,EAAE,CAAC;CAC3B;AAED,YAAY,EAAE,cAAc,EAAE,CAAC;AAE/B;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACjC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;CACjB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vertesia/tools-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.79.0",
|
|
4
4
|
"description": "Tools SDK - utilities for building remote tools",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"types": "./lib/types/index.d.ts",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"jose": "^6.0.11",
|
|
30
30
|
"@llumiverse/common": "0.22.0",
|
|
31
|
-
"@vertesia/client": "0.
|
|
32
|
-
"@vertesia/common": "0.
|
|
31
|
+
"@vertesia/client": "0.79.0",
|
|
32
|
+
"@vertesia/common": "0.79.0"
|
|
33
33
|
},
|
|
34
34
|
"scripts": {
|
|
35
35
|
"test": "vitest run",
|
package/src/index.ts
CHANGED
package/src/types.ts
CHANGED
|
@@ -22,7 +22,7 @@ export interface ToolExecutionResult extends ToolResultContent {
|
|
|
22
22
|
/**
|
|
23
23
|
* Medata can be used to return more info on the tool execution like stats or user messages.
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
meta?: Record<string, any>;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
export interface ToolExecutionResponse extends ToolExecutionResult, ToolResult {
|
|
@@ -76,3 +76,22 @@ export interface ToolCollectionDefinition {
|
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
export type { ToolDefinition };
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* The details of a connection to a MCP server - including the server URL and an authentication token
|
|
82
|
+
*/
|
|
83
|
+
export interface MCPConnectionDetails {
|
|
84
|
+
/**
|
|
85
|
+
* The mcp server name. It will be used to prefix tool names.
|
|
86
|
+
*/
|
|
87
|
+
name: string;
|
|
88
|
+
/**
|
|
89
|
+
* The target mcp server URL
|
|
90
|
+
*/
|
|
91
|
+
url: string;
|
|
92
|
+
/**
|
|
93
|
+
* The bearer authentication token to use when connecting to the mcp server.
|
|
94
|
+
* If an empty string no authentication will be done
|
|
95
|
+
*/
|
|
96
|
+
token: string;
|
|
97
|
+
}
|