import type { SandboxEvent } from "@tangle-network/sandbox"; import type { AgentEnvironmentEvent } from "@tangle-network/agent-interface/environment-provider"; /** The sidecar sends this envelope when an SSE connection is ready. */ export declare function isSandboxConnectionMarker(event: SandboxEvent): boolean; /** * The session ids a Sandbox event carries, kept separate by field position. * * `runFrameSessionId` is `data.sessionId`/`data.sessionID`. The run/stream lane * copies that value straight from the backend adapter, so on `session.updated` * it is the harness-native session id (Claude, Codex, OpenCode) rather than the * runtime session id. * * `envelopeSessionId` is the `properties` and `properties.info` position of an * /agents/events frame, plus `properties.part` on a frame type that publishes a * part. The sidecar rewrites the backend's own ids to the runtime ids before it * publishes there, so that position names the runtime session on every frame * type it shapes. * * `sessionId` is the frame's own session id for a consumer that does not care * which position carried it: the run-frame position when present, otherwise the * envelope position. It repeats one of those two values and is never a third * one, so a caller that must know the position reads the position. */ export type SandboxEventIdentity = { executionId?: string; sessionId?: string; runFrameSessionId?: string; envelopeSessionId?: string; }; /** * The session ids a frame carries, one per field position. * * Every position that names a session is an assertion the frame makes about * itself, so each one is compared. Reducing them to a single precedence winner * leaves the losing position unchecked. */ export declare function carriedSessionIds(identity: SandboxEventIdentity): readonly string[]; /** Read identity from both run frames and /agents/events session envelopes. */ export declare function sandboxEventIdentity(event: SandboxEvent): SandboxEventIdentity; export declare function environmentEventFromSandboxEvent(event: SandboxEvent, expected?: { executionId?: string; sessionId?: string; streamBound?: boolean; }): AgentEnvironmentEvent;