ddeck-remote 0.0.0-stage → 0.9.7-beta

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 ADDED
@@ -0,0 +1,202 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 DDeck contributors
190
+ Portions copyright 2026 Guangqi Zhang (dsh-mobile upstream)
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/NOTICE ADDED
@@ -0,0 +1,40 @@
1
+ DDeck plugin
2
+ Copyright 2026 DDeck contributors
3
+
4
+ The DDeck plugin (plugin/) is licensed under the Apache License, Version 2.0.
5
+ The full licence text is in plugin/LICENSE.
6
+
7
+ ==============================================================================
8
+ Vendored software: dsh-mobile transport gateway
9
+ ==============================================================================
10
+
11
+ This product includes software from the dsh-mobile project
12
+ (https://github.com/saya-ch/dsh-mobile), version 0.6.12, commit
13
+ 0efceeb9c5698e854e9d1e227a93bf393e69effa, licensed under the Apache License,
14
+ Version 2.0 (the same licence text is kept in plugin/LICENSE).
15
+
16
+ Vendored sources: plugin/vendor/gateway/ (transport modules and the stub
17
+ boundaries), with the build entry plugin/vendor/entry.js and stubs in
18
+ plugin/vendor/_stubs.js.
19
+ Built artifact: plugin/lib/gateway-bundle.js.
20
+ Local modifications are recorded file by file in
21
+ plugin/vendor/gateway/VENDORED.md (this record is the "changes" notice required
22
+ by Apache-2.0 section 4(b)); attribution to the original authors is kept there.
23
+ Files copied without modification: private-file.ts, exec-file.ts, ip.ts,
24
+ network.ts, local-admin-host.ts, browser-auth-cookies.ts, auth-pages.ts,
25
+ auth-failure-log.ts and http-cache.ts; config.ts, gateway.ts, access.ts,
26
+ storage.ts, version.ts and http-security.ts carry our changes.
27
+
28
+ ==============================================================================
29
+ Bundled third-party code
30
+ ==============================================================================
31
+
32
+ - qrcode 1.5.4 - MIT - pairing QR code, bundled in lib/qr-bundle.js and the
33
+ gateway bundle.
34
+ - node-forge 1.4.0 - BSD-3-Clause (used under this option) - TLS certificate
35
+ generation, bundled in lib/node-forge-bundle.js.
36
+
37
+ Full license texts: plugin/THIRD-PARTY-LICENSES.md.
38
+
39
+ The Android application bundles its own third-party libraries; their notices
40
+ are part of the Android build metadata, not of this plugin package.
package/README.md CHANGED
@@ -1,3 +1,97 @@
1
- # Temporary Holding Version
1
+ # DDeck — плагин (сторона компьютера)
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Показывает код подключения, принимает телефон и поднимает TLS-шлюз, через который
4
+ приложение DDeck работает с DeepSeek Harness. Ставится в профиль DSH одной командой.
5
+
6
+ ## Установка
7
+
8
+ ### Из npm (рекомендуется)
9
+
10
+ ```sh
11
+ dsh plugin --profile web add ddeck-remote
12
+ ```
13
+
14
+ Для desktop-профиля:
15
+
16
+ ```sh
17
+ dsh plugin --profile desktop add ddeck-remote
18
+ ```
19
+
20
+ После установки перезапустите DeepSeek Harness. Пакет в npm:
21
+ [`ddeck-remote`](https://www.npmjs.com/package/ddeck-remote).
22
+
23
+ ### Из репозитория
24
+
25
+ Нужен установленный DeepSeek Harness и один из вариантов: Python 3 на
26
+ macOS/Linux или PowerShell 5.1+ на Windows.
27
+
28
+ **macOS / Linux**
29
+
30
+ ```sh
31
+ xcode-select --install # macOS, если Command Line Tools ещё нет
32
+ # Debian/Ubuntu: sudo apt install python3
33
+
34
+ git clone https://github.com/nemezida1337/ddeck-client.git ddeck
35
+ cd ddeck
36
+ ./plugin/install.sh # или: DSH_PROFILE=/путь ./plugin/install.sh
37
+ ```
38
+
39
+ **Windows**
40
+
41
+ ```powershell
42
+ git clone https://github.com/nemezida1337/ddeck-client.git ddeck
43
+ cd ddeck
44
+ powershell -ExecutionPolicy Bypass -File .\plugin\install.ps1
45
+ # или двойной клик по plugin\install.cmd
46
+ ```
47
+
48
+ Нестандартный профиль:
49
+
50
+ ```sh
51
+ ./plugin/install.sh /путь/к/профилю
52
+ # Windows:
53
+ powershell -File .\plugin\install.ps1 -Profile C:\Users\me\.dsh\profiles\desktop
54
+ ```
55
+
56
+ Оба установщика делают три записи профиля (`package.json`,
57
+ `dsh.profile.bundles`, `cordis.patch.yml`) и подключают плагин ссылкой на эту
58
+ папку (symlink на macOS/Linux, junction на Windows). `pnpm`/`npm install` не
59
+ нужны: QR и TLS-библиотека уже собраны в `lib/`.
60
+
61
+ Обновление:
62
+
63
+ ```sh
64
+ cd ddeck && git pull && ./plugin/install.sh
65
+ ```
66
+
67
+ После установки **полностью перезапустите DeepSeek Harness**. Панель **DDeck**
68
+ появится в интерфейсе; в ней нажмите **«Новый код»**.
69
+
70
+ - повторный запуск обновляет установку;
71
+ - `plugin/uninstall.sh` удаляет плагин, не трогая данные сопряжений;
72
+ - бэкап профиля — в `~/.dsh/profiles/desktop/.dsh-remote-backups/<дата>`.
73
+
74
+ ## Что появляется
75
+
76
+ - панель **DDeck** в интерфейсе DSH: QR, шестизначный код, список устройств;
77
+ - HTTPS-шлюз на `0.0.0.0:3449` (меняется `DSH_REMOTE_PORT`);
78
+ - страница `/m` — мобильный интерфейс для телефона;
79
+ - данные сопряжений — в `~/.dsh/dsh-remote`.
80
+
81
+ ## Разработка
82
+
83
+ ```sh
84
+ ./plugin/install.sh
85
+ # зависимости для пересборки бандлов:
86
+ cd plugin && npm install
87
+ npx esbuild vendor/entry.js --bundle --format=esm --platform=node --target=node20 \
88
+ --outfile=lib/gateway-bundle.js --external:@deepseek-ai/schemastery
89
+ ```
90
+
91
+ Правки в `plugin/lib` при установке симлинком видны после перезапуска DSH; мобильный
92
+ слой (`lib/mobile/skin.*`) подхватывается при перезагрузке страницы.
93
+
94
+ ## Лицензия
95
+
96
+ Apache-2.0. Вендоренный транспорт — Apache-2.0 (`NOTICE`, `vendor/gateway/VENDORED.md`);
97
+ лицензии встроенных библиотек — в `THIRD-PARTY-LICENSES.md`.
@@ -0,0 +1,69 @@
1
+ # Third-party licenses
2
+
3
+ DDeck bundles the following third-party code into `plugin/lib/` so the plugin can be
4
+ installed without running `npm install`.
5
+
6
+ ## qrcode 1.5.4 — MIT
7
+
8
+ Bundled in `plugin/lib/qr-bundle.js` (pairing QR) and in the gateway bundle.
9
+
10
+ ```text
11
+ The MIT License (MIT)
12
+
13
+ Copyright (c) 2012 Ryan Day
14
+
15
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
16
+ this software and associated documentation files (the "Software"), to deal in
17
+ the Software without restriction, including without limitation the rights to
18
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
19
+ the Software, and to permit persons to whom the Software is furnished to do so,
20
+ subject to the following conditions:
21
+
22
+ The above copyright notice and this permission notice shall be included in all
23
+ copies or substantial portions of the Software.
24
+
25
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
26
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
27
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
28
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
29
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
30
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
31
+ ```
32
+
33
+ ## node-forge 1.4.0 — BSD-3-Clause (or GPL-2.0)
34
+
35
+ Bundled in `plugin/lib/node-forge-bundle.js`; used for generating the TLS CA and
36
+ leaf certificate. DDeck uses it under the BSD-3-Clause option.
37
+
38
+ ```text
39
+ New BSD License (3-clause)
40
+ Copyright (c) 2010, Digital Bazaar, Inc.
41
+ All rights reserved.
42
+
43
+ Redistribution and use in source and binary forms, with or without
44
+ modification, are permitted provided that the following conditions are met:
45
+ * Redistributions of source code must retain the above copyright notice,
46
+ this list of conditions and the following disclaimer.
47
+ * Redistributions in binary form must reproduce the above copyright
48
+ notice, this list of conditions and the following disclaimer in the
49
+ documentation and/or other materials provided with the distribution.
50
+ * Neither the name of Digital Bazaar, Inc. nor the names of its
51
+ contributors may be used to endorse or promote products derived from
52
+ this software without specific prior written permission.
53
+
54
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
55
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
56
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
57
+ DISCLAIMED. IN NO EVENT SHALL DIGITAL BAZAAR BE LIABLE FOR ANY DIRECT,
58
+ INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
59
+ BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
60
+ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
61
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
62
+ OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
63
+ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
64
+ ```
65
+
66
+ ## Vendored gateway
67
+
68
+ See `plugin/NOTICE` and `plugin/vendor/gateway/VENDORED.md`: transport gateway from
69
+ `dsh-mobile` 0.6.12, Apache-2.0.
@@ -0,0 +1,22 @@
1
+ # Слой патча DDeck.
2
+ #
3
+ # Без вставок directory-picker-browse пропадает `ctx.directoryPicker`: вслед за ним не
4
+ # стартует `dsh-api-workspace-controller`, и ломается список рабочих областей/сессий на
5
+ # всех страницах (host и клиент). Эти две вставки — единственное, что нам нужно из
6
+ # чужого bundle, помимо поведения карточки вопроса (перенесено в наш мобильный слой).
7
+ - id: directory-picker
8
+ name: '@deepseek-ai/dsh-host-directory-picker-auto'
9
+ disabled: true
10
+
11
+ - insert:
12
+ - id: directory-picker-mobile-host
13
+ name: '@deepseek-ai/dsh-host-directory-picker-browse'
14
+ # Windows DSH Desktop supplies its own browse pair after user patches.
15
+ disabled: !!js process.platform === 'win32' && (ctx.get('desktopRuntime')?.platform === 'win32' || ctx.get('desktopProfiles') !== undefined)
16
+
17
+ - id: directory-picker-mobile-surface
18
+ name: '@deepseek-ai/dsh-client-ui-directory-picker-browse'
19
+ disabled: !!js process.platform === 'win32' && (ctx.get('desktopRuntime')?.platform === 'win32' || ctx.get('desktopProfiles') !== undefined)
20
+
21
+ - id: ddeck-remote
22
+ name: ddeck-remote
package/icon.svg ADDED
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!-- DDeck — знак «Навстречу»: две D, обращённые друг к другу. -->
3
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 108 108" width="48" height="48" role="img" aria-label="DDeck">
4
+ <title>DDeck</title>
5
+ <path fill="#F5F6F8" fill-rule="evenodd" d="M32.60365,39.54808h17.26723c10.36568,0 18.76872,8.40304 18.76872,18.76872c0,10.36568 -8.40304,18.76872 -18.76872,18.76872h-17.26723c-1.001,0 -1.5015,-0.5005 -1.5015,-1.5015v-34.53445c0,-1.001 0.5005,-1.5015 1.5015,-1.5015zM41.1402,54.10977l6.9965,6.08391l-6.9965,6.08391c-0.40023,0.3442 -0.65368,0.85429 -0.65368,1.42358c0,1.03657 0.8403,1.87687 1.87687,1.87687c0.47469,0 0.90822,-0.17622 1.23874,-0.46681l8.61807,-7.49397c0.40023,-0.3442 0.65368,-0.85429 0.65368,-1.42358c0,-0.56929 -0.25346,-1.07938 -0.65368,-1.42358l-8.61807,-7.49397c-0.33052,-0.29059 -0.76405,-0.46681 -1.23874,-0.46681c-1.03657,0 -1.87687,0.8403 -1.87687,1.87687c0,0.56929 0.25346,1.07938 0.65368,1.42358zM69.01498,30.91447h7.13212c0.5005,0 0.75075,0.25025 0.75075,0.75075v14.26423c0,0.5005 -0.25025,0.75075 -0.75075,0.75075h-7.13212c-4.35359,0 -7.88286,-3.52928 -7.88286,-7.88286c0,-4.35359 3.52928,-7.88286 7.88286,-7.88286zM69.43537,39.11265l2.83979,-2.24817c0.22267,-0.17307 0.36594,-0.44346 0.36594,-0.74732c0,-0.52243 -0.42351,-0.94594 -0.94594,-0.94594c-0.22467,0 -0.43105,0.07833 -0.59332,0.20917l-3.77046,2.98494c-0.22267,0.17307 -0.36594,0.44346 -0.36594,0.74732c0,0.30386 0.14327,0.57426 0.36594,0.74732l3.77046,2.98494c0.16227,0.13084 0.36865,0.20917 0.59332,0.20917c0.52243,0 0.94594,-0.42351 0.94594,-0.94594c0,-0.30386 -0.14327,-0.57426 -0.36594,-0.74732z"/>
6
+ </svg>
package/install.cmd ADDED
@@ -0,0 +1,4 @@
1
+ @echo off
2
+ setlocal
3
+ powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0install.ps1" %*
4
+ endlocal
package/install.ps1 ADDED
@@ -0,0 +1,119 @@
1
+ #Requires -Version 5.1
2
+ <#
3
+ .SYNOPSIS
4
+ Устанавливает плагин DDeck в профиль DeepSeek Harness на Windows.
5
+
6
+ .DESCRIPTION
7
+ Делает те же три записи, что install.sh на macOS/Linux: link-зависимость,
8
+ бандл в dsh.profile.bundles и строку cordis.patch.yml. Каталог плагина
9
+ подключается junction-ссылкой, поэтому pnpm/npm install не нужны.
10
+
11
+ .EXAMPLE
12
+ powershell -ExecutionPolicy Bypass -File .\plugin\install.ps1
13
+ powershell -ExecutionPolicy Bypass -File .\plugin\install.ps1 -Profile C:\Users\me\.dsh\profiles\desktop
14
+ #>
15
+ [CmdletBinding()]
16
+ param(
17
+ [string]$Profile = $env:DSH_PROFILE
18
+ )
19
+
20
+ $ErrorActionPreference = 'Stop'
21
+ $PackageName = 'ddeck-remote'
22
+ $LegacyName = 'dsh-remote'
23
+ $Source = (Resolve-Path $PSScriptRoot).Path
24
+ if (-not (Test-Path (Join-Path $Source 'lib\index.js'))) {
25
+ throw "повреждён установщик: нет $Source\lib\index.js"
26
+ }
27
+
28
+ if ([string]::IsNullOrWhiteSpace($Profile)) {
29
+ $Profile = Join-Path $HOME '.dsh\profiles\desktop'
30
+ } elseif (-not [System.IO.Path]::IsPathRooted($Profile)) {
31
+ $Profile = Join-Path (Join-Path $HOME '.dsh\profiles') $Profile
32
+ }
33
+ if (-not (Test-Path $Profile)) {
34
+ throw "профиль DSH не найден: $Profile`nУкажите его через -Profile или DSH_PROFILE."
35
+ }
36
+ $Profile = (Resolve-Path $Profile).Path
37
+
38
+ $stamp = Get-Date -Format 'yyyyMMdd-HHmmss'
39
+ $backup = Join-Path $Profile ".dsh-remote-backups\$stamp"
40
+ New-Item -ItemType Directory -Path $backup -Force | Out-Null
41
+ foreach ($name in @('package.json', 'cordis.patch.yml')) {
42
+ $path = Join-Path $Profile $name
43
+ if (Test-Path $path) { Copy-Item $path (Join-Path $backup $name) -Force }
44
+ }
45
+ Write-Host "бэкап профиля: $backup"
46
+
47
+ $manifestPath = Join-Path $Profile 'package.json'
48
+ if (Test-Path $manifestPath) {
49
+ $manifest = Get-Content $manifestPath -Raw | ConvertFrom-Json
50
+ } else {
51
+ $manifest = [pscustomobject]@{}
52
+ }
53
+ if (-not $manifest.PSObject.Properties['dependencies']) {
54
+ $manifest | Add-Member -NotePropertyName dependencies -NotePropertyValue ([pscustomobject]@{}) -Force
55
+ }
56
+ if ($manifest.dependencies.PSObject.Properties['dsh-remote']) {
57
+ $manifest.dependencies.PSObject.Properties.Remove('dsh-remote')
58
+ }
59
+ $manifest.dependencies | Add-Member -NotePropertyName $PackageName -NotePropertyValue "link:$Source" -Force
60
+
61
+ if (-not $manifest.PSObject.Properties['dsh']) {
62
+ $manifest | Add-Member -NotePropertyName dsh -NotePropertyValue ([pscustomobject]@{}) -Force
63
+ }
64
+ if (-not $manifest.dsh.PSObject.Properties['profile']) {
65
+ $manifest.dsh | Add-Member -NotePropertyName profile -NotePropertyValue ([pscustomobject]@{}) -Force
66
+ }
67
+ if (-not $manifest.dsh.profile.PSObject.Properties['bundles']) {
68
+ $manifest.dsh.profile | Add-Member -NotePropertyName bundles -NotePropertyValue @() -Force
69
+ }
70
+ $bundles = @($manifest.dsh.profile.bundles | Where-Object { $_ -ne $PackageName -and $_ -ne $LegacyName })
71
+ $manifest.dsh.profile.bundles = @($bundles + $PackageName)
72
+ $json = $manifest | ConvertTo-Json -Depth 50
73
+ [System.IO.File]::WriteAllText($manifestPath, $json + [Environment]::NewLine, (New-Object System.Text.UTF8Encoding($false)))
74
+
75
+ $patchPath = Join-Path $Profile 'cordis.patch.yml'
76
+ if (Test-Path $patchPath) {
77
+ $patch = Get-Content $patchPath -Raw
78
+ foreach ($name in @($PackageName, $LegacyName)) {
79
+ $pattern = '(?ms)^\s*[-]\s*insert:\s*\r?\n\s*-\s*id:\s*' + [regex]::Escape($name) + '\s*\r?\n\s*name:\s*' + [regex]::Escape($name) + '\s*\r?\n?'
80
+ $patch = [regex]::Replace($patch, $pattern, '')
81
+ }
82
+ [System.IO.File]::WriteAllText($patchPath, $patch, (New-Object System.Text.UTF8Encoding($false)))
83
+ }
84
+
85
+ $nodeModules = Join-Path $Profile 'node_modules'
86
+ New-Item -ItemType Directory -Path $nodeModules -Force | Out-Null
87
+ foreach ($name in @($PackageName, $LegacyName)) {
88
+ $candidate = Join-Path $nodeModules $name
89
+ if (-not (Test-Path $candidate)) { continue }
90
+ $item = Get-Item $candidate -Force
91
+ $same = $name -eq $PackageName -and $item.LinkType -eq 'Junction' -and (($item.Target | Select-Object -First 1) -eq $Source)
92
+ if (-not $same) {
93
+ $old = Join-Path $backup "node_modules-$name.old"
94
+ Move-Item $candidate $old -Force
95
+ Write-Host "старая установка сохранена: $old"
96
+ }
97
+ }
98
+ $target = Join-Path $nodeModules $PackageName
99
+ if (-not (Test-Path $target)) {
100
+ New-Item -ItemType Junction -Path $target -Target $Source | Out-Null
101
+ }
102
+
103
+ $node = Get-Command node -ErrorAction SilentlyContinue
104
+ if ($null -ne $node) {
105
+ $entry = (New-Object System.Uri((Join-Path $Source 'lib\index.js'))).AbsoluteUri
106
+ & node --input-type=module -e "import('$entry').then(()=>console.log('плагин импортируется: ok'))"
107
+ if ($LASTEXITCODE -ne 0) { throw 'плагин не импортируется — установка прервана' }
108
+ } else {
109
+ Write-Host 'node не найден в PATH: проверку импорта пропускаю (DSH использует свой runtime)'
110
+ }
111
+
112
+ Write-Host @"
113
+
114
+ готово.
115
+ 1. Полностью перезапустите DeepSeek Harness.
116
+ 2. Откройте панель DDeck в интерфейсе DSH.
117
+ 3. Нажмите «Новый код» и отсканируйте QR телефоном.
118
+ Обновление: повторите этот скрипт и перезапустите DSH.
119
+ "@
package/install.sh ADDED
@@ -0,0 +1,95 @@
1
+ #!/bin/sh
2
+ # Устанавливает DDeck в профиль DeepSeek Harness.
3
+ #
4
+ # Никакого pnpm/npm install не требуется: плагин кладётся в профиль ссылкой, а его
5
+ # зависимости (QR) уже собраны в lib/. Повторный запуск обновляет ссылку и патчи.
6
+ #
7
+ # ./install.sh # профиль по умолчанию ~/.dsh/profiles/desktop
8
+ # ./install.sh /path/to/profile # явный профиль
9
+ # DSH_PROFILE=/path ./install.sh # то же через переменную
10
+ set -eu
11
+ SOURCE="$(cd "$(dirname "$0")" && pwd)"
12
+ PROFILE="${1:-${DSH_PROFILE:-$HOME/.dsh/profiles/desktop}}"
13
+ # DSH выставляет DSH_PROFILE как имя профиля («desktop»), а не путь.
14
+ case "$PROFILE" in /*) ;; *) PROFILE="$HOME/.dsh/profiles/$PROFILE" ;; esac
15
+ [ -d "$PROFILE" ] || { echo "профиль DSH не найден: $PROFILE" >&2; exit 1; }
16
+ [ -f "$SOURCE/lib/index.js" ] || { echo "повреждён установщик: нет $SOURCE/lib/index.js" >&2; exit 1; }
17
+ command -v python3 >/dev/null 2>&1 || {
18
+ echo "для установки нужен python3:" >&2
19
+ echo " macOS: xcode-select --install" >&2
20
+ echo " Debian/Ubuntu: sudo apt install python3" >&2
21
+ echo " Windows: используйте install.ps1 или install.cmd" >&2
22
+ exit 1
23
+ }
24
+
25
+ STAMP="$(date +%Y%m%d-%H%M%S)"
26
+ BACKUP="$PROFILE/.dsh-remote-backups/$STAMP"
27
+ mkdir -p "$BACKUP"
28
+ for file in package.json cordis.patch.yml; do
29
+ [ -f "$PROFILE/$file" ] && cp "$PROFILE/$file" "$BACKUP/$file"
30
+ done
31
+ echo "бэкап профиля: $BACKUP"
32
+
33
+ python3 - "$PROFILE" "$SOURCE" "ddeck-remote" "dsh-remote" <<'PY'
34
+ import json, pathlib, re, sys
35
+ profile, source = pathlib.Path(sys.argv[1]), pathlib.Path(sys.argv[2]).resolve()
36
+ package, legacy = sys.argv[3], sys.argv[4]
37
+ manifest = profile / 'package.json'
38
+ data = json.loads(manifest.read_text()) if manifest.exists() else {}
39
+ deps = data.setdefault('dependencies', {})
40
+ deps.pop(legacy, None)
41
+ deps[package] = f'link:{source}'
42
+ bundles = data.setdefault('dsh', {}).setdefault('profile', {}).setdefault('bundles', [])
43
+ for old in (package, legacy):
44
+ while old in bundles:
45
+ bundles.remove(old)
46
+ bundles.append(package)
47
+ manifest.write_text(json.dumps(data, ensure_ascii=False, indent=2) + '\n')
48
+
49
+ patch = profile / 'cordis.patch.yml'
50
+ if patch.exists():
51
+ text = patch.read_text()
52
+ # The package's own cordis.patch.yml inserts the plugin. A second insert in
53
+ # the profile made the client module load twice; remove both the old and the
54
+ # current duplicate.
55
+ changed = False
56
+ for name in (package, legacy):
57
+ for suffix in ("\n", ""):
58
+ marker = f'- insert:\n - id: {name}\n name: {name}{suffix}'
59
+ if marker in text:
60
+ text = text.replace(marker, "")
61
+ changed = True
62
+ if changed:
63
+ patch.write_text(text)
64
+ PY
65
+
66
+ mkdir -p "$PROFILE/node_modules"
67
+ for OLD_NAME in ddeck-remote dsh-remote; do
68
+ OLD_TARGET="$PROFILE/node_modules/$OLD_NAME"
69
+ [ -e "$OLD_TARGET" ] || [ -L "$OLD_TARGET" ] || continue
70
+ if [ "$OLD_NAME" = "dsh-remote" ] || [ ! -L "$OLD_TARGET" ] || [ "$(readlink "$OLD_TARGET")" != "$SOURCE" ]; then
71
+ mv "$OLD_TARGET" "$BACKUP/node_modules-$OLD_NAME.old"
72
+ echo "старая установка сохранена: $BACKUP/node_modules-$OLD_NAME.old"
73
+ fi
74
+ done
75
+ TARGET="$PROFILE/node_modules/ddeck-remote"
76
+ ln -sfn "$SOURCE" "$TARGET"
77
+
78
+ # Проверка, что плагин вообще импортируется (зависимости уже в lib/).
79
+ if command -v node >/dev/null 2>&1; then
80
+ node --input-type=module -e "import('file://$SOURCE/lib/index.js').then(()=>console.log('плагин импортируется: ok'))" || {
81
+ echo "плагин не импортируется — установка прервана" >&2
82
+ exit 1
83
+ }
84
+ else
85
+ echo "node в PATH нет: проверку импорта пропускаю (DSH использует свой runtime)"
86
+ fi
87
+
88
+ cat <<MSG
89
+
90
+ готово.
91
+ 1. Перезапустите DeepSeek Harness.
92
+ 2. Откройте панель DDeck в интерфейсе DSH.
93
+ 3. Убедитесь, что Tailscale запущен на компьютере и телефоне.
94
+ Обновление: повторите этот скрипт и перезапустите DSH.
95
+ MSG