Introduction¶
DeepSeek Harness (DSH) extends its capabilities through a plugin mechanism, allowing AI Agents to interact with backend resources within the Web UI. In spreadsheet scenarios, if you need to open, create, or modify Excel files in real-time within a browser interface, a frontend driver is required to bridge the AI tools with the SpreadJS engine. This plugin aims to solve the problem of AI being unable to directly manipulate spreadsheets within the Web UI.
What is this?¶
grapecityxa/dsh-plugin-spreadjs-driver is a client-side plugin maintained by GrapeCityXA. It allows AI to open, create, and manipulate SpreadJS workbooks within the DSH Web UI.
Its core logic is “bridging”:
* Editor is responsible for: Owning the Workbook instance, the SpreadJS engine, UI loading, saving, and restoration.
* Driver is responsible for: Providing AI tools, routing chat requests, and executing JavaScript code.
The plugin does not include the SpreadJS/Designer engine and has no runtime dependencies; it relies entirely on the accompanying Editor to provide the environment.
Installation and Dependencies¶
Environment requirements must be met before use: Node.js >= 22.19, DSH version >= 0.2.0-rc.2.
This plugin must be used in conjunction with @grapecity-software/dsh-spreadjs-editor. Both need to be installed into the same web profile:
dsh plugin --profile web add @grapecity-software/dsh-spreadjs-editor
dsh plugin --profile web add @grapecity-software/dsh-spreadjs-driver
After configuration, select this driver in the “Settings → Spreadsheet Editor” section of the DSH Web UI and wait for loading to complete.
Core Tools¶
The plugin provides three core tools for status queries, file operations, and code execution:
- sjs_live_status: Queries the connection status of the current chat and available workbooks.
- sjs_live_open: Opens workspace files and waits for the Workbook to be ready; can create a new
.xlsxfrom a built-in blank template via thecreate: trueparameter. - sjs_live_execute: Executes JavaScript code on the Workbook instance provided by the editor.
Typical Usage¶
Opening or Creating a Workbook¶
Invoke the tool within the context of an AI Skill:
// Create a new file
sjs_live_open({ path: "test-output/report.xlsx", create: true })
Executing Code to Modify Data¶
Write JavaScript in the execution tool, utilizing provided helper functions such as sheet(), setValue(), and snapshot():
const s = sheet()
s.setValue(0, 0, 'Total')
return snapshot()
During execution, the code runs within the editor page environment, and modifications are displayed immediately on the interface.
Notes and Mechanisms¶
- Exclusive Lock Mechanism: During the execution of
sjs_live_execute, the editor grants an exclusive lease, preventing the user from performing concurrent edits, saves, or export operations during execution. - Save Timing: Modifications are only displayed in real-time in the editor. Data is written to disk only when the user manually requests a save in the Web UI. Calling
save: truein a script does not directly trigger a save but marks the status as “pending save”. - Environment Isolation: The execution environment provides
spread/workbook,GC,sheet(name?),snapshot(),console, andsignal(AbortSignal). Results must be JSON serializable. - Compatibility: When multiple available instances exist in the same chat (such as multiple tabs), you must obtain the full
idviasjs_live_statusand specify it totarget; do not concatenate paths yourself. - Pure CLI Limitations: The server does not need Chrome/Edge installed, but pure command-line mode cannot manipulate workbooks; it must rely on the Web UI.
Ecosystem and Links¶
This plugin follows the MIT License. The DSH plugin ecosystem has no official affiliation with DeepSeek or High-Flyer.
- Catalog Page: [catalog_url]
- Source Code: [github_url]