@ggui-ai/protocol 0.1.0-rc.1 → 0.2.0-alpha.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 +3 -3
- package/dist/bridge/invoke-agent.d.ts +8 -8
- package/dist/bridge/invoke-agent.d.ts.map +1 -1
- package/dist/bridge/invoke-agent.js +12 -12
- package/dist/envelopes/builders.d.ts +2 -4
- package/dist/envelopes/builders.d.ts.map +1 -1
- package/dist/envelopes/builders.js +2 -6
- package/dist/gadgets/stdlib-gadgets.d.ts +1 -1
- package/dist/gadgets/stdlib-gadgets.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -3
- package/dist/integrations/mcp-apps.d.ts +354 -711
- package/dist/integrations/mcp-apps.d.ts.map +1 -1
- package/dist/integrations/mcp-apps.js +266 -208
- package/dist/recommended-prompts.d.ts +1 -1
- package/dist/recommended-prompts.js +1 -1
- package/dist/schemas/data-contract.d.ts +4 -3
- package/dist/schemas/data-contract.d.ts.map +1 -1
- package/dist/schemas/data-contract.js +4 -3
- package/dist/schemas/invoke.d.ts +2 -2
- package/dist/schemas/invoke.js +2 -2
- package/dist/schemas/mcp.d.ts +60 -79
- package/dist/schemas/mcp.d.ts.map +1 -1
- package/dist/schemas/mcp.js +93 -116
- package/dist/schemas/sync-check.js +1 -1
- package/dist/stream/stream-parser.d.ts +4 -4
- package/dist/stream/stream-parser.d.ts.map +1 -1
- package/dist/stream/stream-parser.js +9 -9
- package/dist/transport/websocket.d.ts +14 -49
- package/dist/transport/websocket.d.ts.map +1 -1
- package/dist/types/app-config.d.ts +17 -32
- package/dist/types/app-config.d.ts.map +1 -1
- package/dist/types/canvas-lifecycle.d.ts +13 -13
- package/dist/types/canvas-lifecycle.d.ts.map +1 -1
- package/dist/types/canvas-lifecycle.js +3 -3
- package/dist/types/contract-inference.d.ts +4 -7
- package/dist/types/contract-inference.d.ts.map +1 -1
- package/dist/types/data-bindings.d.ts +1 -1
- package/dist/types/data-bindings.d.ts.map +1 -1
- package/dist/types/data-contract.d.ts +10 -10
- package/dist/types/data-contract.d.ts.map +1 -1
- package/dist/types/events.d.ts +14 -56
- package/dist/types/events.d.ts.map +1 -1
- package/dist/types/events.js +1 -8
- package/dist/types/feedback.d.ts +2 -4
- package/dist/types/feedback.d.ts.map +1 -1
- package/dist/types/handshake-suggestion.d.ts +1 -1
- package/dist/types/host-context.d.ts +5 -15
- package/dist/types/host-context.d.ts.map +1 -1
- package/dist/types/host-context.js +1 -1
- package/dist/types/live-channel.d.ts +128 -191
- package/dist/types/live-channel.d.ts.map +1 -1
- package/dist/types/llm-route.d.ts +233 -0
- package/dist/types/llm-route.d.ts.map +1 -0
- package/dist/types/llm-route.js +433 -0
- package/dist/types/llm.d.ts +35 -17
- package/dist/types/llm.d.ts.map +1 -1
- package/dist/types/llm.js +50 -39
- package/dist/types/mcp.d.ts +47 -137
- package/dist/types/mcp.d.ts.map +1 -1
- package/dist/types/mcp.js +2 -2
- package/dist/types/openrouter-models.d.ts +3 -2
- package/dist/types/openrouter-models.d.ts.map +1 -1
- package/dist/types/render-event.d.ts +119 -0
- package/dist/types/render-event.d.ts.map +1 -0
- package/dist/types/render-event.js +38 -0
- package/dist/types/session.d.ts +216 -342
- package/dist/types/session.d.ts.map +1 -1
- package/dist/types/ui-generator.d.ts +8 -9
- package/dist/types/ui-generator.d.ts.map +1 -1
- package/dist/validation/contract-validator.d.ts +60 -4
- package/dist/validation/contract-validator.d.ts.map +1 -1
- package/dist/validation/contract-validator.js +101 -5
- package/dist/validation/reserved-channels.d.ts +1 -1
- package/dist/validation/reserved-channels.js +5 -5
- package/dist/validation/sanitize-error.js +1 -1
- package/dist/validation/schema-compat-invariants.d.ts +2 -2
- package/dist/validation/schema-compat-invariants.js +2 -2
- package/dist/validation/schema-meta-validation.d.ts +1 -1
- package/dist/validation/schema-meta-validation.js +2 -2
- package/dist/validation/schema-subset.d.ts +1 -1
- package/dist/version.d.ts +253 -46
- package/dist/version.d.ts.map +1 -1
- package/dist/version.js +253 -46
- package/package.json +17 -16
- package/dist/navigation/index.d.ts +0 -3
- package/dist/navigation/index.d.ts.map +0 -1
- package/dist/navigation/index.js +0 -1
- package/dist/navigation/stack-navigation.d.ts +0 -55
- package/dist/navigation/stack-navigation.d.ts.map +0 -1
- package/dist/navigation/stack-navigation.js +0 -80
package/dist/types/llm.d.ts
CHANGED
|
@@ -1,8 +1,29 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* LLM
|
|
2
|
+
* LLM PRICING + MODEL REGISTRY (LiteLLM-keyed).
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* Scope split (locked 2026-05-25, slice #43 close-out):
|
|
5
|
+
*
|
|
6
|
+
* - `MODEL_REGISTRY` here = LiteLLM-keyed pricing + capability
|
|
7
|
+
* metadata. Keys are LiteLLM strings (`"gemini/gemini-3.5-flash"`,
|
|
8
|
+
* `"openai/gpt-5.4-mini"`, …). Read by:
|
|
9
|
+
* - `cloud/ggui-protocol-pod` pricing-drift test (vendored
|
|
10
|
+
* LiteLLM JSON pricing table)
|
|
11
|
+
* - `oss/misc/benchmark` runner (bench harness; picks model
|
|
12
|
+
* configs by LiteLLM key)
|
|
13
|
+
* - `scripts/check-litellm-pricing-drift.ts` (CI guard)
|
|
14
|
+
* This registry's keys MUST stay in LiteLLM format because the
|
|
15
|
+
* vendored pricing JSON they cross-reference is LiteLLM-shaped.
|
|
16
|
+
*
|
|
17
|
+
* - LLM routing lives in {@link ./llm-route} — typed `LlmRoute`
|
|
18
|
+
* discriminated union (`provider:model` canonical or
|
|
19
|
+
* `provider/model` LiteLLM-compat). Every LLM call site threads
|
|
20
|
+
* `LlmRoute`; the registry KEY equals the wire-canonical id the
|
|
21
|
+
* provider's API expects. See
|
|
22
|
+
* `docs/principles/model-string-convention.md`.
|
|
23
|
+
*
|
|
24
|
+
* The old routing helpers (`getProviderForModel`, `isValidLiteLLMFormat`,
|
|
25
|
+
* `LLMProvider` (capital)) were deleted in the slice #43 close-out —
|
|
26
|
+
* routing went through `parseAnyLlmRoute` + typed dispatch.
|
|
6
27
|
*
|
|
7
28
|
* Pricing last verified: March 2026
|
|
8
29
|
* Sources:
|
|
@@ -10,16 +31,22 @@
|
|
|
10
31
|
* https://developers.openai.com/api/docs/pricing/
|
|
11
32
|
* https://ai.google.dev/gemini-api/docs/pricing
|
|
12
33
|
*/
|
|
13
|
-
|
|
14
|
-
|
|
34
|
+
import type { LlmProvider } from "./llm-route.js";
|
|
35
|
+
/**
|
|
36
|
+
* Display metadata keyed by `LlmProvider`. The `bedrock` entry is
|
|
37
|
+
* synthesized for UI continuity — operators picking a bedrock route
|
|
38
|
+
* still see a label. Pricing/key-prefix conventions for bedrock are
|
|
39
|
+
* AWS-IAM driven and don't follow the API-key prefix shape.
|
|
40
|
+
*/
|
|
41
|
+
export declare const PROVIDER_INFO: Record<LlmProvider, {
|
|
15
42
|
displayName: string;
|
|
16
43
|
keyPrefix: string;
|
|
17
44
|
}>;
|
|
18
|
-
export type ModelId = "anthropic/claude-haiku-4-5" | "anthropic/claude-sonnet-4-6" | "anthropic/claude-opus-4-6" | "gemini/gemini-3.1-flash-lite-preview" | "gemini/gemini-3-flash-preview" | "gemini/gemini-3.1-pro-preview" | "openai/gpt-5.3-codex" | "openai/gpt-5.4" | "openai/gpt-5.4-mini" | "openai/gpt-5.4-nano";
|
|
45
|
+
export type ModelId = "anthropic/claude-haiku-4-5" | "anthropic/claude-sonnet-4-6" | "anthropic/claude-opus-4-6" | "gemini/gemini-3.5-flash" | "gemini/gemini-3.1-flash-lite-preview" | "gemini/gemini-3-flash-preview" | "gemini/gemini-3.1-pro-preview" | "openai/gpt-5.3-codex" | "openai/gpt-5.4" | "openai/gpt-5.4-mini" | "openai/gpt-5.4-nano";
|
|
19
46
|
export type ModelTier = "fast" | "balanced" | "premium";
|
|
20
47
|
export interface ModelConfig {
|
|
21
48
|
id: ModelId;
|
|
22
|
-
provider:
|
|
49
|
+
provider: LlmProvider;
|
|
23
50
|
displayName: string;
|
|
24
51
|
tier: ModelTier;
|
|
25
52
|
costs: {
|
|
@@ -37,19 +64,10 @@ export declare const MODEL_REGISTRY: Record<ModelId, ModelConfig>;
|
|
|
37
64
|
*/
|
|
38
65
|
export declare const DEFAULT_MODEL: ModelId;
|
|
39
66
|
export declare function isValidModelId(id: string): id is ModelId;
|
|
40
|
-
/**
|
|
41
|
-
* Get provider name from a LiteLLM-format model ID.
|
|
42
|
-
* Returns 'anthropic' as default for unrecognized formats.
|
|
43
|
-
*/
|
|
44
|
-
export declare function getProviderForModel(modelId: string): LLMProvider;
|
|
45
|
-
/**
|
|
46
|
-
* Validate LiteLLM format: "provider/model-name"
|
|
47
|
-
*/
|
|
48
|
-
export declare function isValidLiteLLMFormat(modelId: string): boolean;
|
|
49
67
|
/**
|
|
50
68
|
* Get all model IDs for a given provider.
|
|
51
69
|
*/
|
|
52
|
-
export declare function getModelsForProvider(provider:
|
|
70
|
+
export declare function getModelsForProvider(provider: LlmProvider): ModelId[];
|
|
53
71
|
/**
|
|
54
72
|
* Get all model IDs for a given tier.
|
|
55
73
|
*/
|
package/dist/types/llm.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"llm.d.ts","sourceRoot":"","sources":["../../src/types/llm.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"llm.d.ts","sourceRoot":"","sources":["../../src/types/llm.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAMlD;;;;;GAKG;AACH,eAAO,MAAM,aAAa,EAAE,MAAM,CAChC,WAAW,EACX;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAO3C,CAAC;AAMF,MAAM,MAAM,OAAO,GAEf,4BA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*
|
|
4
|
+
* Scope split (locked 2026-05-25, slice #43 close-out):
|
|
5
|
+
*
|
|
6
|
+
* - `MODEL_REGISTRY` here = LiteLLM-keyed pricing + capability
|
|
7
|
+
* metadata. Keys are LiteLLM strings (`"gemini/gemini-3.5-flash"`,
|
|
8
|
+
* `"openai/gpt-5.4-mini"`, …). Read by:
|
|
9
|
+
* - `cloud/ggui-protocol-pod` pricing-drift test (vendored
|
|
10
|
+
* LiteLLM JSON pricing table)
|
|
11
|
+
* - `oss/misc/benchmark` runner (bench harness; picks model
|
|
12
|
+
* configs by LiteLLM key)
|
|
13
|
+
* - `scripts/check-litellm-pricing-drift.ts` (CI guard)
|
|
14
|
+
* This registry's keys MUST stay in LiteLLM format because the
|
|
15
|
+
* vendored pricing JSON they cross-reference is LiteLLM-shaped.
|
|
16
|
+
*
|
|
17
|
+
* - LLM routing lives in {@link ./llm-route} — typed `LlmRoute`
|
|
18
|
+
* discriminated union (`provider:model` canonical or
|
|
19
|
+
* `provider/model` LiteLLM-compat). Every LLM call site threads
|
|
20
|
+
* `LlmRoute`; the registry KEY equals the wire-canonical id the
|
|
21
|
+
* provider's API expects. See
|
|
22
|
+
* `docs/principles/model-string-convention.md`.
|
|
23
|
+
*
|
|
24
|
+
* The old routing helpers (`getProviderForModel`, `isValidLiteLLMFormat`,
|
|
25
|
+
* `LLMProvider` (capital)) were deleted in the slice #43 close-out —
|
|
26
|
+
* routing went through `parseAnyLlmRoute` + typed dispatch.
|
|
6
27
|
*
|
|
7
28
|
* Pricing last verified: March 2026
|
|
8
29
|
* Sources:
|
|
@@ -10,11 +31,21 @@
|
|
|
10
31
|
* https://developers.openai.com/api/docs/pricing/
|
|
11
32
|
* https://ai.google.dev/gemini-api/docs/pricing
|
|
12
33
|
*/
|
|
34
|
+
// =============================================================================
|
|
35
|
+
// Provider display metadata
|
|
36
|
+
// =============================================================================
|
|
37
|
+
/**
|
|
38
|
+
* Display metadata keyed by `LlmProvider`. The `bedrock` entry is
|
|
39
|
+
* synthesized for UI continuity — operators picking a bedrock route
|
|
40
|
+
* still see a label. Pricing/key-prefix conventions for bedrock are
|
|
41
|
+
* AWS-IAM driven and don't follow the API-key prefix shape.
|
|
42
|
+
*/
|
|
13
43
|
export const PROVIDER_INFO = {
|
|
14
44
|
anthropic: { displayName: "Anthropic", keyPrefix: "sk-ant-" },
|
|
15
45
|
google: { displayName: "Google AI", keyPrefix: "AIza" },
|
|
16
46
|
openai: { displayName: "OpenAI", keyPrefix: "sk-" },
|
|
17
47
|
openrouter: { displayName: "OpenRouter", keyPrefix: "sk-or-" },
|
|
48
|
+
bedrock: { displayName: "AWS Bedrock", keyPrefix: "" },
|
|
18
49
|
};
|
|
19
50
|
// =============================================================================
|
|
20
51
|
// Model Registry — verified pricing March 2026
|
|
@@ -48,7 +79,22 @@ export const MODEL_REGISTRY = {
|
|
|
48
79
|
maxTokens: 1000000,
|
|
49
80
|
supportsTools: true,
|
|
50
81
|
},
|
|
51
|
-
// ── Google Gemini (API requires "-preview" suffix)
|
|
82
|
+
// ── Google Gemini (API requires "-preview" suffix for previews) ──
|
|
83
|
+
// Default generation model.
|
|
84
|
+
// Pricing values mirror LiteLLM upstream
|
|
85
|
+
// (https://github.com/BerriAI/litellm/blob/main/model_prices_and_context_window.json);
|
|
86
|
+
// host-side consumers may apply a more authoritative price table
|
|
87
|
+
// if they ship one.
|
|
88
|
+
"gemini/gemini-3.5-flash": {
|
|
89
|
+
id: "gemini/gemini-3.5-flash",
|
|
90
|
+
provider: "google",
|
|
91
|
+
displayName: "Gemini 3.5 Flash",
|
|
92
|
+
tier: "fast",
|
|
93
|
+
costs: { inputPer1M: 1.5, outputPer1M: 9.0 },
|
|
94
|
+
maxTokens: 1048576,
|
|
95
|
+
supportsTools: true,
|
|
96
|
+
supportsCaching: true,
|
|
97
|
+
},
|
|
52
98
|
"gemini/gemini-3.1-flash-lite-preview": {
|
|
53
99
|
id: "gemini/gemini-3.1-flash-lite-preview",
|
|
54
100
|
provider: "google",
|
|
@@ -124,41 +170,6 @@ export const DEFAULT_MODEL = "anthropic/claude-haiku-4-5";
|
|
|
124
170
|
export function isValidModelId(id) {
|
|
125
171
|
return id in MODEL_REGISTRY;
|
|
126
172
|
}
|
|
127
|
-
/**
|
|
128
|
-
* Get provider name from a LiteLLM-format model ID.
|
|
129
|
-
* Returns 'anthropic' as default for unrecognized formats.
|
|
130
|
-
*/
|
|
131
|
-
export function getProviderForModel(modelId) {
|
|
132
|
-
const slash = modelId.indexOf("/");
|
|
133
|
-
if (slash < 0) {
|
|
134
|
-
console.warn(`Unrecognized model format (no slash): "${modelId}" — defaulting to anthropic`);
|
|
135
|
-
return "anthropic";
|
|
136
|
-
}
|
|
137
|
-
const prefix = modelId.substring(0, slash);
|
|
138
|
-
const providerMap = {
|
|
139
|
-
anthropic: "anthropic",
|
|
140
|
-
gemini: "google",
|
|
141
|
-
openai: "openai",
|
|
142
|
-
openrouter: "openrouter",
|
|
143
|
-
};
|
|
144
|
-
const provider = providerMap[prefix];
|
|
145
|
-
if (!provider) {
|
|
146
|
-
console.warn(`Unrecognized model format: "${modelId}" — defaulting to anthropic`);
|
|
147
|
-
return "anthropic";
|
|
148
|
-
}
|
|
149
|
-
return provider;
|
|
150
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
* Validate LiteLLM format: "provider/model-name"
|
|
153
|
-
*/
|
|
154
|
-
export function isValidLiteLLMFormat(modelId) {
|
|
155
|
-
const slash = modelId.indexOf("/");
|
|
156
|
-
if (slash <= 0)
|
|
157
|
-
return false;
|
|
158
|
-
const prefix = modelId.substring(0, slash);
|
|
159
|
-
return ["anthropic", "gemini", "openai", "openrouter"].includes(prefix)
|
|
160
|
-
&& modelId.length > slash + 1;
|
|
161
|
-
}
|
|
162
173
|
/**
|
|
163
174
|
* Get all model IDs for a given provider.
|
|
164
175
|
*/
|
package/dist/types/mcp.d.ts
CHANGED
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
import type { z } from 'zod';
|
|
2
|
-
import type {
|
|
3
|
-
import type {
|
|
4
|
-
import type { handshakeInputSchema, handshakeOutputSchema,
|
|
5
|
-
export type {
|
|
2
|
+
import type { DataContract, JsonObject, JsonSchema, JsonValue } from './data-contract';
|
|
3
|
+
import type { Render, RenderStatus } from './session';
|
|
4
|
+
import type { handshakeInputSchema, handshakeOutputSchema, renderInputSchema, renderOutputSchema, updateInputSchema, updateOutputSchema } from '../schemas/mcp';
|
|
5
|
+
export type { RenderStatus } from './session';
|
|
6
6
|
/** Target screen size category for responsive layout */
|
|
7
7
|
export type Screen = 'mobile' | 'tablet' | 'desktop' | 'universal';
|
|
8
|
-
/**
|
|
9
|
-
* Session status for MCP consume responses
|
|
10
|
-
*/
|
|
11
|
-
export type SessionStatus = 'active' | 'completed' | 'expired';
|
|
12
8
|
/**
|
|
13
9
|
* Pending action stored server-side for agent consumption.
|
|
14
10
|
*
|
|
15
11
|
* `envelope` is the canonical {@link ConsumeEventEntry} row. `sequence`
|
|
16
|
-
* is the
|
|
12
|
+
* is the render-scoped monotonic assigned at ingestion; it sits on the
|
|
17
13
|
* row wrapper so consumers can detect gaps without parsing the payload.
|
|
18
14
|
*
|
|
19
15
|
* **Storage note**: the envelope is stored as either a JSON object
|
|
@@ -31,29 +27,20 @@ export interface PendingEvent {
|
|
|
31
27
|
*/
|
|
32
28
|
envelope: ConsumeEventEntry | string;
|
|
33
29
|
/**
|
|
34
|
-
*
|
|
35
|
-
* `
|
|
36
|
-
* consumers can detect gaps without reading
|
|
30
|
+
* Render-scoped monotonic sequence assigned at ingestion. Mirrors
|
|
31
|
+
* `Render.eventSequence` at the moment this row was appended so
|
|
32
|
+
* consumers can detect gaps without reading render state.
|
|
37
33
|
*/
|
|
38
34
|
sequence: number;
|
|
39
35
|
/** ISO datetime when the row was appended. */
|
|
40
36
|
createdAt: string;
|
|
41
37
|
}
|
|
42
|
-
/**
|
|
43
|
-
* Input for ggui_pop tool - removes top UI from stack
|
|
44
|
-
*/
|
|
45
|
-
export interface GguiPopInput {
|
|
46
|
-
/** Session ID to pop from */
|
|
47
|
-
sessionId: string;
|
|
48
|
-
}
|
|
49
38
|
/**
|
|
50
39
|
* Input for ggui_consume tool — long-poll for buffered events on a
|
|
51
|
-
* specific
|
|
40
|
+
* specific render.
|
|
52
41
|
*
|
|
53
|
-
* Keyed by `
|
|
54
|
-
*
|
|
55
|
-
* checks via `ctx.appId`. The agent gets `stackItemId` from
|
|
56
|
-
* `pushOutput.stackItemId`.
|
|
42
|
+
* Keyed by `renderId`. The agent gets `renderId` from
|
|
43
|
+
* `renderOutput.renderId`.
|
|
57
44
|
*
|
|
58
45
|
* Default semantic: long-poll, return on first event or server-default
|
|
59
46
|
* timeout. Agent loops by re-calling. There is no `until` parameter —
|
|
@@ -67,11 +54,10 @@ export interface GguiPopInput {
|
|
|
67
54
|
*/
|
|
68
55
|
export interface GguiConsumeInput {
|
|
69
56
|
/**
|
|
70
|
-
*
|
|
71
|
-
*
|
|
72
|
-
* Cross-tenant access surfaces uniformly as `stack_item_not_found`.
|
|
57
|
+
* Render to consume events from. Globally unique (UUID).
|
|
58
|
+
* Cross-tenant access surfaces uniformly as `render_not_found`.
|
|
73
59
|
*/
|
|
74
|
-
|
|
60
|
+
renderId: string;
|
|
75
61
|
/**
|
|
76
62
|
* Timeout in seconds for long-poll. Server-side wall-clock cap.
|
|
77
63
|
* - 0: immediate return (no waiting)
|
|
@@ -84,14 +70,14 @@ export interface GguiConsumeInput {
|
|
|
84
70
|
}
|
|
85
71
|
/**
|
|
86
72
|
* Input for `ggui_emit` — emit a new delivery on a declared channel of the
|
|
87
|
-
*
|
|
73
|
+
* render's `streamSpec`.
|
|
88
74
|
*
|
|
89
75
|
* Canonical, post-rewrite shape. The agent describes what new data
|
|
90
76
|
* exists; the server describes how the channel behaves.
|
|
91
77
|
*
|
|
92
78
|
* Fields the agent MUST NOT supply:
|
|
93
79
|
* - `mode` — derived from `streamSpec[channel].mode` (default `'append'`).
|
|
94
|
-
* - `seq` — server-assigned via `
|
|
80
|
+
* - `seq` — server-assigned via `RenderStreamBuffer`.
|
|
95
81
|
* - `timestamp` — server clock.
|
|
96
82
|
* - `connectionId` / transport details — fan-out plumbing.
|
|
97
83
|
*
|
|
@@ -99,10 +85,10 @@ export interface GguiConsumeInput {
|
|
|
99
85
|
* guarded by `types.test.ts`.
|
|
100
86
|
*/
|
|
101
87
|
export interface GguiEmitInput<TPayload = JsonValue> {
|
|
102
|
-
/**
|
|
103
|
-
|
|
88
|
+
/** Render to stream to. Server enforces app-ownership. */
|
|
89
|
+
renderId: string;
|
|
104
90
|
/**
|
|
105
|
-
* Channel name. MUST be declared on the resolved
|
|
91
|
+
* Channel name. MUST be declared on the resolved render's
|
|
106
92
|
* `streamSpec`. Undeclared channels are rejected at call time.
|
|
107
93
|
*/
|
|
108
94
|
channel: string;
|
|
@@ -121,12 +107,6 @@ export interface GguiEmitInput<TPayload = JsonValue> {
|
|
|
121
107
|
* sending `complete: true`, but the server won't reject them.
|
|
122
108
|
*/
|
|
123
109
|
complete?: boolean;
|
|
124
|
-
/**
|
|
125
|
-
* Pin this delivery to a specific stack item. Mirrors the live-channel
|
|
126
|
-
* `ActionEnvelope.stackItemId` doctrine — explicit when the agent
|
|
127
|
-
* cares, implicit `session.currentStackIndex` default otherwise.
|
|
128
|
-
*/
|
|
129
|
-
stackItemId?: string;
|
|
130
110
|
}
|
|
131
111
|
/**
|
|
132
112
|
* Output from `ggui_emit`.
|
|
@@ -140,75 +120,27 @@ export interface GguiEmitOutput {
|
|
|
140
120
|
/** True when the server accepted the delivery at the boundary. */
|
|
141
121
|
accepted: boolean;
|
|
142
122
|
/**
|
|
143
|
-
*
|
|
123
|
+
* Render-scoped monotonic outbound sequence assigned to this
|
|
144
124
|
* delivery. Omitted on implementations without a
|
|
145
|
-
* `
|
|
125
|
+
* `RenderStreamBuffer` (hosted cloud today); required on OSS
|
|
146
126
|
* `@ggui-ai/mcp-server`.
|
|
147
127
|
*/
|
|
148
128
|
seq?: number;
|
|
149
129
|
}
|
|
150
130
|
/**
|
|
151
|
-
* Input for
|
|
131
|
+
* Input for ggui_get_render tool - retrieves render state
|
|
152
132
|
*/
|
|
153
|
-
export interface
|
|
154
|
-
/**
|
|
155
|
-
|
|
133
|
+
export interface GguiGetRenderInput {
|
|
134
|
+
/** Render ID to get state for */
|
|
135
|
+
renderId: string;
|
|
156
136
|
}
|
|
157
137
|
/**
|
|
158
|
-
*
|
|
138
|
+
* Output from ggui_get_render tool — full render snapshot.
|
|
159
139
|
*/
|
|
160
|
-
export
|
|
161
|
-
/** Session ID to close */
|
|
162
|
-
sessionId: string;
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* Input for ggui_get_stack tool - lightweight stack navigation metadata
|
|
166
|
-
*/
|
|
167
|
-
export interface GguiGetStackInput {
|
|
168
|
-
/** Session ID to get stack info for */
|
|
169
|
-
sessionId: string;
|
|
170
|
-
}
|
|
171
|
-
/**
|
|
172
|
-
* Lightweight summary of a stack item (no componentCode)
|
|
173
|
-
*/
|
|
174
|
-
export interface StackItemSummary {
|
|
175
|
-
/** Stack item ID */
|
|
176
|
-
id: string;
|
|
177
|
-
/** Natural language prompt that generated this item */
|
|
178
|
-
prompt?: string;
|
|
179
|
-
/** Human-readable description */
|
|
180
|
-
description?: string;
|
|
181
|
-
/** Whether this item has a generation error */
|
|
182
|
-
hasError: boolean;
|
|
183
|
-
/** Stream contract — describes what data the component accepts in real-time via ggui_emit */
|
|
184
|
-
streamSpec?: StreamSpec;
|
|
185
|
-
/** Declarative actions wired into this item */
|
|
186
|
-
actions?: Action[];
|
|
187
|
-
/** ISO datetime when this item was created */
|
|
188
|
-
createdAt: string;
|
|
189
|
-
}
|
|
190
|
-
/**
|
|
191
|
-
* Output from ggui_get_stack tool
|
|
192
|
-
*/
|
|
193
|
-
export interface GguiGetStackOutput {
|
|
194
|
-
/** Session ID */
|
|
195
|
-
sessionId: string;
|
|
196
|
-
/** Number of items in the stack */
|
|
197
|
-
stackSize: number;
|
|
198
|
-
/** Currently active stack index */
|
|
199
|
-
currentIndex: number;
|
|
200
|
-
/** Lightweight item summaries (no component code) */
|
|
201
|
-
items: StackItemSummary[];
|
|
202
|
-
/** Whether back navigation is possible */
|
|
203
|
-
canGoBack: boolean;
|
|
204
|
-
/** Whether forward navigation is possible */
|
|
205
|
-
canGoForward: boolean;
|
|
206
|
-
/** Session status */
|
|
207
|
-
status: SessionStatus;
|
|
208
|
-
}
|
|
140
|
+
export type GguiGetRenderOutput = Render;
|
|
209
141
|
/** Negotiator's decision on what UI to show. */
|
|
210
142
|
export interface NegotiatorDecision {
|
|
211
|
-
/** What to do with the
|
|
143
|
+
/** What to do with the render. */
|
|
212
144
|
action: 'create' | 'update' | 'compose' | 'replace';
|
|
213
145
|
/** Why — visible to the agent. */
|
|
214
146
|
reasoning: string;
|
|
@@ -216,8 +148,8 @@ export interface NegotiatorDecision {
|
|
|
216
148
|
blueprintId?: string;
|
|
217
149
|
/** The agreed data contract. */
|
|
218
150
|
contract: DataContract;
|
|
219
|
-
/** For update/compose/replace — which
|
|
220
|
-
|
|
151
|
+
/** For update/compose/replace — which render to target. */
|
|
152
|
+
targetRenderId?: string;
|
|
221
153
|
/** UI adaptations based on user context. */
|
|
222
154
|
adaptations?: {
|
|
223
155
|
fontSize?: 'compact' | 'default' | 'large';
|
|
@@ -234,19 +166,10 @@ export interface NegotiatorAlternative {
|
|
|
234
166
|
contract?: DataContract;
|
|
235
167
|
renderTime: 'instant' | 'standard';
|
|
236
168
|
}
|
|
237
|
-
/**
|
|
238
|
-
* Output from ggui_pop tool
|
|
239
|
-
*/
|
|
240
|
-
export interface GguiPopOutput {
|
|
241
|
-
/** ID of the card that was popped */
|
|
242
|
-
poppedId: string | null;
|
|
243
|
-
/** Current stack size after pop */
|
|
244
|
-
stackSize: number;
|
|
245
|
-
}
|
|
246
169
|
/**
|
|
247
170
|
* Per-event entry returned by `ggui_consume`. The shape written by
|
|
248
171
|
* `ggui_runtime_submit_action`'s `kind:'dispatch'` handler onto the
|
|
249
|
-
*
|
|
172
|
+
* render-keyed pending-events pipe and surfaced verbatim on drain.
|
|
250
173
|
*
|
|
251
174
|
* `actionData` is WHAT the user did; `uiContext` is the snapshot of the
|
|
252
175
|
* contract's `contextSpec` slot values at the moment they did it.
|
|
@@ -256,15 +179,15 @@ export interface GguiPopOutput {
|
|
|
256
179
|
* have mutated by the time consume returns.
|
|
257
180
|
*
|
|
258
181
|
* Distinct from the inbound live-channel `ActionEnvelope` (which has
|
|
259
|
-
* `{
|
|
260
|
-
*
|
|
261
|
-
*
|
|
182
|
+
* `{renderId, type, payload?, ...}` and lives on the WebSocket inbound
|
|
183
|
+
* seam) — consume reads from a separate render-scoped pipe whose entries
|
|
184
|
+
* originate at `submit_action`.
|
|
262
185
|
*/
|
|
263
186
|
export interface ConsumeEventEntry {
|
|
264
187
|
/** Stable discriminator — always the literal `'action'`. */
|
|
265
188
|
readonly type: 'action';
|
|
266
|
-
/**
|
|
267
|
-
readonly
|
|
189
|
+
/** Render the gesture targeted. */
|
|
190
|
+
readonly renderId: string;
|
|
268
191
|
/** Which `actionSpec[*]` entry the iframe dispatched against. */
|
|
269
192
|
readonly intent: string;
|
|
270
193
|
/**
|
|
@@ -298,11 +221,12 @@ export interface ConsumeEventEntry {
|
|
|
298
221
|
export interface GguiConsumeOutput {
|
|
299
222
|
/** Buffered consume-entries (cleared after return). */
|
|
300
223
|
events: ConsumeEventEntry[];
|
|
301
|
-
/**
|
|
302
|
-
|
|
224
|
+
/** Render status — `'expired'` means the render's TTL elapsed and
|
|
225
|
+
* no more events will arrive; the agent's long-poll loop terminates. */
|
|
226
|
+
status: RenderStatus;
|
|
303
227
|
/**
|
|
304
228
|
* Client-side observations echoed back to the agent. Same shape
|
|
305
|
-
* `ggui_handshake` exposes. Lets the agent pick up mid-
|
|
229
|
+
* `ggui_handshake` exposes. Lets the agent pick up mid-render
|
|
306
230
|
* changes (window resize, fullscreen toggle, etc.) without waiting
|
|
307
231
|
* for the next handshake. Absent ⇒ no client observations yet.
|
|
308
232
|
*
|
|
@@ -311,18 +235,6 @@ export interface GguiConsumeOutput {
|
|
|
311
235
|
readonly hostContext?: import('./host-context.js').HostContextProjection;
|
|
312
236
|
};
|
|
313
237
|
}
|
|
314
|
-
/**
|
|
315
|
-
* Output from ggui_get_session tool.
|
|
316
|
-
* Extends SessionView (spec Section 6.1) — same fields, same structure.
|
|
317
|
-
*/
|
|
318
|
-
export type GguiGetSessionOutput = SessionView;
|
|
319
|
-
/**
|
|
320
|
-
* Output from ggui_close tool
|
|
321
|
-
*/
|
|
322
|
-
export interface GguiCloseOutput {
|
|
323
|
-
/** Whether the session was successfully closed */
|
|
324
|
-
success: boolean;
|
|
325
|
-
}
|
|
326
238
|
/**
|
|
327
239
|
* Input for ggui_list_featured_blueprints tool - discovers available UI blueprints
|
|
328
240
|
*/
|
|
@@ -467,7 +379,7 @@ export interface GguiDiscoverOutput {
|
|
|
467
379
|
enabledAdapters: string[];
|
|
468
380
|
/** Component capabilities granted to this app */
|
|
469
381
|
grantedCapabilities: string[];
|
|
470
|
-
/** Default shell type for new
|
|
382
|
+
/** Default shell type for new renders */
|
|
471
383
|
defaultShellType: string;
|
|
472
384
|
/** Authentication mode for end users */
|
|
473
385
|
authMode: string;
|
|
@@ -484,8 +396,8 @@ export interface GguiRequestCredentialInput {
|
|
|
484
396
|
serviceId: string;
|
|
485
397
|
/** Why the agent needs this credential (shown to user) */
|
|
486
398
|
reason?: string;
|
|
487
|
-
/** Existing
|
|
488
|
-
|
|
399
|
+
/** Existing render to push consent UI into */
|
|
400
|
+
renderId?: string;
|
|
489
401
|
}
|
|
490
402
|
/**
|
|
491
403
|
* Output from ggui_request_credential — consent result.
|
|
@@ -566,8 +478,6 @@ export interface McpServerInfo extends JsonObject {
|
|
|
566
478
|
export interface McpCapabilities extends JsonObject {
|
|
567
479
|
tools?: Record<string, never>;
|
|
568
480
|
}
|
|
569
|
-
export type GguiNewSessionInput = z.infer<typeof newSessionInputSchema>;
|
|
570
|
-
export type GguiNewSessionOutput = z.infer<typeof newSessionOutputSchema>;
|
|
571
481
|
export type GguiHandshakeInput = z.infer<typeof handshakeInputSchema>;
|
|
572
482
|
export type GguiHandshakeOutput = z.infer<typeof handshakeOutputSchema>;
|
|
573
483
|
/**
|
|
@@ -604,8 +514,8 @@ export interface ServerCapabilities {
|
|
|
604
514
|
*/
|
|
605
515
|
readonly streamWebSocketLocalTools?: readonly string[];
|
|
606
516
|
}
|
|
607
|
-
export type
|
|
608
|
-
export type
|
|
517
|
+
export type GguiRenderInput = z.infer<typeof renderInputSchema>;
|
|
518
|
+
export type GguiRenderOutput = z.infer<typeof renderOutputSchema>;
|
|
609
519
|
export type GguiUpdateInput = z.infer<typeof updateInputSchema>;
|
|
610
520
|
export type GguiUpdateOutput = z.infer<typeof updateOutputSchema>;
|
|
611
521
|
/**
|
|
@@ -618,7 +528,7 @@ export declare const MCP_ERROR_CODES: {
|
|
|
618
528
|
readonly INVALID_PARAMS: -32602;
|
|
619
529
|
readonly INTERNAL_ERROR: -32603;
|
|
620
530
|
readonly UNAUTHORIZED: -32001;
|
|
621
|
-
readonly
|
|
531
|
+
readonly RENDER_NOT_FOUND: -32002;
|
|
622
532
|
readonly APP_NOT_FOUND: -32003;
|
|
623
533
|
readonly PRODUCTION_FAILED: -32004;
|
|
624
534
|
readonly CAPABILITY_DENIED: -32005;
|
|
@@ -630,7 +540,7 @@ export declare const MCP_ERROR_CODES: {
|
|
|
630
540
|
export declare const PLATFORM_ERROR_CODES: {
|
|
631
541
|
readonly GENERATION_QUOTA_EXCEEDED: -32010;
|
|
632
542
|
readonly APP_LIMIT_EXCEEDED: -32011;
|
|
633
|
-
readonly
|
|
543
|
+
readonly CONCURRENT_RENDER_LIMIT: -32012;
|
|
634
544
|
readonly RATE_LIMIT_EXCEEDED: -32013;
|
|
635
545
|
readonly CONTRACT_VIOLATION: -32020;
|
|
636
546
|
};
|
package/dist/types/mcp.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../src/types/mcp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"mcp.d.ts","sourceRoot":"","sources":["../../src/types/mcp.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACvF,OAAO,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACtD,OAAO,KAAK,EACV,oBAAoB,EACpB,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EACnB,MAAM,gBAAgB,CAAC;AAExB,YAAY,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAM9C,wDAAwD;AACxD,MAAM,MAAM,MAAM,GAAG,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,CAAC;AAEnE;;;;;;;;;;;GAWG;AACH,MAAM,WAAW,YAAY;IAC3B,kDAAkD;IAClD,EAAE,EAAE,MAAM,CAAC;IACX;;;;OAIG;IACH,QAAQ,EAAE,iBAAiB,GAAG,MAAM,CAAC;IACrC;;;;OAIG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,8CAA8C;IAC9C,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;;;;;;;;;;;;;GAeG;AACH,MAAM,WAAW,aAAa,CAAC,QAAQ,GAAG,SAAS;IACjD,0DAA0D;IAC1D,QAAQ,EAAE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
|
|
|
12
12
|
INTERNAL_ERROR: -32603,
|
|
13
13
|
// Protocol-specific error codes
|
|
14
14
|
UNAUTHORIZED: -32001,
|
|
15
|
-
|
|
15
|
+
RENDER_NOT_FOUND: -32002,
|
|
16
16
|
APP_NOT_FOUND: -32003,
|
|
17
17
|
PRODUCTION_FAILED: -32004,
|
|
18
18
|
CAPABILITY_DENIED: -32005,
|
|
@@ -24,7 +24,7 @@ export const MCP_ERROR_CODES = {
|
|
|
24
24
|
export const PLATFORM_ERROR_CODES = {
|
|
25
25
|
GENERATION_QUOTA_EXCEEDED: -32010,
|
|
26
26
|
APP_LIMIT_EXCEEDED: -32011,
|
|
27
|
-
|
|
27
|
+
CONCURRENT_RENDER_LIMIT: -32012,
|
|
28
28
|
RATE_LIMIT_EXCEEDED: -32013,
|
|
29
29
|
CONTRACT_VIOLATION: -32020,
|
|
30
30
|
};
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ModelTier } from "./llm.js";
|
|
2
|
+
import type { LlmProvider } from "./llm-route.js";
|
|
2
3
|
export interface OpenRouterModelConfig {
|
|
3
4
|
id: string;
|
|
4
5
|
openRouterId: string;
|
|
5
|
-
provider:
|
|
6
|
+
provider: LlmProvider;
|
|
6
7
|
displayName: string;
|
|
7
8
|
tier: ModelTier;
|
|
8
9
|
costs: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openrouter-models.d.ts","sourceRoot":"","sources":["../../src/types/openrouter-models.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"openrouter-models.d.ts","sourceRoot":"","sources":["../../src/types/openrouter-models.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAC1C,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,QAAQ,EAAE,WAAW,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,SAAS,CAAC;IAChB,KAAK,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;IACnD,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,OAAO,CAAC;IACvB,eAAe,EAAE,OAAO,CAAC;IACzB,gBAAgB,EAAE,OAAO,CAAC;CAC3B;AAED,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CA+tJ3E,CAAC;AAEF,+BAA+B;AAC/B,eAAO,MAAM,oBAAoB,EAAE,MAAM,EAA2C,CAAC;AAErF,sDAAsD;AACtD,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAErD"}
|