@crestal/nation-sdk 0.1.28 → 0.1.29

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.
@@ -0,0 +1,167 @@
1
+ # GeneratorApi
2
+
3
+ All URIs are relative to *http://localhost*
4
+
5
+ |Method | HTTP request | Description|
6
+ |------------- | ------------- | -------------|
7
+ |[**generateAgentGeneratorAgentGeneratePost**](#generateagentgeneratoragentgeneratepost) | **POST** /generator/agent/generate | Generate Agent from Natural Language Prompt|
8
+ |[**getGenerationDetailGeneratorAgentGenerationsProjectIdGet**](#getgenerationdetailgeneratoragentgenerationsprojectidget) | **GET** /generator/agent/generations/{project_id} | Get Generation Detail by Project ID|
9
+ |[**getGenerationsGeneratorAgentGenerationsGet**](#getgenerationsgeneratoragentgenerationsget) | **GET** /generator/agent/generations | Get Generations List by User|
10
+
11
+ # **generateAgentGeneratorAgentGeneratePost**
12
+ > AgentGenerateResponse generateAgentGeneratorAgentGeneratePost(agentGenerateRequest)
13
+
14
+ Generate an agent schema from a natural language prompt. Converts plain English descriptions into complete, validated agent configurations. Automatically identifies required skills, sets up configurations, detects autonomous task patterns, and ensures everything works correctly with intelligent error correction. **Autonomous Task Detection:** The API can automatically detect scheduling patterns in prompts like: - \"Buy 0.1 ETH every hour\" → Creates 60-minute autonomous task with CDP trade skill - \"Check portfolio daily\" → Creates 24-hour autonomous task with portfolio skills - \"Post tweet every 30 minutes\" → Creates 30-minute autonomous task with Twitter skill **Request Body:** * `prompt` - Natural language description of the agent\'s desired capabilities and schedule * `existing_agent` - Optional existing agent to update (preserves current setup while adding capabilities) * `user_id` - Required user ID for logging and rate limiting * `project_id` - Optional project ID for conversation history **Returns:** * `AgentGenerateResponse` - Contains agent schema, autonomous tasks, activated skills, project ID, and summary **Response Fields:** * `agent` - Complete agent schema with skills and autonomous configurations * `autonomous_tasks` - List of autonomous tasks detected and configured * `activated_skills` - List of skills that were activated based on the prompt * `project_id` - Project ID for conversation tracking * `summary` - Human-readable summary of the generated agent * `tags` - Generated tags for categorization **Raises:** * `HTTPException`: - 400: Invalid request (missing user_id, invalid prompt format or length) - 500: Agent generation failed after retries
15
+
16
+ ### Example
17
+
18
+ ```typescript
19
+ import {
20
+ GeneratorApi,
21
+ Configuration,
22
+ AgentGenerateRequest
23
+ } from '@crestal/nation-sdk';
24
+
25
+ const configuration = new Configuration();
26
+ const apiInstance = new GeneratorApi(configuration);
27
+
28
+ let agentGenerateRequest: AgentGenerateRequest; //
29
+
30
+ const { status, data } = await apiInstance.generateAgentGeneratorAgentGeneratePost(
31
+ agentGenerateRequest
32
+ );
33
+ ```
34
+
35
+ ### Parameters
36
+
37
+ |Name | Type | Description | Notes|
38
+ |------------- | ------------- | ------------- | -------------|
39
+ | **agentGenerateRequest** | **AgentGenerateRequest**| | |
40
+
41
+
42
+ ### Return type
43
+
44
+ **AgentGenerateResponse**
45
+
46
+ ### Authorization
47
+
48
+ [HTTPBearer](../README.md#HTTPBearer)
49
+
50
+ ### HTTP request headers
51
+
52
+ - **Content-Type**: application/json
53
+ - **Accept**: application/json
54
+
55
+
56
+ ### HTTP response details
57
+ | Status code | Description | Response headers |
58
+ |-------------|-------------|------------------|
59
+ |**200** | Successful Response | - |
60
+ |**422** | Validation Error | - |
61
+
62
+ [[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)
63
+
64
+ # **getGenerationDetailGeneratorAgentGenerationsProjectIdGet**
65
+ > GenerationDetailResponse getGenerationDetailGeneratorAgentGenerationsProjectIdGet()
66
+
67
+ Get specific project conversation history. **Path Parameters:** * `project_id` - Project ID to get conversation history for **Query Parameters:** * `user_id` - Optional user ID for access validation **Returns:** * `GenerationDetailResponse` - Contains full conversation history for the project **Raises:** * `HTTPException`: - 404: Project not found or access denied - 500: Failed to retrieve generation detail
68
+
69
+ ### Example
70
+
71
+ ```typescript
72
+ import {
73
+ GeneratorApi,
74
+ Configuration
75
+ } from '@crestal/nation-sdk';
76
+
77
+ const configuration = new Configuration();
78
+ const apiInstance = new GeneratorApi(configuration);
79
+
80
+ let projectId: string; // (default to undefined)
81
+
82
+ const { status, data } = await apiInstance.getGenerationDetailGeneratorAgentGenerationsProjectIdGet(
83
+ projectId
84
+ );
85
+ ```
86
+
87
+ ### Parameters
88
+
89
+ |Name | Type | Description | Notes|
90
+ |------------- | ------------- | ------------- | -------------|
91
+ | **projectId** | [**string**] | | defaults to undefined|
92
+
93
+
94
+ ### Return type
95
+
96
+ **GenerationDetailResponse**
97
+
98
+ ### Authorization
99
+
100
+ [HTTPBearer](../README.md#HTTPBearer)
101
+
102
+ ### HTTP request headers
103
+
104
+ - **Content-Type**: Not defined
105
+ - **Accept**: application/json
106
+
107
+
108
+ ### HTTP response details
109
+ | Status code | Description | Response headers |
110
+ |-------------|-------------|------------------|
111
+ |**200** | Successful Response | - |
112
+ |**422** | Validation Error | - |
113
+
114
+ [[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)
115
+
116
+ # **getGenerationsGeneratorAgentGenerationsGet**
117
+ > GenerationsListResponse getGenerationsGeneratorAgentGenerationsGet()
118
+
119
+ Get all projects/generations for a user. **Query Parameters:** * `user_id` - Optional user ID to filter projects * `limit` - Maximum number of recent projects to return (default: 50, max: 100) **Returns:** * `GenerationsListResponse` - Contains list of projects with their conversation history **Raises:** * `HTTPException`: - 400: Invalid parameters - 500: Failed to retrieve generations
120
+
121
+ ### Example
122
+
123
+ ```typescript
124
+ import {
125
+ GeneratorApi,
126
+ Configuration
127
+ } from '@crestal/nation-sdk';
128
+
129
+ const configuration = new Configuration();
130
+ const apiInstance = new GeneratorApi(configuration);
131
+
132
+ let limit: number; // (optional) (default to 50)
133
+
134
+ const { status, data } = await apiInstance.getGenerationsGeneratorAgentGenerationsGet(
135
+ limit
136
+ );
137
+ ```
138
+
139
+ ### Parameters
140
+
141
+ |Name | Type | Description | Notes|
142
+ |------------- | ------------- | ------------- | -------------|
143
+ | **limit** | [**number**] | | (optional) defaults to 50|
144
+
145
+
146
+ ### Return type
147
+
148
+ **GenerationsListResponse**
149
+
150
+ ### Authorization
151
+
152
+ [HTTPBearer](../README.md#HTTPBearer)
153
+
154
+ ### HTTP request headers
155
+
156
+ - **Content-Type**: Not defined
157
+ - **Accept**: application/json
158
+
159
+
160
+ ### HTTP response details
161
+ | Status code | Description | Response headers |
162
+ |-------------|-------------|------------------|
163
+ |**200** | Successful Response | - |
164
+ |**422** | Validation Error | - |
165
+
166
+ [[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)
167
+
@@ -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-19T02:05:03.070+00:00]
31
- **updated_at** | **string** | Timestamp when this data was updated | [optional] [default to 2025-07-19T02:05:03.070+00:00]
30
+ **created_at** | **string** | Timestamp when this data was created | [optional] [default to 2025-07-20T00:41:06.819+00:00]
31
+ **updated_at** | **string** | Timestamp when this data was updated | [optional] [default to 2025-07-20T00:41:06.819+00:00]
32
32
  **provider_name** | **string** | | [default to undefined]
33
33
 
34
34
  ## Example
package/index.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Nation IntentKit API
5
5
  * API for Nation IntentKit services
6
6
  *
7
- * The version of the OpenAPI document: 0.1.28
7
+ * The version of the OpenAPI document: 0.1.29
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crestal/nation-sdk",
3
- "version": "0.1.28",
3
+ "version": "0.1.29",
4
4
  "description": "OpenAPI client for @crestal/nation-sdk",
5
5
  "author": "OpenAPI-Generator Contributors",
6
6
  "repository": {