@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,6 +1,7 @@
|
|
|
1
1
|
import type { ParsedAssistantChatMessageFunctionCall, ChatMessage } from '../DataValue.js';
|
|
2
2
|
import type { GraphId } from '../NodeGraph.js';
|
|
3
3
|
import type { InternalProcessContext } from '../ProcessContext.js';
|
|
4
|
+
import type { Outputs } from '../GraphProcessor.js';
|
|
4
5
|
export type ToolCallDelegationConfig = {
|
|
5
6
|
handlers: {
|
|
6
7
|
key: string | undefined;
|
|
@@ -15,6 +16,8 @@ export type ToolCallDelegationResult = {
|
|
|
15
16
|
outputString: string;
|
|
16
17
|
message: ChatMessage;
|
|
17
18
|
record: DelegatedToolCallRecord;
|
|
19
|
+
/** Cost from this live delegation. Kept out of the replay record so replay cannot charge it again. */
|
|
20
|
+
cost?: number;
|
|
18
21
|
};
|
|
19
22
|
export type DelegatedToolCallRecord = {
|
|
20
23
|
delegatedToolCall: true;
|
|
@@ -25,5 +28,6 @@ export type DelegatedToolCallRecord = {
|
|
|
25
28
|
message: ChatMessage;
|
|
26
29
|
};
|
|
27
30
|
export declare function isDelegatedToolCallRecord(input: unknown): input is DelegatedToolCallRecord;
|
|
31
|
+
export declare function buildDelegatedToolCallOutputs(records: DelegatedToolCallRecord[], preToolMessage?: string, cost?: number): Outputs;
|
|
28
32
|
export declare function normalizeFunctionCallInput(input: unknown): ParsedAssistantChatMessageFunctionCall;
|
|
29
33
|
export declare function delegateToolCall(rawFunctionCall: unknown, context: InternalProcessContext, config: ToolCallDelegationConfig): Promise<ToolCallDelegationResult>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { RivetKnowledgeStore } from '../../integrations/KnowledgeStore.js';
|
|
2
|
+
import type { KnowledgeStoreConnectionDefinition } from '../../model/Project.js';
|
|
3
|
+
import type { KnowledgeStoreProviderTestContext } from '../../integrations/KnowledgeStoreProvider.js';
|
|
4
|
+
import type { RuntimeSettings } from '../../model/Settings.js';
|
|
5
|
+
export declare function createPineconeKnowledgeStore(definition: KnowledgeStoreConnectionDefinition, settings: RuntimeSettings, credentials: Readonly<Record<string, string>>): RivetKnowledgeStore;
|
|
6
|
+
export declare function testPineconeKnowledgeConnection(definition: KnowledgeStoreConnectionDefinition, credentials: Record<string, string>, signal: AbortSignal, context: KnowledgeStoreProviderTestContext): Promise<void>;
|
|
7
|
+
export declare class PineconeKnowledgeError extends Error {
|
|
8
|
+
readonly status: number;
|
|
9
|
+
readonly providerBody: string;
|
|
10
|
+
constructor(message: string, status: number, providerBody: string);
|
|
11
|
+
}
|
|
@@ -27,6 +27,11 @@ export type RecordedEventsMap = OverrideProperties<ProcessEvents, {
|
|
|
27
27
|
graphId: GraphId;
|
|
28
28
|
outputs: GraphOutputs;
|
|
29
29
|
}>;
|
|
30
|
+
/** Called when root outputs are available before managed async branches finish. */
|
|
31
|
+
graphOutputsReady: WithOptionalExecution<{
|
|
32
|
+
graphId: GraphId;
|
|
33
|
+
outputs: GraphOutputs;
|
|
34
|
+
}>;
|
|
30
35
|
/** Called when a graph or subgraph has been aborted. */
|
|
31
36
|
graphAbort: WithOptionalExecution<{
|
|
32
37
|
graphId: GraphId;
|
|
@@ -7,6 +7,10 @@ export type ProjectValidationResult = {
|
|
|
7
7
|
errors: string[];
|
|
8
8
|
warnings: string[];
|
|
9
9
|
};
|
|
10
|
+
export declare class ProjectValidationError extends Error {
|
|
11
|
+
readonly validation: ProjectValidationResult;
|
|
12
|
+
constructor(validation: ProjectValidationResult);
|
|
13
|
+
}
|
|
10
14
|
/** Validates a deserialized project structure. Returns errors for structural problems. */
|
|
11
15
|
export declare function validateProject(project: unknown): ProjectValidationResult;
|
|
12
16
|
/** Quick structural check - throws on invalid project. */
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
export type { UiComponentId, UiGraph, UiGraphActionComponent, UiGraphChatMessage, UiGraphComponent, } from './model/UiGraph.js';
|
|
1
|
+
export type { UiComponentId, UiGraph, UiGraphActionComponent, UiGraphChatMessage, UiGraphChatPin, UiGraphComponent, } from './model/UiGraph.js';
|
|
2
2
|
export type { UiGraphInteractionSnapshot } from './model/UiGraphRuntimeModel.js';
|
|
3
3
|
export type { RivetWebAppClientMessage, RivetWebAppRunEvent, RivetWebAppServerMessage, } from './model/UiGraphActionProtocol.js';
|
|
4
4
|
export type { GraphProgress } from './model/GraphProgress.js';
|
|
5
5
|
export type { RivetMarkdownSanitizerPolicy } from './model/MarkdownSanitizationPolicy.js';
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
6
|
+
export type { UiGraphChatMessagePresentation, UiGraphChatMessagePresentationOptions, UiGraphChatMessageTimestampPresentation, } from './model/UiGraphBrowserRuntime.js';
|
|
7
|
+
export { createUiGraphChatHistoryFlushStatePatch, createUiGraphChatPinStatePatch, createUiGraphChatSubmissionStatePatch, getUiGraphActionState, getUiGraphChatDraftStateKey, getUiGraphChatMessagesStateKey, } from './model/UiGraph.js';
|
|
8
|
+
export { applyUiGraphStatePatch, createUiGraphActionExecutionController, createUiGraphInteractionController, getUiGraphComponentRenderModel, getUiGraphJsonOutputFilename, getUiGraphProgressiveJsonOutputChunks, } from './model/UiGraphRuntimeModel.js';
|
|
8
9
|
export { parseRivetWebAppClientMessage, parseRivetWebAppServerMessage, RIVET_WEB_APP_ACTION_PROTOCOL_VERSION, } from './model/UiGraphActionProtocol.js';
|
|
9
|
-
export { copyUiGraphText, downloadUiGraphJsonOutput } from './model/UiGraphBrowserRuntime.js';
|
|
10
|
+
export { copyUiGraphText, applyUiGraphWebAppStorageActionPatch, applyUiGraphWebAppStoragePatch, clearUiGraphChatSearchMatches, downloadUiGraphJsonOutput, enhanceUiGraphChatJsonCodeBlocks, hasUiGraphChatPersistentStateChanged, getUiGraphChatPersistentState, getUiGraphChatMessagePresentations, getUiGraphChatStorageKey, getUiGraphWebAppStorageKey, highlightUiGraphChatSearchMatches, loadUiGraphChatPersistentState, loadUiGraphWebAppStorage, observeUiGraphOutputResizeBounds, revealUiGraphChatElement, revealUiGraphChatSearchMatch, saveUiGraphChatPersistentState, } from './model/UiGraphBrowserRuntime.js';
|