@lobehub/market-sdk 0.44.0 → 0.46.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 CHANGED
@@ -1,4 +1,4 @@
1
- import { AgentMarketListQuery, AgentSkill, UserCredSummary, SandboxRunRequest, SandboxMode, AdminAgentCreateInput, AdminAgentCreateResponse, AgentItemDetail, AdminAgentVersionUpdateInput, AdminAgentVersionCreateInput, InstallFailureAnalysisQuery, InstallFailureAnalysis, RangeQuery, RangeStats, TopPluginsQuery, TopPlugin, OfficialMcpRegistryImportRequest, OfficialMcpRegistryImportResponse, OfficialMcpRegistrySyncRequest, OfficialMcpRegistrySyncResponse, PluginManifest, AdminPluginItem, AdminPluginItemDetail, PluginVersion, PluginVersionLocalization, AdminDeploymentOption, InstallationDetails, SystemDependency, IncompleteI18nPlugin, CreateSkillCollectionRequest, AdminSkillCollectionDetail, AdminSkillCollectionListQuery, AdminSkillCollectionListResponse, BatchUpsertSkillCollectionLocalizationsRequest, SkillCollectionLocalizationBatchResponse, SkillCollectionLocalization, UpdateSkillCollectionRequest, UpsertSkillCollectionLocalizationRequest, AdminSkillCreateRequest, AdminSkillUpdateResponse, AdminSkillGitHubImportRequest, AdminSkillImportResponse, AdminSkillDetail, AdminSkillUpdateRequest, AdminSkillListQuery, AdminSkillListResponse, AssetCategoryAdminListQuery, AssetCategoryAdminList, AssetCategoryType, AssetCategoryCreate, AssetCategory, AssetCategoryUpdate, AssetCategoryDelete, AdminSandboxSessionQuery, AdminSandboxSessionList, AdminSandboxSession, AdminSandboxEfsUsage, AdminSandboxStorageQuery, AdminSandboxStorageList, AdminSandboxStorageWorkspaceQuery, AdminSandboxStorageWorkspaceList, AdminSandboxStorage, AgentListResponse, SitemapResponse, AgentEventRequest, SkillCredStatus, InjectCredsRequest, InjectCredsResponse, InjectCredsForSkillRequest, InjectCredsForSkillResponse, PrepareDeploymentUploadRequest, IngestedDeploymentUpload, PluginListResponse, CategoryListQuery, CategoryItem, PluginItemDetail, InstallReportRequest, InstallReportResponse, CallReportRequest, CallReportResponse, PluginEventRequest, CloudGatewayRequest, CloudGatewayResponse, SandboxRunResponse, SandboxStorageInfo, SandboxStorageFileList, SandboxStorageFileContent, SandboxStorageWriteResult, SandboxSessionList, SandboxInstanceList, MyOrganizationItem, CreateOrganizationRequest, CreateOrganizationResponse, UpdateOrganizationRequest, OrganizationItem, OrganizationMemberItem, OrganizationMemberRole, AddMemberResponse, UpdateMemberRoleResponse, ReconcileMembersRequest, ReconcileMembersResponse, AssetCategoryItem, SandboxStorageClaim } from '@lobehub/market-types';
1
+ import { AgentMarketListQuery, AgentSkill, UserCredSummary, SandboxRunRequest, SandboxMode, AdminAgentCreateInput, AdminAgentCreateResponse, AgentItemDetail, AdminAgentVersionUpdateInput, AdminAgentVersionCreateInput, InstallFailureAnalysisQuery, InstallFailureAnalysis, RangeQuery, RangeStats, TopPluginsQuery, TopPlugin, OfficialMcpRegistryImportRequest, OfficialMcpRegistryImportResponse, OfficialMcpRegistrySyncRequest, OfficialMcpRegistrySyncResponse, PluginManifest, AdminPluginItem, AdminPluginItemDetail, PluginVersion, PluginVersionLocalization, AdminDeploymentOption, InstallationDetails, SystemDependency, IncompleteI18nPlugin, CreateSkillCollectionRequest, AdminSkillCollectionDetail, AdminSkillCollectionListQuery, AdminSkillCollectionListResponse, BatchUpsertSkillCollectionLocalizationsRequest, SkillCollectionLocalizationBatchResponse, SkillCollectionLocalization, UpdateSkillCollectionRequest, UpsertSkillCollectionLocalizationRequest, AdminSkillCreateRequest, AdminSkillUpdateResponse, AdminSkillGitHubImportRequest, AdminSkillImportResponse, AdminSkillDetail, AdminSkillUpdateRequest, AdminSkillListQuery, AdminSkillListResponse, AssetCategoryAdminListQuery, AssetCategoryAdminList, AssetCategoryType, AssetCategoryCreate, AssetCategory, AssetCategoryUpdate, AssetCategoryDelete, AdminSandboxSessionQuery, AdminSandboxSessionList, AdminSandboxSession, AdminSandboxEfsUsage, AdminSandboxStorageQuery, AdminSandboxStorageList, AdminSandboxStorageWorkspaceQuery, AdminSandboxStorageWorkspaceList, AdminSandboxStorage, AgentListResponse, SitemapResponse, AgentEventRequest, SkillCredStatus, InjectCredsRequest, InjectCredsResponse, InjectCredsForSkillRequest, InjectCredsForSkillResponse, PrepareDeploymentUploadRequest, IngestedDeploymentUpload, PluginListResponse, CategoryListQuery, CategoryItem, PluginItemDetail, InstallReportRequest, InstallReportResponse, CallReportRequest, CallReportResponse, PluginEventRequest, CloudGatewayRequest, CloudGatewayResponse, SandboxRunResponse, SandboxStorageInfo, SandboxStorageFileList, SandboxStorageFileContent, SandboxStorageWriteResult, SandboxSessionList, SandboxInstanceList, MyOrganizationItem, CreateOrganizationRequest, CreateOrganizationResponse, UpdateOrganizationRequest, OrganizationItem, OrganizationMemberItem, OrganizationMemberRole, AddMemberResponse, UpdateMemberRoleResponse, ReconcileMembersRequest, ReconcileMembersResponse, AssetCategoryItem, SandboxRunClaim, SandboxStorageClaim } from '@lobehub/market-types';
2
2
  export * from '@lobehub/market-types';
