@crestal/nation-sdk 0.8.37 → 0.8.39
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 +0 -6
- package/README.md +2 -10
- package/api.ts +11 -380
- package/base.ts +1 -1
- package/common.ts +1 -1
- package/configuration.ts +1 -1
- package/dist/api.d.ts +19 -259
- package/dist/api.js +4 -332
- 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/Agent.md +4 -0
- package/docs/AgentDraft.md +4 -0
- package/docs/AgentResponse.md +2 -0
- package/docs/AgentUpdate.md +4 -0
- package/docs/AgentUserInput.md +4 -0
- package/docs/AuthorType.md +2 -0
- package/docs/LLMModelInfoWithProviderName.md +2 -2
- package/index.ts +1 -1
- package/package.json +1 -1
- package/docs/AgentCreate.md +0 -69
- package/docs/AgentGenerateRequest.md +0 -27
- package/docs/AgentGenerateResponse.md +0 -31
- package/docs/GenerationDetailResponse.md +0 -35
- package/docs/GenerationsListResponse.md +0 -21
- package/docs/GeneratorApi.md +0 -167
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.8.
|
|
8
|
+
* The version of the OpenAPI document: 0.8.39
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -84,8 +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.
|
|
88
|
-
exports.UserApi = exports.UserApiFactory = exports.UserApiFp = exports.UserApiAxiosParamCreator = exports.OAuthApi = exports.OAuthApiFactory = exports.OAuthApiFp = exports.OAuthApiAxiosParamCreator = exports.MetadataApi = exports.MetadataApiFactory = exports.MetadataApiFp = exports.MetadataApiAxiosParamCreator = exports.ManagerApi = exports.ManagerApiFactory =
|
|
87
|
+
exports.ManagerApiFp = exports.ManagerApiAxiosParamCreator = exports.HealthApi = exports.HealthApiFactory = exports.HealthApiFp = exports.HealthApiAxiosParamCreator = exports.DraftApi = exports.DraftApiFactory = exports.DraftApiFp = exports.DraftApiAxiosParamCreator = 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.SystemMessageType = exports.OwnerType = exports.LLMProvider = exports.EventType = exports.Direction = exports.CreditType = exports.CreditDebit = exports.ChatMessageAttachmentType = exports.AuthorType = exports.AgentUserInputShortTermMemoryStrategyEnum = exports.AgentUserInputNetworkIdEnum = exports.AgentUserInputWalletProviderEnum = exports.AgentUpdateShortTermMemoryStrategyEnum = exports.AgentUpdateNetworkIdEnum = exports.AgentUpdateWalletProviderEnum = exports.AgentState = exports.AgentSortOption = exports.AgentResponseShortTermMemoryStrategyEnum = exports.AgentResponseNetworkIdEnum = exports.AgentResponseWalletProviderEnum = exports.AgentDraftShortTermMemoryStrategyEnum = exports.AgentDraftNetworkIdEnum = exports.AgentDraftWalletProviderEnum = exports.AgentShortTermMemoryStrategyEnum = exports.AgentNetworkIdEnum = exports.AgentWalletProviderEnum = void 0;
|
|
88
|
+
exports.UserApi = exports.UserApiFactory = exports.UserApiFp = exports.UserApiAxiosParamCreator = exports.OAuthApi = exports.OAuthApiFactory = exports.OAuthApiFp = exports.OAuthApiAxiosParamCreator = exports.MetadataApi = exports.MetadataApiFactory = exports.MetadataApiFp = exports.MetadataApiAxiosParamCreator = exports.ManagerApi = exports.ManagerApiFactory = void 0;
|
|
89
89
|
var axios_1 = require("axios");
|
|
90
90
|
// Some imports not used depending on template conditions
|
|
91
91
|
// @ts-ignore
|
|
@@ -109,23 +109,6 @@ exports.AgentShortTermMemoryStrategyEnum = {
|
|
|
109
109
|
Trim: 'trim',
|
|
110
110
|
Summarize: 'summarize'
|
|
111
111
|
};
|
|
112
|
-
exports.AgentCreateWalletProviderEnum = {
|
|
113
|
-
Cdp: 'cdp',
|
|
114
|
-
Readonly: 'readonly',
|
|
115
|
-
None: 'none'
|
|
116
|
-
};
|
|
117
|
-
exports.AgentCreateNetworkIdEnum = {
|
|
118
|
-
BaseMainnet: 'base-mainnet',
|
|
119
|
-
EthereumMainnet: 'ethereum-mainnet',
|
|
120
|
-
PolygonMainnet: 'polygon-mainnet',
|
|
121
|
-
ArbitrumMainnet: 'arbitrum-mainnet',
|
|
122
|
-
OptimismMainnet: 'optimism-mainnet',
|
|
123
|
-
Solana: 'solana'
|
|
124
|
-
};
|
|
125
|
-
exports.AgentCreateShortTermMemoryStrategyEnum = {
|
|
126
|
-
Trim: 'trim',
|
|
127
|
-
Summarize: 'summarize'
|
|
128
|
-
};
|
|
129
112
|
exports.AgentDraftWalletProviderEnum = {
|
|
130
113
|
Cdp: 'cdp',
|
|
131
114
|
Readonly: 'readonly',
|
|
@@ -223,6 +206,7 @@ exports.AuthorType = {
|
|
|
223
206
|
Skill: 'skill',
|
|
224
207
|
Telegram: 'telegram',
|
|
225
208
|
Twitter: 'twitter',
|
|
209
|
+
Discord: 'discord',
|
|
226
210
|
Web: 'web',
|
|
227
211
|
System: 'system',
|
|
228
212
|
Api: 'api',
|
|
@@ -4738,318 +4722,6 @@ var DraftApi = /** @class */ (function (_super) {
|
|
|
4738
4722
|
return DraftApi;
|
|
4739
4723
|
}(base_1.BaseAPI));
|
|
4740
4724
|
exports.DraftApi = DraftApi;
|
|
4741
|
-
/**
|
|
4742
|
-
* GeneratorApi - axios parameter creator
|
|
4743
|
-
*/
|
|
4744
|
-
var GeneratorApiAxiosParamCreator = function (configuration) {
|
|
4745
|
-
var _this = this;
|
|
4746
|
-
return {
|
|
4747
|
-
/**
|
|
4748
|
-
* 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
|
|
4749
|
-
* @summary Generate Agent from Natural Language Prompt
|
|
4750
|
-
* @param {AgentGenerateRequest} agentGenerateRequest
|
|
4751
|
-
* @param {*} [options] Override http request option.
|
|
4752
|
-
* @throws {RequiredError}
|
|
4753
|
-
*/
|
|
4754
|
-
generateAgent: function (agentGenerateRequest_1) {
|
|
4755
|
-
var args_1 = [];
|
|
4756
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
4757
|
-
args_1[_i - 1] = arguments[_i];
|
|
4758
|
-
}
|
|
4759
|
-
return __awaiter(_this, __spreadArray([agentGenerateRequest_1], args_1, true), void 0, function (agentGenerateRequest, options) {
|
|
4760
|
-
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
4761
|
-
if (options === void 0) { options = {}; }
|
|
4762
|
-
return __generator(this, function (_a) {
|
|
4763
|
-
switch (_a.label) {
|
|
4764
|
-
case 0:
|
|
4765
|
-
// verify required parameter 'agentGenerateRequest' is not null or undefined
|
|
4766
|
-
(0, common_1.assertParamExists)('generateAgent', 'agentGenerateRequest', agentGenerateRequest);
|
|
4767
|
-
localVarPath = "/generator/agent/generate";
|
|
4768
|
-
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
4769
|
-
if (configuration) {
|
|
4770
|
-
baseOptions = configuration.baseOptions;
|
|
4771
|
-
}
|
|
4772
|
-
localVarRequestOptions = __assign(__assign({ method: 'POST' }, baseOptions), options);
|
|
4773
|
-
localVarHeaderParameter = {};
|
|
4774
|
-
localVarQueryParameter = {};
|
|
4775
|
-
// authentication HTTPBearer required
|
|
4776
|
-
// http bearer authentication required
|
|
4777
|
-
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
4778
|
-
case 1:
|
|
4779
|
-
// authentication HTTPBearer required
|
|
4780
|
-
// http bearer authentication required
|
|
4781
|
-
_a.sent();
|
|
4782
|
-
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
4783
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
4784
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4785
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4786
|
-
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(agentGenerateRequest, localVarRequestOptions, configuration);
|
|
4787
|
-
return [2 /*return*/, {
|
|
4788
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
4789
|
-
options: localVarRequestOptions,
|
|
4790
|
-
}];
|
|
4791
|
-
}
|
|
4792
|
-
});
|
|
4793
|
-
});
|
|
4794
|
-
},
|
|
4795
|
-
/**
|
|
4796
|
-
* 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
|
|
4797
|
-
* @summary Get Generation Detail by Project ID
|
|
4798
|
-
* @param {string} projectId
|
|
4799
|
-
* @param {*} [options] Override http request option.
|
|
4800
|
-
* @throws {RequiredError}
|
|
4801
|
-
*/
|
|
4802
|
-
getGenerationHistory: function (projectId_1) {
|
|
4803
|
-
var args_1 = [];
|
|
4804
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
4805
|
-
args_1[_i - 1] = arguments[_i];
|
|
4806
|
-
}
|
|
4807
|
-
return __awaiter(_this, __spreadArray([projectId_1], args_1, true), void 0, function (projectId, options) {
|
|
4808
|
-
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
4809
|
-
if (options === void 0) { options = {}; }
|
|
4810
|
-
return __generator(this, function (_a) {
|
|
4811
|
-
switch (_a.label) {
|
|
4812
|
-
case 0:
|
|
4813
|
-
// verify required parameter 'projectId' is not null or undefined
|
|
4814
|
-
(0, common_1.assertParamExists)('getGenerationHistory', 'projectId', projectId);
|
|
4815
|
-
localVarPath = "/generator/agent/generations/{project_id}"
|
|
4816
|
-
.replace("{".concat("project_id", "}"), encodeURIComponent(String(projectId)));
|
|
4817
|
-
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
4818
|
-
if (configuration) {
|
|
4819
|
-
baseOptions = configuration.baseOptions;
|
|
4820
|
-
}
|
|
4821
|
-
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
4822
|
-
localVarHeaderParameter = {};
|
|
4823
|
-
localVarQueryParameter = {};
|
|
4824
|
-
// authentication HTTPBearer required
|
|
4825
|
-
// http bearer authentication required
|
|
4826
|
-
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
4827
|
-
case 1:
|
|
4828
|
-
// authentication HTTPBearer required
|
|
4829
|
-
// http bearer authentication required
|
|
4830
|
-
_a.sent();
|
|
4831
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
4832
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4833
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4834
|
-
return [2 /*return*/, {
|
|
4835
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
4836
|
-
options: localVarRequestOptions,
|
|
4837
|
-
}];
|
|
4838
|
-
}
|
|
4839
|
-
});
|
|
4840
|
-
});
|
|
4841
|
-
},
|
|
4842
|
-
/**
|
|
4843
|
-
* 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
|
|
4844
|
-
* @summary Get Generations List by User
|
|
4845
|
-
* @param {number} [limit]
|
|
4846
|
-
* @param {*} [options] Override http request option.
|
|
4847
|
-
* @throws {RequiredError}
|
|
4848
|
-
*/
|
|
4849
|
-
getGenerations: function (limit_1) {
|
|
4850
|
-
var args_1 = [];
|
|
4851
|
-
for (var _i = 1; _i < arguments.length; _i++) {
|
|
4852
|
-
args_1[_i - 1] = arguments[_i];
|
|
4853
|
-
}
|
|
4854
|
-
return __awaiter(_this, __spreadArray([limit_1], args_1, true), void 0, function (limit, options) {
|
|
4855
|
-
var localVarPath, localVarUrlObj, baseOptions, localVarRequestOptions, localVarHeaderParameter, localVarQueryParameter, headersFromBaseOptions;
|
|
4856
|
-
if (options === void 0) { options = {}; }
|
|
4857
|
-
return __generator(this, function (_a) {
|
|
4858
|
-
switch (_a.label) {
|
|
4859
|
-
case 0:
|
|
4860
|
-
localVarPath = "/generator/agent/generations";
|
|
4861
|
-
localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
4862
|
-
if (configuration) {
|
|
4863
|
-
baseOptions = configuration.baseOptions;
|
|
4864
|
-
}
|
|
4865
|
-
localVarRequestOptions = __assign(__assign({ method: 'GET' }, baseOptions), options);
|
|
4866
|
-
localVarHeaderParameter = {};
|
|
4867
|
-
localVarQueryParameter = {};
|
|
4868
|
-
// authentication HTTPBearer required
|
|
4869
|
-
// http bearer authentication required
|
|
4870
|
-
return [4 /*yield*/, (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration)];
|
|
4871
|
-
case 1:
|
|
4872
|
-
// authentication HTTPBearer required
|
|
4873
|
-
// http bearer authentication required
|
|
4874
|
-
_a.sent();
|
|
4875
|
-
if (limit !== undefined) {
|
|
4876
|
-
localVarQueryParameter['limit'] = limit;
|
|
4877
|
-
}
|
|
4878
|
-
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
4879
|
-
headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
4880
|
-
localVarRequestOptions.headers = __assign(__assign(__assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
|
|
4881
|
-
return [2 /*return*/, {
|
|
4882
|
-
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
4883
|
-
options: localVarRequestOptions,
|
|
4884
|
-
}];
|
|
4885
|
-
}
|
|
4886
|
-
});
|
|
4887
|
-
});
|
|
4888
|
-
},
|
|
4889
|
-
};
|
|
4890
|
-
};
|
|
4891
|
-
exports.GeneratorApiAxiosParamCreator = GeneratorApiAxiosParamCreator;
|
|
4892
|
-
/**
|
|
4893
|
-
* GeneratorApi - functional programming interface
|
|
4894
|
-
*/
|
|
4895
|
-
var GeneratorApiFp = function (configuration) {
|
|
4896
|
-
var localVarAxiosParamCreator = (0, exports.GeneratorApiAxiosParamCreator)(configuration);
|
|
4897
|
-
return {
|
|
4898
|
-
/**
|
|
4899
|
-
* 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
|
|
4900
|
-
* @summary Generate Agent from Natural Language Prompt
|
|
4901
|
-
* @param {AgentGenerateRequest} agentGenerateRequest
|
|
4902
|
-
* @param {*} [options] Override http request option.
|
|
4903
|
-
* @throws {RequiredError}
|
|
4904
|
-
*/
|
|
4905
|
-
generateAgent: function (agentGenerateRequest, options) {
|
|
4906
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
4907
|
-
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
4908
|
-
var _a, _b, _c;
|
|
4909
|
-
return __generator(this, function (_d) {
|
|
4910
|
-
switch (_d.label) {
|
|
4911
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.generateAgent(agentGenerateRequest, options)];
|
|
4912
|
-
case 1:
|
|
4913
|
-
localVarAxiosArgs = _d.sent();
|
|
4914
|
-
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
4915
|
-
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['GeneratorApi.generateAgent']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
4916
|
-
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
4917
|
-
}
|
|
4918
|
-
});
|
|
4919
|
-
});
|
|
4920
|
-
},
|
|
4921
|
-
/**
|
|
4922
|
-
* 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
|
|
4923
|
-
* @summary Get Generation Detail by Project ID
|
|
4924
|
-
* @param {string} projectId
|
|
4925
|
-
* @param {*} [options] Override http request option.
|
|
4926
|
-
* @throws {RequiredError}
|
|
4927
|
-
*/
|
|
4928
|
-
getGenerationHistory: function (projectId, options) {
|
|
4929
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
4930
|
-
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
4931
|
-
var _a, _b, _c;
|
|
4932
|
-
return __generator(this, function (_d) {
|
|
4933
|
-
switch (_d.label) {
|
|
4934
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getGenerationHistory(projectId, options)];
|
|
4935
|
-
case 1:
|
|
4936
|
-
localVarAxiosArgs = _d.sent();
|
|
4937
|
-
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
4938
|
-
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['GeneratorApi.getGenerationHistory']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
4939
|
-
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
4940
|
-
}
|
|
4941
|
-
});
|
|
4942
|
-
});
|
|
4943
|
-
},
|
|
4944
|
-
/**
|
|
4945
|
-
* 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
|
|
4946
|
-
* @summary Get Generations List by User
|
|
4947
|
-
* @param {number} [limit]
|
|
4948
|
-
* @param {*} [options] Override http request option.
|
|
4949
|
-
* @throws {RequiredError}
|
|
4950
|
-
*/
|
|
4951
|
-
getGenerations: function (limit, options) {
|
|
4952
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
4953
|
-
var localVarAxiosArgs, localVarOperationServerIndex, localVarOperationServerBasePath;
|
|
4954
|
-
var _a, _b, _c;
|
|
4955
|
-
return __generator(this, function (_d) {
|
|
4956
|
-
switch (_d.label) {
|
|
4957
|
-
case 0: return [4 /*yield*/, localVarAxiosParamCreator.getGenerations(limit, options)];
|
|
4958
|
-
case 1:
|
|
4959
|
-
localVarAxiosArgs = _d.sent();
|
|
4960
|
-
localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
|
|
4961
|
-
localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['GeneratorApi.getGenerations']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
|
|
4962
|
-
return [2 /*return*/, function (axios, basePath) { return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath); }];
|
|
4963
|
-
}
|
|
4964
|
-
});
|
|
4965
|
-
});
|
|
4966
|
-
},
|
|
4967
|
-
};
|
|
4968
|
-
};
|
|
4969
|
-
exports.GeneratorApiFp = GeneratorApiFp;
|
|
4970
|
-
/**
|
|
4971
|
-
* GeneratorApi - factory interface
|
|
4972
|
-
*/
|
|
4973
|
-
var GeneratorApiFactory = function (configuration, basePath, axios) {
|
|
4974
|
-
var localVarFp = (0, exports.GeneratorApiFp)(configuration);
|
|
4975
|
-
return {
|
|
4976
|
-
/**
|
|
4977
|
-
* 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
|
|
4978
|
-
* @summary Generate Agent from Natural Language Prompt
|
|
4979
|
-
* @param {AgentGenerateRequest} agentGenerateRequest
|
|
4980
|
-
* @param {*} [options] Override http request option.
|
|
4981
|
-
* @throws {RequiredError}
|
|
4982
|
-
*/
|
|
4983
|
-
generateAgent: function (agentGenerateRequest, options) {
|
|
4984
|
-
return localVarFp.generateAgent(agentGenerateRequest, options).then(function (request) { return request(axios, basePath); });
|
|
4985
|
-
},
|
|
4986
|
-
/**
|
|
4987
|
-
* 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
|
|
4988
|
-
* @summary Get Generation Detail by Project ID
|
|
4989
|
-
* @param {string} projectId
|
|
4990
|
-
* @param {*} [options] Override http request option.
|
|
4991
|
-
* @throws {RequiredError}
|
|
4992
|
-
*/
|
|
4993
|
-
getGenerationHistory: function (projectId, options) {
|
|
4994
|
-
return localVarFp.getGenerationHistory(projectId, options).then(function (request) { return request(axios, basePath); });
|
|
4995
|
-
},
|
|
4996
|
-
/**
|
|
4997
|
-
* 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
|
|
4998
|
-
* @summary Get Generations List by User
|
|
4999
|
-
* @param {number} [limit]
|
|
5000
|
-
* @param {*} [options] Override http request option.
|
|
5001
|
-
* @throws {RequiredError}
|
|
5002
|
-
*/
|
|
5003
|
-
getGenerations: function (limit, options) {
|
|
5004
|
-
return localVarFp.getGenerations(limit, options).then(function (request) { return request(axios, basePath); });
|
|
5005
|
-
},
|
|
5006
|
-
};
|
|
5007
|
-
};
|
|
5008
|
-
exports.GeneratorApiFactory = GeneratorApiFactory;
|
|
5009
|
-
/**
|
|
5010
|
-
* GeneratorApi - object-oriented interface
|
|
5011
|
-
*/
|
|
5012
|
-
var GeneratorApi = /** @class */ (function (_super) {
|
|
5013
|
-
__extends(GeneratorApi, _super);
|
|
5014
|
-
function GeneratorApi() {
|
|
5015
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
5016
|
-
}
|
|
5017
|
-
/**
|
|
5018
|
-
* 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
|
|
5019
|
-
* @summary Generate Agent from Natural Language Prompt
|
|
5020
|
-
* @param {AgentGenerateRequest} agentGenerateRequest
|
|
5021
|
-
* @param {*} [options] Override http request option.
|
|
5022
|
-
* @throws {RequiredError}
|
|
5023
|
-
*/
|
|
5024
|
-
GeneratorApi.prototype.generateAgent = function (agentGenerateRequest, options) {
|
|
5025
|
-
var _this = this;
|
|
5026
|
-
return (0, exports.GeneratorApiFp)(this.configuration).generateAgent(agentGenerateRequest, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
5027
|
-
};
|
|
5028
|
-
/**
|
|
5029
|
-
* 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
|
|
5030
|
-
* @summary Get Generation Detail by Project ID
|
|
5031
|
-
* @param {string} projectId
|
|
5032
|
-
* @param {*} [options] Override http request option.
|
|
5033
|
-
* @throws {RequiredError}
|
|
5034
|
-
*/
|
|
5035
|
-
GeneratorApi.prototype.getGenerationHistory = function (projectId, options) {
|
|
5036
|
-
var _this = this;
|
|
5037
|
-
return (0, exports.GeneratorApiFp)(this.configuration).getGenerationHistory(projectId, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
5038
|
-
};
|
|
5039
|
-
/**
|
|
5040
|
-
* 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
|
|
5041
|
-
* @summary Get Generations List by User
|
|
5042
|
-
* @param {number} [limit]
|
|
5043
|
-
* @param {*} [options] Override http request option.
|
|
5044
|
-
* @throws {RequiredError}
|
|
5045
|
-
*/
|
|
5046
|
-
GeneratorApi.prototype.getGenerations = function (limit, options) {
|
|
5047
|
-
var _this = this;
|
|
5048
|
-
return (0, exports.GeneratorApiFp)(this.configuration).getGenerations(limit, options).then(function (request) { return request(_this.axios, _this.basePath); });
|
|
5049
|
-
};
|
|
5050
|
-
return GeneratorApi;
|
|
5051
|
-
}(base_1.BaseAPI));
|
|
5052
|
-
exports.GeneratorApi = GeneratorApi;
|
|
5053
4725
|
/**
|
|
5054
4726
|
* HealthApi - axios parameter creator
|
|
5055
4727
|
*/
|
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.8.
|
|
8
|
+
* The version of the OpenAPI document: 0.8.39
|
|
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.8.
|
|
8
|
+
* The version of the OpenAPI document: 0.8.39
|
|
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
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.8.
|
|
8
|
+
* The version of the OpenAPI document: 0.8.39
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/docs/Agent.md
CHANGED
|
@@ -35,6 +35,8 @@ Name | Type | Description | Notes
|
|
|
35
35
|
**telegram_entrypoint_enabled** | **boolean** | | [optional] [default to undefined]
|
|
36
36
|
**telegram_entrypoint_prompt** | **string** | | [optional] [default to undefined]
|
|
37
37
|
**telegram_config** | **{ [key: string]: any; }** | | [optional] [default to undefined]
|
|
38
|
+
**discord_entrypoint_enabled** | **boolean** | | [optional] [default to undefined]
|
|
39
|
+
**discord_config** | **{ [key: string]: any; }** | | [optional] [default to undefined]
|
|
38
40
|
**xmtp_entrypoint_prompt** | **string** | | [optional] [default to undefined]
|
|
39
41
|
**upstream_id** | **string** | | [optional] [default to undefined]
|
|
40
42
|
**upstream_extra** | **{ [key: string]: any; }** | | [optional] [default to undefined]
|
|
@@ -86,6 +88,8 @@ const instance: Agent = {
|
|
|
86
88
|
telegram_entrypoint_enabled,
|
|
87
89
|
telegram_entrypoint_prompt,
|
|
88
90
|
telegram_config,
|
|
91
|
+
discord_entrypoint_enabled,
|
|
92
|
+
discord_config,
|
|
89
93
|
xmtp_entrypoint_prompt,
|
|
90
94
|
upstream_id,
|
|
91
95
|
upstream_extra,
|
package/docs/AgentDraft.md
CHANGED
|
@@ -26,6 +26,8 @@ Name | Type | Description | Notes
|
|
|
26
26
|
**telegram_entrypoint_enabled** | **boolean** | | [optional] [default to undefined]
|
|
27
27
|
**telegram_entrypoint_prompt** | **string** | | [optional] [default to undefined]
|
|
28
28
|
**telegram_config** | **{ [key: string]: any; }** | | [optional] [default to undefined]
|
|
29
|
+
**discord_entrypoint_enabled** | **boolean** | | [optional] [default to undefined]
|
|
30
|
+
**discord_config** | **{ [key: string]: any; }** | | [optional] [default to undefined]
|
|
29
31
|
**xmtp_entrypoint_prompt** | **string** | | [optional] [default to undefined]
|
|
30
32
|
**id** | **string** | Unique identifier for the draft | [optional] [default to undefined]
|
|
31
33
|
**agent_id** | **string** | Agent id | [optional] [default to undefined]
|
|
@@ -63,6 +65,8 @@ const instance: AgentDraft = {
|
|
|
63
65
|
telegram_entrypoint_enabled,
|
|
64
66
|
telegram_entrypoint_prompt,
|
|
65
67
|
telegram_config,
|
|
68
|
+
discord_entrypoint_enabled,
|
|
69
|
+
discord_config,
|
|
66
70
|
xmtp_entrypoint_prompt,
|
|
67
71
|
id,
|
|
68
72
|
agent_id,
|
package/docs/AgentResponse.md
CHANGED
|
@@ -26,6 +26,7 @@ Name | Type | Description | Notes
|
|
|
26
26
|
**short_term_memory_strategy** | **string** | | [optional] [default to undefined]
|
|
27
27
|
**autonomous** | [**Array<AgentAutonomous>**](AgentAutonomous.md) | | [optional] [default to undefined]
|
|
28
28
|
**telegram_entrypoint_enabled** | **boolean** | | [optional] [default to undefined]
|
|
29
|
+
**discord_entrypoint_enabled** | **boolean** | | [optional] [default to undefined]
|
|
29
30
|
**upstream_id** | **string** | | [optional] [default to undefined]
|
|
30
31
|
**upstream_extra** | **{ [key: string]: any; }** | | [optional] [default to undefined]
|
|
31
32
|
**id** | **string** | Unique identifier for the agent. Must be URL-safe, containing only lowercase letters, numbers, and hyphens | [optional] [default to undefined]
|
|
@@ -79,6 +80,7 @@ const instance: AgentResponse = {
|
|
|
79
80
|
short_term_memory_strategy,
|
|
80
81
|
autonomous,
|
|
81
82
|
telegram_entrypoint_enabled,
|
|
83
|
+
discord_entrypoint_enabled,
|
|
82
84
|
upstream_id,
|
|
83
85
|
upstream_extra,
|
|
84
86
|
id,
|
package/docs/AgentUpdate.md
CHANGED
|
@@ -26,6 +26,8 @@ Name | Type | Description | Notes
|
|
|
26
26
|
**telegram_entrypoint_enabled** | **boolean** | | [optional] [default to undefined]
|
|
27
27
|
**telegram_entrypoint_prompt** | **string** | | [optional] [default to undefined]
|
|
28
28
|
**telegram_config** | **{ [key: string]: any; }** | | [optional] [default to undefined]
|
|
29
|
+
**discord_entrypoint_enabled** | **boolean** | | [optional] [default to undefined]
|
|
30
|
+
**discord_config** | **{ [key: string]: any; }** | | [optional] [default to undefined]
|
|
29
31
|
**xmtp_entrypoint_prompt** | **string** | | [optional] [default to undefined]
|
|
30
32
|
**upstream_id** | **string** | | [optional] [default to undefined]
|
|
31
33
|
**upstream_extra** | **{ [key: string]: any; }** | | [optional] [default to undefined]
|
|
@@ -56,6 +58,8 @@ const instance: AgentUpdate = {
|
|
|
56
58
|
telegram_entrypoint_enabled,
|
|
57
59
|
telegram_entrypoint_prompt,
|
|
58
60
|
telegram_config,
|
|
61
|
+
discord_entrypoint_enabled,
|
|
62
|
+
discord_config,
|
|
59
63
|
xmtp_entrypoint_prompt,
|
|
60
64
|
upstream_id,
|
|
61
65
|
upstream_extra,
|
package/docs/AgentUserInput.md
CHANGED
|
@@ -26,6 +26,8 @@ Name | Type | Description | Notes
|
|
|
26
26
|
**telegram_entrypoint_enabled** | **boolean** | | [optional] [default to undefined]
|
|
27
27
|
**telegram_entrypoint_prompt** | **string** | | [optional] [default to undefined]
|
|
28
28
|
**telegram_config** | **{ [key: string]: any; }** | | [optional] [default to undefined]
|
|
29
|
+
**discord_entrypoint_enabled** | **boolean** | | [optional] [default to undefined]
|
|
30
|
+
**discord_config** | **{ [key: string]: any; }** | | [optional] [default to undefined]
|
|
29
31
|
**xmtp_entrypoint_prompt** | **string** | | [optional] [default to undefined]
|
|
30
32
|
|
|
31
33
|
## Example
|
|
@@ -54,6 +56,8 @@ const instance: AgentUserInput = {
|
|
|
54
56
|
telegram_entrypoint_enabled,
|
|
55
57
|
telegram_entrypoint_prompt,
|
|
56
58
|
telegram_config,
|
|
59
|
+
discord_entrypoint_enabled,
|
|
60
|
+
discord_config,
|
|
57
61
|
xmtp_entrypoint_prompt,
|
|
58
62
|
};
|
|
59
63
|
```
|
package/docs/AuthorType.md
CHANGED
|
@@ -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-
|
|
31
|
-
**updated_at** | **string** | Timestamp when this data was updated | [optional] [default to 2025-
|
|
30
|
+
**created_at** | **string** | Timestamp when this data was created | [optional] [default to 2025-11-02T03:48:41.753+00:00]
|
|
31
|
+
**updated_at** | **string** | Timestamp when this data was updated | [optional] [default to 2025-11-02T03:48:41.753+00:00]
|
|
32
32
|
**provider_name** | **string** | | [default to undefined]
|
|
33
33
|
|
|
34
34
|
## Example
|
package/index.ts
CHANGED