solidworks-mcp-python 1.5.0__py3-none-any.whl

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.
Files changed (115) hide show
  1. solidworks_mcp/__init__.py +57 -0
  2. solidworks_mcp/adapters/__init__.py +40 -0
  3. solidworks_mcp/adapters/base.py +1882 -0
  4. solidworks_mcp/adapters/circuit_breaker.py +2052 -0
  5. solidworks_mcp/adapters/com_executor.py +252 -0
  6. solidworks_mcp/adapters/complexity_analyzer.py +272 -0
  7. solidworks_mcp/adapters/connection_pool.py +1884 -0
  8. solidworks_mcp/adapters/factory.py +366 -0
  9. solidworks_mcp/adapters/intelligent_router.py +218 -0
  10. solidworks_mcp/adapters/mock_adapter.py +4016 -0
  11. solidworks_mcp/adapters/pywin32_adapter.py +2842 -0
  12. solidworks_mcp/adapters/solidworks/__init__.py +17 -0
  13. solidworks_mcp/adapters/solidworks/bitmap.py +180 -0
  14. solidworks_mcp/adapters/solidworks/com_utils.py +56 -0
  15. solidworks_mcp/adapters/solidworks/dimension_layout.py +753 -0
  16. solidworks_mcp/adapters/solidworks/documentation.py +1476 -0
  17. solidworks_mcp/adapters/solidworks/drawing_standard.py +1993 -0
  18. solidworks_mcp/adapters/solidworks/face_selection.py +392 -0
  19. solidworks_mcp/adapters/solidworks/features.py +3362 -0
  20. solidworks_mcp/adapters/solidworks/io.py +3649 -0
  21. solidworks_mcp/adapters/solidworks/rebuild_diagnostics.py +269 -0
  22. solidworks_mcp/adapters/solidworks/rebuild_inspector.py +146 -0
  23. solidworks_mcp/adapters/solidworks/selection.py +308 -0
  24. solidworks_mcp/adapters/solidworks/sketch.py +2545 -0
  25. solidworks_mcp/adapters/sw_feature_errors.py +66 -0
  26. solidworks_mcp/adapters/sw_type_info.py +317 -0
  27. solidworks_mcp/adapters/vba_adapter.py +318 -0
  28. solidworks_mcp/adapters/vba_macro_executor.py +215 -0
  29. solidworks_mcp/agents/__init__.py +68 -0
  30. solidworks_mcp/agents/design_knowledge/assembly_patterns.md +127 -0
  31. solidworks_mcp/agents/design_knowledge/hinges.md +118 -0
  32. solidworks_mcp/agents/design_knowledge/snap_fits.md +93 -0
  33. solidworks_mcp/agents/design_knowledge/solidworks_basics.md +3 -0
  34. solidworks_mcp/agents/design_knowledge/tolerancing.md +128 -0
  35. solidworks_mcp/agents/harness.py +216 -0
  36. solidworks_mcp/agents/history_db.py +1508 -0
  37. solidworks_mcp/agents/retrieval_index.py +164 -0
  38. solidworks_mcp/agents/schemas.py +165 -0
  39. solidworks_mcp/agents/smoke_test.py +285 -0
  40. solidworks_mcp/agents/soc_exporter.py +650 -0
  41. solidworks_mcp/agents/soc_pickup.py +332 -0
  42. solidworks_mcp/agents/soc_rewind.py +221 -0
  43. solidworks_mcp/agents/vector_rag.py +665 -0
  44. solidworks_mcp/cache/__init__.py +5 -0
  45. solidworks_mcp/cache/response_cache.py +164 -0
  46. solidworks_mcp/config.py +729 -0
  47. solidworks_mcp/exceptions.py +37 -0
  48. solidworks_mcp/security/__init__.py +68 -0
  49. solidworks_mcp/security/auth.py +128 -0
  50. solidworks_mcp/security/cors.py +27 -0
  51. solidworks_mcp/security/rate_limiting.py +90 -0
  52. solidworks_mcp/security/runtime.py +155 -0
  53. solidworks_mcp/server.py +777 -0
  54. solidworks_mcp/server_cli_fixed.py +120 -0
  55. solidworks_mcp/setup/__init__.py +1 -0
  56. solidworks_mcp/setup/cli.py +399 -0
  57. solidworks_mcp/setup/clients.py +157 -0
  58. solidworks_mcp/setup/config_file.py +230 -0
  59. solidworks_mcp/setup/handshake.py +202 -0
  60. solidworks_mcp/setup/launcher.py +102 -0
  61. solidworks_mcp/setup/legacy.py +100 -0
  62. solidworks_mcp/setup/registration.py +193 -0
  63. solidworks_mcp/setup/solidworks.py +49 -0
  64. solidworks_mcp/tools/__init__.py +64 -0
  65. solidworks_mcp/tools/analysis.py +723 -0
  66. solidworks_mcp/tools/automation.py +578 -0
  67. solidworks_mcp/tools/docs_discovery.py +1476 -0
  68. solidworks_mcp/tools/drawing.py +1015 -0
  69. solidworks_mcp/tools/drawing_analysis.py +456 -0
  70. solidworks_mcp/tools/drawing_automation.py +627 -0
  71. solidworks_mcp/tools/engineering_data.py +466 -0
  72. solidworks_mcp/tools/error_classifier.py +232 -0
  73. solidworks_mcp/tools/export.py +833 -0
  74. solidworks_mcp/tools/file_facts.py +40 -0
  75. solidworks_mcp/tools/file_management.py +1473 -0
  76. solidworks_mcp/tools/input_compat.py +17 -0
  77. solidworks_mcp/tools/macro_recording.py +464 -0
  78. solidworks_mcp/tools/modeling.py +2360 -0
  79. solidworks_mcp/tools/sketching.py +1422 -0
  80. solidworks_mcp/tools/template_management.py +367 -0
  81. solidworks_mcp/tools/tool_boundary.py +280 -0
  82. solidworks_mcp/tools/vba_generation.py +1145 -0
  83. solidworks_mcp/ui/__init__.py +9 -0
  84. solidworks_mcp/ui/local_llm.py +725 -0
  85. solidworks_mcp/ui/routers/__init__.py +10 -0
  86. solidworks_mcp/ui/routers/checkpoint.py +24 -0
  87. solidworks_mcp/ui/routers/docs.py +47 -0
  88. solidworks_mcp/ui/routers/llm.py +83 -0
  89. solidworks_mcp/ui/routers/local_model.py +69 -0
  90. solidworks_mcp/ui/routers/model.py +75 -0
  91. solidworks_mcp/ui/routers/preview.py +38 -0
  92. solidworks_mcp/ui/routers/session.py +161 -0
  93. solidworks_mcp/ui/routers/viewer.py +154 -0
  94. solidworks_mcp/ui/schemas.py +502 -0
  95. solidworks_mcp/ui/server.py +298 -0
  96. solidworks_mcp/ui/service.py +481 -0
  97. solidworks_mcp/ui/services/__init__.py +136 -0
  98. solidworks_mcp/ui/services/_utils.py +958 -0
  99. solidworks_mcp/ui/services/checkpoint_service.py +1110 -0
  100. solidworks_mcp/ui/services/docs_service.py +282 -0
  101. solidworks_mcp/ui/services/llm_service.py +956 -0
  102. solidworks_mcp/ui/services/model_service.py +459 -0
  103. solidworks_mcp/ui/services/parameter_repair_service.py +314 -0
  104. solidworks_mcp/ui/services/preview_service.py +489 -0
  105. solidworks_mcp/ui/services/session_service.py +1389 -0
  106. solidworks_mcp/utils/__init__.py +9 -0
  107. solidworks_mcp/utils/feature_tree_classifier.py +342 -0
  108. solidworks_mcp/utils/logging.py +76 -0
  109. solidworks_mcp/utils/validation.py +77 -0
  110. solidworks_mcp/version.py +8 -0
  111. solidworks_mcp_python-1.5.0.dist-info/METADATA +410 -0
  112. solidworks_mcp_python-1.5.0.dist-info/RECORD +115 -0
  113. solidworks_mcp_python-1.5.0.dist-info/WHEEL +4 -0
  114. solidworks_mcp_python-1.5.0.dist-info/entry_points.txt +3 -0
  115. solidworks_mcp_python-1.5.0.dist-info/licenses/LICENSE +21 -0
