@crestal/nation-sdk 0.1.31 → 0.1.32
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/README.md +7 -5
- package/api.ts +175 -29
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +1 -1
- package/dist/api.d.ts +83 -17
- package/dist/api.js +213 -29
- package/dist/base.d.ts +1 -1
- package/dist/base.js +1 -1
- package/dist/common.d.ts +1 -1
- package/dist/common.js +1 -1
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/docs/AgentApi.md +53 -0
- package/docs/ChatApi.md +54 -1
- package/docs/HealthApi.md +4 -4
- package/docs/LLMModelInfoWithProviderName.md +2 -2
- package/docs/MetadataApi.md +8 -8
- package/index.ts +1 -1
- package/package.json +1 -1
package/docs/ChatApi.md
CHANGED
|
@@ -8,6 +8,7 @@ All URIs are relative to *http://localhost*
|
|
|
8
8
|
|[**deleteChatThread**](#deletechatthread) | **DELETE** /agents/{aid}/chats/{chat_id} | Delete a chat thread|
|
|
9
9
|
|[**getChatThreadById**](#getchatthreadbyid) | **GET** /agents/{aid}/chats/{chat_id} | Get chat thread by ID|
|
|
10
10
|
|[**getMessageById**](#getmessagebyid) | **GET** /messages/{message_id} | Get message by ID|
|
|
11
|
+
|[**getSkillHistory**](#getskillhistory) | **GET** /agents/{aid}/skill/history | Skill History|
|
|
11
12
|
|[**listChatsForAgent**](#listchatsforagent) | **GET** /agents/{aid}/chats | List chat threads for an agent|
|
|
12
13
|
|[**listMessagesInChat**](#listmessagesinchat) | **GET** /agents/{aid}/chats/{chat_id}/messages | List messages in a chat thread|
|
|
13
14
|
|[**retryMessageInChat**](#retrymessageinchat) | **POST** /agents/{aid}/chats/{chat_id}/messages/retry | Retry a message in a chat thread|
|
|
@@ -220,6 +221,58 @@ const { status, data } = await apiInstance.getMessageById(
|
|
|
220
221
|
- **Accept**: application/json
|
|
221
222
|
|
|
222
223
|
|
|
224
|
+
### HTTP response details
|
|
225
|
+
| Status code | Description | Response headers |
|
|
226
|
+
|-------------|-------------|------------------|
|
|
227
|
+
|**200** | Successful Response | - |
|
|
228
|
+
|**422** | Validation Error | - |
|
|
229
|
+
|
|
230
|
+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
231
|
+
|
|
232
|
+
# **getSkillHistory**
|
|
233
|
+
> Array<ChatMessageSkillCall> getSkillHistory()
|
|
234
|
+
|
|
235
|
+
Get last 50 skill calls for a specific agent. **Path Parameters:** * `aid` - Agent ID **Returns:** * `List[ChatMessageSkillCall]` - List of skill calls, ordered by creation time ascending **Raises:** * `404` - Agent not found
|
|
236
|
+
|
|
237
|
+
### Example
|
|
238
|
+
|
|
239
|
+
```typescript
|
|
240
|
+
import {
|
|
241
|
+
ChatApi,
|
|
242
|
+
Configuration
|
|
243
|
+
} from '@crestal/nation-sdk';
|
|
244
|
+
|
|
245
|
+
const configuration = new Configuration();
|
|
246
|
+
const apiInstance = new ChatApi(configuration);
|
|
247
|
+
|
|
248
|
+
let aid: string; //Agent ID (default to undefined)
|
|
249
|
+
|
|
250
|
+
const { status, data } = await apiInstance.getSkillHistory(
|
|
251
|
+
aid
|
|
252
|
+
);
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
### Parameters
|
|
256
|
+
|
|
257
|
+
|Name | Type | Description | Notes|
|
|
258
|
+
|------------- | ------------- | ------------- | -------------|
|
|
259
|
+
| **aid** | [**string**] | Agent ID | defaults to undefined|
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
### Return type
|
|
263
|
+
|
|
264
|
+
**Array<ChatMessageSkillCall>**
|
|
265
|
+
|
|
266
|
+
### Authorization
|
|
267
|
+
|
|
268
|
+
[HTTPBearer](../README.md#HTTPBearer)
|
|
269
|
+
|
|
270
|
+
### HTTP request headers
|
|
271
|
+
|
|
272
|
+
- **Content-Type**: Not defined
|
|
273
|
+
- **Accept**: application/json
|
|
274
|
+
|
|
275
|
+
|
|
223
276
|
### HTTP response details
|
|
224
277
|
| Status code | Description | Response headers |
|
|
225
278
|
|-------------|-------------|------------------|
|
|
@@ -399,7 +452,7 @@ const { status, data } = await apiInstance.retryMessageInChat(
|
|
|
399
452
|
# **sendMessageToChat**
|
|
400
453
|
> Array<ChatMessage> sendMessageToChat(chatMessageRequest)
|
|
401
454
|
|
|
402
|
-
Send a new message to a specific chat thread.
|
|
455
|
+
Send a new message to a specific chat thread. The response is a list of messages generated by the agent.The response not include the original user message. It could be skill calls, agent messages, or system error messages. If the stream mode is requested, the response will be HTTP2 streaming response.
|
|
403
456
|
|
|
404
457
|
### Example
|
|
405
458
|
|
package/docs/HealthApi.md
CHANGED
|
@@ -4,10 +4,10 @@ All URIs are relative to *http://localhost*
|
|
|
4
4
|
|
|
5
5
|
|Method | HTTP request | Description|
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
|
-
|[**
|
|
7
|
+
|[**healthCheck**](#healthcheck) | **GET** /health | Health check endpoint|
|
|
8
8
|
|
|
9
|
-
# **
|
|
10
|
-
> any
|
|
9
|
+
# **healthCheck**
|
|
10
|
+
> any healthCheck()
|
|
11
11
|
|
|
12
12
|
Returns the health status of the API server
|
|
13
13
|
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
const configuration = new Configuration();
|
|
23
23
|
const apiInstance = new HealthApi(configuration);
|
|
24
24
|
|
|
25
|
-
const { status, data } = await apiInstance.
|
|
25
|
+
const { status, data } = await apiInstance.healthCheck();
|
|
26
26
|
```
|
|
27
27
|
|
|
28
28
|
### Parameters
|
|
@@ -27,8 +27,8 @@ Name | Type | Description | Notes
|
|
|
27
27
|
**supports_presence_penalty** | **boolean** | | [optional] [default to true]
|
|
28
28
|
**api_base** | **string** | | [optional] [default to undefined]
|
|
29
29
|
**timeout** | **number** | | [optional] [default to 180]
|
|
30
|
-
**created_at** | **string** | Timestamp when this data was created | [optional] [default to 2025-07-
|
|
31
|
-
**updated_at** | **string** | Timestamp when this data was updated | [optional] [default to 2025-07-
|
|
30
|
+
**created_at** | **string** | Timestamp when this data was created | [optional] [default to 2025-07-22T06:42:43.145+00:00]
|
|
31
|
+
**updated_at** | **string** | Timestamp when this data was updated | [optional] [default to 2025-07-22T06:42:43.145+00:00]
|
|
32
32
|
**provider_name** | **string** | | [default to undefined]
|
|
33
33
|
|
|
34
34
|
## Example
|
package/docs/MetadataApi.md
CHANGED
|
@@ -5,10 +5,10 @@ All URIs are relative to *http://localhost*
|
|
|
5
5
|
|Method | HTTP request | Description|
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
7
|
|[**getAgentSchema**](#getagentschema) | **GET** /metadata/agent/schema.json | Get agent schema|
|
|
8
|
-
|[**
|
|
8
|
+
|[**getLlms**](#getllms) | **GET** /metadata/llms | Get all LLM models|
|
|
9
9
|
|[**getSkillIcon**](#getskillicon) | **GET** /metadata/skills/{skill}/{icon_name}.{ext} | Get skill icon|
|
|
10
10
|
|[**getSkillSchema**](#getskillschema) | **GET** /metadata/skills/{skill}/schema.json | Get skill schema|
|
|
11
|
-
|[**
|
|
11
|
+
|[**getSkills**](#getskills) | **GET** /metadata/skills | Get all skills|
|
|
12
12
|
|
|
13
13
|
# **getAgentSchema**
|
|
14
14
|
> any getAgentSchema()
|
|
@@ -54,8 +54,8 @@ No authorization required
|
|
|
54
54
|
|
|
55
55
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
56
56
|
|
|
57
|
-
# **
|
|
58
|
-
> Array<LLMModelInfoWithProviderName>
|
|
57
|
+
# **getLlms**
|
|
58
|
+
> Array<LLMModelInfoWithProviderName> getLlms()
|
|
59
59
|
|
|
60
60
|
Returns a list of all available LLM models in the system
|
|
61
61
|
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
const configuration = new Configuration();
|
|
71
71
|
const apiInstance = new MetadataApi(configuration);
|
|
72
72
|
|
|
73
|
-
const { status, data } = await apiInstance.
|
|
73
|
+
const { status, data } = await apiInstance.getLlms();
|
|
74
74
|
```
|
|
75
75
|
|
|
76
76
|
### Parameters
|
|
@@ -212,8 +212,8 @@ No authorization required
|
|
|
212
212
|
|
|
213
213
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
214
214
|
|
|
215
|
-
# **
|
|
216
|
-
> Array<Skill>
|
|
215
|
+
# **getSkills**
|
|
216
|
+
> Array<Skill> getSkills()
|
|
217
217
|
|
|
218
218
|
Returns a list of all available skills in the system
|
|
219
219
|
|
|
@@ -228,7 +228,7 @@ import {
|
|
|
228
228
|
const configuration = new Configuration();
|
|
229
229
|
const apiInstance = new MetadataApi(configuration);
|
|
230
230
|
|
|
231
|
-
const { status, data } = await apiInstance.
|
|
231
|
+
const { status, data } = await apiInstance.getSkills();
|
|
232
232
|
```
|
|
233
233
|
|
|
234
234
|
### Parameters
|
package/index.ts
CHANGED