paseo-dsh 0.2.18 → 0.2.20
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 +2 -0
- package/README.md +4 -0
- package/THIRD-PARTY-NOTICES.md +36 -0
- package/client/react-native.d.ts +4 -0
- package/client/settings-screen.tsx +144 -0
- package/client/timeline.tsx +1444 -0
- package/index.client.tsx +10 -1
- package/index.server.ts +57 -0
- package/lib/doctor.mjs +14 -2
- package/package.json +6 -2
- package/server/bridge-assets.ts +2 -1
- package/server/dsh-command.d.mts +7 -0
- package/server/dsh-command.mjs +40 -0
- package/server/dsh-process.ts +18 -11
- package/server/provider.ts +29 -9
- package/server/session.ts +48 -47
- package/server/timeline.ts +2 -0
- package/shared/image-preview.ts +28 -0
- package/shared/settings.ts +93 -0
package/OVERVIEW.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
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
2
|
|
|
3
|
+

|
|
4
|
+
|
|
3
5
|
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
6
|
|
|
5
7
|
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.
|
package/README.md
CHANGED
|
@@ -46,6 +46,10 @@ live in the main repository: **https://github.com/liuxing7954/paseo-dsh**
|
|
|
46
46
|
|
|
47
47
|
Requires Paseo ≥ 0.9.2 and the official `dsh` on the daemon's `PATH`.
|
|
48
48
|
|
|
49
|
+
## What it looks like
|
|
50
|
+
|
|
51
|
+

