paseo-dsh 0.2.9 → 0.2.10
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/OVERVIEW.md +11 -0
- package/package.json +2 -1
- package/server/session.ts +39 -14
package/OVERVIEW.md
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
dsh-paseo adds a native provider to Paseo for DeepSeek Harness (`dsh`), so a Paseo agent runs as a DSH session instead of an ACP client. The conversation stays in Paseo's normal agent view, and the plugin adds no screens of its own. It is a community plugin, not an official DeepSeek or Paseo product.
|
|
2
|
+
|
|
3
|
+
Each Paseo agent session starts one `dsh --profile paseo` child process on the daemon machine and talks to it over a local stdio bridge. The process runs as your operating system user with the daemon's environment, so the credentials and permission policy are the ones DSH already uses; the plugin adds no sandbox of its own. Model and reasoning-effort choices come from the catalog DSH reports for the profile, so they follow your DSH configuration.
|
|
4
|
+
|
|
5
|
+
DeepSeek Harness must be installed and logged in on the daemon machine, with `dsh` on the daemon's `PATH` or set through the provider command override. The plugin needs Paseo 0.9.2 or newer and Node.js 22 or newer on the daemon, and DSH 0.2.1-rc.2 is the tested line. On first use it provisions `~/.dsh/profiles/paseo`, and it never overwrites an existing profile file, so local edits to `cordis.patch.yml` survive reloads.
|
|
6
|
+
|
|
7
|
+
Composer features are passed to DSH rather than emulated. Attached images are admitted into DSH's attachment store, `/` commands and user-invocable skills come from DSH's registry, and steering, plan mode, question cards and permission prompts render as normal Paseo items. The session menu can switch the agent preset and permission mode when the profile declares them. Sessions persist by DSH session id, so a reopened agent resumes its context, and Paseo can list and import existing DSH sessions; an imported session replays its messages into the timeline.
|
|
8
|
+
|
|
9
|
+
Images flow one way. The model receives attached images, but Paseo's transcript renders an image only from an `https://` Markdown URL, so a picture produced on the daemon has to be published to a URL first. Local paths, `file://` URIs and base64 data URLs do not display.
|
|
10
|
+
|
|
11
|
+
Known limits: there is one `dsh` process per session, so each agent costs a process. Reloading the plugin or restarting the daemon ends a running turn, and the session has to be resumed. The provider id is `deepseek-harness-native`, which keeps it separate from an ACP `deepseek-harness` provider when both are installed. Windows and native iOS and Android clients are untested.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "paseo-dsh",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.10",
|
|
4
4
|
"description": "DeepSeek Harness (dsh) as a native Paseo provider: question cards, plan mode, thinking levels, steering, images and a real slash menu. 把 DeepSeek Harness 接成 Paseo 原生 provider。",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"paseo",
|
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
"bin/",
|
|
31
31
|
"icon.svg",
|
|
32
32
|
"README.md",
|
|
33
|
+
"OVERVIEW.md",
|
|
33
34
|
"LICENSE"
|
|
34
35
|
],
|
|
35
36
|
"scripts": {
|
package/server/session.ts
CHANGED
|
@@ -323,18 +323,19 @@ export class DshSession {
|
|
|
323
323
|
return;
|
|
324
324
|
}
|
|
325
325
|
|
|
326
|
-
// Paseo and the bridge already agree on the text/image block shape, so
|
|
327
|
-
// blocks ride through untouched.
|
|
328
|
-
//
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
.map((block) => (block.type === "text" ? (block.text as string) : ""))
|
|
332
|
-
.filter((text) => text !== "")
|
|
333
|
-
.join("\n");
|
|
334
|
-
|
|
335
|
-
this.#emitUserMessage(prompt.clientMessageId, label);
|
|
336
|
-
|
|
326
|
+
// Paseo and the bridge already agree on the text/image block shape, so those
|
|
327
|
+
// blocks ride through untouched. Every other attachment becomes a text
|
|
328
|
+
// reference: a block with no DSH counterpart used to throw *outside* this
|
|
329
|
+
// try, which turned one unsupported file into `session.runtime_failed` and
|
|
330
|
+
// killed the whole session ("stale after its plugin reloaded" on retry).
|
|
337
331
|
try {
|
|
332
|
+
const blocks = prompt.input.content.map(toDshContent);
|
|
333
|
+
const label = blocks
|
|
334
|
+
.map((block) => (block.type === "text" ? (block.text as string) : ""))
|
|
335
|
+
.filter((text) => text !== "")
|
|
336
|
+
.join("\n");
|
|
337
|
+
|
|
338
|
+
this.#emitUserMessage(prompt.clientMessageId, label);
|
|
338
339
|
await process.prompt(label, blocks.length === 0 ? undefined : blocks, prompt.delivery);
|
|
339
340
|
} catch (error) {
|
|
340
341
|
this.#emitPromptFailed(prompt.clientMessageId, error);
|
|
@@ -628,13 +629,37 @@ export class DshSession {
|
|
|
628
629
|
/**
|
|
629
630
|
* Translate one Paseo content block into the shape the bridge hands DSH.
|
|
630
631
|
*
|
|
631
|
-
*
|
|
632
|
-
*
|
|
632
|
+
* Text and images have a native DSH counterpart. The rest (uploaded files and
|
|
633
|
+
* forge/GitHub/review attachments) become a text reference that names the file
|
|
634
|
+
* or link and carries the body, so the model keeps the evidence instead of
|
|
635
|
+
* losing the prompt. Nothing is dropped silently, and nothing throws: an
|
|
636
|
+
* exception here escapes `prompt()` and kills the session.
|
|
633
637
|
*/
|
|
634
638
|
function toDshContent(block: ProviderContent): Record<string, unknown> {
|
|
635
639
|
if (block.type === "text") return { type: "text", text: block.text };
|
|
636
640
|
if (block.type === "image") return { type: "image", data: block.data, mimeType: block.mimeType };
|
|
637
|
-
|
|
641
|
+
if (block.type === "uploaded_file") {
|
|
642
|
+
return {
|
|
643
|
+
type: "text",
|
|
644
|
+
text: `Attached file: ${block.fileName} (${block.mimeType}, ${block.size} bytes)\n${block.path}`,
|
|
645
|
+
};
|
|
646
|
+
}
|
|
647
|
+
if (block.type === "review") {
|
|
648
|
+
const comments = block.comments
|
|
649
|
+
.map((comment) => `${comment.filePath}:${comment.lineNumber} (${comment.side})\n${comment.body}`)
|
|
650
|
+
.join("\n\n");
|
|
651
|
+
return { type: "text", text: `Attached review comments (${block.mode}):\n\n${comments}` };
|
|
652
|
+
}
|
|
653
|
+
// Forge, GitHub and text attachments share title, url and body.
|
|
654
|
+
const reference = block as unknown as { title?: string; url?: string; body?: string | null };
|
|
655
|
+
const heading = reference.title ?? block.type;
|
|
656
|
+
const url = reference.url === undefined ? "" : `\n${reference.url}`;
|
|
657
|
+
const body =
|
|
658
|
+
typeof reference.body === "string" && reference.body.trim() !== "" ? `\n\n${reference.body}` : "";
|
|
659
|
+
return {
|
|
660
|
+
type: "text",
|
|
661
|
+
text: `Attached ${block.type.replace(/_/g, " ")}: ${heading}${url}${body}`,
|
|
662
|
+
};
|
|
638
663
|
}
|
|
639
664
|
|
|
640
665
|
/**
|