@lobehub/market-sdk 0.22.7 → 0.22.9-beta.0
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/index.d.mts +664 -2
- package/dist/index.mjs +424 -37
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MarketItemBase, PluginConnectionType, InstallFailureAnalysisQuery, InstallFailureAnalysis, RangeQuery, RangeStats, TopPluginsQuery, TopPlugin, PluginManifest, AdminPluginItem, AdminPluginItemDetail, PluginVersion, PluginVersionLocalization, AdminDeploymentOption, InstallationDetails, SystemDependency, IncompleteI18nPlugin, CategoryListQuery, CategoryItem, PluginItemDetail, InstallReportRequest, InstallReportResponse, CallReportRequest, CallReportResponse } from '@lobehub/market-types';
|
|
1
|
+
import { AgentItem, MarketItemBase, PluginConnectionType, InstallFailureAnalysisQuery, InstallFailureAnalysis, RangeQuery, RangeStats, TopPluginsQuery, TopPlugin, PluginManifest, AdminPluginItem, AdminPluginItemDetail, PluginVersion, PluginVersionLocalization, AdminDeploymentOption, InstallationDetails, SystemDependency, IncompleteI18nPlugin, CategoryListQuery, CategoryItem, PluginItemDetail, InstallReportRequest, InstallReportResponse, CallReportRequest, CallReportResponse } from '@lobehub/market-types';
|
|
2
2
|
export * from '@lobehub/market-types';
|
|
3
3
|
export { CategoryItem, CategoryListQuery, CategoryListResponse } from '@lobehub/market-types';
|
|
4
4
|
import { z } from 'zod';
|
|
@@ -228,6 +228,443 @@ interface UnclaimedPluginItem {
|
|
|
228
228
|
identifier: string;
|
|
229
229
|
}
|
|
230
230
|
|
|
231
|
+
/**
|
|
232
|
+
* Agent list query parameters
|
|
233
|
+
* Defines the query parameters for filtering and paginating agent results
|
|
234
|
+
*/
|
|
235
|
+
interface AgentListQuery {
|
|
236
|
+
/** Filter by category */
|
|
237
|
+
category?: string;
|
|
238
|
+
/** Filter by official status */
|
|
239
|
+
isOfficial?: 'true' | 'false';
|
|
240
|
+
/** Locale for localized content */
|
|
241
|
+
locale?: string;
|
|
242
|
+
/** Sort order */
|
|
243
|
+
order?: 'asc' | 'desc';
|
|
244
|
+
/** Filter by owner ID */
|
|
245
|
+
ownerId?: number | string;
|
|
246
|
+
/** Current page number (1-based) */
|
|
247
|
+
page?: number;
|
|
248
|
+
/** Number of items per page */
|
|
249
|
+
pageSize?: number;
|
|
250
|
+
/** Search query string */
|
|
251
|
+
q?: string;
|
|
252
|
+
/** Sort field */
|
|
253
|
+
sort?: 'createdAt' | 'updatedAt' | 'name';
|
|
254
|
+
/** Publication status filter */
|
|
255
|
+
status?: 'published' | 'unpublished' | 'archived' | 'deprecated' | 'all';
|
|
256
|
+
/** Visibility filter */
|
|
257
|
+
visibility?: 'public' | 'private' | 'internal' | 'all';
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Agent list response structure
|
|
261
|
+
* Defines the structure of the agent list API response
|
|
262
|
+
*/
|
|
263
|
+
interface AgentListResponse {
|
|
264
|
+
currentPage: number;
|
|
265
|
+
items: AgentItem[];
|
|
266
|
+
pageSize: number;
|
|
267
|
+
totalCount: number;
|
|
268
|
+
totalPages: number;
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* Agent detail query parameters
|
|
272
|
+
* Defines the query parameters for retrieving agent details
|
|
273
|
+
*/
|
|
274
|
+
interface AgentDetailQuery {
|
|
275
|
+
/** Locale for localized content */
|
|
276
|
+
locale?: string;
|
|
277
|
+
/** Specific version number to retrieve */
|
|
278
|
+
version?: string;
|
|
279
|
+
}
|
|
280
|
+
/**
|
|
281
|
+
* Agent detail response structure
|
|
282
|
+
* Represents the complete agent information including A2A AgentCard data
|
|
283
|
+
*/
|
|
284
|
+
interface AgentItemDetail extends AgentItem {
|
|
285
|
+
/** A2A protocol version */
|
|
286
|
+
a2aProtocolVersion: string;
|
|
287
|
+
/** Agent configuration JSON */
|
|
288
|
+
config: any;
|
|
289
|
+
/** URL to human-readable documentation */
|
|
290
|
+
documentationUrl?: string;
|
|
291
|
+
/** Supported protocol extensions */
|
|
292
|
+
extensions?: any[];
|
|
293
|
+
/** Whether push notifications are supported */
|
|
294
|
+
hasPushNotifications: boolean;
|
|
295
|
+
/** Whether state transition history is supported */
|
|
296
|
+
hasStateTransitionHistory: boolean;
|
|
297
|
+
/** Whether streaming is supported */
|
|
298
|
+
hasStreaming: boolean;
|
|
299
|
+
/** Additional interfaces supported */
|
|
300
|
+
interfaces?: any[];
|
|
301
|
+
/** The transport of the preferred endpoint */
|
|
302
|
+
preferredTransport: string;
|
|
303
|
+
/** Security requirements */
|
|
304
|
+
securityRequirements?: any[];
|
|
305
|
+
/** Security schemes */
|
|
306
|
+
securitySchemes?: any;
|
|
307
|
+
/** Agent skills */
|
|
308
|
+
skills?: AgentSkill[];
|
|
309
|
+
/** A summary that helps find the correct agent */
|
|
310
|
+
summary?: string;
|
|
311
|
+
/** Whether the agent supports authenticated extended card */
|
|
312
|
+
supportsAuthenticatedExtendedCard: boolean;
|
|
313
|
+
/** Agent or A2A implementation version string */
|
|
314
|
+
version: string;
|
|
315
|
+
/** Incremental version number */
|
|
316
|
+
versionNumber: number;
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* Agent skill structure
|
|
320
|
+
* Represents a skill that an agent can perform
|
|
321
|
+
*/
|
|
322
|
+
interface AgentSkill {
|
|
323
|
+
/** Skill description */
|
|
324
|
+
description: string;
|
|
325
|
+
/** Example prompts or use cases */
|
|
326
|
+
examples?: string[];
|
|
327
|
+
/** Input Media Types for this skill */
|
|
328
|
+
inputModes?: string[];
|
|
329
|
+
/** Localized skill information */
|
|
330
|
+
localizations?: Array<{
|
|
331
|
+
description: string;
|
|
332
|
+
examples?: string[];
|
|
333
|
+
locale: string;
|
|
334
|
+
name: string;
|
|
335
|
+
tags: string[];
|
|
336
|
+
}>;
|
|
337
|
+
/** Human-readable skill name */
|
|
338
|
+
name: string;
|
|
339
|
+
/** Output Media Types for this skill */
|
|
340
|
+
outputModes?: string[];
|
|
341
|
+
/** Unique skill identifier within the agent */
|
|
342
|
+
skillId: string;
|
|
343
|
+
/** Keywords/categories for discoverability */
|
|
344
|
+
tags: string[];
|
|
345
|
+
}
|
|
346
|
+
/**
|
|
347
|
+
* Agent Create Request
|
|
348
|
+
* Parameters for creating a new agent
|
|
349
|
+
*/
|
|
350
|
+
interface AgentCreateRequest {
|
|
351
|
+
/** Official homepage or repository URL for the agent */
|
|
352
|
+
homepage?: string;
|
|
353
|
+
/** Human readable agent identifier */
|
|
354
|
+
identifier: string;
|
|
355
|
+
/** Whether the agent is featured */
|
|
356
|
+
isFeatured?: boolean;
|
|
357
|
+
/** Default name of the agent */
|
|
358
|
+
name: string;
|
|
359
|
+
/** Status of the agent */
|
|
360
|
+
status?: 'published' | 'unpublished' | 'archived' | 'deprecated';
|
|
361
|
+
/** Visibility of the agent */
|
|
362
|
+
visibility?: 'public' | 'private' | 'internal';
|
|
363
|
+
}
|
|
364
|
+
/**
|
|
365
|
+
* Agent Create Response
|
|
366
|
+
* Response from creating a new agent
|
|
367
|
+
*/
|
|
368
|
+
interface AgentCreateResponse {
|
|
369
|
+
createdAt: string;
|
|
370
|
+
id: number;
|
|
371
|
+
identifier: string;
|
|
372
|
+
name: string;
|
|
373
|
+
ownerId: number;
|
|
374
|
+
updatedAt: string;
|
|
375
|
+
}
|
|
376
|
+
/**
|
|
377
|
+
* Agent Modify Request
|
|
378
|
+
* Parameters for modifying an existing agent
|
|
379
|
+
*/
|
|
380
|
+
interface AgentModifyRequest {
|
|
381
|
+
/** Official homepage or repository URL for the agent */
|
|
382
|
+
homepage?: string;
|
|
383
|
+
/** Human readable agent identifier (required) */
|
|
384
|
+
identifier: string;
|
|
385
|
+
/** Whether the agent is featured */
|
|
386
|
+
isFeatured?: boolean;
|
|
387
|
+
/** Whether this agent is officially maintained by LobeHub */
|
|
388
|
+
isOfficial?: boolean;
|
|
389
|
+
/** Default name of the agent */
|
|
390
|
+
name?: string;
|
|
391
|
+
/** Status of the agent */
|
|
392
|
+
status?: 'published' | 'unpublished' | 'archived' | 'deprecated';
|
|
393
|
+
/** Visibility of the agent */
|
|
394
|
+
visibility?: 'public' | 'private' | 'internal';
|
|
395
|
+
}
|
|
396
|
+
/**
|
|
397
|
+
* Agent Modify Response
|
|
398
|
+
* Response from modifying an agent
|
|
399
|
+
*/
|
|
400
|
+
interface AgentModifyResponse {
|
|
401
|
+
createdAt: string;
|
|
402
|
+
homepage: string | null;
|
|
403
|
+
id: number;
|
|
404
|
+
identifier: string;
|
|
405
|
+
isFeatured: boolean;
|
|
406
|
+
isOfficial: boolean;
|
|
407
|
+
name: string;
|
|
408
|
+
ownerId: number;
|
|
409
|
+
status: string;
|
|
410
|
+
updatedAt: string;
|
|
411
|
+
visibility: string;
|
|
412
|
+
}
|
|
413
|
+
/**
|
|
414
|
+
* Agent Version Create Request
|
|
415
|
+
* Parameters for creating a new version of an existing agent
|
|
416
|
+
*/
|
|
417
|
+
interface AgentVersionCreateRequest {
|
|
418
|
+
/** A2A protocol version */
|
|
419
|
+
a2aProtocolVersion?: string;
|
|
420
|
+
/** Avatar URL for the agent, can be a emoji */
|
|
421
|
+
avatar?: string;
|
|
422
|
+
/** Category key for the agent */
|
|
423
|
+
category?: string;
|
|
424
|
+
/** Changelog for this version describing what changed */
|
|
425
|
+
changelog?: string;
|
|
426
|
+
/** Configuration JSON containing model definitions, tools, hyperparameters, etc. */
|
|
427
|
+
config?: Record<string, any>;
|
|
428
|
+
/** Array of default input Media Types */
|
|
429
|
+
defaultInputModes?: string[];
|
|
430
|
+
/** Array of default output Media Types */
|
|
431
|
+
defaultOutputModes?: string[];
|
|
432
|
+
/** Description of the agent */
|
|
433
|
+
description?: string;
|
|
434
|
+
/** URL to human-readable documentation */
|
|
435
|
+
documentationUrl?: string;
|
|
436
|
+
/** Supported protocol extensions */
|
|
437
|
+
extensions?: Array<Record<string, any>>;
|
|
438
|
+
/** Whether push notifications are supported */
|
|
439
|
+
hasPushNotifications?: boolean;
|
|
440
|
+
/** Whether state transition history is supported */
|
|
441
|
+
hasStateTransitionHistory?: boolean;
|
|
442
|
+
/** Whether streaming is supported */
|
|
443
|
+
hasStreaming?: boolean;
|
|
444
|
+
/** Agent identifier (required) */
|
|
445
|
+
identifier: string;
|
|
446
|
+
/** Additional interfaces supported */
|
|
447
|
+
interfaces?: Array<Record<string, any>>;
|
|
448
|
+
/** Name of the agent */
|
|
449
|
+
name?: string;
|
|
450
|
+
/** The transport of the preferred endpoint */
|
|
451
|
+
preferredTransport?: string;
|
|
452
|
+
/** Foreign key to the account that provides this agent */
|
|
453
|
+
providerId?: number;
|
|
454
|
+
/** Security requirements */
|
|
455
|
+
securityRequirements?: Array<Record<string, any>>;
|
|
456
|
+
/** Security schemes */
|
|
457
|
+
securitySchemes?: Record<string, any>;
|
|
458
|
+
/** Whether this version should become the current version */
|
|
459
|
+
setAsCurrent?: boolean;
|
|
460
|
+
/** A summary that help agent find correct agent */
|
|
461
|
+
summary?: string;
|
|
462
|
+
/** Whether the agent supports authenticated extended card */
|
|
463
|
+
supportsAuthenticatedExtendedCard?: boolean;
|
|
464
|
+
/** Tags for categorization */
|
|
465
|
+
tags?: string[];
|
|
466
|
+
/** Token usage for the agent */
|
|
467
|
+
tokenUsage?: number;
|
|
468
|
+
/** Base URL for the agent's A2A service */
|
|
469
|
+
url?: string;
|
|
470
|
+
/** Agent or A2A implementation version string */
|
|
471
|
+
version?: string;
|
|
472
|
+
/** Incremental version number for this agent (will auto-increment if not provided) */
|
|
473
|
+
versionNumber?: number;
|
|
474
|
+
}
|
|
475
|
+
/**
|
|
476
|
+
* Agent Version Create Response
|
|
477
|
+
* Response from creating a new agent version
|
|
478
|
+
*/
|
|
479
|
+
interface AgentVersionCreateResponse {
|
|
480
|
+
agentId: number;
|
|
481
|
+
createdAt: string;
|
|
482
|
+
description: string;
|
|
483
|
+
id: number;
|
|
484
|
+
isLatest: boolean;
|
|
485
|
+
name: string;
|
|
486
|
+
updatedAt: string;
|
|
487
|
+
version: string;
|
|
488
|
+
versionNumber: number;
|
|
489
|
+
}
|
|
490
|
+
/**
|
|
491
|
+
* Agent Version Modify Request
|
|
492
|
+
* Parameters for modifying a specific version of an existing agent
|
|
493
|
+
*/
|
|
494
|
+
interface AgentVersionModifyRequest {
|
|
495
|
+
/** A2A protocol version */
|
|
496
|
+
a2aProtocolVersion?: string;
|
|
497
|
+
/** Avatar URL for the agent, can be a emoji */
|
|
498
|
+
avatar?: string;
|
|
499
|
+
/** Category key for the agent */
|
|
500
|
+
category?: string;
|
|
501
|
+
/** Changelog for this version describing what changed */
|
|
502
|
+
changelog?: string;
|
|
503
|
+
/** Configuration JSON containing model definitions, tools, hyperparameters, etc. */
|
|
504
|
+
config?: Record<string, any>;
|
|
505
|
+
/** Array of default input Media Types */
|
|
506
|
+
defaultInputModes?: string[];
|
|
507
|
+
/** Array of default output Media Types */
|
|
508
|
+
defaultOutputModes?: string[];
|
|
509
|
+
/** Description of the agent */
|
|
510
|
+
description?: string;
|
|
511
|
+
/** URL to human-readable documentation */
|
|
512
|
+
documentationUrl?: string;
|
|
513
|
+
/** Supported protocol extensions */
|
|
514
|
+
extensions?: Array<Record<string, any>>;
|
|
515
|
+
/** Whether push notifications are supported */
|
|
516
|
+
hasPushNotifications?: boolean;
|
|
517
|
+
/** Whether state transition history is supported */
|
|
518
|
+
hasStateTransitionHistory?: boolean;
|
|
519
|
+
/** Whether streaming is supported */
|
|
520
|
+
hasStreaming?: boolean;
|
|
521
|
+
/** Agent identifier (required) */
|
|
522
|
+
identifier: string;
|
|
523
|
+
/** Additional interfaces supported */
|
|
524
|
+
interfaces?: Array<Record<string, any>>;
|
|
525
|
+
/** Name of the agent */
|
|
526
|
+
name?: string;
|
|
527
|
+
/** The transport of the preferred endpoint */
|
|
528
|
+
preferredTransport?: string;
|
|
529
|
+
/** Foreign key to the account that provides this agent */
|
|
530
|
+
providerId?: number;
|
|
531
|
+
/** Security requirements */
|
|
532
|
+
securityRequirements?: Array<Record<string, any>>;
|
|
533
|
+
/** Security schemes */
|
|
534
|
+
securitySchemes?: Record<string, any>;
|
|
535
|
+
/** Whether this version should become the current version */
|
|
536
|
+
setAsCurrent?: boolean;
|
|
537
|
+
/** A summary that help agent find correct agent */
|
|
538
|
+
summary?: string;
|
|
539
|
+
/** Whether the agent supports authenticated extended card */
|
|
540
|
+
supportsAuthenticatedExtendedCard?: boolean;
|
|
541
|
+
/** Token usage for the agent */
|
|
542
|
+
tokenUsage?: number;
|
|
543
|
+
/** Base URL for the agent's A2A service */
|
|
544
|
+
url?: string;
|
|
545
|
+
/** Version string to modify (required) */
|
|
546
|
+
version: string;
|
|
547
|
+
/** Agent or A2A implementation version string */
|
|
548
|
+
versionString?: string;
|
|
549
|
+
}
|
|
550
|
+
/**
|
|
551
|
+
* Agent Version Modify Response
|
|
552
|
+
* Response from modifying an agent version
|
|
553
|
+
*/
|
|
554
|
+
interface AgentVersionModifyResponse {
|
|
555
|
+
agentId: number;
|
|
556
|
+
createdAt: string;
|
|
557
|
+
description: string;
|
|
558
|
+
id: number;
|
|
559
|
+
isLatest: boolean;
|
|
560
|
+
name: string;
|
|
561
|
+
updatedAt: string;
|
|
562
|
+
version: string;
|
|
563
|
+
versionNumber: number;
|
|
564
|
+
}
|
|
565
|
+
/**
|
|
566
|
+
* Agent Interface
|
|
567
|
+
* Represents an interface endpoint for an agent
|
|
568
|
+
*/
|
|
569
|
+
interface AgentInterface {
|
|
570
|
+
transport: string;
|
|
571
|
+
url: string;
|
|
572
|
+
}
|
|
573
|
+
/**
|
|
574
|
+
* Agent Security Scheme
|
|
575
|
+
* Represents a security scheme for an agent
|
|
576
|
+
*/
|
|
577
|
+
interface AgentSecurityScheme {
|
|
578
|
+
schemeConfig: any;
|
|
579
|
+
schemeName: string;
|
|
580
|
+
}
|
|
581
|
+
/**
|
|
582
|
+
* Agent Security Requirement
|
|
583
|
+
* Represents a security requirement for an agent
|
|
584
|
+
*/
|
|
585
|
+
interface AgentSecurityRequirement {
|
|
586
|
+
requirement: any;
|
|
587
|
+
}
|
|
588
|
+
/**
|
|
589
|
+
* Agent Extension
|
|
590
|
+
* Represents a protocol extension for an agent
|
|
591
|
+
*/
|
|
592
|
+
interface AgentExtension {
|
|
593
|
+
description?: string;
|
|
594
|
+
params?: any;
|
|
595
|
+
required?: boolean;
|
|
596
|
+
uri: string;
|
|
597
|
+
}
|
|
598
|
+
/**
|
|
599
|
+
* Agent Version Localization
|
|
600
|
+
* Represents localized content for an agent version
|
|
601
|
+
*/
|
|
602
|
+
interface AgentVersionLocalization {
|
|
603
|
+
changelog?: string;
|
|
604
|
+
config: any;
|
|
605
|
+
description?: string;
|
|
606
|
+
locale: string;
|
|
607
|
+
name?: string;
|
|
608
|
+
shortDescription?: string;
|
|
609
|
+
}
|
|
610
|
+
/**
|
|
611
|
+
* Agent Upload Version Data
|
|
612
|
+
* Version data for agent upload
|
|
613
|
+
*/
|
|
614
|
+
interface AgentUploadVersion {
|
|
615
|
+
a2aProtocolVersion: string;
|
|
616
|
+
changelog?: string;
|
|
617
|
+
config: any;
|
|
618
|
+
defaultInputModes: string[];
|
|
619
|
+
defaultOutputModes: string[];
|
|
620
|
+
description: string;
|
|
621
|
+
documentationUrl?: string;
|
|
622
|
+
extensions?: AgentExtension[];
|
|
623
|
+
hasPushNotifications?: boolean;
|
|
624
|
+
hasStateTransitionHistory?: boolean;
|
|
625
|
+
hasStreaming?: boolean;
|
|
626
|
+
interfaces?: AgentInterface[];
|
|
627
|
+
localizations?: AgentVersionLocalization[];
|
|
628
|
+
name: string;
|
|
629
|
+
preferredTransport?: string;
|
|
630
|
+
providerId?: number;
|
|
631
|
+
securityRequirements?: AgentSecurityRequirement[];
|
|
632
|
+
securitySchemes?: AgentSecurityScheme[];
|
|
633
|
+
skills?: AgentSkill[];
|
|
634
|
+
supportsAuthenticatedExtendedCard?: boolean;
|
|
635
|
+
url: string;
|
|
636
|
+
version: string;
|
|
637
|
+
versionNumber: number;
|
|
638
|
+
}
|
|
639
|
+
/**
|
|
640
|
+
* Agent Upload Request
|
|
641
|
+
* Parameters for uploading a complete agent with version
|
|
642
|
+
*/
|
|
643
|
+
interface AgentUploadRequest {
|
|
644
|
+
agentIdentifier: string;
|
|
645
|
+
avatar?: string;
|
|
646
|
+
isOfficial?: boolean;
|
|
647
|
+
name: string;
|
|
648
|
+
ownerId: number;
|
|
649
|
+
version: AgentUploadVersion;
|
|
650
|
+
}
|
|
651
|
+
/**
|
|
652
|
+
* Agent Upload Response
|
|
653
|
+
* Response from uploading an agent
|
|
654
|
+
*/
|
|
655
|
+
interface AgentUploadResponse {
|
|
656
|
+
agentId: string;
|
|
657
|
+
agentIdentifier: string;
|
|
658
|
+
config: any;
|
|
659
|
+
createdAt: string;
|
|
660
|
+
description: string;
|
|
661
|
+
documentationUrl?: string;
|
|
662
|
+
hasPushNotifications: boolean;
|
|
663
|
+
hasStateTransitionHistory: boolean;
|
|
664
|
+
name: string;
|
|
665
|
+
updatedAt: string;
|
|
666
|
+
}
|
|
667
|
+
|
|
231
668
|
/**
|
|
232
669
|
* Market Service Discovery Document
|
|
233
670
|
*
|
|
@@ -1423,6 +1860,220 @@ declare class MarketAdmin extends BaseSDK {
|
|
|
1423
1860
|
constructor(options?: MarketSDKOptions);
|
|
1424
1861
|
}
|
|
1425
1862
|
|
|
1863
|
+
/**
|
|
1864
|
+
* Agents Service
|
|
1865
|
+
*
|
|
1866
|
+
* Provides access to agent-related functionality in the LobeHub Marketplace.
|
|
1867
|
+
* This service handles listing, searching, and retrieving detailed information
|
|
1868
|
+
* about agents available in the marketplace.
|
|
1869
|
+
*/
|
|
1870
|
+
declare class AgentService extends BaseSDK {
|
|
1871
|
+
/**
|
|
1872
|
+
* Retrieves a list of agents from the marketplace
|
|
1873
|
+
*
|
|
1874
|
+
* Supports filtering, pagination, and localization of results.
|
|
1875
|
+
*
|
|
1876
|
+
* @param params - Query parameters for filtering and pagination
|
|
1877
|
+
* @param options - Optional request options
|
|
1878
|
+
* @returns Promise resolving to the agent list response containing items and pagination info
|
|
1879
|
+
*/
|
|
1880
|
+
getAgentList(params?: AgentListQuery, options?: globalThis.RequestInit): Promise<AgentListResponse>;
|
|
1881
|
+
/**
|
|
1882
|
+
* Retrieves detailed information about a specific agent
|
|
1883
|
+
*
|
|
1884
|
+
* Returns complete agent information including A2A AgentCard data,
|
|
1885
|
+
* configuration, skills, and localized content.
|
|
1886
|
+
*
|
|
1887
|
+
* @param id - Unique identifier of the agent
|
|
1888
|
+
* @param params - Query parameters for locale and version
|
|
1889
|
+
* @param options - Optional request options
|
|
1890
|
+
* @returns Promise resolving to the agent detail information
|
|
1891
|
+
*/
|
|
1892
|
+
getAgentDetail(id: string, params?: AgentDetailQuery, options?: globalThis.RequestInit): Promise<AgentItemDetail>;
|
|
1893
|
+
/**
|
|
1894
|
+
* Retrieves all published agent identifiers
|
|
1895
|
+
*
|
|
1896
|
+
* Returns a lightweight list of all published agent identifiers without
|
|
1897
|
+
* full agent metadata. This is useful for clients that need to know which
|
|
1898
|
+
* agents are available without fetching complete agent information.
|
|
1899
|
+
*
|
|
1900
|
+
* @param options - Optional request options
|
|
1901
|
+
* @returns Promise resolving to an array containing identifiers array and last modified time
|
|
1902
|
+
*/
|
|
1903
|
+
getPublishedIdentifiers(options?: globalThis.RequestInit): Promise<{
|
|
1904
|
+
id: string;
|
|
1905
|
+
lastModified: string;
|
|
1906
|
+
}[]>;
|
|
1907
|
+
/**
|
|
1908
|
+
* Retrieves agent categories and their counts
|
|
1909
|
+
*
|
|
1910
|
+
* Returns a list of categories along with the number of agents in each category.
|
|
1911
|
+
* Useful for building category filters in a UI. Supports optional search filtering
|
|
1912
|
+
* via 'q' parameter and locale specification.
|
|
1913
|
+
*
|
|
1914
|
+
* @param params - Query parameters for filtering categories
|
|
1915
|
+
* @param options - Optional request options
|
|
1916
|
+
* @returns Promise resolving to an array of category items with counts
|
|
1917
|
+
*/
|
|
1918
|
+
getCategories(params?: {
|
|
1919
|
+
locale?: string;
|
|
1920
|
+
q?: string;
|
|
1921
|
+
}, options?: globalThis.RequestInit): Promise<{
|
|
1922
|
+
category: string;
|
|
1923
|
+
count: number;
|
|
1924
|
+
}[]>;
|
|
1925
|
+
/**
|
|
1926
|
+
* Uploads an agent to the marketplace
|
|
1927
|
+
*
|
|
1928
|
+
* Allows users to upload new agents or update existing ones.
|
|
1929
|
+
* The agent data should conform to the A2A AgentCard specification.
|
|
1930
|
+
*
|
|
1931
|
+
* @param agentData - The agent data to upload
|
|
1932
|
+
* @param options - Optional request options
|
|
1933
|
+
* @returns Promise resolving to the upload response
|
|
1934
|
+
*/
|
|
1935
|
+
uploadAgent(agentData: AgentUploadRequest, options?: globalThis.RequestInit): Promise<AgentUploadResponse>;
|
|
1936
|
+
/**
|
|
1937
|
+
* Creates a new agent in the marketplace
|
|
1938
|
+
*
|
|
1939
|
+
* @param agentData - The agent data to create
|
|
1940
|
+
* @param options - Optional request options
|
|
1941
|
+
* @returns Promise resolving to the created agent response
|
|
1942
|
+
*/
|
|
1943
|
+
createAgent(agentData: AgentCreateRequest, options?: globalThis.RequestInit): Promise<AgentCreateResponse>;
|
|
1944
|
+
/**
|
|
1945
|
+
* Creates a new version for an existing agent
|
|
1946
|
+
*
|
|
1947
|
+
* @param versionData - The version data to create
|
|
1948
|
+
* @param options - Optional request options
|
|
1949
|
+
* @returns Promise resolving to the created version response
|
|
1950
|
+
*/
|
|
1951
|
+
createAgentVersion(versionData: AgentVersionCreateRequest, options?: globalThis.RequestInit): Promise<AgentVersionCreateResponse>;
|
|
1952
|
+
/**
|
|
1953
|
+
* Modifies an existing agent
|
|
1954
|
+
*
|
|
1955
|
+
* @param agentData - The agent data to modify
|
|
1956
|
+
* @param options - Optional request options
|
|
1957
|
+
* @returns Promise resolving to the modified agent response
|
|
1958
|
+
*/
|
|
1959
|
+
modifyAgent(agentData: AgentModifyRequest, options?: globalThis.RequestInit): Promise<AgentModifyResponse>;
|
|
1960
|
+
/**
|
|
1961
|
+
* Modifies a specific version of an existing agent
|
|
1962
|
+
*
|
|
1963
|
+
* @param versionData - The version data to modify
|
|
1964
|
+
* @param options - Optional request options
|
|
1965
|
+
* @returns Promise resolving to the modified version response
|
|
1966
|
+
*/
|
|
1967
|
+
modifyAgentVersion(versionData: AgentVersionModifyRequest, options?: globalThis.RequestInit): Promise<AgentVersionModifyResponse>;
|
|
1968
|
+
/**
|
|
1969
|
+
* Checks if an agent exists in the marketplace
|
|
1970
|
+
*
|
|
1971
|
+
* @param identifier - Unique identifier of the agent
|
|
1972
|
+
* @param options - Optional request options
|
|
1973
|
+
* @returns Promise resolving to true if agent exists, false otherwise
|
|
1974
|
+
*/
|
|
1975
|
+
checkAgentExists(identifier: string, options?: globalThis.RequestInit): Promise<boolean>;
|
|
1976
|
+
}
|
|
1977
|
+
|
|
1978
|
+
/**
|
|
1979
|
+
* Auth Service
|
|
1980
|
+
*
|
|
1981
|
+
* Provides authentication and authorization functionality for the LobeHub Marketplace.
|
|
1982
|
+
* This service handles OIDC user authentication, client registration, and M2M token management.
|
|
1983
|
+
*/
|
|
1984
|
+
declare class AuthService extends BaseSDK {
|
|
1985
|
+
/** Successful handoff payload */
|
|
1986
|
+
private static readonly HANDOFF_SUCCESS_STATUS;
|
|
1987
|
+
/** Pending handoff status */
|
|
1988
|
+
private static readonly HANDOFF_PENDING_STATUS;
|
|
1989
|
+
/** Consumed handoff status */
|
|
1990
|
+
private static readonly HANDOFF_CONSUMED_STATUS;
|
|
1991
|
+
/** Expired handoff status */
|
|
1992
|
+
private static readonly HANDOFF_EXPIRED_STATUS;
|
|
1993
|
+
/**
|
|
1994
|
+
* Retrieves user information from the OIDC userinfo endpoint
|
|
1995
|
+
*
|
|
1996
|
+
* Requires a valid access token in the Authorization header.
|
|
1997
|
+
*
|
|
1998
|
+
* @param accessToken - The access token to use for authentication
|
|
1999
|
+
* @param options - Optional request options
|
|
2000
|
+
* @returns Promise resolving to the user information
|
|
2001
|
+
*/
|
|
2002
|
+
getUserInfo(accessToken: string, options?: globalThis.RequestInit): Promise<{
|
|
2003
|
+
email?: string;
|
|
2004
|
+
email_verified?: boolean;
|
|
2005
|
+
name?: string;
|
|
2006
|
+
picture?: string;
|
|
2007
|
+
sub: string;
|
|
2008
|
+
}>;
|
|
2009
|
+
/**
|
|
2010
|
+
* Registers a new OAuth client with the marketplace
|
|
2011
|
+
*
|
|
2012
|
+
* This is typically used for device registration or application setup.
|
|
2013
|
+
* Returns client credentials that can be used for M2M authentication.
|
|
2014
|
+
*
|
|
2015
|
+
* @param clientData - The client registration data
|
|
2016
|
+
* @param options - Optional request options
|
|
2017
|
+
* @returns Promise resolving to the client credentials
|
|
2018
|
+
*/
|
|
2019
|
+
registerClient(clientData: ClientRegistrationRequest, options?: globalThis.RequestInit): Promise<ClientRegistrationResponse>;
|
|
2020
|
+
/**
|
|
2021
|
+
* Fetches an M2M (Machine-to-Machine) access token
|
|
2022
|
+
*
|
|
2023
|
+
* Uses client credentials to obtain an access token for server-to-server communication.
|
|
2024
|
+
* This method requires clientId and clientSecret to be set in the SDK options.
|
|
2025
|
+
*
|
|
2026
|
+
* @returns Promise resolving to the access token and expiration time
|
|
2027
|
+
*/
|
|
2028
|
+
getM2MToken(): Promise<{
|
|
2029
|
+
accessToken: string;
|
|
2030
|
+
expiresIn: number;
|
|
2031
|
+
}>;
|
|
2032
|
+
/** OAuth handoff response shapes */
|
|
2033
|
+
private static typeHandoffSuccess;
|
|
2034
|
+
/**
|
|
2035
|
+
* Get OAuth handoff status and data by id.
|
|
2036
|
+
* Maps server HTTP statuses to a typed status union:
|
|
2037
|
+
* - 200: success
|
|
2038
|
+
* - 202: pending
|
|
2039
|
+
* - 404: consumed
|
|
2040
|
+
* - 410: expired
|
|
2041
|
+
* - others: error (throws)
|
|
2042
|
+
*/
|
|
2043
|
+
getOAuthHandoff(id: string, options?: globalThis.RequestInit): Promise<{
|
|
2044
|
+
clientId: string;
|
|
2045
|
+
code: string;
|
|
2046
|
+
redirectUri: string;
|
|
2047
|
+
status: 'success';
|
|
2048
|
+
} | {
|
|
2049
|
+
status: 'pending';
|
|
2050
|
+
} | {
|
|
2051
|
+
status: 'consumed';
|
|
2052
|
+
} | {
|
|
2053
|
+
status: 'expired';
|
|
2054
|
+
}>;
|
|
2055
|
+
/**
|
|
2056
|
+
* Poll OAuth handoff result until it becomes terminal.
|
|
2057
|
+
* Terminal statuses: success, expired, consumed.
|
|
2058
|
+
* Non-terminal: pending → continue polling.
|
|
2059
|
+
*/
|
|
2060
|
+
pollOAuthHandoff(id: string, params?: {
|
|
2061
|
+
intervalMs?: number;
|
|
2062
|
+
requestInit?: globalThis.RequestInit;
|
|
2063
|
+
signal?: AbortSignal;
|
|
2064
|
+
timeoutMs?: number;
|
|
2065
|
+
}): Promise<{
|
|
2066
|
+
clientId: string;
|
|
2067
|
+
code: string;
|
|
2068
|
+
redirectUri: string;
|
|
2069
|
+
status: 'success';
|
|
2070
|
+
} | {
|
|
2071
|
+
status: 'expired';
|
|
2072
|
+
} | {
|
|
2073
|
+
status: 'consumed';
|
|
2074
|
+
}>;
|
|
2075
|
+
}
|
|
2076
|
+
|
|
1426
2077
|
/**
|
|
1427
2078
|
* Plugins Service
|
|
1428
2079
|
*
|
|
@@ -1531,6 +2182,16 @@ declare class PluginsService extends BaseSDK {
|
|
|
1531
2182
|
* by combining specialized domain services.
|
|
1532
2183
|
*/
|
|
1533
2184
|
declare class MarketSDK extends BaseSDK {
|
|
2185
|
+
/**
|
|
2186
|
+
* Agents service for accessing agent-related functionality
|
|
2187
|
+
* Provides methods to list, search, retrieve agent information, and upload agents
|
|
2188
|
+
*/
|
|
2189
|
+
readonly agents: AgentService;
|
|
2190
|
+
/**
|
|
2191
|
+
* Auth service for authentication and authorization
|
|
2192
|
+
* Provides methods for OIDC user authentication, client registration, and M2M token management
|
|
2193
|
+
*/
|
|
2194
|
+
readonly auth: AuthService;
|
|
1534
2195
|
/**
|
|
1535
2196
|
* Plugins service for accessing plugin-related functionality
|
|
1536
2197
|
* Provides methods to list, search, retrieve plugin information, and report installation attempts
|
|
@@ -1566,8 +2227,9 @@ declare class MarketSDK extends BaseSDK {
|
|
|
1566
2227
|
* @param request - Client registration request data
|
|
1567
2228
|
* @returns Promise resolving to the client registration response with credentials
|
|
1568
2229
|
* @throws Error if registration fails
|
|
2230
|
+
* @deprecated Use auth.registerClient() instead
|
|
1569
2231
|
*/
|
|
1570
2232
|
registerClient(request: ClientRegistrationRequest): Promise<ClientRegistrationResponse>;
|
|
1571
2233
|
}
|
|
1572
2234
|
|
|
1573
|
-
export { type AdminListQueryParams, type AdminListResponse, type AdminPluginParams, type ClientRegistrationError, type ClientRegistrationRequest, type ClientRegistrationResponse, type DiscoveryDocument, MarketAdmin, MarketSDK, type MarketSDKOptions, type PluginI18nImportParams, type PluginI18nImportResponse, type PluginItem, type PluginListResponse, type PluginLocalization, type PluginQueryParams, type PluginUpdateParams, type PluginVersionCreateParams, type PluginVersionUpdateParams, type ReviewStatus, ReviewStatusEnumSchema, type SharedTokenState, StatusEnumSchema, type UnclaimedPluginItem, VisibilityEnumSchema };
|
|
2235
|
+
export { type AdminListQueryParams, type AdminListResponse, type AdminPluginParams, type AgentCreateRequest, type AgentCreateResponse, type AgentDetailQuery, type AgentExtension, type AgentInterface, type AgentItemDetail, type AgentListQuery, type AgentListResponse, type AgentModifyRequest, type AgentModifyResponse, type AgentSecurityRequirement, type AgentSecurityScheme, type AgentSkill, type AgentUploadRequest, type AgentUploadResponse, type AgentUploadVersion, type AgentVersionCreateRequest, type AgentVersionCreateResponse, type AgentVersionLocalization, type AgentVersionModifyRequest, type AgentVersionModifyResponse, type ClientRegistrationError, type ClientRegistrationRequest, type ClientRegistrationResponse, type DiscoveryDocument, MarketAdmin, MarketSDK, type MarketSDKOptions, type PluginI18nImportParams, type PluginI18nImportResponse, type PluginItem, type PluginListResponse, type PluginLocalization, type PluginQueryParams, type PluginUpdateParams, type PluginVersionCreateParams, type PluginVersionUpdateParams, type ReviewStatus, ReviewStatusEnumSchema, type SharedTokenState, StatusEnumSchema, type UnclaimedPluginItem, VisibilityEnumSchema };
|