@kya-os/mcp-i 0.1.0-alpha.3.9 → 1.2.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/README.md +350 -213
- package/dist/149.js +1 -0
- package/dist/189.js +1 -0
- package/dist/261.js +1 -0
- package/dist/28.js +1 -0
- package/dist/295.js +1 -0
- package/dist/460.js +1 -0
- package/dist/570.js +1 -0
- package/dist/634.js +1 -0
- package/dist/647.js +1 -0
- package/dist/67.js +1 -0
- package/dist/739.js +1 -0
- package/dist/742.js +1 -0
- package/dist/904.js +1 -0
- package/dist/938.js +1 -0
- package/dist/auth/api-key.d.ts +16 -0
- package/dist/auth/api-key.js +82 -0
- package/dist/auth/jwt.d.ts +43 -0
- package/dist/auth/jwt.js +51 -0
- package/dist/auth/oauth/factory.d.ts +12 -0
- package/dist/auth/oauth/factory.js +36 -0
- package/dist/auth/oauth/index.d.ts +5 -0
- package/dist/auth/oauth/index.js +27 -0
- package/dist/auth/oauth/providers/proxy-provider.d.ts +13 -0
- package/dist/auth/oauth/providers/proxy-provider.js +159 -0
- package/dist/auth/oauth/router.d.ts +4 -0
- package/dist/auth/oauth/router.js +294 -0
- package/dist/auth/oauth/storage/memory-storage.d.ts +12 -0
- package/dist/auth/oauth/storage/memory-storage.js +40 -0
- package/dist/auth/oauth/types.d.ts +112 -0
- package/dist/cache/__tests__/cloudflare-kv-nonce-cache.test.d.ts +4 -0
- package/dist/cache/__tests__/cloudflare-kv-nonce-cache.test.js +176 -0
- package/dist/cache/__tests__/concurrency.test.d.ts +5 -0
- package/dist/cache/__tests__/concurrency.test.js +300 -0
- package/dist/cache/__tests__/dynamodb-nonce-cache.test.d.ts +4 -0
- package/dist/cache/__tests__/dynamodb-nonce-cache.test.js +176 -0
- package/dist/cache/__tests__/memory-nonce-cache.test.d.ts +4 -0
- package/dist/cache/__tests__/memory-nonce-cache.test.js +132 -0
- package/dist/cache/__tests__/nonce-cache-factory-simple.test.d.ts +4 -0
- package/dist/cache/__tests__/nonce-cache-factory-simple.test.js +133 -0
- package/dist/cache/__tests__/nonce-cache-factory.test.d.ts +4 -0
- package/dist/cache/__tests__/nonce-cache-factory.test.js +252 -0
- package/dist/cache/__tests__/redis-nonce-cache.test.d.ts +4 -0
- package/dist/cache/__tests__/redis-nonce-cache.test.js +95 -0
- package/dist/cache/cloudflare-kv-nonce-cache.d.ts +14 -0
- package/dist/cache/cloudflare-kv-nonce-cache.js +93 -0
- package/dist/cache/dynamodb-nonce-cache.d.ts +15 -0
- package/dist/cache/dynamodb-nonce-cache.js +92 -0
- package/dist/cache/index.d.ts +16 -0
- package/dist/cache/index.js +32 -0
- package/dist/cache/memory-nonce-cache.d.ts +44 -0
- package/dist/cache/memory-nonce-cache.js +105 -0
- package/dist/cache/nonce-cache-factory.d.ts +20 -0
- package/dist/cache/nonce-cache-factory.js +208 -0
- package/dist/cache/redis-nonce-cache.d.ts +14 -0
- package/dist/cache/redis-nonce-cache.js +53 -0
- package/dist/compiler/compiler-context.d.ts +23 -0
- package/dist/compiler/compiler-context.js +24 -0
- package/dist/compiler/config/constants.d.ts +41 -0
- package/dist/compiler/config/constants.js +45 -0
- package/dist/compiler/config/index.d.ts +252 -0
- package/dist/compiler/config/index.js +15 -0
- package/dist/compiler/config/injection.d.ts +26 -0
- package/dist/compiler/config/injection.js +58 -0
- package/dist/compiler/config/schemas/experimental/index.d.ts +91 -0
- package/dist/compiler/config/schemas/experimental/index.js +16 -0
- package/dist/compiler/config/schemas/experimental/oauth.d.ts +74 -0
- package/dist/compiler/config/schemas/experimental/oauth.js +25 -0
- package/dist/compiler/config/schemas/index.d.ts +6 -0
- package/dist/compiler/config/schemas/index.js +17 -0
- package/dist/compiler/config/schemas/paths.d.ts +9 -0
- package/dist/compiler/config/schemas/paths.js +12 -0
- package/dist/compiler/config/schemas/transport/http.d.ts +82 -0
- package/dist/compiler/config/schemas/transport/http.js +33 -0
- package/dist/compiler/config/schemas/transport/stdio.d.ts +9 -0
- package/dist/compiler/config/schemas/transport/stdio.js +15 -0
- package/dist/compiler/config/schemas/webpack.d.ts +3 -0
- package/dist/compiler/config/schemas/webpack.js +15 -0
- package/dist/compiler/config/types.d.ts +1 -0
- package/dist/compiler/config/types.js +2 -0
- package/dist/compiler/config/utils.d.ts +20 -0
- package/dist/compiler/config/utils.js +36 -0
- package/dist/compiler/generate-env-code.d.ts +1 -0
- package/dist/compiler/generate-env-code.js +8 -0
- package/dist/compiler/generate-import-code.d.ts +1 -0
- package/dist/compiler/generate-import-code.js +24 -0
- package/dist/compiler/get-webpack-config/get-entries.d.ts +3 -0
- package/dist/compiler/get-webpack-config/get-entries.js +29 -0
- package/dist/compiler/get-webpack-config/get-externals.d.ts +7 -0
- package/dist/compiler/get-webpack-config/get-externals.js +88 -0
- package/dist/compiler/get-webpack-config/get-injected-variables.d.ts +8 -0
- package/dist/compiler/get-webpack-config/get-injected-variables.js +25 -0
- package/dist/compiler/get-webpack-config/index.d.ts +4 -0
- package/dist/compiler/get-webpack-config/index.js +101 -0
- package/dist/compiler/get-webpack-config/plugins.d.ts +8 -0
- package/dist/compiler/get-webpack-config/plugins.js +132 -0
- package/dist/compiler/get-webpack-config/resolve-tsconfig-paths.d.ts +9 -0
- package/dist/compiler/get-webpack-config/resolve-tsconfig-paths.js +40 -0
- package/dist/compiler/index.d.ts +6 -0
- package/dist/compiler/index.js +194 -0
- package/dist/compiler/on-first-build.d.ts +3 -0
- package/dist/compiler/on-first-build.js +58 -0
- package/dist/compiler/parse-xmcp-config.d.ts +9 -0
- package/dist/compiler/parse-xmcp-config.js +155 -0
- package/dist/compiler/start-http-server.d.ts +1 -0
- package/dist/compiler/start-http-server.js +34 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +38 -0
- package/dist/index.js.LICENSE.txt +49 -0
- package/dist/runtime/__tests__/audit.test.d.ts +4 -0
- package/dist/runtime/__tests__/audit.test.js +328 -0
- package/dist/runtime/__tests__/identity.test.d.ts +4 -0
- package/dist/runtime/__tests__/identity.test.js +164 -0
- package/dist/runtime/__tests__/mcpi-runtime.test.d.ts +4 -0
- package/dist/runtime/__tests__/mcpi-runtime.test.js +372 -0
- package/dist/runtime/__tests__/proof.test.d.ts +4 -0
- package/dist/runtime/__tests__/proof.test.js +302 -0
- package/dist/runtime/__tests__/session.test.d.ts +4 -0
- package/dist/runtime/__tests__/session.test.js +254 -0
- package/dist/runtime/__tests__/well-known.test.d.ts +4 -0
- package/dist/runtime/__tests__/well-known.test.js +312 -0
- package/dist/runtime/adapter-express.js +2 -0
- package/dist/runtime/adapter-express.js.LICENSE.txt +252 -0
- package/dist/runtime/adapter-nextjs.js +2 -0
- package/dist/runtime/adapter-nextjs.js.LICENSE.txt +53 -0
- package/dist/runtime/adapters/express/index.d.ts +2 -0
- package/dist/runtime/adapters/express/index.js +48 -0
- package/dist/runtime/adapters/nextjs/index.d.ts +8 -0
- package/dist/runtime/adapters/nextjs/index.js +18 -0
- package/dist/runtime/audit.d.ts +93 -0
- package/dist/runtime/audit.js +212 -0
- package/dist/runtime/debug.d.ts +118 -0
- package/dist/runtime/debug.js +612 -0
- package/dist/runtime/delegation-hooks.d.ts +85 -0
- package/dist/runtime/delegation-hooks.js +116 -0
- package/dist/runtime/demo.d.ts +71 -0
- package/dist/runtime/demo.js +135 -0
- package/dist/runtime/headers.d.ts +1 -0
- package/dist/runtime/headers.js +9 -0
- package/dist/runtime/http.js +2 -0
- package/dist/runtime/http.js.LICENSE.txt +252 -0
- package/dist/runtime/identity.d.ts +105 -0
- package/dist/runtime/identity.js +232 -0
- package/dist/runtime/index.d.ts +16 -0
- package/dist/runtime/index.js +56 -0
- package/dist/runtime/mcpi-runtime.d.ts +164 -0
- package/dist/runtime/mcpi-runtime.js +352 -0
- package/dist/runtime/proof.d.ts +87 -0
- package/dist/runtime/proof.js +223 -0
- package/dist/runtime/session.d.ts +88 -0
- package/dist/runtime/session.js +216 -0
- package/dist/runtime/stdio.js +2 -0
- package/dist/runtime/stdio.js.LICENSE.txt +1 -0
- package/dist/runtime/templates/home.d.ts +2 -0
- package/dist/runtime/templates/home.js +50 -0
- package/dist/runtime/transports/http/base-streamable-http.d.ts +25 -0
- package/dist/runtime/transports/http/base-streamable-http.js +16 -0
- package/dist/runtime/transports/http/http-context.d.ts +9 -0
- package/dist/runtime/transports/http/http-context.js +8 -0
- package/dist/runtime/transports/http/index.js +55 -0
- package/dist/runtime/transports/http/setup-cors.d.ts +4 -0
- package/dist/runtime/transports/http/setup-cors.js +24 -0
- package/dist/runtime/transports/http/stateless-streamable-http.d.ts +39 -0
- package/dist/runtime/transports/http/stateless-streamable-http.js +331 -0
- package/dist/runtime/transports/stdio/index.d.ts +1 -0
- package/dist/runtime/transports/stdio/index.js +51 -0
- package/dist/runtime/utils/server.d.ts +42 -0
- package/dist/runtime/utils/server.js +39 -0
- package/dist/runtime/utils/tools.d.ts +8 -0
- package/dist/runtime/utils/tools.js +115 -0
- package/dist/runtime/verifier-middleware.d.ts +76 -0
- package/dist/runtime/verifier-middleware.js +322 -0
- package/dist/runtime/well-known.d.ts +151 -0
- package/dist/runtime/well-known.js +258 -0
- package/dist/storage/config.d.ts +28 -0
- package/dist/storage/config.js +79 -0
- package/dist/storage/delegation.d.ts +59 -0
- package/dist/storage/delegation.js +130 -0
- package/dist/storage/merkle-verifier.d.ts +84 -0
- package/dist/storage/merkle-verifier.js +261 -0
- package/dist/test/__tests__/nonce-cache-integration.test.d.ts +1 -0
- package/dist/test/__tests__/nonce-cache-integration.test.js +116 -0
- package/dist/test/__tests__/nonce-cache.test.d.ts +1 -0
- package/dist/test/__tests__/nonce-cache.test.js +122 -0
- package/dist/test/__tests__/runtime-integration.test.d.ts +4 -0
- package/dist/test/__tests__/runtime-integration.test.js +192 -0
- package/dist/test/__tests__/test-infrastructure.test.d.ts +4 -0
- package/dist/test/__tests__/test-infrastructure.test.js +178 -0
- package/dist/test/deterministic-keys.d.ts +31 -0
- package/dist/test/deterministic-keys.js +108 -0
- package/dist/test/examples/test-usage-example.d.ts +140 -0
- package/dist/test/examples/test-usage-example.js +175 -0
- package/dist/test/index.d.ts +11 -0
- package/dist/test/index.js +27 -0
- package/dist/test/local-verification.d.ts +28 -0
- package/dist/test/local-verification.js +342 -0
- package/dist/test/mock-identity-provider.d.ts +96 -0
- package/dist/test/mock-identity-provider.js +243 -0
- package/dist/test/runtime-integration.d.ts +63 -0
- package/dist/test/runtime-integration.js +140 -0
- package/dist/test/test-environment.d.ts +26 -0
- package/dist/test/test-environment.js +50 -0
- package/dist/types/declarations.d.ts +1 -0
- package/dist/types/declarations.js +6 -0
- package/dist/types/middleware.d.ts +2 -0
- package/dist/types/middleware.js +2 -0
- package/dist/types/tool.d.ts +80 -0
- package/dist/types/tool.js +2 -0
- package/dist/utils/cli-icons.d.ts +3 -0
- package/dist/utils/cli-icons.js +7 -0
- package/dist/utils/constants.d.ts +6 -0
- package/dist/utils/constants.js +13 -0
- package/dist/utils/context.d.ts +33 -0
- package/dist/utils/context.js +58 -0
- package/dist/utils/file-watcher.d.ts +19 -0
- package/dist/utils/file-watcher.js +49 -0
- package/dist/utils/fs-utils.d.ts +2 -0
- package/dist/utils/fs-utils.js +22 -0
- package/dist/utils/path-validation.d.ts +3 -0
- package/dist/utils/path-validation.js +56 -0
- package/dist/utils/spawn-process.d.ts +9 -0
- package/dist/utils/spawn-process.js +50 -0
- package/dist/utils/subscribable.d.ts +12 -0
- package/dist/utils/subscribable.js +44 -0
- package/package.json +91 -77
- package/dist/cjs/auto.js +0 -16
- package/dist/cjs/cli-mode.d.ts +0 -16
- package/dist/cjs/cli-mode.js +0 -32
- package/dist/cjs/crypto.d.ts +0 -16
- package/dist/cjs/crypto.js +0 -212
- package/dist/cjs/dev-helper.d.ts +0 -3
- package/dist/cjs/dev-helper.js +0 -46
- package/dist/cjs/encrypted-storage.d.ts +0 -11
- package/dist/cjs/encrypted-storage.js +0 -73
- package/dist/cjs/index.d.ts +0 -56
- package/dist/cjs/index.js +0 -727
- package/dist/cjs/logger.d.ts +0 -32
- package/dist/cjs/logger.js +0 -85
- package/dist/cjs/nextjs.d.ts +0 -10
- package/dist/cjs/nextjs.js +0 -83
- package/dist/cjs/platform-info.d.ts +0 -36
- package/dist/cjs/platform-info.js +0 -274
- package/dist/cjs/polling.d.ts +0 -13
- package/dist/cjs/polling.js +0 -52
- package/dist/cjs/registry/index.d.ts +0 -12
- package/dist/cjs/registry/index.js +0 -56
- package/dist/cjs/registry/knowthat.d.ts +0 -17
- package/dist/cjs/registry/knowthat.js +0 -173
- package/dist/cjs/rotation.d.ts +0 -35
- package/dist/cjs/rotation.js +0 -102
- package/dist/cjs/storage.d.ts +0 -41
- package/dist/cjs/storage.js +0 -163
- package/dist/cjs/transport.d.ts +0 -35
- package/dist/cjs/transport.js +0 -300
- package/dist/cjs/types.d.ts +0 -206
- package/dist/cjs/vercel-adapter.d.ts +0 -8
- package/dist/cjs/vercel-adapter.js +0 -67
- package/dist/esm/auto.d.ts +0 -13
- package/dist/esm/auto.d.ts.map +0 -1
- package/dist/esm/auto.js +0 -30
- package/dist/esm/auto.js.map +0 -1
- package/dist/esm/cli-mode.d.ts +0 -52
- package/dist/esm/cli-mode.d.ts.map +0 -1
- package/dist/esm/cli-mode.js +0 -59
- package/dist/esm/cli-mode.js.map +0 -1
- package/dist/esm/crypto.d.ts +0 -51
- package/dist/esm/crypto.d.ts.map +0 -1
- package/dist/esm/crypto.js +0 -230
- package/dist/esm/crypto.js.map +0 -1
- package/dist/esm/dev-helper.d.ts +0 -15
- package/dist/esm/dev-helper.d.ts.map +0 -1
- package/dist/esm/dev-helper.js +0 -63
- package/dist/esm/dev-helper.js.map +0 -1
- package/dist/esm/encrypted-storage.d.ts +0 -19
- package/dist/esm/encrypted-storage.d.ts.map +0 -1
- package/dist/esm/encrypted-storage.js +0 -48
- package/dist/esm/encrypted-storage.js.map +0 -1
- package/dist/esm/index.d.ts +0 -129
- package/dist/esm/index.d.ts.map +0 -1
- package/dist/esm/index.js +0 -853
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/logger.d.ts +0 -46
- package/dist/esm/logger.d.ts.map +0 -1
- package/dist/esm/logger.js +0 -100
- package/dist/esm/logger.js.map +0 -1
- package/dist/esm/nextjs.d.ts +0 -22
- package/dist/esm/nextjs.d.ts.map +0 -1
- package/dist/esm/nextjs.js +0 -83
- package/dist/esm/nextjs.js.map +0 -1
- package/dist/esm/package.json +0 -1
- package/dist/esm/platform-info.d.ts +0 -74
- package/dist/esm/platform-info.d.ts.map +0 -1
- package/dist/esm/platform-info.js +0 -293
- package/dist/esm/platform-info.js.map +0 -1
- package/dist/esm/polling.d.ts +0 -29
- package/dist/esm/polling.d.ts.map +0 -1
- package/dist/esm/polling.js +0 -76
- package/dist/esm/polling.js.map +0 -1
- package/dist/esm/registry/index.d.ts +0 -43
- package/dist/esm/registry/index.d.ts.map +0 -1
- package/dist/esm/registry/index.js +0 -89
- package/dist/esm/registry/index.js.map +0 -1
- package/dist/esm/registry/knowthat.d.ts +0 -44
- package/dist/esm/registry/knowthat.d.ts.map +0 -1
- package/dist/esm/registry/knowthat.js +0 -220
- package/dist/esm/registry/knowthat.js.map +0 -1
- package/dist/esm/rotation.d.ts +0 -57
- package/dist/esm/rotation.d.ts.map +0 -1
- package/dist/esm/rotation.js +0 -133
- package/dist/esm/rotation.js.map +0 -1
- package/dist/esm/storage.d.ts +0 -65
- package/dist/esm/storage.d.ts.map +0 -1
- package/dist/esm/storage.js +0 -160
- package/dist/esm/storage.js.map +0 -1
- package/dist/esm/transport.d.ts +0 -52
- package/dist/esm/transport.d.ts.map +0 -1
- package/dist/esm/transport.js +0 -340
- package/dist/esm/transport.js.map +0 -1
- package/dist/esm/types.d.ts +0 -293
- package/dist/esm/types.d.ts.map +0 -1
- package/dist/esm/types.js +0 -5
- package/dist/esm/types.js.map +0 -1
- package/dist/esm/vercel-adapter.d.ts +0 -26
- package/dist/esm/vercel-adapter.d.ts.map +0 -1
- package/dist/esm/vercel-adapter.js +0 -80
- package/dist/esm/vercel-adapter.js.map +0 -1
- /package/dist/{cjs → auth/oauth}/types.js +0 -0
- /package/dist/{cjs/auto.d.ts → runtime/transports/http/index.d.ts} +0 -0
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.KnowThatRegistry = void 0;
|
|
4
|
-
const transport_1 = require("../transport");
|
|
5
|
-
const polling_1 = require("../polling");
|
|
6
|
-
const logger_1 = require("../logger");
|
|
7
|
-
const platform_info_1 = require("../platform-info");
|
|
8
|
-
class KnowThatRegistry {
|
|
9
|
-
constructor(endpoint = 'https://knowthat.ai', transport, options) {
|
|
10
|
-
this.name = 'knowthat';
|
|
11
|
-
this.type = 'primary';
|
|
12
|
-
this.endpoint = endpoint;
|
|
13
|
-
this.transport = transport || transport_1.TransportFactory.create();
|
|
14
|
-
this.options = options;
|
|
15
|
-
}
|
|
16
|
-
async publishViaCLI(data) {
|
|
17
|
-
const logger = (0, logger_1.getLogger)();
|
|
18
|
-
try {
|
|
19
|
-
logger.debug('Using fast CLI registration endpoint');
|
|
20
|
-
const response = await this.transport.post(`${this.endpoint}/api/agents/cli-register`, {
|
|
21
|
-
name: data.name,
|
|
22
|
-
description: data.description,
|
|
23
|
-
repository: data.repository,
|
|
24
|
-
publicKey: data.publicKey
|
|
25
|
-
}, {
|
|
26
|
-
timeout: 5000,
|
|
27
|
-
headers: {
|
|
28
|
-
'Content-Type': 'application/json',
|
|
29
|
-
'User-Agent': `@kya-os/mcp-i/${(0, platform_info_1.generateClientInfo)().sdkVersion}`
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
logger.debug(`CLI registration completed in ${response.data.responseTime}ms`);
|
|
33
|
-
if (response.data.keys && !data.publicKey) {
|
|
34
|
-
logger.warn(response.data.keys.warning || 'Server generated keys - store them securely!');
|
|
35
|
-
}
|
|
36
|
-
return {
|
|
37
|
-
success: true,
|
|
38
|
-
registryAgentId: response.data.agent.id,
|
|
39
|
-
profileUrl: response.data.agent.url,
|
|
40
|
-
claimUrl: response.data.claimUrl,
|
|
41
|
-
claimToken: response.data.claimToken,
|
|
42
|
-
generatedKeys: response.data.keys
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
catch (error) {
|
|
46
|
-
logger.debug(`CLI registration failed: ${error.message}`);
|
|
47
|
-
throw error;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
shouldUseCLIEndpoint() {
|
|
51
|
-
if (this.options?.registryEndpoint === 'cli')
|
|
52
|
-
return true;
|
|
53
|
-
if (this.options?.registryEndpoint === 'auto-register')
|
|
54
|
-
return false;
|
|
55
|
-
if (this.options?.registryEndpoint === 'auto' || !this.options?.registryEndpoint) {
|
|
56
|
-
if (this.options?.onProgress)
|
|
57
|
-
return true;
|
|
58
|
-
if (this.options?.processingMode === 'sync')
|
|
59
|
-
return true;
|
|
60
|
-
if (process.stdout?.isTTY)
|
|
61
|
-
return true;
|
|
62
|
-
}
|
|
63
|
-
return false;
|
|
64
|
-
}
|
|
65
|
-
async publish(data) {
|
|
66
|
-
const logger = (0, logger_1.getLogger)();
|
|
67
|
-
const useCLI = this.shouldUseCLIEndpoint();
|
|
68
|
-
if (useCLI) {
|
|
69
|
-
try {
|
|
70
|
-
return await this.publishViaCLI(data);
|
|
71
|
-
}
|
|
72
|
-
catch (error) {
|
|
73
|
-
logger.debug('CLI endpoint failed, falling back to auto-register');
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
return await this.publishViaAutoRegister(data);
|
|
77
|
-
}
|
|
78
|
-
async publishViaAutoRegister(data) {
|
|
79
|
-
const logger = (0, logger_1.getLogger)();
|
|
80
|
-
try {
|
|
81
|
-
const clientInfo = (0, platform_info_1.generateClientInfo)({
|
|
82
|
-
processingMode: this.options?.processingMode === 'auto'
|
|
83
|
-
? undefined
|
|
84
|
-
: this.options?.processingMode || 'sync',
|
|
85
|
-
customMetadata: {
|
|
86
|
-
source: 'mcp-i-sdk'
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
logger.debug(`Generated client info: ${JSON.stringify(clientInfo)}`);
|
|
90
|
-
const response = await this.transport.post(`${this.endpoint}/api/agents/auto-register`, {
|
|
91
|
-
metadata: {
|
|
92
|
-
name: data.name,
|
|
93
|
-
description: data.description,
|
|
94
|
-
repository: data.repository,
|
|
95
|
-
version: '1.0.0'
|
|
96
|
-
},
|
|
97
|
-
clientInfo,
|
|
98
|
-
publicKey: data.publicKey || undefined
|
|
99
|
-
}, {
|
|
100
|
-
timeout: 30000,
|
|
101
|
-
headers: {
|
|
102
|
-
'Content-Type': 'application/json',
|
|
103
|
-
'User-Agent': `@kya-os/mcp-i/${clientInfo.sdkVersion}`
|
|
104
|
-
}
|
|
105
|
-
});
|
|
106
|
-
logger.debug(`Registration response status: ${response.status}`);
|
|
107
|
-
logger.debug(`Registration response data: ${JSON.stringify(response.data, null, 2)}`);
|
|
108
|
-
if (response.status === 202 && (0, polling_1.isAsyncRegistrationResponse)(response.data)) {
|
|
109
|
-
logger.debug('Got async registration response, polling for completion...');
|
|
110
|
-
const result = await (0, polling_1.pollRegistrationStatus)(response.data.status, this.transport, {
|
|
111
|
-
pollInterval: 2000,
|
|
112
|
-
maxPollingTime: 60000,
|
|
113
|
-
logger,
|
|
114
|
-
onProgress: (message) => {
|
|
115
|
-
logger.debug(message);
|
|
116
|
-
}
|
|
117
|
-
});
|
|
118
|
-
return {
|
|
119
|
-
success: true,
|
|
120
|
-
registryAgentId: result.agent.id,
|
|
121
|
-
profileUrl: result.agent.url
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
const syncResponse = response.data;
|
|
125
|
-
return {
|
|
126
|
-
success: true,
|
|
127
|
-
registryAgentId: syncResponse.agent.id,
|
|
128
|
-
profileUrl: syncResponse.agent.url
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
|
-
catch (error) {
|
|
132
|
-
return {
|
|
133
|
-
success: false,
|
|
134
|
-
error: error.message || 'Failed to register with KnowThat.ai'
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
async verify(did) {
|
|
139
|
-
try {
|
|
140
|
-
const agentSlug = this.extractAgentSlug(did);
|
|
141
|
-
const response = await this.transport.get(`${this.endpoint}/api/agents/${agentSlug}/verify`, { timeout: 5000 });
|
|
142
|
-
return response.data.valid === true;
|
|
143
|
-
}
|
|
144
|
-
catch {
|
|
145
|
-
return false;
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
async getStatus(did) {
|
|
149
|
-
try {
|
|
150
|
-
const agentSlug = this.extractAgentSlug(did);
|
|
151
|
-
const response = await this.transport.get(`${this.endpoint}/api/agents/${agentSlug}/status`, { timeout: 5000 });
|
|
152
|
-
return {
|
|
153
|
-
name: this.name,
|
|
154
|
-
status: response.data.verified ? 'active' : 'pending',
|
|
155
|
-
registeredAt: response.data.registeredAt,
|
|
156
|
-
type: 'primary'
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
catch (error) {
|
|
160
|
-
return {
|
|
161
|
-
name: this.name,
|
|
162
|
-
status: 'failed',
|
|
163
|
-
type: 'primary',
|
|
164
|
-
error: 'Failed to get status'
|
|
165
|
-
};
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
extractAgentSlug(did) {
|
|
169
|
-
const parts = did.split(':');
|
|
170
|
-
return parts[parts.length - 1];
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
exports.KnowThatRegistry = KnowThatRegistry;
|
package/dist/cjs/rotation.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { PersistedIdentity } from './types';
|
|
2
|
-
import { Transport } from './transport';
|
|
3
|
-
export interface KeyRotationPolicy {
|
|
4
|
-
maxAge?: number;
|
|
5
|
-
maxSignatures?: number;
|
|
6
|
-
algorithm?: string;
|
|
7
|
-
}
|
|
8
|
-
export interface KeyRotationResult {
|
|
9
|
-
success: boolean;
|
|
10
|
-
newKeyId?: string;
|
|
11
|
-
oldKeyId?: string;
|
|
12
|
-
gracePeriodEnd?: Date;
|
|
13
|
-
error?: string;
|
|
14
|
-
}
|
|
15
|
-
export interface KeyHealth {
|
|
16
|
-
age: number;
|
|
17
|
-
signatureCount: number;
|
|
18
|
-
shouldRotate: boolean;
|
|
19
|
-
lastRotated?: Date;
|
|
20
|
-
}
|
|
21
|
-
export declare class KeyRotationManager {
|
|
22
|
-
private identity;
|
|
23
|
-
private transport;
|
|
24
|
-
private policy;
|
|
25
|
-
private signatureCount;
|
|
26
|
-
private keyCreatedAt;
|
|
27
|
-
private lastRotatedAt?;
|
|
28
|
-
constructor(identity: PersistedIdentity, transport: Transport, policy?: KeyRotationPolicy);
|
|
29
|
-
checkKeyHealth(): KeyHealth;
|
|
30
|
-
incrementSignatureCount(): void;
|
|
31
|
-
rotateKeys(reason?: string): Promise<KeyRotationResult>;
|
|
32
|
-
setupAutoRotation(callback?: (result: KeyRotationResult) => void): NodeJS.Timer;
|
|
33
|
-
private getRegistryUrl;
|
|
34
|
-
private extractAgentId;
|
|
35
|
-
}
|
package/dist/cjs/rotation.js
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.KeyRotationManager = void 0;
|
|
4
|
-
const crypto_1 = require("./crypto");
|
|
5
|
-
class KeyRotationManager {
|
|
6
|
-
constructor(identity, transport, policy = {}) {
|
|
7
|
-
this.identity = identity;
|
|
8
|
-
this.transport = transport;
|
|
9
|
-
this.policy = policy;
|
|
10
|
-
this.signatureCount = 0;
|
|
11
|
-
this.keyCreatedAt = new Date(identity.registeredAt);
|
|
12
|
-
}
|
|
13
|
-
checkKeyHealth() {
|
|
14
|
-
const now = new Date();
|
|
15
|
-
const age = now.getTime() - this.keyCreatedAt.getTime();
|
|
16
|
-
const maxAge = this.policy.maxAge || 90 * 24 * 60 * 60 * 1000;
|
|
17
|
-
const maxSignatures = this.policy.maxSignatures || 1000000;
|
|
18
|
-
const shouldRotate = age > maxAge || this.signatureCount > maxSignatures;
|
|
19
|
-
return {
|
|
20
|
-
age,
|
|
21
|
-
signatureCount: this.signatureCount,
|
|
22
|
-
shouldRotate,
|
|
23
|
-
lastRotated: this.lastRotatedAt
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
incrementSignatureCount() {
|
|
27
|
-
this.signatureCount++;
|
|
28
|
-
}
|
|
29
|
-
async rotateKeys(reason = 'scheduled') {
|
|
30
|
-
try {
|
|
31
|
-
const newKeyPair = await (0, crypto_1.generateKeyPair)();
|
|
32
|
-
const timestamp = Date.now();
|
|
33
|
-
const message = `rotate-keys:${this.identity.did}:${timestamp}:${reason}`;
|
|
34
|
-
const signature = await (0, crypto_1.sign)(message, this.identity.privateKey);
|
|
35
|
-
const rotationRequest = {
|
|
36
|
-
newPublicKey: {
|
|
37
|
-
type: 'Ed25519VerificationKey2020',
|
|
38
|
-
publicKeyBase64: newKeyPair.publicKey
|
|
39
|
-
},
|
|
40
|
-
rotationReason: reason,
|
|
41
|
-
signedStatement: signature,
|
|
42
|
-
timestamp
|
|
43
|
-
};
|
|
44
|
-
const registryUrl = this.getRegistryUrl();
|
|
45
|
-
const agentId = this.extractAgentId();
|
|
46
|
-
const response = await this.transport.post(`${registryUrl}/api/agents/${agentId}/rotate-key`, rotationRequest, {
|
|
47
|
-
headers: {
|
|
48
|
-
'Authorization': `DID-Auth ${signature}`,
|
|
49
|
-
'Content-Type': 'application/json'
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
if (response.data.success) {
|
|
53
|
-
this.identity.publicKey = newKeyPair.publicKey;
|
|
54
|
-
this.identity.privateKey = newKeyPair.privateKey;
|
|
55
|
-
this.lastRotatedAt = new Date();
|
|
56
|
-
this.keyCreatedAt = new Date();
|
|
57
|
-
this.signatureCount = 0;
|
|
58
|
-
return {
|
|
59
|
-
success: true,
|
|
60
|
-
newKeyId: response.data.newKeyId,
|
|
61
|
-
oldKeyId: response.data.oldKeyId,
|
|
62
|
-
gracePeriodEnd: new Date(response.data.gracePeriodEnd)
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
else {
|
|
66
|
-
return {
|
|
67
|
-
success: false,
|
|
68
|
-
error: response.data.error || 'Key rotation failed'
|
|
69
|
-
};
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
catch (error) {
|
|
73
|
-
return {
|
|
74
|
-
success: false,
|
|
75
|
-
error: error.message || 'Key rotation error'
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
setupAutoRotation(callback) {
|
|
80
|
-
const checkInterval = 24 * 60 * 60 * 1000;
|
|
81
|
-
return setInterval(async () => {
|
|
82
|
-
const health = this.checkKeyHealth();
|
|
83
|
-
if (health.shouldRotate) {
|
|
84
|
-
const result = await this.rotateKeys('auto-rotation');
|
|
85
|
-
if (callback) {
|
|
86
|
-
callback(result);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}, checkInterval);
|
|
90
|
-
}
|
|
91
|
-
getRegistryUrl() {
|
|
92
|
-
return 'https://knowthat.ai';
|
|
93
|
-
}
|
|
94
|
-
extractAgentId() {
|
|
95
|
-
if (this.identity.agentId) {
|
|
96
|
-
return this.identity.agentId;
|
|
97
|
-
}
|
|
98
|
-
const parts = this.identity.did.split(':');
|
|
99
|
-
return parts[parts.length - 1];
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
exports.KeyRotationManager = KeyRotationManager;
|
package/dist/cjs/storage.d.ts
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { PersistedIdentity } from './types';
|
|
2
|
-
export interface StorageProvider {
|
|
3
|
-
load(): Promise<PersistedIdentity | null>;
|
|
4
|
-
save(identity: PersistedIdentity): Promise<void>;
|
|
5
|
-
exists(): Promise<boolean>;
|
|
6
|
-
}
|
|
7
|
-
export declare class FileStorage implements StorageProvider {
|
|
8
|
-
private filePath;
|
|
9
|
-
constructor(customPath?: string);
|
|
10
|
-
load(): Promise<PersistedIdentity | null>;
|
|
11
|
-
save(identity: PersistedIdentity): Promise<void>;
|
|
12
|
-
exists(): Promise<boolean>;
|
|
13
|
-
}
|
|
14
|
-
export declare class MemoryStorage implements StorageProvider {
|
|
15
|
-
private static instances;
|
|
16
|
-
private key;
|
|
17
|
-
constructor(key?: string);
|
|
18
|
-
load(): Promise<PersistedIdentity | null>;
|
|
19
|
-
save(identity: PersistedIdentity): Promise<void>;
|
|
20
|
-
exists(): Promise<boolean>;
|
|
21
|
-
static clear(): void;
|
|
22
|
-
}
|
|
23
|
-
export declare class EnvironmentStorage {
|
|
24
|
-
static load(): PersistedIdentity | null;
|
|
25
|
-
}
|
|
26
|
-
export declare class CombinedStorage implements StorageProvider {
|
|
27
|
-
private providers;
|
|
28
|
-
private primaryProvider;
|
|
29
|
-
constructor(providers: StorageProvider[]);
|
|
30
|
-
load(): Promise<PersistedIdentity | null>;
|
|
31
|
-
save(identity: PersistedIdentity): Promise<void>;
|
|
32
|
-
exists(): Promise<boolean>;
|
|
33
|
-
}
|
|
34
|
-
export declare class StorageFactory {
|
|
35
|
-
static create(options?: {
|
|
36
|
-
storage?: 'file' | 'memory' | 'auto';
|
|
37
|
-
customPath?: string;
|
|
38
|
-
memoryKey?: string;
|
|
39
|
-
encryptionPassword?: string;
|
|
40
|
-
}): StorageProvider;
|
|
41
|
-
}
|
package/dist/cjs/storage.js
DELETED
|
@@ -1,163 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.StorageFactory = exports.CombinedStorage = exports.EnvironmentStorage = exports.MemoryStorage = exports.FileStorage = void 0;
|
|
37
|
-
const fs = __importStar(require("fs"));
|
|
38
|
-
const path = __importStar(require("path"));
|
|
39
|
-
class FileStorage {
|
|
40
|
-
constructor(customPath) {
|
|
41
|
-
this.filePath = customPath || path.join(process.cwd(), '.mcp-identity.json');
|
|
42
|
-
}
|
|
43
|
-
async load() {
|
|
44
|
-
try {
|
|
45
|
-
if (fs.existsSync(this.filePath)) {
|
|
46
|
-
const content = fs.readFileSync(this.filePath, 'utf-8');
|
|
47
|
-
return JSON.parse(content);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
catch {
|
|
51
|
-
}
|
|
52
|
-
return null;
|
|
53
|
-
}
|
|
54
|
-
async save(identity) {
|
|
55
|
-
fs.writeFileSync(this.filePath, JSON.stringify(identity, null, 2));
|
|
56
|
-
}
|
|
57
|
-
async exists() {
|
|
58
|
-
return fs.existsSync(this.filePath);
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
exports.FileStorage = FileStorage;
|
|
62
|
-
class MemoryStorage {
|
|
63
|
-
constructor(key) {
|
|
64
|
-
this.key = key || 'default';
|
|
65
|
-
}
|
|
66
|
-
async load() {
|
|
67
|
-
return MemoryStorage.instances.get(this.key) || null;
|
|
68
|
-
}
|
|
69
|
-
async save(identity) {
|
|
70
|
-
MemoryStorage.instances.set(this.key, identity);
|
|
71
|
-
}
|
|
72
|
-
async exists() {
|
|
73
|
-
return MemoryStorage.instances.has(this.key);
|
|
74
|
-
}
|
|
75
|
-
static clear() {
|
|
76
|
-
MemoryStorage.instances.clear();
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
exports.MemoryStorage = MemoryStorage;
|
|
80
|
-
MemoryStorage.instances = new Map();
|
|
81
|
-
class EnvironmentStorage {
|
|
82
|
-
static load() {
|
|
83
|
-
if (process.env.AGENT_DID && process.env.AGENT_PUBLIC_KEY && process.env.AGENT_PRIVATE_KEY) {
|
|
84
|
-
return {
|
|
85
|
-
did: process.env.AGENT_DID,
|
|
86
|
-
publicKey: process.env.AGENT_PUBLIC_KEY,
|
|
87
|
-
privateKey: process.env.AGENT_PRIVATE_KEY,
|
|
88
|
-
agentId: process.env.AGENT_ID || '',
|
|
89
|
-
agentSlug: process.env.AGENT_SLUG || '',
|
|
90
|
-
registeredAt: process.env.AGENT_REGISTERED_AT || new Date().toISOString()
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
return null;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
exports.EnvironmentStorage = EnvironmentStorage;
|
|
97
|
-
class CombinedStorage {
|
|
98
|
-
constructor(providers) {
|
|
99
|
-
if (providers.length === 0) {
|
|
100
|
-
throw new Error('At least one storage provider is required');
|
|
101
|
-
}
|
|
102
|
-
this.providers = providers;
|
|
103
|
-
this.primaryProvider = providers[0];
|
|
104
|
-
}
|
|
105
|
-
async load() {
|
|
106
|
-
const envIdentity = EnvironmentStorage.load();
|
|
107
|
-
if (envIdentity) {
|
|
108
|
-
return envIdentity;
|
|
109
|
-
}
|
|
110
|
-
for (const provider of this.providers) {
|
|
111
|
-
const identity = await provider.load();
|
|
112
|
-
if (identity) {
|
|
113
|
-
return identity;
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
return null;
|
|
117
|
-
}
|
|
118
|
-
async save(identity) {
|
|
119
|
-
await this.primaryProvider.save(identity);
|
|
120
|
-
}
|
|
121
|
-
async exists() {
|
|
122
|
-
for (const provider of this.providers) {
|
|
123
|
-
if (await provider.exists()) {
|
|
124
|
-
return true;
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
return false;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
exports.CombinedStorage = CombinedStorage;
|
|
131
|
-
class StorageFactory {
|
|
132
|
-
static create(options) {
|
|
133
|
-
const storageType = options?.storage || 'auto';
|
|
134
|
-
let baseStorage;
|
|
135
|
-
if (storageType === 'memory') {
|
|
136
|
-
baseStorage = new MemoryStorage(options?.memoryKey);
|
|
137
|
-
}
|
|
138
|
-
else if (storageType === 'file') {
|
|
139
|
-
baseStorage = new FileStorage(options?.customPath);
|
|
140
|
-
}
|
|
141
|
-
else if (storageType === 'auto') {
|
|
142
|
-
if (process.env.AWS_LAMBDA_FUNCTION_NAME ||
|
|
143
|
-
process.env.VERCEL ||
|
|
144
|
-
process.env.NETLIFY ||
|
|
145
|
-
!fs.existsSync ||
|
|
146
|
-
typeof fs.writeFileSync !== 'function') {
|
|
147
|
-
baseStorage = new MemoryStorage(options?.memoryKey);
|
|
148
|
-
}
|
|
149
|
-
else {
|
|
150
|
-
baseStorage = new FileStorage(options?.customPath);
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
else {
|
|
154
|
-
throw new Error(`Unknown storage type: ${storageType}`);
|
|
155
|
-
}
|
|
156
|
-
if (options?.encryptionPassword) {
|
|
157
|
-
const { createEncryptedStorage } = require('./encrypted-storage');
|
|
158
|
-
return createEncryptedStorage(baseStorage, options.encryptionPassword);
|
|
159
|
-
}
|
|
160
|
-
return baseStorage;
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
exports.StorageFactory = StorageFactory;
|
package/dist/cjs/transport.d.ts
DELETED
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
export interface TransportOptions {
|
|
2
|
-
timeout?: number;
|
|
3
|
-
headers?: Record<string, string>;
|
|
4
|
-
}
|
|
5
|
-
export interface TransportResponse<T = any> {
|
|
6
|
-
data: T;
|
|
7
|
-
status: number;
|
|
8
|
-
headers: Record<string, string>;
|
|
9
|
-
}
|
|
10
|
-
export interface Transport {
|
|
11
|
-
post<T = any>(url: string, data: any, options?: TransportOptions): Promise<TransportResponse<T>>;
|
|
12
|
-
get<T = any>(url: string, options?: TransportOptions): Promise<TransportResponse<T>>;
|
|
13
|
-
}
|
|
14
|
-
export declare class FetchTransport implements Transport {
|
|
15
|
-
post<T = any>(url: string, data: any, options?: TransportOptions): Promise<TransportResponse<T>>;
|
|
16
|
-
get<T = any>(url: string, options?: TransportOptions): Promise<TransportResponse<T>>;
|
|
17
|
-
}
|
|
18
|
-
export declare class AxiosTransport implements Transport {
|
|
19
|
-
private axiosInstance;
|
|
20
|
-
post<T = any>(url: string, data: any, options?: TransportOptions): Promise<TransportResponse<T>>;
|
|
21
|
-
get<T = any>(url: string, options?: TransportOptions): Promise<TransportResponse<T>>;
|
|
22
|
-
private getAxios;
|
|
23
|
-
}
|
|
24
|
-
export declare class RuntimeDetector {
|
|
25
|
-
static isEdgeRuntime(): boolean;
|
|
26
|
-
static isNodeRuntime(): boolean;
|
|
27
|
-
static isNextJs(): boolean;
|
|
28
|
-
static hasFetch(): boolean;
|
|
29
|
-
static isLambda(): boolean;
|
|
30
|
-
}
|
|
31
|
-
export declare class TransportFactory {
|
|
32
|
-
static create(options?: {
|
|
33
|
-
transport?: 'axios' | 'fetch' | 'auto';
|
|
34
|
-
}): Transport;
|
|
35
|
-
}
|