dsh-sidebar-row-menu 0.0.0-stage → 1.3.3

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/AI_USAGE.en.md ADDED
@@ -0,0 +1,93 @@
1
+ # AI Usage and Code Provenance
2
+
3
+ [简体中文](AI_USAGE.md) · [English](AI_USAGE.en.md)
4
+
5
+ This document describes how artificial intelligence (AI) was used in
6
+ `dsh-sidebar-row-menu`, how the result was reviewed, where the code came from, and
7
+ the limits of the warranty. It does not modify any term of [LICENSE](LICENSE) (MIT).
8
+
9
+ ## 1. Summary
10
+
11
+ - The **source code and documentation were produced mainly with AI assistance**;
12
+ the project owner specified requirements, reviewed the result and verified behavior.
13
+ - AI is not a copyright holder. The project is released under MIT; the rights and
14
+ obligations of users are governed solely by MIT.
15
+ - The project comes with **no warranty**. AI-generated code may contain errors,
16
+ omissions, or behavior unsuitable for your environment.
17
+ - Copyright and licenses for third-party code are listed separately in
18
+ [NOTICE.en.md](NOTICE.en.md); they are not changed by this project's MIT license.
19
+
20
+ ## 2. Tools and models
21
+
22
+ - Development environment: DeepSeek Harness (DSH) coding agent.
23
+ - Model: `deepseek-flash` (DeepSeek).
24
+ - Interaction: the owner described requirements, reported defects and confirmed
25
+ behavior in natural language; the agent read DSH built-in packages and existing
26
+ plugin sources, wrote/refactored code, docs and tests, and verified them locally.
27
+
28
+ ## 3. Scope of AI involvement
29
+
30
+ | Area | AI involvement | Notes |
31
+ | --- | --- | --- |
32
+ | `lib/client.js` | High | Initial version and all refactors written by AI |
33
+ | `lib/host/*.js` | High | Split out of `lib/index.js` and rewritten by AI |
34
+ | `test/*.test.mjs` | High | Cases and fake DOM/fiber written by AI |
35
+ | `scripts/install.ps1` | High | Written by AI and executed locally |
36
+ | `README*.md` / `NOTICE*.md` / this file | High | Drafted by AI and kept in sync |
37
+ | Requirements, defect triage, final trade-offs | Human | Decided by the owner |
38
+
39
+ No human rewrote every line. Human review focused on **behavioral verification**:
40
+ reading critical paths, running tests, and exercising the menus in a real DSH client.
41
+
42
+ ## 4. Verified and not verified
43
+
44
+ Verified:
45
+
46
+ - 11 automated tests (host pure functions, route status codes, client wiring, slot
47
+ registration, menu item order, session right-click delegation, clipboard content);
48
+ - on a Windows DSH desktop client: workspace right-click opens at the pointer,
49
+ session right-click opens the native menu at the pointer including the plugin entries;
50
+ - the host `/open` route returns the expected status codes locally.
51
+
52
+ Not fully verified:
53
+
54
+ - every DSH version, theme, zoom level and multi-monitor setup;
55
+ - the `darwin` / `linux` launch branches (present in code, not exercised);
56
+ - every possible combination with other third-party plugins (the slot design is
57
+ meant to compose, but was not exhaustively tested).
58
+
59
+ ## 5. Code provenance
60
+
61
+ - Adapted from `dsh-sidebar-context-menu` (MIT, miao-ge) and `dsh-workspace-menu`
62
+ (BSD-3-Clause, @0imzero); the exact scope, copyright notices and full license
63
+ texts are in [NOTICE.en.md](NOTICE.en.md).
64
+ - DSH built-in packages were read only for public interfaces, types and runtime
65
+ behavior; **no source code from them is copied**.
66
+ - The Git history records each change; `v1.0.0`, `v1.1.0` and `v1.2.0` mark
67
+ behavioral milestones.
68
+
69
+ ## 6. Data and privacy
70
+
71
+ - The plugin runs locally and contains **no telemetry, analytics or remote requests**.
72
+ - The client reads workspace/session objects already in DSH's memory (title, `cwd`,
73
+ archived/pinned state) to build menus and copy paths/links.
74
+ - The host route accepts loopback requests only and opens **existing absolute
75
+ directories** only.
76
+ - Clipboard writes happen only when you click "Copy path / Copy link / Copy ID".
77
+
78
+ ## 7. Recommendations
79
+
80
+ 1. Before using it in production, read `lib/client.js` and `lib/host/*.js` and
81
+ confirm the behavior matches your expectations.
82
+ 2. Run `npm run test` (or `npm run test:local` in restricted environments).
83
+ 3. Keep `NOTICE.md` and `LICENSE` to satisfy the upstream MIT / BSD-3-Clause
84
+ attribution requirements.
85
+ 4. If AI-generated code causes a problem, please open an issue or a PR; human
86
+ fixes are welcome.
87
+
88
+ ## 8. Disclaimer
89
+
90
+ The project is provided "as is", without any express or implied warranty,
91
+ including but not limited to merchantability, fitness for a particular purpose and
92
+ non-infringement. The authors and contributors are not liable for any direct or
93
+ indirect damages arising from its use. The complete terms are in [LICENSE](LICENSE).
package/AI_USAGE.md ADDED
@@ -0,0 +1,79 @@
1
+ # AI 使用与代码来源声明
2
+
3
+ [简体中文](AI_USAGE.md) · [English](AI_USAGE.en.md)
4
+
5
+ 本文说明 `dsh-sidebar-row-menu` 中人工智能(AI)的参与范围、人工审核方式、代码引用
6
+ 来源与免责边界。它不改变 [LICENSE](LICENSE)(MIT)的任何条款。
7
+
8
+ ## 1. 结论摘要
9
+
10
+ - 本项目的**源码与文档主要由 AI 辅助生成**,由项目所有者提出需求、审阅并验证。
11
+ - AI 不是版权主体;本项目按 MIT 许可发布,使用者获得的权利与义务以 MIT 为准。
12
+ - 项目**不提供任何担保**。AI 生成的代码可能包含错误、遗漏或不适用于你的环境。
13
+ - 第三方代码的版权与许可单独列在 [NOTICE.md](NOTICE.md),不因本项目采用 MIT 而改变。
14
+
15
+ ## 2. 使用的工具与模型
16
+
17
+ - 开发环境:DeepSeek Harness(DSH)编码智能体。
18
+ - 模型:`deepseek-flash`(DeepSeek)。
19
+ - 交互方式:项目所有者以自然语言提出需求、指出缺陷并确认行为;智能体读取 DSH 内置
20
+ 包源码与现有插件源码,编写/重构代码、文档与测试,并在本机验证。
21
+
22
+ ## 3. AI 参与的范围
23
+
24
+ | 部分 | AI 参与程度 | 说明 |
25
+ | --- | --- | --- |
26
+ | `lib/client.js` | 高 | 初稿与多轮重构均由 AI 完成 |
27
+ | `lib/host/*.js` | 高 | 由 AI 从 `lib/index.js` 拆分并改写 |
28
+ | `test/*.test.mjs` | 高 | 测试用例与伪造 DOM/fiber 由 AI 编写 |
29
+ | `scripts/install.ps1` | 高 | 由 AI 编写并在本机执行验证 |
30
+ | `README*.md` / `NOTICE*.md` / 本文 | 高 | 由 AI 起草并随代码更新 |
31
+ | 需求、缺陷判断、最终取舍 | 人类 | 由项目所有者决定 |
32
+
33
+ 没有人类逐行重写全部代码。人工审核以**行为验证**为主:阅读关键路径、运行测试、
34
+ 在真实 DSH 客户端中触发菜单并观察结果。
35
+
36
+ ## 4. 已验证与未验证
37
+
38
+ 已验证:
39
+
40
+ - 11 项自动化测试(宿主纯函数、路由状态码、客户端模块装配、slot 注册、菜单项顺序、
41
+ 会话右键委托、剪贴板内容);
42
+ - 在 Windows 上的 DSH 桌面客户端中实测:工作区右键在指针处弹出、会话右键在指针处
43
+ 展开内置菜单并包含本插件条目;
44
+ - 宿主 `/open` 路由在本机返回预期状态码。
45
+
46
+ 未完全验证:
47
+
48
+ - 所有 DSH 版本、所有主题、所有缩放比例与多显示器组合;
49
+ - 非 Windows 平台的启动分支(代码保留 `darwin` / `linux` 路径,但未实测);
50
+ - 与其他第三方插件的组合冲突(slot 机制设计上兼容,但未穷举)。
51
+
52
+ ## 5. 代码来源与引用
53
+
54
+ - 改编自 `dsh-sidebar-context-menu`(MIT, miao-ge)与 `dsh-workspace-menu`
55
+ (BSD-3-Clause, @0imzero);复用范围、版权声明与许可证全文见
56
+ [NOTICE.md](NOTICE.md)。
57
+ - 对接 DSH 内置包时只读取其公开接口、类型与运行时行为,**未复制内置包源代码**。
58
+ - 仓库历史(Git commits)记录了每次变更;`v1.0.0`、`v1.1.0`、`v1.2.0` 是行为分界点。
59
+
60
+ ## 6. 数据与隐私
61
+
62
+ - 插件在本地运行,**不包含遥测、统计上报或远程请求**。
63
+ - 客户端只读取 DSH 已渲染到内存中的工作区/会话对象(标题、`cwd`、归档/置顶状态),
64
+ 用于生成菜单与复制路径/链接。
65
+ - 宿主路由只接受本机(loopback)请求,且只打开**已存在的绝对目录**。
66
+ - 剪贴板写入仅发生在你点击“复制路径 / 复制链接 / 复制 ID”时。
67
+
68
+ ## 7. 使用建议
69
+
70
+ 1. 在生产环境采用前,阅读 `lib/client.js` 与 `lib/host/*.js`,确认行为符合预期。
71
+ 2. 运行 `npm run test`(或受限环境用 `npm run test:local`)。
72
+ 3. 保留 `NOTICE.md` 与 `LICENSE`,以满足上游 MIT / BSD-3-Clause 的署名要求。
73
+ 4. 若发现 AI 生成代码导致的问题,请提交 issue 或 PR;欢迎人工修正。
74
+
75
+ ## 8. 免责声明
76
+
77
+ 本项目按“现状”提供,不附带任何明示或默示的担保,包括但不限于适销性、特定用途适用性
78
+ 与不侵权担保。使用本项目造成的任何直接或间接损失,作者与贡献者不承担责任。完整条款
79
+ 以 [LICENSE](LICENSE) 为准。
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 SideBar contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/NOTICE.en.md ADDED
@@ -0,0 +1,98 @@
1
+ # NOTICE / Third-party notices
2
+
3
+ [简体中文](NOTICE.md) · [English](NOTICE.en.md)
4
+
5
+ `dsh-sidebar-row-menu` (MIT) was implemented with reference to, and adaptation of,
6
+ two existing DSH plugins. The copyright and license conditions below apply to the
7
+ adapted portions; all remaining code is copyright its contributors.
8
+
9
+ ## dsh-sidebar-context-menu
10
+
11
+ - Author: miao-ge
12
+ - Version: 0.2.0
13
+ - License: MIT
14
+ - Repository: https://github.com/miao-ge/dsh-sidebar-context-menu
15
+ - Reused:
16
+ - host: loopback fence, JSON body reader, detached spawn, VS Code launcher
17
+ detection, `vscode://file` encoding (now split across
18
+ `lib/host/security.js`, `lib/host/launch.js`, `lib/host/paths.js`,
19
+ `lib/host/route.js`);
20
+ - client: fiber lookup, official `Menu` mounting, toast, capture-phase
21
+ `contextmenu` installation.
22
+
23
+ ## dsh-workspace-menu
24
+
25
+ - Author: @0imzero
26
+ - Version: 2.0.3
27
+ - License: BSD-3-Clause
28
+ - Reused: the client-service call pattern (`ctx.uiWorkspace` pin / archive /
29
+ unarchive / fork / openSession) and the `?session=<id>` deep-link construction.
30
+ Since v1.1 the session actions are official slot entries rather than direct
31
+ service calls, but the design was informed by this plugin.
32
+
33
+ ## DeepSeek Harness built-in packages
34
+
35
+ The project interoperates with slots, `Menu` and row-component props by reading the
36
+ public interfaces and types of DSH client packages
37
+ (`@deepseek-ai/dsh-client-ui-workspace`, `@deepseek-ai/dsh-client-ui-renderer`,
38
+ etc., version `0.2.1-rc.5`). **No source code from those packages is copied.**
39
+ Their copyright remains with DeepSeek and is not relicensed by this project's MIT
40
+ license.
41
+
42
+ ## AI assistance
43
+
44
+ Code and documentation were produced with AI assistance. Scope, verification and
45
+ disclaimers are documented in [AI_USAGE.en.md](AI_USAGE.en.md).
46
+
47
+ ---
48
+
49
+ ### MIT License (dsh-sidebar-context-menu)
50
+
51
+ Copyright (c) miao-ge
52
+
53
+ Permission is hereby granted, free of charge, to any person obtaining a copy
54
+ of this software and associated documentation files (the "Software"), to deal
55
+ in the Software without restriction, including without limitation the rights
56
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
57
+ copies of the Software, and to permit persons to whom the Software is
58
+ furnished to do so, subject to the following conditions:
59
+
60
+ The above copyright notice and this permission notice shall be included in all
61
+ copies or substantial portions of the Software.
62
+
63
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
64
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
65
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
66
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
67
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
68
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
69
+ SOFTWARE.
70
+
71
+ ### BSD-3-Clause License (dsh-workspace-menu)
72
+
73
+ Copyright (c) 2025, @0imzero
74
+
75
+ Redistribution and use in source and binary forms, with or without
76
+ modification, are permitted provided that the following conditions are met:
77
+
78
+ 1. Redistributions of source code must retain the above copyright notice, this
79
+ list of conditions and the following disclaimer.
80
+
81
+ 2. Redistributions in binary form must reproduce the above copyright notice,
82
+ this list of conditions and the following disclaimer in the documentation
83
+ and/or other materials provided with the distribution.
84
+
85
+ 3. Neither the name of the copyright holder nor the names of its
86
+ contributors may be used to endorse or promote products derived from
87
+ this software without specific prior written permission.
88
+
89
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
90
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
91
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
92
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
93
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
94
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
95
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
96
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
97
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
98
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
package/NOTICE.md ADDED
@@ -0,0 +1,92 @@
1
+ # NOTICE / 第三方声明
2
+
3
+ [简体中文](NOTICE.md) · [English](NOTICE.en.md)
4
+
5
+ `dsh-sidebar-row-menu`(MIT)在实现过程中参考并改编了两个现有 DSH 插件的代码。
6
+ 下列版权与许可条件适用于被改编的部分;其余代码版权归本项目贡献者所有。
7
+
8
+ ## dsh-sidebar-context-menu
9
+
10
+ - 作者:miao-ge
11
+ - 版本:0.2.0
12
+ - 许可证:MIT
13
+ - 仓库:https://github.com/miao-ge/dsh-sidebar-context-menu
14
+ - 复用范围:
15
+ - 宿主:loopback 围栏、JSON 请求体读取、detached spawn、VS Code 启动器探测、
16
+ `vscode://file` 编码(现拆分在 `lib/host/security.js`、`lib/host/launch.js`、
17
+ `lib/host/paths.js`、`lib/host/route.js`);
18
+ - 客户端:fiber 解析、官方 `Menu` 挂载、toast、`contextmenu` 捕获安装方式。
19
+
20
+ ## dsh-workspace-menu
21
+
22
+ - 作者:@0imzero
23
+ - 版本:2.0.3
24
+ - 许可证:BSD-3-Clause
25
+ - 复用范围:客户端服务调用方式(`ctx.uiWorkspace` 的 pin / archive / unarchive /
26
+ fork / openSession)与会话深链接 `?session=<id>` 的构造方式。v1.1 起会话动作
27
+ 改为官方 slot 条目,不再直接调用这些服务,但设计仍受其启发。
28
+
29
+ ## DeepSeek Harness 内置包
30
+
31
+ 本项目通过阅读 DSH 客户端内置包(`@deepseek-ai/dsh-client-ui-workspace`、
32
+ `@deepseek-ai/dsh-client-ui-renderer` 等,版本 `0.2.1-rc.5`)的公开接口与类型来对接
33
+ slot、`Menu` 和行组件 props。**没有复制其源代码**;内置包的版权归 DeepSeek 所有,
34
+ 其许可不因本项目的 MIT 许可而改变。
35
+
36
+ ## AI 辅助说明
37
+
38
+ 本项目的代码与文档在 AI 辅助下完成,范围、验证方式与免责声明见
39
+ [AI_USAGE.md](AI_USAGE.md)。
40
+
41
+ ---
42
+
43
+ ### MIT License (dsh-sidebar-context-menu)
44
+
45
+ Copyright (c) miao-ge
46
+
47
+ Permission is hereby granted, free of charge, to any person obtaining a copy
48
+ of this software and associated documentation files (the "Software"), to deal
49
+ in the Software without restriction, including without limitation the rights
50
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
51
+ copies of the Software, and to permit persons to whom the Software is
52
+ furnished to do so, subject to the following conditions:
53
+
54
+ The above copyright notice and this permission notice shall be included in all
55
+ copies or substantial portions of the Software.
56
+
57
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
58
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
59
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
60
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
61
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
62
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
63
+ SOFTWARE.
64
+
65
+ ### BSD-3-Clause License (dsh-workspace-menu)
66
+
67
+ Copyright (c) 2025, @0imzero
68
+
69
+ Redistribution and use in source and binary forms, with or without
70
+ modification, are permitted provided that the following conditions are met:
71
+
72
+ 1. Redistributions of source code must retain the above copyright notice, this
73
+ list of conditions and the following disclaimer.
74
+
75
+ 2. Redistributions in binary form must reproduce the above copyright notice,
76
+ this list of conditions and the following disclaimer in the documentation
77
+ and/or other materials provided with the distribution.
78
+
79
+ 3. Neither the name of the copyright holder nor the names of its
80
+ contributors may be used to endorse or promote products derived from
81
+ this software without specific prior written permission.
82
+
83
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
84
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
85
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
86
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
87
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
88
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
89
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
90
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
91
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
92
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.