How tianbuyu-wwx/dsh-formatforge works
DSH-FormatForge is a DeepSeek Harness plugin and Python conversion engine: users submit files through chat tools, CLI, or browser drag-and-drop; the engine detects and parses formats, produces structured output and quality/enhancement metadata, and can place artifacts in a searchable inbox. The graph preserves the documented batch, diff, format-listing, panel, and inbox-index capabilities. Some subsystem details are documented but unsampled; those links are identified by README evidence rather than implying source inspection.
Main entry points: __main__.py CLI entry point · pipeline_steps.py Pipeline steps · inbox-watcher.mjs Inbox watcher · pipeline.py Conversion pipeline
Components 34
Harness plugin
- Plugin registration
packages/dsh-formatforge/index.mjs - Drag-and-drop client
packages/dsh-formatforge/lib/client.source.js - Upload route
packages/dsh-formatforge/http/upload.mjs - Inbox API
packages/dsh-formatforge/http/api.mjs - Translate tool
packages/dsh-formatforge/tools/translate.mjs - Result tool
packages/dsh-formatforge/tools/result.mjs - Python runner
packages/dsh-formatforge/services/python-runner.mjs - Inbox watcher
packages/dsh-formatforge/services/inbox-watcher.mjs - Session notification
packages/dsh-formatforge/services/notify.mjs - Inbox panel
packages/dsh-formatforge/lib/panel.source.js
Conversion engine
- Conversion pipeline
core/pipeline.py - Pipeline steps
core/pipeline_steps.py - Strategy selection
core/decision_engine.py - Conversion strategies
core/conversion_strategies.py - Quality reporting
core/quality_report.py - Document models
core/models.py
Parsing and enrichment
- Format detection
core/format_detector.py - Input adapters
core/input_adapters.py - Parser registry
core/file_parser.py - Format parsers
parsers - OCR engine
core/ocr_engine.py - PDF enrichment
core/pdf_enhance.py - Table semantics
core/table_semantics.py - Enhancement hints
core/enhance.py
Inbox and discovery
- Inbox commands
formatforge/inbox.py - Artifact output guard
formatforge/output_guard.py - Inbox index database
packages/dsh-formatforge/services/inbox-db.mjs - Inbox paths
packages/dsh-formatforge/services/ff-paths.mjs
CLI capabilities
- CLI entry point
formatforge/__main__.py - Batch conversion
formatforge/batch.py - Artifact diff
formatforge/diff.py - Format catalog
core/format_capabilities.py
Other components
- Harness user
- DeepSeek Harness
Connections 36
- Harness user → DeepSeek Harness: submits files
README.md - DeepSeek Harness → Translate tool: invokes tool
README.md - Harness user → Drag-and-drop client: drops file
README.md - Drag-and-drop client → Upload route: uploads file
README.md - Upload route → Inbox watcher: places in inbox
README.md - Translate tool → Python runner: runs conversion
- Inbox watcher → Python runner: converts inbox file
packages/dsh-formatforge/services/inbox-watcher.mjs - Python runner → CLI entry point: invokes module
packages/dsh-formatforge/services/python-runner.mjs - CLI entry point → Conversion pipeline: runs pipeline
formatforge/__main__.py - Conversion pipeline → Pipeline steps: executes steps
core/pipeline.py - Pipeline steps → Input adapters: reads input
core/pipeline_steps.py - Pipeline steps → Format detection: detects format
core/pipeline_steps.py - Pipeline steps → Parser registry: parses input
core/pipeline_steps.py - Parser registry → Format parsers: dispatches parser
core/file_parser.py - Pipeline steps → Strategy selection: chooses conversion
core/pipeline_steps.py - Pipeline steps → Conversion strategies: converts content
core/pipeline_steps.py - Pipeline steps → OCR engine: extracts scanned text
core/pipeline_steps.py - Format parsers → PDF enrichment: enriches PDF
parsers/pdf_parser.py - Format parsers → Table semantics: normalizes tables
parsers/pdf_parser.py - Conversion pipeline → Document models: carries pipeline state
core/pipeline.py - CLI entry point → Quality reporting: adds quality report
formatforge/__main__.py - CLI entry point → Enhancement hints: returns enhancement hint
- CLI entry point → Batch conversion: dispatches batch
formatforge/__main__.py - CLI entry point → Artifact diff: dispatches diff
formatforge/__main__.py - CLI entry point → Format catalog: lists capabilities
formatforge/__main__.py - CLI entry point → Inbox commands: runs inbox commands
formatforge/__main__.py - Inbox commands → Inbox index database: updates index
- Artifact output guard → Inbox commands: writes artifacts
formatforge/output_guard.py - Inbox API → Inbox index database: queries index
packages/dsh-formatforge/http/api.mjs - Inbox API → Inbox paths: resolves inbox
packages/dsh-formatforge/http/api.mjs - Inbox watcher → Inbox paths: resolves inbox
packages/dsh-formatforge/services/inbox-watcher.mjs - Inbox watcher → Session notification: notifies session
- DeepSeek Harness → Inbox panel: opens inbox panel
README.md - Inbox panel → Inbox API: requests inbox data
README.md - Result tool → Inbox index database: searches artifacts
packages/dsh-formatforge/tools/result.mjs - DeepSeek Harness → Result tool: requests results
README.md