@inferencesh/sdk 0.4.21 → 0.4.22

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.
@@ -33,12 +33,14 @@ export declare const optional: <T extends ParamSchema>(schema: T) => T & {
33
33
  declare class ToolBuilder {
34
34
  protected name: string;
35
35
  protected desc: string;
36
- protected displayName?: string;
36
+ protected displayNameValue?: string;
37
37
  protected params: Record<string, ParamSchema>;
38
38
  protected approval: boolean;
39
39
  constructor(name: string);
40
40
  describe(description: string): this;
41
+ /** @deprecated Use displayName() instead */
41
42
  display(name: string): this;
43
+ displayName(name: string): this;
42
44
  param(name: string, schema: ParamSchema): this;
43
45
  requireApproval(): this;
44
46
  }
@@ -64,8 +64,13 @@ class ToolBuilder {
64
64
  this.desc = description;
65
65
  return this;
66
66
  }
67
+ /** @deprecated Use displayName() instead */
67
68
  display(name) {
68
- this.displayName = name;
69
+ this.displayNameValue = name;
70
+ return this;
71
+ }
72
+ displayName(name) {
73
+ this.displayNameValue = name;
69
74
  return this;
70
75
  }
71
76
  param(name, schema) {
@@ -82,7 +87,7 @@ class ClientToolBuilder extends ToolBuilder {
82
87
  build() {
83
88
  return {
84
89
  name: this.name,
85
- display_name: this.displayName || this.name,
90
+ display_name: this.displayNameValue || this.name,
86
91
  description: this.desc,
87
92
  type: types_1.ToolTypeClient,
88
93
  require_approval: this.approval || undefined,
@@ -115,7 +120,7 @@ class AppToolBuilder extends ToolBuilder {
115
120
  build() {
116
121
  return {
117
122
  name: this.name,
118
- display_name: this.displayName || this.name,
123
+ display_name: this.displayNameValue || this.name,
119
124
  description: this.desc,
120
125
  type: types_1.ToolTypeApp,
121
126
  require_approval: this.approval || undefined,
@@ -135,7 +140,7 @@ class AgentToolBuilder extends ToolBuilder {
135
140
  build() {
136
141
  return {
137
142
  name: this.name,
138
- display_name: this.displayName || this.name,
143
+ display_name: this.displayNameValue || this.name,
139
144
  description: this.desc,
140
145
  type: types_1.ToolTypeAgent,
141
146
  require_approval: this.approval || undefined,
@@ -155,7 +160,7 @@ class WebhookToolBuilder extends ToolBuilder {
155
160
  build() {
156
161
  return {
157
162
  name: this.name,
158
- display_name: this.displayName || this.name,
163
+ display_name: this.displayNameValue || this.name,
159
164
  description: this.desc,
160
165
  type: types_1.ToolTypeHook,
161
166
  require_approval: this.approval || undefined,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inferencesh/sdk",
3
- "version": "0.4.21",
3
+ "version": "0.4.22",
4
4
  "description": "Official JavaScript/TypeScript SDK for inference.sh - Run AI models with a simple API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",