@ggui-ai/mcp-server 0.1.0-rc.3 → 0.2.0-alpha.3
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/build-mcp.d.ts +8 -8
- package/dist/build-mcp.d.ts.map +1 -1
- package/dist/build-mcp.js +53 -12
- package/dist/console-auth.d.ts +7 -7
- package/dist/console-auth.d.ts.map +1 -1
- package/dist/console-auth.js +4 -4
- package/dist/console-cache.d.ts +2 -2
- package/dist/console-cache.d.ts.map +1 -1
- package/dist/console-cache.js +10 -10
- package/dist/console-headers.d.ts +2 -2
- package/dist/console-headers.js +2 -2
- package/dist/console-payloads.d.ts +3 -3
- package/dist/console-payloads.d.ts.map +1 -1
- package/dist/console-payloads.js +10 -10
- package/dist/console-timeline.d.ts +12 -30
- package/dist/console-timeline.d.ts.map +1 -1
- package/dist/console-timeline.js +44 -45
- package/dist/index.d.ts +7 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -5
- package/dist/instructions-presets.d.ts +1 -1
- package/dist/instructions-presets.d.ts.map +1 -1
- package/dist/instructions-presets.js +40 -22
- package/dist/llm-backed-negotiator.d.ts +6 -6
- package/dist/llm-backed-negotiator.d.ts.map +1 -1
- package/dist/llm-backed-negotiator.js +92 -91
- package/dist/mcp-apps-inbound.d.ts +3 -3
- package/dist/mcp-apps-inbound.d.ts.map +1 -1
- package/dist/mcp-apps-inbound.js +28 -23
- package/dist/mcp-apps-outbound.d.ts +136 -121
- package/dist/mcp-apps-outbound.d.ts.map +1 -1
- package/dist/mcp-apps-outbound.js +384 -414
- package/dist/mcp-mounts.d.ts +21 -20
- package/dist/mcp-mounts.d.ts.map +1 -1
- package/dist/mcp-mounts.js +25 -29
- package/dist/{session-channel.d.ts → render-channel.d.ts} +145 -102
- package/dist/render-channel.d.ts.map +1 -0
- package/dist/{session-channel.js → render-channel.js} +481 -462
- package/dist/schema-compat.d.ts +11 -11
- package/dist/schema-compat.d.ts.map +1 -1
- package/dist/schema-compat.js +6 -6
- package/dist/server.d.ts +224 -219
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +1498 -1963
- package/dist/storage.d.ts +7 -7
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +12 -12
- package/package.json +12 -11
- package/dist/render-gate.d.ts +0 -87
- package/dist/render-gate.d.ts.map +0 -1
- package/dist/render-gate.js +0 -77
- package/dist/render-rate-limit.d.ts +0 -59
- package/dist/render-rate-limit.d.ts.map +0 -1
- package/dist/render-rate-limit.js +0 -73
- package/dist/render-signing.d.ts +0 -98
- package/dist/render-signing.d.ts.map +0 -1
- package/dist/render-signing.js +0 -113
- package/dist/session-channel.d.ts.map +0 -1
package/dist/schema-compat.d.ts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Schema compatibility check — verifies that a
|
|
2
|
+
* Schema compatibility check — verifies that a Render's declared
|
|
3
3
|
* `actionSpec` / `streamSpec` schemas line up with the input/output
|
|
4
4
|
* schemas of the tools they reference. Wired at two canonical check
|
|
5
|
-
* points: `
|
|
5
|
+
* points: `ggui_render` validation (defensive, fires when the
|
|
6
6
|
* generator eventually emits contract) and blueprint registration
|
|
7
7
|
* (the console blueprint-try endpoint — the real-world site where a
|
|
8
|
-
*
|
|
9
|
-
* refs lands on
|
|
8
|
+
* Render with pre-declared `actionSpec` / `streamSpec` and tool
|
|
9
|
+
* refs lands on the server).
|
|
10
10
|
*
|
|
11
11
|
* **Algorithmic primitive** lives in `@ggui-ai/protocol`:
|
|
12
12
|
*
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
* `inputSchema` / `outputSchema` to the JsonSchema shape the
|
|
17
17
|
* subset algorithm consumes.
|
|
18
18
|
*
|
|
19
|
-
* **What this module adds.** A small layer that walks a
|
|
19
|
+
* **What this module adds.** A small layer that walks a Render's
|
|
20
20
|
* `actionSpec` + `streamSpec`, resolves each declared `tool` ref
|
|
21
21
|
* against a toolName → ZodRawShape registry, runs the appropriate
|
|
22
22
|
* subset check, and reports a stable {@link SchemaCompatReport}. The
|
|
@@ -120,9 +120,9 @@ export interface ToolSchemaRef {
|
|
|
120
120
|
readonly outputSchema: ZodRawShape;
|
|
121
121
|
}
|
|
122
122
|
/**
|
|
123
|
-
* Narrow shape of the
|
|
123
|
+
* Narrow shape of the Render subset the checker consumes — the
|
|
124
124
|
* two spec fields PLUS the contract's own tool catalog. Accepts any
|
|
125
|
-
* object carrying them, so both `@ggui-ai/protocol::
|
|
125
|
+
* object carrying them, so both `@ggui-ai/protocol::Render` and
|
|
126
126
|
* the console endpoint's manifest contract shape work without a cast.
|
|
127
127
|
*
|
|
128
128
|
* `agentCapabilities.tools` is the contract author's declared catalog
|
|
@@ -133,7 +133,7 @@ export interface ToolSchemaRef {
|
|
|
133
133
|
* schema check (we can't validate a remote server's tool schema from
|
|
134
134
|
* here; the agent owns the cross-MCP call).
|
|
135
135
|
*/
|
|
136
|
-
export interface
|
|
136
|
+
export interface RenderContractShape {
|
|
137
137
|
readonly actionSpec?: ActionSpec;
|
|
138
138
|
readonly streamSpec?: StreamSpec;
|
|
139
139
|
readonly agentCapabilities?: {
|
|
@@ -150,7 +150,7 @@ export declare class SchemaCompatError extends Error {
|
|
|
150
150
|
constructor(report: SchemaCompatReport, context: string);
|
|
151
151
|
}
|
|
152
152
|
/**
|
|
153
|
-
* Check a
|
|
153
|
+
* Check a Render's `actionSpec` / `streamSpec` entries against
|
|
154
154
|
* the tool registry. See {@link SchemaCompatMode} for policy
|
|
155
155
|
* semantics.
|
|
156
156
|
*
|
|
@@ -159,9 +159,9 @@ export declare class SchemaCompatError extends Error {
|
|
|
159
159
|
* the report is still available on `error.report`.
|
|
160
160
|
*
|
|
161
161
|
* `context` is a short string naming the call site (e.g.
|
|
162
|
-
* `"
|
|
162
|
+
* `"ggui_render"`, `"console blueprint-try:<blueprintId>"`). Shows
|
|
163
163
|
* up in thrown error messages so an operator reading logs sees
|
|
164
164
|
* which ingress surfaced the mismatch.
|
|
165
165
|
*/
|
|
166
|
-
export declare function
|
|
166
|
+
export declare function checkRenderSchemaCompat(render: RenderContractShape, tools: Iterable<ToolSchemaRef>, mode: SchemaCompatMode, context: string): SchemaCompatReport;
|
|
167
167
|
//# sourceMappingURL=schema-compat.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-compat.d.ts","sourceRoot":"","sources":["../src/schema-compat.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,EAGL,KAAK,eAAe,EACpB,KAAK,UAAU,EACf,KAAK,UAAU,EAChB,MAAM,mBAAmB,CAAC;AAE3B;;;;;;;;;;;;;;GAcG;AACH,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,MAAM,GAAG,KAAK,CAAC;AAEzD;;;GAGG;AACH,eAAO,MAAM,0BAA0B,EAAE,gBAA2B,CAAC;AAErE;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;;;OAKG;IACH,QAAQ,CAAC,IAAI,EAAE,QAAQ,GAAG,QAAQ,CAAC;IACnC,mCAAmC;IACnC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,qCAAqC;IACrC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B;;;;;;;OAOG;IACH,QAAQ,CAAC,MAAM,EAAE,gBAAgB,GAAG,iBAAiB,CAAC;IACtD;uDACmD;IACnD,QAAQ,CAAC,UAAU,EAAE,SAAS,eAAe,EAAE,CAAC;CACjD;AAED;;;;GAIG;AACH,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,SAAS,mBAAmB,EAAE,CAAC;CACnD;AAED;;;;GAIG;AACH,MAAM,W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,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,WAAW,CAAC;IAClC,QAAQ,CAAC,YAAY,EAAE,WAAW,CAAC;CACpC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,WAAW,mBAAmB;IAClC,QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC;IACjC,QAAQ,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC;IACjC,QAAQ,CAAC,iBAAiB,CAAC,EAAE;QAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;KACpD,CAAC;CACH;AAED;;;;GAIG;AACH,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAC;gBACxB,MAAM,EAAE,kBAAkB,EAAE,OAAO,EAAE,MAAM;CAKxD;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,mBAAmB,EAC3B,KAAK,EAAE,QAAQ,CAAC,aAAa,CAAC,EAC9B,IAAI,EAAE,gBAAgB,EACtB,OAAO,EAAE,MAAM,GACd,kBAAkB,CA0HpB"}
|
package/dist/schema-compat.js
CHANGED
|
@@ -18,7 +18,7 @@ export class SchemaCompatError extends Error {
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
|
-
* Check a
|
|
21
|
+
* Check a Render's `actionSpec` / `streamSpec` entries against
|
|
22
22
|
* the tool registry. See {@link SchemaCompatMode} for policy
|
|
23
23
|
* semantics.
|
|
24
24
|
*
|
|
@@ -27,11 +27,11 @@ export class SchemaCompatError extends Error {
|
|
|
27
27
|
* the report is still available on `error.report`.
|
|
28
28
|
*
|
|
29
29
|
* `context` is a short string naming the call site (e.g.
|
|
30
|
-
* `"
|
|
30
|
+
* `"ggui_render"`, `"console blueprint-try:<blueprintId>"`). Shows
|
|
31
31
|
* up in thrown error messages so an operator reading logs sees
|
|
32
32
|
* which ingress surfaced the mismatch.
|
|
33
33
|
*/
|
|
34
|
-
export function
|
|
34
|
+
export function checkRenderSchemaCompat(render, tools, mode, context) {
|
|
35
35
|
if (mode === 'off') {
|
|
36
36
|
return { compatible: true, findings: [] };
|
|
37
37
|
}
|
|
@@ -49,7 +49,7 @@ export function checkStackItemSchemaCompat(stackItem, tools, mode, context) {
|
|
|
49
49
|
// remote tool definition); cross-MCP shape compatibility is the
|
|
50
50
|
// agent's responsibility. Same-server tools still get the full
|
|
51
51
|
// server-driven subset check below.
|
|
52
|
-
const contractDeclaredTools = new Set(Object.keys(
|
|
52
|
+
const contractDeclaredTools = new Set(Object.keys(render.agentCapabilities?.tools ?? {}));
|
|
53
53
|
const findings = [];
|
|
54
54
|
// actionSpec — each action.tool's inputSchema must be a superset
|
|
55
55
|
// of action.schema. A void action (no schema) paired with a tool
|
|
@@ -57,7 +57,7 @@ export function checkStackItemSchemaCompat(stackItem, tools, mode, context) {
|
|
|
57
57
|
// nothing, the tool demands something, so the compat relation is
|
|
58
58
|
// "empty-object ⊆ tool-input" — which fails whenever the tool has
|
|
59
59
|
// required fields.
|
|
60
|
-
const actionSpec =
|
|
60
|
+
const actionSpec = render.actionSpec ?? {};
|
|
61
61
|
for (const [actionName, entry] of Object.entries(actionSpec)) {
|
|
62
62
|
if (!entry || typeof entry !== 'object')
|
|
63
63
|
continue;
|
|
@@ -104,7 +104,7 @@ export function checkStackItemSchemaCompat(stackItem, tools, mode, context) {
|
|
|
104
104
|
}
|
|
105
105
|
// streamSpec — each channel.tool's outputSchema must be a superset
|
|
106
106
|
// of channel.schema (inverted direction from actions).
|
|
107
|
-
const streamSpec =
|
|
107
|
+
const streamSpec = render.streamSpec ?? {};
|
|
108
108
|
for (const [channelName, entry] of Object.entries(streamSpec)) {
|
|
109
109
|
if (!entry || typeof entry !== 'object')
|
|
110
110
|
continue;
|