@sim-design/training 1.0.0 → 1.1.0
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/README.md +481 -15
- package/dist/{ArrowLeftOutlined-CiSQq3bL.js → ArrowLeftOutlined-BxA84GXs.js} +1 -1
- package/dist/ArrowLeftOutlined-D785XjyB.js +12 -0
- package/dist/{AssessmentPlugin-Bx4VrBdV.js → AssessmentPlugin-D_iesmyg.js} +7 -7
- package/dist/AssessmentPlugin-zRr-IsdA.js +607 -0
- package/dist/CaseAnalysisPlugin-CXuQpkPd.js +2196 -0
- package/dist/CaseAnalysisPlugin-DytlXsRD.js +2196 -0
- package/dist/CaseDetailContent-DT5nCtRT.js +28613 -0
- package/dist/CaseDetailContent-Y7Q430MG.js +28595 -0
- package/dist/{CharacterDialoguePanel-Bvdab3qj.js → CharacterDialoguePanel-CdtUl-Sv.js} +178 -139
- package/dist/CharacterDialoguePanel-D_4YNFZv.js +815 -0
- package/dist/{CheckCircleFilled-Byo8CDfW.js → CheckCircleFilled-CnslIY7j.js} +1 -1
- package/dist/CheckCircleFilled-NvZaC2sk.js +12 -0
- package/dist/DecisionMakingPlugin-B_KQUFzW.js +1385 -0
- package/dist/DecisionMakingPlugin-ILLGek3S.js +1385 -0
- package/dist/{DecisionSelectPlugin-DtQ2KV34.js → DecisionSelectPlugin-BGQiHGBK.js} +20 -11
- package/dist/DecisionSelectPlugin-Bqmh6XGh.js +872 -0
- package/dist/{DecisionShared-Dh9oeQFT.js → DecisionShared-BHq1lEqt.js} +2 -2
- package/dist/DecisionShared-Be-zKZLT.js +65 -0
- package/dist/DeleteOutlined-BvMjU7m5.js +12 -0
- package/dist/DeleteOutlined-Dqy6M2LH.js +12 -0
- package/dist/{CustomLayoutRenderer--rnQrqQ2.js → DialogueFormPlugin-BpCeFadt.js} +22724 -21631
- package/dist/DialogueFormPlugin-CXlbxX-z.js +123617 -0
- package/dist/DialoguePlugin-CO7Nzv0K.js +596 -0
- package/dist/DialoguePlugin-DDNdsylz.js +596 -0
- package/dist/DocumentReviewPlugin-2CnKQwVG.js +1967 -0
- package/dist/DocumentReviewPlugin-qYYrnjvE.js +1967 -0
- package/dist/{EyeOutlined-XvOAKlLs.js → EyeOutlined-BrKCNjui.js} +1 -1
- package/dist/EyeOutlined-CW0tYV0f.js +12 -0
- package/dist/FormFillingPlugin-C3h8ySOZ.js +969 -0
- package/dist/FormFillingPlugin-CPmd76Qr.js +969 -0
- package/dist/HolderOutlined-CH0tShWu.js +12 -0
- package/dist/HolderOutlined-Dm6TBtqf.js +12 -0
- package/dist/ModelEditor-BjEbFloQ.js +11753 -0
- package/dist/ModelEditor-CwR67DFQ.js +11753 -0
- package/dist/{ProcessOperationPlugin-IijngDlX.js → ProcessOperationPlugin-1Lz431aC.js} +12 -12
- package/dist/ProcessOperationPlugin-BkmdG3ch.js +88 -0
- package/dist/QAPlugin-0C4kpq3J.js +172 -0
- package/dist/QAPlugin-UC8uywcg.js +172 -0
- package/dist/{ReloadOutlined-Daor2m11.js → ReloadOutlined-BZ92nlYF.js} +1 -1
- package/dist/ReloadOutlined-CYoPOwLl.js +12 -0
- package/dist/{SettingOutlined-CLEOgXB-.js → SettingOutlined-F466s0Ti.js} +33 -65
- package/dist/SettingOutlined-c2hikCfN.js +60 -0
- package/dist/StarFilled-Bilmj6UK.js +28 -0
- package/dist/StarFilled-CtH30fL0.js +28 -0
- package/dist/StrategyLabPlugin-CvO07sXV.js +12445 -0
- package/dist/StrategyLabPlugin-DUqZYctQ.js +12445 -0
- package/dist/ThunderboltOutlined-BpmoCKdV.js +28 -0
- package/dist/ThunderboltOutlined-DDQFi5Cv.js +28 -0
- package/dist/TrainingModelContainer-DqCsdC7C.js +11241 -0
- package/dist/TrainingModelContainer-yi8W6KFl.js +11241 -0
- package/dist/{UndoOutlined-ChUQYUul.js → UndoOutlined-6JZVzmdX.js} +26 -42
- package/dist/UndoOutlined-Dw6_9_OL.js +68 -0
- package/dist/{WarningFilled-1Rc4hr0C.js → WarningFilled-Cy1tvuQy.js} +1 -1
- package/dist/WarningFilled-lkr453eh.js +12 -0
- package/dist/{adapters-D1FFZFoA.js → adapters-BbCnXSYo.js} +2 -2
- package/dist/{analysisTools-CXyOvSZT.js → analysisTools-Cp5-3DaU.js} +59 -12
- package/dist/creator.js +4 -2
- package/dist/designTokens-walF_QkZ.js +23 -0
- package/dist/images/healthcare/bg.jpg +0 -0
- package/dist/{index-CYjdXPgc.js → index-C71iHgSs.js} +2640 -2722
- package/dist/{index-XuBVjlmu.js → index-CBvqcbIU.js} +7214 -7643
- package/dist/index-D94YNWTb.js +433 -0
- package/dist/index-DSYmOXnQ.js +6486 -0
- package/dist/index-fP97rKeQ.js +433 -0
- package/dist/index.js +8 -6
- package/dist/judgement-xTGXlDcn.js +29 -0
- package/dist/runtime.js +1 -1
- package/dist/sortable.esm-bm_c5vmI.js +3307 -0
- package/dist/types.js +1 -1
- package/dist/useDialogueLogic-D1lkUKUZ.js +576 -0
- package/dist/useDialogueLogic-vOJ9XRNP.js +576 -0
- package/dist-types/client/src/admin/CaseDataEditor.d.ts +20 -0
- package/dist-types/client/src/admin/CaseEditor.d.ts +19 -0
- package/dist-types/client/src/admin/DialogueFormCheckRulesEditor.d.ts +11 -0
- package/dist-types/client/src/admin/DialogueFormInitDataEditor.d.ts +31 -0
- package/dist-types/client/src/admin/InitDataEditors.d.ts +7 -0
- package/dist-types/client/src/admin/ModelEditor.d.ts +11 -0
- package/dist-types/client/src/admin/ModelPreview.d.ts +13 -0
- package/dist-types/client/src/admin/OptionSelector.d.ts +32 -0
- package/dist-types/client/src/admin/StageStepEditor.d.ts +20 -0
- package/dist-types/client/src/admin/StepAnswerKeyEditor.d.ts +19 -0
- package/dist-types/client/src/admin/StepByStepCreator.d.ts +27 -0
- package/dist-types/client/src/admin/components/AbilityMapEditor.d.ts +12 -0
- package/dist-types/client/src/admin/components/CasePreview.d.ts +8 -0
- package/dist-types/client/src/admin/components/StepAbilitySelector.d.ts +9 -0
- package/dist-types/client/src/admin/constants/creatorConstants.d.ts +39 -0
- package/dist-types/client/src/admin/editors/CaseAnalysisEditor.d.ts +11 -0
- package/dist-types/client/src/admin/editors/DecisionMakingEditor.d.ts +7 -0
- package/dist-types/client/src/admin/editors/DialogueEditor.d.ts +12 -0
- package/dist-types/client/src/admin/editors/DocumentReviewEditor.d.ts +7 -0
- package/dist-types/client/src/admin/editors/DocumentReviewRuntimeRulesEditor.d.ts +15 -0
- package/dist-types/client/src/admin/editors/FormFillingEditor.d.ts +33 -0
- package/dist-types/client/src/admin/editors/ModelUIConfigEditor.d.ts +5 -0
- package/dist-types/client/src/admin/editors/QAEditor.d.ts +6 -0
- package/dist-types/client/src/admin/editors/RouterEditors.d.ts +18 -0
- package/dist-types/client/src/admin/editors/StepBriefingEditor.d.ts +14 -0
- package/dist-types/client/src/admin/editors/StrategyLabEditor.d.ts +24 -0
- package/dist-types/client/src/admin/editors/decisionEditorParts.d.ts +18 -0
- package/dist-types/client/src/admin/editors/index.d.ts +8 -0
- package/dist-types/client/src/admin/editors/shared.d.ts +17 -0
- package/dist-types/client/src/admin/hooks/useStep1Intent.d.ts +16 -0
- package/dist-types/client/src/admin/hooks/useStep2Outline.d.ts +41 -0
- package/dist-types/client/src/admin/hooks/useStep3Details.d.ts +123 -0
- package/dist-types/client/src/admin/hooks/useStep4Cases.d.ts +48 -0
- package/dist-types/client/src/admin/hooks/useStep5Validation.d.ts +16 -0
- package/dist-types/client/src/admin/landingValidation.d.ts +74 -0
- package/dist-types/client/src/admin/schemaFieldUtils.d.ts +55 -0
- package/dist-types/client/src/admin/services.d.ts +461 -0
- package/dist-types/client/src/admin/shared-editors.d.ts +31 -0
- package/dist-types/client/src/admin/types/creatorArtifacts.d.ts +140 -0
- package/dist-types/client/src/components/AbilityMapView.d.ts +15 -0
- package/dist-types/client/src/components/CaseDetail/CaseDetailContent.d.ts +12 -0
- package/dist-types/client/src/components/ConversationalDataCollector/IntentConfirmPanel.d.ts +20 -0
- package/dist-types/client/src/components/ConversationalDataCollector/index.d.ts +7 -0
- package/dist-types/client/src/components/ConversationalDataCollector/intentState.d.ts +24 -0
- package/dist-types/client/src/components/ConversationalDataCollector/types.d.ts +95 -0
- package/dist-types/client/src/components/ConversationalDataCollector/utils.d.ts +62 -0
- package/dist-types/client/src/components/CustomLayoutRenderer.d.ts +8 -0
- package/dist-types/client/src/components/MarkdownRenderer.d.ts +15 -0
- package/dist-types/client/src/components/StrategyLabScene/VisualInputComponents.d.ts +85 -0
- package/dist-types/client/src/components/StrategyLabScene/components/AdversarialView.d.ts +18 -0
- package/dist-types/client/src/components/StrategyLabScene/components/BottomBar.d.ts +22 -0
- package/dist-types/client/src/components/StrategyLabScene/components/CharacterCard.d.ts +14 -0
- package/dist-types/client/src/components/StrategyLabScene/components/CharacterDialoguePanel.d.ts +32 -0
- package/dist-types/client/src/components/StrategyLabScene/components/CollaborativeView.d.ts +20 -0
- package/dist-types/client/src/components/StrategyLabScene/components/ComparisonView.d.ts +16 -0
- package/dist-types/client/src/components/StrategyLabScene/components/DecisionInput.d.ts +27 -0
- package/dist-types/client/src/components/StrategyLabScene/components/DecisionSwitcher.d.ts +14 -0
- package/dist-types/client/src/components/StrategyLabScene/components/EvaluationReport.d.ts +13 -0
- package/dist-types/client/src/components/StrategyLabScene/components/NodeChainPanels.d.ts +32 -0
- package/dist-types/client/src/components/StrategyLabScene/components/ProgressSteps.d.ts +15 -0
- package/dist-types/client/src/components/StrategyLabScene/components/SandboxView.d.ts +19 -0
- package/dist-types/client/src/components/StrategyLabScene/components/ScenarioPanel.d.ts +17 -0
- package/dist-types/client/src/components/StrategyLabScene/components/SimulationAnimation.d.ts +13 -0
- package/dist-types/client/src/components/StrategyLabScene/components/SimulationResult.d.ts +15 -0
- package/dist-types/client/src/components/StrategyLabScene/components/StressTestView.d.ts +22 -0
- package/dist-types/client/src/components/StrategyLabScene/themeMatching.d.ts +21 -0
- package/dist-types/client/src/components/StrategyLabScene/themes/education.d.ts +45 -0
- package/dist-types/client/src/components/StrategyLabScene/themes/healthcare.d.ts +7 -0
- package/dist-types/client/src/components/StrategyLabScene/themes/index.d.ts +22 -0
- package/dist-types/client/src/components/StrategyLabScene/themes/professional.d.ts +7 -0
- package/dist-types/client/src/components/StrategyLabScene/themes/technology.d.ts +7 -0
- package/dist-types/client/src/components/StrategyLabScene/types.d.ts +82 -0
- package/dist-types/client/src/components/StrategyLabScene/views/UnifiedStrategyLabView.d.ts +72 -0
- package/dist-types/client/src/components/TrainingEngine/BriefingQAChat.d.ts +19 -0
- package/dist-types/client/src/components/TrainingEngine/CaseInfoModal.d.ts +12 -0
- package/dist-types/client/src/components/TrainingEngine/CaseSelector.d.ts +15 -0
- package/dist-types/client/src/components/TrainingEngine/ClassicView.d.ts +7 -0
- package/dist-types/client/src/components/TrainingEngine/DashboardHomePage.d.ts +7 -0
- package/dist-types/client/src/components/TrainingEngine/EnhancedStudentProfilePanel.d.ts +9 -0
- package/dist-types/client/src/components/TrainingEngine/EvaluationPanel.d.ts +8 -0
- package/dist-types/client/src/components/TrainingEngine/GlobalQAPanel.d.ts +34 -0
- package/dist-types/client/src/components/TrainingEngine/GuidanceHistoryDrawer.d.ts +7 -0
- package/dist-types/client/src/components/TrainingEngine/GuidancePanel.d.ts +3 -0
- package/dist-types/client/src/components/TrainingEngine/ImmersiveGameView.d.ts +7 -0
- package/dist-types/client/src/components/TrainingEngine/PluginRenderer.d.ts +15 -0
- package/dist-types/client/src/components/TrainingEngine/ProgressTracker.d.ts +3 -0
- package/dist-types/client/src/components/TrainingEngine/StageAssessingOverlay.d.ts +17 -0
- package/dist-types/client/src/components/TrainingEngine/StageAssessmentPanel.d.ts +10 -0
- package/dist-types/client/src/components/TrainingEngine/StepExecutor.d.ts +20 -0
- package/dist-types/client/src/components/TrainingEngine/StepNodeMap.d.ts +15 -0
- package/dist-types/client/src/components/TrainingEngine/StudentProfilePanel.d.ts +6 -0
- package/dist-types/client/src/components/TrainingEngine/ThemeContext.d.ts +8 -0
- package/dist-types/client/src/components/TrainingEngine/TrainingMaterialsSidebar.d.ts +21 -0
- package/dist-types/client/src/components/TrainingEngine/TrainingModelContainer.d.ts +42 -0
- package/dist-types/client/src/components/TrainingEngine/ViewProps.d.ts +37 -0
- package/dist-types/client/src/components/TrainingEngine/profileDataSelectors.d.ts +23 -0
- package/dist-types/client/src/components/TrainingEngine/stepInitData.d.ts +42 -0
- package/dist-types/client/src/components/TrainingEngine/targetAbilityUtils.d.ts +11 -0
- package/dist-types/client/src/components/VisualizationRenderer/ChartRenderer.d.ts +12 -0
- package/dist-types/client/src/components/VisualizationRenderer/types.d.ts +41 -0
- package/dist-types/client/src/config/appConfig.d.ts +15 -0
- package/dist-types/client/src/configs/agentConfig.d.ts +66 -0
- package/dist-types/client/src/configs/intentDiscoveryConfig.d.ts +22 -0
- package/dist-types/client/src/data/mockTrainingModel.d.ts +10 -0
- package/dist-types/client/src/hooks/useAIService.d.ts +17 -0
- package/dist-types/client/src/hooks/useDialogueLogic.d.ts +53 -0
- package/dist-types/client/src/hooks/useFormFillingLogic.d.ts +26 -0
- package/dist-types/client/src/hooks/useFormRealtimeGuidance.d.ts +45 -0
- package/dist-types/client/src/hooks/useRealtimeGuidance.d.ts +66 -0
- package/dist-types/client/src/hooks/useStageAssessment.d.ts +8 -0
- package/dist-types/client/src/hooks/useStepExecution.d.ts +14 -0
- package/dist-types/client/src/hooks/useTrainingModel.d.ts +30 -0
- package/dist-types/client/src/lib/creator.d.ts +1 -0
- package/dist-types/client/src/lib/index.d.ts +1 -0
- package/dist-types/client/src/lib/types.d.ts +113 -22
- package/dist-types/client/src/plugins/AssessmentPlugin.d.ts +8 -0
- package/dist-types/client/src/plugins/CaseAnalysisPlugin.d.ts +9 -0
- package/dist-types/client/src/plugins/CaseAnalysisPluginView.d.ts +26 -0
- package/dist-types/client/src/plugins/DecisionSelectPlugin.d.ts +8 -0
- package/dist-types/client/src/plugins/DialogueFormPlugin.d.ts +9 -0
- package/dist-types/client/src/plugins/DialogueFormPluginView.d.ts +37 -0
- package/dist-types/client/src/plugins/DialoguePlugin.d.ts +8 -0
- package/dist-types/client/src/plugins/DialoguePluginView.d.ts +44 -0
- package/dist-types/client/src/plugins/DocumentReview/DocumentCard.d.ts +47 -0
- package/dist-types/client/src/plugins/DocumentReview/LayoutComponents.d.ts +47 -0
- package/dist-types/client/src/plugins/DocumentReview/MarkListPanel.d.ts +51 -0
- package/dist-types/client/src/plugins/DocumentReview/MarkModal.d.ts +37 -0
- package/dist-types/client/src/plugins/DocumentReview/ResultPanel.d.ts +32 -0
- package/dist-types/client/src/plugins/DocumentReview/Toolbar.d.ts +31 -0
- package/dist-types/client/src/plugins/DocumentReview/designTokens.d.ts +76 -0
- package/dist-types/client/src/plugins/DocumentReviewPlugin.d.ts +14 -0
- package/dist-types/client/src/plugins/ProcessOperationPlugin.d.ts +8 -0
- package/dist-types/client/src/plugins/QAPlugin.d.ts +9 -0
- package/dist-types/client/src/plugins/StrategyLabPlugin.d.ts +7 -0
- package/dist-types/client/src/plugins/decision-making/DecisionMakingPlugin.d.ts +4 -0
- package/dist-types/client/src/plugins/decision-making/DecisionWorkspace.d.ts +23 -0
- package/dist-types/client/src/plugins/decision-making/MaterialsPanel.d.ts +18 -0
- package/dist-types/client/src/plugins/decision-making/logic.d.ts +46 -0
- package/dist-types/client/src/plugins/decision-making/scoring.d.ts +79 -0
- package/dist-types/client/src/plugins/decision-making/styles.d.ts +743 -0
- package/dist-types/client/src/plugins/decision-making/types.d.ts +179 -0
- package/dist-types/client/src/plugins/form-filling/DocumentFormLayout.d.ts +22 -0
- package/dist-types/client/src/plugins/form-filling/FormAssistPanel.d.ts +20 -0
- package/dist-types/client/src/plugins/form-filling/FormFillingPlugin.d.ts +15 -0
- package/dist-types/client/src/plugins/form-filling/forms.d.ts +28 -0
- package/dist-types/client/src/plugins/form-filling/scoring.d.ts +86 -0
- package/dist-types/client/src/plugins/form-filling/useFormFilling.d.ts +42 -0
- package/dist-types/client/src/plugins/form-filling/validationRules.d.ts +26 -0
- package/dist-types/client/src/plugins/shared/DecisionShared.d.ts +54 -0
- package/dist-types/client/src/plugins/shared/FrameworkWidget.d.ts +19 -0
- package/dist-types/client/src/plugins/shared/PluginFooter.d.ts +4 -0
- package/dist-types/client/src/plugins/shared/PluginHeader.d.ts +4 -0
- package/dist-types/client/src/plugins/shared/analysisTools.d.ts +30 -0
- package/dist-types/client/src/plugins/shared/disturbanceUtils.d.ts +5 -0
- package/dist-types/client/src/plugins/shared/index.d.ts +5 -0
- package/dist-types/client/src/plugins/shared/jsonRepair.d.ts +39 -0
- package/dist-types/client/src/plugins/shared/judgement.d.ts +46 -0
- package/dist-types/client/src/plugins/shared/nodeChain.d.ts +15 -0
- package/dist-types/client/src/plugins/shared/renderFieldGrid.d.ts +16 -0
- package/dist-types/client/src/plugins/shared/reportBlocks.d.ts +33 -0
- package/dist-types/client/src/plugins/shared/reportEvaluation.d.ts +30 -0
- package/dist-types/client/src/plugins/shared/reportExport.d.ts +12 -0
- package/dist-types/client/src/plugins/shared/reportWorkbench/BlockPropertiesPanel.d.ts +9 -0
- package/dist-types/client/src/plugins/shared/reportWorkbench/BlockToolbox.d.ts +11 -0
- package/dist-types/client/src/plugins/shared/reportWorkbench/ReportWorkbench.d.ts +20 -0
- package/dist-types/client/src/plugins/shared/reportWorkbench/SortableBlock.d.ts +15 -0
- package/dist-types/client/src/plugins/shared/reportWorkbench/factory.d.ts +14 -0
- package/dist-types/client/src/plugins/shared/reportWorkbench/outlineDraft.d.ts +7 -0
- package/dist-types/client/src/plugins/shared/simulationEngine.d.ts +112 -0
- package/dist-types/client/src/plugins/shared/simulationModes.d.ts +21 -0
- package/dist-types/client/src/plugins/shared/themes.d.ts +5 -0
- package/dist-types/client/src/plugins/shared/types.d.ts +1247 -0
- package/dist-types/client/src/services/AICommandHandler.d.ts +68 -0
- package/dist-types/client/src/services/cozeApiClient.d.ts +44 -0
- package/dist-types/client/src/services/mockApi.d.ts +48 -0
- package/dist-types/client/src/services/storageService.d.ts +88 -0
- package/dist-types/client/src/stores/abilityStore.d.ts +33 -0
- package/dist-types/client/src/stores/dialogueStore.d.ts +30 -0
- package/dist-types/client/src/stores/formRegistryStore.d.ts +45 -0
- package/dist-types/client/src/stores/guidanceStore.d.ts +17 -0
- package/dist-types/client/src/stores/stepEvidenceStore.d.ts +14 -0
- package/dist-types/client/src/stores/strategyLabStore.d.ts +46 -0
- package/dist-types/client/src/stores/trainingStore.d.ts +84 -0
- package/dist-types/client/src/types/ai-commands.d.ts +144 -0
- package/dist-types/client/src/types.d.ts +17 -0
- package/dist-types/client/src/utils/abilityMapGenerator.d.ts +27 -0
- package/dist-types/client/src/utils/formUtils.d.ts +66 -0
- package/dist-types/client/src/utils/rule-engine.d.ts +36 -0
- package/dist-types/shared/types/index.d.ts +592 -0
- package/package.json +5 -3
- package/dist/CaseAnalysisPlugin-CQvF9_zr.js +0 -416
- package/dist/DialogueFormPlugin-C9ssnVMr.js +0 -959
- package/dist/DialoguePlugin-DU00QpmQ.js +0 -416
- package/dist/DocumentReviewPlugin-HNOZY1T4.js +0 -977
- package/dist/FormFillingPlugin-DURWsioi.js +0 -445
- package/dist/ModelEditor-BPJsPR0S.js +0 -8264
- package/dist/PluginHeader-B-GESJmT.js +0 -87
- package/dist/QAPlugin-Bh_UjK1N.js +0 -184
- package/dist/RadarChart-C5ZM0kWt.js +0 -24963
- package/dist/StrategyLabPlugin-DGeZsr_7.js +0 -14361
- package/dist/ThunderboltOutlined-nH_FO_4A.js +0 -44
- package/dist/ToolOutlined-DtuNJDB2.js +0 -28
- package/dist/TrainingModelContainer-DpW-uB8O.js +0 -11883
- package/dist/WarningOutlined-5g1d66hO.js +0 -164
- package/dist/judgement-D_9i7x9S.js +0 -20
- package/dist/useDialogueLogic-IHELcN3X.js +0 -368
|
@@ -0,0 +1,1247 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { EvidenceSummary, DocumentDiscrepancy, EvaluationRules } from '@shared/types/index.js';
|
|
3
|
+
export type DecisionMode = 'assessment' | 'select';
|
|
4
|
+
/**
|
|
5
|
+
* 氛围风格类型
|
|
6
|
+
*/
|
|
7
|
+
export type AtmosphereStyle = 'document-review' | 'archive-management' | 'quality-inspection' | 'security-checkpoint' | 'counter-service' | 'smart-recognition';
|
|
8
|
+
export interface JudgementItem {
|
|
9
|
+
id: string;
|
|
10
|
+
label: string;
|
|
11
|
+
category: '真实性' | '完整性' | '一致性' | '合规性' | '适配性' | '风险性';
|
|
12
|
+
result?: 'pass' | 'warning' | 'fail';
|
|
13
|
+
comment?: string;
|
|
14
|
+
evidence?: string[];
|
|
15
|
+
stepId?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* 单据审核 · 可点击标记的字段(找茬式)
|
|
19
|
+
*/
|
|
20
|
+
export interface ReviewField {
|
|
21
|
+
name: string;
|
|
22
|
+
label: string;
|
|
23
|
+
type: string;
|
|
24
|
+
value: string;
|
|
25
|
+
group?: string;
|
|
26
|
+
hint?: string;
|
|
27
|
+
colSpan?: number;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* 待审单证(找茬式 - 多单证 Tab)
|
|
31
|
+
*/
|
|
32
|
+
export interface ReviewDocument {
|
|
33
|
+
documentType: string;
|
|
34
|
+
docNo?: string;
|
|
35
|
+
subtitle?: string;
|
|
36
|
+
fields: ReviewField[];
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* 错误类型选项(模型按案例领域生成,标记下拉用)
|
|
40
|
+
*/
|
|
41
|
+
export interface ErrorTypeOption {
|
|
42
|
+
id: string;
|
|
43
|
+
label: string;
|
|
44
|
+
group?: string;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* 单据审核 InitData(下发前端、学员可见)
|
|
48
|
+
* 参考文档已归位 stepBriefing.referenceDocs,由引擎「实训资料」资料栏统一渲染。
|
|
49
|
+
*/
|
|
50
|
+
export interface DocumentReviewInitData {
|
|
51
|
+
documents: ReviewDocument[];
|
|
52
|
+
errorTypes: ErrorTypeOption[];
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* 参考不符点(单条参考答案)。
|
|
56
|
+
* 结构与 shared 的 DocumentDiscrepancy 一致,直接复用以保单一数据源——
|
|
57
|
+
* per-case 答案键 StepAnswerKey.documentReferenceAnswers 即 DocumentDiscrepancy[]。
|
|
58
|
+
*/
|
|
59
|
+
export type ReferenceDiscrepancy = DocumentDiscrepancy;
|
|
60
|
+
/**
|
|
61
|
+
* 判分配置
|
|
62
|
+
*/
|
|
63
|
+
export interface ScoringConfig {
|
|
64
|
+
baseRatio?: number;
|
|
65
|
+
falseMarkPenalty?: 'half' | number;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* 单据审核 RuntimeRules(下发前端、仅判分用,不进可见层)
|
|
69
|
+
*/
|
|
70
|
+
export interface DocumentReviewRuntimeRules {
|
|
71
|
+
referenceAnswers: ReferenceDiscrepancy[];
|
|
72
|
+
scoring?: ScoringConfig;
|
|
73
|
+
}
|
|
74
|
+
export interface DecisionOption {
|
|
75
|
+
value: string;
|
|
76
|
+
label: string;
|
|
77
|
+
score?: number;
|
|
78
|
+
}
|
|
79
|
+
export interface DecisionQuestion {
|
|
80
|
+
id: string;
|
|
81
|
+
question: string;
|
|
82
|
+
options: Array<string | DecisionOption>;
|
|
83
|
+
}
|
|
84
|
+
export interface DecisionSelectOption {
|
|
85
|
+
id: string;
|
|
86
|
+
name: string;
|
|
87
|
+
description?: string;
|
|
88
|
+
riskLevel?: string;
|
|
89
|
+
features?: string[];
|
|
90
|
+
[key: string]: any;
|
|
91
|
+
}
|
|
92
|
+
export interface DecisionMakingInitData {
|
|
93
|
+
decisionGroups?: any[];
|
|
94
|
+
decisionMode?: DecisionMode;
|
|
95
|
+
assessmentQuestions?: DecisionQuestion[];
|
|
96
|
+
options?: DecisionSelectOption[];
|
|
97
|
+
customerRiskLevel?: string;
|
|
98
|
+
previousEvidence?: EvidenceSummary[];
|
|
99
|
+
}
|
|
100
|
+
export interface DecisionMakingCheckRules {
|
|
101
|
+
businessRules?: string[];
|
|
102
|
+
mustMatchRiskLevel?: boolean;
|
|
103
|
+
}
|
|
104
|
+
export interface StepEvidenceEntry {
|
|
105
|
+
stepId: string;
|
|
106
|
+
summary: EvidenceSummary;
|
|
107
|
+
rawData?: any;
|
|
108
|
+
updatedAt: number;
|
|
109
|
+
}
|
|
110
|
+
export interface DecisionEvidenceContext {
|
|
111
|
+
previousEvidence: EvidenceSummary[];
|
|
112
|
+
}
|
|
113
|
+
/**
|
|
114
|
+
* 表单字段定义
|
|
115
|
+
*/
|
|
116
|
+
export interface FormField {
|
|
117
|
+
name: string;
|
|
118
|
+
label: string;
|
|
119
|
+
/** 英文副标签(高保真单证双语呈现,可选) */
|
|
120
|
+
labelEn?: string;
|
|
121
|
+
type: string;
|
|
122
|
+
value?: string;
|
|
123
|
+
required?: boolean;
|
|
124
|
+
/** 只读预填字段(灰底不可编辑,用于呈现案例预置信息,如投保人信息) */
|
|
125
|
+
readonly?: boolean;
|
|
126
|
+
validation?: string;
|
|
127
|
+
/** 字段填写引导提示(聚焦时在右栏「当前字段引导」展示,静态文本,支持 {路径}) */
|
|
128
|
+
hint?: string;
|
|
129
|
+
options?: Array<string | {
|
|
130
|
+
label: string;
|
|
131
|
+
value: string;
|
|
132
|
+
}>;
|
|
133
|
+
min?: number;
|
|
134
|
+
max?: number;
|
|
135
|
+
step?: number;
|
|
136
|
+
maxLength?: number;
|
|
137
|
+
group?: string;
|
|
138
|
+
colSpan?: number;
|
|
139
|
+
style?: React.CSSProperties;
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* 字段分组
|
|
143
|
+
*/
|
|
144
|
+
export interface FieldGroup {
|
|
145
|
+
key: string;
|
|
146
|
+
title: string;
|
|
147
|
+
fields: string[];
|
|
148
|
+
columns?: number;
|
|
149
|
+
style?: React.CSSProperties;
|
|
150
|
+
collapsible?: boolean;
|
|
151
|
+
defaultExpanded?: boolean;
|
|
152
|
+
description?: string;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* 单张表单/单证配置(多表单容器的一项)。
|
|
156
|
+
* 字段语义与现有 formTemplate 一致,额外带标题/编号/副标题(Tab 头与单证抬头用)、
|
|
157
|
+
* 以及该证独立的分组与预填数据。一个 form-filling 步骤可含多张(Tab 切换)。
|
|
158
|
+
*/
|
|
159
|
+
export interface FormTemplateConfig {
|
|
160
|
+
/** 表单名,全实训会话内唯一;FormRegistry 按此存模板/已填数据,支持 {表单名.字段} 跨表单引用 */
|
|
161
|
+
formName: string;
|
|
162
|
+
/** Tab 标签 / 单证中文抬头(缺省回退 formName),支持 {路径} */
|
|
163
|
+
title?: string;
|
|
164
|
+
/** 单证英文抬头(高保真双语),支持 {路径} */
|
|
165
|
+
titleEn?: string;
|
|
166
|
+
/** 单证副标题(可选,支持 {路径}) */
|
|
167
|
+
subtitle?: string;
|
|
168
|
+
/** 单证编号 badge(可选,支持 {路径}/[表达式],如 APP-2026-...) */
|
|
169
|
+
docNo?: string;
|
|
170
|
+
/** create=本步定义字段;edit=引用前序步骤同名表单字段 */
|
|
171
|
+
mode?: 'create' | 'edit';
|
|
172
|
+
/** 本证字段;edit 模式可空,运行时按 formName 从 FormRegistry 回退 */
|
|
173
|
+
fields: FormField[];
|
|
174
|
+
/** 本证字段分组(section) */
|
|
175
|
+
groups?: FieldGroup[];
|
|
176
|
+
/** 本证预填/只读数据({路径} 引用案例、{表单名.字段} 引用他证、[表达式]) */
|
|
177
|
+
customerData?: Record<string, any>;
|
|
178
|
+
/** 本证列数覆盖(缺省用 uiConfig.columns) */
|
|
179
|
+
columns?: number;
|
|
180
|
+
}
|
|
181
|
+
/** 字段校验等级:error 阻断提交;warning/info 仅提示不阻断 */
|
|
182
|
+
export type FieldValidationLevel = 'error' | 'warning' | 'info';
|
|
183
|
+
/**
|
|
184
|
+
* 声明式校验规则(放 runtimeRules.validationRules)。
|
|
185
|
+
* 承载本步「答案无关、机器可判定」的过程校验:跨字段/跨表单一致、条件必填、比较、正则、范围;
|
|
186
|
+
* 只补 FormField 自身属性(required/validation/min/max/options)表达不了的部分。
|
|
187
|
+
* error 级是完成门禁;实时校验与提交时确定性评分共用同一执行器(evaluateDeclarativeRules),避免规则漂移。
|
|
188
|
+
*/
|
|
189
|
+
export interface DeclarativeValidationRule {
|
|
190
|
+
id: string;
|
|
191
|
+
kind: 'equals' | 'notEquals' | 'compare' | 'requiredIf' | 'pattern' | 'range' | 'crossFormEquals';
|
|
192
|
+
/** 错误归属字段(就地定位红/橙字)——必须是某表单字段的 name */
|
|
193
|
+
field: string;
|
|
194
|
+
/** 目标:另一字段 name / "{表单名.字段}" 跨表单引用 / 字面量(compare/range 用数字字符串) */
|
|
195
|
+
target?: string;
|
|
196
|
+
op?: '>' | '>=' | '<' | '<=' | '==' | '!=';
|
|
197
|
+
pattern?: string;
|
|
198
|
+
min?: number;
|
|
199
|
+
max?: number;
|
|
200
|
+
/** requiredIf:当 whenField 满足 whenOp(whenValue) 时,field 必填 */
|
|
201
|
+
whenField?: string;
|
|
202
|
+
whenOp?: '==' | '!=' | 'filled' | 'empty';
|
|
203
|
+
whenValue?: string;
|
|
204
|
+
level: FieldValidationLevel;
|
|
205
|
+
message: string;
|
|
206
|
+
}
|
|
207
|
+
/** 实时指导配置(放 runtimeRules.realtimeGuidance) */
|
|
208
|
+
export interface RealtimeGuidanceConfig {
|
|
209
|
+
/** 是否启用定时实时指导;表单类步骤默认开启,显式 false 才关闭 */
|
|
210
|
+
enabled?: boolean;
|
|
211
|
+
/** 定时器间隔毫秒,默认 5000 */
|
|
212
|
+
intervalMs?: number;
|
|
213
|
+
/** 输入沉降窗毫秒(距最后一次输入不足此值则本轮跳过),默认 1500 */
|
|
214
|
+
settleMs?: number;
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* 表单填写运行时规则(过程参数 runtimeRules)。
|
|
218
|
+
* 承载本步「答案无关、机器可判定」的过程校验逻辑与实时指导开关。
|
|
219
|
+
* error 级 validationRules 是完成门禁,与提交端确定性评分共用同一执行器(evaluateDeclarativeRules)。
|
|
220
|
+
*/
|
|
221
|
+
export interface FormFillingRuntimeRules {
|
|
222
|
+
/** 声明式校验规则(跨字段/跨表单一致、条件必填、比较、正则、范围) */
|
|
223
|
+
validationRules?: DeclarativeValidationRule[];
|
|
224
|
+
/** 定时实时指导配置 */
|
|
225
|
+
realtimeGuidance?: RealtimeGuidanceConfig;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* 主题令牌
|
|
229
|
+
*/
|
|
230
|
+
export interface ThemeTokens {
|
|
231
|
+
primaryColor: string;
|
|
232
|
+
backgroundColor: string;
|
|
233
|
+
borderRadius: number;
|
|
234
|
+
headerBg: string;
|
|
235
|
+
headerColor: string;
|
|
236
|
+
borderColor: string;
|
|
237
|
+
successColor: string;
|
|
238
|
+
warningColor: string;
|
|
239
|
+
dangerColor: string;
|
|
240
|
+
textColor: string;
|
|
241
|
+
textSecondaryColor: string;
|
|
242
|
+
surfaceColor: string;
|
|
243
|
+
surfaceLightColor: string;
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* 基础 UI 配置(所有插件共享的通用配置项)
|
|
247
|
+
*/
|
|
248
|
+
export interface BaseUIConfig {
|
|
249
|
+
theme?: string | ThemeTokens;
|
|
250
|
+
headerVariant?: 'card' | 'banner' | 'minimal';
|
|
251
|
+
styleOverrides?: React.CSSProperties;
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* 表单填写 UI 配置(通过 initData.uiConfig 传入)
|
|
255
|
+
*/
|
|
256
|
+
export interface UIConfig extends BaseUIConfig {
|
|
257
|
+
layout?: 'form' | 'stepper';
|
|
258
|
+
labelLayout?: 'vertical' | 'horizontal';
|
|
259
|
+
groupStyle?: 'divider' | 'card' | 'none';
|
|
260
|
+
columns?: number;
|
|
261
|
+
groups?: FieldGroup[];
|
|
262
|
+
submitButtonText?: string;
|
|
263
|
+
/**
|
|
264
|
+
* @deprecated 高代码表单已废弃,新表单填写插件忽略此字段(仅旧对话式表单视图可能仍用)。
|
|
265
|
+
* AI 生成的自定义布局 React 组件代码。
|
|
266
|
+
*/
|
|
267
|
+
customLayoutCode?: string;
|
|
268
|
+
/** 多表单时 Tab 位置,默认 top */
|
|
269
|
+
multiFormTabPosition?: 'top' | 'left';
|
|
270
|
+
/** 是否显示跨表单聚合进度(已填/总数),默认 true */
|
|
271
|
+
showAggregateProgress?: boolean;
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* 对话交互 UI 配置
|
|
275
|
+
*/
|
|
276
|
+
export interface DialogueUIConfig extends BaseUIConfig {
|
|
277
|
+
chatBubbleStyle?: 'modern' | 'classic';
|
|
278
|
+
showAvatar?: boolean;
|
|
279
|
+
chatAreaHeight?: number | string;
|
|
280
|
+
tellerBubbleColor?: string;
|
|
281
|
+
customerBubbleColor?: string;
|
|
282
|
+
showTimestamp?: boolean;
|
|
283
|
+
showEmotionTag?: boolean;
|
|
284
|
+
inputPlaceholder?: string;
|
|
285
|
+
submitButtonText?: string;
|
|
286
|
+
scenarioDisplay?: 'card' | 'banner' | 'none';
|
|
287
|
+
goalDisplay?: 'card' | 'checklist' | 'tags' | 'none';
|
|
288
|
+
}
|
|
289
|
+
/**
|
|
290
|
+
* 案例分析 UI 配置
|
|
291
|
+
*/
|
|
292
|
+
export interface CaseAnalysisUIConfig extends BaseUIConfig {
|
|
293
|
+
caseCardStyle?: 'card' | 'banner' | 'minimal';
|
|
294
|
+
toolSelectLayout?: 'grid' | 'list';
|
|
295
|
+
toolColumns?: number;
|
|
296
|
+
dimensionInputRows?: number;
|
|
297
|
+
submitButtonText?: string;
|
|
298
|
+
showToolDescription?: boolean;
|
|
299
|
+
feedbackStyle?: 'card' | 'collapse';
|
|
300
|
+
}
|
|
301
|
+
/** 参考文档(左栏,可选) */
|
|
302
|
+
export interface ReferenceDoc {
|
|
303
|
+
id: string;
|
|
304
|
+
title: string;
|
|
305
|
+
url?: string;
|
|
306
|
+
summary?: string;
|
|
307
|
+
}
|
|
308
|
+
/** 报告内容块类型 */
|
|
309
|
+
export type ReportBlockKind = 'heading' | 'paragraph' | 'list' | 'table' | 'chart' | 'framework' | 'quote' | 'divider' | 'progress' | 'cover' | 'image' | 'card' | 'button';
|
|
310
|
+
/** 图表录入数据(学生录入,映射到 VisualizationRenderer/ChartRenderer) */
|
|
311
|
+
export interface ChartInputData {
|
|
312
|
+
labels: string[];
|
|
313
|
+
series: Array<{
|
|
314
|
+
name: string;
|
|
315
|
+
values: number[];
|
|
316
|
+
}>;
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* 块的视觉排版属性(学生在属性面板调,作用于画布渲染与导出,**不参与 AI 评分**)。
|
|
320
|
+
* 对应"排版三层评分"的第③层(像素级美化不进 AI 评分)。
|
|
321
|
+
*/
|
|
322
|
+
export interface BlockStyle {
|
|
323
|
+
/** 字号 px */
|
|
324
|
+
fontSize?: number;
|
|
325
|
+
/** 水平对齐 */
|
|
326
|
+
align?: 'left' | 'center' | 'right';
|
|
327
|
+
/** 文本颜色 */
|
|
328
|
+
color?: string;
|
|
329
|
+
/** 上间距 px */
|
|
330
|
+
marginTop?: number;
|
|
331
|
+
/** 下间距 px */
|
|
332
|
+
marginBottom?: number;
|
|
333
|
+
}
|
|
334
|
+
interface BaseReportBlock {
|
|
335
|
+
id: string;
|
|
336
|
+
/** 关联到推荐大纲的章节 id,用于完整性确定性判定 */
|
|
337
|
+
sectionId?: string;
|
|
338
|
+
/** 章节引导提示(硬骨架预置时来自 outline.hint / suggestedBlocks.note),空内容时作占位显示 */
|
|
339
|
+
hint?: string;
|
|
340
|
+
/** 视觉排版(渲染/导出用,不进评分) */
|
|
341
|
+
style?: BlockStyle;
|
|
342
|
+
}
|
|
343
|
+
export interface HeadingBlock extends BaseReportBlock {
|
|
344
|
+
kind: 'heading';
|
|
345
|
+
level: 1 | 2 | 3;
|
|
346
|
+
text: string;
|
|
347
|
+
}
|
|
348
|
+
export interface ParagraphBlock extends BaseReportBlock {
|
|
349
|
+
kind: 'paragraph';
|
|
350
|
+
text: string;
|
|
351
|
+
}
|
|
352
|
+
/** 列表变体:无序/有序/步骤/检查清单(checklist 用并行 checked[] 记录勾选) */
|
|
353
|
+
export type ListVariant = 'unordered' | 'ordered' | 'step' | 'checklist';
|
|
354
|
+
export interface ListBlock extends BaseReportBlock {
|
|
355
|
+
kind: 'list';
|
|
356
|
+
variant: ListVariant;
|
|
357
|
+
items: string[];
|
|
358
|
+
/** variant==='checklist' 时各项勾选状态(按 index 对齐 items) */
|
|
359
|
+
checked?: boolean[];
|
|
360
|
+
}
|
|
361
|
+
/** 表格变体:基础/对比/日历(7 列周表)/评分(指定列渲染星级) */
|
|
362
|
+
export type TableVariant = 'basic' | 'comparison' | 'calendar' | 'rating';
|
|
363
|
+
export interface TableBlock extends BaseReportBlock {
|
|
364
|
+
kind: 'table';
|
|
365
|
+
variant?: TableVariant;
|
|
366
|
+
headers: string[];
|
|
367
|
+
rows: string[][];
|
|
368
|
+
/** variant==='rating' 时按星级渲染的列索引(默认末列) */
|
|
369
|
+
ratingColumn?: number;
|
|
370
|
+
}
|
|
371
|
+
export interface ChartBlock extends BaseReportBlock {
|
|
372
|
+
kind: 'chart';
|
|
373
|
+
chartType: 'bar' | 'line' | 'pie' | 'radar';
|
|
374
|
+
data: ChartInputData;
|
|
375
|
+
}
|
|
376
|
+
/** 分析框架 widget:toolKey 指向 analysisTools 内置框架,cells 复用其 dimensions */
|
|
377
|
+
export interface FrameworkBlock extends BaseReportBlock {
|
|
378
|
+
kind: 'framework';
|
|
379
|
+
toolKey: string;
|
|
380
|
+
title?: string;
|
|
381
|
+
cells: Array<{
|
|
382
|
+
key: string;
|
|
383
|
+
value: string;
|
|
384
|
+
}>;
|
|
385
|
+
}
|
|
386
|
+
export interface QuoteBlock extends BaseReportBlock {
|
|
387
|
+
kind: 'quote';
|
|
388
|
+
text: string;
|
|
389
|
+
}
|
|
390
|
+
export interface DividerBlock extends BaseReportBlock {
|
|
391
|
+
kind: 'divider';
|
|
392
|
+
}
|
|
393
|
+
/** 进度条:多条带标签的百分比进度 */
|
|
394
|
+
export interface ProgressBlock extends BaseReportBlock {
|
|
395
|
+
kind: 'progress';
|
|
396
|
+
items: Array<{
|
|
397
|
+
label: string;
|
|
398
|
+
percent: number;
|
|
399
|
+
}>;
|
|
400
|
+
}
|
|
401
|
+
/** 封面块:居中大标题 + 副标题 + 元信息 */
|
|
402
|
+
export interface CoverBlock extends BaseReportBlock {
|
|
403
|
+
kind: 'cover';
|
|
404
|
+
title: string;
|
|
405
|
+
subtitle?: string;
|
|
406
|
+
meta?: string;
|
|
407
|
+
}
|
|
408
|
+
/** 图片/多媒体:图片地址 + 说明 */
|
|
409
|
+
export interface ImageBlock extends BaseReportBlock {
|
|
410
|
+
kind: 'image';
|
|
411
|
+
url?: string;
|
|
412
|
+
caption?: string;
|
|
413
|
+
alt?: string;
|
|
414
|
+
}
|
|
415
|
+
/** 卡片容器:带边框的标题 + 正文 */
|
|
416
|
+
export interface CardBlock extends BaseReportBlock {
|
|
417
|
+
kind: 'card';
|
|
418
|
+
title?: string;
|
|
419
|
+
body?: string;
|
|
420
|
+
}
|
|
421
|
+
/** 按钮:展示型胶囊按钮(label + 可选链接) */
|
|
422
|
+
export interface ButtonBlock extends BaseReportBlock {
|
|
423
|
+
kind: 'button';
|
|
424
|
+
label: string;
|
|
425
|
+
href?: string;
|
|
426
|
+
}
|
|
427
|
+
export type ReportBlock = HeadingBlock | ParagraphBlock | ListBlock | TableBlock | ChartBlock | FrameworkBlock | QuoteBlock | DividerBlock | ProgressBlock | CoverBlock | ImageBlock | CardBlock | ButtonBlock;
|
|
428
|
+
/** 学生最终产出物 */
|
|
429
|
+
export interface ReportDraft {
|
|
430
|
+
blocks: ReportBlock[];
|
|
431
|
+
}
|
|
432
|
+
/** 推荐大纲的单个章节(硬骨架预置依据) */
|
|
433
|
+
export interface OutlineSection {
|
|
434
|
+
id: string;
|
|
435
|
+
title: string;
|
|
436
|
+
hint?: string;
|
|
437
|
+
/** 必填章节 → 进完整性确定性兜底 */
|
|
438
|
+
required?: boolean;
|
|
439
|
+
/** 建议用什么组件表达这一章(驱动硬骨架预置) */
|
|
440
|
+
suggestedBlocks?: Array<{
|
|
441
|
+
component: ReportBlockKind;
|
|
442
|
+
/** component==='framework' 时指向某框架 key */
|
|
443
|
+
toolKey?: string;
|
|
444
|
+
note?: string;
|
|
445
|
+
}>;
|
|
446
|
+
}
|
|
447
|
+
/** 场景驱动的推荐大纲(生成端按步骤场景产) */
|
|
448
|
+
export interface RecommendedOutline {
|
|
449
|
+
reportTitle?: string;
|
|
450
|
+
sections: OutlineSection[];
|
|
451
|
+
}
|
|
452
|
+
/** 确定性兜底阈值(完整性/态度分用;必填章节由 outline.required 推导,不在此重复) */
|
|
453
|
+
export interface CaseAnalysisRuntimeRules {
|
|
454
|
+
minWordCount?: number;
|
|
455
|
+
minBlocks?: number;
|
|
456
|
+
}
|
|
457
|
+
/**
|
|
458
|
+
* 报告搭建器 initData(对外:方案设计)。
|
|
459
|
+
* PluginProps.initData 仍为 any,运行时插件内 as CaseAnalysisInitData 使用。
|
|
460
|
+
*/
|
|
461
|
+
export interface CaseAnalysisInitData {
|
|
462
|
+
scenario: string;
|
|
463
|
+
background?: string;
|
|
464
|
+
referenceDocs?: ReferenceDoc[];
|
|
465
|
+
recommendedOutline: RecommendedOutline;
|
|
466
|
+
availableComponents?: ReportBlockKind[];
|
|
467
|
+
availableFrameworks?: string[];
|
|
468
|
+
evaluationRules?: EvaluationRules;
|
|
469
|
+
uiConfig?: CaseAnalysisUIConfig;
|
|
470
|
+
caseData?: Record<string, unknown>;
|
|
471
|
+
currentUser?: {
|
|
472
|
+
userId: string;
|
|
473
|
+
name: string;
|
|
474
|
+
};
|
|
475
|
+
stepId?: string;
|
|
476
|
+
stepName?: string;
|
|
477
|
+
previousEvidence?: EvidenceSummary[];
|
|
478
|
+
}
|
|
479
|
+
/**
|
|
480
|
+
* 评估结果(案例分析/方案设计的 AI 评分产物 + 本地确定性维度合并后的最终形态)。
|
|
481
|
+
*/
|
|
482
|
+
export interface EvaluationResult {
|
|
483
|
+
stepId?: string;
|
|
484
|
+
totalScore: number;
|
|
485
|
+
pass: boolean;
|
|
486
|
+
dimensions: Array<{
|
|
487
|
+
name: string;
|
|
488
|
+
score: number;
|
|
489
|
+
feedback: string;
|
|
490
|
+
errors?: string[];
|
|
491
|
+
suggestions?: string[];
|
|
492
|
+
}>;
|
|
493
|
+
highlights: string[];
|
|
494
|
+
improvements: string[];
|
|
495
|
+
nextStepAdvice: string;
|
|
496
|
+
}
|
|
497
|
+
/**
|
|
498
|
+
* 对话式表单 UI 配置
|
|
499
|
+
*/
|
|
500
|
+
export interface DialogueFormUIConfig extends BaseUIConfig {
|
|
501
|
+
/** 布局方向:horizontal=左右布局 | vertical=上下布局 */
|
|
502
|
+
layout?: 'horizontal' | 'vertical';
|
|
503
|
+
/** 对话区域宽度(horizontal 时有效),如 '40%' | '50%' | '60%' */
|
|
504
|
+
dialogueWidth?: string;
|
|
505
|
+
/** 对话区域配置 */
|
|
506
|
+
dialogueConfig?: {
|
|
507
|
+
showAvatar?: boolean;
|
|
508
|
+
avatarUrl?: string;
|
|
509
|
+
roleName?: string;
|
|
510
|
+
placeholder?: string;
|
|
511
|
+
chatBubbleStyle?: 'modern' | 'classic';
|
|
512
|
+
showTimestamp?: boolean;
|
|
513
|
+
};
|
|
514
|
+
/** 表单区域配置 */
|
|
515
|
+
formConfig?: {
|
|
516
|
+
showTitle?: boolean;
|
|
517
|
+
showDescription?: boolean;
|
|
518
|
+
labelAlign?: 'left' | 'right' | 'top';
|
|
519
|
+
};
|
|
520
|
+
/** 智能联动配置 */
|
|
521
|
+
autoFillEnabled?: boolean;
|
|
522
|
+
highlightFieldOnMention?: boolean;
|
|
523
|
+
}
|
|
524
|
+
/**
|
|
525
|
+
* 模型级 UI 配置(按插件类型分区)
|
|
526
|
+
*/
|
|
527
|
+
export interface ModelUIConfig extends BaseUIConfig {
|
|
528
|
+
/** 沉浸模式背景图片 URL(覆盖全局 appConfig.backgroundImage) */
|
|
529
|
+
backgroundImage?: string;
|
|
530
|
+
/** 沉浸模式下"完成此步"按钮风格:capsule=胶囊发光 | border=渐变边框 | island=浮岛底栏(默认) */
|
|
531
|
+
completeButtonStyle?: 'capsule' | 'border' | 'island';
|
|
532
|
+
/** 是否向学员显示预设答案数量,默认 true */
|
|
533
|
+
showExpectedCount?: boolean;
|
|
534
|
+
formFilling?: Omit<UIConfig, keyof BaseUIConfig>;
|
|
535
|
+
dialogue?: Omit<DialogueUIConfig, keyof BaseUIConfig>;
|
|
536
|
+
dialogueForm?: Omit<DialogueFormUIConfig, keyof BaseUIConfig>;
|
|
537
|
+
caseAnalysis?: Omit<CaseAnalysisUIConfig, keyof BaseUIConfig>;
|
|
538
|
+
strategyLab?: Omit<StrategyLabUIConfig, keyof BaseUIConfig>;
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* 策略实验室 UI 配置
|
|
542
|
+
*/
|
|
543
|
+
export interface StrategyLabUIConfig extends BaseUIConfig {
|
|
544
|
+
/** 布局模式:single-column=垂直流式 | tabs=标签页 */
|
|
545
|
+
layout?: 'single-column' | 'tabs';
|
|
546
|
+
/** 对比视图(仅对比模式生效):grid=网格 | carousel=轮播 | split-screen=分屏 */
|
|
547
|
+
comparisonView?: 'grid' | 'carousel' | 'split-screen';
|
|
548
|
+
/** 是否启用动画 */
|
|
549
|
+
animationEnabled?: boolean;
|
|
550
|
+
/** 结果逐步展示延迟(ms) */
|
|
551
|
+
resultRevealDelay?: number;
|
|
552
|
+
/** 按钮文案自定义 */
|
|
553
|
+
buttonLabels?: {
|
|
554
|
+
submit?: string;
|
|
555
|
+
adjust?: string;
|
|
556
|
+
addComparison?: string;
|
|
557
|
+
complete?: string;
|
|
558
|
+
};
|
|
559
|
+
/** 场景主题类型(前端渲染时使用,优先级高于 initData.sceneThemeType) */
|
|
560
|
+
sceneThemeType?: 'urban-planning' | 'business-strategy' | 'investment' | 'policy' | 'crisis';
|
|
561
|
+
}
|
|
562
|
+
/**
|
|
563
|
+
* SimulationMode 配置注册表(SIMULATION_MODES)的内部键类型。
|
|
564
|
+
* 仅用于推演引擎内部取推演/UI 配置:`SimulationLensType` 的 7 个真镜头同名直取;
|
|
565
|
+
* `default` 镜头取 `iterative` 配置(常规推演),`compare` 收敛方式取 `comparison` 配置(并排 UI)。
|
|
566
|
+
* 注意:这不是面向配置层的字段类型——字段层用「镜头(SimulationLensType) + 决策收敛方式(decisionStyle)」两轴表达。
|
|
567
|
+
*/
|
|
568
|
+
export type SimulationModeType = 'iterative' | 'comparison' | 'adversarial' | 'timeline' | 'collaborative' | 'stress-test' | 'reverse' | 'sandbox' | 'historical';
|
|
569
|
+
/**
|
|
570
|
+
* 推演镜头类型(改变「AI 推演什么」的 7 种视角 + 默认无镜头)。
|
|
571
|
+
* 与决策收敛方式(decisionStyle: iterate|compare) 正交:`default` 即无特殊视角的常规推演,
|
|
572
|
+
* 「单方案打磨 / 多方案对比」由 decisionStyle 表达,不是镜头。
|
|
573
|
+
*/
|
|
574
|
+
export type SimulationLensType = 'default' | 'adversarial' | 'timeline' | 'collaborative' | 'stress-test' | 'reverse' | 'sandbox' | 'historical';
|
|
575
|
+
/**
|
|
576
|
+
* 决策输入方式
|
|
577
|
+
*/
|
|
578
|
+
export type DecisionInputMethod = 'fields' | 'guided';
|
|
579
|
+
/**
|
|
580
|
+
* 可视化输入字段
|
|
581
|
+
*/
|
|
582
|
+
export interface VisualField {
|
|
583
|
+
/** 字段名称(唯一标识) */
|
|
584
|
+
name: string;
|
|
585
|
+
/** 字段标签(显示名称) */
|
|
586
|
+
label: string;
|
|
587
|
+
/** 可视化类型 */
|
|
588
|
+
type: 'budget-allocation' | 'resource-distribution' | 'priority-ranking' | 'timeline-planning' | 'option-select' | 'stance-spectrum' | 'matrix-2d';
|
|
589
|
+
/** 是否必填 */
|
|
590
|
+
required?: boolean;
|
|
591
|
+
/** 字段配置(根据 type 不同,使用不同的配置) */
|
|
592
|
+
config: {
|
|
593
|
+
/** 预算分配配置 */
|
|
594
|
+
budgetAllocation?: {
|
|
595
|
+
/** 总预算 */
|
|
596
|
+
totalBudget: number;
|
|
597
|
+
/** 分类列表 */
|
|
598
|
+
categories: {
|
|
599
|
+
key: string;
|
|
600
|
+
label: string;
|
|
601
|
+
min?: number;
|
|
602
|
+
max?: number;
|
|
603
|
+
}[];
|
|
604
|
+
/** 显示模式 */
|
|
605
|
+
displayMode: 'sliders' | 'pie-interactive' | 'bar-draggable';
|
|
606
|
+
};
|
|
607
|
+
/** 资源分配配置 */
|
|
608
|
+
resourceDistribution?: {
|
|
609
|
+
/** 资源列表 */
|
|
610
|
+
resources: {
|
|
611
|
+
id: string;
|
|
612
|
+
label: string;
|
|
613
|
+
quantity: number;
|
|
614
|
+
unit: string;
|
|
615
|
+
}[];
|
|
616
|
+
/** 目标列表 */
|
|
617
|
+
targets: {
|
|
618
|
+
id: string;
|
|
619
|
+
label: string;
|
|
620
|
+
description?: string;
|
|
621
|
+
}[];
|
|
622
|
+
};
|
|
623
|
+
/** 优先级排序配置 */
|
|
624
|
+
priorityRanking?: {
|
|
625
|
+
/** 待排序项列表 */
|
|
626
|
+
items: {
|
|
627
|
+
id: string;
|
|
628
|
+
label: string;
|
|
629
|
+
description?: string;
|
|
630
|
+
impact?: string;
|
|
631
|
+
}[];
|
|
632
|
+
};
|
|
633
|
+
/** 时间规划配置 */
|
|
634
|
+
timelinePlanning?: {
|
|
635
|
+
/** 任务列表 */
|
|
636
|
+
tasks: {
|
|
637
|
+
id: string;
|
|
638
|
+
label: string;
|
|
639
|
+
duration: number;
|
|
640
|
+
dependencies?: string[];
|
|
641
|
+
}[];
|
|
642
|
+
/** 时间范围 */
|
|
643
|
+
timeRange: {
|
|
644
|
+
start: string;
|
|
645
|
+
end: string;
|
|
646
|
+
};
|
|
647
|
+
};
|
|
648
|
+
/** 方案选择配置(在若干互斥/可叠加方案间取舍) */
|
|
649
|
+
optionSelect?: {
|
|
650
|
+
/** 候选方案 */
|
|
651
|
+
options: {
|
|
652
|
+
id: string;
|
|
653
|
+
label: string;
|
|
654
|
+
/** 方案说明 */
|
|
655
|
+
description?: string;
|
|
656
|
+
/** 利(优势) */
|
|
657
|
+
pros?: string;
|
|
658
|
+
/** 弊(代价/风险) */
|
|
659
|
+
cons?: string;
|
|
660
|
+
}[];
|
|
661
|
+
/** 是否允许多选;默认 false(单选) */
|
|
662
|
+
multiple?: boolean;
|
|
663
|
+
/** 多选时最少选几个 */
|
|
664
|
+
minSelect?: number;
|
|
665
|
+
/** 多选时最多选几个 */
|
|
666
|
+
maxSelect?: number;
|
|
667
|
+
};
|
|
668
|
+
/** 立场光谱配置(在命名两极间定调,可多轴) */
|
|
669
|
+
stanceSpectrum?: {
|
|
670
|
+
axes: {
|
|
671
|
+
id: string;
|
|
672
|
+
/** 轴名,如「修复节奏」 */
|
|
673
|
+
label: string;
|
|
674
|
+
/** 左极标签,如「激进」 */
|
|
675
|
+
leftLabel: string;
|
|
676
|
+
/** 右极标签,如「稳健」 */
|
|
677
|
+
rightLabel: string;
|
|
678
|
+
/** 取值下界,默认 0 */
|
|
679
|
+
min?: number;
|
|
680
|
+
/** 取值上界,默认 100 */
|
|
681
|
+
max?: number;
|
|
682
|
+
/** 步长,默认 1 */
|
|
683
|
+
step?: number;
|
|
684
|
+
}[];
|
|
685
|
+
};
|
|
686
|
+
/** 二维象限定位配置(在两轴构成的平面上为各项定位,如 风险×收益) */
|
|
687
|
+
matrix2d?: {
|
|
688
|
+
xAxis: {
|
|
689
|
+
label: string;
|
|
690
|
+
leftLabel: string;
|
|
691
|
+
rightLabel: string;
|
|
692
|
+
};
|
|
693
|
+
yAxis: {
|
|
694
|
+
label: string;
|
|
695
|
+
bottomLabel: string;
|
|
696
|
+
topLabel: string;
|
|
697
|
+
};
|
|
698
|
+
/** 待定位的项(可一个或多个) */
|
|
699
|
+
items: {
|
|
700
|
+
id: string;
|
|
701
|
+
label: string;
|
|
702
|
+
}[];
|
|
703
|
+
/** 可选的象限名 */
|
|
704
|
+
quadrantLabels?: {
|
|
705
|
+
topLeft?: string;
|
|
706
|
+
topRight?: string;
|
|
707
|
+
bottomLeft?: string;
|
|
708
|
+
bottomRight?: string;
|
|
709
|
+
};
|
|
710
|
+
};
|
|
711
|
+
};
|
|
712
|
+
}
|
|
713
|
+
/**
|
|
714
|
+
* 预算分配数据
|
|
715
|
+
*/
|
|
716
|
+
export interface BudgetAllocationData {
|
|
717
|
+
[categoryKey: string]: number;
|
|
718
|
+
}
|
|
719
|
+
/**
|
|
720
|
+
* 资源分配数据
|
|
721
|
+
* targetId → { resourceId → 分配数量 }
|
|
722
|
+
*/
|
|
723
|
+
export interface ResourceAllocationData {
|
|
724
|
+
[targetId: string]: {
|
|
725
|
+
[resourceId: string]: number;
|
|
726
|
+
};
|
|
727
|
+
}
|
|
728
|
+
/**
|
|
729
|
+
* 优先级排序数据
|
|
730
|
+
*/
|
|
731
|
+
export type PriorityRankingData = string[];
|
|
732
|
+
/**
|
|
733
|
+
* 时间规划数据
|
|
734
|
+
*/
|
|
735
|
+
export interface TimelinePlanningData {
|
|
736
|
+
[taskId: string]: {
|
|
737
|
+
start: string;
|
|
738
|
+
duration: number;
|
|
739
|
+
};
|
|
740
|
+
}
|
|
741
|
+
/**
|
|
742
|
+
* 方案选择数据:单选为 optionId,多选为 optionId[]
|
|
743
|
+
*/
|
|
744
|
+
export type OptionSelectData = string | string[];
|
|
745
|
+
/**
|
|
746
|
+
* 立场光谱数据:axisId → 取值
|
|
747
|
+
*/
|
|
748
|
+
export interface StanceSpectrumData {
|
|
749
|
+
[axisId: string]: number;
|
|
750
|
+
}
|
|
751
|
+
/**
|
|
752
|
+
* 二维象限定位数据:itemId → { x, y }(0-100)
|
|
753
|
+
*/
|
|
754
|
+
export interface Matrix2DData {
|
|
755
|
+
[itemId: string]: {
|
|
756
|
+
x: number;
|
|
757
|
+
y: number;
|
|
758
|
+
};
|
|
759
|
+
}
|
|
760
|
+
/**
|
|
761
|
+
* 可视化输入配置(新版本 - 多字段支持)
|
|
762
|
+
*/
|
|
763
|
+
export interface VisualInputConfig {
|
|
764
|
+
/** 可视化字段列表 */
|
|
765
|
+
fields: VisualField[];
|
|
766
|
+
}
|
|
767
|
+
/**
|
|
768
|
+
* 决策字段(统一决策输入):一个决策 = 有序的 DecisionField 列表,每个字段自选 `control`。
|
|
769
|
+
* control 涵盖「简单控件」(text/textarea/number/select/radio/checkbox/slider/rating/date)
|
|
770
|
+
* 与「可视化 widget」(budget-allocation/resource-distribution/priority-ranking/timeline-planning/
|
|
771
|
+
* option-select/stance-spectrum/matrix-2d),二者可在同一决策内任意混搭。
|
|
772
|
+
* 纯开放论述 = 单个 textarea 字段;AI 分步引导走 decisionInputMethod='guided',不用本结构。
|
|
773
|
+
*/
|
|
774
|
+
export interface DecisionField {
|
|
775
|
+
/** 字段名(提交值的 key) */
|
|
776
|
+
name: string;
|
|
777
|
+
/** 字段标签(展示名) */
|
|
778
|
+
label: string;
|
|
779
|
+
/** 控件类型 */
|
|
780
|
+
control: 'text' | 'textarea' | 'number' | 'select' | 'radio' | 'checkbox' | 'slider' | 'rating' | 'date' | 'budget-allocation' | 'resource-distribution' | 'priority-ranking' | 'timeline-planning' | 'option-select' | 'stance-spectrum' | 'matrix-2d';
|
|
781
|
+
required?: boolean;
|
|
782
|
+
/** 占位提示(简单控件) */
|
|
783
|
+
placeholder?: string;
|
|
784
|
+
/** select/radio/checkbox 的选项 */
|
|
785
|
+
options?: Array<string | {
|
|
786
|
+
label: string;
|
|
787
|
+
value: string;
|
|
788
|
+
}>;
|
|
789
|
+
/** number/slider 的范围与步长 */
|
|
790
|
+
min?: number;
|
|
791
|
+
max?: number;
|
|
792
|
+
step?: number;
|
|
793
|
+
/** 文本最大长度(text/textarea) */
|
|
794
|
+
maxLength?: number;
|
|
795
|
+
/** 可视化控件配置:仅 7 种可视化 control 使用,子结构同 VisualField.config */
|
|
796
|
+
config?: VisualField['config'];
|
|
797
|
+
}
|
|
798
|
+
/**
|
|
799
|
+
* 参考数据
|
|
800
|
+
*/
|
|
801
|
+
export interface ReferenceData {
|
|
802
|
+
type: string;
|
|
803
|
+
content: any;
|
|
804
|
+
source?: string;
|
|
805
|
+
}
|
|
806
|
+
/**
|
|
807
|
+
* 约束规则
|
|
808
|
+
*/
|
|
809
|
+
export interface SimulationConstraint {
|
|
810
|
+
type: string;
|
|
811
|
+
description: string;
|
|
812
|
+
value?: any;
|
|
813
|
+
}
|
|
814
|
+
/**
|
|
815
|
+
* 评估维度(策略实验室专用)
|
|
816
|
+
*/
|
|
817
|
+
export interface StrategyEvaluationDimension {
|
|
818
|
+
dimension: string;
|
|
819
|
+
weight: number;
|
|
820
|
+
criteria?: string;
|
|
821
|
+
}
|
|
822
|
+
/**
|
|
823
|
+
* 模拟模式配置
|
|
824
|
+
*/
|
|
825
|
+
export interface SimulationMode {
|
|
826
|
+
type: SimulationModeType;
|
|
827
|
+
label: string;
|
|
828
|
+
description: string;
|
|
829
|
+
flowControl: {
|
|
830
|
+
allowIteration: boolean;
|
|
831
|
+
allowComparison: boolean;
|
|
832
|
+
requiresGuidance: boolean;
|
|
833
|
+
maxIterations?: number;
|
|
834
|
+
};
|
|
835
|
+
promptTemplate: {
|
|
836
|
+
systemRole: string;
|
|
837
|
+
simulationInstruction: string;
|
|
838
|
+
evaluationCriteria: string;
|
|
839
|
+
};
|
|
840
|
+
uiLayout: {
|
|
841
|
+
inputArea: 'full' | 'left' | 'top';
|
|
842
|
+
resultArea: 'full' | 'right' | 'bottom';
|
|
843
|
+
showComparisonPanel?: boolean;
|
|
844
|
+
showTimelineView?: boolean;
|
|
845
|
+
};
|
|
846
|
+
specificConfig?: Record<string, any>;
|
|
847
|
+
}
|
|
848
|
+
/**
|
|
849
|
+
* 决策数据
|
|
850
|
+
*/
|
|
851
|
+
export interface DecisionData {
|
|
852
|
+
content: string | Record<string, any>;
|
|
853
|
+
timestamp: number;
|
|
854
|
+
metadata?: Record<string, any>;
|
|
855
|
+
}
|
|
856
|
+
/**
|
|
857
|
+
* 角色类型(用于沉浸式体验)
|
|
858
|
+
*/
|
|
859
|
+
export interface Character {
|
|
860
|
+
name: string;
|
|
861
|
+
avatar?: string;
|
|
862
|
+
personality?: string[];
|
|
863
|
+
background?: string;
|
|
864
|
+
dialogue?: string;
|
|
865
|
+
stance?: string;
|
|
866
|
+
}
|
|
867
|
+
/**
|
|
868
|
+
* 推演结果
|
|
869
|
+
*/
|
|
870
|
+
export interface SimulationResult {
|
|
871
|
+
dimensions: {
|
|
872
|
+
name: string;
|
|
873
|
+
value: number;
|
|
874
|
+
change?: number;
|
|
875
|
+
}[];
|
|
876
|
+
visualization: VisualizationData;
|
|
877
|
+
reasoning: string[];
|
|
878
|
+
risks: string[];
|
|
879
|
+
opportunities: string[];
|
|
880
|
+
counterMeasures?: {
|
|
881
|
+
action: string;
|
|
882
|
+
impact: string;
|
|
883
|
+
severity: 'high' | 'medium' | 'low';
|
|
884
|
+
}[];
|
|
885
|
+
adversary?: Character;
|
|
886
|
+
timeline?: {
|
|
887
|
+
shortTerm: {
|
|
888
|
+
period: string;
|
|
889
|
+
changes: string[];
|
|
890
|
+
risks: string[];
|
|
891
|
+
opportunities: string[];
|
|
892
|
+
};
|
|
893
|
+
midTerm: {
|
|
894
|
+
period: string;
|
|
895
|
+
changes: string[];
|
|
896
|
+
risks: string[];
|
|
897
|
+
opportunities: string[];
|
|
898
|
+
};
|
|
899
|
+
longTerm: {
|
|
900
|
+
period: string;
|
|
901
|
+
changes: string[];
|
|
902
|
+
risks: string[];
|
|
903
|
+
opportunities: string[];
|
|
904
|
+
};
|
|
905
|
+
};
|
|
906
|
+
stressTest?: {
|
|
907
|
+
resilienceScore: number;
|
|
908
|
+
breakingPoint: string;
|
|
909
|
+
extremeScenarios: {
|
|
910
|
+
scenario: string;
|
|
911
|
+
impact: string;
|
|
912
|
+
survivalRate: number;
|
|
913
|
+
}[];
|
|
914
|
+
};
|
|
915
|
+
narrator?: Character;
|
|
916
|
+
stakeholders?: Array<{
|
|
917
|
+
name: string;
|
|
918
|
+
interests: string;
|
|
919
|
+
impact: number;
|
|
920
|
+
acceptance: number;
|
|
921
|
+
concerns?: string[];
|
|
922
|
+
character?: Character;
|
|
923
|
+
}>;
|
|
924
|
+
reversePath?: {
|
|
925
|
+
goal: string;
|
|
926
|
+
steps: any[];
|
|
927
|
+
};
|
|
928
|
+
randomEvents?: Array<{
|
|
929
|
+
type: string;
|
|
930
|
+
description: string;
|
|
931
|
+
probability: number;
|
|
932
|
+
impact: string;
|
|
933
|
+
response: string;
|
|
934
|
+
}>;
|
|
935
|
+
adaptabilityScore?: number;
|
|
936
|
+
historicalCases?: Array<{
|
|
937
|
+
name: string;
|
|
938
|
+
context: string;
|
|
939
|
+
outcome: string;
|
|
940
|
+
similarities: string[];
|
|
941
|
+
differences: string[];
|
|
942
|
+
lessons: string[];
|
|
943
|
+
}>;
|
|
944
|
+
}
|
|
945
|
+
/**
|
|
946
|
+
* 可视化数据
|
|
947
|
+
*/
|
|
948
|
+
export interface VisualizationData {
|
|
949
|
+
charts?: {
|
|
950
|
+
type: 'bar' | 'line' | 'pie' | 'radar' | 'sankey' | 'heatmap' | 'network' | 'gauge';
|
|
951
|
+
data: any;
|
|
952
|
+
options?: any;
|
|
953
|
+
animation?: AnimationConfig;
|
|
954
|
+
}[];
|
|
955
|
+
cards?: {
|
|
956
|
+
title: string;
|
|
957
|
+
value: string | number;
|
|
958
|
+
change?: {
|
|
959
|
+
value: number;
|
|
960
|
+
trend: 'up' | 'down' | 'stable';
|
|
961
|
+
};
|
|
962
|
+
icon?: string;
|
|
963
|
+
color?: string;
|
|
964
|
+
}[];
|
|
965
|
+
timeline?: {
|
|
966
|
+
nodes: {
|
|
967
|
+
time: string;
|
|
968
|
+
label: string;
|
|
969
|
+
events: string[];
|
|
970
|
+
}[];
|
|
971
|
+
branches?: {
|
|
972
|
+
from: string;
|
|
973
|
+
to: string;
|
|
974
|
+
condition: string;
|
|
975
|
+
}[];
|
|
976
|
+
};
|
|
977
|
+
}
|
|
978
|
+
/**
|
|
979
|
+
* 动画配置
|
|
980
|
+
*/
|
|
981
|
+
export interface AnimationConfig {
|
|
982
|
+
duration?: number;
|
|
983
|
+
easing?: string;
|
|
984
|
+
delay?: number;
|
|
985
|
+
}
|
|
986
|
+
/**
|
|
987
|
+
* 评估结果(策略实验室)
|
|
988
|
+
*/
|
|
989
|
+
export interface StrategyEvaluationResult {
|
|
990
|
+
overallScore: number;
|
|
991
|
+
grade: 'A' | 'B' | 'C' | 'D' | 'F';
|
|
992
|
+
dimensionScores: {
|
|
993
|
+
dimension: string;
|
|
994
|
+
score: number;
|
|
995
|
+
weight: number;
|
|
996
|
+
reasoning: string;
|
|
997
|
+
}[];
|
|
998
|
+
strengths: string[];
|
|
999
|
+
weaknesses: string[];
|
|
1000
|
+
suggestions: string[];
|
|
1001
|
+
evaluationBasis: string[];
|
|
1002
|
+
}
|
|
1003
|
+
/**
|
|
1004
|
+
* 单个引导问题
|
|
1005
|
+
*/
|
|
1006
|
+
export interface GuidanceQuestion {
|
|
1007
|
+
/** 问题文案 */
|
|
1008
|
+
question: string;
|
|
1009
|
+
inputType: 'text' | 'options' | 'number';
|
|
1010
|
+
options?: string[];
|
|
1011
|
+
allowMultiple?: boolean;
|
|
1012
|
+
min?: number;
|
|
1013
|
+
max?: number;
|
|
1014
|
+
}
|
|
1015
|
+
/**
|
|
1016
|
+
* 引导步骤(引导模式专用)
|
|
1017
|
+
* AI 可以一次返回多个无依赖关系的问题
|
|
1018
|
+
*/
|
|
1019
|
+
export interface GuidanceStep {
|
|
1020
|
+
type: 'guidance';
|
|
1021
|
+
questions: GuidanceQuestion[];
|
|
1022
|
+
}
|
|
1023
|
+
/**
|
|
1024
|
+
* 引导历史条目
|
|
1025
|
+
*/
|
|
1026
|
+
export interface GuidanceHistoryItem {
|
|
1027
|
+
question: string;
|
|
1028
|
+
answer: any;
|
|
1029
|
+
}
|
|
1030
|
+
/**
|
|
1031
|
+
* 引导确认状态:AI 已判断信息足够,等待用户确认/编辑后才推演
|
|
1032
|
+
*/
|
|
1033
|
+
export interface GuidanceConfirmState {
|
|
1034
|
+
history: GuidanceHistoryItem[];
|
|
1035
|
+
}
|
|
1036
|
+
/**
|
|
1037
|
+
* 策略实验室 InitData
|
|
1038
|
+
*/
|
|
1039
|
+
/**
|
|
1040
|
+
* 角色配置(沉浸式体验)。落在节点上(initData.nodes[].characterConfig),按镜头按需启用。
|
|
1041
|
+
*/
|
|
1042
|
+
export interface StrategyLabCharacterConfig {
|
|
1043
|
+
enabled: boolean;
|
|
1044
|
+
forceRegenerate: boolean;
|
|
1045
|
+
adversary?: Character;
|
|
1046
|
+
stakeholders?: Array<{
|
|
1047
|
+
name: string;
|
|
1048
|
+
interests: string;
|
|
1049
|
+
impact: number;
|
|
1050
|
+
acceptance: number;
|
|
1051
|
+
concerns?: string[];
|
|
1052
|
+
character?: Character;
|
|
1053
|
+
}>;
|
|
1054
|
+
narrator?: Character;
|
|
1055
|
+
}
|
|
1056
|
+
/**
|
|
1057
|
+
* 策略实验室 InitData —— 单一数据源:所有「场景配置」(场景/背景/镜头/收敛方式/推演配置/
|
|
1058
|
+
* 评估维度/输入方式/角色等)只活在 `nodes[]` 里;单场景 = `nodes` 长度为 1 的退化。
|
|
1059
|
+
* 顶层只保留步骤级 / UI 级、跨节点共享的配置。
|
|
1060
|
+
*/
|
|
1061
|
+
export interface StrategyLabInitData {
|
|
1062
|
+
/**
|
|
1063
|
+
* 推演节点链(必填,至少 1 个)。单场景就是长度为 1 的链;多节点 = 有序时序链。
|
|
1064
|
+
* 运行时一律操作 nodes[](见 resolveNodes 归一化)。
|
|
1065
|
+
*/
|
|
1066
|
+
nodes: SimulationNode[];
|
|
1067
|
+
/** 步骤级推演总目标(跨节点,可选) */
|
|
1068
|
+
objectives?: string[];
|
|
1069
|
+
/** 场景主题类型(UI 主题,步骤级) */
|
|
1070
|
+
sceneThemeType?: 'urban-planning' | 'business-strategy' | 'investment' | 'policy' | 'crisis' | 'technology' | 'healthcare' | 'education' | 'supply-chain' | 'environment';
|
|
1071
|
+
/** 场景主题覆盖配置(可选,已废弃,使用节点 simulationConfig.dimensions 替代) */
|
|
1072
|
+
sceneThemeOverride?: {
|
|
1073
|
+
dataLayers?: any[];
|
|
1074
|
+
visual?: {
|
|
1075
|
+
primaryColor?: string;
|
|
1076
|
+
accentColor?: string;
|
|
1077
|
+
};
|
|
1078
|
+
};
|
|
1079
|
+
modeConfig?: Record<string, any>;
|
|
1080
|
+
visualizationPreset?: 'auto' | 'charts' | 'cards' | 'timeline' | 'custom';
|
|
1081
|
+
uiConfig?: StrategyLabUIConfig;
|
|
1082
|
+
}
|
|
1083
|
+
/**
|
|
1084
|
+
* 策略实验室 CheckRules
|
|
1085
|
+
*/
|
|
1086
|
+
export interface StrategyLabCheckRules {
|
|
1087
|
+
minIterations?: number;
|
|
1088
|
+
minComparisons?: number;
|
|
1089
|
+
requiredSteps?: string[];
|
|
1090
|
+
minScore?: number;
|
|
1091
|
+
requiredDimensions?: {
|
|
1092
|
+
dimension: string;
|
|
1093
|
+
minScore: number;
|
|
1094
|
+
}[];
|
|
1095
|
+
mustIncludeRiskAnalysis?: boolean;
|
|
1096
|
+
mustAdjustAfterFeedback?: boolean;
|
|
1097
|
+
/** 节点链门禁:是否要求所有节点都已拍定决策,默认 true */
|
|
1098
|
+
requireAllNodesCommitted?: boolean;
|
|
1099
|
+
}
|
|
1100
|
+
/**
|
|
1101
|
+
* 推演节点(节点链的一个节点)。一个 strategy-lab 步骤可含一条有序节点链。
|
|
1102
|
+
* 节点 = 场景配置 + 决策目标,本质是 initData 性质的配置(落 initData.nodes)。
|
|
1103
|
+
* 仅当「上一节点推演 realize 出事先不可知的新局面、下一节点在新局面上决策」时才分节点;
|
|
1104
|
+
* 信息齐备、需通盘协同的决策不分节点(用单节点多维推演+迭代)。
|
|
1105
|
+
*/
|
|
1106
|
+
export interface SimulationNode {
|
|
1107
|
+
nodeId: string;
|
|
1108
|
+
order: number;
|
|
1109
|
+
/** 本节点场景描述(推演任务处境) */
|
|
1110
|
+
scenario?: string;
|
|
1111
|
+
/** 本节点背景事实(推演所依据的事实基础) */
|
|
1112
|
+
background?: string;
|
|
1113
|
+
/**
|
|
1114
|
+
* 本节点学员要拍定的、带权衡张力的决策目标(非指标、非评分维度)。
|
|
1115
|
+
* 多节点链里必填;单场景(nodes 长度为 1)可省。
|
|
1116
|
+
*/
|
|
1117
|
+
decisionGoal?: string;
|
|
1118
|
+
/** AI 评判该决策目标是否达成的依据。多节点链里建议给出;单场景可省。 */
|
|
1119
|
+
goalCompletionCriteria?: string;
|
|
1120
|
+
/** 推演镜头,每节点独立 */
|
|
1121
|
+
mode: SimulationLensType;
|
|
1122
|
+
/** 决策收敛方式,默认 iterate;compare=多方案并排择优 */
|
|
1123
|
+
decisionStyle?: 'iterate' | 'compare';
|
|
1124
|
+
/** 推演配置(事实/约束/推演维度) */
|
|
1125
|
+
simulationConfig?: {
|
|
1126
|
+
referenceData?: ReferenceData[];
|
|
1127
|
+
constraints?: SimulationConstraint[];
|
|
1128
|
+
dimensions?: Array<{
|
|
1129
|
+
name: string;
|
|
1130
|
+
initialValue?: number;
|
|
1131
|
+
icon?: string;
|
|
1132
|
+
color?: string;
|
|
1133
|
+
}>;
|
|
1134
|
+
};
|
|
1135
|
+
/** 决策输入方式:默认 fields(渲染 decisionFields);guided=AI 分步引导 */
|
|
1136
|
+
decisionInputMethod?: DecisionInputMethod;
|
|
1137
|
+
/** 统一决策字段列表(decisionInputMethod 非 guided 时渲染)。每字段自选控件,可混搭简单控件/可视化widget/文本 */
|
|
1138
|
+
decisionFields?: DecisionField[];
|
|
1139
|
+
/** 节点级即时评估维度 */
|
|
1140
|
+
evaluationDimensions?: StrategyEvaluationDimension[];
|
|
1141
|
+
/** 对抗/群体等镜头按需 */
|
|
1142
|
+
characterConfig?: StrategyLabCharacterConfig;
|
|
1143
|
+
/** 默认 false=软流转(未达成警告但可进入下一节点);true=未达成硬卡 */
|
|
1144
|
+
requireGoalAchieved?: boolean;
|
|
1145
|
+
}
|
|
1146
|
+
/**
|
|
1147
|
+
* 节点产出:学员在该节点拍定后计算,作为下一节点推演的输入前提注入。
|
|
1148
|
+
*/
|
|
1149
|
+
export interface NodeOutcome {
|
|
1150
|
+
nodeId: string;
|
|
1151
|
+
/** 学员拍定的决策 */
|
|
1152
|
+
decision: DecisionData;
|
|
1153
|
+
/** 关键维度末值 → 下一节点维度基线 */
|
|
1154
|
+
dimensionEndValues: Record<string, number>;
|
|
1155
|
+
/** 关键风险 → 下一节点新增约束/背景 */
|
|
1156
|
+
keyRisks: string[];
|
|
1157
|
+
goalAchieved: boolean;
|
|
1158
|
+
/** 注入下一节点背景的紧凑摘要 */
|
|
1159
|
+
summary: string;
|
|
1160
|
+
}
|
|
1161
|
+
/**
|
|
1162
|
+
* 节点运行时状态(按 stepId 持久化于 strategyLabStore)。
|
|
1163
|
+
*/
|
|
1164
|
+
export interface NodeRuntimeState {
|
|
1165
|
+
nodeId: string;
|
|
1166
|
+
status: 'pending' | 'active' | 'committed' | 'skipped';
|
|
1167
|
+
/** 节点内多轮决策 */
|
|
1168
|
+
decisions: DecisionData[];
|
|
1169
|
+
simulationResults: SimulationResult[];
|
|
1170
|
+
/** 节点独立会话,隔离跨节点上下文 */
|
|
1171
|
+
conversationId: string | null;
|
|
1172
|
+
/** 学员拍定的是第几轮决策 */
|
|
1173
|
+
committedDecisionIndex?: number;
|
|
1174
|
+
goalJudgment?: {
|
|
1175
|
+
achieved: boolean;
|
|
1176
|
+
reasoning: string[];
|
|
1177
|
+
suggestions?: string[];
|
|
1178
|
+
};
|
|
1179
|
+
userConfirmedAt?: number;
|
|
1180
|
+
}
|
|
1181
|
+
/**
|
|
1182
|
+
* 所有布局组件的统一 Props
|
|
1183
|
+
*/
|
|
1184
|
+
export interface FormLayoutProps {
|
|
1185
|
+
fields: FormField[];
|
|
1186
|
+
groups: FieldGroup[];
|
|
1187
|
+
columns: number;
|
|
1188
|
+
theme: ThemeTokens;
|
|
1189
|
+
labelLayout: 'vertical' | 'horizontal';
|
|
1190
|
+
groupStyle: 'divider' | 'card' | 'none';
|
|
1191
|
+
formInstance: any;
|
|
1192
|
+
formData: Record<string, any>;
|
|
1193
|
+
validationErrors: Record<string, string>;
|
|
1194
|
+
renderFormField: (field: FormField) => ReactNode;
|
|
1195
|
+
onValuesChange: (changedValues: Record<string, any>) => void;
|
|
1196
|
+
onSubmit?: () => void;
|
|
1197
|
+
submitButtonText?: string;
|
|
1198
|
+
}
|
|
1199
|
+
/**
|
|
1200
|
+
* 插件头部 Props
|
|
1201
|
+
*/
|
|
1202
|
+
export interface PluginHeaderProps {
|
|
1203
|
+
title: string;
|
|
1204
|
+
variant: 'card' | 'banner' | 'minimal';
|
|
1205
|
+
theme: ThemeTokens;
|
|
1206
|
+
/** 去掉底部 margin,由外层容器控制间距 */
|
|
1207
|
+
noMargin?: boolean;
|
|
1208
|
+
}
|
|
1209
|
+
/**
|
|
1210
|
+
* 插件底部 Props
|
|
1211
|
+
*/
|
|
1212
|
+
export interface PluginFooterProps {
|
|
1213
|
+
buttonText: string;
|
|
1214
|
+
theme: ThemeTokens;
|
|
1215
|
+
onSubmit: () => void;
|
|
1216
|
+
}
|
|
1217
|
+
/**
|
|
1218
|
+
* 判断是否为预算分配字段
|
|
1219
|
+
*/
|
|
1220
|
+
export declare function isBudgetAllocationField(field: VisualField): boolean;
|
|
1221
|
+
/**
|
|
1222
|
+
* 判断是否为资源分配字段
|
|
1223
|
+
*/
|
|
1224
|
+
export declare function isResourceDistributionField(field: VisualField): boolean;
|
|
1225
|
+
/**
|
|
1226
|
+
* 判断是否为优先级排序字段
|
|
1227
|
+
*/
|
|
1228
|
+
export declare function isPriorityRankingField(field: VisualField): boolean;
|
|
1229
|
+
/**
|
|
1230
|
+
* 判断是否为时间规划字段
|
|
1231
|
+
*/
|
|
1232
|
+
export declare function isTimelinePlanningField(field: VisualField): boolean;
|
|
1233
|
+
/**
|
|
1234
|
+
* 验证 VisualField 配置
|
|
1235
|
+
*/
|
|
1236
|
+
export declare function validateVisualField(field: VisualField): {
|
|
1237
|
+
valid: boolean;
|
|
1238
|
+
errors: string[];
|
|
1239
|
+
};
|
|
1240
|
+
/**
|
|
1241
|
+
* 验证 VisualInputConfig 配置
|
|
1242
|
+
*/
|
|
1243
|
+
export declare function validateVisualInputConfig(config: VisualInputConfig): {
|
|
1244
|
+
valid: boolean;
|
|
1245
|
+
errors: string[];
|
|
1246
|
+
};
|
|
1247
|
+
export {};
|