@datatechsolutions/ui 2.11.80 → 2.11.81
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/astrlabe/contracts.d.mts +19 -1
- package/dist/astrlabe/contracts.d.ts +19 -1
- package/dist/astrlabe/index.d.mts +16 -3
- package/dist/astrlabe/index.d.ts +16 -3
- package/dist/astrlabe/index.js +207 -0
- package/dist/astrlabe/index.js.map +1 -1
- package/dist/astrlabe/index.mjs +206 -1
- package/dist/astrlabe/index.mjs.map +1 -1
- package/package.json +2 -1
|
@@ -219,6 +219,24 @@ type AgentNodeConfig = {
|
|
|
219
219
|
userPrompt?: string;
|
|
220
220
|
maxTokens?: number;
|
|
221
221
|
temperature?: number;
|
|
222
|
+
/**
|
|
223
|
+
* Optional structured-output contract. When set, the engine parses the
|
|
224
|
+
* LLM's text as JSON, validates against the schema, and exposes the
|
|
225
|
+
* typed object under `output.parsed`. Validation failures fail the
|
|
226
|
+
* node with `AGENT_OUTPUT_SCHEMA_VIOLATION` so downstream nodes never
|
|
227
|
+
* see half-formed data. Schema is the JSON-Schema-Draft-7 subset the
|
|
228
|
+
* Rust validator understands today (`type`, `properties`, `required`,
|
|
229
|
+
* `items`, `enum`).
|
|
230
|
+
*/
|
|
231
|
+
outputSchema?: AgentOutputSchema;
|
|
232
|
+
};
|
|
233
|
+
type AgentOutputSchema = {
|
|
234
|
+
type?: 'object' | 'array' | 'string' | 'number' | 'integer' | 'boolean' | 'null';
|
|
235
|
+
properties?: Record<string, AgentOutputSchema>;
|
|
236
|
+
required?: string[];
|
|
237
|
+
items?: AgentOutputSchema;
|
|
238
|
+
enum?: Array<string | number | boolean | null>;
|
|
239
|
+
description?: string;
|
|
222
240
|
};
|
|
223
241
|
type ModelProviderType = 'aws_bedrock' | 'openai_api' | 'google_vertex' | 'azure_openai' | 'anthropic_api' | 'groq' | 'mistral' | 'huggingface' | 'ollama' | 'custom';
|
|
224
242
|
type ModelProviderNodeConfig = {
|
|
@@ -452,4 +470,4 @@ type AgentRule = {
|
|
|
452
470
|
[key: string]: unknown;
|
|
453
471
|
};
|
|
454
472
|
|
|
455
|
-
export type { AgentConfig, AgentModel, AgentNodeConfig, AgentPersistPayload, AgentRule, AgentTool, AnswerNodeConfig, CodeNodeConfig, CodeOperation, DashboardOutputNodeConfig, DatasourceFilter, DatasourceFilterOp, DatasourceNodeConfig, DocumentExtractorNodeConfig, EndNodeConfig, EntityNodeConfig, GroupNodeConfig, HttpRequestNodeConfig, IfElseNodeConfig, IterationNodeConfig, IterationStartNodeConfig, KnowledgeBaseNodeConfig, ListOperatorNodeConfig, LogicNodeConfig, ModelProviderNodeConfig, ModelProviderType, NodeExecutionResult, NoteNodeConfig, ParameterExtractorNodeConfig, QuestionClassifierNodeConfig, RuleNodeConfig, StartNodeConfig, TemplateTransformNodeConfig, VariableAggregatorNodeConfig, VariableAssignerNodeConfig, VariableValue, Workflow, WorkflowEdge, WorkflowGraph, WorkflowNode, WorkflowNodeData, WorkflowNodeStatus, WorkflowNodeType, WorkflowRun, WorkflowRunStatus, WorkflowTool, WorkflowViewport };
|
|
473
|
+
export type { AgentConfig, AgentModel, AgentNodeConfig, AgentOutputSchema, AgentPersistPayload, AgentRule, AgentTool, AnswerNodeConfig, CodeNodeConfig, CodeOperation, DashboardOutputNodeConfig, DatasourceFilter, DatasourceFilterOp, DatasourceNodeConfig, DocumentExtractorNodeConfig, EndNodeConfig, EntityNodeConfig, GroupNodeConfig, HttpRequestNodeConfig, IfElseNodeConfig, IterationNodeConfig, IterationStartNodeConfig, KnowledgeBaseNodeConfig, ListOperatorNodeConfig, LogicNodeConfig, ModelProviderNodeConfig, ModelProviderType, NodeExecutionResult, NoteNodeConfig, ParameterExtractorNodeConfig, QuestionClassifierNodeConfig, RuleNodeConfig, StartNodeConfig, TemplateTransformNodeConfig, VariableAggregatorNodeConfig, VariableAssignerNodeConfig, VariableValue, Workflow, WorkflowEdge, WorkflowGraph, WorkflowNode, WorkflowNodeData, WorkflowNodeStatus, WorkflowNodeType, WorkflowRun, WorkflowRunStatus, WorkflowTool, WorkflowViewport };
|
|
@@ -219,6 +219,24 @@ type AgentNodeConfig = {
|
|
|
219
219
|
userPrompt?: string;
|
|
220
220
|
maxTokens?: number;
|
|
221
221
|
temperature?: number;
|
|
222
|
+
/**
|
|
223
|
+
* Optional structured-output contract. When set, the engine parses the
|
|
224
|
+
* LLM's text as JSON, validates against the schema, and exposes the
|
|
225
|
+
* typed object under `output.parsed`. Validation failures fail the
|
|
226
|
+
* node with `AGENT_OUTPUT_SCHEMA_VIOLATION` so downstream nodes never
|
|
227
|
+
* see half-formed data. Schema is the JSON-Schema-Draft-7 subset the
|
|
228
|
+
* Rust validator understands today (`type`, `properties`, `required`,
|
|
229
|
+
* `items`, `enum`).
|
|
230
|
+
*/
|
|
231
|
+
outputSchema?: AgentOutputSchema;
|
|
232
|
+
};
|
|
233
|
+
type AgentOutputSchema = {
|
|
234
|
+
type?: 'object' | 'array' | 'string' | 'number' | 'integer' | 'boolean' | 'null';
|
|
235
|
+
properties?: Record<string, AgentOutputSchema>;
|
|
236
|
+
required?: string[];
|
|
237
|
+
items?: AgentOutputSchema;
|
|
238
|
+
enum?: Array<string | number | boolean | null>;
|
|
239
|
+
description?: string;
|
|
222
240
|
};
|
|
223
241
|
type ModelProviderType = 'aws_bedrock' | 'openai_api' | 'google_vertex' | 'azure_openai' | 'anthropic_api' | 'groq' | 'mistral' | 'huggingface' | 'ollama' | 'custom';
|
|
224
242
|
type ModelProviderNodeConfig = {
|
|
@@ -452,4 +470,4 @@ type AgentRule = {
|
|
|
452
470
|
[key: string]: unknown;
|
|
453
471
|
};
|
|
454
472
|
|
|
455
|
-
export type { AgentConfig, AgentModel, AgentNodeConfig, AgentPersistPayload, AgentRule, AgentTool, AnswerNodeConfig, CodeNodeConfig, CodeOperation, DashboardOutputNodeConfig, DatasourceFilter, DatasourceFilterOp, DatasourceNodeConfig, DocumentExtractorNodeConfig, EndNodeConfig, EntityNodeConfig, GroupNodeConfig, HttpRequestNodeConfig, IfElseNodeConfig, IterationNodeConfig, IterationStartNodeConfig, KnowledgeBaseNodeConfig, ListOperatorNodeConfig, LogicNodeConfig, ModelProviderNodeConfig, ModelProviderType, NodeExecutionResult, NoteNodeConfig, ParameterExtractorNodeConfig, QuestionClassifierNodeConfig, RuleNodeConfig, StartNodeConfig, TemplateTransformNodeConfig, VariableAggregatorNodeConfig, VariableAssignerNodeConfig, VariableValue, Workflow, WorkflowEdge, WorkflowGraph, WorkflowNode, WorkflowNodeData, WorkflowNodeStatus, WorkflowNodeType, WorkflowRun, WorkflowRunStatus, WorkflowTool, WorkflowViewport };
|
|
473
|
+
export type { AgentConfig, AgentModel, AgentNodeConfig, AgentOutputSchema, AgentPersistPayload, AgentRule, AgentTool, AnswerNodeConfig, CodeNodeConfig, CodeOperation, DashboardOutputNodeConfig, DatasourceFilter, DatasourceFilterOp, DatasourceNodeConfig, DocumentExtractorNodeConfig, EndNodeConfig, EntityNodeConfig, GroupNodeConfig, HttpRequestNodeConfig, IfElseNodeConfig, IterationNodeConfig, IterationStartNodeConfig, KnowledgeBaseNodeConfig, ListOperatorNodeConfig, LogicNodeConfig, ModelProviderNodeConfig, ModelProviderType, NodeExecutionResult, NoteNodeConfig, ParameterExtractorNodeConfig, QuestionClassifierNodeConfig, RuleNodeConfig, StartNodeConfig, TemplateTransformNodeConfig, VariableAggregatorNodeConfig, VariableAssignerNodeConfig, VariableValue, Workflow, WorkflowEdge, WorkflowGraph, WorkflowNode, WorkflowNodeData, WorkflowNodeStatus, WorkflowNodeType, WorkflowRun, WorkflowRunStatus, WorkflowTool, WorkflowViewport };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { A as AgentWithPrompts, a as AgentNodeData, T as ToolCanvasData, R as RuleNodeData, E as EntityNodeData, M as ModelProviderNodeData, S as StartNodeData, b as EndNodeData, I as IfElseNodeData, C as CodeNodeData, H as HttpRequestNodeData, c as TemplateTransformNodeData, d as IterationNodeData, K as KnowledgeBaseNodeData, e as AnswerNodeData, Q as QuestionClassifierNodeData, P as ParameterExtractorNodeData, V as VariableAssignerNodeData, f as VariableAggregatorNodeData, D as DocumentExtractorNodeData, L as ListOperatorNodeData, g as IterationStartNodeData, N as NoteNodeData, G as GroupNodeData, W as WorkflowEntityDefinition, h as WorkspaceProps } from '../workflow-canvas-D4928AfA.mjs';
|
|
2
2
|
export { i as AgentNodeTool, j as Workspace } from '../workflow-canvas-D4928AfA.mjs';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
-
import { Workflow, WorkflowGraph, AgentModel, WorkflowTool, AgentRule, AgentPersistPayload, LogicNodeConfig, AgentTool, WorkflowRun } from './contracts.mjs';
|
|
5
|
-
export { ModelProviderNodeConfig, ModelProviderType } from './contracts.mjs';
|
|
4
|
+
import { Workflow, WorkflowGraph, AgentModel, WorkflowTool, AgentRule, AgentPersistPayload, LogicNodeConfig, AgentOutputSchema, AgentTool, WorkflowRun } from './contracts.mjs';
|
|
5
|
+
export { AgentNodeConfig, ModelProviderNodeConfig, ModelProviderType } from './contracts.mjs';
|
|
6
6
|
import * as React$1 from 'react';
|
|
7
7
|
import { ReactNode, ComponentProps } from 'react';
|
|
8
8
|
export { GraphNodeBadge, GraphNodeHeader, GraphNodeIconBubble, GraphNodeMeta } from './graph-node.mjs';
|
|
@@ -273,6 +273,19 @@ type RunReplayModalProps = {
|
|
|
273
273
|
};
|
|
274
274
|
declare function RunReplayModal({ open, onClose, runId, workflowId, originalInputs, onReplay, }: RunReplayModalProps): react_jsx_runtime.JSX.Element;
|
|
275
275
|
|
|
276
|
+
type OutputSchemaBuilderProps = {
|
|
277
|
+
/** Stored schema. `undefined` renders the "no schema yet" state with
|
|
278
|
+
* a single button to create one. */
|
|
279
|
+
value?: AgentOutputSchema;
|
|
280
|
+
onChange: (next: AgentOutputSchema | undefined) => void;
|
|
281
|
+
/** Recursion depth — used to cap the nesting UI offers (deeper trees
|
|
282
|
+
* are still expressible by hand-editing JSON, but the visual builder
|
|
283
|
+
* tops out at 2 to keep the page readable). */
|
|
284
|
+
depth?: number;
|
|
285
|
+
};
|
|
286
|
+
declare function OutputSchemaBuilder({ value, onChange, depth }: OutputSchemaBuilderProps): react_jsx_runtime.JSX.Element;
|
|
287
|
+
declare function defaultAgentOutputSchema(): AgentOutputSchema;
|
|
288
|
+
|
|
276
289
|
/**
|
|
277
290
|
* Rule editing types.
|
|
278
291
|
*
|
|
@@ -873,4 +886,4 @@ declare function getEntityBadgeColor(entityKey: string | undefined): string;
|
|
|
873
886
|
declare function getEntityHandleColor(entityKey: string | undefined): string;
|
|
874
887
|
declare function getEntityMinimapColor(entityKey: string | undefined): string;
|
|
875
888
|
|
|
876
|
-
export { AgentFlowNode, type AgentFramework, AgentModal, AgentNodeData, AgentToolFlowNode, AgentWithPrompts, AmazonNovaIcon, AnswerFlowNode, AnswerNodeData, AnthropicIcon, AnthropicModelIcon, AutoSaveWorkspace, type AutoSaveWorkspaceProps, CodeFlowNode, CodeNodeData, CrewAIIcon, DocumentExtractorFlowNode, DocumentExtractorNodeData, DslExportModal, DslImportModal, DynamicIslandConfirm, type DynamicIslandConfirmProps, EndFlowNode, EndNodeData, EntityFlowNode, EntityNodeData, FRAMEWORK_META, GoogleADKIcon, GroupFlowNode, GroupNodeData, HttpRequestFlowNode, HttpRequestNodeData, IfElseFlowNode, IfElseNodeData, IterationFlowNode, IterationNodeData, IterationStartFlowNode, IterationStartNodeData, KnowledgeBaseFlowNode, KnowledgeBaseNodeData, LOGIC_ICON_MAP, LOGIC_NODE_BADGE_COLORS, LOGIC_NODE_GRADIENTS, LOGIC_NODE_HANDLE_COLORS, LangChainIcon, LayoutDirection, ListOperatorFlowNode, ListOperatorNodeData, LogicNodeModal, MINIMAP_NODE_COLORS, MetaLlamaIcon, type ModelProvider, ModelProviderFlowNode, ModelProviderNodeData, NODE_EXECUTION_ACCENT_COLORS, NodeCard, NodeContextMenu, NodePalette, type NodeRunResult, NoteFlowNode, NoteNodeData, OpenAIIcon, PanelContextMenu, ParameterExtractorFlowNode, ParameterExtractorNodeData, PipelineSettingsModal, type PipelineSettingsPatch, PreviewPanel, type PreviewPanelProps, QuestionClassifierFlowNode, QuestionClassifierNodeData, RULE_STATUS_OPTIONS, type ReplayInputVariables, type RuleAction, RuleActionBuilder, type RuleCondition, RuleConditionBuilder, type RuleConditionOperator, RuleFlowNode, RuleForm, type RuleFormValue, RuleNodeData, type RuleStatus, RunInputDialog, type RunInputDialogProps, RunPanel, RunReplayModal, type RunReplayModalProps, SaveStatusBadge, type SaveStatusBadgeProps, SelectionContextMenu, StartFlowNode, StartNodeData, StrandsIcon, SubworkflowModal, TIMEZONE_OPTIONS, TemplateTransformFlowNode, TemplateTransformNodeData, type TimeWindow, ToolCanvasData, ToolFlowNode, VariableAggregatorFlowNode, VariableAggregatorNodeData, VariableAssignerFlowNode, VariableAssignerNodeData, VariableInspector, VersionHistoryPanel, type WorkflowBuilderClient, WorkflowBuilderProvider, type WorkflowBuilderProviderProps, WorkflowEntityDefinition, WorkflowGraph, WorkflowListBar, type WorkflowStore, type WorkspaceBootstrapPayload, WorkspaceProps, defaultRuleAction, defaultRuleCondition, defaultRuleForm, getCompatibleModels, getDefaultFrameworkForModel, getEntityBadgeColor, getEntityGradient, getEntityHandleColor, getEntityIcon, getEntityMinimapColor, getFrameworkMeta, getModelIcon, getNodeExecutionAccent, getNodeExecutionAccentRgb, isModelCompatibleWithFramework, useCanRedo, useCanUndo, useCanvasShortcuts, useClipboard, useContextMenu, useEditingNodeId, useHasCopied, useHelpLines, useIsRunning, useModalStore, useNodeResults, useSelectedNodeCount, useSubworkflowStore, useUndoRedo, useWorkflowBuilderClient, useWorkflowBuilderClientOptional, useWorkflowStore };
|
|
889
|
+
export { AgentFlowNode, type AgentFramework, AgentModal, AgentNodeData, AgentOutputSchema, AgentToolFlowNode, AgentWithPrompts, AmazonNovaIcon, AnswerFlowNode, AnswerNodeData, AnthropicIcon, AnthropicModelIcon, AutoSaveWorkspace, type AutoSaveWorkspaceProps, CodeFlowNode, CodeNodeData, CrewAIIcon, DocumentExtractorFlowNode, DocumentExtractorNodeData, DslExportModal, DslImportModal, DynamicIslandConfirm, type DynamicIslandConfirmProps, EndFlowNode, EndNodeData, EntityFlowNode, EntityNodeData, FRAMEWORK_META, GoogleADKIcon, GroupFlowNode, GroupNodeData, HttpRequestFlowNode, HttpRequestNodeData, IfElseFlowNode, IfElseNodeData, IterationFlowNode, IterationNodeData, IterationStartFlowNode, IterationStartNodeData, KnowledgeBaseFlowNode, KnowledgeBaseNodeData, LOGIC_ICON_MAP, LOGIC_NODE_BADGE_COLORS, LOGIC_NODE_GRADIENTS, LOGIC_NODE_HANDLE_COLORS, LangChainIcon, LayoutDirection, ListOperatorFlowNode, ListOperatorNodeData, LogicNodeModal, MINIMAP_NODE_COLORS, MetaLlamaIcon, type ModelProvider, ModelProviderFlowNode, ModelProviderNodeData, NODE_EXECUTION_ACCENT_COLORS, NodeCard, NodeContextMenu, NodePalette, type NodeRunResult, NoteFlowNode, NoteNodeData, OpenAIIcon, OutputSchemaBuilder, type OutputSchemaBuilderProps, PanelContextMenu, ParameterExtractorFlowNode, ParameterExtractorNodeData, PipelineSettingsModal, type PipelineSettingsPatch, PreviewPanel, type PreviewPanelProps, QuestionClassifierFlowNode, QuestionClassifierNodeData, RULE_STATUS_OPTIONS, type ReplayInputVariables, type RuleAction, RuleActionBuilder, type RuleCondition, RuleConditionBuilder, type RuleConditionOperator, RuleFlowNode, RuleForm, type RuleFormValue, RuleNodeData, type RuleStatus, RunInputDialog, type RunInputDialogProps, RunPanel, RunReplayModal, type RunReplayModalProps, SaveStatusBadge, type SaveStatusBadgeProps, SelectionContextMenu, StartFlowNode, StartNodeData, StrandsIcon, SubworkflowModal, TIMEZONE_OPTIONS, TemplateTransformFlowNode, TemplateTransformNodeData, type TimeWindow, ToolCanvasData, ToolFlowNode, VariableAggregatorFlowNode, VariableAggregatorNodeData, VariableAssignerFlowNode, VariableAssignerNodeData, VariableInspector, VersionHistoryPanel, type WorkflowBuilderClient, WorkflowBuilderProvider, type WorkflowBuilderProviderProps, WorkflowEntityDefinition, WorkflowGraph, WorkflowListBar, type WorkflowStore, type WorkspaceBootstrapPayload, WorkspaceProps, defaultAgentOutputSchema, defaultRuleAction, defaultRuleCondition, defaultRuleForm, getCompatibleModels, getDefaultFrameworkForModel, getEntityBadgeColor, getEntityGradient, getEntityHandleColor, getEntityIcon, getEntityMinimapColor, getFrameworkMeta, getModelIcon, getNodeExecutionAccent, getNodeExecutionAccentRgb, isModelCompatibleWithFramework, useCanRedo, useCanUndo, useCanvasShortcuts, useClipboard, useContextMenu, useEditingNodeId, useHasCopied, useHelpLines, useIsRunning, useModalStore, useNodeResults, useSelectedNodeCount, useSubworkflowStore, useUndoRedo, useWorkflowBuilderClient, useWorkflowBuilderClientOptional, useWorkflowStore };
|
package/dist/astrlabe/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { A as AgentWithPrompts, a as AgentNodeData, T as ToolCanvasData, R as RuleNodeData, E as EntityNodeData, M as ModelProviderNodeData, S as StartNodeData, b as EndNodeData, I as IfElseNodeData, C as CodeNodeData, H as HttpRequestNodeData, c as TemplateTransformNodeData, d as IterationNodeData, K as KnowledgeBaseNodeData, e as AnswerNodeData, Q as QuestionClassifierNodeData, P as ParameterExtractorNodeData, V as VariableAssignerNodeData, f as VariableAggregatorNodeData, D as DocumentExtractorNodeData, L as ListOperatorNodeData, g as IterationStartNodeData, N as NoteNodeData, G as GroupNodeData, W as WorkflowEntityDefinition, h as WorkspaceProps } from '../workflow-canvas-NSxfr5dy.js';
|
|
2
2
|
export { i as AgentNodeTool, j as Workspace } from '../workflow-canvas-NSxfr5dy.js';
|
|
3
3
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
4
|
-
import { Workflow, WorkflowGraph, AgentModel, WorkflowTool, AgentRule, AgentPersistPayload, LogicNodeConfig, AgentTool, WorkflowRun } from './contracts.js';
|
|
5
|
-
export { ModelProviderNodeConfig, ModelProviderType } from './contracts.js';
|
|
4
|
+
import { Workflow, WorkflowGraph, AgentModel, WorkflowTool, AgentRule, AgentPersistPayload, LogicNodeConfig, AgentOutputSchema, AgentTool, WorkflowRun } from './contracts.js';
|
|
5
|
+
export { AgentNodeConfig, ModelProviderNodeConfig, ModelProviderType } from './contracts.js';
|
|
6
6
|
import * as React$1 from 'react';
|
|
7
7
|
import { ReactNode, ComponentProps } from 'react';
|
|
8
8
|
export { GraphNodeBadge, GraphNodeHeader, GraphNodeIconBubble, GraphNodeMeta } from './graph-node.js';
|
|
@@ -273,6 +273,19 @@ type RunReplayModalProps = {
|
|
|
273
273
|
};
|
|
274
274
|
declare function RunReplayModal({ open, onClose, runId, workflowId, originalInputs, onReplay, }: RunReplayModalProps): react_jsx_runtime.JSX.Element;
|
|
275
275
|
|
|
276
|
+
type OutputSchemaBuilderProps = {
|
|
277
|
+
/** Stored schema. `undefined` renders the "no schema yet" state with
|
|
278
|
+
* a single button to create one. */
|
|
279
|
+
value?: AgentOutputSchema;
|
|
280
|
+
onChange: (next: AgentOutputSchema | undefined) => void;
|
|
281
|
+
/** Recursion depth — used to cap the nesting UI offers (deeper trees
|
|
282
|
+
* are still expressible by hand-editing JSON, but the visual builder
|
|
283
|
+
* tops out at 2 to keep the page readable). */
|
|
284
|
+
depth?: number;
|
|
285
|
+
};
|
|
286
|
+
declare function OutputSchemaBuilder({ value, onChange, depth }: OutputSchemaBuilderProps): react_jsx_runtime.JSX.Element;
|
|
287
|
+
declare function defaultAgentOutputSchema(): AgentOutputSchema;
|
|
288
|
+
|
|
276
289
|
/**
|
|
277
290
|
* Rule editing types.
|
|
278
291
|
*
|
|
@@ -873,4 +886,4 @@ declare function getEntityBadgeColor(entityKey: string | undefined): string;
|
|
|
873
886
|
declare function getEntityHandleColor(entityKey: string | undefined): string;
|
|
874
887
|
declare function getEntityMinimapColor(entityKey: string | undefined): string;
|
|
875
888
|
|
|
876
|
-
export { AgentFlowNode, type AgentFramework, AgentModal, AgentNodeData, AgentToolFlowNode, AgentWithPrompts, AmazonNovaIcon, AnswerFlowNode, AnswerNodeData, AnthropicIcon, AnthropicModelIcon, AutoSaveWorkspace, type AutoSaveWorkspaceProps, CodeFlowNode, CodeNodeData, CrewAIIcon, DocumentExtractorFlowNode, DocumentExtractorNodeData, DslExportModal, DslImportModal, DynamicIslandConfirm, type DynamicIslandConfirmProps, EndFlowNode, EndNodeData, EntityFlowNode, EntityNodeData, FRAMEWORK_META, GoogleADKIcon, GroupFlowNode, GroupNodeData, HttpRequestFlowNode, HttpRequestNodeData, IfElseFlowNode, IfElseNodeData, IterationFlowNode, IterationNodeData, IterationStartFlowNode, IterationStartNodeData, KnowledgeBaseFlowNode, KnowledgeBaseNodeData, LOGIC_ICON_MAP, LOGIC_NODE_BADGE_COLORS, LOGIC_NODE_GRADIENTS, LOGIC_NODE_HANDLE_COLORS, LangChainIcon, LayoutDirection, ListOperatorFlowNode, ListOperatorNodeData, LogicNodeModal, MINIMAP_NODE_COLORS, MetaLlamaIcon, type ModelProvider, ModelProviderFlowNode, ModelProviderNodeData, NODE_EXECUTION_ACCENT_COLORS, NodeCard, NodeContextMenu, NodePalette, type NodeRunResult, NoteFlowNode, NoteNodeData, OpenAIIcon, PanelContextMenu, ParameterExtractorFlowNode, ParameterExtractorNodeData, PipelineSettingsModal, type PipelineSettingsPatch, PreviewPanel, type PreviewPanelProps, QuestionClassifierFlowNode, QuestionClassifierNodeData, RULE_STATUS_OPTIONS, type ReplayInputVariables, type RuleAction, RuleActionBuilder, type RuleCondition, RuleConditionBuilder, type RuleConditionOperator, RuleFlowNode, RuleForm, type RuleFormValue, RuleNodeData, type RuleStatus, RunInputDialog, type RunInputDialogProps, RunPanel, RunReplayModal, type RunReplayModalProps, SaveStatusBadge, type SaveStatusBadgeProps, SelectionContextMenu, StartFlowNode, StartNodeData, StrandsIcon, SubworkflowModal, TIMEZONE_OPTIONS, TemplateTransformFlowNode, TemplateTransformNodeData, type TimeWindow, ToolCanvasData, ToolFlowNode, VariableAggregatorFlowNode, VariableAggregatorNodeData, VariableAssignerFlowNode, VariableAssignerNodeData, VariableInspector, VersionHistoryPanel, type WorkflowBuilderClient, WorkflowBuilderProvider, type WorkflowBuilderProviderProps, WorkflowEntityDefinition, WorkflowGraph, WorkflowListBar, type WorkflowStore, type WorkspaceBootstrapPayload, WorkspaceProps, defaultRuleAction, defaultRuleCondition, defaultRuleForm, getCompatibleModels, getDefaultFrameworkForModel, getEntityBadgeColor, getEntityGradient, getEntityHandleColor, getEntityIcon, getEntityMinimapColor, getFrameworkMeta, getModelIcon, getNodeExecutionAccent, getNodeExecutionAccentRgb, isModelCompatibleWithFramework, useCanRedo, useCanUndo, useCanvasShortcuts, useClipboard, useContextMenu, useEditingNodeId, useHasCopied, useHelpLines, useIsRunning, useModalStore, useNodeResults, useSelectedNodeCount, useSubworkflowStore, useUndoRedo, useWorkflowBuilderClient, useWorkflowBuilderClientOptional, useWorkflowStore };
|
|
889
|
+
export { AgentFlowNode, type AgentFramework, AgentModal, AgentNodeData, AgentOutputSchema, AgentToolFlowNode, AgentWithPrompts, AmazonNovaIcon, AnswerFlowNode, AnswerNodeData, AnthropicIcon, AnthropicModelIcon, AutoSaveWorkspace, type AutoSaveWorkspaceProps, CodeFlowNode, CodeNodeData, CrewAIIcon, DocumentExtractorFlowNode, DocumentExtractorNodeData, DslExportModal, DslImportModal, DynamicIslandConfirm, type DynamicIslandConfirmProps, EndFlowNode, EndNodeData, EntityFlowNode, EntityNodeData, FRAMEWORK_META, GoogleADKIcon, GroupFlowNode, GroupNodeData, HttpRequestFlowNode, HttpRequestNodeData, IfElseFlowNode, IfElseNodeData, IterationFlowNode, IterationNodeData, IterationStartFlowNode, IterationStartNodeData, KnowledgeBaseFlowNode, KnowledgeBaseNodeData, LOGIC_ICON_MAP, LOGIC_NODE_BADGE_COLORS, LOGIC_NODE_GRADIENTS, LOGIC_NODE_HANDLE_COLORS, LangChainIcon, LayoutDirection, ListOperatorFlowNode, ListOperatorNodeData, LogicNodeModal, MINIMAP_NODE_COLORS, MetaLlamaIcon, type ModelProvider, ModelProviderFlowNode, ModelProviderNodeData, NODE_EXECUTION_ACCENT_COLORS, NodeCard, NodeContextMenu, NodePalette, type NodeRunResult, NoteFlowNode, NoteNodeData, OpenAIIcon, OutputSchemaBuilder, type OutputSchemaBuilderProps, PanelContextMenu, ParameterExtractorFlowNode, ParameterExtractorNodeData, PipelineSettingsModal, type PipelineSettingsPatch, PreviewPanel, type PreviewPanelProps, QuestionClassifierFlowNode, QuestionClassifierNodeData, RULE_STATUS_OPTIONS, type ReplayInputVariables, type RuleAction, RuleActionBuilder, type RuleCondition, RuleConditionBuilder, type RuleConditionOperator, RuleFlowNode, RuleForm, type RuleFormValue, RuleNodeData, type RuleStatus, RunInputDialog, type RunInputDialogProps, RunPanel, RunReplayModal, type RunReplayModalProps, SaveStatusBadge, type SaveStatusBadgeProps, SelectionContextMenu, StartFlowNode, StartNodeData, StrandsIcon, SubworkflowModal, TIMEZONE_OPTIONS, TemplateTransformFlowNode, TemplateTransformNodeData, type TimeWindow, ToolCanvasData, ToolFlowNode, VariableAggregatorFlowNode, VariableAggregatorNodeData, VariableAssignerFlowNode, VariableAssignerNodeData, VariableInspector, VersionHistoryPanel, type WorkflowBuilderClient, WorkflowBuilderProvider, type WorkflowBuilderProviderProps, WorkflowEntityDefinition, WorkflowGraph, WorkflowListBar, type WorkflowStore, type WorkspaceBootstrapPayload, WorkspaceProps, defaultAgentOutputSchema, defaultRuleAction, defaultRuleCondition, defaultRuleForm, getCompatibleModels, getDefaultFrameworkForModel, getEntityBadgeColor, getEntityGradient, getEntityHandleColor, getEntityIcon, getEntityMinimapColor, getFrameworkMeta, getModelIcon, getNodeExecutionAccent, getNodeExecutionAccentRgb, isModelCompatibleWithFramework, useCanRedo, useCanUndo, useCanvasShortcuts, useClipboard, useContextMenu, useEditingNodeId, useHasCopied, useHelpLines, useIsRunning, useModalStore, useNodeResults, useSelectedNodeCount, useSubworkflowStore, useUndoRedo, useWorkflowBuilderClient, useWorkflowBuilderClientOptional, useWorkflowStore };
|
package/dist/astrlabe/index.js
CHANGED
|
@@ -1781,6 +1781,211 @@ function parseRow(row) {
|
|
|
1781
1781
|
}
|
|
1782
1782
|
}
|
|
1783
1783
|
}
|
|
1784
|
+
var PRIMITIVE_TYPES = [
|
|
1785
|
+
{ value: "string", label: "string" },
|
|
1786
|
+
{ value: "number", label: "number" },
|
|
1787
|
+
{ value: "integer", label: "integer" },
|
|
1788
|
+
{ value: "boolean", label: "boolean" }
|
|
1789
|
+
];
|
|
1790
|
+
var COMPLEX_TYPES = [
|
|
1791
|
+
{ value: "object", label: "object (nested)" },
|
|
1792
|
+
{ value: "array", label: "array of objects" }
|
|
1793
|
+
];
|
|
1794
|
+
var ALL_TYPES = [...PRIMITIVE_TYPES, ...COMPLEX_TYPES];
|
|
1795
|
+
function OutputSchemaBuilder({ value, onChange, depth = 0 }) {
|
|
1796
|
+
const fields = react.useMemo(() => {
|
|
1797
|
+
if (!value || value.type !== "object") return [];
|
|
1798
|
+
return buildFieldRows(value);
|
|
1799
|
+
}, [value]);
|
|
1800
|
+
if (!value) {
|
|
1801
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-xl border border-dashed border-slate-300 bg-slate-50/40 p-4 text-center dark:border-slate-700 dark:bg-slate-900/30", children: [
|
|
1802
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-3 text-xs text-slate-500 dark:text-slate-400", children: "No schema yet \u2014 agent text is exposed as a raw string. Add a schema to enforce structured output." }),
|
|
1803
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1804
|
+
chunkTUEYBNWL_js.Button,
|
|
1805
|
+
{
|
|
1806
|
+
type: "button",
|
|
1807
|
+
outline: true,
|
|
1808
|
+
onClick: () => onChange({ type: "object", properties: {}, required: [] }),
|
|
1809
|
+
children: "+ Add output schema"
|
|
1810
|
+
}
|
|
1811
|
+
)
|
|
1812
|
+
] });
|
|
1813
|
+
}
|
|
1814
|
+
if (value.type !== "object") {
|
|
1815
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-xl border border-amber-300 bg-amber-50/40 p-3 text-xs text-amber-700 dark:border-amber-700 dark:bg-amber-900/20 dark:text-amber-300", children: [
|
|
1816
|
+
"The visual builder only supports `type: object` at the top level. Convert manually or",
|
|
1817
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1818
|
+
"button",
|
|
1819
|
+
{
|
|
1820
|
+
type: "button",
|
|
1821
|
+
className: "ml-1 underline",
|
|
1822
|
+
onClick: () => onChange({ type: "object", properties: {}, required: [] }),
|
|
1823
|
+
children: "reset to object"
|
|
1824
|
+
}
|
|
1825
|
+
),
|
|
1826
|
+
"."
|
|
1827
|
+
] });
|
|
1828
|
+
}
|
|
1829
|
+
const updateFields = (next) => {
|
|
1830
|
+
onChange(rowsToSchema(next));
|
|
1831
|
+
};
|
|
1832
|
+
const addField = () => {
|
|
1833
|
+
updateFields([
|
|
1834
|
+
...fields,
|
|
1835
|
+
{ name: "", type: "string", description: "", required: false, child: void 0 }
|
|
1836
|
+
]);
|
|
1837
|
+
};
|
|
1838
|
+
const removeField = (index) => {
|
|
1839
|
+
updateFields(fields.filter((_, i) => i !== index));
|
|
1840
|
+
};
|
|
1841
|
+
const patchField = (index, patch) => {
|
|
1842
|
+
updateFields(fields.map((f, i) => i === index ? { ...f, ...patch } : f));
|
|
1843
|
+
};
|
|
1844
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-3", children: [
|
|
1845
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
1846
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs font-medium text-slate-700 dark:text-slate-200", children: "Top-level fields" }),
|
|
1847
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1848
|
+
"button",
|
|
1849
|
+
{
|
|
1850
|
+
type: "button",
|
|
1851
|
+
className: "text-xs text-rose-600 hover:text-rose-500",
|
|
1852
|
+
onClick: () => onChange(void 0),
|
|
1853
|
+
children: "Remove schema"
|
|
1854
|
+
}
|
|
1855
|
+
)
|
|
1856
|
+
] }),
|
|
1857
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
|
|
1858
|
+
fields.map((field, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1859
|
+
FieldEditor,
|
|
1860
|
+
{
|
|
1861
|
+
field,
|
|
1862
|
+
onChange: (patch) => patchField(index, patch),
|
|
1863
|
+
onRemove: () => removeField(index),
|
|
1864
|
+
depth
|
|
1865
|
+
},
|
|
1866
|
+
index
|
|
1867
|
+
)),
|
|
1868
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.Button, { type: "button", outline: true, onClick: addField, children: "+ Add field" })
|
|
1869
|
+
] })
|
|
1870
|
+
] });
|
|
1871
|
+
}
|
|
1872
|
+
function FieldEditor({
|
|
1873
|
+
field,
|
|
1874
|
+
onChange,
|
|
1875
|
+
onRemove,
|
|
1876
|
+
depth
|
|
1877
|
+
}) {
|
|
1878
|
+
const handleTypeChange = (next) => {
|
|
1879
|
+
if (next === "object") {
|
|
1880
|
+
onChange({ type: next, child: { type: "object", properties: {}, required: [] } });
|
|
1881
|
+
} else if (next === "array") {
|
|
1882
|
+
onChange({ type: next, child: { type: "object", properties: {}, required: [] } });
|
|
1883
|
+
} else {
|
|
1884
|
+
onChange({ type: next, child: void 0 });
|
|
1885
|
+
}
|
|
1886
|
+
};
|
|
1887
|
+
const isComplex = field.type === "object" || field.type === "array";
|
|
1888
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded-xl border border-slate-200 bg-slate-50/60 p-3 dark:border-slate-700 dark:bg-slate-900/40", children: [
|
|
1889
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid grid-cols-[1fr_140px_auto_auto] items-end gap-2", children: [
|
|
1890
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1891
|
+
chunkTUEYBNWL_js.FormInput,
|
|
1892
|
+
{
|
|
1893
|
+
label: "Name",
|
|
1894
|
+
value: field.name,
|
|
1895
|
+
onValueChange: (name) => onChange({ name }),
|
|
1896
|
+
placeholder: "recommendedPrice"
|
|
1897
|
+
}
|
|
1898
|
+
),
|
|
1899
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1900
|
+
chunkTUEYBNWL_js.FormSelect,
|
|
1901
|
+
{
|
|
1902
|
+
label: "Type",
|
|
1903
|
+
value: field.type,
|
|
1904
|
+
options: ALL_TYPES.map((t) => ({ value: t.value, label: t.label })),
|
|
1905
|
+
onValueChange: (t) => handleTypeChange(t)
|
|
1906
|
+
}
|
|
1907
|
+
),
|
|
1908
|
+
/* @__PURE__ */ jsxRuntime.jsxs("label", { className: "flex items-center gap-2 pb-2 text-xs text-slate-700 dark:text-slate-200", children: [
|
|
1909
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1910
|
+
"input",
|
|
1911
|
+
{
|
|
1912
|
+
type: "checkbox",
|
|
1913
|
+
checked: field.required,
|
|
1914
|
+
onChange: (event) => onChange({ required: event.target.checked }),
|
|
1915
|
+
className: "h-4 w-4 rounded border-slate-300"
|
|
1916
|
+
}
|
|
1917
|
+
),
|
|
1918
|
+
"Required"
|
|
1919
|
+
] }),
|
|
1920
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkTUEYBNWL_js.Button, { type: "button", plain: true, onClick: onRemove, children: "Remove" })
|
|
1921
|
+
] }),
|
|
1922
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1923
|
+
chunkTUEYBNWL_js.FormInput,
|
|
1924
|
+
{
|
|
1925
|
+
label: "Description (optional)",
|
|
1926
|
+
value: field.description,
|
|
1927
|
+
onValueChange: (description) => onChange({ description }),
|
|
1928
|
+
placeholder: "What the model should put here"
|
|
1929
|
+
}
|
|
1930
|
+
),
|
|
1931
|
+
isComplex && depth < 1 && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "mt-3 rounded-lg border border-dashed border-slate-300 p-2 dark:border-slate-700", children: [
|
|
1932
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "mb-2 text-[11px] uppercase tracking-wider text-slate-400", children: field.type === "array" ? "Item shape" : "Nested fields" }),
|
|
1933
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1934
|
+
OutputSchemaBuilder,
|
|
1935
|
+
{
|
|
1936
|
+
value: field.child,
|
|
1937
|
+
onChange: (child) => onChange({ child }),
|
|
1938
|
+
depth: depth + 1
|
|
1939
|
+
}
|
|
1940
|
+
)
|
|
1941
|
+
] }),
|
|
1942
|
+
isComplex && depth >= 1 && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-2 text-[11px] italic text-slate-500", children: "Deeper nesting is supported by the engine but not by this builder \u2014 edit the JSON directly if you need a third level." })
|
|
1943
|
+
] });
|
|
1944
|
+
}
|
|
1945
|
+
function buildFieldRows(schema) {
|
|
1946
|
+
const properties = schema.properties ?? {};
|
|
1947
|
+
const required = new Set(schema.required ?? []);
|
|
1948
|
+
return Object.entries(properties).map(([name, subschema]) => {
|
|
1949
|
+
const t = subschema.type ?? "string";
|
|
1950
|
+
const isObject = t === "object";
|
|
1951
|
+
const isArray = t === "array";
|
|
1952
|
+
return {
|
|
1953
|
+
name,
|
|
1954
|
+
type: isObject ? "object" : isArray ? "array" : t,
|
|
1955
|
+
description: subschema.description ?? "",
|
|
1956
|
+
required: required.has(name),
|
|
1957
|
+
child: isObject ? subschema : isArray ? subschema.items : void 0
|
|
1958
|
+
};
|
|
1959
|
+
});
|
|
1960
|
+
}
|
|
1961
|
+
function rowsToSchema(rows) {
|
|
1962
|
+
const properties = {};
|
|
1963
|
+
const required = [];
|
|
1964
|
+
for (const row of rows) {
|
|
1965
|
+
const name = row.name.trim();
|
|
1966
|
+
if (!name) continue;
|
|
1967
|
+
let entry;
|
|
1968
|
+
if (row.type === "object") {
|
|
1969
|
+
entry = row.child && row.child.type === "object" ? row.child : { type: "object", properties: {}, required: [] };
|
|
1970
|
+
} else if (row.type === "array") {
|
|
1971
|
+
entry = {
|
|
1972
|
+
type: "array",
|
|
1973
|
+
items: row.child ?? { type: "object", properties: {}, required: [] }
|
|
1974
|
+
};
|
|
1975
|
+
} else {
|
|
1976
|
+
entry = { type: row.type };
|
|
1977
|
+
}
|
|
1978
|
+
if (row.description) entry.description = row.description;
|
|
1979
|
+
properties[name] = entry;
|
|
1980
|
+
if (row.required) required.push(name);
|
|
1981
|
+
}
|
|
1982
|
+
const out = { type: "object", properties };
|
|
1983
|
+
if (required.length > 0) out.required = required;
|
|
1984
|
+
return out;
|
|
1985
|
+
}
|
|
1986
|
+
function defaultAgentOutputSchema() {
|
|
1987
|
+
return { type: "object", properties: {}, required: [] };
|
|
1988
|
+
}
|
|
1784
1989
|
|
|
1785
1990
|
// src/astrlabe/components/rules/types.ts
|
|
1786
1991
|
var RULE_STATUS_OPTIONS = ["draft", "active", "archived"];
|
|
@@ -4829,6 +5034,7 @@ exports.DslImportModal = DslImportModal;
|
|
|
4829
5034
|
exports.DynamicIslandConfirm = DynamicIslandConfirm2;
|
|
4830
5035
|
exports.MetaLlamaIcon = MetaLlamaIcon;
|
|
4831
5036
|
exports.NodePalette = NodePalette;
|
|
5037
|
+
exports.OutputSchemaBuilder = OutputSchemaBuilder;
|
|
4832
5038
|
exports.PipelineSettingsModal = PipelineSettingsModal;
|
|
4833
5039
|
exports.PreviewPanel = PreviewPanel;
|
|
4834
5040
|
exports.RULE_STATUS_OPTIONS = RULE_STATUS_OPTIONS;
|
|
@@ -4844,6 +5050,7 @@ exports.TIMEZONE_OPTIONS = TIMEZONE_OPTIONS;
|
|
|
4844
5050
|
exports.VariableInspector = VariableInspector;
|
|
4845
5051
|
exports.VersionHistoryPanel = VersionHistoryPanel;
|
|
4846
5052
|
exports.WorkflowListBar = WorkflowListBar;
|
|
5053
|
+
exports.defaultAgentOutputSchema = defaultAgentOutputSchema;
|
|
4847
5054
|
exports.defaultRuleAction = defaultRuleAction;
|
|
4848
5055
|
exports.defaultRuleCondition = defaultRuleCondition;
|
|
4849
5056
|
exports.defaultRuleForm = defaultRuleForm;
|