@linxin666/dsh-client-ui-task-board-ssh 0.0.0-stage → 0.4.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/LICENSE +202 -0
- package/README.i18n.yaml +6 -0
- package/README.md +85 -2
- package/README.zh.md +86 -0
- package/cordis.patch.yml +15 -0
- package/icon.svg +5 -0
- package/lib/client.js +4429 -0
- package/lib/index.js +6100 -0
- package/lib/types/client/PluginSettingsCard.d.ts +255 -0
- package/lib/types/client/RangeBubble.d.ts +46 -0
- package/lib/types/client/SegmentGroup.d.ts +28 -0
- package/lib/types/client/index.d.ts +100 -0
- package/lib/types/client/locales.d.ts +125 -0
- package/lib/types/client/seat-props.d.ts +53 -0
- package/lib/types/client/settings-entry-form.d.ts +49 -0
- package/lib/types/client/settings-form.d.ts +237 -0
- package/lib/types/client/ssh/card-decoration.d.ts +23 -0
- package/lib/types/client/ssh/compose-section.d.ts +7 -0
- package/lib/types/client/ssh/detail-section.d.ts +7 -0
- package/lib/types/client/ssh/extension.d.ts +54 -0
- package/lib/types/client/ssh/log-buffer.d.ts +128 -0
- package/lib/types/client/ssh/log-view.d.ts +37 -0
- package/lib/types/client/ssh/model.d.ts +130 -0
- package/lib/types/client/ssh/settings-section.d.ts +134 -0
- package/lib/types/client/ssh/summary.d.ts +160 -0
- package/lib/types/client/ssh/target-form.d.ts +60 -0
- package/lib/types/core/action.d.ts +89 -0
- package/lib/types/core/adapters/claude.d.ts +15 -0
- package/lib/types/core/adapters/codex.d.ts +15 -0
- package/lib/types/core/adapters/custom.d.ts +29 -0
- package/lib/types/core/adapters/dsh.d.ts +21 -0
- package/lib/types/core/adapters/index.d.ts +25 -0
- package/lib/types/core/adapters/types.d.ts +76 -0
- package/lib/types/core/contract.d.ts +445 -0
- package/lib/types/core/launcher-script.d.ts +13 -0
- package/lib/types/core/launcher.d.ts +153 -0
- package/lib/types/core/ledger.d.ts +123 -0
- package/lib/types/core/shell.d.ts +61 -0
- package/lib/types/core/target.d.ts +143 -0
- package/lib/types/core/task-record.d.ts +63 -0
- package/lib/types/core/workspace.d.ts +74 -0
- package/lib/types/host/board.d.ts +71 -0
- package/lib/types/host/engine.d.ts +418 -0
- package/lib/types/host/extension.d.ts +59 -0
- package/lib/types/host/logs.d.ts +135 -0
- package/lib/types/host/payload.d.ts +75 -0
- package/lib/types/host/prompt.d.ts +44 -0
- package/lib/types/host/queue.d.ts +53 -0
- package/lib/types/host/remote.d.ts +120 -0
- package/lib/types/host/settings.d.ts +149 -0
- package/lib/types/host/timers.d.ts +20 -0
- package/lib/types/host/tools.d.ts +15 -0
- package/lib/types/host/workspace/errors.d.ts +29 -0
- package/lib/types/host/workspace/git.d.ts +108 -0
- package/lib/types/host/workspace/in-place.d.ts +36 -0
- package/lib/types/host/workspace/index.d.ts +28 -0
- package/lib/types/host/workspace/layout.d.ts +62 -0
- package/lib/types/host/workspace/local-git.d.ts +72 -0
- package/lib/types/host/workspace/remote-git.d.ts +111 -0
- package/lib/types/host/workspace/remote.d.ts +85 -0
- package/lib/types/host/workspace/types.d.ts +28 -0
- package/lib/types/host/workspace-seam.d.ts +100 -0
- package/lib/types/index.d.ts +97 -0
- package/lib/types/mount-once.d.ts +55 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +89 -3
- package/src/client/PluginSettingsCard.tsx +838 -0
- package/src/client/RangeBubble.tsx +164 -0
- package/src/client/SegmentGroup.tsx +93 -0
- package/src/client/css-modules.d.ts +5 -0
- package/src/client/index.ts +195 -0
- package/src/client/locales.ts +257 -0
- package/src/client/seat-props.ts +58 -0
- package/src/client/settings-card.module.css +821 -0
- package/src/client/settings-entry-form.ts +141 -0
- package/src/client/settings-form.ts +529 -0
- package/src/client/ssh/card-decoration.tsx +55 -0
- package/src/client/ssh/compose-section.tsx +147 -0
- package/src/client/ssh/detail-section.tsx +345 -0
- package/src/client/ssh/extension.ts +271 -0
- package/src/client/ssh/log-buffer.ts +224 -0
- package/src/client/ssh/log-view.tsx +149 -0
- package/src/client/ssh/model.ts +299 -0
- package/src/client/ssh/settings-section.tsx +401 -0
- package/src/client/ssh/summary.ts +388 -0
- package/src/client/ssh/target-form.tsx +380 -0
- package/src/client/ssh.module.css +617 -0
- package/src/core/action.ts +270 -0
- package/src/core/adapters/claude.ts +64 -0
- package/src/core/adapters/codex.ts +83 -0
- package/src/core/adapters/custom.ts +88 -0
- package/src/core/adapters/dsh.ts +87 -0
- package/src/core/adapters/index.ts +74 -0
- package/src/core/adapters/types.ts +95 -0
- package/src/core/contract.ts +510 -0
- package/src/core/launcher-script.ts +313 -0
- package/src/core/launcher.ts +283 -0
- package/src/core/ledger.ts +372 -0
- package/src/core/shell.ts +77 -0
- package/src/core/target.ts +413 -0
- package/src/core/task-record.ts +65 -0
- package/src/core/workspace.ts +78 -0
- package/src/host/board.ts +103 -0
- package/src/host/engine.ts +1602 -0
- package/src/host/extension.ts +304 -0
- package/src/host/logs.ts +297 -0
- package/src/host/payload.ts +134 -0
- package/src/host/prompt.ts +89 -0
- package/src/host/queue.ts +73 -0
- package/src/host/remote.ts +328 -0
- package/src/host/settings.ts +294 -0
- package/src/host/timers.ts +33 -0
- package/src/host/tools.ts +259 -0
- package/src/host/workspace/errors.ts +43 -0
- package/src/host/workspace/git.ts +305 -0
- package/src/host/workspace/in-place.ts +58 -0
- package/src/host/workspace/index.ts +37 -0
- package/src/host/workspace/layout.ts +122 -0
- package/src/host/workspace/local-git.ts +164 -0
- package/src/host/workspace/remote-git.ts +244 -0
- package/src/host/workspace/remote.ts +181 -0
- package/src/host/workspace/types.ts +34 -0
- package/src/host/workspace-seam.ts +132 -0
- package/src/index.ts +243 -0
- package/src/mount-once.ts +142 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/README.i18n.yaml
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Bilingual-pair consistency record (docs/i18n.md): the git blob hash of each
|
|
2
|
+
# side as of the last confirmed-consistent state. Both languages carry equal authority;
|
|
3
|
+
# after editing either side, bring the other along and re-record with:
|
|
4
|
+
# node scripts/verify-docs.mjs --write <dir>
|
|
5
|
+
README.md: 94759151e311b2c37c6a4f6a8bae041354bec521
|
|
6
|
+
README.zh.md: 09791218678653a0fa04b4f9889b8f0fbf00daeb
|
package/README.md
CHANGED
|
@@ -1,3 +1,86 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @linxin666/dsh-client-ui-task-board-ssh
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
English | [中文](README.zh.md)
|
|
4
|
+
|
|
5
|
+
A task-board provider extension that runs a pinned card as a headless agent session on a remote host reached through dsh-ssh, so the work happens on the machine that holds the code and keeps running while this host is away.
|
|
6
|
+
|
|
7
|
+
## What it does
|
|
8
|
+
|
|
9
|
+
- Registers the `ssh` provider extension with the task board and takes over the cards pinned to a remote target at the board's single launch gate, so the native run button, a schedule and `task_board_run` all take the same path.
|
|
10
|
+
- Starts dsh, Claude Code, Codex or a custom command on the host through one POSIX `sh` launcher, detached with `setsid nohup` (falling back to `nohup` on hosts without `setsid`, such as macOS), so a run outlives the SSH connection and the local host.
|
|
11
|
+
- Keeps the run account in the card's own payload and the output in a remote file read back by bounded byte-offset pages, so a log replays from its start at any time.
|
|
12
|
+
- Adds three model-visible tools (`task_board_ssh_target`, `task_board_ssh_status`, `task_board_ssh_follow_up`) and one task-detail seat holding the target form, the run state, the log viewer, the follow-up box and cancel.
|
|
13
|
+
- Offers the same target choice in the create dialog's Run Mode section, so a card can be created already pinned to a host. The choice starts as no target at all: such a card is created untargeted and its detail seat sets the target afterwards, exactly as before.
|
|
14
|
+
- Cancelling a run from the task-detail seat stops the remote process and puts the card back in the to-do column, with no verdict written.
|
|
15
|
+
|
|
16
|
+
## Execution modes
|
|
17
|
+
|
|
18
|
+
- `direct` (default) starts a headless agent on the host over dsh-ssh. The board creates no local session and no local execution record, only the card in the running column, which the provider closes through the board's external-outcome action.
|
|
19
|
+
- `proxy` runs the card as an ordinary local session whose prompt opens with the pinned remote target, and that session drives the host through the `ssh_*` tools of dsh-ssh.
|
|
20
|
+
|
|
21
|
+
Proxy mode cannot survive this host going offline: the session, its tool calls and its token spend all live here, so stopping this host stops the work. Direct mode is the one that keeps going, and on the next start the provider reconciles every run that finished while this host was down.
|
|
22
|
+
|
|
23
|
+
## Workspaces
|
|
24
|
+
|
|
25
|
+
- `in-place` runs in an absolute directory that already exists on the host and collects nothing.
|
|
26
|
+
- `git` from a repository URL keeps a bare cache per source under `~/.dsh/task-board-ssh/repos/` on the host, adds one worktree per run under `workspaces/<runId>`, commits on the branch `dsh-task/<runId>` and pushes that branch back to the URL.
|
|
27
|
+
- `git` from the local workspace sends `HEAD` plus the tracked uncommitted changes as a git bundle, adds the same per-run worktree on the host, and fetches `dsh-task/<runId>` into the local repository without touching its working tree, index or `HEAD`.
|
|
28
|
+
|
|
29
|
+
Untracked files are not synced: a bundle carries commits, so untracked and ignored files stay on this machine. A local-workspace run counts the untracked non-ignored files it did not receive and reports that count in the run summary the card renders.
|
|
30
|
+
|
|
31
|
+
## Install
|
|
32
|
+
|
|
33
|
+
The host half takes the board and dsh-ssh through one cordis dependency scope: while either service is missing it registers nothing, and it unloads the moment either is withdrawn. In the aggregate bundle the `dsh-ssh` row (`web-ui-ssh`) ships disabled by default, so turn it on in the plugin manager first; until then a card's detail seat only says "Enable the SSH plugin in the plugin manager first", and the create dialog shows no SSH rows at all.
|
|
34
|
+
|
|
35
|
+
### From npm
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
dsh plugin --profile web add @linxin666/dsh-client-ui-task-board-ssh@latest
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### From the repository
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
git clone https://github.com/zhu1090093659/dsh-web.git
|
|
45
|
+
cd dsh-web
|
|
46
|
+
pnpm install
|
|
47
|
+
pnpm -r build
|
|
48
|
+
dsh plugin --profile web add link:$(pwd)/packages/dsh-task-board-ssh
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## Config
|
|
52
|
+
|
|
53
|
+
### Per card
|
|
54
|
+
|
|
55
|
+
A card's target is chosen in the create dialog's Run Mode section, or on its detail seat afterwards. Both surfaces edit these same four fields, and a card created without a target keeps none: nothing is pinned until one of them says where it runs.
|
|
56
|
+
|
|
57
|
+
- `mode`: `direct` or `proxy`, as described under execution modes.
|
|
58
|
+
- `host`: the dsh-ssh host alias the run addresses.
|
|
59
|
+
- `agent`: `dsh`, `claude`, `codex` or `custom`; a custom agent needs a start command template carrying `{prompt_file}` and optionally a resume template.
|
|
60
|
+
- `workspace`: `in-place` with a remote path, or `git` with a repository URL and an optional base branch, or `git` with the id of a local workspace.
|
|
61
|
+
|
|
62
|
+
### Extension settings
|
|
63
|
+
|
|
64
|
+
- `enabled`: the master switch; off withdraws the detail seat, the card badge, the create dialog's row, the three tools and the launch interceptor, and stops polling every run it follows.
|
|
65
|
+
- `defaultMode`, `defaultAgent` and `defaultHost`: what a card opens with before anyone pins a target.
|
|
66
|
+
- `perHostCap`: how many runs one host executes at once, from 1 to 16, default 2; the rest wait in submission order.
|
|
67
|
+
- `agentCommands`: per-agent command templates that replace the built-in command line.
|
|
68
|
+
|
|
69
|
+
## Security model
|
|
70
|
+
|
|
71
|
+
- Every remote run is unattended. dsh runs with `--permission-mode danger-full-access`, Claude Code with `--dangerously-skip-permissions` and Codex with `--sandbox danger-full-access`, so a card is an instruction to an agent that never asks this host for approval: a card whose prompt is hostile can do anything the remote account can.
|
|
72
|
+
- Every value the provider sends to a host passes through one POSIX shell quoting function; no remote command line is assembled from raw text.
|
|
73
|
+
- dsh-ssh hands this package no credential, key path or proxy command, and the card payload holds no log bytes.
|
|
74
|
+
- A remote log returns into the card unredacted, the same trust model as `ssh_exec`.
|
|
75
|
+
|
|
76
|
+
## Known limitations
|
|
77
|
+
|
|
78
|
+
- Codex is unverified. Its flags and event names come from OpenAI's non-interactive-mode documentation, and the adapter is fixture-tested against that documented stream only; the first run on a host that has Codex must confirm or correct it.
|
|
79
|
+
- The launcher needs a POSIX `sh` on the host (using `setsid` when present and falling back to `nohup` otherwise, e.g. on macOS); a host without POSIX `sh` cannot run a direct card.
|
|
80
|
+
- A card moved out of the running column while its run is active is read as a cancel request, so a mistaken drag stops the remote run.
|
|
81
|
+
- A git workspace needs a repository on one side or the other: a local directory that is not a git repository cannot be sent to a host.
|
|
82
|
+
- The run directory under `~/.dsh/task-board-ssh/runs/<runId>/` on the host is the only copy of that run's output; nothing about it is copied into the card.
|
|
83
|
+
|
|
84
|
+
## License
|
|
85
|
+
|
|
86
|
+
Apache-2.0.
|
package/README.zh.md
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# @linxin666/dsh-client-ui-task-board-ssh
|
|
2
|
+
|
|
3
|
+
[English](README.md) | 中文
|
|
4
|
+
|
|
5
|
+
任务看板的外部提供方扩展:把钉住目标卡片作为无头 agent 会话,跑在经 dsh-ssh 触达的远端主机上,让卡片的工作发生在持有代码的机器上,并且在本机离开时继续运行。
|
|
6
|
+
|
|
7
|
+
## 是什么
|
|
8
|
+
|
|
9
|
+
- 向任务看板登记 `ssh` 提供方扩展,并在看板唯一的启动闸口接管钉住了远端目标的卡片,因此原生运行按钮、定时调度与 `task_board_run` 走同一条路径。
|
|
10
|
+
- 通过一个 POSIX `sh` 启动器在主机上运行 dsh、Claude Code、Codex 或自定义命令,优先用 `setsid nohup` 脱离(主机无 `setsid` 如 macOS 时回退到 `nohup`),使一次运行活过 SSH 连接与本机。
|
|
11
|
+
- 运行的账目留在卡片自己的载荷里,输出留在远端文件里按有界字节偏移分页读回,因此日志随时可以从头回放。
|
|
12
|
+
- 新增三个模型可见工具(`task_board_ssh_target`、`task_board_ssh_status`、`task_board_ssh_follow_up`)与一个任务详情席位,席位上放目标表单、运行状态、日志视图、追问框与取消。
|
|
13
|
+
- 新建弹窗的「运行方式」区块里也提供同一套目标选择,卡片可以在建出来之前就钉住主机。默认是不指定:这样的卡片建出来时不带目标,建好后仍由详情席位设置,与以前完全一样。
|
|
14
|
+
- 从任务详情席位取消一次运行会停掉远端进程并把卡片放回待办列,不写任何结论。
|
|
15
|
+
|
|
16
|
+
## 执行模式
|
|
17
|
+
|
|
18
|
+
- `direct`(默认)经 dsh-ssh 在主机上直接起一个无头 agent。看板不建本地会话、不写本地执行记录,只把卡片放进运行中列,随后由本提供方经看板的外部结果动作结案。
|
|
19
|
+
- `proxy` 把卡片作为普通本地会话运行,其 Prompt 以钉住的远端目标开头,由该会话用 dsh-ssh 的 `ssh_*` 工具驱动主机。
|
|
20
|
+
|
|
21
|
+
proxy 模式撑不过本机离线:会话、它的工具调用与它的令牌开销都在本机,停掉本机就停掉工作。会继续跑的是 direct 模式,本机下次启动时,本提供方会把本机离线期间结束的运行逐一对账。
|
|
22
|
+
|
|
23
|
+
## 工作区
|
|
24
|
+
|
|
25
|
+
- `in-place` 在主机上一个已经存在的绝对路径里运行,不回传任何东西。
|
|
26
|
+
- `git` 用仓库地址时,在主机 `~/.dsh/task-board-ssh/repos/` 下按来源各留一份裸缓存,在 `workspaces/<runId>` 下为每次运行加一个工作树,在 `dsh-task/<runId>` 分支上提交,并把该分支推回这个地址。
|
|
27
|
+
- `git` 用本机仓库时,把 `HEAD` 与已跟踪的未提交改动打成 git bundle 送出,在主机上加同样的按次工作树,最后把 `dsh-task/<runId>` 取回本机仓库,且不动它的工作树、索引与 `HEAD`。
|
|
28
|
+
|
|
29
|
+
未跟踪文件不同步:bundle 只带提交,未跟踪与被忽略的文件留在本机。本机仓库来源的运行会数出自己没有收到多少个未跟踪文件,并把该数字写进卡片渲染的运行摘要。
|
|
30
|
+
|
|
31
|
+
## 安装
|
|
32
|
+
|
|
33
|
+
宿主半区用同一个 cordis 依赖作用域同时取看板与 dsh-ssh:任一服务缺席时不注册任何东西,任一服务撤走时整块卸载。聚合包里 `dsh-ssh` 那一行(`web-ui-ssh`)出厂默认关闭,需要先在插件管理里启用;在此之前,卡片详情只显示「需要先在插件管理里启用 SSH 插件」,新建弹窗里不出现任何 SSH 行。
|
|
34
|
+
|
|
35
|
+
### 从 npm 安装
|
|
36
|
+
|
|
37
|
+
```sh
|
|
38
|
+
dsh plugin --profile web add @linxin666/dsh-client-ui-task-board-ssh@latest
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### 从仓库安装
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
git clone https://github.com/zhu1090093659/dsh-web.git
|
|
45
|
+
cd dsh-web
|
|
46
|
+
pnpm install
|
|
47
|
+
pnpm -r build
|
|
48
|
+
dsh plugin --profile web add link:$(pwd)/packages/dsh-task-board-ssh
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
## 配置
|
|
52
|
+
|
|
53
|
+
### 按卡片
|
|
54
|
+
|
|
55
|
+
卡片的目标在新建弹窗的「运行方式」里选,也可以建好之后在详情席位里设置。两处编辑的是同四个字段;建卡时没有指定目标的卡片也就没有目标,直到其中一处说出了它在哪运行。
|
|
56
|
+
|
|
57
|
+
- `mode`:`direct` 或 `proxy`,差别见执行模式一节。
|
|
58
|
+
- `host`:这次运行要用的 dsh-ssh 主机别名。
|
|
59
|
+
- `agent`:`dsh`、`claude`、`codex` 或 `custom`;自定义 agent 需要一条带 `{prompt_file}` 的启动命令模板,可选一条续跑模板。
|
|
60
|
+
- `workspace`:`in-place` 配一个远端路径,或 `git` 配仓库地址与可选起始分支,或 `git` 配一个本机工作区标识。
|
|
61
|
+
|
|
62
|
+
### 扩展设置
|
|
63
|
+
|
|
64
|
+
- `enabled`:总开关;关闭即撤下详情席位、卡片徽标、新建弹窗里的那一行、三个工具与启动拦截器,并停掉对所有在跟运行的轮询。
|
|
65
|
+
- `defaultMode`、`defaultAgent` 与 `defaultHost`:卡片在还没钉目标时打开的默认值。
|
|
66
|
+
- `perHostCap`:一台主机同时跑几张卡,1 到 16,默认 2;超出的按提交顺序排队。
|
|
67
|
+
- `agentCommands`:按 agent 覆写的命令模板,替换内置命令行。
|
|
68
|
+
|
|
69
|
+
## 安全模型
|
|
70
|
+
|
|
71
|
+
- 每次远端运行都是无人值守的。dsh 用 `--permission-mode danger-full-access`,Claude Code 用 `--dangerously-skip-permissions`,Codex 用 `--sandbox danger-full-access`:一张卡就是对 agent 的指令,而这个 agent 从不向本机请示,因此 Prompt 里带敌意的卡片能对该远端账号做任何事。
|
|
72
|
+
- 本包发往主机的每个值都过同一个 POSIX shell 转义函数;远端命令行不由裸文本拼接。
|
|
73
|
+
- dsh-ssh 不向本包交出凭据、私钥路径或 proxy 命令文本,卡片载荷也不含日志字节。
|
|
74
|
+
- 远端日志原样回到卡片,与 `ssh_exec` 同一套信任模型。
|
|
75
|
+
|
|
76
|
+
## 已知限制
|
|
77
|
+
|
|
78
|
+
- Codex 未核实。它的开关与事件名来自 OpenAI 的非交互模式文档,适配器只对那份文档描述的流做夹具测试;第一次在装有 Codex 的主机上运行时必须确认或修正。
|
|
79
|
+
- 启动器需要主机上有 POSIX `sh`(有 `setsid` 时优先使用,缺失时如 macOS 回退到 `nohup`);没有 POSIX `sh` 的主机跑不了 direct 模式卡片。
|
|
80
|
+
- 运行中的卡片被移出运行中列即视为取消请求,因此误拖一次会停掉远端运行。
|
|
81
|
+
- git 工作区需要某一侧有仓库:本机上一个不是 git 仓库的目录无法送到主机。
|
|
82
|
+
- 主机上 `~/.dsh/task-board-ssh/runs/<runId>/` 的运行目录是该次运行输出的唯一副本,卡片里不保留任何一份。
|
|
83
|
+
|
|
84
|
+
## 许可证
|
|
85
|
+
|
|
86
|
+
Apache-2.0。
|
package/cordis.patch.yml
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# dsh-task-board-ssh bundle patch: inserts the SSH provider extension row into
|
|
2
|
+
# the web profile roster. Applied as a profile bundle layer (the
|
|
3
|
+
# `dsh.bundle.patch` manifest field) over dsh-base; activate with
|
|
4
|
+
# `dsh plugin --profile web add link:<repo>/packages/dsh-task-board-ssh`.
|
|
5
|
+
#
|
|
6
|
+
# The row is a bare plugin by package name: the node half (exports ".") runs in
|
|
7
|
+
# the host process, and the `dsh.client` declaration in package.json makes the
|
|
8
|
+
# browser half (exports "./client", served at /plugins/<id>/client.js) load in
|
|
9
|
+
# the web GUI. In the aggregate bundle this row is namespaced
|
|
10
|
+
# web-ui-task-board-ssh and must stay behind web-ui-task-board: the extension
|
|
11
|
+
# registers into the task board's provider surface, so the board has to be
|
|
12
|
+
# there first.
|
|
13
|
+
- insert:
|
|
14
|
+
- id: ui-task-board-ssh
|
|
15
|
+
name: '@linxin666/dsh-client-ui-task-board-ssh'
|
package/icon.svg
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round">
|
|
2
|
+
<rect x="2.5" y="4" width="19" height="16" rx="2.5" />
|
|
3
|
+
<path d="M6 9l3 3-3 3" />
|
|
4
|
+
<path d="M12 15h6" />
|
|
5
|
+
</svg>
|