@@ -0,0 +1,502 @@
1
+ """Shared Pydantic schemas for the interactive UI dashboard.
2
+
3
+ These models keep dashboard payloads explicit, validated, and documented so both backend
4
+ endpoints and Prefab UI state use the same contract.
5
+ """
6
+
7
+ from __future__ import annotations
8
+
9
+ from typing import Any
10
+
11
+ from pydantic import BaseModel, ConfigDict, Field
12
+
13
+
14
+ class DashboardCheckpoint(BaseModel):
15
+ """One checkpoint row shown in the planning/status area.
16
+
17
+ Attributes:
18
+ goal (str): The goal value.
19
+ model_config (Any): The model config value.
20
+ status (str): The status value.
21
+ step (str): The step value.
22
+ tools (str): The tools value.
23
+ """
24
+
25
+ model_config = ConfigDict(extra="forbid")
26
+
27
+ step: str = Field(
28
+ default="1",
29
+ description="Human-readable checkpoint number as a string for stable rendering.",
30
+ min_length=1,
31
+ )
32
+ goal: str = Field(
33
+ default="Define first step",
34
+ description="Checkpoint objective users review before execution.",
35
+ min_length=1,
36
+ )
37
+ tools: str = Field(
38
+ default="create_sketch",
39
+ description="Allowed tool summary for this checkpoint.",
40
+ min_length=1,
41
+ )
42
+ status: str = Field(
43
+ default="queued",
44
+ description="Execution status label (queued/approved/executed/failed).",
45
+ min_length=1,
46
+ )
47
+
48
+
49
+ class DashboardEvidenceRow(BaseModel):
50
+ """One evidence row shown in retrieval context.
51
+
52
+ Attributes:
53
+ detail (str): The detail value.
54
+ model_config (Any): The model config value.
55
+ score (str): The score value.
56
+ source (str): The source value.
57
+ """
58
+
59
+ model_config = ConfigDict(extra="forbid")
60
+
61
+ source: str = Field(
62
+ default="session",
63
+ description="Evidence source type (docs/session/tool-history/etc.).",
64
+ min_length=1,
65
+ )
66
+ detail: str = Field(
67
+ default="No evidence detail",
68
+ description="Short evidence explanation users can audit.",
69
+ min_length=1,
70
+ )
71
+ score: str = Field(
72
+ default="-",
73
+ description="Display score string for ranking confidence.",
74
+ min_length=1,
75
+ )
76
+
77
+
78
+ class DashboardUIState(BaseModel):
79
+ """Top-level dashboard state shared between backend and Prefab UI.
80
+
81
+ Field descriptions are user-facing semantics and validation intent.
82
+
83
+ Attributes:
84
+ accepted_family (str): The accepted family value.
85
+ active_model_configuration (str): The active model configuration value.
86
+ active_model_path (str): The active model path value.
87
+ active_model_status (str): The active model status value.
88
+ active_model_type (str): The active model type value.
89
+ api_origin (str): The api origin value.
90
+ assumptions_text (str): The assumptions text value.
91
+ canonical_prompt_text (str): The canonical prompt text value.
92
+ checkpoints (list[DashboardCheckpoint]): The checkpoints value.
93
+ checkpoints_text (str): The checkpoints text value.
94
+ clarifying_questions_text (str): The clarifying questions text value.
95
+ context_file_input (str): The context file input value.
96
+ context_load_status (str): The context load status value.
97
+ context_name_input (str): The context name input value.
98
+ context_save_status (str): The context save status value.
99
+ context_text (str): The context text value.
100
+ context_used_pct (int): The context used pct value.
101
+ ctx_tick (int): The ctx tick value.
102
+ docs_context_text (str): The docs context text value.
103
+ docs_query (str): The docs query value.
104
+ evidence_rows (list[DashboardEvidenceRow]): The evidence rows value.
105
+ evidence_rows_text (str): The evidence rows text value.
106
+ family_confidence (str): The family confidence value.
107
+ family_evidence_text (str): The family evidence text value.
108
+ family_warning_text (str): The family warning text value.
109
+ feature_grounding_warning_text (str): The feature grounding warning text value.
110
+ feature_target_status (str): The feature target status value.
111
+ feature_target_text (str): The feature target text value.
112
+ feature_tree_items (list[dict]): The feature tree items value.
113
+ flow_header_text (str): The flow header text value.
114
+ latest_error_text (str): The latest error text value.
115
+ latest_message (str): The latest message value.
116
+ latest_tool (str): The latest tool value.
117
+ local_endpoint (str): The local endpoint value.
118
+ local_model_available (bool): The local model available value.
119
+ local_model_busy (bool): The local model busy value.
120
+ local_model_label (str): The local model label value.
121
+ local_model_pull_command (str): The local model pull command value.
122
+ local_model_recommended_ollama_model (str): The local model recommended ollama model
123
+ value.
124
+ local_model_recommended_tier (str): The local model recommended tier value.
125
+ local_model_status_text (str): The local model status text value.
126
+ manual_sync_ready (bool): The manual sync ready value.
127
+ mocked_tools_text (str): The mocked tools text value.
128
+ model_config (Any): The model config value.
129
+ model_context_text (str): The model context text value.
130
+ model_name (str): The model name value.
131
+ model_path_input_chooser (str): The model path input chooser value.
132
+ model_path_input_edit (str): The model path input edit value.
133
+ model_profile (str): The model profile value.
134
+ model_provider (str): The model provider value.
135
+ normalized_brief (str): The normalized brief value.
136
+ notes_text (str): The notes text value.
137
+ orchestration_status (str): The orchestration status value.
138
+ preview_orientation (str): The preview orientation value.
139
+ preview_status (str): The preview status value.
140
+ preview_url (str): The preview url value.
141
+ preview_view_urls (dict[str, str]): The preview view urls value.
142
+ preview_viewer_url (str): The preview viewer url value.
143
+ proposed_family (str): The proposed family value.
144
+ rag_chunk_count (int): The rag chunk count value.
145
+ rag_index_path (str): The rag index path value.
146
+ rag_namespace (str): The rag namespace value.
147
+ rag_provenance_text (str): The rag provenance text value.
148
+ rag_source_path (str): The rag source path value.
149
+ rag_status (str): The rag status value.
150
+ readiness_adapter_mode (str): The readiness adapter mode value.
151
+ readiness_db_ready (bool): The readiness db ready value.
152
+ readiness_preview_ready (bool): The readiness preview ready value.
153
+ readiness_provider_configured (bool): The readiness provider configured value.
154
+ readiness_summary (str): The readiness summary value.
155
+ remediation_hint (str): The remediation hint value.
156
+ selected_feature_name (str): The selected feature name value.
157
+ session_id (str): The session id value.
158
+ structured_rendering_enabled (bool): The structured rendering enabled value.
159
+ tool_history_text (str): The tool history text value.
160
+ uploaded_file_payloads (list[dict[str, Any]]): The uploaded file payloads value.
161
+ user_clarification_answer (str): The user clarification answer value.
162
+ user_goal (str): The user goal value.
163
+ workflow_guidance_text (str): The workflow guidance text value.
164
+ workflow_label (str): The workflow label value.
165
+ workflow_mode (str): The workflow mode value.
166
+ """
167
+
168
+ model_config = ConfigDict(extra="forbid")
169
+
170
+ ctx_tick: int = Field(
171
+ default=0,
172
+ ge=0,
173
+ description="UI heartbeat counter used for context animation updates.",
174
+ )
175
+ session_id: str = Field(
176
+ default="prefab-dashboard",
177
+ min_length=1,
178
+ description="Persistent session identifier used by backend state APIs.",
179
+ )
180
+ workflow_mode: str = Field(
181
+ default="unselected",
182
+ description="Selected onboarding workflow: unselected, edit_existing, or new_design.",
183
+ )
184
+ workflow_label: str = Field(
185
+ default="Choose a workflow",
186
+ description="Human-readable label for the currently selected workflow branch.",
187
+ )
188
+ workflow_guidance_text: str = Field(
189
+ default="Choose whether you are attaching an existing SolidWorks file or starting a new design from scratch.",
190
+ min_length=5,
191
+ description="Short onboarding guidance shown near the workflow selector.",
192
+ )
193
+ user_goal: str = Field(
194
+ default="Design a printable mounting component with documented constraints and fastener strategy.",
195
+ min_length=5,
196
+ description="Primary user intent prompt for the design workflow.",
197
+ )
198
+ flow_header_text: str = Field(
199
+ default="Goal -> Assumptions -> Clarify -> Plan -> Execute",
200
+ min_length=5,
201
+ description="Linear workflow breadcrumb shown at the top of the dashboard.",
202
+ )
203
+ assumptions_text: str = Field(
204
+ default="Assume PETG, 0.4mm nozzle, 0.2mm layers, and 0.30mm mating clearance unless overridden.",
205
+ min_length=5,
206
+ description="Editable assumptions reviewed by user before planning/execution.",
207
+ )
208
+ active_model_path: str = Field(
209
+ default="",
210
+ description="Absolute path to the SolidWorks model the dashboard should inspect and modify.",
211
+ )
212
+ model_path_input_chooser: str = Field(
213
+ default="",
214
+ description="Editable draft path used by the chooser-screen attach textbox.",
215
+ )
216
+ model_path_input_edit: str = Field(
217
+ default="",
218
+ description="Editable draft path used by the edit-existing attach textbox.",
219
+ )
220
+ uploaded_file_payloads: list[dict[str, Any]] = Field(
221
+ default_factory=list,
222
+ description="Temporary browser file-picker payloads used for existing-model attach requests.",
223
+ )
224
+ active_model_status: str = Field(
225
+ default="No active model connected yet.",
226
+ description="Status line describing the currently attached target model.",
227
+ )
228
+ active_model_type: str = Field(
229
+ default="",
230
+ description="Detected document type for the connected target model.",
231
+ )
232
+ active_model_configuration: str = Field(
233
+ default="",
234
+ description="Active configuration name for the connected target model.",
235
+ )
236
+ feature_target_text: str = Field(
237
+ default="",
238
+ description="Feature-tree target references such as @Boss-Extrude1 or @Sketch2.",
239
+ )
240
+ feature_target_status: str = Field(
241
+ default="No grounded feature target selected.",
242
+ description="Validation status for the current feature-target references.",
243
+ )
244
+ feature_grounding_warning_text: str = Field(
245
+ default="",
246
+ description="Inline warning shown when grounded feature resolution is unavailable for the current model context.",
247
+ )
248
+ normalized_brief: str = Field(
249
+ default="Design a printable mounting component with documented constraints and fastener strategy.",
250
+ min_length=5,
251
+ description="LLM-normalized brief used as canonical planning input.",
252
+ )
253
+ clarifying_questions_text: str = Field(
254
+ default="No outstanding clarification questions.",
255
+ description="Rendered clarifying questions generated by LLM analysis.",
256
+ )
257
+ proposed_family: str = Field(
258
+ default="unclassified",
259
+ description="Current proposed modeling family/classification.",
260
+ )
261
+ family_confidence: str = Field(
262
+ default="pending",
263
+ description="Confidence label for family classification.",
264
+ )
265
+ family_evidence_text: str = Field(
266
+ default="No family evidence yet.",
267
+ description="Human-readable evidence summary behind family suggestion.",
268
+ )
269
+ family_warning_text: str = Field(
270
+ default="No blocking warnings.",
271
+ description="Warnings/ambiguities surfaced before execution.",
272
+ )
273
+ accepted_family: str = Field(
274
+ default="",
275
+ description="Family accepted by user for execution routing.",
276
+ )
277
+ checkpoints: list[DashboardCheckpoint] = Field(
278
+ default_factory=list,
279
+ description="Structured checkpoint list for planning/execution workflow.",
280
+ )
281
+ checkpoints_text: str = Field(
282
+ default="No checkpoints available yet.",
283
+ description="Fallback checkpoint summary for simplified rendering modes.",
284
+ )
285
+ evidence_rows: list[DashboardEvidenceRow] = Field(
286
+ default_factory=list,
287
+ description="Structured evidence rows tied to planning decisions.",
288
+ )
289
+ evidence_rows_text: str = Field(
290
+ default="No evidence links captured yet.",
291
+ description="Fallback evidence summary for simplified rendering modes.",
292
+ )
293
+ structured_rendering_enabled: bool = Field(
294
+ default=False,
295
+ description="True when checkpoint/evidence arrays are safe to render in structured table components.",
296
+ )
297
+ manual_sync_ready: bool = Field(
298
+ default=False,
299
+ description="User signal that manual SolidWorks edits are ready to reconcile.",
300
+ )
301
+ preview_url: str = Field(
302
+ default="",
303
+ description="Rendered preview image URL (if available).",
304
+ )
305
+ preview_status: str = Field(
306
+ default="No preview captured yet.",
307
+ description="Status line for preview pipeline health and recency.",
308
+ )
309
+ preview_orientation: str = Field(
310
+ default="current",
311
+ description="Requested camera orientation for preview refresh operations.",
312
+ )
313
+ latest_message: str = Field(
314
+ default="Ready.",
315
+ description="Latest backend status message for current session actions.",
316
+ )
317
+ latest_tool: str = Field(
318
+ default="waiting",
319
+ description="Most recent tool/action name for execution trace visibility.",
320
+ )
321
+ mocked_tools_text: str = Field(
322
+ default="",
323
+ description="Notice listing mocked tools when adapter bindings are missing.",
324
+ )
325
+ latest_error_text: str = Field(
326
+ default="",
327
+ description="Inline error text for card-level visibility without relying only on toasts.",
328
+ )
329
+ remediation_hint: str = Field(
330
+ default="",
331
+ description="Suggested remediation shown next to the latest inline error.",
332
+ )
333
+ model_provider: str = Field(
334
+ default="github",
335
+ description="Current LLM provider selection for clarify/plan actions.",
336
+ )
337
+ model_name: str = Field(
338
+ default="github:openai/gpt-4.1",
339
+ min_length=3,
340
+ description="Fully-qualified model identifier used for pydantic-ai calls.",
341
+ )
342
+ model_profile: str = Field(
343
+ default="balanced",
344
+ description="Local-model sizing profile (small/balanced/large).",
345
+ )
346
+ local_endpoint: str = Field(
347
+ default="http://127.0.0.1:11434/v1",
348
+ min_length=5,
349
+ description="OpenAI-compatible local endpoint for local model routing.",
350
+ )
351
+ local_model_status_text: str = Field(
352
+ default="Local model controls idle.",
353
+ description="Operator-facing status for local-model probe and pull actions.",
354
+ )
355
+ local_model_busy: bool = Field(
356
+ default=False,
357
+ description="Whether a local-model probe or pull action is currently in flight.",
358
+ )
359
+ local_model_available: bool = Field(
360
+ default=False,
361
+ description="Whether Ollama responded successfully to probe.",
362
+ )
363
+ local_model_recommended_tier: str = Field(
364
+ default="",
365
+ description="Recommended local model tier reported by the probe endpoint.",
366
+ )
367
+ local_model_recommended_ollama_model: str = Field(
368
+ default="",
369
+ description="Recommended Ollama model tag reported by the probe endpoint.",
370
+ )
371
+ local_model_pull_command: str = Field(
372
+ default="",
373
+ description="Recommended Ollama pull command from probe results.",
374
+ )
375
+ local_model_label: str = Field(
376
+ default="",
377
+ description="Human-readable label for the currently recommended local model.",
378
+ )
379
+ rag_source_path: str = Field(
380
+ default="",
381
+ description="Local path or http/https URL for BYO retrieval ingestion, such as a PDF, HTML article, or markdown guide.",
382
+ )
383
+ rag_namespace: str = Field(
384
+ default="engineering-reference",
385
+ min_length=1,
386
+ description="Namespace used when storing chunks for a user-provided retrieval corpus.",
387
+ )
388
+ rag_status: str = Field(
389
+ default="No retrieval source ingested yet.",
390
+ description="Status message for the latest BYO retrieval ingestion run.",
391
+ )
392
+ rag_index_path: str = Field(
393
+ default="",
394
+ description="Filesystem path of the generated retrieval index for user-provided content.",
395
+ )
396
+ rag_chunk_count: int = Field(
397
+ default=0,
398
+ ge=0,
399
+ description="Number of chunks produced for the current BYO retrieval corpus.",
400
+ )
401
+ rag_provenance_text: str = Field(
402
+ default="No retrieval provenance available yet.",
403
+ description="Condensed provenance summary for the latest ingested retrieval corpus.",
404
+ )
405
+ docs_query: str = Field(
406
+ default="SolidWorks MCP endpoints",
407
+ description="Search phrase used when fetching docs context from the docs endpoint.",
408
+ )
409
+ docs_context_text: str = Field(
410
+ default="No docs context loaded yet.",
411
+ description="Filtered docs excerpt shown in the docs pane under the model viewer.",
412
+ )
413
+ notes_text: str = Field(
414
+ default="",
415
+ description="User-authored engineering notes stored with the session.",
416
+ )
417
+ orchestration_status: str = Field(
418
+ default="Ready.",
419
+ description="Status line for the global Go orchestration action.",
420
+ )
421
+ context_save_status: str = Field(
422
+ default="",
423
+ description="Result message for the latest save-context action.",
424
+ )
425
+ context_load_status: str = Field(
426
+ default="",
427
+ description="Result message for the latest load-context action.",
428
+ )
429
+ context_name_input: str = Field(
430
+ default="prefab-dashboard",
431
+ description="Draft file-name token used by the save-context button.",
432
+ )
433
+ context_file_input: str = Field(
434
+ default="",
435
+ description="Draft file path used by the load-context button.",
436
+ )
437
+ readiness_provider_configured: bool = Field(
438
+ default=False,
439
+ description="Whether credentials/config exist for selected model provider.",
440
+ )
441
+ readiness_adapter_mode: str = Field(
442
+ default="unknown",
443
+ description="Detected SolidWorks adapter mode (pywin32/mock/vba).",
444
+ )
445
+ readiness_preview_ready: bool = Field(
446
+ default=False,
447
+ description="Whether preview export directory is writable and available.",
448
+ )
449
+ readiness_db_ready: bool = Field(
450
+ default=True,
451
+ description="Whether dashboard session persistence is reachable.",
452
+ )
453
+ readiness_summary: str = Field(
454
+ default="Readiness not computed yet.",
455
+ description="Condensed readiness status line for UX troubleshooting.",
456
+ )
457
+ context_used_pct: int = Field(
458
+ default=38,
459
+ ge=0,
460
+ le=100,
461
+ description="Approximate context budget utilization percentage.",
462
+ )
463
+ context_text: str = Field(
464
+ default="76k / 200k tokens",
465
+ description="Human-readable context budget string for the UI meter.",
466
+ )
467
+ model_context_text: str = Field(
468
+ default="No active model context yet.",
469
+ description="Structured summary of the currently attached local SolidWorks model.",
470
+ )
471
+ canonical_prompt_text: str = Field(
472
+ default="",
473
+ description="Canonical operator-facing prompt assembled from the active dashboard state.",
474
+ )
475
+ tool_history_text: str = Field(
476
+ default="[]",
477
+ description="Recent MCP/tool execution history rendered as trace JSON for operator review.",
478
+ )
479
+ preview_viewer_url: str = Field(
480
+ default="",
481
+ description="URL for the embedded Three.js 3D viewer iframe (changes with each refresh to force reload).",
482
+ )
483
+ preview_view_urls: dict[str, str] = Field(
484
+ default_factory=dict,
485
+ description="Per-orientation PNG URLs keyed by orientation name (isometric, front, top, right).",
486
+ )
487
+ user_clarification_answer: str = Field(
488
+ default="",
489
+ description="User-typed answers or clarifications in response to LLM-generated questions.",
490
+ )
491
+ api_origin: str = Field(
492
+ default="http://127.0.0.1:8766",
493
+ description="Backend origin that Prefab UI is expected to call.",
494
+ )
495
+ feature_tree_items: list[dict] = Field(
496
+ default_factory=list,
497
+ description="Feature tree rows from the active model (name, type, suppressed, position).",
498
+ )
499
+ selected_feature_name: str = Field(
500
+ default="",
501
+ description="Name of the feature most recently highlighted in SolidWorks.",
502
+ )