@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.
- 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/dist/api.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Nation IntentKit API
|
|
6
6
|
* API for Nation IntentKit services
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 0.1.
|
|
8
|
+
* The version of the OpenAPI document: 0.1.29
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -84,7 +84,8 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
84
84
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
85
85
|
};
|
|
86
86
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
87
|
-
exports.
|
|
87
|
+
exports.UserApiFactory = exports.UserApiFp = exports.UserApiAxiosParamCreator = exports.MetadataApi = exports.MetadataApiFactory = exports.MetadataApiFp = exports.MetadataApiAxiosParamCreator = exports.HealthApi = exports.HealthApiFactory = exports.HealthApiFp = exports.HealthApiAxiosParamCreator = exports.GeneratorApi = exports.GeneratorApiFactory = exports.GeneratorApiFp = exports.GeneratorApiAxiosParamCreator = exports.CreditApi = exports.CreditApiFactory = exports.CreditApiFp = exports.CreditApiAxiosParamCreator = exports.ChatApi = exports.ChatApiFactory = exports.ChatApiFp = exports.ChatApiAxiosParamCreator = exports.AgentApi = exports.AgentApiFactory = exports.AgentApiFp = exports.AgentApiAxiosParamCreator = exports.UpstreamType = exports.TransactionType = exports.OwnerType = exports.LLMProvider = exports.EventType = exports.Direction = exports.CreditType = exports.CreditDebit = exports.ChatMessageAttachmentType = exports.AuthorType = exports.AgentUpdateCdpNetworkIdEnum = exports.AgentUpdateNetworkIdEnum = exports.AgentUpdateWalletProviderEnum = exports.AgentUpdateShortTermMemoryStrategyEnum = exports.AgentUpdateModeEnum = exports.AgentSortOption = exports.AgentResponseWalletProviderEnum = exports.AgentResponseModeEnum = exports.AgentCdpNetworkIdEnum = exports.AgentNetworkIdEnum = exports.AgentWalletProviderEnum = exports.AgentShortTermMemoryStrategyEnum = exports.AgentModeEnum = void 0;
|
|
88
|
+
exports.UserApi = void 0;
|
|
88
89
|
var axios_1 = require("axios");
|
|
89
90
|
// Some imports not used depending on template conditions
|
|
90
91
|
// @ts-ignore
|
|
@@ -2782,6 +2783,327 @@ var CreditApi = /** @class */ (function (_super) {
|
|
|
2782
2783
|
return CreditApi;
|
|
2783
2784
|
}(base_1.BaseAPI));
|
|
2784
2785
|
exports.CreditApi = CreditApi;
|
|
2786
|
+
/**
|
|
2787
|
+
* GeneratorApi - axios parameter creator
|
|
2788
|
+
* @export
|
|
2789
|
+
*/
|
|
2790
|
+
var GeneratorApiAxiosParamCreator = function (configuration) {
|
|
2791
|
+
var _this = this;
|
|
2792
|
+
return {
|
|
2793
|
+
/**
|
|
2794
|
+
* 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
|
|
2795
|
+
* @summary Generate Agent from Natural Language Prompt
|
|
2796
|
+
* @param {AgentGenerateRequest} agentGenerateRequest
|
|
2797
|
+
* @param {*} [options] Override http request option.
|
|
2798
|
+
* @throws {RequiredError}
|
|
2799
|
+
*/
|
|
2800
|
+
generateAgentGeneratorAgentGeneratePost: function (agentGenerateRequest_1) {
|
|
2801
|
+
var args_1 = [];
|
|
2802
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
2803
|
+
args_1[_i - 1] = arguments[_i];
|
|
2804
|
+
}
|
|
2805
|
+
return __awaiter(_this, __spreadArray([agentGenerateRequest_1], args_1, true), void 0, function (agentGenerateRequest, options) {
|
|
2806
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
2807
|
+
if (options === void 0) { options = {}; }
|
|
2808
|
+
return __generator(this, function (_a) {
|
|
2809
|
+
switch (_a.label) {
|
|
2810
|
+
case 0:
|
|
2811
|
+
// verify required parameter 'agentGenerateRequest' is not null or undefined
|
|
2812
|
+
(0, common_1.assertParamExists)('generateAgentGeneratorAgentGeneratePost', 'agentGenerateRequest', agentGenerateRequest);
|
|
2813
|
+
localVarPath = "/generator/agent/generate";
|
|
2814
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2815
|
+
if (configuration) {
|
|
2816
|
+
baseOptions = configuration.baseOptions;
|
|
2817
|
+
}
|
|
2818
|
+
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
2819
|
+
localVarHeaderParameter = {};
|
|
2820
|
+
localVarQueryParameter = {};
|
|
2821
|
+
// authentication HTTPBearer required
|
|
2822
|
+
// http bearer authentication required
|
|
2823
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
2824
|
+
case 1:
|
|
2825
|
+
// authentication HTTPBearer required
|
|
2826
|
+
// http bearer authentication required
|
|
2827
|
+
_a.sent();
|
|
2828
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
2829
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2830
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2831
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2832
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(agentGenerateRequest, localVarRequestOptions, configuration);
|
|
2833
|
+
return [2 /*return*/, {
|
|
2834
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2835
|
+
options: localVarRequestOptions,
|
|
2836
|
+
}];
|
|
2837
|
+
}
|
|
2838
|
+
});
|
|
2839
|
+
});
|
|
2840
|
+
},
|
|
2841
|
+
/**
|
|
2842
|
+
* 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
|
|
2843
|
+
* @summary Get Generation Detail by Project ID
|
|
2844
|
+
* @param {string} projectId
|
|
2845
|
+
* @param {*} [options] Override http request option.
|
|
2846
|
+
* @throws {RequiredError}
|
|
2847
|
+
*/
|
|
2848
|
+
getGenerationDetailGeneratorAgentGenerationsProjectIdGet: function (projectId_1) {
|
|
2849
|
+
var args_1 = [];
|
|
2850
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
2851
|
+
args_1[_i - 1] = arguments[_i];
|
|
2852
|
+
}
|
|
2853
|
+
return __awaiter(_this, __spreadArray([projectId_1], args_1, true), void 0, function (projectId, options) {
|
|
2854
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
2855
|
+
if (options === void 0) { options = {}; }
|
|
2856
|
+
return __generator(this, function (_a) {
|
|
2857
|
+
switch (_a.label) {
|
|
2858
|
+
case 0:
|
|
2859
|
+
// verify required parameter 'projectId' is not null or undefined
|
|
2860
|
+
(0, common_1.assertParamExists)('getGenerationDetailGeneratorAgentGenerationsProjectIdGet', 'projectId', projectId);
|
|
2861
|
+
localVarPath = "/generator/agent/generations/{project_id}"
|
|
2862
|
+
.replace("{".concat("project_id", "}"), encodeURIComponent(String(projectId)));
|
|
2863
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2864
|
+
if (configuration) {
|
|
2865
|
+
baseOptions = configuration.baseOptions;
|
|
2866
|
+
}
|
|
2867
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
2868
|
+
localVarHeaderParameter = {};
|
|
2869
|
+
localVarQueryParameter = {};
|
|
2870
|
+
// authentication HTTPBearer required
|
|
2871
|
+
// http bearer authentication required
|
|
2872
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
2873
|
+
case 1:
|
|
2874
|
+
// authentication HTTPBearer required
|
|
2875
|
+
// http bearer authentication required
|
|
2876
|
+
_a.sent();
|
|
2877
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2878
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2879
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2880
|
+
return [2 /*return*/, {
|
|
2881
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2882
|
+
options: localVarRequestOptions,
|
|
2883
|
+
}];
|
|
2884
|
+
}
|
|
2885
|
+
});
|
|
2886
|
+
});
|
|
2887
|
+
},
|
|
2888
|
+
/**
|
|
2889
|
+
* 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
|
|
2890
|
+
* @summary Get Generations List by User
|
|
2891
|
+
* @param {number} [limit]
|
|
2892
|
+
* @param {*} [options] Override http request option.
|
|
2893
|
+
* @throws {RequiredError}
|
|
2894
|
+
*/
|
|
2895
|
+
getGenerationsGeneratorAgentGenerationsGet: function (limit_1) {
|
|
2896
|
+
var args_1 = [];
|
|
2897
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
2898
|
+
args_1[_i - 1] = arguments[_i];
|
|
2899
|
+
}
|
|
2900
|
+
return __awaiter(_this, __spreadArray([limit_1], args_1, true), void 0, function (limit, options) {
|
|
2901
|
+
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
2902
|
+
if (options === void 0) { options = {}; }
|
|
2903
|
+
return __generator(this, function (_a) {
|
|
2904
|
+
switch (_a.label) {
|
|
2905
|
+
case 0:
|
|
2906
|
+
localVarPath = "/generator/agent/generations";
|
|
2907
|
+
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
2908
|
+
if (configuration) {
|
|
2909
|
+
baseOptions = configuration.baseOptions;
|
|
2910
|
+
}
|
|
2911
|
+
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
2912
|
+
localVarHeaderParameter = {};
|
|
2913
|
+
localVarQueryParameter = {};
|
|
2914
|
+
// authentication HTTPBearer required
|
|
2915
|
+
// http bearer authentication required
|
|
2916
|
+
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
2917
|
+
case 1:
|
|
2918
|
+
// authentication HTTPBearer required
|
|
2919
|
+
// http bearer authentication required
|
|
2920
|
+
_a.sent();
|
|
2921
|
+
if (limit !== undefined) {
|
|
2922
|
+
localVarQueryParameter['limit'] = limit;
|
|
2923
|
+
}
|
|
2924
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
2925
|
+
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2926
|
+
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
2927
|
+
return [2 /*return*/, {
|
|
2928
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
2929
|
+
options: localVarRequestOptions,
|
|
2930
|
+
}];
|
|
2931
|
+
}
|
|
2932
|
+
});
|
|
2933
|
+
});
|
|
2934
|
+
},
|
|
2935
|
+
};
|
|
2936
|
+
};
|
|
2937
|
+
exports.GeneratorApiAxiosParamCreator = GeneratorApiAxiosParamCreator;
|
|
2938
|
+
/**
|
|
2939
|
+
* GeneratorApi - functional programming interface
|
|
2940
|
+
* @export
|
|
2941
|
+
*/
|
|
2942
|
+
var GeneratorApiFp = function (configuration) {
|
|
2943
|
+
var localVarAxiosParamCreator = (0, exports.GeneratorApiAxiosParamCreator)(configuration);
|
|
2944
|
+
return {
|
|
2945
|
+
/**
|
|
2946
|
+
* 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
|
|
2947
|
+
* @summary Generate Agent from Natural Language Prompt
|
|
2948
|
+
* @param {AgentGenerateRequest} agentGenerateRequest
|
|
2949
|
+
* @param {*} [options] Override http request option.
|
|
2950
|
+
* @throws {RequiredError}
|
|
2951
|
+
*/
|
|
2952
|
+
generateAgentGeneratorAgentGeneratePost: function (agentGenerateRequest, options) {
|
|
2953
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2954
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
2955
|
+
var _a, _b, _c;
|
|
2956
|
+
return __generator(this, function (_d) {
|
|
2957
|
+
switch (_d.label) {
|
|
2958
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.generateAgentGeneratorAgentGeneratePost(agentGenerateRequest, options)];
|
|
2959
|
+
case 1:
|
|
2960
|
+
localVarAxiosArgs = _d.sent();
|
|
2961
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2962
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['GeneratorApi.generateAgentGeneratorAgentGeneratePost']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2963
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
2964
|
+
}
|
|
2965
|
+
});
|
|
2966
|
+
});
|
|
2967
|
+
},
|
|
2968
|
+
/**
|
|
2969
|
+
* 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
|
|
2970
|
+
* @summary Get Generation Detail by Project ID
|
|
2971
|
+
* @param {string} projectId
|
|
2972
|
+
* @param {*} [options] Override http request option.
|
|
2973
|
+
* @throws {RequiredError}
|
|
2974
|
+
*/
|
|
2975
|
+
getGenerationDetailGeneratorAgentGenerationsProjectIdGet: function (projectId, options) {
|
|
2976
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
2977
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
2978
|
+
var _a, _b, _c;
|
|
2979
|
+
return __generator(this, function (_d) {
|
|
2980
|
+
switch (_d.label) {
|
|
2981
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getGenerationDetailGeneratorAgentGenerationsProjectIdGet(projectId, options)];
|
|
2982
|
+
case 1:
|
|
2983
|
+
localVarAxiosArgs = _d.sent();
|
|
2984
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
2985
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['GeneratorApi.getGenerationDetailGeneratorAgentGenerationsProjectIdGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
2986
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
2987
|
+
}
|
|
2988
|
+
});
|
|
2989
|
+
});
|
|
2990
|
+
},
|
|
2991
|
+
/**
|
|
2992
|
+
* 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
|
|
2993
|
+
* @summary Get Generations List by User
|
|
2994
|
+
* @param {number} [limit]
|
|
2995
|
+
* @param {*} [options] Override http request option.
|
|
2996
|
+
* @throws {RequiredError}
|
|
2997
|
+
*/
|
|
2998
|
+
getGenerationsGeneratorAgentGenerationsGet: function (limit, options) {
|
|
2999
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
3000
|
+
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
3001
|
+
var _a, _b, _c;
|
|
3002
|
+
return __generator(this, function (_d) {
|
|
3003
|
+
switch (_d.label) {
|
|
3004
|
+
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getGenerationsGeneratorAgentGenerationsGet(limit, options)];
|
|
3005
|
+
case 1:
|
|
3006
|
+
localVarAxiosArgs = _d.sent();
|
|
3007
|
+
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
3008
|
+
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['GeneratorApi.getGenerationsGeneratorAgentGenerationsGet']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
3009
|
+
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
3010
|
+
}
|
|
3011
|
+
});
|
|
3012
|
+
});
|
|
3013
|
+
},
|
|
3014
|
+
};
|
|
3015
|
+
};
|
|
3016
|
+
exports.GeneratorApiFp = GeneratorApiFp;
|
|
3017
|
+
/**
|
|
3018
|
+
* GeneratorApi - factory interface
|
|
3019
|
+
* @export
|
|
3020
|
+
*/
|
|
3021
|
+
var GeneratorApiFactory = function (configuration, basePath, axios) {
|
|
3022
|
+
var localVarFp = (0, exports.GeneratorApiFp)(configuration);
|
|
3023
|
+
return {
|
|
3024
|
+
/**
|
|
3025
|
+
* 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
|
|
3026
|
+
* @summary Generate Agent from Natural Language Prompt
|
|
3027
|
+
* @param {AgentGenerateRequest} agentGenerateRequest
|
|
3028
|
+
* @param {*} [options] Override http request option.
|
|
3029
|
+
* @throws {RequiredError}
|
|
3030
|
+
*/
|
|
3031
|
+
generateAgentGeneratorAgentGeneratePost: function (agentGenerateRequest, options) {
|
|
3032
|
+
return localVarFp.generateAgentGeneratorAgentGeneratePost(agentGenerateRequest, options).then(function (request) { return request(axios, basePath); });
|
|
3033
|
+
},
|
|
3034
|
+
/**
|
|
3035
|
+
* 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
|
|
3036
|
+
* @summary Get Generation Detail by Project ID
|
|
3037
|
+
* @param {string} projectId
|
|
3038
|
+
* @param {*} [options] Override http request option.
|
|
3039
|
+
* @throws {RequiredError}
|
|
3040
|
+
*/
|
|
3041
|
+
getGenerationDetailGeneratorAgentGenerationsProjectIdGet: function (projectId, options) {
|
|
3042
|
+
return localVarFp.getGenerationDetailGeneratorAgentGenerationsProjectIdGet(projectId, options).then(function (request) { return request(axios, basePath); });
|
|
3043
|
+
},
|
|
3044
|
+
/**
|
|
3045
|
+
* 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
|
|
3046
|
+
* @summary Get Generations List by User
|
|
3047
|
+
* @param {number} [limit]
|
|
3048
|
+
* @param {*} [options] Override http request option.
|
|
3049
|
+
* @throws {RequiredError}
|
|
3050
|
+
*/
|
|
3051
|
+
getGenerationsGeneratorAgentGenerationsGet: function (limit, options) {
|
|
3052
|
+
return localVarFp.getGenerationsGeneratorAgentGenerationsGet(limit, options).then(function (request) { return request(axios, basePath); });
|
|
3053
|
+
},
|
|
3054
|
+
};
|
|
3055
|
+
};
|
|
3056
|
+
exports.GeneratorApiFactory = GeneratorApiFactory;
|
|
3057
|
+
/**
|
|
3058
|
+
* GeneratorApi - object-oriented interface
|
|
3059
|
+
* @export
|
|
3060
|
+
* @class GeneratorApi
|
|
3061
|
+
* @extends {BaseAPI}
|
|
3062
|
+
*/
|
|
3063
|
+
var GeneratorApi = /** @class */ (function (_super) {
|
|
3064
|
+
__extends(GeneratorApi, _super);
|
|
3065
|
+
function GeneratorApi() {
|
|
3066
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
3067
|
+
}
|
|
3068
|
+
/**
|
|
3069
|
+
* 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
|
|
3070
|
+
* @summary Generate Agent from Natural Language Prompt
|
|
3071
|
+
* @param {AgentGenerateRequest} agentGenerateRequest
|
|
3072
|
+
* @param {*} [options] Override http request option.
|
|
3073
|
+
* @throws {RequiredError}
|
|
3074
|
+
* @memberof GeneratorApi
|
|
3075
|
+
*/
|
|
3076
|
+
GeneratorApi.prototype.generateAgentGeneratorAgentGeneratePost = function (agentGenerateRequest, options) {
|
|
3077
|
+
var _this = this;
|
|
3078
|
+
return (0, exports.GeneratorApiFp)(this.configuration).generateAgentGeneratorAgentGeneratePost(agentGenerateRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
3079
|
+
};
|
|
3080
|
+
/**
|
|
3081
|
+
* 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
|
|
3082
|
+
* @summary Get Generation Detail by Project ID
|
|
3083
|
+
* @param {string} projectId
|
|
3084
|
+
* @param {*} [options] Override http request option.
|
|
3085
|
+
* @throws {RequiredError}
|
|
3086
|
+
* @memberof GeneratorApi
|
|
3087
|
+
*/
|
|
3088
|
+
GeneratorApi.prototype.getGenerationDetailGeneratorAgentGenerationsProjectIdGet = function (projectId, options) {
|
|
3089
|
+
var _this = this;
|
|
3090
|
+
return (0, exports.GeneratorApiFp)(this.configuration).getGenerationDetailGeneratorAgentGenerationsProjectIdGet(projectId, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
3091
|
+
};
|
|
3092
|
+
/**
|
|
3093
|
+
* 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
|
|
3094
|
+
* @summary Get Generations List by User
|
|
3095
|
+
* @param {number} [limit]
|
|
3096
|
+
* @param {*} [options] Override http request option.
|
|
3097
|
+
* @throws {RequiredError}
|
|
3098
|
+
* @memberof GeneratorApi
|
|
3099
|
+
*/
|
|
3100
|
+
GeneratorApi.prototype.getGenerationsGeneratorAgentGenerationsGet = function (limit, options) {
|
|
3101
|
+
var _this = this;
|
|
3102
|
+
return (0, exports.GeneratorApiFp)(this.configuration).getGenerationsGeneratorAgentGenerationsGet(limit, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
3103
|
+
};
|
|
3104
|
+
return GeneratorApi;
|
|
3105
|
+
}(base_1.BaseAPI));
|
|
3106
|
+
exports.GeneratorApi = GeneratorApi;
|
|
2785
3107
|
/**
|
|
2786
3108
|
* HealthApi - axios parameter creator
|
|
2787
3109
|
* @export
|
package/dist/base.d.ts
CHANGED
package/dist/base.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Nation IntentKit API
|
|
6
6
|
* API for Nation IntentKit services
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 0.1.
|
|
8
|
+
* The version of the OpenAPI document: 0.1.29
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/common.d.ts
CHANGED
package/dist/common.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Nation IntentKit API
|
|
6
6
|
* API for Nation IntentKit services
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 0.1.
|
|
8
|
+
* The version of the OpenAPI document: 0.1.29
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/configuration.d.ts
CHANGED
package/dist/configuration.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Nation IntentKit API
|
|
6
6
|
* API for Nation IntentKit services
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 0.1.
|
|
8
|
+
* The version of the OpenAPI document: 0.1.29
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Nation IntentKit API
|
|
6
6
|
* API for Nation IntentKit services
|
|
7
7
|
*
|
|
8
|
-
* The version of the OpenAPI document: 0.1.
|
|
8
|
+
* The version of the OpenAPI document: 0.1.29
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# AgentGenerateRequest
|
|
2
|
+
|
|
3
|
+
Request model for agent generation.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**prompt** | **string** | Natural language description of the agent\'s desired capabilities | [default to undefined]
|
|
10
|
+
**existing_agent** | [**AgentUpdate**](AgentUpdate.md) | | [optional] [default to undefined]
|
|
11
|
+
**project_id** | **string** | | [optional] [default to undefined]
|
|
12
|
+
|
|
13
|
+
## Example
|
|
14
|
+
|
|
15
|
+
```typescript
|
|
16
|
+
import { AgentGenerateRequest } from '@crestal/nation-sdk';
|
|
17
|
+
|
|
18
|
+
const instance: AgentGenerateRequest = {
|
|
19
|
+
prompt,
|
|
20
|
+
existing_agent,
|
|
21
|
+
project_id,
|
|
22
|
+
};
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# AgentGenerateResponse
|
|
2
|
+
|
|
3
|
+
Response model for agent generation.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**agent** | **object** | The generated agent schema | [default to undefined]
|
|
10
|
+
**project_id** | **string** | Project ID for this conversation session | [default to undefined]
|
|
11
|
+
**summary** | **string** | Human-readable summary of the generated agent | [default to undefined]
|
|
12
|
+
**tags** | **Array<{ [key: string]: number; }>** | Generated tags for the agent as ID objects: [{\'id\': 1}, {\'id\': 2}] | [optional] [default to undefined]
|
|
13
|
+
**autonomous_tasks** | **Array<object>** | List of autonomous tasks generated for the agent | [optional] [default to undefined]
|
|
14
|
+
**activated_skills** | **Array<string>** | List of skills that were activated based on the prompt | [optional] [default to undefined]
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import { AgentGenerateResponse } from '@crestal/nation-sdk';
|
|
20
|
+
|
|
21
|
+
const instance: AgentGenerateResponse = {
|
|
22
|
+
agent,
|
|
23
|
+
project_id,
|
|
24
|
+
summary,
|
|
25
|
+
tags,
|
|
26
|
+
autonomous_tasks,
|
|
27
|
+
activated_skills,
|
|
28
|
+
};
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# GenerationDetailResponse
|
|
2
|
+
|
|
3
|
+
Response model for single generation detail.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**project_id** | **string** | Project ID | [default to undefined]
|
|
10
|
+
**user_id** | **string** | | [optional] [default to undefined]
|
|
11
|
+
**created_at** | **string** | | [optional] [default to undefined]
|
|
12
|
+
**last_activity** | **string** | | [optional] [default to undefined]
|
|
13
|
+
**message_count** | **number** | Number of messages in conversation | [default to undefined]
|
|
14
|
+
**last_message** | **object** | | [optional] [default to undefined]
|
|
15
|
+
**first_message** | **object** | | [optional] [default to undefined]
|
|
16
|
+
**conversation_history** | **Array<object>** | Full conversation history | [default to undefined]
|
|
17
|
+
|
|
18
|
+
## Example
|
|
19
|
+
|
|
20
|
+
```typescript
|
|
21
|
+
import { GenerationDetailResponse } from '@crestal/nation-sdk';
|
|
22
|
+
|
|
23
|
+
const instance: GenerationDetailResponse = {
|
|
24
|
+
project_id,
|
|
25
|
+
user_id,
|
|
26
|
+
created_at,
|
|
27
|
+
last_activity,
|
|
28
|
+
message_count,
|
|
29
|
+
last_message,
|
|
30
|
+
first_message,
|
|
31
|
+
conversation_history,
|
|
32
|
+
};
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# GenerationsListResponse
|
|
2
|
+
|
|
3
|
+
Response model for generations list.
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type | Description | Notes
|
|
8
|
+
------------ | ------------- | ------------- | -------------
|
|
9
|
+
**projects** | **Array<object>** | List of recent projects with their conversation history | [default to undefined]
|
|
10
|
+
|
|
11
|
+
## Example
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import { GenerationsListResponse } from '@crestal/nation-sdk';
|
|
15
|
+
|
|
16
|
+
const instance: GenerationsListResponse = {
|
|
17
|
+
projects,
|
|
18
|
+
};
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|