@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/dist/api.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  * Nation IntentKit API
3
3
  * API for Nation IntentKit services
4
4
  *
5
- * The version of the OpenAPI document: 0.8.37
5
+ * The version of the OpenAPI document: 0.8.39
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -55,6 +55,10 @@ export interface Agent {
55
55
  'telegram_config'?: {
56
56
  [key: string]: any;
57
57
  } | null;
58
+ 'discord_entrypoint_enabled'?: boolean | null;
59
+ 'discord_config'?: {
60
+ [key: string]: any;
61
+ } | null;
58
62
  'xmtp_entrypoint_prompt'?: string | null;
59
63
  'upstream_id'?: string | null;
60
64
  'upstream_extra'?: {
@@ -177,68 +181,6 @@ export interface AgentAutonomous {
177
181
  'prompt': string;
178
182
  'enabled'?: boolean | null;
179
183
  }
180
- /**
181
- * Agent create model.
182
- */
183
- export interface AgentCreate {
184
- 'name': string | null;
185
- 'picture'?: string | null;
186
- 'purpose'?: string | null;
187
- 'personality'?: string | null;
188
- 'principles'?: string | null;
189
- /**
190
- * LLM of the agent
191
- */
192
- 'model'?: string;
193
- 'prompt'?: string | null;
194
- 'prompt_append'?: string | null;
195
- 'temperature'?: number | null;
196
- 'frequency_penalty'?: number | null;
197
- 'presence_penalty'?: number | null;
198
- 'wallet_provider'?: AgentCreateWalletProviderEnum | null;
199
- 'readonly_wallet_address'?: string | null;
200
- 'network_id'?: AgentCreateNetworkIdEnum | null;
201
- 'skills'?: {
202
- [key: string]: any;
203
- } | null;
204
- 'short_term_memory_strategy'?: AgentCreateShortTermMemoryStrategyEnum | null;
205
- 'autonomous'?: Array<AgentAutonomous> | null;
206
- 'telegram_entrypoint_enabled'?: boolean | null;
207
- 'telegram_entrypoint_prompt'?: string | null;
208
- 'telegram_config'?: {
209
- [key: string]: any;
210
- } | null;
211
- 'xmtp_entrypoint_prompt'?: string | null;
212
- 'upstream_id'?: string | null;
213
- 'upstream_extra'?: {
214
- [key: string]: any;
215
- } | null;
216
- /**
217
- * Unique identifier for the agent. Must be URL-safe, containing only lowercase letters, numbers, and hyphens
218
- */
219
- 'id'?: string;
220
- 'owner'?: string | null;
221
- }
222
- export declare const AgentCreateWalletProviderEnum: {
223
- readonly Cdp: "cdp";
224
- readonly Readonly: "readonly";
225
- readonly None: "none";
226
- };
227
- export type AgentCreateWalletProviderEnum = typeof AgentCreateWalletProviderEnum[keyof typeof AgentCreateWalletProviderEnum];
228
- export declare const AgentCreateNetworkIdEnum: {
229
- readonly BaseMainnet: "base-mainnet";
230
- readonly EthereumMainnet: "ethereum-mainnet";
231
- readonly PolygonMainnet: "polygon-mainnet";
232
- readonly ArbitrumMainnet: "arbitrum-mainnet";
233
- readonly OptimismMainnet: "optimism-mainnet";
234
- readonly Solana: "solana";
235
- };
236
- export type AgentCreateNetworkIdEnum = typeof AgentCreateNetworkIdEnum[keyof typeof AgentCreateNetworkIdEnum];
237
- export declare const AgentCreateShortTermMemoryStrategyEnum: {
238
- readonly Trim: "trim";
239
- readonly Summarize: "summarize";
240
- };
241
- export type AgentCreateShortTermMemoryStrategyEnum = typeof AgentCreateShortTermMemoryStrategyEnum[keyof typeof AgentCreateShortTermMemoryStrategyEnum];
242
184
  /**
243
185
  * Request model for agent deployment.
244
186
  */
@@ -284,6 +226,10 @@ export interface AgentDraft {
284
226
  'telegram_config'?: {
285
227
  [key: string]: any;
286
228
  } | null;
229
+ 'discord_entrypoint_enabled'?: boolean | null;
230
+ 'discord_config'?: {
231
+ [key: string]: any;
232
+ } | null;
287
233
  'xmtp_entrypoint_prompt'?: string | null;
288
234
  /**
289
235
  * Unique identifier for the draft
@@ -344,47 +290,6 @@ export interface AgentExample {
344
290
  */
345
291
  'prompt': string;
346
292
  }
347
- /**
348
- * Request model for agent generation.
349
- */
350
- export interface AgentGenerateRequest {
351
- /**
352
- * Natural language description of the agent\'s desired capabilities
353
- */
354
- 'prompt': string;
355
- 'existing_agent'?: AgentCreate | null;
356
- 'project_id'?: string | null;
357
- 'deploy'?: boolean | null;
358
- }
359
- /**
360
- * Response model for agent generation.
361
- */
362
- export interface AgentGenerateResponse {
363
- /**
364
- * The generated agent schema
365
- */
366
- 'agent': {
367
- [key: string]: any;
368
- };
369
- /**
370
- * Project ID for this conversation session
371
- */
372
- 'project_id': string;
373
- /**
374
- * Human-readable summary of the generated agent
375
- */
376
- 'summary': string;
377
- /**
378
- * Generated tags for the agent as ID objects: [{\'id\': 1}, {\'id\': 2}]
379
- */
380
- 'tags'?: Array<{
381
- [key: string]: number;
382
- }>;
383
- 'autonomous_tasks'?: Array<{
384
- [key: string]: any;
385
- }> | null;
386
- 'activated_skills'?: Array<string> | null;
387
- }
388
293
  /**
389
294
  * Response model for agent linked account information.
390
295
  */
@@ -473,6 +378,7 @@ export interface AgentResponse {
473
378
  'short_term_memory_strategy'?: AgentResponseShortTermMemoryStrategyEnum | null;
474
379
  'autonomous'?: Array<AgentAutonomous> | null;
475
380
  'telegram_entrypoint_enabled'?: boolean | null;
381
+ 'discord_entrypoint_enabled'?: boolean | null;
476
382
  'upstream_id'?: string | null;
477
383
  'upstream_extra'?: {
478
384
  [key: string]: any;
@@ -670,6 +576,10 @@ export interface AgentUpdate {
670
576
  'telegram_config'?: {
671
577
  [key: string]: any;
672
578
  } | null;
579
+ 'discord_entrypoint_enabled'?: boolean | null;
580
+ 'discord_config'?: {
581
+ [key: string]: any;
582
+ } | null;
673
583
  'xmtp_entrypoint_prompt'?: string | null;
674
584
  'upstream_id'?: string | null;
675
585
  'upstream_extra'?: {
@@ -727,6 +637,10 @@ export interface AgentUserInput {
727
637
  'telegram_config'?: {
728
638
  [key: string]: any;
729
639
  } | null;
640
+ 'discord_entrypoint_enabled'?: boolean | null;
641
+ 'discord_config'?: {
642
+ [key: string]: any;
643
+ } | null;
730
644
  'xmtp_entrypoint_prompt'?: string | null;
731
645
  }
732
646
  export declare const AgentUserInputWalletProviderEnum: {
@@ -779,6 +693,7 @@ export declare const AuthorType: {
779
693
  readonly Skill: "skill";
780
694
  readonly Telegram: "telegram";
781
695
  readonly Twitter: "twitter";
696
+ readonly Discord: "discord";
782
697
  readonly Web: "web";
783
698
  readonly System: "system";
784
699
  readonly Api: "api";
@@ -1322,45 +1237,6 @@ export interface FileUploadResponse {
1322
1237
  */
1323
1238
  'file_id': string;
1324
1239
  }
1325
- /**
1326
- * Response model for single generation detail.
1327
- */
1328
- export interface GenerationDetailResponse {
1329
- /**
1330
- * Project ID
1331
- */
1332
- 'project_id': string;
1333
- 'user_id'?: string | null;
1334
- 'created_at'?: string | null;
1335
- 'last_activity'?: string | null;
1336
- /**
1337
- * Number of messages in conversation
1338
- */
1339
- 'message_count': number;
1340
- 'last_message'?: {
1341
- [key: string]: any;
1342
- } | null;
1343
- 'first_message'?: {
1344
- [key: string]: any;
1345
- } | null;
1346
- /**
1347
- * Full conversation history
1348
- */
1349
- 'conversation_history': Array<{
1350
- [key: string]: any;
1351
- }>;
1352
- }
1353
- /**
1354
- * Response model for generations list.
1355
- */
1356
- export interface GenerationsListResponse {
1357
- /**
1358
- * List of recent projects with their conversation history
1359
- */
1360
- 'projects': Array<{
1361
- [key: string]: any;
1362
- }>;
1363
- }
1364
1240
  export interface HTTPValidationError {
1365
1241
  'detail'?: Array<ValidationError>;
1366
1242
  }
@@ -3281,122 +3157,6 @@ export declare class DraftApi extends BaseAPI {
3281
3157
  */
3282
3158
  updateAgentDraft(agentId: string, agentUserInput: AgentUserInput, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AgentDraft, any, {}>>;
3283
3159
  }
3284
- /**
3285
- * GeneratorApi - axios parameter creator
3286
- */
3287
- export declare const GeneratorApiAxiosParamCreator: (configuration?: Configuration) => {
3288
- /**
3289
- * 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
3290
- * @summary Generate Agent from Natural Language Prompt
3291
- * @param {AgentGenerateRequest} agentGenerateRequest
3292
- * @param {*} [options] Override http request option.
3293
- * @throws {RequiredError}
3294
- */
3295
- generateAgent: (agentGenerateRequest: AgentGenerateRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
3296
- /**
3297
- * 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
3298
- * @summary Get Generation Detail by Project ID
3299
- * @param {string} projectId
3300
- * @param {*} [options] Override http request option.
3301
- * @throws {RequiredError}
3302
- */
3303
- getGenerationHistory: (projectId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
3304
- /**
3305
- * 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
3306
- * @summary Get Generations List by User
3307
- * @param {number} [limit]
3308
- * @param {*} [options] Override http request option.
3309
- * @throws {RequiredError}
3310
- */
3311
- getGenerations: (limit?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
3312
- };
3313
- /**
3314
- * GeneratorApi - functional programming interface
3315
- */
3316
- export declare const GeneratorApiFp: (configuration?: Configuration) => {
3317
- /**
3318
- * 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
3319
- * @summary Generate Agent from Natural Language Prompt
3320
- * @param {AgentGenerateRequest} agentGenerateRequest
3321
- * @param {*} [options] Override http request option.
3322
- * @throws {RequiredError}
3323
- */
3324
- generateAgent(agentGenerateRequest: AgentGenerateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AgentGenerateResponse>>;
3325
- /**
3326
- * 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
3327
- * @summary Get Generation Detail by Project ID
3328
- * @param {string} projectId
3329
- * @param {*} [options] Override http request option.
3330
- * @throws {RequiredError}
3331
- */
3332
- getGenerationHistory(projectId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GenerationDetailResponse>>;
3333
- /**
3334
- * 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
3335
- * @summary Get Generations List by User
3336
- * @param {number} [limit]
3337
- * @param {*} [options] Override http request option.
3338
- * @throws {RequiredError}
3339
- */
3340
- getGenerations(limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GenerationsListResponse>>;
3341
- };
3342
- /**
3343
- * GeneratorApi - factory interface
3344
- */
3345
- export declare const GeneratorApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
3346
- /**
3347
- * 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
3348
- * @summary Generate Agent from Natural Language Prompt
3349
- * @param {AgentGenerateRequest} agentGenerateRequest
3350
- * @param {*} [options] Override http request option.
3351
- * @throws {RequiredError}
3352
- */
3353
- generateAgent(agentGenerateRequest: AgentGenerateRequest, options?: RawAxiosRequestConfig): AxiosPromise<AgentGenerateResponse>;
3354
- /**
3355
- * 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
3356
- * @summary Get Generation Detail by Project ID
3357
- * @param {string} projectId
3358
- * @param {*} [options] Override http request option.
3359
- * @throws {RequiredError}
3360
- */
3361
- getGenerationHistory(projectId: string, options?: RawAxiosRequestConfig): AxiosPromise<GenerationDetailResponse>;
3362
- /**
3363
- * 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
3364
- * @summary Get Generations List by User
3365
- * @param {number} [limit]
3366
- * @param {*} [options] Override http request option.
3367
- * @throws {RequiredError}
3368
- */
3369
- getGenerations(limit?: number, options?: RawAxiosRequestConfig): AxiosPromise<GenerationsListResponse>;
3370
- };
3371
- /**
3372
- * GeneratorApi - object-oriented interface
3373
- */
3374
- export declare class GeneratorApi extends BaseAPI {
3375
- /**
3376
- * 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
3377
- * @summary Generate Agent from Natural Language Prompt
3378
- * @param {AgentGenerateRequest} agentGenerateRequest
3379
- * @param {*} [options] Override http request option.
3380
- * @throws {RequiredError}
3381
- */
3382
- generateAgent(agentGenerateRequest: AgentGenerateRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AgentGenerateResponse, any, {}>>;
3383
- /**
3384
- * 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
3385
- * @summary Get Generation Detail by Project ID
3386
- * @param {string} projectId
3387
- * @param {*} [options] Override http request option.
3388
- * @throws {RequiredError}
3389
- */
3390
- getGenerationHistory(projectId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GenerationDetailResponse, any, {}>>;
3391
- /**
3392
- * 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
3393
- * @summary Get Generations List by User
3394
- * @param {number} [limit]
3395
- * @param {*} [options] Override http request option.
3396
- * @throws {RequiredError}
3397
- */
3398
- getGenerations(limit?: number, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GenerationsListResponse, any, {}>>;
3399
- }
3400
3160
  /**
3401
3161
  * HealthApi - axios parameter creator
3402
3162
  */