Introduction

When developing applications based on DeepSeek Harness (DSH) or debugging agent behavior, developers often need to confirm the exact parameters sent to the model. This includes the system prompt, tool definitions, and the raw structure of the message flow. This plugin directly reads the current session state or persisted logs, reconstructs and presents the complete request frame, helping developers precisely verify the input format.

Plugin Introduction

request-frame-preview is a DSH plugin maintained by zampie and follows the MIT License.

It provides two parts:
* Host side: registers a read-only HTTP endpoint.
* Browser side: provides a “Request preview” button in the session header toolbar.

Core Features

  1. Preview the request frame: Click the button in the session header to open an overlay and view the following:
    • System prompt: index 0 in the messages array.
    • Tool declarations: a line for each tool definition; click to view parameters.
    • Messages array: the message stream starting at index 1, including user, assistant, and tool-result roles, as well as reasoning content and the tool_calls structure.
  2. Download JSON: Saves the complete request frame (including configuration, system prompt, tool parameter schemas, and messages) as a dsh-request-<sessionId>.json file.

Installation and Enablement

Install the plugin from the command line:

dsh plugin --profile web add request-frame-preview

After installation, restart the dsh web process (or wait for the plugin marketplace to restart automatically) to load the plugin package. After successful installation, a “Request preview” button appears in the session header toolbar.

Usage Steps

  1. Start a session.
  2. Click the “Request preview” button in the toolbar.
  3. View the system prompt, tool definitions, and message content in the overlay that appears.
  4. Click the “Download JSON” button to save the complete request frame data.

Data Generation

The plugin’s data source falls into two cases:
* Current running session: obtained through the requestHeader() and deriveMessages() functions, which is the same data the agent loop reads when constructing the request.
* Historical session: when the session is closed, data is read from the persisted sessionQuery.readSession and readSurface.

Data reconstruction strictly follows the text path of the DeepSeek chat-completions adapter: the system prompt is the first message, each tool result block is a separate role: "tool" message, and assistant text, reasoning content, and tool calls are split into the corresponding wire fields.

Security and Considerations

  • Read-only endpoint: The HTTP endpoint only supports GET and HEAD requests and does not perform any state-modifying operations.
  • Origin restrictions: If the request header Origin is present and does not match Host, the plugin rejects cross-origin requests; requests without Origin (such as curl or <a download>) are allowed, consistent with the GET routing convention of dshmarket.
  • Debugging purpose: This plugin is a debugging aid. It exposes the session’s complete system prompt, tool schemas, and message content to anyone able to access the endpoint. The host endpoint itself does not constitute a security boundary and should not be relied upon as a defensive measure.

Summary

This plugin helps developers accurately reconstruct the request frame structure sent to the model, making it easier to troubleshoot configuration issues or debug tool call logic. Its source code and documentation are available on GitHub: https://github.com/zampie/request-frame-preview