@valerypopoff/rivet2-core 2.1.4 → 2.1.6
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/cjs/bundle.cjs +6651 -1022
- package/dist/cjs/bundle.cjs.map +4 -4
- package/dist/cjs/webAppRuntime.cjs +733 -19
- package/dist/cjs/webAppRuntime.cjs.map +3 -3
- package/dist/esm/api/createProcessor.js +6 -1
- package/dist/esm/exports.js +7 -0
- package/dist/esm/integrations/KnowledgeStore.js +1 -0
- package/dist/esm/integrations/KnowledgeStoreProvider.js +292 -0
- package/dist/esm/integrations/KnowledgeStoreValidation.js +428 -0
- package/dist/esm/integrations/ManagedKnowledgeStore.js +539 -0
- package/dist/esm/model/DataValue.js +22 -2
- package/dist/esm/model/GraphBoundaryEffects.js +13 -0
- package/dist/esm/model/GraphProcessor.js +1141 -82
- package/dist/esm/model/ManagedAsyncBranches.js +28 -0
- package/dist/esm/model/Nodes.js +27 -0
- package/dist/esm/model/ProcessContextBuilder.js +2 -1
- package/dist/esm/model/RecordingPlayer.js +9 -0
- package/dist/esm/model/StoredValueStore.js +226 -0
- package/dist/esm/model/SubprocessorBridge.js +50 -19
- package/dist/esm/model/ToolCallContinuation.js +1 -0
- package/dist/esm/model/UiGraph.js +52 -2
- package/dist/esm/model/UiGraphActionProtocol.js +10 -1
- package/dist/esm/model/UiGraphBrowserRuntime.js +444 -0
- package/dist/esm/model/UiGraphNormalization.js +35 -185
- package/dist/esm/model/UiGraphRendererStyles.js +878 -78
- package/dist/esm/model/UiGraphRuntimeModel.js +255 -15
- package/dist/esm/model/UiGraphSchema.js +91 -0
- package/dist/esm/model/UiGraphWebAppStorage.js +1 -0
- package/dist/esm/model/chat/chatMessages.js +5 -9
- package/dist/esm/model/chat/openAIChatRequest.js +8 -2
- package/dist/esm/model/chat-v2/chatV2Errors.js +36 -3
- package/dist/esm/model/chat-v2/chatV2RuntimeOptions.js +8 -8
- package/dist/esm/model/chat-v2/index.js +1 -0
- package/dist/esm/model/chat-v2/llmChatV2NodeEditors.js +3 -1
- package/dist/esm/model/chat-v2/parallelToolCalls.js +38 -0
- package/dist/esm/model/chat-v2/toolContinuation.js +45 -8
- package/dist/esm/model/chat-v2/toolContinuationConnection.js +68 -0
- package/dist/esm/model/nodes/BuildKnowledgeContextNode.js +157 -0
- package/dist/esm/model/nodes/DelegateFunctionCallNode.js +12 -40
- package/dist/esm/model/nodes/GetKnowledgeSourceStatusNode.js +79 -0
- package/dist/esm/model/nodes/GetStoredValueNode.js +109 -0
- package/dist/esm/model/nodes/KnowledgeDocumentNode.js +88 -0
- package/dist/esm/model/nodes/KnowledgeSourceNode.js +94 -0
- package/dist/esm/model/nodes/LLMChatV2Node.js +17 -1
- package/dist/esm/model/nodes/MatchNode.js +7 -7
- package/dist/esm/model/nodes/SearchKnowledgeNode.js +127 -0
- package/dist/esm/model/nodes/SetStoredValueNode.js +84 -0
- package/dist/esm/model/nodes/StartBackgroundBranchNode.js +59 -0
- package/dist/esm/model/nodes/StoredValueNodeUtils.js +57 -0
- package/dist/esm/model/nodes/SyncKnowledgeSourceNode.js +149 -0
- package/dist/esm/model/nodes/ToolNode.js +14 -0
- package/dist/esm/model/nodes/toolCallDelegation.js +44 -1
- package/dist/esm/plugins/pinecone/PineconeKnowledgeStore.js +553 -0
- package/dist/esm/plugins/pinecone/plugin.js +32 -0
- package/dist/esm/recording/ExecutionRecorder.js +1 -0
- package/dist/esm/utils/coerceType.js +27 -2
- package/dist/esm/utils/getPluginConfig.js +12 -6
- package/dist/esm/utils/serialization/serialization.js +4 -1
- package/dist/esm/utils/serialization/serializationUtils.js +59 -1
- package/dist/esm/webAppRuntime.js +3 -3
- package/dist/types/api/createProcessor.d.ts +6 -0
- package/dist/types/exports.d.ts +7 -0
- package/dist/types/integrations/KnowledgeStore.d.ts +131 -0
- package/dist/types/integrations/KnowledgeStoreProvider.d.ts +46 -0
- package/dist/types/integrations/KnowledgeStoreValidation.d.ts +16 -0
- package/dist/types/integrations/ManagedKnowledgeStore.d.ts +57 -0
- package/dist/types/model/DataValue.d.ts +10 -3
- package/dist/types/model/EditorDefinition.d.ts +9 -2
- package/dist/types/model/ExecutorProtocol.d.ts +12 -0
- package/dist/types/model/GraphBoundaryEffects.d.ts +9 -1
- package/dist/types/model/GraphProcessor.d.ts +21 -2
- package/dist/types/model/ManagedAsyncBranches.d.ts +6 -0
- package/dist/types/model/Nodes.d.ts +11 -2
- package/dist/types/model/ProcessContext.d.ts +18 -0
- package/dist/types/model/ProcessContextBuilder.d.ts +2 -1
- package/dist/types/model/Project.d.ts +11 -0
- package/dist/types/model/StoredValueStore.d.ts +55 -0
- package/dist/types/model/SubprocessorBridge.d.ts +4 -2
- package/dist/types/model/ToolCallContinuation.d.ts +13 -0
- package/dist/types/model/UiGraph.d.ts +24 -1
- package/dist/types/model/UiGraphActionProtocol.d.ts +2 -0
- package/dist/types/model/UiGraphBrowserRuntime.d.ts +75 -0
- package/dist/types/model/UiGraphRendererStyles.d.ts +2 -2
- package/dist/types/model/UiGraphRuntimeModel.d.ts +22 -3
- package/dist/types/model/UiGraphSchema.d.ts +113 -0
- package/dist/types/model/UiGraphWebAppStorage.d.ts +3 -0
- package/dist/types/model/chat-v2/index.d.ts +1 -0
- package/dist/types/model/chat-v2/parallelToolCalls.d.ts +9 -0
- package/dist/types/model/chat-v2/toolContinuation.d.ts +1 -0
- package/dist/types/model/chat-v2/toolContinuationConnection.d.ts +28 -0
- package/dist/types/model/nodes/BuildKnowledgeContextNode.d.ts +23 -0
- package/dist/types/model/nodes/GetKnowledgeSourceStatusNode.d.ts +19 -0
- package/dist/types/model/nodes/GetStoredValueNode.d.ts +25 -0
- package/dist/types/model/nodes/KnowledgeDocumentNode.d.ts +26 -0
- package/dist/types/model/nodes/KnowledgeSourceNode.d.ts +25 -0
- package/dist/types/model/nodes/SearchKnowledgeNode.d.ts +25 -0
- package/dist/types/model/nodes/SetStoredValueNode.d.ts +23 -0
- package/dist/types/model/nodes/StartBackgroundBranchNode.d.ts +14 -0
- package/dist/types/model/nodes/StoredValueNodeUtils.d.ts +5 -0
- package/dist/types/model/nodes/SyncKnowledgeSourceNode.d.ts +27 -0
- package/dist/types/model/nodes/ToolNode.d.ts +2 -0
- package/dist/types/model/nodes/toolCallDelegation.d.ts +4 -0
- package/dist/types/plugins/pinecone/PineconeKnowledgeStore.d.ts +11 -0
- package/dist/types/recording/RecordedEvents.d.ts +5 -0
- package/dist/types/utils/serialization/serializationUtils.d.ts +4 -0
- package/dist/types/webAppRuntime.d.ts +5 -4
- package/package.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { DEFAULT_LLM_CHAT_V2_RETRY_ON_NON_200_COOLDOWN_MS, DEFAULT_LLM_CHAT_V2_RETRY_ON_NON_200_REPEAT_TIMES, } from './chatV2Retry.js';
|
|
2
2
|
import { anthropicCacheControlTtlOptions, anthropicEffortOptions, anthropicThinkingModeOptions, chatV2ProviderOptions, getChatV2ModelOptions, googleThinkingLevelOptions, openAIReasoningEffortOptions, openAIWebSearchContextSizeOptions, } from './providerOptions.js';
|
|
3
|
+
import { LLM_CHAT_V2_PARALLEL_TOOL_CALLS_HELPER_MESSAGE, supportsLLMChatV2ParallelToolCalls, } from './parallelToolCalls.js';
|
|
3
4
|
const hideUnlessProvider = (provider) => (data) => data.provider !== provider;
|
|
4
5
|
function group(label, editors, defaultOpen) {
|
|
5
6
|
return {
|
|
@@ -380,7 +381,8 @@ function getToolEditors() {
|
|
|
380
381
|
type: 'toggle',
|
|
381
382
|
label: 'Allow parallel toolcalls',
|
|
382
383
|
dataKey: 'parallelToolCalls',
|
|
383
|
-
|
|
384
|
+
helperMessage: LLM_CHAT_V2_PARALLEL_TOOL_CALLS_HELPER_MESSAGE,
|
|
385
|
+
hideIf: (data) => !data.useToolCalling || !supportsLLMChatV2ParallelToolCalls(data.provider),
|
|
384
386
|
},
|
|
385
387
|
{
|
|
386
388
|
type: 'toggle',
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export const LLM_CHAT_V2_PARALLEL_TOOL_CALLS_HELPER_MESSAGE = 'Supported by OpenAI, Anthropic, and compatible Custom providers. Custom providers receive parallel_tool_calls only when enabled; otherwise their default applies unless Extra provider options supplies the field.';
|
|
2
|
+
export function supportsLLMChatV2ParallelToolCalls(provider) {
|
|
3
|
+
return provider === 'openai' || provider === 'anthropic' || provider === 'custom';
|
|
4
|
+
}
|
|
5
|
+
function mergeProviderOptions(providerOptions, provider, options) {
|
|
6
|
+
return {
|
|
7
|
+
...providerOptions,
|
|
8
|
+
[provider]: {
|
|
9
|
+
...(providerOptions?.[provider] ?? {}),
|
|
10
|
+
...options,
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export function applyLLMChatV2ParallelToolCallProviderOptions(params) {
|
|
15
|
+
const { provider, useToolCalling, parallelToolCalls, providerOptions } = params;
|
|
16
|
+
if (!useToolCalling) {
|
|
17
|
+
return providerOptions;
|
|
18
|
+
}
|
|
19
|
+
switch (provider) {
|
|
20
|
+
case 'openai':
|
|
21
|
+
return mergeProviderOptions(providerOptions, provider, {
|
|
22
|
+
parallelToolCalls: !!parallelToolCalls,
|
|
23
|
+
});
|
|
24
|
+
case 'anthropic':
|
|
25
|
+
return mergeProviderOptions(providerOptions, provider, {
|
|
26
|
+
disableParallelToolUse: !parallelToolCalls,
|
|
27
|
+
});
|
|
28
|
+
case 'custom':
|
|
29
|
+
// OpenAI-compatible endpoints vary widely. Do not send an unsupported
|
|
30
|
+
// field to existing/default Custom-provider graphs unless the user
|
|
31
|
+
// explicitly opts in to requesting parallel calls.
|
|
32
|
+
return parallelToolCalls
|
|
33
|
+
? mergeProviderOptions(providerOptions, provider, { parallel_tool_calls: true })
|
|
34
|
+
: providerOptions;
|
|
35
|
+
case 'google':
|
|
36
|
+
return providerOptions;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -5,6 +5,19 @@ function getToolNames(functions) {
|
|
|
5
5
|
function canAutoContinue(functionCalls, toolNames) {
|
|
6
6
|
return functionCalls.length > 0 && functionCalls.every((call) => toolNames.has(call.name));
|
|
7
7
|
}
|
|
8
|
+
function shouldReturnToolResultDirectly(functionCalls, functions) {
|
|
9
|
+
if (functionCalls.length !== 1) {
|
|
10
|
+
return false;
|
|
11
|
+
}
|
|
12
|
+
let tool;
|
|
13
|
+
for (const candidate of functions ?? []) {
|
|
14
|
+
if (candidate.name === functionCalls[0].name) {
|
|
15
|
+
// Provider tool maps use the last declaration for duplicate names.
|
|
16
|
+
tool = candidate;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return tool?.resultHandling === 'return-direct';
|
|
20
|
+
}
|
|
8
21
|
function addUsage(accumulated, usage) {
|
|
9
22
|
if (usage == null) {
|
|
10
23
|
return accumulated;
|
|
@@ -18,9 +31,7 @@ function addUsage(accumulated, usage) {
|
|
|
18
31
|
totalTokens: accumulated.totalTokens + usage.totalTokens,
|
|
19
32
|
cachedTokens: accumulated.cachedTokens + usage.cachedTokens,
|
|
20
33
|
reasoningTokens: accumulated.reasoningTokens + usage.reasoningTokens,
|
|
21
|
-
totalCost: accumulated.totalCost == null || usage.totalCost == null
|
|
22
|
-
? undefined
|
|
23
|
-
: accumulated.totalCost + usage.totalCost,
|
|
34
|
+
totalCost: accumulated.totalCost == null || usage.totalCost == null ? undefined : accumulated.totalCost + usage.totalCost,
|
|
24
35
|
};
|
|
25
36
|
}
|
|
26
37
|
function applyAccumulatedUsage(result, usage, outputUsage) {
|
|
@@ -64,7 +75,7 @@ function applyAccumulatedReasoning(result, reasoningRounds, outputReasoning) {
|
|
|
64
75
|
}
|
|
65
76
|
}
|
|
66
77
|
export async function runChatV2PipelineWithToolContinuation(options) {
|
|
67
|
-
const { autoContinue, maxToolRounds, functions, delegateToolCall, runPipeline = runChatV2Pipeline, ...pipelineOptions } = options;
|
|
78
|
+
const { autoContinue, maxToolRounds, functions, delegateToolCall, delegateToolCallRound, runPipeline = runChatV2Pipeline, ...pipelineOptions } = options;
|
|
68
79
|
const toolNames = getToolNames(functions);
|
|
69
80
|
const maxRounds = Math.max(1, Math.floor(Number.isFinite(maxToolRounds) ? maxToolRounds : 1));
|
|
70
81
|
let currentPrompt = pipelineOptions.prompt;
|
|
@@ -83,9 +94,7 @@ export async function runChatV2PipelineWithToolContinuation(options) {
|
|
|
83
94
|
if (autoContinue) {
|
|
84
95
|
appendReasoningRound(reasoningRounds, result.reasoning);
|
|
85
96
|
}
|
|
86
|
-
if (!autoContinue ||
|
|
87
|
-
completedRounds >= maxRounds ||
|
|
88
|
-
!canAutoContinue(result.functionCalls, toolNames)) {
|
|
97
|
+
if (!autoContinue || completedRounds >= maxRounds || !canAutoContinue(result.functionCalls, toolNames)) {
|
|
89
98
|
if (result.functionCalls.length === 0 && delegatedToolCalls.length > 0 && pipelineOptions.includeFunctionCalls) {
|
|
90
99
|
result.commonOutputs['function-calls'] = {
|
|
91
100
|
type: 'object[]',
|
|
@@ -98,10 +107,38 @@ export async function runChatV2PipelineWithToolContinuation(options) {
|
|
|
98
107
|
}
|
|
99
108
|
return result;
|
|
100
109
|
}
|
|
101
|
-
const toolResultMessages =
|
|
110
|
+
const toolResultMessages = delegateToolCallRound
|
|
111
|
+
? await delegateToolCallRound(result.functionCalls, result.response)
|
|
112
|
+
: await Promise.all(result.functionCalls.map(delegateToolCall));
|
|
102
113
|
delegatedToolCalls.push(...toolResultMessages
|
|
103
114
|
.map((message) => message.delegatedToolCall)
|
|
104
115
|
.filter((record) => record != null));
|
|
116
|
+
if (shouldReturnToolResultDirectly(result.functionCalls, functions)) {
|
|
117
|
+
const directResultMessage = toolResultMessages[0]?.value;
|
|
118
|
+
if (directResultMessage?.type !== 'function' || typeof directResultMessage.message !== 'string') {
|
|
119
|
+
throw new Error('Return directly requires the delegated tool handler to return a string output.');
|
|
120
|
+
}
|
|
121
|
+
result.response = directResultMessage.message;
|
|
122
|
+
result.allMessages = [...result.allMessages, directResultMessage];
|
|
123
|
+
result.functionCalls = [];
|
|
124
|
+
result.commonOutputs['response'] = {
|
|
125
|
+
type: 'string',
|
|
126
|
+
value: result.response,
|
|
127
|
+
};
|
|
128
|
+
result.commonOutputs['all-messages'] = {
|
|
129
|
+
type: 'chat-message[]',
|
|
130
|
+
value: result.allMessages,
|
|
131
|
+
};
|
|
132
|
+
if (pipelineOptions.includeFunctionCalls) {
|
|
133
|
+
result.commonOutputs['function-calls'] = {
|
|
134
|
+
type: 'object[]',
|
|
135
|
+
value: delegatedToolCalls,
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
applyAccumulatedUsage(result, accumulatedUsage, pipelineOptions.outputUsage);
|
|
139
|
+
applyAccumulatedReasoning(result, reasoningRounds, pipelineOptions.outputReasoning);
|
|
140
|
+
return result;
|
|
141
|
+
}
|
|
105
142
|
currentPrompt = {
|
|
106
143
|
type: 'chat-message[]',
|
|
107
144
|
value: [...result.allMessages, ...toolResultMessages.map((message) => message.value)],
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
export const LLM_CHAT_V2_TOOL_CALLS_OUTPUT_ID = 'function-calls';
|
|
2
|
+
export const DELEGATE_TOOL_CALL_INPUT_ID = 'function-call';
|
|
3
|
+
/**
|
|
4
|
+
* Resolves every special request/response relationship formed by an
|
|
5
|
+
* auto-continuing LLM Chat node and an effective Delegate Tool Call input.
|
|
6
|
+
* Callers that inspect a whole graph should reuse this single pass.
|
|
7
|
+
*/
|
|
8
|
+
export function resolveToolContinuationConnections(graph) {
|
|
9
|
+
const nodesById = new Map(graph.nodes.map((node) => [node.id, node]));
|
|
10
|
+
const firstConnectionByInput = new Map();
|
|
11
|
+
for (const connection of graph.connections) {
|
|
12
|
+
if (!nodesById.has(connection.outputNodeId) || !nodesById.has(connection.inputNodeId)) {
|
|
13
|
+
continue;
|
|
14
|
+
}
|
|
15
|
+
const inputKey = `${connection.inputNodeId}\u0000${connection.inputId}`;
|
|
16
|
+
if (!firstConnectionByInput.has(inputKey)) {
|
|
17
|
+
firstConnectionByInput.set(inputKey, connection);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
const candidatesByLLMNodeId = new Map();
|
|
21
|
+
for (const connection of graph.connections) {
|
|
22
|
+
if (connection.outputId !== LLM_CHAT_V2_TOOL_CALLS_OUTPUT_ID ||
|
|
23
|
+
connection.inputId !== DELEGATE_TOOL_CALL_INPUT_ID) {
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
const llmNode = nodesById.get(connection.outputNodeId);
|
|
27
|
+
const delegateNode = nodesById.get(connection.inputNodeId);
|
|
28
|
+
if (!isEligibleLLMChatV2Node(llmNode) || !isEligibleDelegateToolCallNode(delegateNode)) {
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
const inputKey = `${connection.inputNodeId}\u0000${connection.inputId}`;
|
|
32
|
+
if (firstConnectionByInput.get(inputKey) !== connection) {
|
|
33
|
+
continue;
|
|
34
|
+
}
|
|
35
|
+
const candidates = candidatesByLLMNodeId.get(llmNode.id);
|
|
36
|
+
const candidate = { connection, delegateNode };
|
|
37
|
+
if (candidates) {
|
|
38
|
+
candidates.push(candidate);
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
candidatesByLLMNodeId.set(llmNode.id, [candidate]);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
const resolutions = new Map();
|
|
45
|
+
for (const [llmNodeId, candidates] of candidatesByLLMNodeId) {
|
|
46
|
+
if (candidates.length === 1) {
|
|
47
|
+
resolutions.set(llmNodeId, { kind: 'connected', ...candidates[0] });
|
|
48
|
+
}
|
|
49
|
+
else {
|
|
50
|
+
resolutions.set(llmNodeId, { kind: 'ambiguous', candidates });
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return resolutions;
|
|
54
|
+
}
|
|
55
|
+
/** Resolves one LLM node while preserving the convenient `none` result. */
|
|
56
|
+
export function resolveToolContinuationConnection(graph, llmNodeId) {
|
|
57
|
+
return resolveToolContinuationConnections(graph).get(llmNodeId) ?? { kind: 'none' };
|
|
58
|
+
}
|
|
59
|
+
function isEligibleLLMChatV2Node(node) {
|
|
60
|
+
if (!node || node.disabled || node.isSplitRun || node.type !== 'llmChatV2') {
|
|
61
|
+
return false;
|
|
62
|
+
}
|
|
63
|
+
const data = node.data;
|
|
64
|
+
return data.useToolCalling === true && data.autoContinueToolCalls === true;
|
|
65
|
+
}
|
|
66
|
+
function isEligibleDelegateToolCallNode(node) {
|
|
67
|
+
return node?.type === 'delegateFunctionCall' && !node.disabled;
|
|
68
|
+
}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { nanoid } from 'nanoid/non-secure';
|
|
2
|
+
import { dedent } from 'ts-dedent';
|
|
3
|
+
import { normalizeKnowledgeEvidence } from '../../integrations/KnowledgeStoreValidation.js';
|
|
4
|
+
import { nodeDefinition } from '../NodeDefinition.js';
|
|
5
|
+
import { NodeImpl } from '../NodeImpl.js';
|
|
6
|
+
export class BuildKnowledgeContextNodeImpl extends NodeImpl {
|
|
7
|
+
static create() {
|
|
8
|
+
return {
|
|
9
|
+
id: nanoid(),
|
|
10
|
+
type: 'buildKnowledgeContext',
|
|
11
|
+
title: 'Build Knowledge Context',
|
|
12
|
+
visualData: { x: 0, y: 0, width: 280 },
|
|
13
|
+
data: {
|
|
14
|
+
budgetUnit: 'tokens',
|
|
15
|
+
budget: 6000,
|
|
16
|
+
maxItems: 20,
|
|
17
|
+
citationPrefix: 'K',
|
|
18
|
+
metadataFields: ['title'],
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
getInputDefinitions() {
|
|
23
|
+
return [
|
|
24
|
+
{
|
|
25
|
+
id: 'evidence',
|
|
26
|
+
title: 'Evidence',
|
|
27
|
+
dataType: ['knowledge-evidence', 'knowledge-evidence[]'],
|
|
28
|
+
required: true,
|
|
29
|
+
},
|
|
30
|
+
];
|
|
31
|
+
}
|
|
32
|
+
getOutputDefinitions() {
|
|
33
|
+
return [
|
|
34
|
+
{ id: 'context', title: 'Context', dataType: 'string' },
|
|
35
|
+
{ id: 'included-evidence', title: 'Included Evidence', dataType: 'knowledge-evidence[]' },
|
|
36
|
+
{ id: 'citation-map', title: 'Citation Map', dataType: 'object' },
|
|
37
|
+
{ id: 'excluded-count', title: 'Excluded Count', dataType: 'number' },
|
|
38
|
+
];
|
|
39
|
+
}
|
|
40
|
+
getEditors() {
|
|
41
|
+
return [
|
|
42
|
+
{
|
|
43
|
+
type: 'dropdown',
|
|
44
|
+
dataKey: 'budgetUnit',
|
|
45
|
+
label: 'Budget Unit',
|
|
46
|
+
options: [
|
|
47
|
+
{ value: 'characters', label: 'Characters' },
|
|
48
|
+
{ value: 'tokens', label: 'Tokens' },
|
|
49
|
+
],
|
|
50
|
+
},
|
|
51
|
+
{ type: 'number', dataKey: 'budget', label: 'Context Budget', min: 1, max: 1000000 },
|
|
52
|
+
{ type: 'number', dataKey: 'maxItems', label: 'Maximum Evidence Items', min: 1, max: 500 },
|
|
53
|
+
{ type: 'string', dataKey: 'citationPrefix', label: 'Citation Prefix', maxLength: 16 },
|
|
54
|
+
{
|
|
55
|
+
type: 'stringList',
|
|
56
|
+
dataKey: 'metadataFields',
|
|
57
|
+
label: 'Metadata Fields To Include',
|
|
58
|
+
placeholder: 'chapter_title',
|
|
59
|
+
},
|
|
60
|
+
];
|
|
61
|
+
}
|
|
62
|
+
getBody() {
|
|
63
|
+
return dedent `
|
|
64
|
+
${this.data.budget} ${this.data.budgetUnit}
|
|
65
|
+
Up to ${this.data.maxItems} items
|
|
66
|
+
Citations: [${this.data.citationPrefix || 'K'}1]
|
|
67
|
+
`;
|
|
68
|
+
}
|
|
69
|
+
static getUIData() {
|
|
70
|
+
return {
|
|
71
|
+
contextMenuTitle: 'Build Knowledge Context',
|
|
72
|
+
infoBoxTitle: 'Build Knowledge Context Node',
|
|
73
|
+
infoBoxBody: 'Packs structured evidence into a bounded LLM context with stable citation labels.',
|
|
74
|
+
group: 'Knowledge',
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
async process(inputs, context) {
|
|
78
|
+
const value = inputs['evidence'];
|
|
79
|
+
const evidence = value?.type === 'knowledge-evidence[]'
|
|
80
|
+
? value.value.map(normalizeKnowledgeEvidence)
|
|
81
|
+
: value?.type === 'knowledge-evidence'
|
|
82
|
+
? [normalizeKnowledgeEvidence(value.value)]
|
|
83
|
+
: [];
|
|
84
|
+
if (!value)
|
|
85
|
+
throw new Error('Build Knowledge Context is missing its Evidence input.');
|
|
86
|
+
if (value.type !== 'knowledge-evidence' && value.type !== 'knowledge-evidence[]') {
|
|
87
|
+
throw new Error(`Build Knowledge Context cannot use ${value.type} as Evidence.`);
|
|
88
|
+
}
|
|
89
|
+
if (!Number.isInteger(this.data.budget) || this.data.budget < 1 || this.data.budget > 1_000_000) {
|
|
90
|
+
throw new Error('Build Knowledge Context budget must be an integer between 1 and 1000000.');
|
|
91
|
+
}
|
|
92
|
+
if (!Number.isInteger(this.data.maxItems) || this.data.maxItems < 1 || this.data.maxItems > 500) {
|
|
93
|
+
throw new Error('Build Knowledge Context maximum evidence items must be an integer between 1 and 500.');
|
|
94
|
+
}
|
|
95
|
+
if (this.data.budgetUnit !== 'characters' && this.data.budgetUnit !== 'tokens') {
|
|
96
|
+
throw new Error('Build Knowledge Context budget unit must be characters or tokens.');
|
|
97
|
+
}
|
|
98
|
+
if (!Array.isArray(this.data.metadataFields) ||
|
|
99
|
+
this.data.metadataFields.some((field) => typeof field !== 'string')) {
|
|
100
|
+
throw new Error('Build Knowledge Context metadata fields must be a string array.');
|
|
101
|
+
}
|
|
102
|
+
const included = [];
|
|
103
|
+
const sections = [];
|
|
104
|
+
const citationMap = {};
|
|
105
|
+
if (typeof this.data.citationPrefix !== 'string') {
|
|
106
|
+
throw new Error('Build Knowledge Context citation prefix must be a string.');
|
|
107
|
+
}
|
|
108
|
+
const prefix = this.data.citationPrefix.trim() || 'K';
|
|
109
|
+
if (prefix.length > 16)
|
|
110
|
+
throw new Error('Build Knowledge Context citation prefix cannot exceed 16 characters.');
|
|
111
|
+
for (const item of evidence.slice(0, this.data.maxItems)) {
|
|
112
|
+
const label = `${prefix}${included.length + 1}`;
|
|
113
|
+
const metadata = buildMetadataLine(item, this.data.metadataFields);
|
|
114
|
+
const section = `[${label}]${metadata ? ` ${metadata}` : ''}\n${item.text}`;
|
|
115
|
+
const candidateContext = [...sections, section].join('\n\n---\n\n');
|
|
116
|
+
const size = this.data.budgetUnit === 'tokens'
|
|
117
|
+
? await context.tokenizer.getTokenCountForString(candidateContext, { node: context.node })
|
|
118
|
+
: candidateContext.length;
|
|
119
|
+
if (size > this.data.budget)
|
|
120
|
+
continue;
|
|
121
|
+
included.push(item);
|
|
122
|
+
sections.push(section);
|
|
123
|
+
citationMap[label] = {
|
|
124
|
+
evidenceId: item.id,
|
|
125
|
+
source: item.source,
|
|
126
|
+
documentId: item.documentId,
|
|
127
|
+
...(item.title ? { title: item.title } : {}),
|
|
128
|
+
...(item.chunkIndex == null ? {} : { chunkIndex: item.chunkIndex }),
|
|
129
|
+
...(item.metadata ? { metadata: item.metadata } : {}),
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
return {
|
|
133
|
+
['context']: { type: 'string', value: sections.join('\n\n---\n\n') },
|
|
134
|
+
['included-evidence']: { type: 'knowledge-evidence[]', value: included },
|
|
135
|
+
['citation-map']: { type: 'object', value: citationMap },
|
|
136
|
+
['excluded-count']: { type: 'number', value: Math.max(0, evidence.length - included.length) },
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
function buildMetadataLine(evidence, fields) {
|
|
141
|
+
const values = [];
|
|
142
|
+
for (const field of fields) {
|
|
143
|
+
const normalizedField = field.trim();
|
|
144
|
+
if (!normalizedField)
|
|
145
|
+
continue;
|
|
146
|
+
const value = normalizedField === 'title'
|
|
147
|
+
? evidence.title
|
|
148
|
+
: evidence.metadata && Object.prototype.hasOwnProperty.call(evidence.metadata, normalizedField)
|
|
149
|
+
? evidence.metadata[normalizedField]
|
|
150
|
+
: undefined;
|
|
151
|
+
if (value == null || (Array.isArray(value) && value.length === 0))
|
|
152
|
+
continue;
|
|
153
|
+
values.push(`${normalizedField}: ${Array.isArray(value) ? value.join(', ') : String(value)}`);
|
|
154
|
+
}
|
|
155
|
+
return values.join(' | ');
|
|
156
|
+
}
|
|
157
|
+
export const buildKnowledgeContextNode = nodeDefinition(BuildKnowledgeContextNodeImpl, 'Build Knowledge Context');
|
|
@@ -3,7 +3,7 @@ import { NodeImpl } from '../NodeImpl.js';
|
|
|
3
3
|
import { dedent } from 'ts-dedent';
|
|
4
4
|
import { nodeDefinition } from '../NodeDefinition.js';
|
|
5
5
|
import { coerceType } from '../../utils/coerceType.js';
|
|
6
|
-
import { delegateToolCall, isDelegatedToolCallRecord } from './toolCallDelegation.js';
|
|
6
|
+
import { buildDelegatedToolCallOutputs, delegateToolCall, isDelegatedToolCallRecord, } from './toolCallDelegation.js';
|
|
7
7
|
export class DelegateFunctionCallNodeImpl extends NodeImpl {
|
|
8
8
|
static create() {
|
|
9
9
|
const chartNode = {
|
|
@@ -29,7 +29,7 @@ export class DelegateFunctionCallNodeImpl extends NodeImpl {
|
|
|
29
29
|
const inputs = [];
|
|
30
30
|
inputs.push({
|
|
31
31
|
id: 'function-call',
|
|
32
|
-
dataType: 'object',
|
|
32
|
+
dataType: ['object', 'object[]'],
|
|
33
33
|
title: 'Tool Call',
|
|
34
34
|
coerced: true,
|
|
35
35
|
required: true,
|
|
@@ -39,6 +39,12 @@ export class DelegateFunctionCallNodeImpl extends NodeImpl {
|
|
|
39
39
|
}
|
|
40
40
|
getOutputDefinitions() {
|
|
41
41
|
const outputs = [];
|
|
42
|
+
outputs.push({
|
|
43
|
+
id: 'assistant-message',
|
|
44
|
+
dataType: 'string',
|
|
45
|
+
title: 'Message (fires before tool call invocation)',
|
|
46
|
+
description: 'Nonblank text the assistant emitted alongside a connected tool-call round. This output fires before the tools are invoked.',
|
|
47
|
+
});
|
|
42
48
|
outputs.push({
|
|
43
49
|
id: 'output',
|
|
44
50
|
dataType: ['string', 'string[]'],
|
|
@@ -48,8 +54,8 @@ export class DelegateFunctionCallNodeImpl extends NodeImpl {
|
|
|
48
54
|
outputs.push({
|
|
49
55
|
id: 'message',
|
|
50
56
|
dataType: ['chat-message', 'chat-message[]', 'object', 'object[]'],
|
|
51
|
-
title: 'Message
|
|
52
|
-
description: 'Maps the
|
|
57
|
+
title: 'Tool Result Message',
|
|
58
|
+
description: 'Maps the tool result into a chat message for a later LLM request.',
|
|
53
59
|
});
|
|
54
60
|
return outputs;
|
|
55
61
|
}
|
|
@@ -69,7 +75,7 @@ export class DelegateFunctionCallNodeImpl extends NodeImpl {
|
|
|
69
75
|
type: 'toggle',
|
|
70
76
|
label: 'Auto Delegate',
|
|
71
77
|
dataKey: 'autoDelegate',
|
|
72
|
-
helperMessage: '
|
|
78
|
+
helperMessage: 'Prefers a subgraph whose name exactly matches the tool, then falls back to the first name containing it.',
|
|
73
79
|
},
|
|
74
80
|
{
|
|
75
81
|
type: 'toggle',
|
|
@@ -129,16 +135,7 @@ export class DelegateFunctionCallNodeImpl extends NodeImpl {
|
|
|
129
135
|
return buildDelegatedToolCallOutputs(delegatedRecords);
|
|
130
136
|
}
|
|
131
137
|
const result = await delegateToolCall(functionCallInput, context, this.data);
|
|
132
|
-
return
|
|
133
|
-
['output']: {
|
|
134
|
-
type: 'string',
|
|
135
|
-
value: result.outputString,
|
|
136
|
-
},
|
|
137
|
-
['message']: {
|
|
138
|
-
type: 'chat-message',
|
|
139
|
-
value: result.message,
|
|
140
|
-
},
|
|
141
|
-
};
|
|
138
|
+
return buildDelegatedToolCallOutputs([result.record], undefined, result.cost);
|
|
142
139
|
}
|
|
143
140
|
}
|
|
144
141
|
function getDelegatedToolCallRecords(input) {
|
|
@@ -147,29 +144,4 @@ function getDelegatedToolCallRecords(input) {
|
|
|
147
144
|
}
|
|
148
145
|
return isDelegatedToolCallRecord(input) ? [input] : [];
|
|
149
146
|
}
|
|
150
|
-
function buildDelegatedToolCallOutputs(records) {
|
|
151
|
-
if (records.length === 1) {
|
|
152
|
-
const [record] = records;
|
|
153
|
-
return {
|
|
154
|
-
['output']: {
|
|
155
|
-
type: 'string',
|
|
156
|
-
value: record.output,
|
|
157
|
-
},
|
|
158
|
-
['message']: {
|
|
159
|
-
type: 'chat-message',
|
|
160
|
-
value: record.message,
|
|
161
|
-
},
|
|
162
|
-
};
|
|
163
|
-
}
|
|
164
|
-
return {
|
|
165
|
-
['output']: {
|
|
166
|
-
type: 'string[]',
|
|
167
|
-
value: records.map((record) => record.output),
|
|
168
|
-
},
|
|
169
|
-
['message']: {
|
|
170
|
-
type: 'chat-message[]',
|
|
171
|
-
value: records.map((record) => record.message),
|
|
172
|
-
},
|
|
173
|
-
};
|
|
174
|
-
}
|
|
175
147
|
export const delegateFunctionCallNode = nodeDefinition(DelegateFunctionCallNodeImpl, 'Delegate Tool Call');
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { nanoid } from 'nanoid/non-secure';
|
|
2
|
+
import { nodeDefinition } from '../NodeDefinition.js';
|
|
3
|
+
import { NodeImpl } from '../NodeImpl.js';
|
|
4
|
+
import { coerceType } from '../../utils/coerceType.js';
|
|
5
|
+
import { normalizeKnowledgeSourceReference, normalizeKnowledgeSourceStatusResult, } from '../../integrations/KnowledgeStoreValidation.js';
|
|
6
|
+
export class GetKnowledgeSourceStatusNodeImpl extends NodeImpl {
|
|
7
|
+
static create() {
|
|
8
|
+
return {
|
|
9
|
+
id: nanoid(),
|
|
10
|
+
type: 'getKnowledgeSourceStatus',
|
|
11
|
+
title: 'Get Knowledge Source Status',
|
|
12
|
+
visualData: { x: 0, y: 0, width: 300 },
|
|
13
|
+
data: { expectedVersion: '', useExpectedVersionInput: false },
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
getInputDefinitions() {
|
|
17
|
+
const inputs = [
|
|
18
|
+
{ id: 'source', title: 'Source', dataType: 'knowledge-source', required: true },
|
|
19
|
+
];
|
|
20
|
+
if (this.data.useExpectedVersionInput) {
|
|
21
|
+
inputs.push({ id: 'expected-version', title: 'Expected Version', dataType: 'string' });
|
|
22
|
+
}
|
|
23
|
+
return inputs;
|
|
24
|
+
}
|
|
25
|
+
getOutputDefinitions() {
|
|
26
|
+
return [
|
|
27
|
+
{ id: 'source', title: 'Resolved Source', dataType: 'knowledge-source' },
|
|
28
|
+
{ id: 'exists', title: 'Exists', dataType: 'boolean' },
|
|
29
|
+
{ id: 'active-version', title: 'Active Version', dataType: 'string' },
|
|
30
|
+
{ id: 'matches-expected-version', title: 'Matches Expected Version', dataType: 'boolean' },
|
|
31
|
+
{ id: 'document-count', title: 'Document Count', dataType: 'number' },
|
|
32
|
+
{ id: 'chunk-count', title: 'Chunk Count', dataType: 'number' },
|
|
33
|
+
{ id: 'updated-at', title: 'Updated At', dataType: 'datetime' },
|
|
34
|
+
{ id: 'metadata', title: 'Metadata', dataType: 'object' },
|
|
35
|
+
{ id: 'message', title: 'Status Message', dataType: 'string' },
|
|
36
|
+
];
|
|
37
|
+
}
|
|
38
|
+
getEditors() {
|
|
39
|
+
return [
|
|
40
|
+
{
|
|
41
|
+
type: 'string',
|
|
42
|
+
dataKey: 'expectedVersion',
|
|
43
|
+
useInputToggleDataKey: 'useExpectedVersionInput',
|
|
44
|
+
label: 'Expected Version',
|
|
45
|
+
},
|
|
46
|
+
];
|
|
47
|
+
}
|
|
48
|
+
static getUIData() {
|
|
49
|
+
return {
|
|
50
|
+
contextMenuTitle: 'Get Knowledge Source Status',
|
|
51
|
+
infoBoxTitle: 'Get Knowledge Source Status Node',
|
|
52
|
+
infoBoxBody: 'Reads the durable active source manifest. A missing source is returned as normal output.',
|
|
53
|
+
group: 'Knowledge',
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
async process(inputs, context) {
|
|
57
|
+
const source = normalizeKnowledgeSourceReference(coerceType(inputs['source'], 'knowledge-source'));
|
|
58
|
+
const expectedVersion = (this.data.useExpectedVersionInput
|
|
59
|
+
? coerceType(inputs['expected-version'], 'string')
|
|
60
|
+
: this.data.expectedVersion).trim();
|
|
61
|
+
const normalizedExpectedVersion = expectedVersion
|
|
62
|
+
? normalizeKnowledgeSourceReference({ ...source, version: expectedVersion }).version
|
|
63
|
+
: undefined;
|
|
64
|
+
const store = await context.getKnowledgeStore(source.connectionId);
|
|
65
|
+
const result = normalizeKnowledgeSourceStatusResult(await store.getSourceStatus({ source, ...(normalizedExpectedVersion ? { expectedVersion: normalizedExpectedVersion } : {}) }, { signal: context.signal, reportProgress: context.reportProgress }), source, normalizedExpectedVersion);
|
|
66
|
+
return {
|
|
67
|
+
['source']: { type: 'knowledge-source', value: result.source },
|
|
68
|
+
['exists']: { type: 'boolean', value: result.exists },
|
|
69
|
+
['active-version']: { type: 'string', value: result.activeVersion ?? '' },
|
|
70
|
+
['matches-expected-version']: { type: 'boolean', value: result.matchesExpectedVersion ?? false },
|
|
71
|
+
['document-count']: { type: 'number', value: result.documentCount ?? 0 },
|
|
72
|
+
['chunk-count']: { type: 'number', value: result.chunkCount ?? 0 },
|
|
73
|
+
['updated-at']: { type: 'datetime', value: result.updatedAt ?? '' },
|
|
74
|
+
['metadata']: { type: 'object', value: result.metadata ?? {} },
|
|
75
|
+
['message']: { type: 'string', value: result.message },
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
export const getKnowledgeSourceStatusNode = nodeDefinition(GetKnowledgeSourceStatusNodeImpl, 'Get Knowledge Source Status');
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { nanoid } from 'nanoid/non-secure';
|
|
2
|
+
import { dedent } from 'ts-dedent';
|
|
3
|
+
import { nodeDefinition } from '../NodeDefinition.js';
|
|
4
|
+
import { NodeImpl } from '../NodeImpl.js';
|
|
5
|
+
import { coerceType } from '../../utils/coerceType.js';
|
|
6
|
+
import { missingStoredValueDataValue, portableStoredValueScalarTypes, storedValueToDataValue, } from './StoredValueNodeUtils.js';
|
|
7
|
+
export class GetStoredValueNodeImpl extends NodeImpl {
|
|
8
|
+
static create() {
|
|
9
|
+
return {
|
|
10
|
+
type: 'getStoredValue',
|
|
11
|
+
title: 'Get Stored Value',
|
|
12
|
+
id: nanoid(),
|
|
13
|
+
visualData: { x: 0, y: 0, width: 220 },
|
|
14
|
+
data: { dataType: 'string', key: 'key', onDemand: false, useKeyInput: false, wait: false },
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
getInputDefinitions() {
|
|
18
|
+
return this.data.useKeyInput ? [{ id: 'key', title: 'Key', dataType: 'string' }] : [];
|
|
19
|
+
}
|
|
20
|
+
getOutputDefinitions() {
|
|
21
|
+
return [
|
|
22
|
+
{
|
|
23
|
+
id: 'value',
|
|
24
|
+
title: 'Value',
|
|
25
|
+
dataType: this.data.onDemand ? `fn<${this.data.dataType}>` : this.data.dataType,
|
|
26
|
+
},
|
|
27
|
+
{ id: 'found', title: 'Found', dataType: 'boolean' },
|
|
28
|
+
{ id: 'key', title: 'Key', dataType: 'string' },
|
|
29
|
+
];
|
|
30
|
+
}
|
|
31
|
+
getEditors() {
|
|
32
|
+
return [
|
|
33
|
+
{
|
|
34
|
+
type: 'custom',
|
|
35
|
+
label: 'Search Stored Values',
|
|
36
|
+
customEditorId: 'GetStoredValueSelector',
|
|
37
|
+
autoFocus: true,
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
type: 'string',
|
|
41
|
+
dataKey: 'key',
|
|
42
|
+
useInputToggleDataKey: 'useKeyInput',
|
|
43
|
+
label: 'Key',
|
|
44
|
+
includeInGraphSearch: true,
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
type: 'dataTypeSelector',
|
|
48
|
+
dataKey: 'dataType',
|
|
49
|
+
label: 'Data Type',
|
|
50
|
+
allowedDataTypes: portableStoredValueScalarTypes,
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
type: 'toggle',
|
|
54
|
+
dataKey: 'onDemand',
|
|
55
|
+
label: 'On Demand',
|
|
56
|
+
turnOffDataKeysWhenEnabled: ['wait'],
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
type: 'toggle',
|
|
60
|
+
dataKey: 'wait',
|
|
61
|
+
label: 'Wait',
|
|
62
|
+
turnOffDataKeysWhenEnabled: ['onDemand'],
|
|
63
|
+
},
|
|
64
|
+
];
|
|
65
|
+
}
|
|
66
|
+
getBody() {
|
|
67
|
+
return dedent `
|
|
68
|
+
${this.data.useKeyInput ? '(Key from input)' : this.data.key}
|
|
69
|
+
Type: ${this.data.dataType}
|
|
70
|
+
${this.data.wait ? 'Waits for an in-run Set' : ''}
|
|
71
|
+
`;
|
|
72
|
+
}
|
|
73
|
+
static getUIData() {
|
|
74
|
+
return {
|
|
75
|
+
infoBoxBody: 'Loads a portable JSON value from the root-run cache or the host persistence store. Missing keys return the selected type default.',
|
|
76
|
+
infoBoxTitle: 'Get Stored Value Node',
|
|
77
|
+
contextMenuTitle: 'Get Stored Value',
|
|
78
|
+
group: ['Advanced'],
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
async process(inputs, context) {
|
|
82
|
+
if (this.data.onDemand && this.data.wait)
|
|
83
|
+
throw new Error('Cannot use On Demand and Wait together');
|
|
84
|
+
const key = this.data.useKeyInput ? coerceType(inputs['key'], 'string') : this.data.key;
|
|
85
|
+
let result = await context.getStoredValue(key);
|
|
86
|
+
if (!result.found && this.data.wait) {
|
|
87
|
+
result = { found: true, value: await context.waitForStoredValue(key, context.signal) };
|
|
88
|
+
}
|
|
89
|
+
const value = this.data.onDemand
|
|
90
|
+
? {
|
|
91
|
+
type: `fn<${this.data.dataType}>`,
|
|
92
|
+
value: () => {
|
|
93
|
+
const cached = context.getCachedStoredValue(key);
|
|
94
|
+
return cached.found
|
|
95
|
+
? storedValueToDataValue(cached.value, this.data.dataType).value
|
|
96
|
+
: missingStoredValueDataValue(this.data.dataType).value;
|
|
97
|
+
},
|
|
98
|
+
}
|
|
99
|
+
: result.found
|
|
100
|
+
? storedValueToDataValue(result.value, this.data.dataType)
|
|
101
|
+
: missingStoredValueDataValue(this.data.dataType);
|
|
102
|
+
return {
|
|
103
|
+
['value']: value,
|
|
104
|
+
['found']: { type: 'boolean', value: result.found },
|
|
105
|
+
['key']: { type: 'string', value: key },
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
export const getStoredValueNode = nodeDefinition(GetStoredValueNodeImpl, 'Get Stored Value');
|