@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/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.1.28
5
+ * The version of the OpenAPI document: 0.1.29
6
6
  *
7
7
  *
8
8
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -369,6 +369,76 @@ export interface AgentExample {
369
369
  */
370
370
  'prompt': string;
371
371
  }
372
+ /**
373
+ * Request model for agent generation.
374
+ * @export
375
+ * @interface AgentGenerateRequest
376
+ */
377
+ export interface AgentGenerateRequest {
378
+ /**
379
+ * Natural language description of the agent\'s desired capabilities
380
+ * @type {string}
381
+ * @memberof AgentGenerateRequest
382
+ */
383
+ 'prompt': string;
384
+ /**
385
+ *
386
+ * @type {AgentUpdate}
387
+ * @memberof AgentGenerateRequest
388
+ */
389
+ 'existing_agent'?: AgentUpdate | null;
390
+ /**
391
+ *
392
+ * @type {string}
393
+ * @memberof AgentGenerateRequest
394
+ */
395
+ 'project_id'?: string | null;
396
+ }
397
+ /**
398
+ * Response model for agent generation.
399
+ * @export
400
+ * @interface AgentGenerateResponse
401
+ */
402
+ export interface AgentGenerateResponse {
403
+ /**
404
+ * The generated agent schema
405
+ * @type {object}
406
+ * @memberof AgentGenerateResponse
407
+ */
408
+ 'agent': object;
409
+ /**
410
+ * Project ID for this conversation session
411
+ * @type {string}
412
+ * @memberof AgentGenerateResponse
413
+ */
414
+ 'project_id': string;
415
+ /**
416
+ * Human-readable summary of the generated agent
417
+ * @type {string}
418
+ * @memberof AgentGenerateResponse
419
+ */
420
+ 'summary': string;
421
+ /**
422
+ * Generated tags for the agent as ID objects: [{\'id\': 1}, {\'id\': 2}]
423
+ * @type {Array<{ [key: string]: number; }>}
424
+ * @memberof AgentGenerateResponse
425
+ */
426
+ 'tags'?: Array<{
427
+ [key: string]: number;
428
+ }>;
429
+ /**
430
+ * List of autonomous tasks generated for the agent
431
+ * @type {Array<object>}
432
+ * @memberof AgentGenerateResponse
433
+ */
434
+ 'autonomous_tasks'?: Array<object>;
435
+ /**
436
+ * List of skills that were activated based on the prompt
437
+ * @type {Array<string>}
438
+ * @memberof AgentGenerateResponse
439
+ */
440
+ 'activated_skills'?: Array<string>;
441
+ }
372
442
  /**
373
443
  * Paginated response model for agents list. Contains a list of agents, a flag indicating if more items are available, and a cursor for pagination.
374
444
  * @export
@@ -2140,6 +2210,74 @@ export type EventType = typeof EventType[keyof typeof EventType];
2140
2210
  */
2141
2211
  export interface FeePercentage {
2142
2212
  }
2213
+ /**
2214
+ * Response model for single generation detail.
2215
+ * @export
2216
+ * @interface GenerationDetailResponse
2217
+ */
2218
+ export interface GenerationDetailResponse {
2219
+ /**
2220
+ * Project ID
2221
+ * @type {string}
2222
+ * @memberof GenerationDetailResponse
2223
+ */
2224
+ 'project_id': string;
2225
+ /**
2226
+ *
2227
+ * @type {string}
2228
+ * @memberof GenerationDetailResponse
2229
+ */
2230
+ 'user_id'?: string | null;
2231
+ /**
2232
+ *
2233
+ * @type {string}
2234
+ * @memberof GenerationDetailResponse
2235
+ */
2236
+ 'created_at'?: string | null;
2237
+ /**
2238
+ *
2239
+ * @type {string}
2240
+ * @memberof GenerationDetailResponse
2241
+ */
2242
+ 'last_activity'?: string | null;
2243
+ /**
2244
+ * Number of messages in conversation
2245
+ * @type {number}
2246
+ * @memberof GenerationDetailResponse
2247
+ */
2248
+ 'message_count': number;
2249
+ /**
2250
+ *
2251
+ * @type {object}
2252
+ * @memberof GenerationDetailResponse
2253
+ */
2254
+ 'last_message'?: object | null;
2255
+ /**
2256
+ *
2257
+ * @type {object}
2258
+ * @memberof GenerationDetailResponse
2259
+ */
2260
+ 'first_message'?: object | null;
2261
+ /**
2262
+ * Full conversation history
2263
+ * @type {Array<object>}
2264
+ * @memberof GenerationDetailResponse
2265
+ */
2266
+ 'conversation_history': Array<object>;
2267
+ }
2268
+ /**
2269
+ * Response model for generations list.
2270
+ * @export
2271
+ * @interface GenerationsListResponse
2272
+ */
2273
+ export interface GenerationsListResponse {
2274
+ /**
2275
+ * List of recent projects with their conversation history
2276
+ * @type {Array<object>}
2277
+ * @memberof GenerationsListResponse
2278
+ */
2279
+ 'projects': Array<object>;
2280
+ }
2143
2281
  /**
2144
2282
  *
2145
2283
  * @export
@@ -3438,6 +3576,131 @@ export declare class CreditApi extends BaseAPI {
3438
3576
  */
3439
3577
  listUserTransactions(txType?: Array<TransactionType> | null, creditDebit?: CreditDebit | null, cursor?: string | null, limit?: number, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<CreditTransactionsResponse, any>>;
3440
3578
  }
