@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/README.md
CHANGED
|
@@ -17,7 +17,7 @@ Here is what happens when a user clicks "Add" on a generated todo UI:
|
|
|
17
17
|
1. **LLM wrote the hook** — `const addTodo = useAction('addTodo');` bound to the button's `onClick`.
|
|
18
18
|
2. **User clicks** — React fires `onClick`, which calls `addTodo(data)`.
|
|
19
19
|
3. **Hook dispatches** — `useAction` (from `@ggui-ai/wire`) sends an `ActionEnvelope` on the live channel.
|
|
20
|
-
4. **WS transport** — the server receives the envelope on the
|
|
20
|
+
4. **WS transport** — the server receives the envelope on the render's live-channel WebSocket.
|
|
21
21
|
5. **Router looks up the tool** — `wiredActionRouter` reads `actionSpec.addTodo.nextStep === 'todo.add'`.
|
|
22
22
|
6. **MCP tool invoked** — the router calls `todo.add` with the validated payload.
|
|
23
23
|
7. **Tool responds** — `todo.add` returns; the response travels back as a `StreamEnvelope` on the live channel.
|
|
@@ -27,13 +27,13 @@ Here is what happens when a user clicks "Add" on a generated todo UI:
|
|
|
27
27
|
|
|
28
28
|
## Implementer guide
|
|
29
29
|
|
|
30
|
-
Building a third-party MCP host that renders ggui
|
|
30
|
+
Building a third-party MCP host that renders ggui UIs, a non-React viewer, or any runtime that speaks the ggui wire contract? The implementer guide at [docs.ggui.ai](https://docs.ggui.ai) covers the three-way quickstart (React via `<McpAppIframe>` / vanilla iframe + postMessage / MCP-host install), the full `ProtocolError` recipe with suggested UX per variant, `ObservabilityEvent` kinds, and version negotiation.
|
|
31
31
|
|
|
32
32
|
## What this package exports
|
|
33
33
|
|
|
34
34
|
| Surface | What it is |
|
|
35
35
|
| ------------------------------------------- | ---------------------------------------------------------------- |
|
|
36
|
-
| `@ggui-ai/protocol` | Root barrel — envelope types, `
|
|
36
|
+
| `@ggui-ai/protocol` | Root barrel — envelope types, `Render`, `StreamSpec`, actions |
|
|
37
37
|
| `@ggui-ai/protocol/content-hash` | Deterministic hashing for cache keys |
|
|
38
38
|
| `@ggui-ai/protocol/blueprint-key` | Server-only blueprint cache-key derivation (uses `node:crypto`) |
|
|
39
39
|
| `@ggui-ai/protocol/transport/websocket` | Live-channel WS binding — subscribe / ack / resume types |
|
|
@@ -12,9 +12,9 @@ import type { ConversationTurn } from '../types/session';
|
|
|
12
12
|
export interface InvokeAgentOptions {
|
|
13
13
|
/** The agent's HTTP endpoint URL */
|
|
14
14
|
connectorEndpointUrl: string;
|
|
15
|
-
/**
|
|
16
|
-
|
|
17
|
-
/** Invocation type: 'start'
|
|
15
|
+
/** Conversation envelope id (omit for 'start' flow — agent mints one) */
|
|
16
|
+
hostSessionId?: string;
|
|
17
|
+
/** Invocation type: 'start' begins a fresh conversation, 'message' continues one */
|
|
18
18
|
type: 'start' | 'message';
|
|
19
19
|
/** User message text */
|
|
20
20
|
message?: string;
|
|
@@ -28,8 +28,8 @@ export interface InvokeAgentOptions {
|
|
|
28
28
|
onStreamChunk?: (text: string) => Promise<void>;
|
|
29
29
|
/** Callback when the stream is done */
|
|
30
30
|
onStreamDone?: () => Promise<void>;
|
|
31
|
-
/** Callback when the agent returns a
|
|
32
|
-
|
|
31
|
+
/** Callback when the agent returns a hostSessionId (start flow, SSE) */
|
|
32
|
+
onHostSessionId?: (hostSessionId: string) => Promise<void>;
|
|
33
33
|
/** Callback for structured agent events (stream, push, etc.) from the events array */
|
|
34
34
|
onAgentEvent?: (event: {
|
|
35
35
|
type: string;
|
|
@@ -39,8 +39,8 @@ export interface InvokeAgentOptions {
|
|
|
39
39
|
timeoutMs?: number;
|
|
40
40
|
}
|
|
41
41
|
export interface InvokeAgentResult {
|
|
42
|
-
/**
|
|
43
|
-
|
|
42
|
+
/** Conversation envelope id returned by the agent (start flow) */
|
|
43
|
+
hostSessionId?: string;
|
|
44
44
|
/** Full text response (JSON responses only — streaming uses callbacks) */
|
|
45
45
|
text?: string;
|
|
46
46
|
/** Whether the response was streamed via SSE */
|
|
@@ -59,7 +59,7 @@ export interface InvokeAgentResult {
|
|
|
59
59
|
*
|
|
60
60
|
* The request body shape follows the ggui bridge protocol:
|
|
61
61
|
* - start: { type: 'start', message, appId, interfaceContext }
|
|
62
|
-
* - message: { type: 'message',
|
|
62
|
+
* - message: { type: 'message', hostSessionId, appId, message, conversationHistory, interfaceContext }
|
|
63
63
|
*/
|
|
64
64
|
export declare function invokeAgentEndpoint(options: InvokeAgentOptions): Promise<InvokeAgentResult>;
|
|
65
65
|
//# sourceMappingURL=invoke-agent.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"invoke-agent.d.ts","sourceRoot":"","sources":["../../src/bridge/invoke-agent.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAgBzD,MAAM,WAAW,kBAAkB;IACjC,oCAAoC;IACpC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,
|
|
1
|
+
{"version":3,"file":"invoke-agent.d.ts","sourceRoot":"","sources":["../../src/bridge/invoke-agent.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAgBzD,MAAM,WAAW,kBAAkB;IACjC,oCAAoC;IACpC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,yEAAyE;IACzE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,oFAAoF;IACpF,IAAI,EAAE,OAAO,GAAG,SAAS,CAAC;IAC1B,wBAAwB;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,uCAAuC;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,8DAA8D;IAC9D,gBAAgB,CAAC,EAAE,gBAAgB,CAAC;IACpC,kDAAkD;IAClD,mBAAmB,CAAC,EAAE,gBAAgB,EAAE,CAAC;IACzC,4DAA4D;IAC5D,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,uCAAuC;IACvC,YAAY,CAAC,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,wEAAwE;IACxE,eAAe,CAAC,EAAE,CAAC,aAAa,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3D,sFAAsF;IACtF,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5E,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,kEAAkE;IAClE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0EAA0E;IAC1E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,QAAQ,EAAE,OAAO,CAAC;IAClB,qBAAqB;IACrB,MAAM,EAAE,IAAI,GAAG,OAAO,CAAC;IACvB,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAID;;;;;;;;;;GAUG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,kBAAkB,GAC1B,OAAO,CAAC,iBAAiB,CAAC,CA4G5B"}
|
|
@@ -2,7 +2,7 @@ import { z } from 'zod';
|
|
|
2
2
|
import { isStreamingContentType } from '../stream/stream-parser.js';
|
|
3
3
|
/** Schema for agent HTTP response data — validates untrusted external input. */
|
|
4
4
|
const agentResponseSchema = z.object({
|
|
5
|
-
|
|
5
|
+
hostSessionId: z.string().optional(),
|
|
6
6
|
text: z.string().optional(),
|
|
7
7
|
events: z.array(z.object({
|
|
8
8
|
type: z.string(),
|
|
@@ -19,21 +19,21 @@ const agentResponseSchema = z.object({
|
|
|
19
19
|
*
|
|
20
20
|
* The request body shape follows the ggui bridge protocol:
|
|
21
21
|
* - start: { type: 'start', message, appId, interfaceContext }
|
|
22
|
-
* - message: { type: 'message',
|
|
22
|
+
* - message: { type: 'message', hostSessionId, appId, message, conversationHistory, interfaceContext }
|
|
23
23
|
*/
|
|
24
24
|
export async function invokeAgentEndpoint(options) {
|
|
25
|
-
const { connectorEndpointUrl, type, appId,
|
|
25
|
+
const { connectorEndpointUrl, type, appId, hostSessionId, message, interfaceContext, conversationHistory, onStreamChunk, onStreamDone, onHostSessionId, timeoutMs = 90_000, } = options;
|
|
26
26
|
// Build request body based on invocation type
|
|
27
27
|
const body = { type, appId };
|
|
28
28
|
if (type === 'start') {
|
|
29
|
-
if (
|
|
30
|
-
body.
|
|
29
|
+
if (hostSessionId)
|
|
30
|
+
body.hostSessionId = hostSessionId;
|
|
31
31
|
body.message = message || 'Start a new session';
|
|
32
32
|
if (interfaceContext)
|
|
33
33
|
body.interfaceContext = interfaceContext;
|
|
34
34
|
}
|
|
35
35
|
else {
|
|
36
|
-
body.
|
|
36
|
+
body.hostSessionId = hostSessionId;
|
|
37
37
|
body.message = message;
|
|
38
38
|
if (interfaceContext)
|
|
39
39
|
body.interfaceContext = interfaceContext;
|
|
@@ -46,8 +46,8 @@ export async function invokeAgentEndpoint(options) {
|
|
|
46
46
|
'Content-Type': 'application/json',
|
|
47
47
|
'X-Ggui-App-Id': appId,
|
|
48
48
|
};
|
|
49
|
-
if (
|
|
50
|
-
headers['X-Ggui-Session-Id'] =
|
|
49
|
+
if (hostSessionId) {
|
|
50
|
+
headers['X-Ggui-Host-Session-Id'] = hostSessionId;
|
|
51
51
|
}
|
|
52
52
|
// POST to agent endpoint
|
|
53
53
|
let response;
|
|
@@ -91,9 +91,9 @@ export async function invokeAgentEndpoint(options) {
|
|
|
91
91
|
await onStreamDone?.();
|
|
92
92
|
return { status: 'ok', streamed: true };
|
|
93
93
|
}
|
|
94
|
-
// Extract
|
|
95
|
-
if (agentData.
|
|
96
|
-
await
|
|
94
|
+
// Extract hostSessionId
|
|
95
|
+
if (agentData.hostSessionId) {
|
|
96
|
+
await onHostSessionId?.(agentData.hostSessionId);
|
|
97
97
|
}
|
|
98
98
|
// Forward structured agent events
|
|
99
99
|
if (agentData.events && options.onAgentEvent) {
|
|
@@ -105,7 +105,7 @@ export async function invokeAgentEndpoint(options) {
|
|
|
105
105
|
const resultText = agentData.text;
|
|
106
106
|
await onStreamDone?.();
|
|
107
107
|
return {
|
|
108
|
-
|
|
108
|
+
hostSessionId: agentData.hostSessionId,
|
|
109
109
|
text: resultText,
|
|
110
110
|
status: 'ok',
|
|
111
111
|
streamed: isStreamingContentType(contentType, transferEncoding),
|
|
@@ -49,11 +49,9 @@ import type { ErrorPayload, StreamEnvelope } from '../types/live-channel.js';
|
|
|
49
49
|
import type { ContractErrorCode, ContractErrorPayload, JsonValue, StreamChannelMode } from '../types/data-contract.js';
|
|
50
50
|
/** Input type for {@link makeActionEnvelope}. */
|
|
51
51
|
export interface MakeActionEnvelopeInput<TPayload = JsonValue> {
|
|
52
|
-
readonly
|
|
52
|
+
readonly renderId: string;
|
|
53
53
|
readonly type: EventType;
|
|
54
54
|
readonly payload?: TPayload;
|
|
55
|
-
readonly stackIndex?: number;
|
|
56
|
-
readonly stackItemId?: string;
|
|
57
55
|
readonly clientSeq?: number;
|
|
58
56
|
/**
|
|
59
57
|
* `schemaVersion` override. See the module docstring for the three
|
|
@@ -65,7 +63,7 @@ export interface MakeActionEnvelopeInput<TPayload = JsonValue> {
|
|
|
65
63
|
}
|
|
66
64
|
/** Input type for {@link makeStreamEnvelope}. */
|
|
67
65
|
export interface MakeStreamEnvelopeInput {
|
|
68
|
-
readonly
|
|
66
|
+
readonly renderId: string;
|
|
69
67
|
readonly channel: string;
|
|
70
68
|
readonly mode: StreamChannelMode;
|
|
71
69
|
readonly payload: JsonValue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builders.d.ts","sourceRoot":"","sources":["../../src/envelopes/builders.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,KAAK,EACV,iBAAiB,EACjB,oBAAoB,EACpB,SAAS,EACT,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AAGnC,iDAAiD;AACjD,MAAM,WAAW,uBAAuB,CAAC,QAAQ,GAAG,SAAS;IAC3D,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"builders.d.ts","sourceRoot":"","sources":["../../src/envelopes/builders.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC7E,OAAO,KAAK,EACV,iBAAiB,EACjB,oBAAoB,EACpB,SAAS,EACT,iBAAiB,EAClB,MAAM,2BAA2B,CAAC;AAGnC,iDAAiD;AACjD,MAAM,WAAW,uBAAuB,CAAC,QAAQ,GAAG,SAAS;IAC3D,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC;IAC5B,QAAQ,CAAC,SAAS,CAAC,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D,QAAQ,CAAC,aAAa,CAAC,EAAE,MAAM,CAAC;CACjC;AAmBD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,GAAG,SAAS,EACrD,KAAK,EAAE,uBAAuB,CAAC,QAAQ,CAAC,GACvC,cAAc,CAAC,QAAQ,CAAC,CAU1B;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,uBAAuB,GAC7B,cAAc,CAYhB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,YAAY,CAO3E;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,6BAA6B,GACnC,oBAAoB,CAatB"}
|
|
@@ -23,15 +23,11 @@ function resolveSchemaVersion(parts) {
|
|
|
23
23
|
*/
|
|
24
24
|
export function makeActionEnvelope(parts) {
|
|
25
25
|
const envelope = {
|
|
26
|
-
|
|
26
|
+
renderId: parts.renderId,
|
|
27
27
|
type: parts.type,
|
|
28
28
|
};
|
|
29
29
|
if (parts.payload !== undefined)
|
|
30
30
|
envelope.payload = parts.payload;
|
|
31
|
-
if (parts.stackIndex !== undefined)
|
|
32
|
-
envelope.stackIndex = parts.stackIndex;
|
|
33
|
-
if (parts.stackItemId !== undefined)
|
|
34
|
-
envelope.stackItemId = parts.stackItemId;
|
|
35
31
|
if (parts.clientSeq !== undefined)
|
|
36
32
|
envelope.clientSeq = parts.clientSeq;
|
|
37
33
|
const stamp = resolveSchemaVersion(parts);
|
|
@@ -49,7 +45,7 @@ export function makeActionEnvelope(parts) {
|
|
|
49
45
|
*/
|
|
50
46
|
export function makeStreamEnvelope(parts) {
|
|
51
47
|
const envelope = {
|
|
52
|
-
|
|
48
|
+
renderId: parts.renderId,
|
|
53
49
|
channel: parts.channel,
|
|
54
50
|
mode: parts.mode,
|
|
55
51
|
payload: parts.payload,
|
|
@@ -12,7 +12,7 @@ export declare const STDLIB_GADGETS_PACKAGE = "@ggui-ai/gadgets";
|
|
|
12
12
|
* in `@ggui-ai/gadgets` asserts the two stay in sync, so a release-time
|
|
13
13
|
* bump to the runtime package without updating this constant fails CI.
|
|
14
14
|
*/
|
|
15
|
-
export declare const STDLIB_GADGETS_VERSION = "0.1.0-rc.
|
|
15
|
+
export declare const STDLIB_GADGETS_VERSION = "0.1.0-rc.3";
|
|
16
16
|
/**
|
|
17
17
|
* v1 catalog of stdlib gadget descriptors. Every entry's
|
|
18
18
|
* `package` defaults to {@link STDLIB_GADGETS_PACKAGE}; the
|
|
@@ -37,7 +37,7 @@ export const STDLIB_GADGETS_PACKAGE = '@ggui-ai/gadgets';
|
|
|
37
37
|
* in `@ggui-ai/gadgets` asserts the two stay in sync, so a release-time
|
|
38
38
|
* bump to the runtime package without updating this constant fails CI.
|
|
39
39
|
*/
|
|
40
|
-
export const STDLIB_GADGETS_VERSION = '0.1.0-rc.
|
|
40
|
+
export const STDLIB_GADGETS_VERSION = '0.1.0-rc.3';
|
|
41
41
|
/**
|
|
42
42
|
* v1 catalog of stdlib gadget descriptors. Every entry's
|
|
43
43
|
* `package` defaults to {@link STDLIB_GADGETS_PACKAGE}; the
|
package/dist/index.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ export * from './types/capabilities';
|
|
|
4
4
|
export * from './types/events';
|
|
5
5
|
export * from './types/region';
|
|
6
6
|
export * from './types/session';
|
|
7
|
+
export * from './types/render-event';
|
|
7
8
|
export * from './types/thread';
|
|
8
9
|
export * from './types/live-channel';
|
|
9
10
|
export * from './types/ui-generator';
|
|
@@ -15,6 +16,7 @@ export { canonicalizeContracts, canonicalizeValue, } from './registry/canonicali
|
|
|
15
16
|
export { summarizeContract } from './registry/summarize-contract';
|
|
16
17
|
export type { TextBlock, ToolUseBlock, ToolResultBlock, ContentBlock, TextDelta, InputJsonDelta, ContentBlockDeltaPayload, MessageStartEvent, ContentBlockStartEvent, ContentBlockDeltaEvent, ContentBlockStopEvent, MessageDeltaEvent, MessageStopEvent, PingEvent, ErrorEvent, InvokeEvent, InvokeErrorCode, InvokeTurn, InvokeRequest, } from './types/invoke';
|
|
17
18
|
export * from './types/llm';
|
|
19
|
+
export * from './types/llm-route';
|
|
18
20
|
export * from './types/openrouter-models';
|
|
19
21
|
export * from './types/interface-context';
|
|
20
22
|
export * from './types/host-context';
|
|
@@ -30,7 +32,6 @@ export * from './schemas/ops-blueprint';
|
|
|
30
32
|
export * from './types/contract-inference';
|
|
31
33
|
export * from './types/gadget';
|
|
32
34
|
export * from './types/app-config';
|
|
33
|
-
export * from './navigation/index';
|
|
34
35
|
export * from './iframe-bridge';
|
|
35
36
|
export * from './envelope-adapters';
|
|
36
37
|
export * from './envelopes/builders';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,sBAAsB,CAAC;AACrC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAI/B,cAAc,sBAAsB,CAAC;AAOrC,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AAIxC,OAAO,EACL,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,kCAAkC,CAAC;AAK1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAMlE,YAAY,EAEV,SAAS,EACT,YAAY,EACZ,eAAe,EACf,YAAY,EAEZ,SAAS,EACT,cAAc,EACd,wBAAwB,EAExB,iBAAiB,EACjB,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,iBAAiB,EACjB,gBAAgB,EAChB,SAAS,EACT,UAA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AAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAC;AACjE,cAAc,mBAAmB,CAAC;AAClC,OAAO,EACL,cAAc,EACd,sBAAsB,EACtB,sBAAsB,EACtB,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,2BAA2B,EAC3B,iBAAiB,EACjB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,oCAAoC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -4,10 +4,11 @@ export * from './types/capabilities.js';
|
|
|
4
4
|
export * from './types/events.js';
|
|
5
5
|
export * from './types/region.js';
|
|
6
6
|
export * from './types/session.js';
|
|
7
|
+
export * from './types/render-event.js';
|
|
7
8
|
export * from './types/thread.js';
|
|
8
9
|
// Live-channel contract payload types — SubscribePayload / AckPayload /
|
|
9
|
-
// StreamEnvelope /
|
|
10
|
-
//
|
|
10
|
+
// StreamEnvelope / etc. The WHAT each live-channel message carries,
|
|
11
|
+
// independent of how the wire frames it.
|
|
11
12
|
export * from './types/live-channel.js';
|
|
12
13
|
// WebSocket transport envelope (WebSocketMessage / WebSocketMessageType
|
|
13
14
|
// / ConnectionStatus) is NOT re-exported at root. Transport implementors
|
|
@@ -30,6 +31,7 @@ export { canonicalizeContracts, canonicalizeValue, } from './registry/canonicali
|
|
|
30
31
|
// import { blueprintKey } from '@ggui-ai/protocol/blueprint-key';
|
|
31
32
|
export { summarizeContract } from './registry/summarize-contract.js';
|
|
32
33
|
export * from './types/llm.js';
|
|
34
|
+
export * from './types/llm-route.js';
|
|
33
35
|
export * from './types/openrouter-models.js';
|
|
34
36
|
export * from './types/interface-context.js';
|
|
35
37
|
export * from './types/host-context.js';
|
|
@@ -48,7 +50,6 @@ export * from './schemas/ops-blueprint.js';
|
|
|
48
50
|
export * from './types/contract-inference.js';
|
|
49
51
|
export * from './types/gadget.js';
|
|
50
52
|
export * from './types/app-config.js';
|
|
51
|
-
export * from './navigation/index.js';
|
|
52
53
|
export * from './iframe-bridge.js';
|
|
53
54
|
export * from './envelope-adapters.js';
|
|
54
55
|
export * from './envelopes/builders.js';
|