@datagrout/conduit 0.8.0 → 0.8.1
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 +1 -1
- package/dist/index.d.mts +14 -2
- package/dist/index.d.ts +14 -2
- package/dist/index.js +7 -2
- package/dist/index.mjs +6 -2
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.d.mts
CHANGED
|
@@ -1833,6 +1833,18 @@ declare function isDgUrl(url: string): boolean;
|
|
|
1833
1833
|
* await client.disconnect();
|
|
1834
1834
|
* ```
|
|
1835
1835
|
*/
|
|
1836
|
+
/**
|
|
1837
|
+
* Whether a tool name is one of DataGrout's own (the semantic discovery and
|
|
1838
|
+
* execution tools) rather than a third-party integration tool.
|
|
1839
|
+
*
|
|
1840
|
+
* Third-party tools are named `integration@version/tool@version`. DataGrout's
|
|
1841
|
+
* own tools reach a client in two spellings depending on the transport: the
|
|
1842
|
+
* canonical `data-grout@1/discovery.perform@1` over WebSocket, the short
|
|
1843
|
+
* `discovery.perform` over HTTP MCP. Treating "contains `@`" as "third party"
|
|
1844
|
+
* kept only the short form, so a WebSocket client with the intelligent
|
|
1845
|
+
* interface on saw zero tools.
|
|
1846
|
+
*/
|
|
1847
|
+
declare function isDgNativeTool(name: string): boolean;
|
|
1836
1848
|
declare class Client {
|
|
1837
1849
|
private url;
|
|
1838
1850
|
private auth?;
|
|
@@ -2380,6 +2392,6 @@ declare function saveIdentity(identity: RegisteredIdentity, directory?: string):
|
|
|
2380
2392
|
* cycle. The MCP handshake reports this to the server, and it used to be a
|
|
2381
2393
|
* separate hardcoded literal that had drifted six minor versions behind.
|
|
2382
2394
|
*/
|
|
2383
|
-
declare const version = "0.8.
|
|
2395
|
+
declare const version = "0.8.1";
|
|
2384
2396
|
|
|
2385
|
-
export { AuthCodeError, type AuthCodeErrorKind, AuthCodeFlow, AuthCodeProvider, type AuthConfig, AuthError, type AuthServerMetadata, type Byok, type ChartOptions, Client, type ClientAuth, type ClientOptions, ConduitError, ConduitIdentity, type ConstrainOptions, type CreditEstimate, DEFAULT_IDENTITY_DIR, DEFAULT_SCOPE, GRANT_TYPE as DELEGATION_GRANT_TYPE, SERVER_ERROR_CODES as DELEGATION_SERVER_ERROR_CODES, DG_CA_URL, DG_SUBSTRATE_ENDPOINT, DelegatedProvider, type DelegatedToken, DelegationError, type DelegationErrorKind, DelegationRequest, type DiscoverOptions, type DiscoverResult, type FlowOptions, type ForgetOptions, type Grant, type GuideOptions, type GuideRequestOptions, type GuideState, GuidedSession, InvalidConfigError, type Keypair, LoopbackListener, type MCPPrompt, type MCPResource, type MCPTool, type MtlsConfig, type NamedTokenTypeUrn, NetworkError, NotInitializedError, OAuthTokenProvider, type OnrampCredentials, type OnrampOptions, type PendingAuthorization, type PerformOptions, type PerformResult, type PlanOptions, type PrismFocusOptions, type QueryCellOptions, type RateLimit, RateLimitError, type RateLimitStatus, type Receipt, type Redirect, type ReflectOptions, type RefractOptions, type RegisteredClient, type RegisteredIdentity, type RegistrationOptions, type RememberOptions, type RenewalOptions, type RotationOptions, type SavedPaths, ServerError, type ServerErrorCode, Subscription, type SubscriptionEvent, TOKEN_TYPES, TokenSource, type TokenSourceKind, type TokenType, type TokenTypeName, type ToolInfo, type ToolMeta, SUBPROTOCOL as WS_SUBPROTOCOL, WsTransport, authCodeProviderFrom, challengeS256, deriveTokenEndpoint, extractMeta, fetchDgCaCert, fetchWithIdentity, generateKeypair, generateVerifier, isDelegatedTokenExpired, isDgUrl, isGrantExpired, isGrantRefreshable, refreshCaCert, refreshGrant, registerAndExchange, registerIdentity, registerOnly, rotateIdentity, saveIdentity, supportsS256, tokenTypeName, version };
|
|
2397
|
+
export { AuthCodeError, type AuthCodeErrorKind, AuthCodeFlow, AuthCodeProvider, type AuthConfig, AuthError, type AuthServerMetadata, type Byok, type ChartOptions, Client, type ClientAuth, type ClientOptions, ConduitError, ConduitIdentity, type ConstrainOptions, type CreditEstimate, DEFAULT_IDENTITY_DIR, DEFAULT_SCOPE, GRANT_TYPE as DELEGATION_GRANT_TYPE, SERVER_ERROR_CODES as DELEGATION_SERVER_ERROR_CODES, DG_CA_URL, DG_SUBSTRATE_ENDPOINT, DelegatedProvider, type DelegatedToken, DelegationError, type DelegationErrorKind, DelegationRequest, type DiscoverOptions, type DiscoverResult, type FlowOptions, type ForgetOptions, type Grant, type GuideOptions, type GuideRequestOptions, type GuideState, GuidedSession, InvalidConfigError, type Keypair, LoopbackListener, type MCPPrompt, type MCPResource, type MCPTool, type MtlsConfig, type NamedTokenTypeUrn, NetworkError, NotInitializedError, OAuthTokenProvider, type OnrampCredentials, type OnrampOptions, type PendingAuthorization, type PerformOptions, type PerformResult, type PlanOptions, type PrismFocusOptions, type QueryCellOptions, type RateLimit, RateLimitError, type RateLimitStatus, type Receipt, type Redirect, type ReflectOptions, type RefractOptions, type RegisteredClient, type RegisteredIdentity, type RegistrationOptions, type RememberOptions, type RenewalOptions, type RotationOptions, type SavedPaths, ServerError, type ServerErrorCode, Subscription, type SubscriptionEvent, TOKEN_TYPES, TokenSource, type TokenSourceKind, type TokenType, type TokenTypeName, type ToolInfo, type ToolMeta, SUBPROTOCOL as WS_SUBPROTOCOL, WsTransport, authCodeProviderFrom, challengeS256, deriveTokenEndpoint, extractMeta, fetchDgCaCert, fetchWithIdentity, generateKeypair, generateVerifier, isDelegatedTokenExpired, isDgNativeTool, isDgUrl, isGrantExpired, isGrantRefreshable, refreshCaCert, refreshGrant, registerAndExchange, registerIdentity, registerOnly, rotateIdentity, saveIdentity, supportsS256, tokenTypeName, version };
|
package/dist/index.d.ts
CHANGED
|
@@ -1833,6 +1833,18 @@ declare function isDgUrl(url: string): boolean;
|
|
|
1833
1833
|
* await client.disconnect();
|
|
1834
1834
|
* ```
|
|
1835
1835
|
*/
|
|
1836
|
+
/**
|
|
1837
|
+
* Whether a tool name is one of DataGrout's own (the semantic discovery and
|
|
1838
|
+
* execution tools) rather than a third-party integration tool.
|
|
1839
|
+
*
|
|
1840
|
+
* Third-party tools are named `integration@version/tool@version`. DataGrout's
|
|
1841
|
+
* own tools reach a client in two spellings depending on the transport: the
|
|
1842
|
+
* canonical `data-grout@1/discovery.perform@1` over WebSocket, the short
|
|
1843
|
+
* `discovery.perform` over HTTP MCP. Treating "contains `@`" as "third party"
|
|
1844
|
+
* kept only the short form, so a WebSocket client with the intelligent
|
|
1845
|
+
* interface on saw zero tools.
|
|
1846
|
+
*/
|
|
1847
|
+
declare function isDgNativeTool(name: string): boolean;
|
|
1836
1848
|
declare class Client {
|
|
1837
1849
|
private url;
|
|
1838
1850
|
private auth?;
|
|
@@ -2380,6 +2392,6 @@ declare function saveIdentity(identity: RegisteredIdentity, directory?: string):
|
|
|
2380
2392
|
* cycle. The MCP handshake reports this to the server, and it used to be a
|
|
2381
2393
|
* separate hardcoded literal that had drifted six minor versions behind.
|
|
2382
2394
|
*/
|
|
2383
|
-
declare const version = "0.8.
|
|
2395
|
+
declare const version = "0.8.1";
|
|
2384
2396
|
|
|
2385
|
-
export { AuthCodeError, type AuthCodeErrorKind, AuthCodeFlow, AuthCodeProvider, type AuthConfig, AuthError, type AuthServerMetadata, type Byok, type ChartOptions, Client, type ClientAuth, type ClientOptions, ConduitError, ConduitIdentity, type ConstrainOptions, type CreditEstimate, DEFAULT_IDENTITY_DIR, DEFAULT_SCOPE, GRANT_TYPE as DELEGATION_GRANT_TYPE, SERVER_ERROR_CODES as DELEGATION_SERVER_ERROR_CODES, DG_CA_URL, DG_SUBSTRATE_ENDPOINT, DelegatedProvider, type DelegatedToken, DelegationError, type DelegationErrorKind, DelegationRequest, type DiscoverOptions, type DiscoverResult, type FlowOptions, type ForgetOptions, type Grant, type GuideOptions, type GuideRequestOptions, type GuideState, GuidedSession, InvalidConfigError, type Keypair, LoopbackListener, type MCPPrompt, type MCPResource, type MCPTool, type MtlsConfig, type NamedTokenTypeUrn, NetworkError, NotInitializedError, OAuthTokenProvider, type OnrampCredentials, type OnrampOptions, type PendingAuthorization, type PerformOptions, type PerformResult, type PlanOptions, type PrismFocusOptions, type QueryCellOptions, type RateLimit, RateLimitError, type RateLimitStatus, type Receipt, type Redirect, type ReflectOptions, type RefractOptions, type RegisteredClient, type RegisteredIdentity, type RegistrationOptions, type RememberOptions, type RenewalOptions, type RotationOptions, type SavedPaths, ServerError, type ServerErrorCode, Subscription, type SubscriptionEvent, TOKEN_TYPES, TokenSource, type TokenSourceKind, type TokenType, type TokenTypeName, type ToolInfo, type ToolMeta, SUBPROTOCOL as WS_SUBPROTOCOL, WsTransport, authCodeProviderFrom, challengeS256, deriveTokenEndpoint, extractMeta, fetchDgCaCert, fetchWithIdentity, generateKeypair, generateVerifier, isDelegatedTokenExpired, isDgUrl, isGrantExpired, isGrantRefreshable, refreshCaCert, refreshGrant, registerAndExchange, registerIdentity, registerOnly, rotateIdentity, saveIdentity, supportsS256, tokenTypeName, version };
|
|
2397
|
+
export { AuthCodeError, type AuthCodeErrorKind, AuthCodeFlow, AuthCodeProvider, type AuthConfig, AuthError, type AuthServerMetadata, type Byok, type ChartOptions, Client, type ClientAuth, type ClientOptions, ConduitError, ConduitIdentity, type ConstrainOptions, type CreditEstimate, DEFAULT_IDENTITY_DIR, DEFAULT_SCOPE, GRANT_TYPE as DELEGATION_GRANT_TYPE, SERVER_ERROR_CODES as DELEGATION_SERVER_ERROR_CODES, DG_CA_URL, DG_SUBSTRATE_ENDPOINT, DelegatedProvider, type DelegatedToken, DelegationError, type DelegationErrorKind, DelegationRequest, type DiscoverOptions, type DiscoverResult, type FlowOptions, type ForgetOptions, type Grant, type GuideOptions, type GuideRequestOptions, type GuideState, GuidedSession, InvalidConfigError, type Keypair, LoopbackListener, type MCPPrompt, type MCPResource, type MCPTool, type MtlsConfig, type NamedTokenTypeUrn, NetworkError, NotInitializedError, OAuthTokenProvider, type OnrampCredentials, type OnrampOptions, type PendingAuthorization, type PerformOptions, type PerformResult, type PlanOptions, type PrismFocusOptions, type QueryCellOptions, type RateLimit, RateLimitError, type RateLimitStatus, type Receipt, type Redirect, type ReflectOptions, type RefractOptions, type RegisteredClient, type RegisteredIdentity, type RegistrationOptions, type RememberOptions, type RenewalOptions, type RotationOptions, type SavedPaths, ServerError, type ServerErrorCode, Subscription, type SubscriptionEvent, TOKEN_TYPES, TokenSource, type TokenSourceKind, type TokenType, type TokenTypeName, type ToolInfo, type ToolMeta, SUBPROTOCOL as WS_SUBPROTOCOL, WsTransport, authCodeProviderFrom, challengeS256, deriveTokenEndpoint, extractMeta, fetchDgCaCert, fetchWithIdentity, generateKeypair, generateVerifier, isDelegatedTokenExpired, isDgNativeTool, isDgUrl, isGrantExpired, isGrantRefreshable, refreshCaCert, refreshGrant, registerAndExchange, registerIdentity, registerOnly, rotateIdentity, saveIdentity, supportsS256, tokenTypeName, version };
|
package/dist/index.js
CHANGED
|
@@ -472,6 +472,7 @@ __export(index_exports, {
|
|
|
472
472
|
generateKeypair: () => generateKeypair,
|
|
473
473
|
generateVerifier: () => generateVerifier,
|
|
474
474
|
isDelegatedTokenExpired: () => isDelegatedTokenExpired,
|
|
475
|
+
isDgNativeTool: () => isDgNativeTool,
|
|
475
476
|
isDgUrl: () => isDgUrl,
|
|
476
477
|
isGrantExpired: () => isGrantExpired,
|
|
477
478
|
isGrantRefreshable: () => isGrantRefreshable,
|
|
@@ -492,7 +493,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
492
493
|
var path2 = __toESM(require("path"));
|
|
493
494
|
|
|
494
495
|
// src/version.ts
|
|
495
|
-
var version = "0.8.
|
|
496
|
+
var version = "0.8.1";
|
|
496
497
|
|
|
497
498
|
// src/transports/base.ts
|
|
498
499
|
var Transport = class {
|
|
@@ -2318,6 +2319,9 @@ var GuidedSession = class {
|
|
|
2318
2319
|
function isDgUrl(url) {
|
|
2319
2320
|
return url.includes("datagrout.ai") || url.includes("datagrout.dev") || !!process.env["CONDUIT_IS_DG"];
|
|
2320
2321
|
}
|
|
2322
|
+
function isDgNativeTool(name) {
|
|
2323
|
+
return !name.includes("@") || name.startsWith("data-grout@") || name.startsWith("data-grout/");
|
|
2324
|
+
}
|
|
2321
2325
|
var Client2 = class _Client {
|
|
2322
2326
|
url;
|
|
2323
2327
|
auth;
|
|
@@ -2596,7 +2600,7 @@ var Client2 = class _Client {
|
|
|
2596
2600
|
cursor = Array.isArray(response) ? void 0 : response.nextCursor;
|
|
2597
2601
|
} while (cursor);
|
|
2598
2602
|
if (this.useIntelligentInterface) {
|
|
2599
|
-
return allTools.filter((t) =>
|
|
2603
|
+
return allTools.filter((t) => isDgNativeTool(t.name));
|
|
2600
2604
|
}
|
|
2601
2605
|
return allTools;
|
|
2602
2606
|
});
|
|
@@ -3663,6 +3667,7 @@ init_onramp();
|
|
|
3663
3667
|
generateKeypair,
|
|
3664
3668
|
generateVerifier,
|
|
3665
3669
|
isDelegatedTokenExpired,
|
|
3670
|
+
isDgNativeTool,
|
|
3666
3671
|
isDgUrl,
|
|
3667
3672
|
isGrantExpired,
|
|
3668
3673
|
isGrantRefreshable,
|
package/dist/index.mjs
CHANGED
|
@@ -256,7 +256,7 @@ var init_identity = __esm({
|
|
|
256
256
|
import * as path2 from "path";
|
|
257
257
|
|
|
258
258
|
// src/version.ts
|
|
259
|
-
var version = "0.8.
|
|
259
|
+
var version = "0.8.1";
|
|
260
260
|
|
|
261
261
|
// src/transports/base.ts
|
|
262
262
|
var Transport = class {
|
|
@@ -2082,6 +2082,9 @@ var GuidedSession = class {
|
|
|
2082
2082
|
function isDgUrl(url) {
|
|
2083
2083
|
return url.includes("datagrout.ai") || url.includes("datagrout.dev") || !!process.env["CONDUIT_IS_DG"];
|
|
2084
2084
|
}
|
|
2085
|
+
function isDgNativeTool(name) {
|
|
2086
|
+
return !name.includes("@") || name.startsWith("data-grout@") || name.startsWith("data-grout/");
|
|
2087
|
+
}
|
|
2085
2088
|
var Client2 = class _Client {
|
|
2086
2089
|
url;
|
|
2087
2090
|
auth;
|
|
@@ -2360,7 +2363,7 @@ var Client2 = class _Client {
|
|
|
2360
2363
|
cursor = Array.isArray(response) ? void 0 : response.nextCursor;
|
|
2361
2364
|
} while (cursor);
|
|
2362
2365
|
if (this.useIntelligentInterface) {
|
|
2363
|
-
return allTools.filter((t) =>
|
|
2366
|
+
return allTools.filter((t) => isDgNativeTool(t.name));
|
|
2364
2367
|
}
|
|
2365
2368
|
return allTools;
|
|
2366
2369
|
});
|
|
@@ -3423,6 +3426,7 @@ export {
|
|
|
3423
3426
|
generateKeypair,
|
|
3424
3427
|
generateVerifier,
|
|
3425
3428
|
isDelegatedTokenExpired,
|
|
3429
|
+
isDgNativeTool,
|
|
3426
3430
|
isDgUrl,
|
|
3427
3431
|
isGrantExpired,
|
|
3428
3432
|
isGrantRefreshable,
|