|
|
52
|
+
|
|
49
53
|
## Versioning
|
|
50
54
|
|
|
51
55
|
`major.minor` tracks the DSH line this plugin targets — `0.2.x` of this plugin is
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
# Third-party notices
|
|
2
|
+
|
|
3
|
+
The DSH timeline rows in `paseo-plugin/client/timeline.tsx` adapt interaction
|
|
4
|
+
ideas and small pure helpers from Better Paseo. Better Paseo is MIT-licensed:
|
|
5
|
+
|
|
6
|
+
## Better Paseo
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2026 ABorakati
|
|
9
|
+
|
|
10
|
+
https://github.com/RoundRedDot/better-paseo
|
|
11
|
+
|
|
12
|
+
MIT License
|
|
13
|
+
|
|
14
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
15
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
16
|
+
in the Software without restriction, including without limitation the rights
|
|
17
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
18
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
19
|
+
furnished to do so, subject to the following conditions:
|
|
20
|
+
|
|
21
|
+
The above copyright notice and this permission notice shall be included in all
|
|
22
|
+
copies or substantial portions of the Software.
|
|
23
|
+
|
|
24
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
25
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
26
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
27
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
28
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
29
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
30
|
+
SOFTWARE.
|
|
31
|
+
|
|
32
|
+
## Icons
|
|
33
|
+
|
|
34
|
+
Tool icons are drawn with the Paseo host's Lucide icon set. Better Paseo's
|
|
35
|
+
provider and service marks come from LobeHub Icons; this change does not copy
|
|
36
|
+
those brand SVGs.
|
package/client/react-native.d.ts
CHANGED
|
@@ -7,5 +7,9 @@ declare module "react-native" {
|
|
|
7
7
|
export const View: any;
|
|
8
8
|
export const Text: any;
|
|
9
9
|
export const Pressable: any;
|
|
10
|
+
export const ScrollView: any;
|
|
11
|
+
export const Modal: any;
|
|
12
|
+
export const Image: any;
|
|
13
|
+
export const useWindowDimensions: () => { width: number; height: number };
|
|
10
14
|
export const Platform: { OS: "ios" | "android" | "web" | "windows" | "macos" };
|
|
11
15
|
}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import type { PluginClientContext, PluginSurfaceProps } from "@getpaseo/plugin/client";
|
|
2
|
+
import { useSettings } from "@getpaseo/plugin/client";
|
|
3
|
+
import { useMemo, useState } from "react";
|
|
4
|
+
import { Platform, Pressable, ScrollView, Text, View } from "react-native";
|
|
5
|
+
import { TextInput } from "@getpaseo/plugin/client/react-native";
|
|
6
|
+
import {
|
|
7
|
+
TIMELINE_STYLE_DEFAULTS,
|
|
8
|
+
TIMELINE_STYLE_FIELDS,
|
|
9
|
+
timelineStyleSettings,
|
|
10
|
+
type TimelineStyleKey,
|
|
11
|
+
type TimelineStyleValues,
|
|
12
|
+
} from "../shared/settings";
|
|
13
|
+
|
|
14
|
+
/** Numeric editor for the timeline row spacing and command drawer height. */
|
|
15
|
+
export function TimelineSettingsScreen({ theme, layout }: PluginSurfaceProps) {
|
|
16
|
+
const settings = useSettings(timelineStyleSettings);
|
|
17
|
+
const [draft, setDraft] = useState<Partial<Record<TimelineStyleKey, string>>>({});
|
|
18
|
+
const [notice, setNotice] = useState<string | null>(null);
|
|
19
|
+
const current: TimelineStyleValues = settings.status === "ready" ? settings.values : TIMELINE_STYLE_DEFAULTS;
|
|
20
|
+
const compact = layout.compact;
|
|
21
|
+
|
|
22
|
+
const styles = useMemo(
|
|
23
|
+
() => ({
|
|
24
|
+
screen: { flex: 1, backgroundColor: theme.colors.surface0 },
|
|
25
|
+
content: { padding: compact ? 16 : 24, gap: compact ? 12 : 14 },
|
|
26
|
+
title: { color: theme.colors.foreground, fontSize: compact ? 16 : 18, fontWeight: "600" as const },
|
|
27
|
+
intro: { color: theme.colors.foregroundMuted, fontSize: compact ? 13 : 14, lineHeight: compact ? 19 : 21 },
|
|
28
|
+
field: { gap: 5 },
|
|
29
|
+
label: { color: theme.colors.foreground, fontSize: compact ? 13 : 14, fontWeight: "600" as const },
|
|
30
|
+
hint: { color: theme.colors.foregroundMuted, fontSize: compact ? 12 : 12.5, lineHeight: 17 },
|
|
31
|
+
input: {
|
|
32
|
+
borderWidth: 1,
|
|
33
|
+
borderColor: theme.colors.border,
|
|
34
|
+
borderRadius: 8,
|
|
35
|
+
paddingHorizontal: 12,
|
|
36
|
+
paddingVertical: compact ? 9 : 10,
|
|
37
|
+
color: theme.colors.foreground,
|
|
38
|
+
backgroundColor: theme.colors.surface1,
|
|
39
|
+
fontSize: compact ? 13 : 14,
|
|
40
|
+
},
|
|
41
|
+
actions: { flexDirection: "row" as const, gap: 10, marginTop: 4 },
|
|
42
|
+
button: {
|
|
43
|
+
paddingHorizontal: 16,
|
|
44
|
+
paddingVertical: compact ? 9 : 10,
|
|
45
|
+
borderRadius: 8,
|
|
46
|
+
backgroundColor: theme.colors.accent,
|
|
47
|
+
opacity: settings.status !== "ready" || settings.saving ? 0.6 : 1,
|
|
48
|
+
},
|
|
49
|
+
secondary: {
|
|
50
|
+
backgroundColor: theme.colors.surface1,
|
|
51
|
+
borderWidth: 1,
|
|
52
|
+
borderColor: theme.colors.border,
|
|
53
|
+
},
|
|
54
|
+
buttonText: { color: theme.colors.accentForeground, fontWeight: "600" as const, fontSize: compact ? 13 : 14 },
|
|
55
|
+
secondaryText: { color: theme.colors.foreground, fontWeight: "600" as const, fontSize: compact ? 13 : 14 },
|
|
56
|
+
notice: { color: theme.colors.foregroundMuted, fontSize: compact ? 12 : 13 },
|
|
57
|
+
}),
|
|
58
|
+
[theme, compact, settings.status, settings.saving],
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
const textOf = (key: TimelineStyleKey): string => draft[key] ?? String(current[key]);
|
|
62
|
+
const edit = (key: TimelineStyleKey, value: string) => {
|
|
63
|
+
setDraft((previous) => ({ ...previous, [key]: value }));
|
|
64
|
+
setNotice(null);
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
const save = async () => {
|
|
68
|
+
if (settings.status !== "ready") return;
|
|
69
|
+
const next: TimelineStyleValues = { ...current };
|
|
70
|
+
for (const field of TIMELINE_STYLE_FIELDS) {
|
|
71
|
+
const value = Number.parseFloat(textOf(field.key));
|
|
72
|
+
if (!Number.isFinite(value)) {
|
|
73
|
+
setNotice(`「${field.label}」不是有效数字`);
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
next[field.key] = value;
|
|
77
|
+
}
|
|
78
|
+
const saved = await settings.save(next, settings.revision);
|
|
79
|
+
setNotice(saved ? "已保存" : (settings.saveError ?? "保存失败"));
|
|
80
|
+
if (saved) setDraft({});
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
const reset = async () => {
|
|
84
|
+
const saved = await settings.reset();
|
|
85
|
+
setNotice(saved ? "已恢复默认值" : (settings.saveError ?? "重置失败"));
|
|
86
|
+
if (saved) setDraft({});
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
return (
|
|
90
|
+
<ScrollView style={styles.screen} contentContainerStyle={styles.content}>
|
|
91
|
+
<Text style={styles.title}>时间线样式</Text>
|
|
92
|
+
<Text style={styles.intro}>
|
|
93
|
+
工具行间距、行高和命令抽屉高度。保存后立即生效,不需要重启 Paseo。
|
|
94
|
+
</Text>
|
|
95
|
+
{TIMELINE_STYLE_FIELDS.map((field) => (
|
|
96
|
+
<View key={field.key} style={styles.field}>
|
|
97
|
+
<Text style={styles.label}>{field.label}</Text>
|
|
98
|
+
<TextInput
|
|
99
|
+
value={textOf(field.key)}
|
|
100
|
+
onChangeText={(value: string) => edit(field.key, value)}
|
|
101
|
+
keyboardType={field.key === "toolRowMarginY" ? (Platform.OS === "web" ? "default" : "numbers-and-punctuation") : "numeric"}
|
|
102
|
+
autoCapitalize="none"
|
|
103
|
+
autoCorrect={false}
|
|
104
|
+
accessibilityLabel={field.label}
|
|
105
|
+
style={styles.input}
|
|
106
|
+
/>
|
|
107
|
+
<Text style={styles.hint}>{field.hint}</Text>
|
|
108
|
+
</View>
|
|
109
|
+
))}
|
|
110
|
+
<View style={styles.actions}>
|
|
111
|
+
<Pressable
|
|
112
|
+
accessibilityRole="button"
|
|
113
|
+
accessibilityLabel="保存"
|
|
114
|
+
disabled={settings.status !== "ready" || settings.saving}
|
|
115
|
+
onPress={() => void save()}
|
|
116
|
+
style={styles.button}
|
|
117
|
+
>
|
|
118
|
+
<Text style={styles.buttonText}>{settings.saving ? "保存中…" : "保存"}</Text>
|
|
119
|
+
</Pressable>
|
|
120
|
+
<Pressable
|
|
121
|
+
accessibilityRole="button"
|
|
122
|
+
accessibilityLabel="恢复默认"
|
|
123
|
+
disabled={settings.status !== "ready" || settings.saving}
|
|
124
|
+
onPress={() => void reset()}
|
|
125
|
+
style={[styles.button, styles.secondary]}
|
|
126
|
+
>
|
|
127
|
+
<Text style={styles.secondaryText}>恢复默认</Text>
|
|
128
|
+
</Pressable>
|
|
129
|
+
</View>
|
|
130
|
+
{settings.status === "error" ? <Text style={styles.notice}>{settings.error}</Text> : null}
|
|
131
|
+
{settings.status === "invalid" ? <Text style={styles.notice}>{settings.error}</Text> : null}
|
|
132
|
+
{notice === null ? null : <Text style={styles.notice}>{notice}</Text>}
|
|
133
|
+
</ScrollView>
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export function contributeTimelineSettings(client: PluginClientContext): () => void {
|
|
138
|
+
return client.addSettingsScreen({
|
|
139
|
+
id: "timeline-style",
|
|
140
|
+
title: "时间线样式",
|
|
141
|
+
icon: "SlidersHorizontal",
|
|
142
|
+
Component: TimelineSettingsScreen,
|
|
143
|
+
});
|
|
144
|
+
}
|