@isdk/ai-tool 0.1.0 → 0.1.2

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.
Files changed (82) hide show
  1. package/dist/chunk-COXUI4Q3.mjs +1 -0
  2. package/dist/funcs.js +1 -1
  3. package/dist/funcs.mjs +1 -1
  4. package/dist/index.d.mts +112 -5
  5. package/dist/index.d.ts +112 -5
  6. package/dist/index.js +1 -1
  7. package/dist/index.mjs +1 -1
  8. package/dist/test/util.mjs +1 -1
  9. package/docs/classes/AbortError.md +8 -8
  10. package/docs/classes/AlreadyExistsError.md +8 -8
  11. package/docs/classes/BaseError.md +8 -8
  12. package/docs/classes/CancelableAbility.md +20 -20
  13. package/docs/classes/ClientTools.md +74 -74
  14. package/docs/classes/CommonError.md +8 -8
  15. package/docs/classes/ConfigFile.md +19 -19
  16. package/docs/classes/EventClient.md +96 -96
  17. package/docs/classes/EventServer.md +97 -97
  18. package/docs/classes/EventToolFunc.md +65 -65
  19. package/docs/classes/FStringPromptTemplate.md +47 -47
  20. package/docs/classes/FewShotPromptTemplate.md +51 -51
  21. package/docs/classes/GolangPromptTemplate.md +47 -47
  22. package/docs/classes/HFEnvironment.md +9 -9
  23. package/docs/classes/HFInterpreter.md +19 -19
  24. package/docs/classes/HFTemplate.md +4 -4
  25. package/docs/classes/HfPromptTemplate.md +47 -47
  26. package/docs/classes/IntSet.md +12 -12
  27. package/docs/classes/NotFoundError.md +8 -8
  28. package/docs/classes/NotImplementationError.md +8 -8
  29. package/docs/classes/PromptExampleSelector.md +8 -8
  30. package/docs/classes/PromptTemplate.md +46 -46
  31. package/docs/classes/ReadableStreamError.md +8 -8
  32. package/docs/classes/ResClientTools.md +80 -80
  33. package/docs/classes/ResServerTools.md +81 -81
  34. package/docs/classes/SSEChannel.md +15 -15
  35. package/docs/classes/Semaphore.md +14 -14
  36. package/docs/classes/ServerTools.md +70 -70
  37. package/docs/classes/TaskAbortController.md +7 -7
  38. package/docs/classes/ToolFunc.md +62 -62
  39. package/docs/enums/AsyncFeatureBits.md +3 -3
  40. package/docs/enums/AsyncFeatures.md +3 -3
  41. package/docs/enums/ErrorCode.md +21 -21
  42. package/docs/enums/XXHashAlgorithm.md +2 -2
  43. package/docs/interfaces/AIChatAssistantMessageParam.md +6 -6
  44. package/docs/interfaces/AIChatContentPartImage.md +2 -2
  45. package/docs/interfaces/AIChatContentPartText.md +2 -2
  46. package/docs/interfaces/AIChatMessageParamBase.md +1 -1
  47. package/docs/interfaces/AIChatMessageToolCall.md +3 -3
  48. package/docs/interfaces/AIChatSystemMessageParam.md +3 -3
  49. package/docs/interfaces/AIChatToolMessageParam.md +4 -4
  50. package/docs/interfaces/AIChatUserMessageParam.md +7 -7
  51. package/docs/interfaces/AIChoiceConfig.md +85 -0
  52. package/docs/interfaces/AIResult.md +5 -5
  53. package/docs/interfaces/AIStreamParser.md +1 -1
  54. package/docs/interfaces/AIStreamParserOptions.md +1 -1
  55. package/docs/interfaces/BaseFunc.md +9 -9
  56. package/docs/interfaces/BaseFuncItem.md +8 -8
  57. package/docs/interfaces/CancelableAbilityOptions.md +8 -8
  58. package/docs/interfaces/ClientFuncItem.md +11 -11
  59. package/docs/interfaces/DotenvExpandOptions.md +3 -3
  60. package/docs/interfaces/DotenvExpandOutput.md +2 -2
  61. package/docs/interfaces/EventClientFuncParams.md +4 -4
  62. package/docs/interfaces/EventServerFuncParams.md +5 -5
  63. package/docs/interfaces/FewShotPromptTemplateOptions.md +11 -11
  64. package/docs/interfaces/FuncItem.md +9 -9
  65. package/docs/interfaces/FuncParam.md +6 -6
  66. package/docs/interfaces/ParseObjectArgumentOptions.md +63 -0
  67. package/docs/interfaces/PromptExampleSelectorOptions.md +2 -2
  68. package/docs/interfaces/PromptTemplateOptions.md +6 -6
  69. package/docs/interfaces/RemoteFuncItem.md +11 -11
  70. package/docs/interfaces/ResClientFuncParams.md +2 -2
  71. package/docs/interfaces/ResServerFuncParams.md +5 -5
  72. package/docs/interfaces/SanitizeFilenameOptions.md +2 -2
  73. package/docs/interfaces/ServerFuncItem.md +12 -12
  74. package/docs/interfaces/ServerFuncParams.md +2 -2
  75. package/docs/interfaces/StreamCallbacksAndOptions.md +4 -4
  76. package/docs/interfaces/TaskPromise.md +1 -1
  77. package/docs/interfaces/ToolFuncPackage.md +3 -3
  78. package/docs/modules.md +468 -151
  79. package/package.json +14 -10
  80. package/dist/chunk-U5DDQYSF.mjs +0 -1
  81. package/dist/chunk-W4ZFS46G.mjs +0 -1
  82. package/docs/interfaces/IOptions.md +0 -30
