@crestal/nation-sdk 0.1.27 → 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.
- package/.openapi-generator/FILES +5 -0
- package/README.md +9 -2
- package/api.ts +398 -1
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +1 -1
- package/dist/api.d.ts +264 -1
- package/dist/api.js +324 -2
- 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/AgentGenerateRequest.md +25 -0
- package/docs/AgentGenerateResponse.md +31 -0
- package/docs/GenerationDetailResponse.md +35 -0
- package/docs/GenerationsListResponse.md +21 -0
- package/docs/GeneratorApi.md +167 -0
- package/docs/LLMModelInfoWithProviderName.md +2 -2
- package/index.ts +1 -1
- package/package.json +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -10,6 +10,8 @@ docs/Agent.md
|
|
|
10
10
|
docs/AgentApi.md
|
|
11
11
|
docs/AgentAutonomous.md
|
|
12
12
|
docs/AgentExample.md
|
|
13
|
+
docs/AgentGenerateRequest.md
|
|
14
|
+
docs/AgentGenerateResponse.md
|
|
13
15
|
docs/AgentListResponse.md
|
|
14
16
|
docs/AgentResponse.md
|
|
15
17
|
docs/AgentSortOption.md
|
|
@@ -37,6 +39,9 @@ docs/CreditType.md
|
|
|
37
39
|
docs/Direction.md
|
|
38
40
|
docs/EventType.md
|
|
39
41
|
docs/FeePercentage.md
|
|
42
|
+
docs/GenerationDetailResponse.md
|
|
43
|
+
docs/GenerationsListResponse.md
|
|
44
|
+
docs/GeneratorApi.md
|
|
40
45
|
docs/HTTPValidationError.md
|
|
41
46
|
docs/HealthApi.md
|
|
42
47
|
docs/LLMModelInfoWithProviderName.md
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
## @crestal/nation-sdk@0.1.
|
|
1
|
+
## @crestal/nation-sdk@0.1.29
|
|
2
2
|
|
|
3
3
|
This generator creates TypeScript/JavaScript client that utilizes [axios](https://github.com/axios/axios). The generated Node module can be used in the following environments:
|
|
4
4
|
|
|
@@ -36,7 +36,7 @@ navigate to the folder of your consuming project and run one of the following co
|
|
|
36
36
|
_published:_
|
|
37
37
|
|
|
38
38
|
```
|
|
39
|
-
npm install @crestal/nation-sdk@0.1.
|
|
39
|
+
npm install @crestal/nation-sdk@0.1.29 --save
|
|
40
40
|
```
|
|
41
41
|
|
|
42
42
|
_unPublished (not recommended):_
|
|
@@ -75,6 +75,9 @@ Class | Method | HTTP request | Description
|
|
|
75
75
|
*CreditApi* | [**listAgentIncomeEvents**](docs/CreditApi.md#listagentincomeevents) | **GET** /credit/agents/{agent_id}/events | List Agent Income
|
|
76
76
|
*CreditApi* | [**listUserEvents**](docs/CreditApi.md#listuserevents) | **GET** /credit/user/events | List User Events
|
|
77
77
|
*CreditApi* | [**listUserTransactions**](docs/CreditApi.md#listusertransactions) | **GET** /credit/user/transactions | List User Transactions
|
|
78
|
+
*GeneratorApi* | [**generateAgentGeneratorAgentGeneratePost**](docs/GeneratorApi.md#generateagentgeneratoragentgeneratepost) | **POST** /generator/agent/generate | Generate Agent from Natural Language Prompt
|
|
79
|
+
*GeneratorApi* | [**getGenerationDetailGeneratorAgentGenerationsProjectIdGet**](docs/GeneratorApi.md#getgenerationdetailgeneratoragentgenerationsprojectidget) | **GET** /generator/agent/generations/{project_id} | Get Generation Detail by Project ID
|
|
80
|
+
*GeneratorApi* | [**getGenerationsGeneratorAgentGenerationsGet**](docs/GeneratorApi.md#getgenerationsgeneratoragentgenerationsget) | **GET** /generator/agent/generations | Get Generations List by User
|
|
78
81
|
*HealthApi* | [**healthCheckHealthGet**](docs/HealthApi.md#healthcheckhealthget) | **GET** /health | Health check endpoint
|
|
79
82
|
*MetadataApi* | [**getAgentSchema**](docs/MetadataApi.md#getagentschema) | **GET** /metadata/agent/schema.json | Get agent schema
|
|
80
83
|
*MetadataApi* | [**getLlmsMetadataLlmsGet**](docs/MetadataApi.md#getllmsmetadatallmsget) | **GET** /metadata/llms | Get all LLM models
|
|
@@ -90,6 +93,8 @@ Class | Method | HTTP request | Description
|
|
|
90
93
|
- [Agent](docs/Agent.md)
|
|
91
94
|
- [AgentAutonomous](docs/AgentAutonomous.md)
|
|
92
95
|
- [AgentExample](docs/AgentExample.md)
|
|
96
|
+
- [AgentGenerateRequest](docs/AgentGenerateRequest.md)
|
|
97
|
+
- [AgentGenerateResponse](docs/AgentGenerateResponse.md)
|
|
93
98
|
- [AgentListResponse](docs/AgentListResponse.md)
|
|
94
99
|
- [AgentResponse](docs/AgentResponse.md)
|
|
95
100
|
- [AgentSortOption](docs/AgentSortOption.md)
|
|
@@ -115,6 +120,8 @@ Class | Method | HTTP request | Description
|
|
|
115
120
|
- [Direction](docs/Direction.md)
|
|
116
121
|
- [EventType](docs/EventType.md)
|
|
117
122
|
- [FeePercentage](docs/FeePercentage.md)
|
|
123
|
+
- [GenerationDetailResponse](docs/GenerationDetailResponse.md)
|
|
124
|
+
- [GenerationsListResponse](docs/GenerationsListResponse.md)
|
|
118
125
|
- [HTTPValidationError](docs/HTTPValidationError.md)
|
|
119
126
|
- [LLMModelInfoWithProviderName](docs/LLMModelInfoWithProviderName.md)
|
|
120
127
|
- [LLMProvider](docs/LLMProvider.md)
|
package/api.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.
|
|
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).
|
|
@@ -386,6 +386,74 @@ export interface AgentExample {
|
|
|
386
386
|
*/
|
|
387
387
|
'prompt': string;
|
|
388
388
|
}
|
|
389
|
+
/**
|
|
390
|
+
* Request model for agent generation.
|
|
391
|
+
* @export
|
|
392
|
+
* @interface AgentGenerateRequest
|
|
393
|
+
*/
|
|
394
|
+
export interface AgentGenerateRequest {
|
|
395
|
+
/**
|
|
396
|
+
* Natural language description of the agent\'s desired capabilities
|
|
397
|
+
* @type {string}
|
|
398
|
+
* @memberof AgentGenerateRequest
|
|
399
|
+
*/
|
|
400
|
+
'prompt': string;
|
|
401
|
+
/**
|
|
402
|
+
*
|
|
403
|
+
* @type {AgentUpdate}
|
|
404
|
+
* @memberof AgentGenerateRequest
|
|
405
|
+
*/
|
|
406
|
+
'existing_agent'?: AgentUpdate | null;
|
|
407
|
+
/**
|
|
408
|
+
*
|
|
409
|
+
* @type {string}
|
|
410
|
+
* @memberof AgentGenerateRequest
|
|
411
|
+
*/
|
|
412
|
+
'project_id'?: string | null;
|
|
413
|
+
}
|
|
414
|
+
/**
|
|
415
|
+
* Response model for agent generation.
|
|
416
|
+
* @export
|
|
417
|
+
* @interface AgentGenerateResponse
|
|
418
|
+
*/
|
|
419
|
+
export interface AgentGenerateResponse {
|
|
420
|
+
/**
|
|
421
|
+
* The generated agent schema
|
|
422
|
+
* @type {object}
|
|
423
|
+
* @memberof AgentGenerateResponse
|
|
424
|
+
*/
|
|
425
|
+
'agent': object;
|
|
426
|
+
/**
|
|
427
|
+
* Project ID for this conversation session
|
|
428
|
+
* @type {string}
|
|
429
|
+
* @memberof AgentGenerateResponse
|
|
430
|
+
*/
|
|
431
|
+
'project_id': string;
|
|
432
|
+
/**
|
|
433
|
+
* Human-readable summary of the generated agent
|
|
434
|
+
* @type {string}
|
|
435
|
+
* @memberof AgentGenerateResponse
|
|
436
|
+
*/
|
|
437
|
+
'summary': string;
|
|
438
|
+
/**
|
|
439
|
+
* Generated tags for the agent as ID objects: [{\'id\': 1}, {\'id\': 2}]
|
|
440
|
+
* @type {Array<{ [key: string]: number; }>}
|
|
441
|
+
* @memberof AgentGenerateResponse
|
|
442
|
+
*/
|
|
443
|
+
'tags'?: Array<{ [key: string]: number; }>;
|
|
444
|
+
/**
|
|
445
|
+
* List of autonomous tasks generated for the agent
|
|
446
|
+
* @type {Array<object>}
|
|
447
|
+
* @memberof AgentGenerateResponse
|
|
448
|
+
*/
|
|
449
|
+
'autonomous_tasks'?: Array<object>;
|
|
450
|
+
/**
|
|
451
|
+
* List of skills that were activated based on the prompt
|
|
452
|
+
* @type {Array<string>}
|
|
453
|
+
* @memberof AgentGenerateResponse
|
|
454
|
+
*/
|
|
455
|
+
'activated_skills'?: Array<string>;
|
|
456
|
+
}
|
|
389
457
|
/**
|
|
390
458
|
* Paginated response model for agents list. Contains a list of agents, a flag indicating if more items are available, and a cursor for pagination.
|
|
391
459
|
* @export
|
|
@@ -2208,6 +2276,74 @@ export type EventType = typeof EventType[keyof typeof EventType];
|
|
|
2208
2276
|
*/
|
|
2209
2277
|
export interface FeePercentage {
|
|
2210
2278
|
}
|
|
2279
|
+
/**
|
|
2280
|
+
* Response model for single generation detail.
|
|
2281
|
+
* @export
|
|
2282
|
+
* @interface GenerationDetailResponse
|
|
2283
|
+
*/
|
|
2284
|
+
export interface GenerationDetailResponse {
|
|
2285
|
+
/**
|
|
2286
|
+
* Project ID
|
|
2287
|
+
* @type {string}
|
|
2288
|
+
* @memberof GenerationDetailResponse
|
|
2289
|
+
*/
|
|
2290
|
+
'project_id': string;
|
|
2291
|
+
/**
|
|
2292
|
+
*
|
|
2293
|
+
* @type {string}
|
|
2294
|
+
* @memberof GenerationDetailResponse
|
|
2295
|
+
*/
|
|
2296
|
+
'user_id'?: string | null;
|
|
2297
|
+
/**
|
|
2298
|
+
*
|
|
2299
|
+
* @type {string}
|
|
2300
|
+
* @memberof GenerationDetailResponse
|
|
2301
|
+
*/
|
|
2302
|
+
'created_at'?: string | null;
|
|
2303
|
+
/**
|
|
2304
|
+
*
|
|
2305
|
+
* @type {string}
|
|
2306
|
+
* @memberof GenerationDetailResponse
|
|
2307
|
+
*/
|
|
2308
|
+
'last_activity'?: string | null;
|
|
2309
|
+
/**
|
|
2310
|
+
* Number of messages in conversation
|
|
2311
|
+
* @type {number}
|
|
2312
|
+
* @memberof GenerationDetailResponse
|
|
2313
|
+
*/
|
|
2314
|
+
'message_count': number;
|
|
2315
|
+
/**
|
|
2316
|
+
*
|
|
2317
|
+
* @type {object}
|
|
2318
|
+
* @memberof GenerationDetailResponse
|
|
2319
|
+
*/
|
|
2320
|
+
'last_message'?: object | null;
|
|
2321
|
+
/**
|
|
2322
|
+
*
|
|
2323
|
+
* @type {object}
|
|
2324
|
+
* @memberof GenerationDetailResponse
|
|
2325
|
+
*/
|
|
2326
|
+
'first_message'?: object | null;
|
|
2327
|
+
/**
|
|
2328
|
+
* Full conversation history
|
|
2329
|
+
* @type {Array<object>}
|
|
2330
|
+
* @memberof GenerationDetailResponse
|
|
2331
|
+
*/
|
|
2332
|
+
'conversation_history': Array<object>;
|
|
2333
|
+
}
|
|
2334
|
+
/**
|
|
2335
|
+
* Response model for generations list.
|
|
2336
|
+
* @export
|
|
2337
|
+
* @interface GenerationsListResponse
|
|
2338
|
+
*/
|
|
2339
|
+
export interface GenerationsListResponse {
|
|
2340
|
+
/**
|
|
2341
|
+
* List of recent projects with their conversation history
|
|
2342
|
+
* @type {Array<object>}
|
|
2343
|
+
* @memberof GenerationsListResponse
|
|
2344
|
+
*/
|
|
2345
|
+
'projects': Array<object>;
|
|
2346
|
+
}
|
|
2211
2347
|
/**
|
|
2212
2348
|
*
|
|
2213
2349
|
* @export
|
|
@@ -4607,6 +4743,267 @@ export class CreditApi extends BaseAPI {
|
|
|
4607
4743
|
|
|
4608
4744
|
|
|
4609
4745
|
|
|
4746
|
+
/**
|
|
4747
|
+
* GeneratorApi - axios parameter creator
|
|
4748
|
+
* @export
|
|
4749
|
+
*/
|
|
4750
|
+
export const GeneratorApiAxiosParamCreator = function (configuration?: Configuration) {
|
|
4751
|
+
return {
|
|
4752
|
+
/**
|
|
4753
|
+
* 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
|
|
4754
|
+
* @summary Generate Agent from Natural Language Prompt
|
|
4755
|
+
* @param {AgentGenerateRequest} agentGenerateRequest
|
|
4756
|
+
* @param {*} [options] Override http request option.
|
|
4757
|
+
* @throws {RequiredError}
|
|
4758
|
+
*/
|
|
4759
|
+
generateAgentGeneratorAgentGeneratePost: async (agentGenerateRequest: AgentGenerateRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
4760
|
+
// verify required parameter 'agentGenerateRequest' is not null or undefined
|
|
4761
|
+
assertParamExists('generateAgentGeneratorAgentGeneratePost', 'agentGenerateRequest', agentGenerateRequest)
|
|
4762
|
+
const localVarPath = `/generator/agent/generate`;
|
|
4763
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4764
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4765
|
+
let baseOptions;
|
|
4766
|
+
if (configuration) {
|
|
4767
|
+
baseOptions = configuration.baseOptions;
|
|
4768
|
+
}
|
|
4769
|
+
|
|
4770
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
|
|
4771
|
+
const localVarHeaderParameter = {} as any;
|
|
4772
|
+
const localVarQueryParameter = {} as any;
|
|
4773
|
+
|
|
4774
|
+
// authentication HTTPBearer required
|
|
4775
|
+
// http bearer authentication required
|
|
4776
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
4777
|
+
|
|
4778
|
+
|
|
4779
|
+
|
|
4780
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
4781
|
+
|
|
4782
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4783
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4784
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
4785
|
+
localVarRequestOptions.data = serializeDataIfNeeded(agentGenerateRequest, localVarRequestOptions, configuration)
|
|
4786
|
+
|
|
4787
|
+
return {
|
|
4788
|
+
url: toPathString(localVarUrlObj),
|
|
4789
|
+
options: localVarRequestOptions,
|
|
4790
|
+
};
|
|
4791
|
+
},
|
|
4792
|
+
/**
|
|
4793
|
+
* 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
|
|
4794
|
+
* @summary Get Generation Detail by Project ID
|
|
4795
|
+
* @param {string} projectId
|
|
4796
|
+
* @param {*} [options] Override http request option.
|
|
4797
|
+
* @throws {RequiredError}
|
|
4798
|
+
*/
|
|
4799
|
+
getGenerationDetailGeneratorAgentGenerationsProjectIdGet: async (projectId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
4800
|
+
// verify required parameter 'projectId' is not null or undefined
|
|
4801
|
+
assertParamExists('getGenerationDetailGeneratorAgentGenerationsProjectIdGet', 'projectId', projectId)
|
|
4802
|
+
const localVarPath = `/generator/agent/generations/{project_id}`
|
|
4803
|
+
.replace(`{${"project_id"}}`, encodeURIComponent(String(projectId)));
|
|
4804
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4805
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4806
|
+
let baseOptions;
|
|
4807
|
+
if (configuration) {
|
|
4808
|
+
baseOptions = configuration.baseOptions;
|
|
4809
|
+
}
|
|
4810
|
+
|
|
4811
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
4812
|
+
const localVarHeaderParameter = {} as any;
|
|
4813
|
+
const localVarQueryParameter = {} as any;
|
|
4814
|
+
|
|
4815
|
+
// authentication HTTPBearer required
|
|
4816
|
+
// http bearer authentication required
|
|
4817
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
4818
|
+
|
|
4819
|
+
|
|
4820
|
+
|
|
4821
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4822
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4823
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
4824
|
+
|
|
4825
|
+
return {
|
|
4826
|
+
url: toPathString(localVarUrlObj),
|
|
4827
|
+
options: localVarRequestOptions,
|
|
4828
|
+
};
|
|
4829
|
+
},
|
|
4830
|
+
/**
|
|
4831
|
+
* 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
|
|
4832
|
+
* @summary Get Generations List by User
|
|
4833
|
+
* @param {number} [limit]
|
|
4834
|
+
* @param {*} [options] Override http request option.
|
|
4835
|
+
* @throws {RequiredError}
|
|
4836
|
+
*/
|
|
4837
|
+
getGenerationsGeneratorAgentGenerationsGet: async (limit?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
|
|
4838
|
+
const localVarPath = `/generator/agent/generations`;
|
|
4839
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
4840
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
4841
|
+
let baseOptions;
|
|
4842
|
+
if (configuration) {
|
|
4843
|
+
baseOptions = configuration.baseOptions;
|
|
4844
|
+
}
|
|
4845
|
+
|
|
4846
|
+
const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
|
|
4847
|
+
const localVarHeaderParameter = {} as any;
|
|
4848
|
+
const localVarQueryParameter = {} as any;
|
|
4849
|
+
|
|
4850
|
+
// authentication HTTPBearer required
|
|
4851
|
+
// http bearer authentication required
|
|
4852
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration)
|
|
4853
|
+
|
|
4854
|
+
if (limit !== undefined) {
|
|
4855
|
+
localVarQueryParameter['limit'] = limit;
|
|
4856
|
+
}
|
|
4857
|
+
|
|
4858
|
+
|
|
4859
|
+
|
|
4860
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
4861
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4862
|
+
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
|
|
4863
|
+
|
|
4864
|
+
return {
|
|
4865
|
+
url: toPathString(localVarUrlObj),
|
|
4866
|
+
options: localVarRequestOptions,
|
|
4867
|
+
};
|
|
4868
|
+
},
|
|
4869
|
+
}
|
|
4870
|
+
};
|
|
4871
|
+
|
|
4872
|
+
/**
|
|
4873
|
+
* GeneratorApi - functional programming interface
|
|
4874
|
+
* @export
|
|
4875
|
+
*/
|
|
4876
|
+
export const GeneratorApiFp = function(configuration?: Configuration) {
|
|
4877
|
+
const localVarAxiosParamCreator = GeneratorApiAxiosParamCreator(configuration)
|
|
4878
|
+
return {
|
|
4879
|
+
/**
|
|
4880
|
+
* 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
|
|
4881
|
+
* @summary Generate Agent from Natural Language Prompt
|
|
4882
|
+
* @param {AgentGenerateRequest} agentGenerateRequest
|
|
4883
|
+
* @param {*} [options] Override http request option.
|
|
4884
|
+
* @throws {RequiredError}
|
|
4885
|
+
*/
|
|
4886
|
+
async generateAgentGeneratorAgentGeneratePost(agentGenerateRequest: AgentGenerateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AgentGenerateResponse>> {
|
|
4887
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.generateAgentGeneratorAgentGeneratePost(agentGenerateRequest, options);
|
|
4888
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
4889
|
+
const localVarOperationServerBasePath = operationServerMap['GeneratorApi.generateAgentGeneratorAgentGeneratePost']?.[localVarOperationServerIndex]?.url;
|
|
4890
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4891
|
+
},
|
|
4892
|
+
/**
|
|
4893
|
+
* 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
|
|
4894
|
+
* @summary Get Generation Detail by Project ID
|
|
4895
|
+
* @param {string} projectId
|
|
4896
|
+
* @param {*} [options] Override http request option.
|
|
4897
|
+
* @throws {RequiredError}
|
|
4898
|
+
*/
|
|
4899
|
+
async getGenerationDetailGeneratorAgentGenerationsProjectIdGet(projectId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GenerationDetailResponse>> {
|
|
4900
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getGenerationDetailGeneratorAgentGenerationsProjectIdGet(projectId, options);
|
|
4901
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
4902
|
+
const localVarOperationServerBasePath = operationServerMap['GeneratorApi.getGenerationDetailGeneratorAgentGenerationsProjectIdGet']?.[localVarOperationServerIndex]?.url;
|
|
4903
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4904
|
+
},
|
|
4905
|
+
/**
|
|
4906
|
+
* 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
|
|
4907
|
+
* @summary Get Generations List by User
|
|
4908
|
+
* @param {number} [limit]
|
|
4909
|
+
* @param {*} [options] Override http request option.
|
|
4910
|
+
* @throws {RequiredError}
|
|
4911
|
+
*/
|
|
4912
|
+
async getGenerationsGeneratorAgentGenerationsGet(limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GenerationsListResponse>> {
|
|
4913
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getGenerationsGeneratorAgentGenerationsGet(limit, options);
|
|
4914
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
4915
|
+
const localVarOperationServerBasePath = operationServerMap['GeneratorApi.getGenerationsGeneratorAgentGenerationsGet']?.[localVarOperationServerIndex]?.url;
|
|
4916
|
+
return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
|
|
4917
|
+
},
|
|
4918
|
+
}
|
|
4919
|
+
};
|
|
4920
|
+
|
|
4921
|
+
/**
|
|
4922
|
+
* GeneratorApi - factory interface
|
|
4923
|
+
* @export
|
|
4924
|
+
*/
|
|
4925
|
+
export const GeneratorApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
|
|
4926
|
+
const localVarFp = GeneratorApiFp(configuration)
|
|
4927
|
+
return {
|
|
4928
|
+
/**
|
|
4929
|
+
* 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
|
|
4930
|
+
* @summary Generate Agent from Natural Language Prompt
|
|
4931
|
+
* @param {AgentGenerateRequest} agentGenerateRequest
|
|
4932
|
+
* @param {*} [options] Override http request option.
|
|
4933
|
+
* @throws {RequiredError}
|
|
4934
|
+
*/
|
|
4935
|
+
generateAgentGeneratorAgentGeneratePost(agentGenerateRequest: AgentGenerateRequest, options?: RawAxiosRequestConfig): AxiosPromise<AgentGenerateResponse> {
|
|
4936
|
+
return localVarFp.generateAgentGeneratorAgentGeneratePost(agentGenerateRequest, options).then((request) => request(axios, basePath));
|
|
4937
|
+
},
|
|
4938
|
+
/**
|
|
4939
|
+
* 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
|
|
4940
|
+
* @summary Get Generation Detail by Project ID
|
|
4941
|
+
* @param {string} projectId
|
|
4942
|
+
* @param {*} [options] Override http request option.
|
|
4943
|
+
* @throws {RequiredError}
|
|
4944
|
+
*/
|
|
4945
|
+
getGenerationDetailGeneratorAgentGenerationsProjectIdGet(projectId: string, options?: RawAxiosRequestConfig): AxiosPromise<GenerationDetailResponse> {
|
|
4946
|
+
return localVarFp.getGenerationDetailGeneratorAgentGenerationsProjectIdGet(projectId, options).then((request) => request(axios, basePath));
|
|
4947
|
+
},
|
|
4948
|
+
/**
|
|
4949
|
+
* 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
|
|
4950
|
+
* @summary Get Generations List by User
|
|
4951
|
+
* @param {number} [limit]
|
|
4952
|
+
* @param {*} [options] Override http request option.
|
|
4953
|
+
* @throws {RequiredError}
|
|
4954
|
+
*/
|
|
4955
|
+
getGenerationsGeneratorAgentGenerationsGet(limit?: number, options?: RawAxiosRequestConfig): AxiosPromise<GenerationsListResponse> {
|
|
4956
|
+
return localVarFp.getGenerationsGeneratorAgentGenerationsGet(limit, options).then((request) => request(axios, basePath));
|
|
4957
|
+
},
|
|
4958
|
+
};
|
|
4959
|
+
};
|
|
4960
|
+
|
|
4961
|
+
/**
|
|
4962
|
+
* GeneratorApi - object-oriented interface
|
|
4963
|
+
* @export
|
|
4964
|
+
* @class GeneratorApi
|
|
4965
|
+
* @extends {BaseAPI}
|
|
4966
|
+
*/
|
|
4967
|
+
export class GeneratorApi extends BaseAPI {
|
|
4968
|
+
/**
|
|
4969
|
+
* 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
|
|
4970
|
+
* @summary Generate Agent from Natural Language Prompt
|
|
4971
|
+
* @param {AgentGenerateRequest} agentGenerateRequest
|
|
4972
|
+
* @param {*} [options] Override http request option.
|
|
4973
|
+
* @throws {RequiredError}
|
|
4974
|
+
* @memberof GeneratorApi
|
|
4975
|
+
*/
|
|
4976
|
+
public generateAgentGeneratorAgentGeneratePost(agentGenerateRequest: AgentGenerateRequest, options?: RawAxiosRequestConfig) {
|
|
4977
|
+
return GeneratorApiFp(this.configuration).generateAgentGeneratorAgentGeneratePost(agentGenerateRequest, options).then((request) => request(this.axios, this.basePath));
|
|
4978
|
+
}
|
|
4979
|
+
|
|
4980
|
+
/**
|
|
4981
|
+
* 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
|
|
4982
|
+
* @summary Get Generation Detail by Project ID
|
|
4983
|
+
* @param {string} projectId
|
|
4984
|
+
* @param {*} [options] Override http request option.
|
|
4985
|
+
* @throws {RequiredError}
|
|
4986
|
+
* @memberof GeneratorApi
|
|
4987
|
+
*/
|
|
4988
|
+
public getGenerationDetailGeneratorAgentGenerationsProjectIdGet(projectId: string, options?: RawAxiosRequestConfig) {
|
|
4989
|
+
return GeneratorApiFp(this.configuration).getGenerationDetailGeneratorAgentGenerationsProjectIdGet(projectId, options).then((request) => request(this.axios, this.basePath));
|
|
4990
|
+
}
|
|
4991
|
+
|
|
4992
|
+
/**
|
|
4993
|
+
* 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
|
|
4994
|
+
* @summary Get Generations List by User
|
|
4995
|
+
* @param {number} [limit]
|
|
4996
|
+
* @param {*} [options] Override http request option.
|
|
4997
|
+
* @throws {RequiredError}
|
|
4998
|
+
* @memberof GeneratorApi
|
|
4999
|
+
*/
|
|
5000
|
+
public getGenerationsGeneratorAgentGenerationsGet(limit?: number, options?: RawAxiosRequestConfig) {
|
|
5001
|
+
return GeneratorApiFp(this.configuration).getGenerationsGeneratorAgentGenerationsGet(limit, options).then((request) => request(this.axios, this.basePath));
|
|
5002
|
+
}
|
|
5003
|
+
}
|
|
5004
|
+
|
|
5005
|
+
|
|
5006
|
+
|
|
4610
5007
|
/**
|
|
4611
5008
|
* HealthApi - axios parameter creator
|
|
4612
5009
|
* @export
|
package/base.ts
CHANGED
package/common.ts
CHANGED
package/configuration.ts
CHANGED