@revealui/mcp 0.4.0 → 0.5.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/author/errors.d.ts +23 -0
- package/dist/author/errors.d.ts.map +1 -0
- package/dist/author/errors.js +32 -0
- package/dist/author/errors.js.map +1 -0
- package/dist/author/index.d.ts +53 -0
- package/dist/author/index.d.ts.map +1 -0
- package/dist/author/index.js +50 -0
- package/dist/author/index.js.map +1 -0
- package/dist/author/publish.d.ts +61 -0
- package/dist/author/publish.d.ts.map +1 -0
- package/dist/author/publish.js +28 -0
- package/dist/author/publish.js.map +1 -0
- package/dist/author/scaffold.d.ts +50 -0
- package/dist/author/scaffold.d.ts.map +1 -0
- package/dist/author/scaffold.js +28 -0
- package/dist/author/scaffold.js.map +1 -0
- package/dist/author/test.d.ts +61 -0
- package/dist/author/test.d.ts.map +1 -0
- package/dist/author/test.js +27 -0
- package/dist/author/test.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/remote-client.d.ts.map +1 -1
- package/dist/remote-client.js +14 -0
- package/dist/remote-client.js.map +1 -1
- package/dist/servers/adapter.js +1 -1
- package/dist/servers/adapter.js.map +1 -1
- package/dist/servers/factories/contracts.d.ts +0 -16
- package/dist/servers/factories/contracts.d.ts.map +1 -1
- package/dist/servers/factories/contracts.js +1 -16
- package/dist/servers/factories/contracts.js.map +1 -1
- package/dist/servers/factories/revealui-content.d.ts +24 -0
- package/dist/servers/factories/revealui-content.d.ts.map +1 -1
- package/dist/servers/factories/revealui-content.js +58 -5
- package/dist/servers/factories/revealui-content.js.map +1 -1
- package/dist/servers/revealui-email.d.ts +18 -0
- package/dist/servers/revealui-email.d.ts.map +1 -1
- package/dist/servers/revealui-email.js +37 -8
- package/dist/servers/revealui-email.js.map +1 -1
- package/dist/servers/revealui-memory.d.ts +64 -0
- package/dist/servers/revealui-memory.d.ts.map +1 -1
- package/dist/servers/revealui-memory.js +106 -15
- package/dist/servers/revealui-memory.js.map +1 -1
- package/dist/servers/revealui-stripe.d.ts.map +1 -1
- package/dist/servers/revealui-stripe.js +53 -55
- package/dist/servers/revealui-stripe.js.map +1 -1
- package/dist/validate-tool-args.d.ts +16 -0
- package/dist/validate-tool-args.d.ts.map +1 -0
- package/dist/validate-tool-args.js +17 -0
- package/dist/validate-tool-args.js.map +1 -0
- package/package.json +22 -6
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared error type for the `@revealui/mcp/author` Phase 1.6 stub surface.
|
|
3
|
+
*
|
|
4
|
+
* Every stub function in scaffold.ts / test.ts / publish.ts throws this
|
|
5
|
+
* error with a clear pointer to the tracking issue + the specific module
|
|
6
|
+
* the call landed in. Consumers who hit this error during integration
|
|
7
|
+
* work know exactly which sub-API to wire up next.
|
|
8
|
+
*
|
|
9
|
+
* Per `feedback_no_risk_too_small_to_fix`: stubs MUST throw rather than
|
|
10
|
+
* silently no-op. A silent no-op for a function the caller expected to do
|
|
11
|
+
* work (scaffold files, run a test harness, publish a server) would create
|
|
12
|
+
* a phantom success that surfaces as missing artifacts downstream.
|
|
13
|
+
*/
|
|
14
|
+
/** Tracking issue for the full author-SDK implementation surface. */
|
|
15
|
+
export declare const AUTHOR_SDK_TRACKING_ISSUE = "https://github.com/RevealUIStudio/revealui-jv/issues/47";
|
|
16
|
+
export declare class AuthorSdkNotImplementedError extends Error {
|
|
17
|
+
/** The exported function name that was called (e.g. "scaffold"). */
|
|
18
|
+
readonly fn: string;
|
|
19
|
+
/** The subpath module the function lives in (e.g. "@revealui/mcp/author/scaffold"). */
|
|
20
|
+
readonly module: string;
|
|
21
|
+
constructor(fn: string, module: string);
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/author/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,qEAAqE;AACrE,eAAO,MAAM,yBAAyB,4DAA4D,CAAC;AAEnG,qBAAa,4BAA6B,SAAQ,KAAK;IACrD,oEAAoE;IACpE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,uFAAuF;IACvF,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;gBAEZ,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;CAYvC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared error type for the `@revealui/mcp/author` Phase 1.6 stub surface.
|
|
3
|
+
*
|
|
4
|
+
* Every stub function in scaffold.ts / test.ts / publish.ts throws this
|
|
5
|
+
* error with a clear pointer to the tracking issue + the specific module
|
|
6
|
+
* the call landed in. Consumers who hit this error during integration
|
|
7
|
+
* work know exactly which sub-API to wire up next.
|
|
8
|
+
*
|
|
9
|
+
* Per `feedback_no_risk_too_small_to_fix`: stubs MUST throw rather than
|
|
10
|
+
* silently no-op. A silent no-op for a function the caller expected to do
|
|
11
|
+
* work (scaffold files, run a test harness, publish a server) would create
|
|
12
|
+
* a phantom success that surfaces as missing artifacts downstream.
|
|
13
|
+
*/
|
|
14
|
+
/** Tracking issue for the full author-SDK implementation surface. */
|
|
15
|
+
export const AUTHOR_SDK_TRACKING_ISSUE = 'https://github.com/RevealUIStudio/revealui-jv/issues/47';
|
|
16
|
+
export class AuthorSdkNotImplementedError extends Error {
|
|
17
|
+
/** The exported function name that was called (e.g. "scaffold"). */
|
|
18
|
+
fn;
|
|
19
|
+
/** The subpath module the function lives in (e.g. "@revealui/mcp/author/scaffold"). */
|
|
20
|
+
module;
|
|
21
|
+
constructor(fn, module) {
|
|
22
|
+
super(`${fn}() is not yet implemented in ${module}. The @revealui/mcp/author ` +
|
|
23
|
+
'surface is stubbed in Phase 1.6 of the marketplace-extraction lane ' +
|
|
24
|
+
'to claim the namespace per ADR 2026-05-18-marketplace-home L2 lock; ' +
|
|
25
|
+
'the concrete implementation lands after the first external venue ' +
|
|
26
|
+
`requirement surfaces (Risk R8 in the lane plan). Track via ${AUTHOR_SDK_TRACKING_ISSUE}.`);
|
|
27
|
+
this.name = 'AuthorSdkNotImplementedError';
|
|
28
|
+
this.fn = fn;
|
|
29
|
+
this.module = module;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/author/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,qEAAqE;AACrE,MAAM,CAAC,MAAM,yBAAyB,GAAG,yDAAyD,CAAC;AAEnG,MAAM,OAAO,4BAA6B,SAAQ,KAAK;IACrD,oEAAoE;IAC3D,EAAE,CAAS;IACpB,uFAAuF;IAC9E,MAAM,CAAS;IAExB,YAAY,EAAU,EAAE,MAAc;QACpC,KAAK,CACH,GAAG,EAAE,gCAAgC,MAAM,6BAA6B;YACtE,qEAAqE;YACrE,sEAAsE;YACtE,mEAAmE;YACnE,8DAA8D,yBAAyB,GAAG,CAC7F,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,8BAA8B,CAAC;QAC3C,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;CACF"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@revealui/mcp/author` — MCP server author SDK.
|
|
3
|
+
*
|
|
4
|
+
* Author tooling for building, testing, and publishing MCP servers. Sub-export
|
|
5
|
+
* of `@revealui/mcp` per ADR `2026-05-18-marketplace-home.md` L2 lock — the
|
|
6
|
+
* author SDK stays inside the protocol package because it serves any venue,
|
|
7
|
+
* not just Studio's revmarket, and bundling it with the protocol preserves
|
|
8
|
+
* the agnosticism principle.
|
|
9
|
+
*
|
|
10
|
+
* ## Status
|
|
11
|
+
*
|
|
12
|
+
* **Phase 1.6 (stubs only).** This module ships the namespace + interfaces
|
|
13
|
+
* + an explicit `AuthorSdkNotImplementedError` per function. The concrete
|
|
14
|
+
* implementation lands after the first external venue requirement surfaces
|
|
15
|
+
* (per `docs/lanes/marketplace-extraction/plan.md` Risk R8 — "Phase 1.6
|
|
16
|
+
* author SDK design constrains future venue plugins; ship stubs only,
|
|
17
|
+
* flesh out API in a follow-up ADR after first external venue interest").
|
|
18
|
+
*
|
|
19
|
+
* ## Subpath imports (preferred)
|
|
20
|
+
*
|
|
21
|
+
* Per memory `reference_mcp_barrel_subpath_imports`, prefer the deep
|
|
22
|
+
* subpaths over this barrel — the top-level `@revealui/mcp` barrel has
|
|
23
|
+
* launcher side effects; the `/author` barrel does NOT (this file pulls
|
|
24
|
+
* in pure types + stub functions, no `fs`/`net`/`process` work), but
|
|
25
|
+
* deep-imports are still tighter for tree-shaking:
|
|
26
|
+
*
|
|
27
|
+
* ```ts
|
|
28
|
+
* import { scaffold } from '@revealui/mcp/author/scaffold';
|
|
29
|
+
* import { runTestHarness } from '@revealui/mcp/author/test';
|
|
30
|
+
* import { publish } from '@revealui/mcp/author/publish';
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* Barrel form (this file) is provided for ergonomic single-import:
|
|
34
|
+
*
|
|
35
|
+
* ```ts
|
|
36
|
+
* import { scaffold, runTestHarness, publish } from '@revealui/mcp/author';
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* ## License
|
|
40
|
+
*
|
|
41
|
+
* Same as the parent package (`FSL-1.1-MIT`, converts to MIT after 2 years).
|
|
42
|
+
* The author SDK serves third-party MCP authors targeting any venue and
|
|
43
|
+
* intentionally carries the protocol package's license rather than being
|
|
44
|
+
* gated separately.
|
|
45
|
+
*/
|
|
46
|
+
export { AUTHOR_SDK_TRACKING_ISSUE, AuthorSdkNotImplementedError, } from './errors.js';
|
|
47
|
+
export type { PublishOptions, PublishResult, PublishVenue } from './publish.js';
|
|
48
|
+
export { publish } from './publish.js';
|
|
49
|
+
export type { ScaffoldOptions, ScaffoldResult, ScaffoldTemplate } from './scaffold.js';
|
|
50
|
+
export { scaffold } from './scaffold.js';
|
|
51
|
+
export type { TestHarnessOptions, TestHarnessResult, ToolCallSpec } from './test.js';
|
|
52
|
+
export { runTestHarness } from './test.js';
|
|
53
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/author/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,OAAO,EACL,yBAAyB,EACzB,4BAA4B,GAC7B,MAAM,aAAa,CAAC;AACrB,YAAY,EAAE,cAAc,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAChF,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACvF,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACrF,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@revealui/mcp/author` — MCP server author SDK.
|
|
3
|
+
*
|
|
4
|
+
* Author tooling for building, testing, and publishing MCP servers. Sub-export
|
|
5
|
+
* of `@revealui/mcp` per ADR `2026-05-18-marketplace-home.md` L2 lock — the
|
|
6
|
+
* author SDK stays inside the protocol package because it serves any venue,
|
|
7
|
+
* not just Studio's revmarket, and bundling it with the protocol preserves
|
|
8
|
+
* the agnosticism principle.
|
|
9
|
+
*
|
|
10
|
+
* ## Status
|
|
11
|
+
*
|
|
12
|
+
* **Phase 1.6 (stubs only).** This module ships the namespace + interfaces
|
|
13
|
+
* + an explicit `AuthorSdkNotImplementedError` per function. The concrete
|
|
14
|
+
* implementation lands after the first external venue requirement surfaces
|
|
15
|
+
* (per `docs/lanes/marketplace-extraction/plan.md` Risk R8 — "Phase 1.6
|
|
16
|
+
* author SDK design constrains future venue plugins; ship stubs only,
|
|
17
|
+
* flesh out API in a follow-up ADR after first external venue interest").
|
|
18
|
+
*
|
|
19
|
+
* ## Subpath imports (preferred)
|
|
20
|
+
*
|
|
21
|
+
* Per memory `reference_mcp_barrel_subpath_imports`, prefer the deep
|
|
22
|
+
* subpaths over this barrel — the top-level `@revealui/mcp` barrel has
|
|
23
|
+
* launcher side effects; the `/author` barrel does NOT (this file pulls
|
|
24
|
+
* in pure types + stub functions, no `fs`/`net`/`process` work), but
|
|
25
|
+
* deep-imports are still tighter for tree-shaking:
|
|
26
|
+
*
|
|
27
|
+
* ```ts
|
|
28
|
+
* import { scaffold } from '@revealui/mcp/author/scaffold';
|
|
29
|
+
* import { runTestHarness } from '@revealui/mcp/author/test';
|
|
30
|
+
* import { publish } from '@revealui/mcp/author/publish';
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* Barrel form (this file) is provided for ergonomic single-import:
|
|
34
|
+
*
|
|
35
|
+
* ```ts
|
|
36
|
+
* import { scaffold, runTestHarness, publish } from '@revealui/mcp/author';
|
|
37
|
+
* ```
|
|
38
|
+
*
|
|
39
|
+
* ## License
|
|
40
|
+
*
|
|
41
|
+
* Same as the parent package (`FSL-1.1-MIT`, converts to MIT after 2 years).
|
|
42
|
+
* The author SDK serves third-party MCP authors targeting any venue and
|
|
43
|
+
* intentionally carries the protocol package's license rather than being
|
|
44
|
+
* gated separately.
|
|
45
|
+
*/
|
|
46
|
+
export { AUTHOR_SDK_TRACKING_ISSUE, AuthorSdkNotImplementedError, } from './errors.js';
|
|
47
|
+
export { publish } from './publish.js';
|
|
48
|
+
export { scaffold } from './scaffold.js';
|
|
49
|
+
export { runTestHarness } from './test.js';
|
|
50
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/author/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,OAAO,EACL,yBAAyB,EACzB,4BAA4B,GAC7B,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@revealui/mcp/author/publish` — publish an MCP server to a venue.
|
|
3
|
+
*
|
|
4
|
+
* Phase 1.6 stub. The final shape:
|
|
5
|
+
*
|
|
6
|
+
* 1. Caller supplies a built package directory (with `package.json` + `dist/`)
|
|
7
|
+
* and a venue tag.
|
|
8
|
+
* 2. Publish validates the package against the venue's manifest rules
|
|
9
|
+
* (e.g. revmarket requires a `mcp.json` with declared tool list + auth scopes;
|
|
10
|
+
* npm requires only npm's own publish rules).
|
|
11
|
+
* 3. On a `dryRun: true` call, no upload happens — the call returns the manifest
|
|
12
|
+
* that WOULD be sent. On a real call, the package is published and the venue
|
|
13
|
+
* returns a URL + ID.
|
|
14
|
+
*
|
|
15
|
+
* Venue support is intentionally pluggable. Adding a venue means: extend
|
|
16
|
+
* `PublishVenue`, add a manifest validator, add an upload adapter. Each venue
|
|
17
|
+
* gets its own boundary; revmarket-specific KYC / payout-account-linking flows
|
|
18
|
+
* stay venue-side, not in this generic publisher.
|
|
19
|
+
*/
|
|
20
|
+
/**
|
|
21
|
+
* Discriminant for the publish target. Add new venues here as adapters land.
|
|
22
|
+
* - `revmarket` — Studio's MCP marketplace (per ADR `2026-05-18-marketplace-home`).
|
|
23
|
+
* - `npm` — public npm registry (server is consumed as a library, not via venue).
|
|
24
|
+
*/
|
|
25
|
+
export type PublishVenue = 'revmarket' | 'npm';
|
|
26
|
+
export interface PublishOptions {
|
|
27
|
+
/** Absolute path to the built package directory (must contain `package.json`). */
|
|
28
|
+
packageDir: string;
|
|
29
|
+
/** Which venue to publish to. See `PublishVenue` discriminant. */
|
|
30
|
+
venue: PublishVenue;
|
|
31
|
+
/**
|
|
32
|
+
* When `true`, validate + manifest-build only; do not upload. Returns a
|
|
33
|
+
* `PublishResult` with `dryRun: true` and a synthetic `url` / `venueId`
|
|
34
|
+
* marker so consumers can inspect what the live call would do.
|
|
35
|
+
*/
|
|
36
|
+
dryRun?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Optional version override. When omitted, the version in the package's
|
|
39
|
+
* `package.json` is used. Pre-release suffixes (e.g. `0.1.0-rc.1`) are
|
|
40
|
+
* honored verbatim.
|
|
41
|
+
*/
|
|
42
|
+
version?: string;
|
|
43
|
+
}
|
|
44
|
+
export interface PublishResult {
|
|
45
|
+
/** ISO timestamp the publish landed (or would land, for a dry run). */
|
|
46
|
+
publishedAt: Date;
|
|
47
|
+
/** Venue-assigned identifier for the published artifact. */
|
|
48
|
+
venueId: string;
|
|
49
|
+
/** Canonical URL the artifact is reachable at. */
|
|
50
|
+
url: string;
|
|
51
|
+
/** Mirrors the caller's `dryRun` flag. */
|
|
52
|
+
dryRun: boolean;
|
|
53
|
+
/** The venue the artifact was published to (mirrors `PublishOptions.venue`). */
|
|
54
|
+
venue: PublishVenue;
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Phase 1.6 stub — throws `AuthorSdkNotImplementedError`. See module JSDoc
|
|
58
|
+
* for the concrete-implementation contract.
|
|
59
|
+
*/
|
|
60
|
+
export declare function publish(_opts: PublishOptions): Promise<PublishResult>;
|
|
61
|
+
//# sourceMappingURL=publish.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publish.d.ts","sourceRoot":"","sources":["../../src/author/publish.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH;;;;GAIG;AACH,MAAM,MAAM,YAAY,GAAG,WAAW,GAAG,KAAK,CAAC;AAE/C,MAAM,WAAW,cAAc;IAC7B,kFAAkF;IAClF,UAAU,EAAE,MAAM,CAAC;IAEnB,kEAAkE;IAClE,KAAK,EAAE,YAAY,CAAC;IAEpB;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,aAAa;IAC5B,uEAAuE;IACvE,WAAW,EAAE,IAAI,CAAC;IAElB,4DAA4D;IAC5D,OAAO,EAAE,MAAM,CAAC;IAEhB,kDAAkD;IAClD,GAAG,EAAE,MAAM,CAAC;IAEZ,0CAA0C;IAC1C,MAAM,EAAE,OAAO,CAAC;IAEhB,gFAAgF;IAChF,KAAK,EAAE,YAAY,CAAC;CACrB;AAED;;;GAGG;AACH,wBAAsB,OAAO,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,aAAa,CAAC,CAE3E"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@revealui/mcp/author/publish` — publish an MCP server to a venue.
|
|
3
|
+
*
|
|
4
|
+
* Phase 1.6 stub. The final shape:
|
|
5
|
+
*
|
|
6
|
+
* 1. Caller supplies a built package directory (with `package.json` + `dist/`)
|
|
7
|
+
* and a venue tag.
|
|
8
|
+
* 2. Publish validates the package against the venue's manifest rules
|
|
9
|
+
* (e.g. revmarket requires a `mcp.json` with declared tool list + auth scopes;
|
|
10
|
+
* npm requires only npm's own publish rules).
|
|
11
|
+
* 3. On a `dryRun: true` call, no upload happens — the call returns the manifest
|
|
12
|
+
* that WOULD be sent. On a real call, the package is published and the venue
|
|
13
|
+
* returns a URL + ID.
|
|
14
|
+
*
|
|
15
|
+
* Venue support is intentionally pluggable. Adding a venue means: extend
|
|
16
|
+
* `PublishVenue`, add a manifest validator, add an upload adapter. Each venue
|
|
17
|
+
* gets its own boundary; revmarket-specific KYC / payout-account-linking flows
|
|
18
|
+
* stay venue-side, not in this generic publisher.
|
|
19
|
+
*/
|
|
20
|
+
import { AuthorSdkNotImplementedError } from './errors.js';
|
|
21
|
+
/**
|
|
22
|
+
* Phase 1.6 stub — throws `AuthorSdkNotImplementedError`. See module JSDoc
|
|
23
|
+
* for the concrete-implementation contract.
|
|
24
|
+
*/
|
|
25
|
+
export async function publish(_opts) {
|
|
26
|
+
throw new AuthorSdkNotImplementedError('publish', '@revealui/mcp/author/publish');
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=publish.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"publish.js","sourceRoot":"","sources":["../../src/author/publish.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAC;AAgD3D;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,KAAqB;IACjD,MAAM,IAAI,4BAA4B,CAAC,SAAS,EAAE,8BAA8B,CAAC,CAAC;AACpF,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@revealui/mcp/author/scaffold` — generate an MCP-server project skeleton.
|
|
3
|
+
*
|
|
4
|
+
* Phase 1.6 stub. The final shape:
|
|
5
|
+
*
|
|
6
|
+
* 1. Caller supplies a target directory, a server name, and a template.
|
|
7
|
+
* 2. Scaffold writes a `package.json` + `src/index.ts` + `README.md` + a
|
|
8
|
+
* `tsconfig.json`, all pre-wired to consume `@modelcontextprotocol/sdk`
|
|
9
|
+
* and `@revealui/mcp/contracts` for tool-arg validation.
|
|
10
|
+
* 3. The generated server is runnable via `pnpm tsx src/index.ts` and
|
|
11
|
+
* speaks stdio-MCP out of the box.
|
|
12
|
+
*
|
|
13
|
+
* Templates intentionally start small. `minimal` = the smallest runnable
|
|
14
|
+
* server. `with-auth` = adds JWT-claim plumbing from `@revealui/mcp/auth`.
|
|
15
|
+
* `with-tools` = sample tools registered via `@revealui/mcp/contracts`.
|
|
16
|
+
*
|
|
17
|
+
* Templates do NOT include venue-specific publish manifests — those are the
|
|
18
|
+
* scope of `@revealui/mcp/author/publish`, which is the per-venue boundary.
|
|
19
|
+
*/
|
|
20
|
+
export type ScaffoldTemplate = 'minimal' | 'with-auth' | 'with-tools';
|
|
21
|
+
export interface ScaffoldOptions {
|
|
22
|
+
/** Server name (becomes `package.json#name` + the MCP server's announced name). */
|
|
23
|
+
name: string;
|
|
24
|
+
/** Absolute path to the directory the project should be scaffolded into. */
|
|
25
|
+
targetDir: string;
|
|
26
|
+
/**
|
|
27
|
+
* Which template to materialize. Defaults to `'minimal'`.
|
|
28
|
+
* - `minimal` — bare-bones runnable server, no tools registered.
|
|
29
|
+
* - `with-auth` — adds JWT-claim middleware wiring per `@revealui/mcp/auth`.
|
|
30
|
+
* - `with-tools` — registers two sample tools (`echo`, `add`) with Zod schemas.
|
|
31
|
+
*/
|
|
32
|
+
template?: ScaffoldTemplate;
|
|
33
|
+
/**
|
|
34
|
+
* If `true`, overwrite existing files in `targetDir`. Defaults to `false`
|
|
35
|
+
* (the call throws if any target path already exists).
|
|
36
|
+
*/
|
|
37
|
+
overwrite?: boolean;
|
|
38
|
+
}
|
|
39
|
+
export interface ScaffoldResult {
|
|
40
|
+
/** Absolute paths of every file the scaffold wrote, in deterministic order. */
|
|
41
|
+
createdPaths: string[];
|
|
42
|
+
/** The template that was materialized. */
|
|
43
|
+
template: ScaffoldTemplate;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Phase 1.6 stub — throws `AuthorSdkNotImplementedError`. See module JSDoc
|
|
47
|
+
* for the concrete-implementation contract.
|
|
48
|
+
*/
|
|
49
|
+
export declare function scaffold(_opts: ScaffoldOptions): Promise<ScaffoldResult>;
|
|
50
|
+
//# sourceMappingURL=scaffold.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scaffold.d.ts","sourceRoot":"","sources":["../../src/author/scaffold.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAIH,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,WAAW,GAAG,YAAY,CAAC;AAEtE,MAAM,WAAW,eAAe;IAC9B,mFAAmF;IACnF,IAAI,EAAE,MAAM,CAAC;IAEb,4EAA4E;IAC5E,SAAS,EAAE,MAAM,CAAC;IAElB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE,gBAAgB,CAAC;IAE5B;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,+EAA+E;IAC/E,YAAY,EAAE,MAAM,EAAE,CAAC;IAEvB,0CAA0C;IAC1C,QAAQ,EAAE,gBAAgB,CAAC;CAC5B;AAED;;;GAGG;AACH,wBAAsB,QAAQ,CAAC,KAAK,EAAE,eAAe,GAAG,OAAO,CAAC,cAAc,CAAC,CAE9E"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@revealui/mcp/author/scaffold` — generate an MCP-server project skeleton.
|
|
3
|
+
*
|
|
4
|
+
* Phase 1.6 stub. The final shape:
|
|
5
|
+
*
|
|
6
|
+
* 1. Caller supplies a target directory, a server name, and a template.
|
|
7
|
+
* 2. Scaffold writes a `package.json` + `src/index.ts` + `README.md` + a
|
|
8
|
+
* `tsconfig.json`, all pre-wired to consume `@modelcontextprotocol/sdk`
|
|
9
|
+
* and `@revealui/mcp/contracts` for tool-arg validation.
|
|
10
|
+
* 3. The generated server is runnable via `pnpm tsx src/index.ts` and
|
|
11
|
+
* speaks stdio-MCP out of the box.
|
|
12
|
+
*
|
|
13
|
+
* Templates intentionally start small. `minimal` = the smallest runnable
|
|
14
|
+
* server. `with-auth` = adds JWT-claim plumbing from `@revealui/mcp/auth`.
|
|
15
|
+
* `with-tools` = sample tools registered via `@revealui/mcp/contracts`.
|
|
16
|
+
*
|
|
17
|
+
* Templates do NOT include venue-specific publish manifests — those are the
|
|
18
|
+
* scope of `@revealui/mcp/author/publish`, which is the per-venue boundary.
|
|
19
|
+
*/
|
|
20
|
+
import { AuthorSdkNotImplementedError } from './errors.js';
|
|
21
|
+
/**
|
|
22
|
+
* Phase 1.6 stub — throws `AuthorSdkNotImplementedError`. See module JSDoc
|
|
23
|
+
* for the concrete-implementation contract.
|
|
24
|
+
*/
|
|
25
|
+
export async function scaffold(_opts) {
|
|
26
|
+
throw new AuthorSdkNotImplementedError('scaffold', '@revealui/mcp/author/scaffold');
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=scaffold.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scaffold.js","sourceRoot":"","sources":["../../src/author/scaffold.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAC;AAkC3D;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAAC,KAAsB;IACnD,MAAM,IAAI,4BAA4B,CAAC,UAAU,EAAE,+BAA+B,CAAC,CAAC;AACtF,CAAC"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@revealui/mcp/author/test` — testing harness for in-development MCP servers.
|
|
3
|
+
*
|
|
4
|
+
* Phase 1.6 stub. The final shape:
|
|
5
|
+
*
|
|
6
|
+
* 1. Caller points at an MCP-server entry file (typically `dist/index.js`
|
|
7
|
+
* from a `scaffold`-generated project).
|
|
8
|
+
* 2. The harness spawns the server over stdio, runs the supplied tool calls,
|
|
9
|
+
* and returns per-call pass/fail with the underlying MCP error payload
|
|
10
|
+
* when a call fails.
|
|
11
|
+
* 3. Authoring loop: `pnpm build && pnpm exec mcp-author test` → fast feedback
|
|
12
|
+
* without standing up a real Claude / Cursor client.
|
|
13
|
+
*
|
|
14
|
+
* The harness deliberately stays MCP-protocol-shaped (no Studio-specific
|
|
15
|
+
* assumptions, no revmarket-specific manifest validation) so that authors
|
|
16
|
+
* targeting any venue can use it. Venue-specific compliance checks live in
|
|
17
|
+
* the publish step, not here.
|
|
18
|
+
*/
|
|
19
|
+
export interface ToolCallSpec {
|
|
20
|
+
/** Tool name registered by the server under test. */
|
|
21
|
+
name: string;
|
|
22
|
+
/** Arguments to send. Validated by the server's Zod schema on receipt. */
|
|
23
|
+
args: unknown;
|
|
24
|
+
/**
|
|
25
|
+
* Optional assertion on the call's return value. The harness invokes this
|
|
26
|
+
* after the server responds; throwing inside `expect` records the test as
|
|
27
|
+
* failed. If omitted, the call counts as passing whenever the server
|
|
28
|
+
* doesn't return an error.
|
|
29
|
+
*/
|
|
30
|
+
expect?: (result: unknown) => void | Promise<void>;
|
|
31
|
+
}
|
|
32
|
+
export interface TestHarnessOptions {
|
|
33
|
+
/** Absolute path to the server entry file (usually `dist/index.js`). */
|
|
34
|
+
serverPath: string;
|
|
35
|
+
/** Tool calls to run, in order, against a single long-lived server process. */
|
|
36
|
+
toolCalls: ToolCallSpec[];
|
|
37
|
+
/**
|
|
38
|
+
* Per-call timeout in milliseconds. Defaults to 5000. A call that exceeds
|
|
39
|
+
* this fails with `{ ok: false, error: 'timeout' }` and the harness moves on.
|
|
40
|
+
*/
|
|
41
|
+
timeoutMs?: number;
|
|
42
|
+
}
|
|
43
|
+
export interface ToolCallResult {
|
|
44
|
+
tool: string;
|
|
45
|
+
ok: boolean;
|
|
46
|
+
/** Populated when `ok` is `false`; either the MCP error payload or a harness reason. */
|
|
47
|
+
error?: string;
|
|
48
|
+
/** Populated when `ok` is `true`; the raw return value the server produced. */
|
|
49
|
+
result?: unknown;
|
|
50
|
+
}
|
|
51
|
+
export interface TestHarnessResult {
|
|
52
|
+
passed: number;
|
|
53
|
+
failed: number;
|
|
54
|
+
results: ToolCallResult[];
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Phase 1.6 stub — throws `AuthorSdkNotImplementedError`. See module JSDoc
|
|
58
|
+
* for the concrete-implementation contract.
|
|
59
|
+
*/
|
|
60
|
+
export declare function runTestHarness(_opts: TestHarnessOptions): Promise<TestHarnessResult>;
|
|
61
|
+
//# sourceMappingURL=test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test.d.ts","sourceRoot":"","sources":["../../src/author/test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAIH,MAAM,WAAW,YAAY;IAC3B,qDAAqD;IACrD,IAAI,EAAE,MAAM,CAAC;IAEb,0EAA0E;IAC1E,IAAI,EAAE,OAAO,CAAC;IAEd;;;;;OAKG;IACH,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACpD;AAED,MAAM,WAAW,kBAAkB;IACjC,wEAAwE;IACxE,UAAU,EAAE,MAAM,CAAC;IAEnB,+EAA+E;IAC/E,SAAS,EAAE,YAAY,EAAE,CAAC;IAE1B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,OAAO,CAAC;IACZ,wFAAwF;IACxF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,+EAA+E;IAC/E,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,cAAc,EAAE,CAAC;CAC3B;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAAC,KAAK,EAAE,kBAAkB,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAE1F"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `@revealui/mcp/author/test` — testing harness for in-development MCP servers.
|
|
3
|
+
*
|
|
4
|
+
* Phase 1.6 stub. The final shape:
|
|
5
|
+
*
|
|
6
|
+
* 1. Caller points at an MCP-server entry file (typically `dist/index.js`
|
|
7
|
+
* from a `scaffold`-generated project).
|
|
8
|
+
* 2. The harness spawns the server over stdio, runs the supplied tool calls,
|
|
9
|
+
* and returns per-call pass/fail with the underlying MCP error payload
|
|
10
|
+
* when a call fails.
|
|
11
|
+
* 3. Authoring loop: `pnpm build && pnpm exec mcp-author test` → fast feedback
|
|
12
|
+
* without standing up a real Claude / Cursor client.
|
|
13
|
+
*
|
|
14
|
+
* The harness deliberately stays MCP-protocol-shaped (no Studio-specific
|
|
15
|
+
* assumptions, no revmarket-specific manifest validation) so that authors
|
|
16
|
+
* targeting any venue can use it. Venue-specific compliance checks live in
|
|
17
|
+
* the publish step, not here.
|
|
18
|
+
*/
|
|
19
|
+
import { AuthorSdkNotImplementedError } from './errors.js';
|
|
20
|
+
/**
|
|
21
|
+
* Phase 1.6 stub — throws `AuthorSdkNotImplementedError`. See module JSDoc
|
|
22
|
+
* for the concrete-implementation contract.
|
|
23
|
+
*/
|
|
24
|
+
export async function runTestHarness(_opts) {
|
|
25
|
+
throw new AuthorSdkNotImplementedError('runTestHarness', '@revealui/mcp/author/test');
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test.js","sourceRoot":"","sources":["../../src/author/test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAC;AA+C3D;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,KAAyB;IAC5D,MAAM,IAAI,4BAA4B,CAAC,gBAAgB,EAAE,2BAA2B,CAAC,CAAC;AACxF,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export { executePipeline, type PipelineResult, type PipelineStep, type PipelineS
|
|
|
27
27
|
export { InMemoryRateLimitStore, PGliteRateLimitStore, type RateLimitStore, type WindowEntry, } from './rate-limit-store.js';
|
|
28
28
|
export { DEFAULT_TIER_LIMITS, McpRateLimiter, type McpRateLimiterOptions, type RateLimitConfig, type RateLimitResult, } from './rate-limiter.js';
|
|
29
29
|
export { createMCPAdapter, disposeAllAdapters, generateIdempotencyKey, generateUniqueIdempotencyKey, type IdempotencyStore, MCPAdapter, type MCPConfig, NeonAdapter, StripeAdapter, VercelAdapter, } from './servers/adapter.js';
|
|
30
|
-
export { type ContractCategoryName, type ContractCategorySchemas, type CreateContractsServerOptions, createContractsServer, getContractsCatalog, REGISTERED_CATEGORIES,
|
|
30
|
+
export { type ContractCategoryName, type ContractCategorySchemas, type CreateContractsServerOptions, createContractsServer, getContractsCatalog, REGISTERED_CATEGORIES, validatePayload, } from './servers/factories/contracts.js';
|
|
31
31
|
export { createRevealuiContentServer, setCredentials as setRevealuiContentCredentials, } from './servers/factories/revealui-content.js';
|
|
32
32
|
export { launchNeonMcp } from './servers/neon.js';
|
|
33
33
|
export { launchNextDevtoolsMcp } from './servers/next-devtools.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAGH,OAAO,EACL,aAAa,EACb,eAAe,EACf,iBAAiB,EACjB,KAAK,WAAW,EAChB,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAC7B,KAAK,WAAW,GACjB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,iBAAiB,EACjB,KAAK,aAAa,EAClB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,KAAK,cAAc,EACnB,KAAK,kBAAkB,EAC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3B,cAAc,IAAI,6BAA6B,GAChD,MAAM,yCAAyC,CAAC;AAEjD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAEtD,OAAO,EACL,+BAA+B,EAC/B,KAAK,qBAAqB,EAC1B,KAAK,4BAA4B,GAClC,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EACL,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,YAAY,GACb,MAAM,gBAAgB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -38,7 +38,7 @@ export { DEFAULT_TIER_LIMITS, McpRateLimiter, } from './rate-limiter.js';
|
|
|
38
38
|
// Adapter framework
|
|
39
39
|
export { createMCPAdapter, disposeAllAdapters, generateIdempotencyKey, generateUniqueIdempotencyKey, MCPAdapter, NeonAdapter, StripeAdapter, VercelAdapter, } from './servers/adapter.js';
|
|
40
40
|
// Contracts introspection server (F8 Phase 1 — protocol-pyramid ADR L2-MCP)
|
|
41
|
-
export { createContractsServer, getContractsCatalog, REGISTERED_CATEGORIES,
|
|
41
|
+
export { createContractsServer, getContractsCatalog, REGISTERED_CATEGORIES, validatePayload, } from './servers/factories/contracts.js';
|
|
42
42
|
// First-party server factories (Stage 1 PR-1.2 — dual-mode template)
|
|
43
43
|
export { createRevealuiContentServer, setCredentials as setRevealuiContentCredentials, } from './servers/factories/revealui-content.js';
|
|
44
44
|
// Server launchers
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"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MAAM,sBAAsB,CAAC;AAC9B,4EAA4E;AAC5E,OAAO,EAIL,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,eAAe,GAChB,MAAM,kCAAkC,CAAC;AAC1C,qEAAqE;AACrE,OAAO,EACL,2BAA2B,EAC3B,cAAc,IAAI,6BAA6B,GAChD,MAAM,yCAAyC,CAAC;AACjD,mBAAmB;AACnB,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,sDAAsD;AACtD,OAAO,EACL,+BAA+B,GAGhC,MAAM,sBAAsB,CAAC;AAC9B,8CAA8C;AAC9C,OAAO,EAIL,YAAY,GACb,MAAM,gBAAgB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-client.d.ts","sourceRoot":"","sources":["../src/remote-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;
|
|
1
|
+
{"version":3,"file":"remote-client.d.ts","sourceRoot":"","sources":["../src/remote-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAGH,OAAO,EAAE,KAAK,kBAAkB,EAAE,SAAS,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AACvF,OAAO,EAKL,KAAK,KAAK,EACX,MAAM,YAAY,CAAC;AAYpB;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,uBAAuB,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAc/F;AAMD,qDAAqD;AACrD,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,qBAAa,6BAA8B,SAAQ,KAAK;aAEpC,MAAM,EAAE,MAAM;aACd,MAAM,EAAE,MAAM;gBADd,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM;CAQjC;AAeD,MAAM,WAAW,2BAA2B;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,iEAAiE;IACjE,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,gDAAgD;IAChD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mDAAmD;IACnD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC;;;;;;;OAOG;IACH,eAAe,CAAC,EAAE,eAAe,CAAC;CACnC;AAED,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE,SAAS,CAAC;IAClB,IAAI,EAAE,gBAAgB,CAAC;CACxB;AAUD;;;;GAIG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,2BAA2B,GACnC,OAAO,CAAC,oBAAoB,CAAC,CAuC/B"}
|
package/dist/remote-client.js
CHANGED
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
* app can use the same path enumeration + client-construction logic without
|
|
20
20
|
* duplicating admin code.
|
|
21
21
|
*/
|
|
22
|
+
import { assertPublicUrl, createSafeFetch } from '@revealui/security/server';
|
|
22
23
|
import { McpClient } from './client.js';
|
|
23
24
|
import { createRevvaultVault, McpOAuthProvider, RevvaultError, } from './oauth.js';
|
|
24
25
|
/**
|
|
@@ -83,6 +84,13 @@ const SENTINEL_CLIENT_METADATA = {
|
|
|
83
84
|
response_types: ['code'],
|
|
84
85
|
token_endpoint_auth_method: 'none',
|
|
85
86
|
};
|
|
87
|
+
/**
|
|
88
|
+
* Shared SSRF-safe fetch for remote MCP server connections. Validates the
|
|
89
|
+
* target resolves to a public IP and pins the connection to it (rebind-safe);
|
|
90
|
+
* refuses redirects. Module-level so connections pool across calls; its guard
|
|
91
|
+
* is hostname-agnostic, so one instance safely serves every server.
|
|
92
|
+
*/
|
|
93
|
+
const safeFetch = createSafeFetch();
|
|
86
94
|
/**
|
|
87
95
|
* Load OAuth credentials + server URL and return a configured `McpClient`.
|
|
88
96
|
* Throws {@link RemoteServerNotConnectedError} if no meta record exists for
|
|
@@ -96,6 +104,11 @@ export async function buildRemoteMcpClient(options) {
|
|
|
96
104
|
if (!rawMeta)
|
|
97
105
|
throw new RemoteServerNotConnectedError(tenant, server);
|
|
98
106
|
const meta = parseMeta(rawMeta);
|
|
107
|
+
// SSRF guard: the server URL is operator/tenant-supplied. Reject any URL that
|
|
108
|
+
// resolves to a private/reserved IP before constructing a transport that will
|
|
109
|
+
// connect to it. The pinned `safeFetch` below additionally re-validates at
|
|
110
|
+
// dial time (DNS-rebind protection) and refuses redirects.
|
|
111
|
+
await assertPublicUrl(meta.serverUrl);
|
|
99
112
|
const provider = new McpOAuthProvider({
|
|
100
113
|
tenant,
|
|
101
114
|
server,
|
|
@@ -112,6 +125,7 @@ export async function buildRemoteMcpClient(options) {
|
|
|
112
125
|
kind: 'streamable-http',
|
|
113
126
|
url: meta.serverUrl,
|
|
114
127
|
authProvider: provider,
|
|
128
|
+
fetch: safeFetch,
|
|
115
129
|
},
|
|
116
130
|
...(options.elicitationHandler ? { elicitationHandler: options.elicitationHandler } : {}),
|
|
117
131
|
...(options.samplingHandler ? { samplingHandler: options.samplingHandler } : {}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-client.js","sourceRoot":"","sources":["../src/remote-client.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAA2B,SAAS,EAAwB,MAAM,aAAa,CAAC;AACvF,OAAO,EACL,mB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AAK;QACL,WAAW,EAAE,yBAAyB;QACtC,cAAc,EAAE,wBAAwB;KACzC,CAAC,CAAC;IAEH,MAAM,MAAM,GAAG,IAAI,SAAS,CAAC;QAC3B,UAAU,EAAE;YACV,IAAI,EAAE,OAAO,CAAC,UAAU,IAAI,UAAU;YACtC,OAAO,EAAE,OAAO,CAAC,aAAa,IAAI,OAAO;SAC1C;QACD,SAAS,EAAE;YACT,IAAI,EAAE,iBAAiB;YACvB,GAAG,EAAE,IAAI,CAAC,SAAS;YACnB,YAAY,EAAE,QAAQ;YACtB,KAAK,EAAE,SAAS;SACjB;QACD,GAAG,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACzF,GAAG,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,OAAO,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KACjF,CAAC,CAAC;IAEH,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;AAC1B,CAAC;AAED,SAAS,SAAS,CAAC,GAAW;IAC5B,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAA8B,CAAC;IAC5D,IACE,OAAO,MAAM,CAAC,SAAS,KAAK,QAAQ;QACpC,OAAO,MAAM,CAAC,WAAW,KAAK,QAAQ;QACtC,OAAO,MAAM,CAAC,WAAW,KAAK,QAAQ,EACtC,CAAC;QACD,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;IAC9E,CAAC;IACD,OAAO,MAA0B,CAAC;AACpC,CAAC"}
|
package/dist/servers/adapter.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
import { randomBytes } from 'node:crypto';
|
|
13
13
|
import { registerCleanupHandler } from '@revealui/core/monitoring';
|
|
14
14
|
import { logger as coreLogger } from '@revealui/core/observability/logger';
|
|
15
|
-
import { assertPublicUrl } from '@revealui/security';
|
|
15
|
+
import { assertPublicUrl } from '@revealui/security/server';
|
|
16
16
|
export var McpErrorCode;
|
|
17
17
|
(function (McpErrorCode) {
|
|
18
18
|
McpErrorCode["VALIDATION_ERROR"] = "VALIDATION_ERROR";
|