@@ -59,7 +59,7 @@ Creates a new SSE channel.
59
59
 
60
60
  #### Defined in
61
61
 
62
- [packages/ai-tool/src/utils/event/sse-channel.ts:65](https://github.com/isdk/ai-tool.js/blob/262bec683a365fd77a8c1ea7cbf9a636e19c4ce2/src/utils/event/sse-channel.ts#L65)
62
+ [packages/ai-tool/src/utils/event/sse-channel.ts:65](https://github.com/isdk/ai-tool.js/blob/645c3145aafa05351c48068783eb3c2f206ce4c5/src/utils/event/sse-channel.ts#L65)
63
63
 
64
64
  ## Properties
65
65
 
@@ -69,7 +69,7 @@ Creates a new SSE channel.
69
69
 
70
70
  #### Defined in
71
71
 
72
- [packages/ai-tool/src/utils/event/sse-channel.ts:26](https://github.com/isdk/ai-tool.js/blob/262bec683a365fd77a8c1ea7cbf9a636e19c4ce2/src/utils/event/sse-channel.ts#L26)
72
+ [packages/ai-tool/src/utils/event/sse-channel.ts:26](https://github.com/isdk/ai-tool.js/blob/645c3145aafa05351c48068783eb3c2f206ce4c5/src/utils/event/sse-channel.ts#L26)
73
73
 
74
74
  ___
75
75
 
@@ -79,7 +79,7 @@ ___
79
79
 
80
80
  #### Defined in
81
81
 
82
- [packages/ai-tool/src/utils/event/sse-channel.ts:27](https://github.com/isdk/ai-tool.js/blob/262bec683a365fd77a8c1ea7cbf9a636e19c4ce2/src/utils/event/sse-channel.ts#L27)
82
+ [packages/ai-tool/src/utils/event/sse-channel.ts:27](https://github.com/isdk/ai-tool.js/blob/645c3145aafa05351c48068783eb3c2f206ce4c5/src/utils/event/sse-channel.ts#L27)
83
83
 
84
84
  ___
85
85
 
@@ -89,7 +89,7 @@ ___
89
89
 
90
90
  #### Defined in
91
91
 
92
- [packages/ai-tool/src/utils/event/sse-channel.ts:28](https://github.com/isdk/ai-tool.js/blob/262bec683a365fd77a8c1ea7cbf9a636e19c4ce2/src/utils/event/sse-channel.ts#L28)
92
+ [packages/ai-tool/src/utils/event/sse-channel.ts:28](https://github.com/isdk/ai-tool.js/blob/645c3145aafa05351c48068783eb3c2f206ce4c5/src/utils/event/sse-channel.ts#L28)
93
93
 
94
94
  ___
95
95
 
@@ -99,7 +99,7 @@ ___
99
99
 
100
100
  #### Defined in
101
101
 
102
- [packages/ai-tool/src/utils/event/sse-channel.ts:29](https://github.com/isdk/ai-tool.js/blob/262bec683a365fd77a8c1ea7cbf9a636e19c4ce2/src/utils/event/sse-channel.ts#L29)
102
+ [packages/ai-tool/src/utils/event/sse-channel.ts:29](https://github.com/isdk/ai-tool.js/blob/645c3145aafa05351c48068783eb3c2f206ce4c5/src/utils/event/sse-channel.ts#L29)
103
103
 
104
104
  ___
105
105
 
@@ -109,7 +109,7 @@ ___
109
109
 
110
110
  #### Defined in
111
111
 
112
- [packages/ai-tool/src/utils/event/sse-channel.ts:30](https://github.com/isdk/ai-tool.js/blob/262bec683a365fd77a8c1ea7cbf9a636e19c4ce2/src/utils/event/sse-channel.ts#L30)
112
+ [packages/ai-tool/src/utils/event/sse-channel.ts:30](https://github.com/isdk/ai-tool.js/blob/645c3145aafa05351c48068783eb3c2f206ce4c5/src/utils/event/sse-channel.ts#L30)
113
113
 
114
114
  ___
115
115
 
@@ -119,7 +119,7 @@ ___
119
119
 
120
120
  #### Defined in
121
121
 
122
- [packages/ai-tool/src/utils/event/sse-channel.ts:31](https://github.com/isdk/ai-tool.js/blob/262bec683a365fd77a8c1ea7cbf9a636e19c4ce2/src/utils/event/sse-channel.ts#L31)
122
+ [packages/ai-tool/src/utils/event/sse-channel.ts:31](https://github.com/isdk/ai-tool.js/blob/645c3145aafa05351c48068783eb3c2f206ce4c5/src/utils/event/sse-channel.ts#L31)
123
123
 
124
124
  ## Accessors
125
125
 
@@ -133,7 +133,7 @@ ___
133
133
 
134
134
  #### Defined in
135
135
 
136
- [packages/ai-tool/src/utils/event/sse-channel.ts:33](https://github.com/isdk/ai-tool.js/blob/262bec683a365fd77a8c1ea7cbf9a636e19c4ce2/src/utils/event/sse-channel.ts#L33)
136
+ [packages/ai-tool/src/utils/event/sse-channel.ts:33](https://github.com/isdk/ai-tool.js/blob/645c3145aafa05351c48068783eb3c2f206ce4c5/src/utils/event/sse-channel.ts#L33)
137
137
 
138
138
  • `set` **active**(`v`): `void`
139
139
 
@@ -149,7 +149,7 @@ ___
149
149
 
150
150
  #### Defined in
151
151
 
152
- [packages/ai-tool/src/utils/event/sse-channel.ts:37](https://github.com/isdk/ai-tool.js/blob/262bec683a365fd77a8c1ea7cbf9a636e19c4ce2/src/utils/event/sse-channel.ts#L37)
152
+ [packages/ai-tool/src/utils/event/sse-channel.ts:37](https://github.com/isdk/ai-tool.js/blob/645c3145aafa05351c48068783eb3c2f206ce4c5/src/utils/event/sse-channel.ts#L37)
153
153
 
154
154
  ## Methods
155
155
 
@@ -163,7 +163,7 @@ ___
163
163
 
164
164
  #### Defined in
165
165
 
166
- [packages/ai-tool/src/utils/event/sse-channel.ts:195](https://github.com/isdk/ai-tool.js/blob/262bec683a365fd77a8c1ea7cbf9a636e19c4ce2/src/utils/event/sse-channel.ts#L195)
166
+ [packages/ai-tool/src/utils/event/sse-channel.ts:195](https://github.com/isdk/ai-tool.js/blob/645c3145aafa05351c48068783eb3c2f206ce4c5/src/utils/event/sse-channel.ts#L195)
167
167
 
168
168
  ___
169
169
 
@@ -181,7 +181,7 @@ Gets the number of clients subscribed to the SSE channel.
181
181
 
182
182
  #### Defined in
183
183
 
184
- [packages/ai-tool/src/utils/event/sse-channel.ts:220](https://github.com/isdk/ai-tool.js/blob/262bec683a365fd77a8c1ea7cbf9a636e19c4ce2/src/utils/event/sse-channel.ts#L220)
184
+ [packages/ai-tool/src/utils/event/sse-channel.ts:220](https://github.com/isdk/ai-tool.js/blob/645c3145aafa05351c48068783eb3c2f206ce4c5/src/utils/event/sse-channel.ts#L220)
185
185
 
186
186
  ___
187
187
 
@@ -199,7 +199,7 @@ Lists the clients connected to the SSE channel grouped by IP address.
199
199
 
200
200
  #### Defined in
201
201
 
202
- [packages/ai-tool/src/utils/event/sse-channel.ts:204](https://github.com/isdk/ai-tool.js/blob/262bec683a365fd77a8c1ea7cbf9a636e19c4ce2/src/utils/event/sse-channel.ts#L204)
202
+ [packages/ai-tool/src/utils/event/sse-channel.ts:204](https://github.com/isdk/ai-tool.js/blob/645c3145aafa05351c48068783eb3c2f206ce4c5/src/utils/event/sse-channel.ts#L204)
203
203
 
204
204
  ___
205
205
 
@@ -228,7 +228,7 @@ Will throw an error if the channel is closed.
228
228
 
229
229
  #### Defined in
230
230
 
231
- [packages/ai-tool/src/utils/event/sse-channel.ts:93](https://github.com/isdk/ai-tool.js/blob/262bec683a365fd77a8c1ea7cbf9a636e19c4ce2/src/utils/event/sse-channel.ts#L93)
231
+ [packages/ai-tool/src/utils/event/sse-channel.ts:93](https://github.com/isdk/ai-tool.js/blob/645c3145aafa05351c48068783eb3c2f206ce4c5/src/utils/event/sse-channel.ts#L93)
232
232
 
233
233
  ___
234
234
 
@@ -264,7 +264,7 @@ Will throw an error if the channel is closed.
264
264
 
265
265
  #### Defined in
266
266
 
267
- [packages/ai-tool/src/utils/event/sse-channel.ts:143](https://github.com/isdk/ai-tool.js/blob/262bec683a365fd77a8c1ea7cbf9a636e19c4ce2/src/utils/event/sse-channel.ts#L143)
267
+ [packages/ai-tool/src/utils/event/sse-channel.ts:143](https://github.com/isdk/ai-tool.js/blob/645c3145aafa05351c48068783eb3c2f206ce4c5/src/utils/event/sse-channel.ts#L143)
268
268
 
269
269
  ___
270
270
 
@@ -286,4 +286,4 @@ Unsubscribes a client from the SSE channel.
286
286
 
287
287
  #### Defined in
288
288
 
289
- [packages/ai-tool/src/utils/event/sse-channel.ts:190](https://github.com/isdk/ai-tool.js/blob/262bec683a365fd77a8c1ea7cbf9a636e19c4ce2/src/utils/event/sse-channel.ts#L190)
289
+ [packages/ai-tool/src/utils/event/sse-channel.ts:190](https://github.com/isdk/ai-tool.js/blob/645c3145aafa05351c48068783eb3c2f206ce4c5/src/utils/event/sse-channel.ts#L190)
@@ -80,7 +80,7 @@ Creates a semaphore object. The first argument is the maximum concurrently numbe
80
80
 
81
81
  #### Defined in
82
82
 
83
- [packages/ai-tool/src/utils/async-semaphore.ts:207](https://github.com/isdk/ai-tool.js/blob/262bec683a365fd77a8c1ea7cbf9a636e19c4ce2/src/utils/async-semaphore.ts#L207)
83
+ [packages/ai-tool/src/utils/async-semaphore.ts:207](https://github.com/isdk/ai-tool.js/blob/645c3145aafa05351c48068783eb3c2f206ce4c5/src/utils/async-semaphore.ts#L207)
84
84
 
85
85
  ## Properties
86
86
 
@@ -90,7 +90,7 @@ Creates a semaphore object. The first argument is the maximum concurrently numbe
90
90
 
91
91
  #### Defined in
92
92
 
93
- [packages/ai-tool/src/utils/async-semaphore.ts:153](https://github.com/isdk/ai-tool.js/blob/262bec683a365fd77a8c1ea7cbf9a636e19c4ce2/src/utils/async-semaphore.ts#L153)
93
+ [packages/ai-tool/src/utils/async-semaphore.ts:153](https://github.com/isdk/ai-tool.js/blob/645c3145aafa05351c48068783eb3c2f206ce4c5/src/utils/async-semaphore.ts#L153)
94
94
 
95
95
  ___
96
96
 
@@ -100,7 +100,7 @@ ___
100
100
 
101
101
  #### Defined in
102
102
 
103
- [packages/ai-tool/src/utils/async-semaphore.ts:151](https://github.com/isdk/ai-tool.js/blob/262bec683a365fd77a8c1ea7cbf9a636e19c4ce2/src/utils/async-semaphore.ts#L151)
103
+ [packages/ai-tool/src/utils/async-semaphore.ts:151](https://github.com/isdk/ai-tool.js/blob/645c3145aafa05351c48068783eb3c2f206ce4c5/src/utils/async-semaphore.ts#L151)
104
104
 
105
105
  ___
106
106
 
@@ -118,7 +118,7 @@ ___
118
118
 
119
119
  #### Defined in
120
120
 
121
- [packages/ai-tool/src/utils/async-semaphore.ts:156](https://github.com/isdk/ai-tool.js/blob/262bec683a365fd77a8c1ea7cbf9a636e19c4ce2/src/utils/async-semaphore.ts#L156)
121
+ [packages/ai-tool/src/utils/async-semaphore.ts:156](https://github.com/isdk/ai-tool.js/blob/645c3145aafa05351c48068783eb3c2f206ce4c5/src/utils/async-semaphore.ts#L156)
122
122
 
123
123
  ___
124
124
 
@@ -128,7 +128,7 @@ ___
128
128
 
129
129
  #### Defined in
130
130
 
131
- [packages/ai-tool/src/utils/async-semaphore.ts:158](https://github.com/isdk/ai-tool.js/blob/262bec683a365fd77a8c1ea7cbf9a636e19c4ce2/src/utils/async-semaphore.ts#L158)
131
+ [packages/ai-tool/src/utils/async-semaphore.ts:158](https://github.com/isdk/ai-tool.js/blob/645c3145aafa05351c48068783eb3c2f206ce4c5/src/utils/async-semaphore.ts#L158)
132
132
 
133
133
  ___
134
134
 
@@ -138,7 +138,7 @@ ___
138
138
 
139
139
  #### Defined in
140
140
 
141
- [packages/ai-tool/src/utils/async-semaphore.ts:154](https://github.com/isdk/ai-tool.js/blob/262bec683a365fd77a8c1ea7cbf9a636e19c4ce2/src/utils/async-semaphore.ts#L154)
141
+ [packages/ai-tool/src/utils/async-semaphore.ts:154](https://github.com/isdk/ai-tool.js/blob/645c3145aafa05351c48068783eb3c2f206ce4c5/src/utils/async-semaphore.ts#L154)
142
142
 
143
143
  ___
144
144
 
@@ -156,7 +156,7 @@ ___
156
156
 
157
157
  #### Defined in
158
158
 
159
- [packages/ai-tool/src/utils/async-semaphore.ts:157](https://github.com/isdk/ai-tool.js/blob/262bec683a365fd77a8c1ea7cbf9a636e19c4ce2/src/utils/async-semaphore.ts#L157)
159
+ [packages/ai-tool/src/utils/async-semaphore.ts:157](https://github.com/isdk/ai-tool.js/blob/645c3145aafa05351c48068783eb3c2f206ce4c5/src/utils/async-semaphore.ts#L157)
160
160
 
161
161
  ___
162
162
 
@@ -166,7 +166,7 @@ ___
166
166
 
167
167
  #### Defined in
168
168
 
169
- [packages/ai-tool/src/utils/async-semaphore.ts:155](https://github.com/isdk/ai-tool.js/blob/262bec683a365fd77a8c1ea7cbf9a636e19c4ce2/src/utils/async-semaphore.ts#L155)
169
+ [packages/ai-tool/src/utils/async-semaphore.ts:155](https://github.com/isdk/ai-tool.js/blob/645c3145aafa05351c48068783eb3c2f206ce4c5/src/utils/async-semaphore.ts#L155)
170
170
 
171
171
  ___
172
172
 
@@ -176,7 +176,7 @@ ___
176
176
 
177
177
  #### Defined in
178
178
 
179
- [packages/ai-tool/src/utils/async-semaphore.ts:152](https://github.com/isdk/ai-tool.js/blob/262bec683a365fd77a8c1ea7cbf9a636e19c4ce2/src/utils/async-semaphore.ts#L152)
179
+ [packages/ai-tool/src/utils/async-semaphore.ts:152](https://github.com/isdk/ai-tool.js/blob/645c3145aafa05351c48068783eb3c2f206ce4c5/src/utils/async-semaphore.ts#L152)
180
180
 
181
181
  ## Methods
182
182
 
@@ -198,7 +198,7 @@ Acquire a token from the semaphore, thus decrement the number of available execu
198
198
 
199
199
  #### Defined in
200
200
 
201
- [packages/ai-tool/src/utils/async-semaphore.ts:265](https://github.com/isdk/ai-tool.js/blob/262bec683a365fd77a8c1ea7cbf9a636e19c4ce2/src/utils/async-semaphore.ts#L265)
201
+ [packages/ai-tool/src/utils/async-semaphore.ts:265](https://github.com/isdk/ai-tool.js/blob/645c3145aafa05351c48068783eb3c2f206ce4c5/src/utils/async-semaphore.ts#L265)
202
202
 
203
203
  ___
204
204
 
@@ -214,7 +214,7 @@ Drains the semaphore and returns all the initialized tokens in an array. Drainin
214
214
 
215
215
  #### Defined in
216
216
 
217
- [packages/ai-tool/src/utils/async-semaphore.ts:301](https://github.com/isdk/ai-tool.js/blob/262bec683a365fd77a8c1ea7cbf9a636e19c4ce2/src/utils/async-semaphore.ts#L301)
217
+ [packages/ai-tool/src/utils/async-semaphore.ts:301](https://github.com/isdk/ai-tool.js/blob/645c3145aafa05351c48068783eb3c2f206ce4c5/src/utils/async-semaphore.ts#L301)
218
218
 
219
219
  ___
220
220
 
@@ -232,7 +232,7 @@ The number of waiters in the waiting list.
232
232
 
233
233
  #### Defined in
234
234
 
235
- [packages/ai-tool/src/utils/async-semaphore.ts:314](https://github.com/isdk/ai-tool.js/blob/262bec683a365fd77a8c1ea7cbf9a636e19c4ce2/src/utils/async-semaphore.ts#L314)
235
+ [packages/ai-tool/src/utils/async-semaphore.ts:314](https://github.com/isdk/ai-tool.js/blob/645c3145aafa05351c48068783eb3c2f206ce4c5/src/utils/async-semaphore.ts#L314)
236
236
 
237
237
  ___
238
238
 
@@ -254,7 +254,7 @@ Release the semaphore, thus increment the number of free execution slots. If ini
254
254
 
255
255
  #### Defined in
256
256
 
257
- [packages/ai-tool/src/utils/async-semaphore.ts:294](https://github.com/isdk/ai-tool.js/blob/262bec683a365fd77a8c1ea7cbf9a636e19c4ce2/src/utils/async-semaphore.ts#L294)
257
+ [packages/ai-tool/src/utils/async-semaphore.ts:294](https://github.com/isdk/ai-tool.js/blob/645c3145aafa05351c48068783eb3c2f206ce4c5/src/utils/async-semaphore.ts#L294)
258
258
 
259
259
  ___
260
260
 
@@ -270,4 +270,4 @@ Attempt to acquire a token from the semaphore, if one is available immediately.
270
270
 
271
271
  #### Defined in
272
272
 
273
- [packages/ai-tool/src/utils/async-semaphore.ts:258](https://github.com/isdk/ai-tool.js/blob/262bec683a365fd77a8c1ea7cbf9a636e19c4ce2/src/utils/async-semaphore.ts#L258)
273
+ [packages/ai-tool/src/utils/async-semaphore.ts:258](https://github.com/isdk/ai-tool.js/blob/645c3145aafa05351c48068783eb3c2f206ce4c5/src/utils/async-semaphore.ts#L258)