@ethisyscore/plugin-ui 1.92.1 → 1.94.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 +2 -1
- package/dist/components/connectors/index.cjs +676 -11
- package/dist/components/connectors/index.cjs.map +1 -1
- package/dist/components/connectors/index.d.cts +135 -343
- package/dist/components/connectors/index.d.ts +135 -343
- package/dist/components/connectors/index.js +672 -14
- package/dist/components/connectors/index.js.map +1 -1
- package/dist/components/shared/index.cjs +12 -8
- package/dist/components/shared/index.cjs.map +1 -1
- package/dist/components/shared/index.js +13 -9
- package/dist/components/shared/index.js.map +1 -1
- package/dist/components/ui/index.cjs +16 -0
- package/dist/components/ui/index.cjs.map +1 -1
- package/dist/components/ui/index.d.cts +69 -3
- package/dist/components/ui/index.d.ts +69 -3
- package/dist/components/ui/index.js +14 -3
- package/dist/components/ui/index.js.map +1 -1
- package/dist/connector-mappings/index.cjs +1061 -0
- package/dist/connector-mappings/index.cjs.map +1 -0
- package/dist/connector-mappings/index.d.cts +1274 -0
- package/dist/connector-mappings/index.d.ts +1274 -0
- package/dist/connector-mappings/index.js +1020 -0
- package/dist/connector-mappings/index.js.map +1 -0
- package/dist/mappingQueryKeys-BcbA0TGy.d.cts +473 -0
- package/dist/mappingQueryKeys-BcbA0TGy.d.ts +473 -0
- package/dist/mcpService-4h3sKDpW.d.cts +35 -0
- package/dist/mcpService-4h3sKDpW.d.ts +35 -0
- package/dist/platform-react/index.d.cts +3 -35
- package/dist/platform-react/index.d.ts +3 -35
- package/package.json +6 -1
|
@@ -3,6 +3,8 @@ import { ComponentType, ReactElement, ReactNode, AnchorHTMLAttributes, MouseEven
|
|
|
3
3
|
import * as _tanstack_react_query from '@tanstack/react-query';
|
|
4
4
|
import { QueryClient, UseQueryResult, UseQueryOptions, QueryKey } from '@tanstack/react-query';
|
|
5
5
|
import { PlatformReactPageProps } from '@ethisyscore/components-react';
|
|
6
|
+
import { T as ToolInvoker } from '../mcpService-4h3sKDpW.js';
|
|
7
|
+
export { B as BaseMcpService, n as notViaMcp, u as useToolInvoker, a as useToolInvokerMap } from '../mcpService-4h3sKDpW.js';
|
|
6
8
|
import * as _tanstack_query_core from '@tanstack/query-core';
|
|
7
9
|
import { McpTransport, UploadDocumentResult } from '@ethisyscore/extension-runtime/plugin';
|
|
8
10
|
import { k as HostSidebarInput, n as HostSidebarHookInput } from '../useHostSidebarActions-Bt2U-EuA.js';
|
|
@@ -120,40 +122,6 @@ declare const useView: (module: string, viewName: string) => ComponentType<Recor
|
|
|
120
122
|
*/
|
|
121
123
|
declare const MissingViewFallback: ComponentType<Record<string, unknown>>;
|
|
122
124
|
|
|
123
|
-
/** Dispatches an MCP tool call by name. The seam a lifted REST service binds to. */
|
|
124
|
-
type ToolInvoker = (toolName: string, args: unknown) => Promise<unknown>;
|
|
125
|
-
/**
|
|
126
|
-
* Base for service classes lifted from a monolith REST plane onto MCP.
|
|
127
|
-
*
|
|
128
|
-
* The monolith versions extend a REST base (`this.get`/`this.post` over axios).
|
|
129
|
-
* The plugin runtime exposes no imperative MCP transport — only the
|
|
130
|
-
* `useMcpTool` hook — so a `useXService()` hook composes per-tool invokers (see
|
|
131
|
-
* {@link useToolInvokerMap}) into a single {@link ToolInvoker} and constructs
|
|
132
|
-
* the class with it. Method bodies call `this.tool("<tool-name>", args)`.
|
|
133
|
-
*/
|
|
134
|
-
declare abstract class BaseMcpService {
|
|
135
|
-
private readonly invoker;
|
|
136
|
-
constructor(invoker: ToolInvoker);
|
|
137
|
-
protected tool<TRes>(name: string, args?: unknown): Promise<TRes>;
|
|
138
|
-
}
|
|
139
|
-
/**
|
|
140
|
-
* Thrown by a lifted service method whose monolith REST route has no MCP tool
|
|
141
|
-
* yet (typically because it needs client-side aggregation over a coarser tool).
|
|
142
|
-
*/
|
|
143
|
-
declare function notViaMcp(serviceName: string, method: string): never;
|
|
144
|
-
/** Imperative invoker for a single MCP tool (the hook's `.invoke`, stable across renders). */
|
|
145
|
-
declare function useToolInvoker<TReq, TRes>(toolName: string): (req: TReq) => Promise<TRes>;
|
|
146
|
-
/**
|
|
147
|
-
* Composes one {@link ToolInvoker} dispatching over every tool in `tools`, so a
|
|
148
|
-
* service class can call tools by name.
|
|
149
|
-
*
|
|
150
|
-
* Rules of hooks: `tools` MUST be a frozen, constant-length list (e.g. a
|
|
151
|
-
* module-level `as const` array) so the per-tool `useMcpTool` calls run in a
|
|
152
|
-
* stable order on every render. Passing a list whose length varies between
|
|
153
|
-
* renders is a violation and will break.
|
|
154
|
-
*/
|
|
155
|
-
declare function useToolInvokerMap(tools: readonly string[]): ToolInvoker;
|
|
156
|
-
|
|
157
125
|
/**
|
|
158
126
|
* A single tool's wire contract: the arguments it takes and the payload it returns.
|
|
159
127
|
*
|
|
@@ -1391,4 +1359,4 @@ interface MenuConfigHostSidebarOptions {
|
|
|
1391
1359
|
*/
|
|
1392
1360
|
declare function menuConfigToHostSidebarInput(config: HeaderMenuItem[], opts: MenuConfigHostSidebarOptions): HostSidebarHookInput;
|
|
1393
1361
|
|
|
1394
|
-
export { type AuthenticatedQueryResult,
|
|
1362
|
+
export { type AuthenticatedQueryResult, type CurrencyInfo, type CurrencySelector, DEFAULT_MAX_UPLOAD_BYTES, type DefinePlatformReactPluginOverlayOptions, type DefinePlatformReactPluginPageOptions, EHX_PLUGIN_PORTAL_ATTR, EHX_PLUGIN_PORTAL_CLASS, EHX_PLUGIN_ROOT_CLASS, HostSidebarHookInput, HostSidebarInput, type InsetLease, LIST_CURRENCIES_TOOL, type ManagedLifecycle, type McpToolArgs, type McpToolContract, type McpToolContracts, type McpToolResult, type MenuConfigHostSidebarOptions, MissingViewFallback, ORGANISATION_SETTINGS_URI, OVERLAY_HOST_CONTRACT_VERSION, type OverlayHostApi, type OverlayHostCapabilities, OverlayHostContext, type PlatformReactOverlayProps, type PluginOverlayDefinerConfig, type PluginPageDefinerConfig, PluginPortalScope, PluginStyleScope, REPORTING_CURRENCY_TOOL, type ReactRouterShimOptions, SurfaceBaseContext, type SurfaceBaseValue, TemplateContext, type TemplateManifest, type ToHostSidebarInputOptions, ToolInvoker, TypedMcpService, type UseCurrencyResult, type UseMcpUploadOptions, type UseMcpUploadResult, type UseMcpUploadTarget, type ViewComponent, buildSurfaceUrl, createPluginOverlayDefiner, createPluginPageDefiner, createReactRouterShim, createUseView, definePlatformReactPluginOverlay, definePlatformReactPluginPage, deriveHostEntityToken, injectPluginStyles, isComponent, mcpTool, menuConfigToHostSidebarInput, normaliseSlug, resolveSurfaceBase, surfacePathFor, toHostSidebarInput, useAuthenticatedQueries, useAuthenticatedQuery, useCurrency, useManagedLifecycle, useMcpUpload, useOrgFormatSync, useOverlayHost, usePluginRealtime, useSurfaceUrl, useTypedToolInvokerMap, useView };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ethisyscore/plugin-ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.94.1",
|
|
4
4
|
"description": "Plugin-UI umbrella SDK: client bridge + a11y/l10n primitives + brokered-MCP client (WI 4858).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -77,6 +77,11 @@
|
|
|
77
77
|
"types": "./dist/components/connectors/index.d.ts",
|
|
78
78
|
"import": "./dist/components/connectors/index.js",
|
|
79
79
|
"require": "./dist/components/connectors/index.cjs"
|
|
80
|
+
},
|
|
81
|
+
"./connector-mappings": {
|
|
82
|
+
"types": "./dist/connector-mappings/index.d.ts",
|
|
83
|
+
"import": "./dist/connector-mappings/index.js",
|
|
84
|
+
"require": "./dist/connector-mappings/index.cjs"
|
|
80
85
|
}
|
|
81
86
|
},
|
|
82
87
|
"files": [
|