@lobehub/market-sdk 0.43.0 → 0.44.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 +27 -3
- package/dist/index.mjs +34 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
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, 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, 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';
|
|
@@ -5614,6 +5614,8 @@ declare class SandboxStorageService$1 extends BaseSDK {
|
|
|
5614
5614
|
data: AdminSandboxEfsUsage;
|
|
5615
5615
|
}>;
|
|
5616
5616
|
list(params?: AdminSandboxStorageQuery): Promise<AdminSandboxStorageList>;
|
|
5617
|
+
/** Usage added up per workspace: its shared disk plus every member's own disk. */
|
|
5618
|
+
listWorkspaces(params?: AdminSandboxStorageWorkspaceQuery): Promise<AdminSandboxStorageWorkspaceList>;
|
|
5617
5619
|
get(key: string): Promise<{
|
|
5618
5620
|
data: AdminSandboxStorage;
|
|
5619
5621
|
}>;
|
|
@@ -7174,8 +7176,15 @@ declare class SandboxService extends BaseSDK {
|
|
|
7174
7176
|
* `/mnt/workspace/ws-.../reports/q3.md`).
|
|
7175
7177
|
*/
|
|
7176
7178
|
declare class SandboxStorageService extends BaseSDK {
|
|
7177
|
-
/**
|
|
7178
|
-
|
|
7179
|
+
/**
|
|
7180
|
+
* Storage directory, quota and the last measured usage.
|
|
7181
|
+
*
|
|
7182
|
+
* `query.drives` also lists every disk in a workspace-billed storage's pool
|
|
7183
|
+
* with its stored figure (`workspaceDrives`), in this one read.
|
|
7184
|
+
*/
|
|
7185
|
+
getStorage(key?: string, options?: globalThis.RequestInit, query?: {
|
|
7186
|
+
drives?: boolean;
|
|
7187
|
+
}): Promise<SandboxStorageInfo>;
|
|
7179
7188
|
/**
|
|
7180
7189
|
* Re-measure the storage size. Costs a sandbox round trip and walks the
|
|
7181
7190
|
* whole directory, so call it on demand rather than on every render.
|
|
@@ -7275,6 +7284,21 @@ declare class SandboxStorageService extends BaseSDK {
|
|
|
7275
7284
|
}, options?: globalThis.RequestInit): Promise<{
|
|
7276
7285
|
path: string;
|
|
7277
7286
|
}>;
|
|
7287
|
+
/**
|
|
7288
|
+
* Rename or move a file or folder inside the storage.
|
|
7289
|
+
*
|
|
7290
|
+
* Never overwrites: an existing `newPath` is refused with 409
|
|
7291
|
+
* `FILE_ALREADY_EXISTS`. The destination folder must already exist.
|
|
7292
|
+
* Always runs in a sandbox session, so it is slower than the other file
|
|
7293
|
+
* operations on a deployment that serves those directly.
|
|
7294
|
+
*/
|
|
7295
|
+
renameFile(params: SandboxStorageRequestContext & {
|
|
7296
|
+
key?: string;
|
|
7297
|
+
newPath: string;
|
|
7298
|
+
path: string;
|
|
7299
|
+
}, options?: globalThis.RequestInit): Promise<{
|
|
7300
|
+
path: string;
|
|
7301
|
+
}>;
|
|
7278
7302
|
}
|
|
7279
7303
|
|
|
7280
7304
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -2062,6 +2062,10 @@ var SandboxStorageService = class extends BaseSDK {
|
|
|
2062
2062
|
list(params = {}) {
|
|
2063
2063
|
return this.request(`/admin/sandbox-storage${this.buildQueryString(params)}`);
|
|
2064
2064
|
}
|
|
2065
|
+
/** Usage added up per workspace: its shared disk plus every member's own disk. */
|
|
2066
|
+
listWorkspaces(params = {}) {
|
|
2067
|
+
return this.request(`/admin/sandbox-storage/workspaces${this.buildQueryString(params)}`);
|
|
2068
|
+
}
|
|
2065
2069
|
get(key) {
|
|
2066
2070
|
return this.request(`/admin/sandbox-storage/${encodeURIComponent(key)}`);
|
|
2067
2071
|
}
|
|
@@ -4715,11 +4719,17 @@ var SandboxService = class extends BaseSDK {
|
|
|
4715
4719
|
import debug26 from "debug";
|
|
4716
4720
|
var log26 = debug26("lobe-market-sdk:sandbox-storage");
|
|
4717
4721
|
var SandboxStorageService2 = class extends BaseSDK {
|
|
4718
|
-
/**
|
|
4719
|
-
|
|
4722
|
+
/**
|
|
4723
|
+
* Storage directory, quota and the last measured usage.
|
|
4724
|
+
*
|
|
4725
|
+
* `query.drives` also lists every disk in a workspace-billed storage's pool
|
|
4726
|
+
* with its stored figure (`workspaceDrives`), in this one read.
|
|
4727
|
+
*/
|
|
4728
|
+
async getStorage(key = "current", options, query) {
|
|
4720
4729
|
log26("Getting sandbox storage: %s", key);
|
|
4730
|
+
const suffix = (query == null ? void 0 : query.drives) ? "?drives=true" : "";
|
|
4721
4731
|
const result = await this.request(
|
|
4722
|
-
`/v1/sandbox/storages/${encodeURIComponent(key)}`,
|
|
4732
|
+
`/v1/sandbox/storages/${encodeURIComponent(key)}${suffix}`,
|
|
4723
4733
|
{ ...options, method: "GET" }
|
|
4724
4734
|
);
|
|
4725
4735
|
return result.data;
|
|
@@ -4879,6 +4889,27 @@ var SandboxStorageService2 = class extends BaseSDK {
|
|
|
4879
4889
|
);
|
|
4880
4890
|
return result.data;
|
|
4881
4891
|
}
|
|
4892
|
+
/**
|
|
4893
|
+
* Rename or move a file or folder inside the storage.
|
|
4894
|
+
*
|
|
4895
|
+
* Never overwrites: an existing `newPath` is refused with 409
|
|
4896
|
+
* `FILE_ALREADY_EXISTS`. The destination folder must already exist.
|
|
4897
|
+
* Always runs in a sandbox session, so it is slower than the other file
|
|
4898
|
+
* operations on a deployment that serves those directly.
|
|
4899
|
+
*/
|
|
4900
|
+
async renameFile(params, options) {
|
|
4901
|
+
const { key = "current", newPath, path, topicId } = params;
|
|
4902
|
+
log26("Renaming sandbox storage path: %s/%s -> %s", key, path, newPath);
|
|
4903
|
+
const result = await this.request(
|
|
4904
|
+
`/v1/sandbox/storages/${encodeURIComponent(key)}/rename`,
|
|
4905
|
+
{
|
|
4906
|
+
...options,
|
|
4907
|
+
body: JSON.stringify({ newPath, path, topicId }),
|
|
4908
|
+
method: "POST"
|
|
4909
|
+
}
|
|
4910
|
+
);
|
|
4911
|
+
return result.data;
|
|
4912
|
+
}
|
|
4882
4913
|
};
|
|
4883
4914
|
|
|
4884
4915
|
// src/market/services/SkillService.ts
|