@frontmcp/plugin-dashboard 1.7.1 → 1.8.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/app/dashboard.app.d.ts +2 -2
- package/app/dashboard.app.d.ts.map +1 -1
- package/auth/dashboard-auth.d.ts +22 -0
- package/auth/dashboard-auth.d.ts.map +1 -0
- package/dashboard.config-store.d.ts +32 -0
- package/dashboard.config-store.d.ts.map +1 -0
- package/dashboard.plugin.d.ts +2 -2
- package/dashboard.plugin.d.ts.map +1 -1
- package/dashboard.types.d.ts.map +1 -1
- package/esm/index.mjs +4508 -862
- package/esm/package.json +3 -3
- package/html/html.generator.d.ts +9 -0
- package/html/html.generator.d.ts.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +4495 -863
- package/package.json +3 -3
package/app/dashboard.app.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DynamicPlugin, ProviderType } from '@frontmcp/sdk';
|
|
2
|
-
import { DashboardPluginOptions, DashboardPluginOptionsInput } from '../dashboard.types';
|
|
1
|
+
import { DynamicPlugin, type ProviderType } from '@frontmcp/sdk';
|
|
2
|
+
import { type DashboardPluginOptions, type DashboardPluginOptionsInput } from '../dashboard.types';
|
|
3
3
|
/**
|
|
4
4
|
* Internal Dashboard HTTP Plugin.
|
|
5
5
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.app.d.ts","sourceRoot":"","sources":["../../src/app/dashboard.app.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"dashboard.app.d.ts","sourceRoot":"","sources":["../../src/app/dashboard.app.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,aAAa,EAOb,KAAK,YAAY,EAGlB,MAAM,eAAe,CAAC;AAOvB,OAAO,EAIL,KAAK,sBAAsB,EAC3B,KAAK,2BAA2B,EACjC,MAAM,oBAAoB,CAAC;AAmE5B;;;;;GAKG;AACH,cAIM,mBAAoB,SAAQ,aAAa,CAAC,sBAAsB,EAAE,2BAA2B,CAAC;IAClG,OAAO,EAAE,sBAAsB,CAAC;gBAEpB,OAAO,GAAE,2BAAgC;IAQrD;;OAEG;WACa,gBAAgB,CAAC,OAAO,EAAE,2BAA2B,GAAG,YAAY,EAAE;CA+BvF;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,qBAmCa,YAAY;CAAG;AAG5B,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { DashboardAuth } from '../dashboard.types';
|
|
2
|
+
/**
|
|
3
|
+
* Token check for the dashboard's HTTP surface (GHSA-rgxj-434m-vxh3).
|
|
4
|
+
*
|
|
5
|
+
* `auth.token` was documented and schema-validated but never read, so a
|
|
6
|
+
* dashboard an operator believed was protected served its page — and, through
|
|
7
|
+
* its MCP scope, the whole server's inventory — to anyone.
|
|
8
|
+
*
|
|
9
|
+
* Shaped after `SkillHttpAuthValidator` in the SDK, which is the in-repo pattern
|
|
10
|
+
* for gating an HTTP surface on a shared secret.
|
|
11
|
+
*/
|
|
12
|
+
export interface DashboardAuthRequest {
|
|
13
|
+
headers?: Record<string, string | string[] | undefined> | undefined;
|
|
14
|
+
query?: Record<string, string | string[] | undefined> | undefined;
|
|
15
|
+
}
|
|
16
|
+
export interface DashboardAuthResult {
|
|
17
|
+
authorized: boolean;
|
|
18
|
+
status?: 401;
|
|
19
|
+
message?: string;
|
|
20
|
+
}
|
|
21
|
+
export declare function createDashboardAuthValidator(auth: DashboardAuth | undefined): ((req: DashboardAuthRequest) => DashboardAuthResult) | undefined;
|
|
22
|
+
//# sourceMappingURL=dashboard-auth.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard-auth.d.ts","sourceRoot":"","sources":["../../src/auth/dashboard-auth.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAExD;;;;;;;;;GASG;AACH,MAAM,WAAW,oBAAoB;IACnC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,GAAG,SAAS,CAAC;IACpE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAAC,GAAG,SAAS,CAAC;CACnE;AAED,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,OAAO,CAAC;IACpB,MAAM,CAAC,EAAE,GAAG,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAyDD,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,aAAa,GAAG,SAAS,GAC9B,CAAC,CAAC,GAAG,EAAE,oBAAoB,KAAK,mBAAmB,CAAC,GAAG,SAAS,CAqBlE"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { type DashboardPluginOptions, type DashboardPluginOptionsInput } from './dashboard.types';
|
|
2
|
+
/**
|
|
3
|
+
* Record the operator's parsed options. Called by `DashboardPlugin.init`.
|
|
4
|
+
*
|
|
5
|
+
* KNOWN LIMITATION — this store is process-wide. Two `@FrontMcp` servers built
|
|
6
|
+
* in one process that each configure the dashboard differently would share the
|
|
7
|
+
* last configuration published, including its `auth.token`. `init(...)` runs
|
|
8
|
+
* while decorator metadata is evaluated, before any server or scope exists, so
|
|
9
|
+
* there is no server identity to key on at that point; giving each server its
|
|
10
|
+
* own configuration needs the app-declared plugin to receive options through the
|
|
11
|
+
* provider graph, which the `@App` decorator shape does not currently allow.
|
|
12
|
+
*
|
|
13
|
+
* A conflicting publish is therefore reported loudly rather than silently
|
|
14
|
+
* winning. Single-server processes — every documented deployment — are
|
|
15
|
+
* unaffected.
|
|
16
|
+
*/
|
|
17
|
+
export declare function publishDashboardOptions(options: DashboardPluginOptions): void;
|
|
18
|
+
/**
|
|
19
|
+
* The effective dashboard options: the operator's if they configured the plugin,
|
|
20
|
+
* otherwise the defaults merged with whatever the caller supplied.
|
|
21
|
+
*/
|
|
22
|
+
export declare function resolveDashboardOptions(fallback?: DashboardPluginOptionsInput): DashboardPluginOptions;
|
|
23
|
+
/**
|
|
24
|
+
* Clear the published options.
|
|
25
|
+
*
|
|
26
|
+
* Dashboard options are process-wide, and a second CONFLICTING auth
|
|
27
|
+
* configuration now throws rather than silently replacing the first (BC-036).
|
|
28
|
+
* A host that builds several servers serially — a test suite, a CLI that
|
|
29
|
+
* reconfigures between runs — calls this between constructions.
|
|
30
|
+
*/
|
|
31
|
+
export declare function resetDashboardOptions(): void;
|
|
32
|
+
//# sourceMappingURL=dashboard.config-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dashboard.config-store.d.ts","sourceRoot":"","sources":["../src/dashboard.config-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,sBAAsB,EAC3B,KAAK,2BAA2B,EACjC,MAAM,mBAAmB,CAAC;AAmB3B;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,sBAAsB,GAAG,IAAI,CAuB7E;AAyBD;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,GAAE,2BAAgC,GAAG,sBAAsB,CAG1G;AAED;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,IAAI,IAAI,CAE5C"}
|
package/dashboard.plugin.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DynamicPlugin, ProviderType } from '@frontmcp/sdk';
|
|
2
|
-
import { DashboardPluginOptions, DashboardPluginOptionsInput } from './dashboard.types';
|
|
1
|
+
import { DynamicPlugin, type ProviderType } from '@frontmcp/sdk';
|
|
2
|
+
import { type DashboardPluginOptions, type DashboardPluginOptionsInput } from './dashboard.types';
|
|
3
3
|
/**
|
|
4
4
|
* FrontMCP Dashboard Plugin.
|
|
5
5
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.plugin.d.ts","sourceRoot":"","sources":["../src/dashboard.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAU,YAAY,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"dashboard.plugin.d.ts","sourceRoot":"","sources":["../src/dashboard.plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAU,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAIzE,OAAO,EAGL,KAAK,sBAAsB,EAC3B,KAAK,2BAA2B,EACjC,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAMH,MAAM,CAAC,OAAO,OAAO,eAAgB,SAAQ,aAAa,CAAC,sBAAsB,EAAE,2BAA2B,CAAC;IAC7G,OAAO,EAAE,sBAAsB,CAAC;gBAEpB,OAAO,GAAE,2BAAgC;IAUrD;;;;OAIG;WACa,gBAAgB,CAAC,OAAO,EAAE,2BAA2B,GAAG,YAAY,EAAE;CAkBvF"}
|
package/dashboard.types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dashboard.types.d.ts","sourceRoot":"","sources":["../src/dashboard.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;AAEvC;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;gCAmB1B,CAAC;AAEH,sBAAsB;AACtB,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,eAAe,CAAC,CAAC;AAEzD;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;
|
|
1
|
+
{"version":3,"file":"dashboard.types.d.ts","sourceRoot":"","sources":["../src/dashboard.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,oBAAoB,CAAC;AAEvC;;GAEG;AACH,eAAO,MAAM,eAAe;;;;;;;;;;gCAmB1B,CAAC;AAEH,sBAAsB;AACtB,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,eAAe,CAAC,CAAC;AAEzD;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;gCAe5B,CAAC;AAEL,0BAA0B;AAC1B,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEjE;;GAEG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gCASvC,CAAC;AAEH,kDAAkD;AAClD,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAEnF,yDAAyD;AACzD,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAEvF,uCAAuC;AACvC,eAAO,MAAM,6BAA6B,EAAE,2BAI3C,CAAC;AAEF;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAM3E"}
|