@tenkeybridge/mcp 0.7.0 → 0.9.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.cts CHANGED
@@ -1,5 +1,13 @@
1
1
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- import { QueryOptions, EntityName } from '@tenkeybridge/client';
2
+ import { AccessSummary, QueryOptions, EntityName } from '@tenkeybridge/client';
3
+
4
+ /**
5
+ * Should this tool be listed for a credential with this access? True when
6
+ * `access` is absent (older gateway: unknown means list everything). For
7
+ * entity-scoped tools one granting rule anywhere keeps the tool; the gateway
8
+ * still refuses entities outside the rule, and SCOPE_DENIED text surfaces.
9
+ */
10
+ declare function toolVisible(access: AccessSummary | undefined, tool: string): boolean;
3
11
 
4
12
  interface EntityAccessorLike {
5
13
  get?(id?: string): Promise<unknown>;
@@ -18,11 +26,24 @@ interface EntityAccessorLike {
18
26
  type GatewayClient = Record<string, unknown> & {
19
27
  query(entity: string, opts?: QueryOptions): Promise<unknown>;
20
28
  report?(name: string, params?: Record<string, string>): Promise<unknown>;
29
+ setClearedStatus?(args: {
30
+ TxnId: string;
31
+ LineId?: string;
32
+ ClearedStatus: string;
33
+ TxnType?: string;
34
+ }, opts?: {
35
+ requestId?: string;
36
+ }): Promise<unknown>;
37
+ getClearedStatus?(args: {
38
+ txnId: string;
39
+ txnType: string;
40
+ }): Promise<unknown>;
21
41
  };
22
- declare function registerTools(server: McpServer, client: GatewayClient): void;
42
+ declare function registerTools(server: McpServer, client: GatewayClient, access?: AccessSummary): void;
23
43
 
24
44
  declare const SERVER_NAME = "tenkeybridge";
25
- declare function buildServer(client: GatewayClient): McpServer;
45
+ /** `access`: from `client.access()`; omit (or undefined) to list every tool. */
46
+ declare function buildServer(client: GatewayClient, access?: AccessSummary): McpServer;
26
47
 
27
48
  declare function registerResources(server: McpServer): void;
28
49
 
@@ -76,6 +97,6 @@ declare function resolveEntityName(name: string): EntityName | undefined;
76
97
  type CatalogSummaryRow = Pick<CatalogEntry, "entity" | "verdict" | "group" | "read" | "write" | "headline" | "usage">;
77
98
  declare function catalogSummary(): CatalogSummaryRow[];
78
99
 
79
- declare const PKG_VERSION = "0.7.0";
100
+ declare const PKG_VERSION = "0.9.0";
80
101
 
81
- export { CATALOG, type CatalogEntry, type CatalogField, type CatalogSummaryRow, type CatalogUnsupported, type EntityAccessorLike, type GatewayClient, type McpAuth, type McpConfig, PKG_VERSION, SERVER_NAME, buildServer, catalogSummary, defaultTokenFile, loadConfig, persistRefreshToken, readStoredRefreshToken, registerResources, registerTools, resolveCatalog, resolveEntityName };
102
+ export { CATALOG, type CatalogEntry, type CatalogField, type CatalogSummaryRow, type CatalogUnsupported, type EntityAccessorLike, type GatewayClient, type McpAuth, type McpConfig, PKG_VERSION, SERVER_NAME, buildServer, catalogSummary, defaultTokenFile, loadConfig, persistRefreshToken, readStoredRefreshToken, registerResources, registerTools, resolveCatalog, resolveEntityName, toolVisible };
package/dist/index.d.ts CHANGED
@@ -1,5 +1,13 @@
1
1
  import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
2
- import { QueryOptions, EntityName } from '@tenkeybridge/client';
2
+ import { AccessSummary, QueryOptions, EntityName } from '@tenkeybridge/client';
3
+
4
+ /**
5
+ * Should this tool be listed for a credential with this access? True when
6
+ * `access` is absent (older gateway: unknown means list everything). For
7
+ * entity-scoped tools one granting rule anywhere keeps the tool; the gateway
8
+ * still refuses entities outside the rule, and SCOPE_DENIED text surfaces.
9
+ */
10
+ declare function toolVisible(access: AccessSummary | undefined, tool: string): boolean;
3
11
 
4
12
  interface EntityAccessorLike {
5
13
  get?(id?: string): Promise<unknown>;
@@ -18,11 +26,24 @@ interface EntityAccessorLike {
18
26
  type GatewayClient = Record<string, unknown> & {
19
27
  query(entity: string, opts?: QueryOptions): Promise<unknown>;
20
28
  report?(name: string, params?: Record<string, string>): Promise<unknown>;
29
+ setClearedStatus?(args: {
30
+ TxnId: string;
31
+ LineId?: string;
32
+ ClearedStatus: string;
33
+ TxnType?: string;
34
+ }, opts?: {
35
+ requestId?: string;
36
+ }): Promise<unknown>;
37
+ getClearedStatus?(args: {
38
+ txnId: string;
39
+ txnType: string;
40
+ }): Promise<unknown>;
21
41
  };
22
- declare function registerTools(server: McpServer, client: GatewayClient): void;
42
+ declare function registerTools(server: McpServer, client: GatewayClient, access?: AccessSummary): void;
23
43
 
24
44
  declare const SERVER_NAME = "tenkeybridge";
25
- declare function buildServer(client: GatewayClient): McpServer;
45
+ /** `access`: from `client.access()`; omit (or undefined) to list every tool. */
46
+ declare function buildServer(client: GatewayClient, access?: AccessSummary): McpServer;
26
47
 
27
48
  declare function registerResources(server: McpServer): void;
28
49
 
@@ -76,6 +97,6 @@ declare function resolveEntityName(name: string): EntityName | undefined;
76
97
  type CatalogSummaryRow = Pick<CatalogEntry, "entity" | "verdict" | "group" | "read" | "write" | "headline" | "usage">;
77
98
  declare function catalogSummary(): CatalogSummaryRow[];
78
99
 
79
- declare const PKG_VERSION = "0.7.0";
100
+ declare const PKG_VERSION = "0.9.0";
80
101
 
81
- export { CATALOG, type CatalogEntry, type CatalogField, type CatalogSummaryRow, type CatalogUnsupported, type EntityAccessorLike, type GatewayClient, type McpAuth, type McpConfig, PKG_VERSION, SERVER_NAME, buildServer, catalogSummary, defaultTokenFile, loadConfig, persistRefreshToken, readStoredRefreshToken, registerResources, registerTools, resolveCatalog, resolveEntityName };
102
+ export { CATALOG, type CatalogEntry, type CatalogField, type CatalogSummaryRow, type CatalogUnsupported, type EntityAccessorLike, type GatewayClient, type McpAuth, type McpConfig, PKG_VERSION, SERVER_NAME, buildServer, catalogSummary, defaultTokenFile, loadConfig, persistRefreshToken, readStoredRefreshToken, registerResources, registerTools, resolveCatalog, resolveEntityName, toolVisible };