@ultrst-armada/kloks 2.0.4 → 2.1.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/package.json +76 -1
- package/packages/backend/dist/api/index.js +2 -1
- package/packages/backend/dist/chunk-23LS4LWC.js +746 -0
- package/packages/backend/dist/chunk-3UZFKB4M.js +28 -0
- package/packages/backend/dist/chunk-5GW5PJWQ.js +96 -0
- package/packages/backend/dist/chunk-5SXOQAAX.js +41 -0
- package/packages/backend/dist/chunk-5UVJDX7Q.js +44 -0
- package/packages/backend/dist/{chunk-5F5V7NAG.js → chunk-5Y7K7HAT.js} +4 -1
- package/packages/backend/dist/chunk-6BL5DXFZ.js +43 -0
- package/packages/backend/dist/{chunk-OXEP3AP6.js → chunk-6I7I4C6H.js} +158 -1
- package/packages/backend/dist/{chunk-SQKG3S6P.js → chunk-AUNIGE6Q.js} +2 -2
- package/packages/backend/dist/{chunk-NY2SQOXI.js → chunk-CDRHYO44.js} +4 -1
- package/packages/backend/dist/{chunk-ZBNSK26X.js → chunk-CV55JMT7.js} +6 -5
- package/packages/backend/dist/{chunk-KPLDYX5Z.js → chunk-DJ457D5D.js} +33 -26
- package/packages/backend/dist/{chunk-FK3OAUXM.js → chunk-DTPCWHQJ.js} +4 -2
- package/packages/backend/dist/{chunk-OWMQLML7.js → chunk-EMSSTOOK.js} +33 -2
- package/packages/backend/dist/{chunk-Z6G32NQQ.js → chunk-ENMIBY2V.js} +12 -9
- package/packages/backend/dist/chunk-EQFZX3JT.js +63 -0
- package/packages/backend/dist/chunk-FKK23J2A.js +363 -0
- package/packages/backend/dist/chunk-GTKW4IGC.js +197 -0
- package/packages/backend/dist/chunk-GVMVYC6C.js +0 -0
- package/packages/backend/dist/chunk-HRJCGJTR.js +261 -0
- package/packages/backend/dist/chunk-I6T64MLT.js +171 -0
- package/packages/backend/dist/chunk-IKDYKRVH.js +51 -0
- package/packages/backend/dist/chunk-IP6XWQU2.js +48 -0
- package/packages/backend/dist/chunk-JGR6BJVX.js +74 -0
- package/packages/backend/dist/{chunk-POLVHTHJ.js → chunk-KCPQWJBO.js} +4 -1
- package/packages/backend/dist/chunk-LC6ULEM2.js +125 -0
- package/packages/backend/dist/{chunk-NTKUQVCQ.js → chunk-LMUMMVTU.js} +14 -2
- package/packages/backend/dist/chunk-LMY6MGFD.js +78 -0
- package/packages/backend/dist/chunk-NFK6YFTA.js +157 -0
- package/packages/backend/dist/chunk-NZWCPJDJ.js +82 -0
- package/packages/backend/dist/chunk-OT2PSPBK.js +74 -0
- package/packages/backend/dist/chunk-QYWVZBI6.js +54 -0
- package/packages/backend/dist/chunk-TOLAWKAY.js +1132 -0
- package/packages/backend/dist/{chunk-OQRQCDS6.js → chunk-TRJVVNO7.js} +2 -2
- package/packages/backend/dist/chunk-U7T65YUP.js +889 -0
- package/packages/backend/dist/chunk-YFMHT77Z.js +58 -0
- package/packages/backend/dist/client-JXGCPWEA.js +7 -0
- package/packages/backend/dist/control-plane/index.js +3 -1
- package/packages/backend/dist/core/b2DirectCore.test.d.ts +1 -0
- package/packages/backend/dist/core/cloudflareIntegrationCore.test.d.ts +1 -0
- package/packages/backend/dist/core/googleDriveOAuthCore.d.ts +51 -0
- package/packages/backend/dist/core/googleDriveOAuthCore.test.d.ts +1 -0
- package/packages/backend/dist/core/index.d.ts +3 -0
- package/packages/backend/dist/core/storageConnectionCore.d.ts +136 -0
- package/packages/backend/dist/core/storageConnectionCore.test.d.ts +1 -0
- package/packages/backend/dist/core/storageConnectionRuntimeCore.d.ts +57 -0
- package/packages/backend/dist/core/storageConnectionRuntimeCore.test.d.ts +1 -0
- package/packages/backend/dist/core/storageContracts.d.ts +77 -0
- package/packages/backend/dist/core/storageProviderRegistry.d.ts +7 -0
- package/packages/backend/dist/core/systemCredentialsCore.d.ts +46 -0
- package/packages/backend/dist/core/unifiedDb.d.ts +12 -2
- package/packages/backend/dist/core/unifiedDb.errors.test.d.ts +1 -0
- package/packages/backend/dist/core/unifiedDbNodeAdapter.d.ts +6 -0
- package/packages/backend/dist/core/workspaceBucketSyncCore.d.ts +3 -4
- package/packages/backend/dist/core/workspaceBucketSyncCore.test.d.ts +1 -0
- package/packages/backend/dist/core/workspaceCore.d.ts +25 -6
- package/packages/backend/dist/core/workspaceDataCore.test.d.ts +1 -0
- package/packages/backend/dist/core/workspaceFileCore.d.ts +25 -7
- package/packages/backend/dist/core/workspaceFileCore.test.d.ts +1 -0
- package/packages/backend/dist/core/workspaceFileNodeAdapter.d.ts +6 -0
- package/packages/backend/dist/core/workspaceStorageDetailsCore.d.ts +4 -8
- package/packages/backend/dist/core/workspaceStorageDetailsCore.test.d.ts +1 -0
- package/packages/backend/dist/development/index.js +1 -1
- package/packages/backend/dist/development/playwrightInspectionService.js +1 -1
- package/packages/backend/dist/development/playwrightInspectionSupport.d.ts +1 -0
- package/packages/backend/dist/index.d.ts +1 -0
- package/packages/backend/dist/index.js +130 -15
- package/packages/backend/dist/krnl-services.d.ts +0 -22
- package/packages/backend/dist/krnl-services.js +8 -19
- package/packages/backend/dist/krnl-services.node.d.ts +28 -0
- package/packages/backend/dist/node.d.ts +4 -0
- package/packages/backend/dist/node.js +670 -454
- package/packages/backend/dist/provider-services/capacity.d.ts +2 -0
- package/packages/backend/dist/provider-services/client.d.ts +18 -0
- package/packages/backend/dist/provider-services/cloudflare.d.ts +6 -0
- package/packages/backend/dist/provider-services/facades.d.ts +44 -0
- package/packages/backend/dist/provider-services/gemini.d.ts +8 -0
- package/packages/backend/dist/provider-services/google/cloud-run.d.ts +1 -0
- package/packages/backend/dist/provider-services/google/cloud-run.js +9 -0
- package/packages/backend/dist/provider-services/google/cloud-shell.d.ts +1 -0
- package/packages/backend/dist/provider-services/google/cloud-shell.js +9 -0
- package/packages/backend/dist/provider-services/google/cloud-storage.d.ts +1 -0
- package/packages/backend/dist/provider-services/google/cloud-storage.js +9 -0
- package/packages/backend/dist/provider-services/google/drive.d.ts +4 -0
- package/packages/backend/dist/provider-services/google/drive.js +20 -0
- package/packages/backend/dist/provider-services/google/gemini.d.ts +2 -0
- package/packages/backend/dist/provider-services/google/gemini.js +10 -0
- package/packages/backend/dist/provider-services/google/index.d.ts +3 -0
- package/packages/backend/dist/provider-services/google/index.js +17 -0
- package/packages/backend/dist/provider-services/google/vertex-ai.d.ts +1 -0
- package/packages/backend/dist/provider-services/google/vertex-ai.js +9 -0
- package/packages/backend/dist/provider-services/index.d.ts +11 -0
- package/packages/backend/dist/provider-services/index.js +118 -0
- package/packages/backend/dist/provider-services/node.d.ts +4 -0
- package/packages/backend/dist/provider-services/node.js +40 -0
- package/packages/backend/dist/provider-services/operations.d.ts +28 -0
- package/packages/backend/dist/provider-services/operations.test.d.ts +1 -0
- package/packages/backend/dist/provider-services/provider-services.test.d.ts +1 -0
- package/packages/backend/dist/provider-services/registry.d.ts +16 -0
- package/packages/backend/dist/provider-services/storage/backblaze-b2.d.ts +7 -0
- package/packages/backend/dist/provider-services/storage/backblaze-b2.js +8 -0
- package/packages/backend/dist/provider-services/storage/contract.d.ts +45 -0
- package/packages/backend/dist/provider-services/storage/dropbox.d.ts +3 -0
- package/packages/backend/dist/provider-services/storage/dropbox.js +12 -0
- package/packages/backend/dist/provider-services/storage/github.d.ts +4 -0
- package/packages/backend/dist/provider-services/storage/github.js +12 -0
- package/packages/backend/dist/provider-services/storage/google-drive.d.ts +4 -0
- package/packages/backend/dist/provider-services/storage/index.d.ts +7 -0
- package/packages/backend/dist/provider-services/storage/node.d.ts +2 -0
- package/packages/backend/dist/provider-services/storage/node.js +17 -0
- package/packages/backend/dist/provider-services/storage/service.d.ts +27 -0
- package/packages/backend/dist/provider-services/storage/storage-contract.test.d.ts +1 -0
- package/packages/backend/dist/provider-services/storage-facades.d.ts +55 -0
- package/packages/backend/dist/provider-services/storage-node.d.ts +11 -0
- package/packages/backend/dist/provider-services/storage-providers.d.ts +30 -0
- package/packages/backend/dist/provider-services/storage-providers.test.d.ts +1 -0
- package/packages/backend/dist/provider-services/storage.d.ts +3 -0
- package/packages/backend/dist/provider-services/storage.js +29 -0
- package/packages/backend/dist/provider-services/types.d.ts +61 -0
- package/packages/backend/dist/provider-services/vercel.d.ts +13 -0
- package/packages/backend/dist/resolver/index.js +13 -0
- package/packages/backend/dist/resolver/systemDatabaseUrl.d.ts +16 -12
- package/packages/backend/dist/services/node.js +12 -10
- package/packages/backend/dist/srkl/index.js +6 -4
- package/packages/backend/dist/storage/B2DirectClient.d.ts +7 -13
- package/packages/backend/dist/storage/B2DirectClient.test.d.ts +1 -0
- package/packages/backend/dist/storage/GoogleDriveWorkspaceService.d.ts +5 -0
- package/packages/backend/dist/storage/index.js +4 -3
- package/packages/backend/dist/storage/node.js +7 -6
- package/packages/backend/dist/storage-workspace.js +1 -1
- package/packages/backend/dist/workspace/index.js +2 -1
- package/packages/backend/dist/workspace/node.js +12 -7
- package/packages/backend/dist/workspaceFileCore-RQO7YMRD.js +28 -0
- package/packages/backend/package.json +78 -3
- package/packages/services/dist/index.js +8 -2
- package/packages/backend/dist/chunk-4QEMALXF.js +0 -90
- package/packages/backend/dist/chunk-AOZSDRNY.js +0 -159
- package/packages/backend/dist/chunk-GYSZ6CAX.js +0 -19
- package/packages/backend/dist/chunk-JCMB7BIM.js +0 -211
- package/packages/backend/dist/chunk-JGUWYVOL.js +0 -570
- package/packages/backend/dist/chunk-LMOM7CST.js +0 -427
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ProviderConnection } from './types.js';
|
|
2
|
+
export interface ProviderRequest {
|
|
3
|
+
path: string;
|
|
4
|
+
method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
5
|
+
body?: unknown;
|
|
6
|
+
timeoutMs?: number;
|
|
7
|
+
query?: Record<string, string | number | boolean>;
|
|
8
|
+
}
|
|
9
|
+
export interface ProviderResponse<T> {
|
|
10
|
+
data: T;
|
|
11
|
+
status: number;
|
|
12
|
+
headers: Headers;
|
|
13
|
+
}
|
|
14
|
+
/** Server-side only: callers resolve scoped credentials from SRKL/Luth before creation. */
|
|
15
|
+
export declare function createProviderClient(connection: ProviderConnection, transport?: typeof fetch): {
|
|
16
|
+
providerId: string;
|
|
17
|
+
request: <T = unknown>(options: ProviderRequest) => Promise<ProviderResponse<T>>;
|
|
18
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ProviderConnection, ProviderUsageSnapshot } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Measure Cloudflare Workers Free DAILY requests, not a fictional monthly quota.
|
|
4
|
+
* Paid plans require an explicit budget policy and are not eligible by default.
|
|
5
|
+
*/
|
|
6
|
+
export declare function fetchCloudflareCapacity(connection: ProviderConnection, plan: 'free' | 'paid', now?: Date, transport?: typeof fetch): Promise<ProviderUsageSnapshot>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
export declare const CloudflareProviderService: {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
version: string;
|
|
5
|
+
runtime: "server";
|
|
6
|
+
deployment: "local";
|
|
7
|
+
definition: import("@ultrst-armada/krnl").ServiceDefinition<Record<string, unknown>, Record<string, unknown>>;
|
|
8
|
+
readonly telemetry: import("@ultrst-armada/krnl").TelemetryController;
|
|
9
|
+
createInstance: () => import("@ultrst-armada/krnl").ServiceInstance<Record<string, unknown>, Record<string, unknown>>;
|
|
10
|
+
execute: <TIn = unknown, TOut = unknown>(operation: string, input: TIn) => Promise<TOut>;
|
|
11
|
+
};
|
|
12
|
+
export declare const VercelProviderService: {
|
|
13
|
+
id: string;
|
|
14
|
+
name: string;
|
|
15
|
+
version: string;
|
|
16
|
+
runtime: "server";
|
|
17
|
+
deployment: "local";
|
|
18
|
+
definition: import("@ultrst-armada/krnl").ServiceDefinition<Record<string, unknown>, Record<string, unknown>>;
|
|
19
|
+
readonly telemetry: import("@ultrst-armada/krnl").TelemetryController;
|
|
20
|
+
createInstance: () => import("@ultrst-armada/krnl").ServiceInstance<Record<string, unknown>, Record<string, unknown>>;
|
|
21
|
+
execute: <TIn = unknown, TOut = unknown>(operation: string, input: TIn) => Promise<TOut>;
|
|
22
|
+
};
|
|
23
|
+
export declare const GoogleAccountProviderService: {
|
|
24
|
+
id: string;
|
|
25
|
+
name: string;
|
|
26
|
+
version: string;
|
|
27
|
+
runtime: "server";
|
|
28
|
+
deployment: "local";
|
|
29
|
+
definition: import("@ultrst-armada/krnl").ServiceDefinition<Record<string, unknown>, Record<string, unknown>>;
|
|
30
|
+
readonly telemetry: import("@ultrst-armada/krnl").TelemetryController;
|
|
31
|
+
createInstance: () => import("@ultrst-armada/krnl").ServiceInstance<Record<string, unknown>, Record<string, unknown>>;
|
|
32
|
+
execute: <TIn = unknown, TOut = unknown>(operation: string, input: TIn) => Promise<TOut>;
|
|
33
|
+
};
|
|
34
|
+
export declare const GeminiProviderService: {
|
|
35
|
+
id: string;
|
|
36
|
+
name: string;
|
|
37
|
+
version: string;
|
|
38
|
+
runtime: "server";
|
|
39
|
+
deployment: "local";
|
|
40
|
+
definition: import("@ultrst-armada/krnl").ServiceDefinition<Record<string, unknown>, Record<string, unknown>>;
|
|
41
|
+
readonly telemetry: import("@ultrst-armada/krnl").TelemetryController;
|
|
42
|
+
createInstance: () => import("@ultrst-armada/krnl").ServiceInstance<Record<string, unknown>, Record<string, unknown>>;
|
|
43
|
+
execute: <TIn = unknown, TOut = unknown>(operation: string, input: TIn) => Promise<TOut>;
|
|
44
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ProviderConnection, ProviderUsageSnapshot } from './types.js';
|
|
2
|
+
/** Gemini key can enumerate models, but does not imply Google OAuth/Drive grants. */
|
|
3
|
+
export declare function listGeminiModels(connection: ProviderConnection, transport?: typeof fetch): Promise<Array<{
|
|
4
|
+
name: string;
|
|
5
|
+
displayName?: string;
|
|
6
|
+
}>>;
|
|
7
|
+
/** Model/project-specific quotas cannot be inferred from an account's API key. */
|
|
8
|
+
export declare function getGeminiQuotaStatus(accountId: string): ProviderUsageSnapshot;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const cloudRunService: import("../types.js").ProviderDefinition;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const cloudShellService: import("../types.js").ProviderDefinition;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const cloudStorageService: import("../types.js").ProviderDefinition;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/** Selectively import Google Drive. No Gemini API or other Google Cloud services. */
|
|
2
|
+
export { GoogleDriveWorkspaceService, GOOGLE_DRIVE_WORKSPACE_SCOPE } from '../../storage/GoogleDriveWorkspaceService.js';
|
|
3
|
+
export { createGoogleDriveStorageService } from '../storage/google-drive.js';
|
|
4
|
+
export declare const driveService: import("../types.js").ProviderDefinition;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createGoogleDriveStorageService
|
|
3
|
+
} from "../../chunk-6BL5DXFZ.js";
|
|
4
|
+
import {
|
|
5
|
+
getProviderService
|
|
6
|
+
} from "../../chunk-FKK23J2A.js";
|
|
7
|
+
import "../../chunk-5UVJDX7Q.js";
|
|
8
|
+
import {
|
|
9
|
+
GOOGLE_DRIVE_WORKSPACE_SCOPE,
|
|
10
|
+
GoogleDriveWorkspaceService
|
|
11
|
+
} from "../../chunk-EMSSTOOK.js";
|
|
12
|
+
|
|
13
|
+
// src/provider-services/google/drive.ts
|
|
14
|
+
var driveService = getProviderService("google-drive");
|
|
15
|
+
export {
|
|
16
|
+
GOOGLE_DRIVE_WORKSPACE_SCOPE,
|
|
17
|
+
GoogleDriveWorkspaceService,
|
|
18
|
+
createGoogleDriveStorageService,
|
|
19
|
+
driveService
|
|
20
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
getGoogleAccountProfile
|
|
3
|
+
} from "../../chunk-EQFZX3JT.js";
|
|
4
|
+
import "../../chunk-YFMHT77Z.js";
|
|
5
|
+
import {
|
|
6
|
+
getProviderService,
|
|
7
|
+
listProviderServiceChildren
|
|
8
|
+
} from "../../chunk-FKK23J2A.js";
|
|
9
|
+
|
|
10
|
+
// src/provider-services/google/index.ts
|
|
11
|
+
var getGoogleSuite = () => getProviderService("google");
|
|
12
|
+
var listGoogleServices = () => listProviderServiceChildren("google");
|
|
13
|
+
export {
|
|
14
|
+
getGoogleAccountProfile,
|
|
15
|
+
getGoogleSuite,
|
|
16
|
+
listGoogleServices
|
|
17
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const vertexAiService: import("../types.js").ProviderDefinition;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Stable, portable entrypoint for SRKL, DEPM, and other application consumers. */
|
|
2
|
+
export * from './types.js';
|
|
3
|
+
export * from './registry.js';
|
|
4
|
+
export * from './capacity.js';
|
|
5
|
+
export * from './client.js';
|
|
6
|
+
export * from './cloudflare.js';
|
|
7
|
+
export * from './vercel.js';
|
|
8
|
+
export * from './gemini.js';
|
|
9
|
+
export * from './operations.js';
|
|
10
|
+
export * from './storage-providers.js';
|
|
11
|
+
export * from './storage/index.js';
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import {
|
|
2
|
+
calculateProviderCapacity
|
|
3
|
+
} from "../chunk-5SXOQAAX.js";
|
|
4
|
+
import {
|
|
5
|
+
fetchCloudflareCapacity,
|
|
6
|
+
fetchVercelCapacity
|
|
7
|
+
} from "../chunk-NFK6YFTA.js";
|
|
8
|
+
import {
|
|
9
|
+
getGeminiQuotaStatus,
|
|
10
|
+
listGeminiModels
|
|
11
|
+
} from "../chunk-3UZFKB4M.js";
|
|
12
|
+
import {
|
|
13
|
+
getGoogleAccountProfile,
|
|
14
|
+
listCloudflareAccounts,
|
|
15
|
+
listCloudflarePages,
|
|
16
|
+
listCloudflareWorkers,
|
|
17
|
+
listVercelDeployments,
|
|
18
|
+
listVercelProjects
|
|
19
|
+
} from "../chunk-EQFZX3JT.js";
|
|
20
|
+
import {
|
|
21
|
+
createCanonicalStorageService,
|
|
22
|
+
getCanonicalStorageCapabilities,
|
|
23
|
+
listCanonicalStorageProviders
|
|
24
|
+
} from "../chunk-IKDYKRVH.js";
|
|
25
|
+
import {
|
|
26
|
+
createDropboxStorageService
|
|
27
|
+
} from "../chunk-OT2PSPBK.js";
|
|
28
|
+
import {
|
|
29
|
+
createGitHubStorageService
|
|
30
|
+
} from "../chunk-NZWCPJDJ.js";
|
|
31
|
+
import {
|
|
32
|
+
continueDropboxFolder,
|
|
33
|
+
listDropboxFolder,
|
|
34
|
+
listGitHubRepositories,
|
|
35
|
+
listGitHubRepositoryContents,
|
|
36
|
+
listGitLabProjects,
|
|
37
|
+
listGitLabRepositoryTree
|
|
38
|
+
} from "../chunk-5GW5PJWQ.js";
|
|
39
|
+
import {
|
|
40
|
+
createGoogleDriveStorageService
|
|
41
|
+
} from "../chunk-6BL5DXFZ.js";
|
|
42
|
+
import {
|
|
43
|
+
createProviderClient
|
|
44
|
+
} from "../chunk-YFMHT77Z.js";
|
|
45
|
+
import {
|
|
46
|
+
getProviderService,
|
|
47
|
+
getProviderServicePath,
|
|
48
|
+
listProviderServiceChildren,
|
|
49
|
+
listProviderServiceTree,
|
|
50
|
+
listProviderServices,
|
|
51
|
+
listRecognizedAccountServices,
|
|
52
|
+
resolveProviderServiceId
|
|
53
|
+
} from "../chunk-FKK23J2A.js";
|
|
54
|
+
import {
|
|
55
|
+
createBackblazeB2StorageService
|
|
56
|
+
} from "../chunk-JGR6BJVX.js";
|
|
57
|
+
import {
|
|
58
|
+
UnsupportedStorageOperation,
|
|
59
|
+
assertStorageOperation,
|
|
60
|
+
normalizeStoragePath,
|
|
61
|
+
readOnlyService
|
|
62
|
+
} from "../chunk-5UVJDX7Q.js";
|
|
63
|
+
import {
|
|
64
|
+
authorizeB2,
|
|
65
|
+
b2DownloadFile,
|
|
66
|
+
b2ListBuckets,
|
|
67
|
+
b2ListFileNames,
|
|
68
|
+
b2UploadFile2 as b2UploadFile
|
|
69
|
+
} from "../chunk-I6T64MLT.js";
|
|
70
|
+
import {
|
|
71
|
+
GOOGLE_DRIVE_WORKSPACE_SCOPE,
|
|
72
|
+
GoogleDriveWorkspaceService
|
|
73
|
+
} from "../chunk-EMSSTOOK.js";
|
|
74
|
+
export {
|
|
75
|
+
GOOGLE_DRIVE_WORKSPACE_SCOPE,
|
|
76
|
+
GoogleDriveWorkspaceService,
|
|
77
|
+
UnsupportedStorageOperation,
|
|
78
|
+
assertStorageOperation,
|
|
79
|
+
authorizeB2 as authorizeBackblazeB2,
|
|
80
|
+
calculateProviderCapacity,
|
|
81
|
+
continueDropboxFolder,
|
|
82
|
+
createBackblazeB2StorageService,
|
|
83
|
+
createCanonicalStorageService,
|
|
84
|
+
createDropboxStorageService,
|
|
85
|
+
createGitHubStorageService,
|
|
86
|
+
createGoogleDriveStorageService,
|
|
87
|
+
createProviderClient,
|
|
88
|
+
b2DownloadFile as downloadBackblazeB2File,
|
|
89
|
+
fetchCloudflareCapacity,
|
|
90
|
+
fetchVercelCapacity,
|
|
91
|
+
getCanonicalStorageCapabilities,
|
|
92
|
+
getGeminiQuotaStatus,
|
|
93
|
+
getGoogleAccountProfile,
|
|
94
|
+
getProviderService,
|
|
95
|
+
getProviderServicePath,
|
|
96
|
+
b2ListBuckets as listBackblazeB2Buckets,
|
|
97
|
+
b2ListFileNames as listBackblazeB2Files,
|
|
98
|
+
listCanonicalStorageProviders,
|
|
99
|
+
listCloudflareAccounts,
|
|
100
|
+
listCloudflarePages,
|
|
101
|
+
listCloudflareWorkers,
|
|
102
|
+
listDropboxFolder,
|
|
103
|
+
listGeminiModels,
|
|
104
|
+
listGitHubRepositories,
|
|
105
|
+
listGitHubRepositoryContents,
|
|
106
|
+
listGitLabProjects,
|
|
107
|
+
listGitLabRepositoryTree,
|
|
108
|
+
listProviderServiceChildren,
|
|
109
|
+
listProviderServiceTree,
|
|
110
|
+
listProviderServices,
|
|
111
|
+
listRecognizedAccountServices,
|
|
112
|
+
listVercelDeployments,
|
|
113
|
+
listVercelProjects,
|
|
114
|
+
normalizeStoragePath,
|
|
115
|
+
readOnlyService,
|
|
116
|
+
resolveProviderServiceId,
|
|
117
|
+
b2UploadFile as uploadBackblazeB2File
|
|
118
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import {
|
|
2
|
+
BackblazeB2ProviderService,
|
|
3
|
+
CloudflareProviderService,
|
|
4
|
+
DropboxProviderService,
|
|
5
|
+
GeminiProviderService,
|
|
6
|
+
GitHubProviderService,
|
|
7
|
+
GitLabProviderService,
|
|
8
|
+
GoogleAccountProviderService,
|
|
9
|
+
GoogleDriveProviderService,
|
|
10
|
+
VercelProviderService
|
|
11
|
+
} from "../chunk-HRJCGJTR.js";
|
|
12
|
+
import {
|
|
13
|
+
CanonicalStorageProviderService
|
|
14
|
+
} from "../chunk-QYWVZBI6.js";
|
|
15
|
+
import "../chunk-NFK6YFTA.js";
|
|
16
|
+
import "../chunk-3UZFKB4M.js";
|
|
17
|
+
import "../chunk-EQFZX3JT.js";
|
|
18
|
+
import "../chunk-IKDYKRVH.js";
|
|
19
|
+
import "../chunk-OT2PSPBK.js";
|
|
20
|
+
import "../chunk-NZWCPJDJ.js";
|
|
21
|
+
import "../chunk-5GW5PJWQ.js";
|
|
22
|
+
import "../chunk-6BL5DXFZ.js";
|
|
23
|
+
import "../chunk-YFMHT77Z.js";
|
|
24
|
+
import "../chunk-FKK23J2A.js";
|
|
25
|
+
import "../chunk-JGR6BJVX.js";
|
|
26
|
+
import "../chunk-5UVJDX7Q.js";
|
|
27
|
+
import "../chunk-I6T64MLT.js";
|
|
28
|
+
import "../chunk-EMSSTOOK.js";
|
|
29
|
+
export {
|
|
30
|
+
BackblazeB2ProviderService,
|
|
31
|
+
CanonicalStorageProviderService,
|
|
32
|
+
CloudflareProviderService,
|
|
33
|
+
DropboxProviderService,
|
|
34
|
+
GeminiProviderService,
|
|
35
|
+
GitHubProviderService,
|
|
36
|
+
GitLabProviderService,
|
|
37
|
+
GoogleAccountProviderService,
|
|
38
|
+
GoogleDriveProviderService,
|
|
39
|
+
VercelProviderService
|
|
40
|
+
};
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ProviderConnection } from './types.js';
|
|
2
|
+
export declare function listCloudflareWorkers(connection: ProviderConnection, transport?: typeof fetch): Promise<Array<{
|
|
3
|
+
id: string;
|
|
4
|
+
modified_on?: string;
|
|
5
|
+
}>>;
|
|
6
|
+
export declare function listCloudflarePages(connection: ProviderConnection, transport?: typeof fetch): Promise<Array<{
|
|
7
|
+
name: string;
|
|
8
|
+
id?: string;
|
|
9
|
+
}>>;
|
|
10
|
+
export declare function listCloudflareAccounts(connection: ProviderConnection, transport?: typeof fetch): Promise<Array<{
|
|
11
|
+
id: string;
|
|
12
|
+
name: string;
|
|
13
|
+
}>>;
|
|
14
|
+
export declare function listVercelProjects(connection: ProviderConnection, transport?: typeof fetch): Promise<Array<{
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
}>>;
|
|
18
|
+
export declare function listVercelDeployments(connection: ProviderConnection, transport?: typeof fetch): Promise<Array<{
|
|
19
|
+
uid: string;
|
|
20
|
+
name: string;
|
|
21
|
+
url?: string;
|
|
22
|
+
}>>;
|
|
23
|
+
/** Requires a Google OAuth access token with the appropriate identity scope. */
|
|
24
|
+
export declare function getGoogleAccountProfile(connection: ProviderConnection, transport?: typeof fetch): Promise<{
|
|
25
|
+
sub: string;
|
|
26
|
+
email?: string;
|
|
27
|
+
name?: string;
|
|
28
|
+
}>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ProviderDefinition } from './types.js';
|
|
2
|
+
export declare function resolveProviderServiceId(id: string): string;
|
|
3
|
+
export declare function getProviderService(id: string): ProviderDefinition | undefined;
|
|
4
|
+
export declare function listProviderServices(category?: ProviderDefinition['category']): ProviderDefinition[];
|
|
5
|
+
/** SRKL should expose only services with a real canonical implementation. */
|
|
6
|
+
export declare function listRecognizedAccountServices(): ProviderDefinition[];
|
|
7
|
+
/** Tree view for SRKL and any consumer presenting provider families. */
|
|
8
|
+
export interface ProviderServiceNode extends ProviderDefinition {
|
|
9
|
+
children: ProviderServiceNode[];
|
|
10
|
+
}
|
|
11
|
+
/** Return direct children without exposing internal registry arrays. */
|
|
12
|
+
export declare function listProviderServiceChildren(parentId: string): ProviderDefinition[];
|
|
13
|
+
/** Canonical nested view: Google is a parent suite, Drive/Gemini/etc are children. */
|
|
14
|
+
export declare function listProviderServiceTree(): ProviderServiceNode[];
|
|
15
|
+
/** Resolve a service's identity chain for breadcrumbs and authorization scopes. */
|
|
16
|
+
export declare function getProviderServicePath(id: string): ProviderDefinition[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CanonicalStorageService } from './contract.js';
|
|
2
|
+
export interface B2StorageCredentials {
|
|
3
|
+
readonly keyId: string;
|
|
4
|
+
readonly applicationKey: string;
|
|
5
|
+
}
|
|
6
|
+
/** Reuses existing B2 APIs and preserves the provider's bucket/file boundary. */
|
|
7
|
+
export declare function createBackblazeB2StorageService(creds: B2StorageCredentials): CanonicalStorageService;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/** Provider-neutral storage APIs. Credential and tenant authorization remain caller-owned. */
|
|
2
|
+
export type StorageProviderId = 'github' | 'backblaze-b2' | 'dropbox' | 'google-drive';
|
|
3
|
+
export type StorageKind = 'bucket' | 'repository' | 'folder' | 'file';
|
|
4
|
+
export type StorageOperation = 'list' | 'read' | 'write' | 'delete';
|
|
5
|
+
export interface StorageEntry {
|
|
6
|
+
id: string;
|
|
7
|
+
path: string;
|
|
8
|
+
name: string;
|
|
9
|
+
kind: StorageKind;
|
|
10
|
+
size?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface StoragePage {
|
|
13
|
+
entries: StorageEntry[];
|
|
14
|
+
nextCursor: string | null;
|
|
15
|
+
/** False signals a known provider listing limit, never silently complete. */
|
|
16
|
+
complete: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface StorageCapabilities {
|
|
19
|
+
list: boolean;
|
|
20
|
+
read: boolean;
|
|
21
|
+
write: boolean;
|
|
22
|
+
delete: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface CanonicalStorageService {
|
|
25
|
+
readonly providerId: StorageProviderId;
|
|
26
|
+
readonly capabilities: Readonly<StorageCapabilities>;
|
|
27
|
+
list(path?: string, cursor?: string): Promise<StoragePage>;
|
|
28
|
+
read(path: string): Promise<Uint8Array>;
|
|
29
|
+
write(path: string, data: Uint8Array | string, contentType?: string): Promise<void>;
|
|
30
|
+
delete(path: string): Promise<void>;
|
|
31
|
+
}
|
|
32
|
+
export declare class UnsupportedStorageOperation extends Error {
|
|
33
|
+
readonly providerId: StorageProviderId;
|
|
34
|
+
readonly operation: StorageOperation;
|
|
35
|
+
readonly code = "STORAGE_OPERATION_UNSUPPORTED";
|
|
36
|
+
constructor(providerId: StorageProviderId, operation: StorageOperation);
|
|
37
|
+
}
|
|
38
|
+
/** Check capability before performing an operation; no stubs or false support. */
|
|
39
|
+
export declare function assertStorageOperation(service: CanonicalStorageService, operation: StorageOperation): void;
|
|
40
|
+
export declare function normalizeStoragePath(path?: string): string;
|
|
41
|
+
export declare function readOnlyService(id: StorageProviderId): {
|
|
42
|
+
read: (path: string) => Promise<Uint8Array>;
|
|
43
|
+
write: (path: string, content: Uint8Array | string) => Promise<void>;
|
|
44
|
+
delete: (path: string) => Promise<void>;
|
|
45
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createDropboxStorageService
|
|
3
|
+
} from "../../chunk-OT2PSPBK.js";
|
|
4
|
+
import "../../chunk-5GW5PJWQ.js";
|
|
5
|
+
import "../../chunk-YFMHT77Z.js";
|
|
6
|
+
import "../../chunk-FKK23J2A.js";
|
|
7
|
+
import "../../chunk-5UVJDX7Q.js";
|
|
8
|
+
import "../../chunk-I6T64MLT.js";
|
|
9
|
+
import "../../chunk-EMSSTOOK.js";
|
|
10
|
+
export {
|
|
11
|
+
createDropboxStorageService
|
|
12
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ProviderConnection } from '../types.js';
|
|
2
|
+
import type { CanonicalStorageService } from './contract.js';
|
|
3
|
+
/** GitHub contents API: read/list only; commits require separate explicit revision semantics. */
|
|
4
|
+
export declare function createGitHubStorageService(connection: ProviderConnection, transport?: typeof fetch): CanonicalStorageService;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
createGitHubStorageService
|
|
3
|
+
} from "../../chunk-NZWCPJDJ.js";
|
|
4
|
+
import "../../chunk-5GW5PJWQ.js";
|
|
5
|
+
import "../../chunk-YFMHT77Z.js";
|
|
6
|
+
import "../../chunk-FKK23J2A.js";
|
|
7
|
+
import "../../chunk-5UVJDX7Q.js";
|
|
8
|
+
import "../../chunk-I6T64MLT.js";
|
|
9
|
+
import "../../chunk-EMSSTOOK.js";
|
|
10
|
+
export {
|
|
11
|
+
createGitHubStorageService
|
|
12
|
+
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { GoogleDriveWorkspaceOptions } from '../../storage/GoogleDriveWorkspaceService.js';
|
|
2
|
+
import type { CanonicalStorageService } from './contract.js';
|
|
3
|
+
/** Delegates OAuth refresh, root-scoping and safe writes to canonical Drive implementation. */
|
|
4
|
+
export declare function createGoogleDriveStorageService(options: GoogleDriveWorkspaceOptions): CanonicalStorageService;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/** Storage adapters, with identical list/read/write/delete surface and explicit capabilities. */
|
|
2
|
+
export * from './contract.js';
|
|
3
|
+
export * from './github.js';
|
|
4
|
+
export * from './dropbox.js';
|
|
5
|
+
export * from './backblaze-b2.js';
|
|
6
|
+
export * from './google-drive.js';
|
|
7
|
+
export * from './service.js';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CanonicalStorageProviderService
|
|
3
|
+
} from "../../chunk-QYWVZBI6.js";
|
|
4
|
+
import "../../chunk-IKDYKRVH.js";
|
|
5
|
+
import "../../chunk-OT2PSPBK.js";
|
|
6
|
+
import "../../chunk-NZWCPJDJ.js";
|
|
7
|
+
import "../../chunk-5GW5PJWQ.js";
|
|
8
|
+
import "../../chunk-6BL5DXFZ.js";
|
|
9
|
+
import "../../chunk-YFMHT77Z.js";
|
|
10
|
+
import "../../chunk-FKK23J2A.js";
|
|
11
|
+
import "../../chunk-JGR6BJVX.js";
|
|
12
|
+
import "../../chunk-5UVJDX7Q.js";
|
|
13
|
+
import "../../chunk-I6T64MLT.js";
|
|
14
|
+
import "../../chunk-EMSSTOOK.js";
|
|
15
|
+
export {
|
|
16
|
+
CanonicalStorageProviderService
|
|
17
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { ProviderConnection } from '../types.js';
|
|
2
|
+
import type { GoogleDriveWorkspaceOptions } from '../../storage/GoogleDriveWorkspaceService.js';
|
|
3
|
+
import type { B2StorageCredentials } from './backblaze-b2.js';
|
|
4
|
+
import type { StorageProviderId, CanonicalStorageService, StorageCapabilities } from './contract.js';
|
|
5
|
+
/** Provider-typed connection prevents attaching an unrelated provider credential. */
|
|
6
|
+
export type StorageServiceConfig = {
|
|
7
|
+
providerId: 'github';
|
|
8
|
+
connection: ProviderConnection;
|
|
9
|
+
transport?: typeof fetch;
|
|
10
|
+
} | {
|
|
11
|
+
providerId: 'dropbox';
|
|
12
|
+
connection: ProviderConnection;
|
|
13
|
+
transport?: typeof fetch;
|
|
14
|
+
} | {
|
|
15
|
+
providerId: 'backblaze-b2';
|
|
16
|
+
credentials: B2StorageCredentials;
|
|
17
|
+
} | {
|
|
18
|
+
providerId: 'google-drive';
|
|
19
|
+
options: GoogleDriveWorkspaceOptions;
|
|
20
|
+
};
|
|
21
|
+
export declare function listCanonicalStorageProviders(): Array<{
|
|
22
|
+
id: StorageProviderId;
|
|
23
|
+
capabilities: Readonly<StorageCapabilities>;
|
|
24
|
+
}>;
|
|
25
|
+
export declare function getCanonicalStorageCapabilities(id: StorageProviderId): Readonly<StorageCapabilities>;
|
|
26
|
+
/** One runtime-neutral contract; no per-app provider SDK code is necessary. */
|
|
27
|
+
export declare function createCanonicalStorageService(config: StorageServiceConfig): CanonicalStorageService;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|