3
3
  export { AgentItemDetail, AgentListResponse, AgentSkill, CategoryItem, CategoryListQuery, CategoryListResponse, CredType, IngestedDeploymentUpload, InjectCredsForSkillRequest, InjectCredsForSkillResponse, InjectCredsRequest, InjectCredsResponse, InjectedFileInfo, MarketPluginItem as PluginItem, PluginListResponse, PrepareDeploymentUploadRequest, PublishPlanLimits, PublishTarget, SandboxEgress, SandboxEgressInject, SandboxInstance, SandboxInstanceList, SandboxInstanceSnapshot, SandboxRunErrorCode, SandboxRunErrorResponse, SandboxRunResponse, SandboxRunRuntime, SandboxRunSubject, SandboxSecretRef, SandboxSessionEndReason, SandboxSessionKind, SandboxSessionList, SandboxSessionRecord, SandboxStorageClaim, SandboxStorageFileContent, SandboxStorageFileEntry, SandboxStorageFileList, SandboxStorageInfo, SandboxStorageStatus, SandboxStorageWriteResult, SkillCredStatus, UserCredSummary } from '@lobehub/market-types';
4
4
  import { z } from 'zod';
@@ -1475,6 +1475,13 @@ interface CreateKVCredRequest {
1475
1475
  type: 'kv-env' | 'kv-header';
1476
1476
  /** Key-value pairs to store */
1477
1477
  values: Record<string, string>;
1478
+ /**
1479
+ * Organization credentials only (ignored for personal ones). 'public'
1480
+ * (default) shares it with every member and requires the admin role;
1481
+ * 'private' keeps it to the creator (409 `private_creds_disabled` until
1482
+ * the server enables private organization credentials).
1483
+ */
1484
+ visibility?: 'private' | 'public';
1478
1485
  }
1479
1486
  /**
1480
1487
  * Request for creating an OAuth credential
@@ -1488,6 +1495,13 @@ interface CreateOAuthCredRequest {
1488
1495
  name: string;
1489
1496
  /** ID of the existing OAuth connection to link */
1490
1497
  oauthConnectionId: number;
1498
+ /**
1499
+ * Organization credentials only (ignored for personal ones). 'public'
1500
+ * (default) shares it with every member and requires the admin role;
1501
+ * 'private' keeps it to the creator (409 `private_creds_disabled` until
1502
+ * the server enables private organization credentials).
1503
+ */
1504
+ visibility?: 'private' | 'public';
1491
1505
  }
1492
1506
  /**
1493
1507
  * Request for creating a file credential
@@ -1503,6 +1517,13 @@ interface CreateFileCredRequest {
1503
1517
  key: string;
1504
1518
  /** Display name for the credential */
1505
1519
  name: string;
1520
+ /**
1521
+ * Organization credentials only (ignored for personal ones). 'public'
1522
+ * (default) shares it with every member and requires the admin role;
1523
+ * 'private' keeps it to the creator (409 `private_creds_disabled` until
1524
+ * the server enables private organization credentials).
1525
+ */
1526
+ visibility?: 'private' | 'public';
1506
1527
  }
1507
1528
  /**
1508
1529
  * Request for updating a credential
@@ -1529,12 +1550,22 @@ interface ShareCredRequest {
1529
1550
  /** Target organization: numeric account id or `workspace:<workspaceId>` key */
1530
1551
  orgId: string;
1531
1552
  /**
1532
- * Defaults to 'public' (immediately visible to the org). Pass 'private' to
1533
- * only link the credential as a draft — use CredService.publish() later
1534
- * to make it visible to the rest of the organization.
1553
+ * Defaults to 'public' (every member can use it). 'private' links it for
1554
+ * the owner's own use in that organization — use CredService.publish()
1555
+ * later to make it usable by every member.
1535
1556
  */
1536
1557
  visibility?: 'private' | 'public';
1537
1558
  }