3579
+ /**
3580
+ * GeneratorApi - axios parameter creator
3581
+ * @export
3582
+ */
3583
+ export declare const GeneratorApiAxiosParamCreator: (configuration?: Configuration) => {
3584
+ /**
3585
+ * 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
3586
+ * @summary Generate Agent from Natural Language Prompt
3587
+ * @param {AgentGenerateRequest} agentGenerateRequest
3588
+ * @param {*} [options] Override http request option.
3589
+ * @throws {RequiredError}
3590
+ */
3591
+ generateAgentGeneratorAgentGeneratePost: (agentGenerateRequest: AgentGenerateRequest, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
3592
+ /**
3593
+ * 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
3594
+ * @summary Get Generation Detail by Project ID
3595
+ * @param {string} projectId
3596
+ * @param {*} [options] Override http request option.
3597
+ * @throws {RequiredError}
3598
+ */
3599
+ getGenerationDetailGeneratorAgentGenerationsProjectIdGet: (projectId: string, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
3600
+ /**
3601
+ * 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
3602
+ * @summary Get Generations List by User
3603
+ * @param {number} [limit]
3604
+ * @param {*} [options] Override http request option.
3605
+ * @throws {RequiredError}
3606
+ */
3607
+ getGenerationsGeneratorAgentGenerationsGet: (limit?: number, options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
3608
+ };
3609
+ /**
3610
+ * GeneratorApi - functional programming interface
3611
+ * @export
3612
+ */
3613
+ export declare const GeneratorApiFp: (configuration?: Configuration) => {
3614
+ /**
3615
+ * 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
3616
+ * @summary Generate Agent from Natural Language Prompt
3617
+ * @param {AgentGenerateRequest} agentGenerateRequest
3618
+ * @param {*} [options] Override http request option.
3619
+ * @throws {RequiredError}
3620
+ */
3621
+ generateAgentGeneratorAgentGeneratePost(agentGenerateRequest: AgentGenerateRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<AgentGenerateResponse>>;
3622
+ /**
3623
+ * 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
3624
+ * @summary Get Generation Detail by Project ID
3625
+ * @param {string} projectId
3626
+ * @param {*} [options] Override http request option.
3627
+ * @throws {RequiredError}
3628
+ */
3629
+ getGenerationDetailGeneratorAgentGenerationsProjectIdGet(projectId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GenerationDetailResponse>>;
3630
+ /**
3631
+ * 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
3632
+ * @summary Get Generations List by User
3633
+ * @param {number} [limit]
3634
+ * @param {*} [options] Override http request option.
3635
+ * @throws {RequiredError}
3636
+ */
3637
+ getGenerationsGeneratorAgentGenerationsGet(limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<GenerationsListResponse>>;
3638
+ };
3639
+ /**
3640
+ * GeneratorApi - factory interface
3641
+ * @export
3642
+ */
3643
+ export declare const GeneratorApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
3644
+ /**
3645
+ * 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
3646
+ * @summary Generate Agent from Natural Language Prompt
3647
+ * @param {AgentGenerateRequest} agentGenerateRequest
3648
+ * @param {*} [options] Override http request option.
3649
+ * @throws {RequiredError}
3650
+ */
3651
+ generateAgentGeneratorAgentGeneratePost(agentGenerateRequest: AgentGenerateRequest, options?: RawAxiosRequestConfig): AxiosPromise<AgentGenerateResponse>;
3652
+ /**
3653
+ * 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
3654
+ * @summary Get Generation Detail by Project ID
3655
+ * @param {string} projectId
3656
+ * @param {*} [options] Override http request option.
3657
+ * @throws {RequiredError}
3658
+ */
3659
+ getGenerationDetailGeneratorAgentGenerationsProjectIdGet(projectId: string, options?: RawAxiosRequestConfig): AxiosPromise<GenerationDetailResponse>;
3660
+ /**
3661
+ * 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
3662
+ * @summary Get Generations List by User
3663
+ * @param {number} [limit]
3664
+ * @param {*} [options] Override http request option.
3665
+ * @throws {RequiredError}
3666
+ */
3667
+ getGenerationsGeneratorAgentGenerationsGet(limit?: number, options?: RawAxiosRequestConfig): AxiosPromise<GenerationsListResponse>;
3668
+ };
3669
+ /**
3670
+ * GeneratorApi - object-oriented interface
3671
+ * @export
3672
+ * @class GeneratorApi
3673
+ * @extends {BaseAPI}
3674
+ */
3675
+ export declare class GeneratorApi extends BaseAPI {
3676
+ /**
3677
+ * 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
3678
+ * @summary Generate Agent from Natural Language Prompt
3679
+ * @param {AgentGenerateRequest} agentGenerateRequest
3680
+ * @param {*} [options] Override http request option.
3681
+ * @throws {RequiredError}
3682
+ * @memberof GeneratorApi
3683
+ */
3684
+ generateAgentGeneratorAgentGeneratePost(agentGenerateRequest: AgentGenerateRequest, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<AgentGenerateResponse, any>>;
3685
+ /**
3686
+ * 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
3687
+ * @summary Get Generation Detail by Project ID
3688
+ * @param {string} projectId
3689
+ * @param {*} [options] Override http request option.
3690
+ * @throws {RequiredError}
3691
+ * @memberof GeneratorApi
3692
+ */
3693
+ getGenerationDetailGeneratorAgentGenerationsProjectIdGet(projectId: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GenerationDetailResponse, any>>;
3694
+ /**
3695
+ * 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
3696
+ * @summary Get Generations List by User
3697
+ * @param {number} [limit]
3698
+ * @param {*} [options] Override http request option.
3699
+ * @throws {RequiredError}
3700
+ * @memberof GeneratorApi
3701
+ */
3702
+ getGenerationsGeneratorAgentGenerationsGet(limit?: number, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<GenerationsListResponse, any>>;
3703
+ }
3441
3704
  /**
3442
3705
  * HealthApi - axios parameter creator
3443
3706
  * @export