@langchain/langgraph-api 1.1.17 → 1.2.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/dist/api/protocol.d.mts +7 -0
- package/dist/api/protocol.mjs +157 -0
- package/dist/api/runs.mjs +15 -4
- package/dist/command.mjs +1 -1
- package/dist/experimental/embed/constants.d.mts +3 -0
- package/dist/experimental/embed/constants.mjs +11 -0
- package/dist/experimental/embed/protocol.d.mts +9 -0
- package/dist/experimental/embed/protocol.mjs +453 -0
- package/dist/experimental/embed/runs.d.mts +8 -0
- package/dist/experimental/embed/runs.mjs +202 -0
- package/dist/experimental/embed/threads.d.mts +8 -0
- package/dist/experimental/embed/threads.mjs +151 -0
- package/dist/experimental/embed/types.d.mts +77 -0
- package/dist/experimental/embed/types.mjs +1 -0
- package/dist/experimental/embed/utils.d.mts +29 -0
- package/dist/experimental/embed/utils.mjs +62 -0
- package/dist/experimental/embed.d.mts +11 -31
- package/dist/experimental/embed.mjs +19 -399
- package/dist/graph/load.d.mts +2 -2
- package/dist/graph/load.utils.mjs +13 -3
- package/dist/protocol/constants.d.mts +7 -0
- package/dist/protocol/constants.mjs +7 -0
- package/dist/protocol/service.d.mts +101 -0
- package/dist/protocol/service.mjs +568 -0
- package/dist/protocol/session/event-normalizers.d.mts +52 -0
- package/dist/protocol/session/event-normalizers.mjs +162 -0
- package/dist/protocol/session/index.d.mts +261 -0
- package/dist/protocol/session/index.mjs +826 -0
- package/dist/protocol/session/internal-types.d.mts +67 -0
- package/dist/protocol/session/internal-types.mjs +28 -0
- package/dist/protocol/session/metadata.d.mts +24 -0
- package/dist/protocol/session/metadata.mjs +95 -0
- package/dist/protocol/session/namespace.d.mts +47 -0
- package/dist/protocol/session/namespace.mjs +62 -0
- package/dist/protocol/session/state-normalizers.d.mts +57 -0
- package/dist/protocol/session/state-normalizers.mjs +430 -0
- package/dist/protocol/session/tool-calls.d.mts +27 -0
- package/dist/protocol/session/tool-calls.mjs +59 -0
- package/dist/protocol/types.d.mts +121 -0
- package/dist/protocol/types.mjs +1 -0
- package/dist/queue.mjs +8 -2
- package/dist/schemas.d.mts +58 -58
- package/dist/semver/index.mjs +19 -1
- package/dist/server.mjs +22 -3
- package/dist/state.mjs +1 -1
- package/dist/storage/ops.mjs +17 -5
- package/dist/storage/persist.mjs +1 -1
- package/dist/storage/types.d.mts +10 -1
- package/dist/stream.d.mts +25 -4
- package/dist/stream.mjs +203 -11
- package/dist/utils/serde.mjs +1 -1
- package/package.json +16 -14
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { AgentStatus, MessageMetadata, Namespace, ProtocolEventByMethod, SupportedChannel, UpdatesEvent } from "../types.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* Scalar metadata values that can be forwarded directly in protocol events.
|
|
4
|
+
*/
|
|
5
|
+
export type ProtocolMetadataScalar = string | number | boolean | null;
|
|
6
|
+
/**
|
|
7
|
+
* Concise message metadata shape exposed to protocol clients.
|
|
8
|
+
*/
|
|
9
|
+
export type ProtocolCompatibleMessageMetadata = MessageMetadata & Record<string, ProtocolMetadataScalar>;
|
|
10
|
+
/**
|
|
11
|
+
* Subscription state tracked for each connected client.
|
|
12
|
+
*/
|
|
13
|
+
export type SubscriptionChannel = SupportedChannel | `custom:${string}`;
|
|
14
|
+
export type Subscription = {
|
|
15
|
+
id: string;
|
|
16
|
+
channels: Set<SubscriptionChannel>;
|
|
17
|
+
namespaces?: Namespace[];
|
|
18
|
+
depth?: number;
|
|
19
|
+
active: boolean;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Cached lifecycle information for a namespace in the agent tree.
|
|
23
|
+
*/
|
|
24
|
+
export type NamespaceInfo = {
|
|
25
|
+
namespace: Namespace;
|
|
26
|
+
status: AgentStatus;
|
|
27
|
+
graphName: string;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Normalized representation of an updates payload emitted by the run stream.
|
|
31
|
+
*/
|
|
32
|
+
export type NormalizedUpdatesData = {
|
|
33
|
+
node?: string;
|
|
34
|
+
values: UpdatesEvent["params"]["data"]["values"];
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Mapping between supported event methods and their payload shapes.
|
|
38
|
+
*/
|
|
39
|
+
export type ProtocolEventDataMap = {
|
|
40
|
+
values: ProtocolEventByMethod<"values">["params"]["data"];
|
|
41
|
+
updates: ProtocolEventByMethod<"updates">["params"]["data"] | UpdatesEvent["params"]["data"]["values"];
|
|
42
|
+
checkpoints: ProtocolEventByMethod<"checkpoints">["params"]["data"];
|
|
43
|
+
messages: ProtocolEventByMethod<"messages">["params"]["data"];
|
|
44
|
+
tools: ProtocolEventByMethod<"tools">["params"]["data"];
|
|
45
|
+
custom: ProtocolEventByMethod<"custom">["params"]["data"];
|
|
46
|
+
lifecycle: ProtocolEventByMethod<"lifecycle">["params"]["data"];
|
|
47
|
+
input: ProtocolEventByMethod<"input">["params"]["data"];
|
|
48
|
+
tasks: ProtocolEventByMethod<"tasks">["params"]["data"];
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Channel names supported by the run-scoped protocol session.
|
|
52
|
+
*/
|
|
53
|
+
export declare const SUPPORTED_CHANNELS: Set<SupportedChannel>;
|
|
54
|
+
/**
|
|
55
|
+
* Checks whether a value is a non-null object record.
|
|
56
|
+
*
|
|
57
|
+
* @param value - Candidate value to inspect.
|
|
58
|
+
* @returns Whether the value can be treated as a keyed object.
|
|
59
|
+
*/
|
|
60
|
+
export declare const isRecord: (value: unknown) => value is Record<string, unknown>;
|
|
61
|
+
/**
|
|
62
|
+
* Checks whether a channel name is supported by the session transport.
|
|
63
|
+
*
|
|
64
|
+
* @param value - Raw channel name.
|
|
65
|
+
* @returns Whether the name matches a supported protocol channel.
|
|
66
|
+
*/
|
|
67
|
+
export declare const isSupportedChannel: (value: string) => value is SupportedChannel;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Channel names supported by the run-scoped protocol session.
|
|
3
|
+
*/
|
|
4
|
+
export const SUPPORTED_CHANNELS = new Set([
|
|
5
|
+
"values",
|
|
6
|
+
"updates",
|
|
7
|
+
"checkpoints",
|
|
8
|
+
"messages",
|
|
9
|
+
"tools",
|
|
10
|
+
"custom",
|
|
11
|
+
"lifecycle",
|
|
12
|
+
"input",
|
|
13
|
+
"tasks",
|
|
14
|
+
]);
|
|
15
|
+
/**
|
|
16
|
+
* Checks whether a value is a non-null object record.
|
|
17
|
+
*
|
|
18
|
+
* @param value - Candidate value to inspect.
|
|
19
|
+
* @returns Whether the value can be treated as a keyed object.
|
|
20
|
+
*/
|
|
21
|
+
export const isRecord = (value) => typeof value === "object" && value !== null;
|
|
22
|
+
/**
|
|
23
|
+
* Checks whether a channel name is supported by the session transport.
|
|
24
|
+
*
|
|
25
|
+
* @param value - Raw channel name.
|
|
26
|
+
* @returns Whether the name matches a supported protocol channel.
|
|
27
|
+
*/
|
|
28
|
+
export const isSupportedChannel = (value) => SUPPORTED_CHANNELS.has(value);
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Namespace } from "../types.mjs";
|
|
2
|
+
import { type ProtocolCompatibleMessageMetadata, type ProtocolMetadataScalar } from "./internal-types.mjs";
|
|
3
|
+
/**
|
|
4
|
+
* Checks whether a metadata field can be sent as-is in protocol events.
|
|
5
|
+
*
|
|
6
|
+
* @param value - Candidate metadata value.
|
|
7
|
+
* @returns Whether the value is a supported scalar.
|
|
8
|
+
*/
|
|
9
|
+
export declare const isMetadataScalar: (value: unknown) => value is ProtocolMetadataScalar;
|
|
10
|
+
/**
|
|
11
|
+
* Extracts concise protocol-facing message metadata from a raw payload.
|
|
12
|
+
*
|
|
13
|
+
* @param value - Message-like payload or metadata wrapper.
|
|
14
|
+
* @returns Normalized protocol metadata when at least one supported field
|
|
15
|
+
* exists.
|
|
16
|
+
*/
|
|
17
|
+
export declare const toProtocolMessageMetadata: (value: unknown) => ProtocolCompatibleMessageMetadata | undefined;
|
|
18
|
+
/**
|
|
19
|
+
* Derives a namespace from checkpoint metadata attached to a message payload.
|
|
20
|
+
*
|
|
21
|
+
* @param value - Message-like payload or metadata wrapper.
|
|
22
|
+
* @returns Namespace segments when checkpoint metadata is present.
|
|
23
|
+
*/
|
|
24
|
+
export declare const toProtocolMessageNamespace: (value: unknown) => Namespace | undefined;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { isRecord, } from "./internal-types.mjs";
|
|
2
|
+
const PROTOCOL_METADATA_KEY_MAP = {
|
|
3
|
+
provider: ["provider", "ls_provider"],
|
|
4
|
+
model: ["model", "model_name", "ls_model_name"],
|
|
5
|
+
modelType: ["modelType", "model_type", "ls_model_type"],
|
|
6
|
+
runId: ["runId", "run_id"],
|
|
7
|
+
threadId: ["threadId", "thread_id"],
|
|
8
|
+
systemFingerprint: ["systemFingerprint", "system_fingerprint"],
|
|
9
|
+
serviceTier: ["serviceTier", "service_tier"],
|
|
10
|
+
};
|
|
11
|
+
const PROTOCOL_METADATA_SOURCE_KEYS = new Set(Object.values(PROTOCOL_METADATA_KEY_MAP).flat());
|
|
12
|
+
const PROTOCOL_METADATA_EXCLUDED_KEYS = new Set([
|
|
13
|
+
"assistant_id",
|
|
14
|
+
"checkpoint_ns",
|
|
15
|
+
"created_by",
|
|
16
|
+
"graph_id",
|
|
17
|
+
"langgraph_api_url",
|
|
18
|
+
"langgraph_checkpoint_ns",
|
|
19
|
+
"langgraph_host",
|
|
20
|
+
"langgraph_node",
|
|
21
|
+
"langgraph_path",
|
|
22
|
+
"langgraph_plan",
|
|
23
|
+
"langgraph_step",
|
|
24
|
+
"langgraph_triggers",
|
|
25
|
+
"langgraph_version",
|
|
26
|
+
"ls_integration",
|
|
27
|
+
"run_attempt",
|
|
28
|
+
"tags",
|
|
29
|
+
"versions",
|
|
30
|
+
"__pregel_task_id",
|
|
31
|
+
]);
|
|
32
|
+
/**
|
|
33
|
+
* Checks whether a metadata field can be sent as-is in protocol events.
|
|
34
|
+
*
|
|
35
|
+
* @param value - Candidate metadata value.
|
|
36
|
+
* @returns Whether the value is a supported scalar.
|
|
37
|
+
*/
|
|
38
|
+
export const isMetadataScalar = (value) => value === null ||
|
|
39
|
+
typeof value === "string" ||
|
|
40
|
+
typeof value === "number" ||
|
|
41
|
+
typeof value === "boolean";
|
|
42
|
+
/**
|
|
43
|
+
* Extracts concise protocol-facing message metadata from a raw payload.
|
|
44
|
+
*
|
|
45
|
+
* @param value - Message-like payload or metadata wrapper.
|
|
46
|
+
* @returns Normalized protocol metadata when at least one supported field
|
|
47
|
+
* exists.
|
|
48
|
+
*/
|
|
49
|
+
export const toProtocolMessageMetadata = (value) => {
|
|
50
|
+
if (!isRecord(value))
|
|
51
|
+
return undefined;
|
|
52
|
+
const metadata = isRecord(value.metadata) ? value.metadata : value;
|
|
53
|
+
const concise = {};
|
|
54
|
+
for (const [targetKey, sourceKeys] of Object.entries(PROTOCOL_METADATA_KEY_MAP)) {
|
|
55
|
+
const mappedValue = sourceKeys
|
|
56
|
+
.map((sourceKey) => metadata[sourceKey])
|
|
57
|
+
.find((candidate) => isMetadataScalar(candidate));
|
|
58
|
+
if (mappedValue !== undefined) {
|
|
59
|
+
concise[targetKey] = mappedValue;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
for (const [key, rawValue] of Object.entries(metadata)) {
|
|
63
|
+
if (key in PROTOCOL_METADATA_KEY_MAP ||
|
|
64
|
+
PROTOCOL_METADATA_SOURCE_KEYS.has(key) ||
|
|
65
|
+
PROTOCOL_METADATA_EXCLUDED_KEYS.has(key) ||
|
|
66
|
+
key.startsWith("langgraph_") ||
|
|
67
|
+
key.startsWith("__pregel_") ||
|
|
68
|
+
key.startsWith("checkpoint_")) {
|
|
69
|
+
continue;
|
|
70
|
+
}
|
|
71
|
+
if (isMetadataScalar(rawValue)) {
|
|
72
|
+
concise[key] = rawValue;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return Object.keys(concise).length > 0 ? concise : undefined;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Derives a namespace from checkpoint metadata attached to a message payload.
|
|
79
|
+
*
|
|
80
|
+
* @param value - Message-like payload or metadata wrapper.
|
|
81
|
+
* @returns Namespace segments when checkpoint metadata is present.
|
|
82
|
+
*/
|
|
83
|
+
export const toProtocolMessageNamespace = (value) => {
|
|
84
|
+
if (!isRecord(value))
|
|
85
|
+
return undefined;
|
|
86
|
+
const metadata = isRecord(value.metadata) ? value.metadata : value;
|
|
87
|
+
const checkpointNs = typeof metadata.langgraph_checkpoint_ns === "string"
|
|
88
|
+
? metadata.langgraph_checkpoint_ns
|
|
89
|
+
: typeof metadata.checkpoint_ns === "string"
|
|
90
|
+
? metadata.checkpoint_ns
|
|
91
|
+
: undefined;
|
|
92
|
+
if (!checkpointNs)
|
|
93
|
+
return undefined;
|
|
94
|
+
return checkpointNs.split("|").filter((segment) => segment.length > 0);
|
|
95
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { Namespace } from "../types.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* Converts a namespace array into a stable internal lookup key.
|
|
4
|
+
*
|
|
5
|
+
* @param namespace - Namespace segments to encode.
|
|
6
|
+
* @returns A string key that preserves segment boundaries.
|
|
7
|
+
*/
|
|
8
|
+
export declare const toNamespaceKey: (namespace: Namespace) => string;
|
|
9
|
+
/**
|
|
10
|
+
* Strips dynamic suffixes from a namespace segment for display purposes.
|
|
11
|
+
*
|
|
12
|
+
* @param segment - Raw namespace segment.
|
|
13
|
+
* @returns The stable graph-oriented portion of the segment.
|
|
14
|
+
*/
|
|
15
|
+
export declare const normalizeNamespaceSegment: (segment: string) => string;
|
|
16
|
+
/**
|
|
17
|
+
* Preserves raw namespace segments in protocol events.
|
|
18
|
+
*
|
|
19
|
+
* @param namespace - Namespace segments parsed from the source event.
|
|
20
|
+
* @returns The namespace exactly as it should be exposed to clients.
|
|
21
|
+
*/
|
|
22
|
+
export declare const normalizeNamespace: (namespace: string[]) => Namespace;
|
|
23
|
+
/**
|
|
24
|
+
* Splits a stream event name into its method and namespace components.
|
|
25
|
+
*
|
|
26
|
+
* @param event - Raw event name emitted by the source stream.
|
|
27
|
+
* @returns The parsed method plus namespace segments.
|
|
28
|
+
*/
|
|
29
|
+
export declare const parseEventName: (event: string) => {
|
|
30
|
+
method: string;
|
|
31
|
+
namespace: string[];
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Checks whether a namespace starts with a requested prefix.
|
|
35
|
+
*
|
|
36
|
+
* @param namespace - Event namespace to test.
|
|
37
|
+
* @param prefix - Subscription namespace prefix.
|
|
38
|
+
* @returns Whether the namespace matches the prefix semantics.
|
|
39
|
+
*/
|
|
40
|
+
export declare const isPrefixMatch: (namespace: Namespace, prefix: Namespace) => boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Guesses a human-readable graph name from a namespace.
|
|
43
|
+
*
|
|
44
|
+
* @param namespace - Namespace segments for a graph or subgraph.
|
|
45
|
+
* @returns The derived graph name, or `root` when no segments exist.
|
|
46
|
+
*/
|
|
47
|
+
export declare const guessGraphName: (namespace: Namespace) => string;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts a namespace array into a stable internal lookup key.
|
|
3
|
+
*
|
|
4
|
+
* @param namespace - Namespace segments to encode.
|
|
5
|
+
* @returns A string key that preserves segment boundaries.
|
|
6
|
+
*/
|
|
7
|
+
export const toNamespaceKey = (namespace) => namespace.join("\0");
|
|
8
|
+
/**
|
|
9
|
+
* Strips dynamic suffixes from a namespace segment for display purposes.
|
|
10
|
+
*
|
|
11
|
+
* @param segment - Raw namespace segment.
|
|
12
|
+
* @returns The stable graph-oriented portion of the segment.
|
|
13
|
+
*/
|
|
14
|
+
export const normalizeNamespaceSegment = (segment) => segment.split(":")[0];
|
|
15
|
+
/**
|
|
16
|
+
* Preserves raw namespace segments in protocol events.
|
|
17
|
+
*
|
|
18
|
+
* @param namespace - Namespace segments parsed from the source event.
|
|
19
|
+
* @returns The namespace exactly as it should be exposed to clients.
|
|
20
|
+
*/
|
|
21
|
+
export const normalizeNamespace = (namespace) => namespace;
|
|
22
|
+
/**
|
|
23
|
+
* Splits a stream event name into its method and namespace components.
|
|
24
|
+
*
|
|
25
|
+
* @param event - Raw event name emitted by the source stream.
|
|
26
|
+
* @returns The parsed method plus namespace segments.
|
|
27
|
+
*/
|
|
28
|
+
export const parseEventName = (event) => {
|
|
29
|
+
const [method, ...namespace] = event.split("|");
|
|
30
|
+
return { method, namespace };
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* Checks whether a namespace starts with a requested prefix.
|
|
34
|
+
*
|
|
35
|
+
* @param namespace - Event namespace to test.
|
|
36
|
+
* @param prefix - Subscription namespace prefix.
|
|
37
|
+
* @returns Whether the namespace matches the prefix semantics.
|
|
38
|
+
*/
|
|
39
|
+
export const isPrefixMatch = (namespace, prefix) => {
|
|
40
|
+
if (prefix.length > namespace.length)
|
|
41
|
+
return false;
|
|
42
|
+
return prefix.every((segment, index) => {
|
|
43
|
+
const candidate = namespace[index];
|
|
44
|
+
if (candidate === segment)
|
|
45
|
+
return true;
|
|
46
|
+
if (segment.includes(":"))
|
|
47
|
+
return false;
|
|
48
|
+
return normalizeNamespaceSegment(candidate) === segment;
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Guesses a human-readable graph name from a namespace.
|
|
53
|
+
*
|
|
54
|
+
* @param namespace - Namespace segments for a graph or subgraph.
|
|
55
|
+
* @returns The derived graph name, or `root` when no segments exist.
|
|
56
|
+
*/
|
|
57
|
+
export const guessGraphName = (namespace) => {
|
|
58
|
+
const last = namespace.at(-1);
|
|
59
|
+
if (last == null)
|
|
60
|
+
return "root";
|
|
61
|
+
return normalizeNamespaceSegment(last);
|
|
62
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { ContentBlockStartData, UpdatesEvent } from "../types.mjs";
|
|
2
|
+
export declare const normalizeProtocolContentBlock: (value: unknown) => ContentBlockStartData["content"] | undefined;
|
|
3
|
+
export declare const normalizeProtocolMessageContent: (content: unknown, options?: {
|
|
4
|
+
additionalKwargs?: Record<string, unknown>;
|
|
5
|
+
}) => unknown;
|
|
6
|
+
/**
|
|
7
|
+
* Normalizes protocol message type aliases into LangChain core message types.
|
|
8
|
+
*
|
|
9
|
+
* @param value - Raw message type.
|
|
10
|
+
* @returns The normalized message type, if recognized.
|
|
11
|
+
*/
|
|
12
|
+
export declare const normalizeProtocolStateMessageType: (value: unknown) => string | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Checks whether a value matches the message shape used in state payloads.
|
|
15
|
+
*
|
|
16
|
+
* @param value - Raw state value.
|
|
17
|
+
* @returns Whether the value is a protocol-state message object.
|
|
18
|
+
*/
|
|
19
|
+
export declare const isProtocolStateMessage: (value: unknown) => value is Record<string, unknown>;
|
|
20
|
+
/**
|
|
21
|
+
* Normalizes invalid tool calls embedded in serialized AI messages.
|
|
22
|
+
*
|
|
23
|
+
* @param value - Raw invalid tool call list.
|
|
24
|
+
* @returns Normalized invalid tool calls.
|
|
25
|
+
*/
|
|
26
|
+
export declare const normalizeProtocolStateInvalidToolCalls: (value: unknown) => Record<string, unknown>[];
|
|
27
|
+
/**
|
|
28
|
+
* Normalizes tool calls embedded in serialized AI messages.
|
|
29
|
+
*
|
|
30
|
+
* @param value - Raw tool call list.
|
|
31
|
+
* @returns Normalized valid and invalid tool call arrays.
|
|
32
|
+
*/
|
|
33
|
+
export declare const normalizeProtocolStateToolCalls: (value: unknown) => {
|
|
34
|
+
toolCalls: Record<string, unknown>[];
|
|
35
|
+
invalidToolCalls: Record<string, unknown>[];
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Normalizes a single message embedded in protocol state payloads.
|
|
39
|
+
*
|
|
40
|
+
* @param value - Raw message object.
|
|
41
|
+
* @returns The normalized message shape.
|
|
42
|
+
*/
|
|
43
|
+
export declare const normalizeProtocolStateMessage: (value: Record<string, unknown>) => Record<string, unknown>;
|
|
44
|
+
/**
|
|
45
|
+
* Recursively normalizes protocol state payloads before they are emitted.
|
|
46
|
+
*
|
|
47
|
+
* @param value - Raw state payload.
|
|
48
|
+
* @returns The normalized state payload.
|
|
49
|
+
*/
|
|
50
|
+
export declare const normalizeProtocolStatePayload: (value: unknown) => unknown;
|
|
51
|
+
/**
|
|
52
|
+
* Coerces arbitrary update payloads into the protocol values shape.
|
|
53
|
+
*
|
|
54
|
+
* @param value - Raw update payload.
|
|
55
|
+
* @returns A valid updates values payload.
|
|
56
|
+
*/
|
|
57
|
+
export declare const asUpdateValues: (value: unknown) => UpdatesEvent["params"]["data"]["values"];
|