@ggui-ai/iframe-runtime 0.13.0 → 0.15.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/channel-transport.d.ts +1 -1
- package/dist/channels/channel-payload.d.ts +1 -1
- package/dist/channels/data.d.ts +1 -1
- package/dist/channels/drain-ack.d.ts +1 -1
- package/dist/channels/props-update.d.ts +1 -1
- package/dist/channels/render-frame.d.ts +1 -1
- package/dist/compiled-validators.d.ts +1 -1
- package/dist/connection.d.ts +20 -0
- package/dist/connection.js +20 -0
- package/dist/context-observer.d.ts +1 -1
- package/dist/context-observer.js +1 -1
- package/dist/events-polling.d.ts +1 -1
- package/dist/host-context-emitter.d.ts +1 -1
- package/dist/host-context-emitter.js +1 -1
- package/dist/iframe-runtime.js +87 -85
- package/dist/iframe-runtime.meta.json +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/meta-parse.js +1 -1
- package/dist/observability.d.ts +149 -17
- package/dist/observability.js +59 -0
- package/dist/provisional-renderer.d.ts +1 -1
- package/dist/react-renderer.d.ts +2 -5
- package/dist/react-renderer.js +20 -4
- package/dist/registry-subscribe.d.ts +1 -1
- package/dist/render-item.d.ts +2 -6
- package/dist/runtime-telemetry.js +1 -1
- package/dist/runtime.d.ts +44 -17
- package/dist/runtime.js +339 -82
- package/dist/types.d.ts +1 -1
- package/dist/validation.d.ts +1 -1
- package/dist/validation.js +1 -1
- package/dist/wire-config.d.ts +1 -1
- package/dist/wire-config.js +9 -3
- package/package.json +15 -10
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
* un-routed channel posture pre-1c, where any payload that landed on the
|
|
53
53
|
* data frame was treated as authoritative).
|
|
54
54
|
*/
|
|
55
|
-
import type { JsonObject, JsonValue, StreamSpec } from '@ggui-ai/protocol';
|
|
55
|
+
import type { JsonObject, JsonValue, StreamSpec } from '@ggui-ai/protocol/wire';
|
|
56
56
|
import type { WebSocketMessage } from '@ggui-ai/protocol/transport/websocket';
|
|
57
57
|
import type { ChannelPollDegradedEvent, ChannelPollRecoveredEvent, ChannelTransportFallbackEvent, ChannelTransportPickedEvent, ChannelTransportResubscribedEvent } from './observability.js';
|
|
58
58
|
import type { StreamBus } from './wire-config.js';
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* extraction.
|
|
12
12
|
*/
|
|
13
13
|
import type { ChannelHandler } from '@ggui-ai/live-channel';
|
|
14
|
-
import type { ChannelErrorPayload, ChannelPayloadFrame } from '@ggui-ai/protocol';
|
|
14
|
+
import type { ChannelErrorPayload, ChannelPayloadFrame } from '@ggui-ai/protocol/wire';
|
|
15
15
|
import type { ChannelTransportRouter } from '../channel-transport.js';
|
|
16
16
|
export interface ChannelRouterHandlerDeps {
|
|
17
17
|
readonly getChannelTransport: () => ChannelTransportRouter;
|
package/dist/channels/data.d.ts
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* render, so the lookup is direct.
|
|
12
12
|
*/
|
|
13
13
|
import type { ChannelHandler } from '@ggui-ai/live-channel';
|
|
14
|
-
import type { GguiSession, StreamEnvelope } from '@ggui-ai/protocol';
|
|
14
|
+
import type { GguiSession, StreamEnvelope } from '@ggui-ai/protocol/wire';
|
|
15
15
|
import type { GguiSessionSeedInput } from '../types.js';
|
|
16
16
|
import { type RendererValidatorContext } from '../validation.js';
|
|
17
17
|
import type { StreamBus } from '../wire-config.js';
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* frame arrives on the wire.
|
|
7
7
|
*/
|
|
8
8
|
import type { ChannelHandler } from '@ggui-ai/live-channel';
|
|
9
|
-
import type { DrainAckPayload } from '@ggui-ai/protocol';
|
|
9
|
+
import type { DrainAckPayload } from '@ggui-ai/protocol/wire';
|
|
10
10
|
export interface DrainAckHandlerDeps {
|
|
11
11
|
readonly dispatch: (payload: DrainAckPayload) => void;
|
|
12
12
|
}
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
* `PollingTransport` dispatches.
|
|
30
30
|
*/
|
|
31
31
|
import type { ChannelHandler } from '@ggui-ai/live-channel';
|
|
32
|
-
import type { PropsUpdatePayload, GguiSession } from '@ggui-ai/protocol';
|
|
32
|
+
import type { PropsUpdatePayload, GguiSession } from '@ggui-ai/protocol/wire';
|
|
33
33
|
import type { GguiSessionSeedInput } from '../types.js';
|
|
34
34
|
export interface PropsUpdateHandlerDeps {
|
|
35
35
|
/**
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
* happens. The boot-without-renderer path remains testable.
|
|
19
19
|
*/
|
|
20
20
|
import type { ChannelHandler } from '@ggui-ai/live-channel';
|
|
21
|
-
import type { RenderPayload, GguiSession } from '@ggui-ai/protocol';
|
|
21
|
+
import type { RenderPayload, GguiSession } from '@ggui-ai/protocol/wire';
|
|
22
22
|
import type { ChannelTransportRouter } from '../channel-transport.js';
|
|
23
23
|
import { type StatusRefs } from '../status-dom.js';
|
|
24
24
|
export interface RenderHandlerDeps {
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* {@link CompiledValidatorSet}.
|
|
13
13
|
*/
|
|
14
14
|
import type { CompiledContractValidators } from '@ggui-ai/protocol/integrations/mcp-apps';
|
|
15
|
-
import type { ValidateFunction } from '@ggui-ai/protocol';
|
|
15
|
+
import type { ValidateFunction } from '@ggui-ai/protocol/wire';
|
|
16
16
|
/**
|
|
17
17
|
* Precompiled validators for the active render's contract, keyed to
|
|
18
18
|
* match the four runtime-validated surfaces. `props` is a single
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The document's connection store (ggui#670) — the single in-document
|
|
3
|
+
* external store behind `useRender().isConnected`.
|
|
4
|
+
*
|
|
5
|
+
* One store per document, by design: the relay latch describes the
|
|
6
|
+
* HOST, not the render, and every mount in this document shares the
|
|
7
|
+
* host (there is exactly one boot per document; re-mounts inherit it).
|
|
8
|
+
* The runtime is the only writer, through `transitionRelayLatch` in
|
|
9
|
+
* `runtime.ts` — the latch's two edges are the only transitions. Lives
|
|
10
|
+
* re-exported here so the runtime's writer sites name one local
|
|
11
|
+
* module; the store itself is wire's package singleton (the wire docs
|
|
12
|
+
* generator prints every WireConfig member into the prompt, so the
|
|
13
|
+
* store is deliberately NOT a config member).
|
|
14
|
+
*
|
|
15
|
+
* Not a reserved stream channel: nothing on the wire can reach it
|
|
16
|
+
* (SPEC §4.4 forbids renderer-authored `_ggui:*` deliveries, and a
|
|
17
|
+
* registered-but-ungated channel would have been a forgery path — the
|
|
18
|
+
* adversarial pass on ggui#670).
|
|
19
|
+
*/
|
|
20
|
+
export { connectionStore } from '@ggui-ai/wire';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The document's connection store (ggui#670) — the single in-document
|
|
3
|
+
* external store behind `useRender().isConnected`.
|
|
4
|
+
*
|
|
5
|
+
* One store per document, by design: the relay latch describes the
|
|
6
|
+
* HOST, not the render, and every mount in this document shares the
|
|
7
|
+
* host (there is exactly one boot per document; re-mounts inherit it).
|
|
8
|
+
* The runtime is the only writer, through `transitionRelayLatch` in
|
|
9
|
+
* `runtime.ts` — the latch's two edges are the only transitions. Lives
|
|
10
|
+
* re-exported here so the runtime's writer sites name one local
|
|
11
|
+
* module; the store itself is wire's package singleton (the wire docs
|
|
12
|
+
* generator prints every WireConfig member into the prompt, so the
|
|
13
|
+
* store is deliberately NOT a config member).
|
|
14
|
+
*
|
|
15
|
+
* Not a reserved stream channel: nothing on the wire can reach it
|
|
16
|
+
* (SPEC §4.4 forbids renderer-authored `_ggui:*` deliveries, and a
|
|
17
|
+
* registered-but-ungated channel would have been a forgery path — the
|
|
18
|
+
* adversarial pass on ggui#670).
|
|
19
|
+
*/
|
|
20
|
+
export { connectionStore } from '@ggui-ai/wire';
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
* `console.warn` and drop silently in production (per Q4 design lock).
|
|
44
44
|
*/
|
|
45
45
|
import type { Context, ReactElement, ReactNode } from 'react';
|
|
46
|
-
import type { JsonSchema } from '@ggui-ai/protocol';
|
|
46
|
+
import type { JsonSchema } from '@ggui-ai/protocol/wire';
|
|
47
47
|
import type { GguiContextRegistry } from './globals.js';
|
|
48
48
|
/**
|
|
49
49
|
* Wire-shape entry for a single contextSpec slot, mirrored from
|
package/dist/context-observer.js
CHANGED
package/dist/events-polling.d.ts
CHANGED
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
* fallback, and live updates.
|
|
49
49
|
*/
|
|
50
50
|
import type { RegistryPollingOptions } from '@ggui-ai/live-channel';
|
|
51
|
-
import type { GguiRuntimePullInput } from '@ggui-ai/protocol';
|
|
51
|
+
import type { GguiRuntimePullInput } from '@ggui-ai/protocol/wire';
|
|
52
52
|
/**
|
|
53
53
|
* Shared, monotonic event-ledger cursor for the failover ladder.
|
|
54
54
|
*
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
* happens in one place.
|
|
54
54
|
*/
|
|
55
55
|
import { type App } from '@modelcontextprotocol/ext-apps';
|
|
56
|
-
import { type HostContextObservedPayload, type HostContextProjection } from '@ggui-ai/protocol';
|
|
56
|
+
import { type HostContextObservedPayload, type HostContextProjection } from '@ggui-ai/protocol/wire';
|
|
57
57
|
/**
|
|
58
58
|
* Function the emitter calls to ship a `host_context_observed` envelope.
|
|
59
59
|
* Wired by `bootProduction` to the live WS transport's `send` —
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
* happens in one place.
|
|
54
54
|
*/
|
|
55
55
|
import { applyDocumentTheme, applyHostFonts, applyHostStyleVariables, } from '@modelcontextprotocol/ext-apps';
|
|
56
|
-
import { hostContextProjectionsEqual, projectHostContext, } from '@ggui-ai/protocol';
|
|
56
|
+
import { hostContextProjectionsEqual, projectHostContext, } from '@ggui-ai/protocol/wire';
|
|
57
57
|
let state = null;
|
|
58
58
|
// =============================================================================
|
|
59
59
|
// Public surface
|