1559
+ /**
1560
+ * Picks which of a credential's shares `publish` / `unshare` act on.
1561
+ */
1562
+ interface CredShareTargetRequest {
1563
+ /**
1564
+ * Organization: numeric account id or `workspace:<workspaceId>` key. May be
1565
+ * omitted while the credential has a single share.
1566
+ */
1567
+ orgId?: string;
1568
+ }
1538
1569
  /**
1539
1570
  * Response containing a list of credentials
1540
1571
  */
@@ -6598,44 +6629,49 @@ declare class CredService extends BaseSDK {
6598
6629
  */
6599
6630
  update(id: number, data: UpdateCredRequest, options?: globalThis.RequestInit): Promise<UserCredSummary>;
6600
6631
  /**
6601
- * Shares one of the caller's own credentials with an organization
6632
+ * Shares one of the caller's own credentials into an organization
6602
6633
  *
6603
6634
  * The caller must own the credential and be a member of the target
6604
- * organization. The credential stays owned by the caller. Defaults to
6605
- * `visibility: 'public'` (immediately visible to the org); pass
6606
- * `visibility: 'private'` to only link it as a draft, then call
6607
- * `publish()` later to reveal it. Requires authentication.
6635
+ * organization. The credential stays owned by the caller and can be shared
6636
+ * into several organizations; sharing again into the same organization
6637
+ * changes that share's visibility. Defaults to `visibility: 'public'`
6638
+ * (every member can use it); `'private'` links it for the caller's own use
6639
+ * there, and `publish()` later opens it to every member. Requires
6640
+ * authentication.
6608
6641
  *
6609
6642
  * @param id - The credential ID to share
6610
- * @param data - The target organization (and optional draft visibility)
6643
+ * @param data - The target organization (and optional visibility)
6611
6644
  * @param options - Optional request options
6612
6645
  * @returns Promise resolving to the updated credential
6613
6646
  */
6614
6647
  share(id: number, data: ShareCredRequest, options?: globalThis.RequestInit): Promise<UserCredSummary>;
6615
6648
  /**
6616
- * Publishes a draft-linked credential to its organization
6649
+ * Publishes a privately shared credential to its organization
6617
6650
  *
6618
6651
  * Use after calling `share()` with `visibility: 'private'` to make the
6619
- * credential visible to the rest of the organization. Owner-only.
6652
+ * credential usable by every member of that organization. Owner-only.
6620
6653
  * Requires authentication.
6621
6654
  *
6622
6655
  * @param id - The credential ID to publish
6623
6656
  * @param options - Optional request options
6657
+ * @param target - Which share to publish (required once shared into several organizations).
6658
+ * Last so the published `publish(id, options)` signature keeps working.
6624
6659
  * @returns Promise resolving to the updated credential
6625
6660
  */
6626
- publish(id: number, options?: globalThis.RequestInit): Promise<UserCredSummary>;
6661
+ publish(id: number, options?: globalThis.RequestInit, target?: CredShareTargetRequest): Promise<UserCredSummary>;
6627
6662
  /**
6628
- * Unshares a credential from its organization
6663
+ * Removes a credential's share into one organization
6629
6664
  *
6630
- * Flips the credential back to private without deleting it. Callable by
6631
- * the credential's owner, or by an admin of the organization it's shared
6632
- * to. Requires authentication.
6665
+ * Does not delete the credential. Callable by the credential's owner, or
6666
+ * by an admin of that organization. Requires authentication.
6633
6667
  *
6634
6668
  * @param id - The credential ID to unshare
6635
6669
  * @param options - Optional request options
6670
+ * @param target - Which share to remove (required once shared into several organizations).
6671
+ * Last so the published `unshare(id, options)` signature keeps working.
6636
6672
  * @returns Promise resolving to the updated credential
6637
6673
  */
6638
- unshare(id: number, options?: globalThis.RequestInit): Promise<UserCredSummary>;
6674
+ unshare(id: number, options?: globalThis.RequestInit, target?: CredShareTargetRequest): Promise<UserCredSummary>;
6639
6675
  /**
6640
6676
  * Deletes a credential by ID
6641
6677
  *
@@ -7806,11 +7842,12 @@ declare class OrganizationCredsService extends BaseSDK {
7806
7842
  constructor(orgId: OrgRef, options?: MarketSDKOptions, sharedHeaders?: Record<string, string>, sharedTokenState?: SharedTokenState);
7807
7843
  private base;
7808
7844
  /**
7809
- * Lists every credential visible in this organization's context: the
7810
- * org's own directly-owned credentials, any member's published
7811
- * credentials, and the caller's own draft-linked (not yet published)
7812
- * credentials. Each entry's `ownerAccountId`/`ownerType`/
7813
- * `ownerDisplayName`/`ownerNamespace` identify who it actually belongs to.
7845
+ * Lists every credential the caller can see in this organization: the
7846
+ * organization's shared credentials, the caller's own private ones, and
7847
+ * members' personal credentials shared in (published ones, plus the
7848
+ * caller's own private links). `visibility` is the credential's
7849
+ * visibility inside this organization; `ownerAccountId`/`ownerType`/
7850
+ * `ownerDisplayName`/`ownerNamespace` identify who it belongs to.
7814
7851
  */
7815
7852
  list(options?: globalThis.RequestInit): Promise<ListCredsResponse>;
7816
7853
  /**
@@ -7823,6 +7860,14 @@ declare class OrganizationCredsService extends BaseSDK {
7823
7860
  createOAuth(data: CreateOAuthCredRequest, options?: globalThis.RequestInit): Promise<UserCredSummary>;
7824
7861
  createFile(data: CreateFileCredRequest, options?: globalThis.RequestInit): Promise<UserCredSummary>;
7825
7862
  update(id: number, data: UpdateCredRequest, options?: globalThis.RequestInit): Promise<UserCredSummary>;
7863
+ /**
7864
+ * Publishes a private organization credential to every member
7865
+ * (`'public'`) or takes it back to its creator (`'private'`). Creator only.
7866
+ * Fails with 409 when the organization already shares a credential under
7867
+ * the same key (`public_cred_exists`), or when private organization
7868
+ * credentials are not enabled on the server (`private_creds_disabled`).
7869
+ */
7870
+ setVisibility(id: number, visibility: 'private' | 'public', options?: globalThis.RequestInit): Promise<UserCredSummary>;
7826
7871
  delete(id: number, options?: globalThis.RequestInit): Promise<DeleteCredResponse>;
7827
7872
  deleteByKey(key: string, options?: globalThis.RequestInit): Promise<DeleteCredResponse>;
7828
7873
  /**
@@ -8835,6 +8880,8 @@ declare const SDK_USER_AGENT = "LobeHub-Market-SDK/0.31.3";
8835
8880
  * name: 'John Doe',
8836
8881
  * // Omit for the free tier; present for a plan that includes one.
8837
8882
  * sandboxStorage: { key: 'ws-user_xxx', quotaBytes: 2 * 1024 ** 3 },
8883
+ * // Omit for the server default; present to raise (or lower) run concurrency.
8884
+ * sandboxRun: { maxConcurrency: 5 },
8838
8885
  * };
8839
8886
  *
8840
8887
  * const token = createTrustedClientToken(payload, secret);
@@ -8858,6 +8905,15 @@ interface TrustedClientPayload {
8858
8905
  name?: string;
8859
8906
  /** Random nonce for uniqueness */
8860
8907
  nonce: string;
8908
+ /**
8909
+ * One-shot sandbox run entitlement (`POST /api/v1/sandbox/runs`), resolved
8910
+ * from the caller's plan — the workspace's plan for workspace runs.
8911
+ *
8912
+ * Omit (or `null`) for the server default concurrency. When present,
8913
+ * `maxConcurrency` must be a positive integer or Market rejects the token;
8914
+ * Market clamps it to its own `SANDBOX_RUN_MAX_CONCURRENCY_CEILING`.
8915
+ */
8916
+ sandboxRun?: SandboxRunClaim | null;
8861
8917
  /**
8862
8918
  * Persistent sandbox entitlement for this caller, resolved from their plan.
8863
8919
  *
@@ -8906,9 +8962,10 @@ declare function buildTrustedClientPayload(params: {
8906
8962
  email: string;
8907
8963
  emailVerified?: boolean;
8908
8964
  name?: string;
8965
+ sandboxRun?: SandboxRunClaim | null;
8909
8966
  sandboxStorage?: SandboxStorageClaim | null;
8910
8967
  userId: string;
8911
8968
  workspaceId?: string;
8912
8969
  }): TrustedClientPayload;
8913
8970
 
8914
- export { type AccountMeta, type AdminListQueryParams, type AdminListResponse, type AdminPluginParams, type AgentCreateRequest, type AgentCreateResponse, type AgentDetailQuery, type AgentExtension, type AgentForkItem, type AgentForkRequest, type AgentForkResponse, type AgentForkSourceResponse, type AgentForksResponse, type AgentGroupCreateRequest, type AgentGroupCreateResponse, type AgentGroupDetail, type AgentGroupDetailQuery, type AgentGroupForkItem, type AgentGroupForkRequest, type AgentGroupForkResponse, type AgentGroupForkSourceResponse, type AgentGroupForksResponse, type AgentGroupItem, type AgentGroupListQuery, type AgentGroupListResponse, type AgentGroupModifyRequest, type AgentGroupModifyResponse, type AgentGroupStatus, type AgentGroupStatusChangeResponse, type AgentGroupVersionCreateRequest, type AgentGroupVersionCreateResponse, type AgentInstallCountRequest, type AgentInstallCountResponse, type AgentInterface, type AgentListQuery, type AgentModifyRequest, type AgentModifyResponse, type AgentProfileEntity, type AgentProfileResponse, type AgentSecurityRequirement, type AgentSecurityScheme, type AgentStatus, type AgentStatusChangeResponse, type AgentUploadRequest, type AgentUploadResponse, type AgentUploadVersion, type AgentVersionCreateRequest, type AgentVersionCreateResponse, type AgentVersionLocalization, type AgentVersionModifyRequest, type AgentVersionModifyResponse, type AuthorizationCodeTokenRequest, type AuthorizeParams, type AuthorizeResponse, type CallSkillToolResponse, type CheckFavoriteQuery, type CheckFavoriteResponse, type CheckFollowQuery, type CheckFollowResponse, type CheckLikeQuery, type CheckLikeResponse, type CimdClientMetadata, type ClientRegistrationError, type ClientRegistrationRequest, type ClientRegistrationResponse, type CodeInterpreterToolName, type CodeInterpreterToolParams, type ConnectProvider, type ConnectProviderDetail, type ConnectProviderScopes, type ConnectionHealth, type ConnectionStats, type CreateFileCredRequest, type CreateKVCredRequest, type CreateMemberAgent, type CreateOAuthCredRequest, type CredWithPlaintext, type DeleteCredResponse, type Deployment, type DeploymentBuildSummary, type DiscoveryDocument, type EditLocalFileParams, type ExecScriptParams, type ExecuteCodeParams, type ExportFileParams, type FavoriteListResponse, type FavoriteQuery, type FavoriteRequest, type FeedbackClientInfo, type FirstPluginLocalizationInput, type FollowListItem, type FollowListResponse, type FollowRequest, type GetAllConnectionsHealthResponse, type GetAuthorizeUrlParams, type GetClientMetadataParams, type GetCommandOutputParams, type GetConnectProviderResponse, type GetConnectionHealthResponse, type GetConnectionStatsResponse, type GetConnectionStatusResponse, type GetCredOptions, type GetSkillStatusResponse, type GetSkillToolResponse, type GlobLocalFilesParams, type GrepContentParams, type InteractionTargetType, type KillCommandParams, type LikeListResponse, type LikeQuery, type LikeRequest, type ListConnectProvidersResponse, type ListConnectionsResponse, type ListCredsResponse, type ListLocalFilesParams, type ListSkillProvidersResponse, type ListSkillToolsResponse, MarketAPIError, MarketAdmin, type MarketReportGitHubSkillParams, type MarketReportGitHubSkillResponse, type MarketReportSkillInstallParams, type MarketReportSkillInstallResponse, MarketSDK, type MarketSDKOptions, type MarketSkillAuthor, type MarketSkillCategory, type MarketSkillCategoryQuery, type MarketSkillCollectionDetail, type MarketSkillCollectionDetailQuery, type MarketSkillCollectionItemSort, type MarketSkillCollectionListItem, type MarketSkillCollectionListQuery, type MarketSkillCollectionListResponse, type MarketSkillDetail, type MarketSkillDetailQuery, type MarketSkillGitHubMeta, type MarketSkillListItem, type MarketSkillListQuery, type MarketSkillListResponse, type MarketSkillManifest, type MarketSkillResource, type MarketSkillVersionSummary, type MarketSkillVersionsResponse, type MemberAgent, type MoveLocalFilesParams, type MoveOperation, type OAuthConnection, type OAuthTokenResponse, type OrgRef, type OrganizationInfoQuery, type OrganizationInfoResponse, type OrganizationProfile, type OwnAgentGroupListQuery, type OwnAgentListQuery, type PaginationQuery, type PluginCategory, type PluginCommentAuthor, type PluginCommentCreateItem, type PluginCommentCreateResponse, type PluginCommentDeleteResponse, type PluginCommentItem, type PluginCommentListQuery, type PluginCommentListResponse, type PluginCommentRating, type PluginCommentReactionResponse, type PluginI18nImportParams, type PluginI18nImportResponse, type PluginLatestOwnComment, type PluginLocalization, type PluginQueryParams, type PluginRatingDistribution, type PluginUpdateParams, type PluginVersionCreateParams, type PluginVersionUpdateParams, type PreparedDeploymentUpload, type ProgrammingLanguage, type PublishPluginParams, type PublishPluginResponse, type ReadLocalFileParams, type RefreshConnectionResponse, type RefreshTokenRequest, type RegisterUserRequest, type RegisterUserResponse, type RegisteredUserProfile, type RenameLocalFileParams, type ReviewStatus, ReviewStatusEnumSchema, type RevokeConnectionResponse, type RevokeTokenRequest, type RunBuildInToolsContext, type RunBuildInToolsError, type RunBuildInToolsRequest, type RunBuildInToolsResponse, type RunBuildInToolsSuccessData, type RunCommandParams, SDK_USER_AGENT, SDK_VERSION, type SandboxRunParams, type SandboxStorageRequestContext, type SearchLocalFilesParams, type ShareCredRequest, type SharedTokenState, type SkillCallParams, type SkillCommentAuthor, type SkillCommentCreateItem, type SkillCommentCreateResponse, type SkillCommentDeleteResponse, type SkillCommentItem, type SkillCommentListItem, type SkillCommentListQuery, type SkillCommentListResponse, type SkillCommentRating, type SkillErrorResponse, type SkillLatestOwnComment, type SkillProviderInfo, type SkillProviderStatus, type SkillRatingDistribution, type SkillTool, type SkillToolsSource, StatusEnumSchema, type SubmitFeedbackRequest, type SubmitFeedbackResponse, type SubmitRepoParams, type SubmitRepoResponse, type SuccessResponse, type TaskTemplate, type TaskTemplateCategory, type TaskTemplateConnector, type TaskTemplateConnectorReference, type TaskTemplateConnectorSource, type TaskTemplateIcon, type TaskTemplateInterestAreaKey, type TaskTemplateItem, type TaskTemplateLocalizedContent, type TaskTemplateRecommendationQuery, type TaskTemplateRecommendationResponse, type ToggleLikeResponse, type TrustedClientPayload, type UnclaimedPluginItem, type UpdateAgentProfileRequest, type UpdateAgentProfileResponse, type UpdateCredRequest, type UpdateMemberAgent, type UpdateUserInfoRequest, type UpdateUserInfoResponse, type UserAgentGroupItem, type UserAgentItem, type UserInfoQuery, type UserInfoResponse, type UserPluginItem, type UserProfile, type UserSkillItem, VisibilityEnumSchema, type WriteLocalFileParams, buildTrustedClientPayload, createTrustedClientToken, generateNonce, orgRefToPathSegment };
8971
+ export { type AccountMeta, type AdminListQueryParams, type AdminListResponse, type AdminPluginParams, type AgentCreateRequest, type AgentCreateResponse, type AgentDetailQuery, type AgentExtension, type AgentForkItem, type AgentForkRequest, type AgentForkResponse, type AgentForkSourceResponse, type AgentForksResponse, type AgentGroupCreateRequest, type AgentGroupCreateResponse, type AgentGroupDetail, type AgentGroupDetailQuery, type AgentGroupForkItem, type AgentGroupForkRequest, type AgentGroupForkResponse, type AgentGroupForkSourceResponse, type AgentGroupForksResponse, type AgentGroupItem, type AgentGroupListQuery, type AgentGroupListResponse, type AgentGroupModifyRequest, type AgentGroupModifyResponse, type AgentGroupStatus, type AgentGroupStatusChangeResponse, type AgentGroupVersionCreateRequest, type AgentGroupVersionCreateResponse, type AgentInstallCountRequest, type AgentInstallCountResponse, type AgentInterface, type AgentListQuery, type AgentModifyRequest, type AgentModifyResponse, type AgentProfileEntity, type AgentProfileResponse, type AgentSecurityRequirement, type AgentSecurityScheme, type AgentStatus, type AgentStatusChangeResponse, type AgentUploadRequest, type AgentUploadResponse, type AgentUploadVersion, type AgentVersionCreateRequest, type AgentVersionCreateResponse, type AgentVersionLocalization, type AgentVersionModifyRequest, type AgentVersionModifyResponse, type AuthorizationCodeTokenRequest, type AuthorizeParams, type AuthorizeResponse, type CallSkillToolResponse, type CheckFavoriteQuery, type CheckFavoriteResponse, type CheckFollowQuery, type CheckFollowResponse, type CheckLikeQuery, type CheckLikeResponse, type CimdClientMetadata, type ClientRegistrationError, type ClientRegistrationRequest, type ClientRegistrationResponse, type CodeInterpreterToolName, type CodeInterpreterToolParams, type ConnectProvider, type ConnectProviderDetail, type ConnectProviderScopes, type ConnectionHealth, type ConnectionStats, type CreateFileCredRequest, type CreateKVCredRequest, type CreateMemberAgent, type CreateOAuthCredRequest, type CredShareTargetRequest, type CredWithPlaintext, type DeleteCredResponse, type Deployment, type DeploymentBuildSummary, type DiscoveryDocument, type EditLocalFileParams, type ExecScriptParams, type ExecuteCodeParams, type ExportFileParams, type FavoriteListResponse, type FavoriteQuery, type FavoriteRequest, type FeedbackClientInfo, type FirstPluginLocalizationInput, type FollowListItem, type FollowListResponse, type FollowRequest, type GetAllConnectionsHealthResponse, type GetAuthorizeUrlParams, type GetClientMetadataParams, type GetCommandOutputParams, type GetConnectProviderResponse, type GetConnectionHealthResponse, type GetConnectionStatsResponse, type GetConnectionStatusResponse, type GetCredOptions, type GetSkillStatusResponse, type GetSkillToolResponse, type GlobLocalFilesParams, type GrepContentParams, type InteractionTargetType, type KillCommandParams, type LikeListResponse, type LikeQuery, type LikeRequest, type ListConnectProvidersResponse, type ListConnectionsResponse, type ListCredsResponse, type ListLocalFilesParams, type ListSkillProvidersResponse, type ListSkillToolsResponse, MarketAPIError, MarketAdmin, type MarketReportGitHubSkillParams, type MarketReportGitHubSkillResponse, type MarketReportSkillInstallParams, type MarketReportSkillInstallResponse, MarketSDK, type MarketSDKOptions, type MarketSkillAuthor, type MarketSkillCategory, type MarketSkillCategoryQuery, type MarketSkillCollectionDetail, type MarketSkillCollectionDetailQuery, type MarketSkillCollectionItemSort, type MarketSkillCollectionListItem, type MarketSkillCollectionListQuery, type MarketSkillCollectionListResponse, type MarketSkillDetail, type MarketSkillDetailQuery, type MarketSkillGitHubMeta, type MarketSkillListItem, type MarketSkillListQuery, type MarketSkillListResponse, type MarketSkillManifest, type MarketSkillResource, type MarketSkillVersionSummary, type MarketSkillVersionsResponse, type MemberAgent, type MoveLocalFilesParams, type MoveOperation, type OAuthConnection, type OAuthTokenResponse, type OrgRef, type OrganizationInfoQuery, type OrganizationInfoResponse, type OrganizationProfile, type OwnAgentGroupListQuery, type OwnAgentListQuery, type PaginationQuery, type PluginCategory, type PluginCommentAuthor, type PluginCommentCreateItem, type PluginCommentCreateResponse, type PluginCommentDeleteResponse, type PluginCommentItem, type PluginCommentListQuery, type PluginCommentListResponse, type PluginCommentRating, type PluginCommentReactionResponse, type PluginI18nImportParams, type PluginI18nImportResponse, type PluginLatestOwnComment, type PluginLocalization, type PluginQueryParams, type PluginRatingDistribution, type PluginUpdateParams, type PluginVersionCreateParams, type PluginVersionUpdateParams, type PreparedDeploymentUpload, type ProgrammingLanguage, type PublishPluginParams, type PublishPluginResponse, type ReadLocalFileParams, type RefreshConnectionResponse, type RefreshTokenRequest, type RegisterUserRequest, type RegisterUserResponse, type RegisteredUserProfile, type RenameLocalFileParams, type ReviewStatus, ReviewStatusEnumSchema, type RevokeConnectionResponse, type RevokeTokenRequest, type RunBuildInToolsContext, type RunBuildInToolsError, type RunBuildInToolsRequest, type RunBuildInToolsResponse, type RunBuildInToolsSuccessData, type RunCommandParams, SDK_USER_AGENT, SDK_VERSION, type SandboxRunParams, type SandboxStorageRequestContext, type SearchLocalFilesParams, type ShareCredRequest, type SharedTokenState, type SkillCallParams, type SkillCommentAuthor, type SkillCommentCreateItem, type SkillCommentCreateResponse, type SkillCommentDeleteResponse, type SkillCommentItem, type SkillCommentListItem, type SkillCommentListQuery, type SkillCommentListResponse, type SkillCommentRating, type SkillErrorResponse, type SkillLatestOwnComment, type SkillProviderInfo, type SkillProviderStatus, type SkillRatingDistribution, type SkillTool, type SkillToolsSource, StatusEnumSchema, type SubmitFeedbackRequest, type SubmitFeedbackResponse, type SubmitRepoParams, type SubmitRepoResponse, type SuccessResponse, type TaskTemplate, type TaskTemplateCategory, type TaskTemplateConnector, type TaskTemplateConnectorReference, type TaskTemplateConnectorSource, type TaskTemplateIcon, type TaskTemplateInterestAreaKey, type TaskTemplateItem, type TaskTemplateLocalizedContent, type TaskTemplateRecommendationQuery, type TaskTemplateRecommendationResponse, type ToggleLikeResponse, type TrustedClientPayload, type UnclaimedPluginItem, type UpdateAgentProfileRequest, type UpdateAgentProfileResponse, type UpdateCredRequest, type UpdateMemberAgent, type UpdateUserInfoRequest, type UpdateUserInfoResponse, type UserAgentGroupItem, type UserAgentItem, type UserInfoQuery, type UserInfoResponse, type UserPluginItem, type UserProfile, type UserSkillItem, VisibilityEnumSchema, type WriteLocalFileParams, buildTrustedClientPayload, createTrustedClientToken, generateNonce, orgRefToPathSegment };
package/dist/index.mjs CHANGED
@@ -3689,16 +3689,18 @@ var CredService = class extends BaseSDK {
3689
3689
  // Share Operations
3690
3690
  // ===========================================================================
3691
3691
  /**
3692
- * Shares one of the caller's own credentials with an organization
3692
+ * Shares one of the caller's own credentials into an organization
3693
3693
  *
3694
3694
  * The caller must own the credential and be a member of the target
3695
- * organization. The credential stays owned by the caller. Defaults to
3696
- * `visibility: 'public'` (immediately visible to the org); pass
3697
- * `visibility: 'private'` to only link it as a draft, then call
3698
- * `publish()` later to reveal it. Requires authentication.
3695
+ * organization. The credential stays owned by the caller and can be shared
3696
+ * into several organizations; sharing again into the same organization
3697
+ * changes that share's visibility. Defaults to `visibility: 'public'`
3698
+ * (every member can use it); `'private'` links it for the caller's own use
3699
+ * there, and `publish()` later opens it to every member. Requires
3700
+ * authentication.
3699
3701
  *
3700
3702
  * @param id - The credential ID to share
3701
- * @param data - The target organization (and optional draft visibility)
3703
+ * @param data - The target organization (and optional visibility)
3702
3704
  * @param options - Optional request options
3703
3705
  * @returns Promise resolving to the updated credential
3704
3706
  */
@@ -3716,19 +3718,25 @@ var CredService = class extends BaseSDK {
3716
3718
  return result;
3717
3719
  }
3718
3720
  /**
3719
- * Publishes a draft-linked credential to its organization
3721
+ * Publishes a privately shared credential to its organization
3720
3722
  *
3721
3723
  * Use after calling `share()` with `visibility: 'private'` to make the
3722
- * credential visible to the rest of the organization. Owner-only.
3724
+ * credential usable by every member of that organization. Owner-only.
3723
3725
  * Requires authentication.
3724
3726
  *
3725
3727
  * @param id - The credential ID to publish
3726
3728
  * @param options - Optional request options
3729
+ * @param target - Which share to publish (required once shared into several organizations).
3730
+ * Last so the published `publish(id, options)` signature keeps working.
3727
3731
  * @returns Promise resolving to the updated credential
3728
3732
  */
3729
- async publish(id, options) {
3730
- log20("Publishing credential: %d", id);
3733
+ async publish(id, options, target = {}) {
3734
+ log20("Publishing credential %d (org=%s)", id, target.orgId);
3731
3735
  const result = await this.request(`/v1/user/creds/${id}/publish`, {
3736
+ body: JSON.stringify(target),
3737
+ headers: {
3738
+ "Content-Type": "application/json"
3739
+ },
3732
3740
  method: "POST",
3733
3741
  ...options
3734
3742
  });
@@ -3736,19 +3744,24 @@ var CredService = class extends BaseSDK {
3736
3744
  return result;
3737
3745
  }
3738
3746
  /**
3739
- * Unshares a credential from its organization
3747
+ * Removes a credential's share into one organization
3740
3748
  *
3741
- * Flips the credential back to private without deleting it. Callable by
3742
- * the credential's owner, or by an admin of the organization it's shared
3743
- * to. Requires authentication.
3749
+ * Does not delete the credential. Callable by the credential's owner, or
3750
+ * by an admin of that organization. Requires authentication.
3744
3751
  *
3745
3752
  * @param id - The credential ID to unshare
3746
3753
  * @param options - Optional request options
3754
+ * @param target - Which share to remove (required once shared into several organizations).
3755
+ * Last so the published `unshare(id, options)` signature keeps working.
3747
3756
  * @returns Promise resolving to the updated credential
3748
3757
  */
3749
- async unshare(id, options) {
3750
- log20("Unsharing credential: %d", id);
3758
+ async unshare(id, options, target = {}) {
3759
+ log20("Unsharing credential %d (org=%s)", id, target.orgId);
3751
3760
  const result = await this.request(`/v1/user/creds/${id}/unshare`, {
3761
+ body: JSON.stringify(target),
3762
+ headers: {
3763
+ "Content-Type": "application/json"
3764
+ },
3752
3765
  method: "POST",
3753
3766
  ...options
3754
3767
  });
@@ -5712,11 +5725,12 @@ var OrganizationCredsService = class extends BaseSDK {
5712
5725
  // Read
5713
5726
  // ===========================================================================
5714
5727
  /**
5715
- * Lists every credential visible in this organization's context: the
5716
- * org's own directly-owned credentials, any member's published
5717
- * credentials, and the caller's own draft-linked (not yet published)
5718
- * credentials. Each entry's `ownerAccountId`/`ownerType`/
5719
- * `ownerDisplayName`/`ownerNamespace` identify who it actually belongs to.
5728
+ * Lists every credential the caller can see in this organization: the
5729
+ * organization's shared credentials, the caller's own private ones, and
5730
+ * members' personal credentials shared in (published ones, plus the
5731
+ * caller's own private links). `visibility` is the credential's
5732
+ * visibility inside this organization; `ownerAccountId`/`ownerType`/
5733
+ * `ownerDisplayName`/`ownerNamespace` identify who it belongs to.
5720
5734
  */
5721
5735
  async list(options) {
5722
5736
  var _a;
@@ -5782,6 +5796,22 @@ var OrganizationCredsService = class extends BaseSDK {
5782
5796
  ...options
5783
5797
  });
5784
5798
  }
5799
+ /**
5800
+ * Publishes a private organization credential to every member
5801
+ * (`'public'`) or takes it back to its creator (`'private'`). Creator only.
5802
+ * Fails with 409 when the organization already shares a credential under
5803
+ * the same key (`public_cred_exists`), or when private organization
5804
+ * credentials are not enabled on the server (`private_creds_disabled`).
5805
+ */
5806
+ async setVisibility(id, visibility, options) {
5807
+ log31("Setting org %s credential %d visibility=%s", this.orgSegment, id, visibility);
5808
+ return this.request(`${this.base()}/${id}/visibility`, {
5809
+ body: JSON.stringify({ visibility }),
5810
+ headers: { "Content-Type": "application/json" },
5811
+ method: "POST",
5812
+ ...options
5813
+ });
5814
+ }
5785
5815
  // ===========================================================================
5786
5816
  // Delete
5787
5817
  // ===========================================================================