@takboo/dsh-session-bin 0.0.0-stage → 0.1.1

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.
Files changed (51) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +122 -2
  3. package/cordis.patch.yml +4 -0
  4. package/dist/client-model.js +1673 -0
  5. package/dist/client.js +17043 -0
  6. package/dist/client.js.map +1 -0
  7. package/dist/host/archive.d.ts +766 -0
  8. package/dist/host/lease.d.ts +4 -0
  9. package/dist/host/module.d.ts +705 -0
  10. package/dist/host/native-jsonl-files.d.ts +198 -0
  11. package/dist/host/native-retirement-admission.d.ts +33 -0
  12. package/dist/host/native-retirement-metadata.d.ts +116 -0
  13. package/dist/host/native-retirement-owner.d.ts +305 -0
  14. package/dist/host/native-retirement-persistence.d.ts +24 -0
  15. package/dist/host/native-retirement-sdk.d.ts +80 -0
  16. package/dist/host/native.d.ts +12 -0
  17. package/dist/host/platform-files.d.ts +19 -0
  18. package/dist/host/remote.d.ts +32 -0
  19. package/dist/host/retirement-owner-store.d.ts +124 -0
  20. package/dist/host/retirement-owner.d.ts +124 -0
  21. package/dist/host/retirement-store.d.ts +311 -0
  22. package/dist/host/retirement.d.ts +76 -0
  23. package/dist/host/store.d.ts +215 -0
  24. package/dist/index.d.ts +912 -0
  25. package/dist/index.js +5008 -0
  26. package/dist/index.js.map +7 -0
  27. package/dist/operations/archive.d.ts +82 -0
  28. package/dist/operations/index.d.ts +2 -0
  29. package/dist/operations/retirement-owner.d.ts +129 -0
  30. package/dist/operations/retirement.d.ts +821 -0
  31. package/dist/operations/schema.d.ts +115 -0
  32. package/dist/operations.js +130 -0
  33. package/dist/operations.js.map +7 -0
  34. package/dist/remote/contracts.d.ts +891 -0
  35. package/dist/remote.js +442 -0
  36. package/dist/remote.js.map +7 -0
  37. package/dist/types/client/components.d.ts +17 -0
  38. package/dist/types/client/index.d.ts +10 -0
  39. package/dist/types/client/locales.d.ts +116 -0
  40. package/dist/types/client/model.d.ts +137 -0
  41. package/dist/types/client/purge-batch.d.ts +45 -0
  42. package/dist/types/client/retirement-digest.d.ts +3 -0
  43. package/dist/types/operations/archive.d.ts +82 -0
  44. package/dist/types/operations/retirement.d.ts +821 -0
  45. package/dist/types/operations/schema.d.ts +115 -0
  46. package/dist/types/remote/contracts.d.ts +891 -0
  47. package/docs/client-interface.md +79 -0
  48. package/docs/host-lifecycle.md +160 -0
  49. package/locale/en.json +6 -0
  50. package/locale/zh.json +6 -0
  51. package/package.json +163 -4
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 DSH Session Bin 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/README.md CHANGED
@@ -1,3 +1,123 @@
1
- # Temporary Holding Version
1
+ # DSH Session Bin
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
+ [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) 的原生归档管理插件。在一个面板中搜索、筛选和管理已归档会话,支持取消归档、单项永久删除、批量永久删除和清空归档。
4
+
5
+ 插件直接管理 Harness 的原生 Archive 集合,已有归档也会显示。归档仍使用宿主的原生操作。
6
+
7
+ ## 功能
8
+
9
+ - 按会话名称及工作区元数据搜索,按工作区筛选。
10
+ - 单项或批量取消归档,让会话回到原生会话列表。
11
+ - 单项永久删除、固定选择的批量永久删除,以及清空点击时的全部归档。
12
+ - 删除前展示确认和阻止原因,删除后显示逐项结果;中断或断线后可查询结果并明确继续。
13
+ - 中英文界面,使用宿主控件、浅色和深色主题。
14
+
15
+ 当前版本为 `0.1.1`,包名为 `@takboo/dsh-session-bin`。GitHub Release 提供预编译 tarball;npm 通过 trusted publishing 自动发布同一份产物,dsh-market 收录另行提交。核心功能已完成跨平台验收;运行证据见 [Host 验证](docs/verification/host-lifecycle.md#跨平台生产删除资格晋级验证)和[客户端验证](docs/verification/client-interface.md#跨平台生产删除客户端验证)。
16
+
17
+ ## 界面预览
18
+
19
+ ![原生归档管理与批量选择](https://raw.githubusercontent.com/takboo/dsh-session-bin/v0.1.0/docs/images/archives-light.png)
20
+
21
+ [深色界面](docs/images/archives-dark.png) · [批量永久删除确认](docs/images/batch-deletion.png)。截图来自 `0.1.0` 的真实安装验收,使用隔离测试会话。
22
+
23
+ ## 兼容性
24
+
25
+ 永久删除绑定 DSH `0.2.0-rc.2`、Node `24.18.1` / libuv `1.52.1`,使用单 Host 和已验证的 JSONL raw/zstd 存储组合。
26
+
27
+ | 已验收环境 | CPU 架构 | 文件系统 |
28
+ | --- | --- | --- |
29
+ | Windows Server 2025 | x64 | NTFS |
30
+ | macOS 15 | Apple Silicon ARM64、Intel x64 | APFS |
31
+ | Ubuntu 24.04 | ARM64、x64 | ext2/ext3/ext4 family(type `0xef53`) |
32
+
33
+ 表格记录实际验收环境,不代表所有 Windows、macOS 或 Linux 版本均已验证。Windows ARM64、其他运行时及未验证的存储组合不在支持范围内。永久删除还会检查宿主源码、资源身份和当前状态;不满足条件时明确拒绝。完整准入与限制见 [Host 生命周期](docs/host-lifecycle.md)。
34
+
35
+ ## 安装
36
+
37
+ 当前可从源码构建预编译 tarball。先完成下方[开发入门](#开发入门),再在仓库根目录运行:
38
+
39
+ ```sh
40
+ mise exec -- pnpm exec npm pack --ignore-scripts
41
+ dsh plugin --profile web add ./takboo-dsh-session-bin-0.1.1.tgz
42
+ ```
43
+
44
+ 以上命令使用已安装的 DSH `0.2.0-rc.2`,将完整插件 bundle 安装到 `web` profile;该路径已通过真实 CLI/GUI 验证。启动或重新启动该 profile 后,从侧栏打开“会话回收站”(Session Bin)。tarball 包含预编译 Host 和 Client,使用者安装时无需编译 TypeScript。
45
+
46
+ 卸载同一 profile 中的插件:
47
+
48
+ ```sh
49
+ dsh plugin --profile web remove @takboo/dsh-session-bin
50
+ ```
51
+
52
+ 也可下载 [v0.1.1 Release](https://github.com/takboo/dsh-session-bin/releases/tag/v0.1.1) 中的 `dsh-session-bin.tgz`,通过同一个 `dsh plugin --profile web add` 命令安装。也可从 npm 安装:`dsh plugin --profile web add @takboo/dsh-session-bin@0.1.1`。
53
+
54
+ 如安装过早期未加 scope 的开发包,先从同一 profile 卸载 `dsh-session-bin`,再安装 scoped 包,避免重复注册;原生归档和已有操作记录保留。分发契约见[发布文档](docs/release.md)。
55
+
56
+ ### 自动构建与 Release
57
+
58
+ 每次分支 push 或 PR 的 Linux x64 验收通过后,[GitHub Actions](https://github.com/takboo/dsh-session-bin/actions/workflows/host-lifecycle.yml) 提供 `release-payload` artifact,包含真实测试过的 tarball、校验文件和提交信息,供发布前检查。
59
+
60
+ 推送与 `package.json.version` 一致的 `v<version>` tag 时,五个平台全部通过后自动创建 [GitHub Release](https://github.com/takboo/dsh-session-bin/releases),附上 `dsh-session-bin.tgz`、`SHA256SUMS` 和 `release.json`。预发布版本标记为 prerelease;tag 须指向 `main` 历史中的提交。版本 tag 的推送就是发布触发操作,流程见[发布文档](docs/release.md#自动-tarball-release)。
61
+
62
+ ## 使用
63
+
64
+ 1. 使用 Harness 原生“归档会话”操作归档目标会话。
65
+ 2. 打开“会话回收站”,搜索或筛选已有归档;选择单项或多项取消归档。
66
+ 3. 永久删除时,先核对确认窗口中的对象、范围和阻止原因,再明确确认执行。
67
+ 4. 如出现部分失败或连接中断,查看逐项结果,检查操作状态后再决定是否继续。
68
+
69
+ **“清空全部归档”包含点击时的全部归档,搜索和工作区筛选不会缩小其范围。** 批量删除固定开始时的对象,后来新增的归档不会加入。
70
+
71
+ 永久删除不可撤销,仅允许已归档、无活动且无未释放读写引用的冷会话;删除准备会释放由 API Session 激活且确认空闲的目标 Agent,再复核冷会话条件;活动任务、其他所有者的 Agent 和未释放的读写引用仍会阻止删除。清除范围是目标会话日志及已声明的会话元数据、索引;共享附件、外部副本和独立 fork 会保留。插件不提供共享附件垃圾回收或安全擦除保证,也不支持自动定期清空、跨设备同步或多 Host 协调。可通过 Host 配置 `permanentDeletion: false` 关闭永久删除,配置说明见 [Host 生命周期](docs/host-lifecycle.md)。
72
+
73
+ ## 开发入门
74
+
75
+ 使用 [mise](https://mise.jdx.dev/) 管理工具版本,固定配置在 [mise.toml](mise.toml)。
76
+
77
+ ```sh
78
+ git clone https://github.com/takboo/dsh-session-bin.git
79
+ cd dsh-session-bin
80
+ mise trust
81
+ mise install
82
+ mise run install
83
+ mise run verify
84
+ ```
85
+
86
+ `mise run install` 按 frozen lockfile 安装依赖并禁用安装脚本。`mise run verify` 完成类型检查、构建、隔离行为测试和真实 tarball 加载检查;测试使用临时 `DSH_HOME` 与测试会话。
87
+
88
+ | 命令 | 用途 |
89
+ | --- | --- |
90
+ | `mise run env` | 查看固定工具版本 |
91
+ | `mise run check` | 检查 Host 与 Client 类型 |
92
+ | `mise run build` | 生成预编译产物和类型声明 |
93
+ | `mise run verify` | 完整本地行为与打包验证 |
94
+ | `mise run verify:gui` | 隔离 Web profile 中的双语 CLI/GUI 验证 |
95
+ | `mise run verify:platform` | 记录实际操作系统的候选组合验收证据 |
96
+ | `mise run verify:linux` | 在固定 Node 的 Linux 容器内验证,需要 Docker |
97
+
98
+ GUI 验证需要可用 Chromium 和 npm registry 网络访问,准备方式见[客户端接口](docs/client-interface.md#构建和检查)。候选验收通过不会自动扩大生产支持矩阵。本地 `.local/` 存放研究快照及测试证据,不进入 Git 或发布包。
99
+
100
+ ## 文档与贡献
101
+
102
+ 欢迎通过 [Issues](https://github.com/takboo/dsh-session-bin/issues) 报告问题或提出功能建议。兼容性问题请提供 DSH/Node 版本、操作系统、架构、文件系统和存储提供方;样本使用测试数据。开发和 PR 约定见 [CONTRIBUTING.md](CONTRIBUTING.md),代理工作入口见 [AGENTS.md](AGENTS.md)。
103
+
104
+ - [Host 生命周期](docs/host-lifecycle.md)、[客户端接口](docs/client-interface.md):正式行为、配置及部署边界。
105
+ - [Host 验证](docs/verification/host-lifecycle.md)、[客户端验证](docs/verification/client-interface.md):分版本的实际检查结果。
106
+ - [设计提案](docs/design-proposal.md)、[架构决定](docs/decisions/):产品模型、候选设计与已选定决策。
107
+ - [当前 DSH 接口调研](docs/research/current-dsh-interfaces.md)、[兼容性验证](docs/verification/dsh-0.2-compatibility.md):SDK 依据与早期探针。
108
+ - [分发与发布](docs/release.md):npm、GitHub Release 和市场提交流程。
109
+
110
+ ## 许可与参考
111
+
112
+ 本项目采用 [MIT License](LICENSE),版权归 DSH Session Bin contributors。
113
+
114
+ 以下项目为接口、产品设计和兼容性研究提供了参考;本项目未复制这些参考插件的实现代码,也不代表其维护者或 DeepSeek 官方背书。
115
+
116
+ | 项目 | 参考内容 | 上游许可 |
117
+ | --- | --- | --- |
118
+ | [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) | 宿主及官方插件接口 | 以上游仓库和各依赖包声明为准 |
119
+ | [Seetraum/harness-session-delete](https://github.com/Seetraum/harness-session-delete)(`dsh-session-recycle-bin`) | 归档管理交互及分发方式 | MIT,Copyright 2026 Seetraum |
120
+ | [MichengAI/dsh-archive-manager](https://github.com/MichengAI/dsh-archive-manager) | 永久删除与兼容性研究 | Apache-2.0 |
121
+ | [dsh-market](https://github.com/dsh-market/dsh-market)、[awesome-dsh-plugin](https://github.com/awesome-dsh-plugin/awesome-dsh-plugin) | 插件市场与目录规则 | 以上游仓库声明为准 |
122
+
123
+ 版本、源码出处与研究结论见[参考及分发调研](docs/research/reference-and-distribution.md)和[永久删除调研](docs/research/permanent-deletion.md)。项目的 MIT 许可不替代第三方依赖的许可;复用上游代码时须保留适用版权、许可及通知。
@@ -0,0 +1,4 @@
1
+ - insert:
2
+ - id: session-bin
3
+ name: '@takboo/dsh-session-bin'
4
+ config: {}