@hanamesh/dsh-app-host 0.2.0-rc.2 → 0.6.14
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 +4 -7
- package/README.md +140 -13
- package/consistency.json +41 -6
- package/dist/catalog/fixtures/consumer.json +35 -0
- package/dist/catalog/fixtures/provider.json +107 -0
- package/dist/catalog/suite.d.ts +4 -0
- package/dist/catalog/suite.js +50 -0
- package/dist/client-ui.d.ts +21 -3
- package/dist/client-ui.js +961 -94
- package/dist/client.js +2 -2
- package/dist/control-origin.js +9 -0
- package/dist/descriptor.js +6 -0
- package/dist/dsh-compat.js +6 -0
- package/dist/dsh.d.ts +21 -4
- package/dist/dsh.js +149 -58
- package/dist/gateway.js +140 -11
- package/dist/git-process.js +64 -0
- package/dist/git-worker.js +50 -0
- package/dist/index.d.ts +9 -7
- package/dist/install-target/fixtures/catalog.json +58 -0
- package/dist/install-target/fixtures/consumer-cases.json +148 -0
- package/dist/install-target/fixtures/install-failure-cases.json +58 -0
- package/dist/install-target/fixtures/provider-cases.json +618 -0
- package/dist/install-target/fixtures/reference-consumer.js +37 -0
- package/dist/install-target/fixtures/source-profile.js +123 -0
- package/dist/install-target/harness.js +43 -0
- package/dist/install-target/run.js +28 -0
- package/dist/install-target/suite.d.ts +19 -0
- package/dist/install-target/suite.js +328 -0
- package/dist/installation-status.d.ts +21 -0
- package/dist/installation-status.js +2 -0
- package/dist/library/catalog.js +163 -19
- package/dist/library/client-identity.js +31 -0
- package/dist/library/desktop-cli.js +7 -0
- package/dist/library/domain.js +3 -1
- package/dist/library/handoff.js +246 -0
- package/dist/library/install.js +138 -32
- package/dist/library/installation-cli.js +48 -0
- package/dist/library/installation-command-worker.js +27 -0
- package/dist/library/installation-status-http.js +26 -0
- package/dist/library/installation-status.js +91 -0
- package/dist/library/installation-worker.js +44 -0
- package/dist/library/locate.js +70 -9
- package/dist/library/node-binding.js +11 -0
- package/dist/library/recovery.js +66 -0
- package/dist/library/routes.js +90 -14
- package/dist/library/service.js +123 -27
- package/dist/library/suite.js +130 -0
- package/dist/manager.js +24 -8
- package/dist/node-runtime/domain.js +6 -0
- package/dist/node-runtime/releases.json +59 -0
- package/dist/node-runtime/service.js +101 -0
- package/dist/owned-probe-diagnostic.js +53 -0
- package/dist/router/receipts.js +8 -11
- package/dist/router/routes.js +7 -7
- package/dist/routes.js +9 -8
- package/dist/runtime.js +11 -1
- package/dist/usage-evidence.js +18 -86
- package/dist/workspace-origin.js +17 -0
- package/docs/APP_PACKAGE.md +4 -0
- package/docs/CONTRACT.md +75 -11
- package/docs/DSH_COMPATIBILITY.md +94 -0
- package/docs/DSH_INTEGRATION.md +41 -0
- package/docs/INSTALLATION_STATUS.md +96 -0
- package/docs/INSTALL_TARGET.md +130 -0
- package/docs/LIBRARY.md +44 -3
- package/docs/LICENSES.json +189 -61
- package/docs/PROVENANCE.json +53 -12
- package/docs/SECURITY.md +31 -0
- package/node_modules/@hanamesh/lib-provision/LICENSE +15 -0
- package/node_modules/@hanamesh/lib-provision/README.md +134 -0
- package/node_modules/@hanamesh/lib-provision/THIRD_PARTY_NOTICES.md +17 -0
- package/node_modules/@hanamesh/lib-provision/bin/hanamesh-provision.js +13 -0
- package/node_modules/@hanamesh/lib-provision/consistency.json +20 -0
- package/node_modules/@hanamesh/lib-provision/contract/CHANGELOG.md +5 -0
- package/node_modules/@hanamesh/lib-provision/contract/conformance.mjs +80 -0
- package/node_modules/@hanamesh/lib-provision/contract/fixtures/consumer.json +9 -0
- package/node_modules/@hanamesh/lib-provision/contract/fixtures/provider.json +11 -0
- package/node_modules/@hanamesh/lib-provision/contract/lib-provision.schema.json +47 -0
- package/node_modules/@hanamesh/lib-provision/package.json +50 -0
- package/package.json +81 -33
- package/schemas/catalog-provider-page.schema.json +884 -7
- package/schemas/catalog-source.schema.json +9 -7
- package/schemas/install-target.schema.json +298 -0
- package/dist/provision/LICENSE +0 -6
- package/dist/provision/THIRD_PARTY_NOTICES.md +0 -13
- /package/{dist/provision → node_modules/@hanamesh/lib-provision/lib}/archive.d.ts +0 -0
- /package/{dist/provision → node_modules/@hanamesh/lib-provision/lib}/archive.js +0 -0
- /package/{dist/provision → node_modules/@hanamesh/lib-provision/lib}/check.d.ts +0 -0
- /package/{dist/provision → node_modules/@hanamesh/lib-provision/lib}/check.js +0 -0
- /package/{dist/provision → node_modules/@hanamesh/lib-provision/lib}/checkpoints.d.ts +0 -0
- /package/{dist/provision → node_modules/@hanamesh/lib-provision/lib}/checkpoints.js +0 -0
- /package/{dist/provision → node_modules/@hanamesh/lib-provision/lib}/cli.d.ts +0 -0
- /package/{dist/provision → node_modules/@hanamesh/lib-provision/lib}/cli.js +0 -0
- /package/{dist/provision → node_modules/@hanamesh/lib-provision/lib}/download.d.ts +0 -0
- /package/{dist/provision → node_modules/@hanamesh/lib-provision/lib}/download.js +0 -0
- /package/{dist/provision → node_modules/@hanamesh/lib-provision/lib}/errors.d.ts +0 -0
- /package/{dist/provision → node_modules/@hanamesh/lib-provision/lib}/errors.js +0 -0
- /package/{dist/provision → node_modules/@hanamesh/lib-provision/lib}/extract.d.ts +0 -0
- /package/{dist/provision → node_modules/@hanamesh/lib-provision/lib}/extract.js +0 -0
- /package/{dist/provision → node_modules/@hanamesh/lib-provision/lib}/fsutil.d.ts +0 -0
- /package/{dist/provision → node_modules/@hanamesh/lib-provision/lib}/fsutil.js +0 -0
- /package/{dist/provision → node_modules/@hanamesh/lib-provision/lib}/index.d.ts +0 -0
- /package/{dist/provision → node_modules/@hanamesh/lib-provision/lib}/index.js +0 -0
- /package/{dist/provision → node_modules/@hanamesh/lib-provision/lib}/ledger.d.ts +0 -0
- /package/{dist/provision → node_modules/@hanamesh/lib-provision/lib}/ledger.js +0 -0
- /package/{dist/provision → node_modules/@hanamesh/lib-provision/lib}/manifest.d.ts +0 -0
- /package/{dist/provision → node_modules/@hanamesh/lib-provision/lib}/manifest.js +0 -0
- /package/{dist/provision → node_modules/@hanamesh/lib-provision/lib}/paths.d.ts +0 -0
- /package/{dist/provision → node_modules/@hanamesh/lib-provision/lib}/paths.js +0 -0
- /package/{dist/provision → node_modules/@hanamesh/lib-provision/lib}/platform.d.ts +0 -0
- /package/{dist/provision → node_modules/@hanamesh/lib-provision/lib}/platform.js +0 -0
- /package/{dist/provision → node_modules/@hanamesh/lib-provision/lib}/provision.d.ts +0 -0
- /package/{dist/provision → node_modules/@hanamesh/lib-provision/lib}/provision.js +0 -0
- /package/{dist/provision → node_modules/@hanamesh/lib-provision/lib}/tar.d.ts +0 -0
- /package/{dist/provision → node_modules/@hanamesh/lib-provision/lib}/tar.js +0 -0
- /package/{dist/provision → node_modules/@hanamesh/lib-provision/lib}/types.d.ts +0 -0
- /package/{dist/provision → node_modules/@hanamesh/lib-provision/lib}/types.js +0 -0
- /package/{dist/provision → node_modules/@hanamesh/lib-provision/lib}/zip.d.ts +0 -0
- /package/{dist/provision → node_modules/@hanamesh/lib-provision/lib}/zip.js +0 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
# @hanamesh/lib-provision
|
|
2
|
+
|
|
3
|
+
**历史基线:0.1.0-rc.1 · P01–P06、P08、P09、X01–X03 PASS(本机真实网络 + 真实 SIGKILL);P07 Windows 真实门 NOT_RUN(PLAT,需 mayn)。完整记录与原始输出:`docs/acceptance/P.md` 与同目录 `raw/`、`mutations/`。0.1.0-rc.2 的开发工具迁移已交独立组件验证;0.1.0-rc.3 已更新分发元数据与许可记录;0.1.0-rc.4 同步了已独立验证的 devkit rc.2 开发 vendor;0.2.0 加了正常 Git 范围供给与 `contract/`;当前 0.2.1(与候选 0.2.1-rc.2 功能字节相同,仅版本字段不同)去掉公开的 devkit 可选 peer,`lib/` 随 tag 提交、去掉安装期构建,自身 Devkit 改走 Devkit 源 Git 范围(pnpm)。业务 src/bin/原测试不变。ACCEPTED 由用户亲跑 P01 后给出。**
|
|
4
|
+
|
|
5
|
+
把「把一个大文件安全地放到用户机器上」做成唯一实现:**选源 → 可续传下载 → sha256 必须等于 manifest → 解压到 root 内唯一 staging → 可选 `verify.exec` → 原子提升 → 账本**。任一步失败:staging 清理、已落位的不动。它不猜任何东西——来源、摘要、目标路径全部来自调用方给的 manifest;唯一的「探测」是 `process.platform-process.arch`。
|
|
6
|
+
|
|
7
|
+
零运行时依赖(tar.gz / zip 读取用 Node 内置 `zlib` 自写;HTTP 用 Node 24 自带 `fetch`)。不支持 `.tar.xz`。
|
|
8
|
+
|
|
9
|
+
## 实际环境
|
|
10
|
+
|
|
11
|
+
| 项目 | 本次实测 | 产品目标 |
|
|
12
|
+
|---|---|---|
|
|
13
|
+
| 系统 | macOS darwin-arm64(Darwin 25.3.0) | macOS / Windows / Linux 四平台;Windows 仅纯函数单测 |
|
|
14
|
+
| Node / npm | 24.13.1 / 11.8.0 | Node 24.13.1,`engines` `>=24.13.1 <25` |
|
|
15
|
+
| TypeScript | 5.9.3(devDependency 钉死) | 5.9.3,`strict` + `exactOptionalPropertyTypes`,`skipLibCheck=false` |
|
|
16
|
+
| 运行时依赖 | 无 | 无 |
|
|
17
|
+
| 真实网络 | nodejs.org 官方 `node-v24.13.1-darwin-arm64.tar.gz`(sha256 取自官方 `SHASUMS256.txt`) | GitHub Releases / CN 反代 / 离线 `file:` |
|
|
18
|
+
|
|
19
|
+
## 用法
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
# 正常 Git 范围(tag 里已含构建好的 lib/,没有安装期脚本,不装本包开发依赖;npm、pnpm 都直接可用)
|
|
23
|
+
npm install 'git+https://github.com/yzsnstotz/hanamesh-lib-provision.git#semver:^0.2.1'
|
|
24
|
+
# 或已封归档
|
|
25
|
+
npm install /abs/path/hanamesh-lib-provision-0.2.1.tgz
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
范围边界(npm 自带 semver 7.7.3 实测):0.x 的 `^0.2.0` 只覆盖 `>=0.2.0 <0.3.0`,不覆盖 0.3.x 或 1.x,也不含任何预发布;`^0.2.1` 只覆盖 `>=0.2.1 <0.3.0`,不含任何预发布;`^0.2.1-rc.2` 也会选到 0.2.1 正式版。公开 manifest 没有 peer,与消费方自己装的任何 Devkit 版本不冲突(pnpm `--strict-peer-dependencies` 实测)。
|
|
29
|
+
|
|
30
|
+
供给契约在包内 `contract/`:`lib-provision.schema.json`(provider / requirement 两个定义)、`fixtures/provider.json`、`fixtures/consumer.json`,消费方可 `import { describeInstalled, checkSupply } from '@hanamesh/lib-provision/contract/conformance.mjs'` 读出已装包实际提供的 API/CLI/bin 并核对自己的需求。只比较包大版本;`manifestSchema: 1` 是 manifest 数据格式号,不是包 SemVer。
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
import { plan, provision, verify, remove, platformKey } from '@hanamesh/lib-provision';
|
|
34
|
+
|
|
35
|
+
const manifest = JSON.parse(await fs.readFile('node-24.13.1.json', 'utf8'));
|
|
36
|
+
const root = '/Users/me/Library/Application Support/HanaMesh';
|
|
37
|
+
|
|
38
|
+
for (const e of await plan(manifest, { root })) console.log(e.item, e.state); // absent | installed | stale | unsupported
|
|
39
|
+
const results = await provision(manifest, {
|
|
40
|
+
root,
|
|
41
|
+
onProgress: (e) => console.error(e.item, e.phase, e.source, e.bytes, e.total, e.note),
|
|
42
|
+
sourceOrder: ['cn', 'direct'], // 可选:只用这些源、按这个顺序
|
|
43
|
+
});
|
|
44
|
+
await verify({ root }); // 按所有权清单重算摘要、修复账本
|
|
45
|
+
await remove('node', { root }); // 只删清单里列出的文件
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
CLI(进度到 stderr,JSON 结果到 stdout,退出码非 0 = 没做完;不需要 PATH/HOME):
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
hanamesh-provision plan manifest.json --root <dir>
|
|
52
|
+
hanamesh-provision install manifest.json --root <dir> [--source cn]... [--only node]... [--force]
|
|
53
|
+
hanamesh-provision verify --root <dir>
|
|
54
|
+
hanamesh-provision remove node --root <dir>
|
|
55
|
+
hanamesh-provision platform
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
`docs/acceptance/manifests/node-24.13.1.json` 是一份可直接用的 manifest(官方 Node 24.13.1 四平台,摘要来自 `docs/acceptance/raw/nodejs-SHASUMS256.txt`)。
|
|
59
|
+
|
|
60
|
+
## Manifest(调用方给,本库只执行)
|
|
61
|
+
|
|
62
|
+
见 `lib/index.d.ts` 的 `Manifest` 类型。要点:
|
|
63
|
+
|
|
64
|
+
- `sources[]` 按顺序尝试;`kind` 只能是 `https` / `file`,`base` 协议必须一致。`http:`、`ftp:` 等在校验阶段就拒绝;下载时重定向到非 `https:` 也拒绝。
|
|
65
|
+
- 每个 item 的 `platforms[<platformKey>]` 必须带 64 位小写 hex `sha256`,缺了整个 item 拒绝——**不猜摘要**。可选 `size`、`strip`(剥掉的顶层目录层数)、`url`(该资产的绝对 URL,绕过 `sources`)。
|
|
66
|
+
- `installTo` 是 root 内的相对 POSIX 路径,不得进 `.provision/`。
|
|
67
|
+
- `verify.exec` 是解压后树内的相对路径;以**绝对路径**执行**刚解出的**文件,`env` 只有 `PATH=''`(Windows 加 `SystemRoot`),从不用宿主 PATH。
|
|
68
|
+
- 缺当前平台条目的 item 记为 `unsupported`,不报错。
|
|
69
|
+
|
|
70
|
+
## 磁盘布局与原子提升
|
|
71
|
+
|
|
72
|
+
```
|
|
73
|
+
<root>/
|
|
74
|
+
.provision/ledger.json 账本(temp + fsync + rename 原子写)
|
|
75
|
+
.provision/staging/<item>-<sha12>/ 唯一 staging(下载的 archive、.part、.part.json、tree/)
|
|
76
|
+
.provision/trash/<ts>-<item>/ 升级时旧版临时停放(成功后删除;verify 能原样放回)
|
|
77
|
+
.provision/pending/<item>.json 提升进行中的意向记录(verify 据此发现未登账的树)
|
|
78
|
+
<installTo>/ 目标树
|
|
79
|
+
<installTo>.manifest.json 所有权清单:文件清单 + 每文件 sha256 + symlink + 目录
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
提升顺序(每步落盘后才做下一步,任一步失败回滚到旧状态):
|
|
83
|
+
|
|
84
|
+
1. 写 pending 记录;写 `<target>.manifest.json.next`(新清单,temp+fsync+rename)
|
|
85
|
+
2. 若 target 存在:`rename(target → trash/tree)`、`rename(旧清单 → trash/manifest.json)`
|
|
86
|
+
3. `rename(.next → <target>.manifest.json)`
|
|
87
|
+
4. `rename(staging/tree → target)`(跨设备 `EXDEV` 直接报错,不复制)
|
|
88
|
+
5. 原子写账本
|
|
89
|
+
6. 删 trash、删 pending、删 staging
|
|
90
|
+
|
|
91
|
+
被 `kill -9` 打断在任何一步之后的状态都被 `tests/kill.test.mjs` 真实注入过(`HANAMESH_PROVISION_KILL_AT=<checkpoint>`):rename 之前 → target 是旧版或不存在,绝无半棵树,`verify` 把 trash 里的旧版放回;rename 之后账本之前 → 磁盘领先账本,`verify` 按清单重算摘要后补账本。账本永远不会声称磁盘上没有的东西(`consistency.json` 的 boundary,安全侧 = target;顺序反转变异会让 X03 变红)。
|
|
92
|
+
|
|
93
|
+
`remove` 只认 `<target>.manifest.json`:清单没有的文件一律不碰,空目录才删;清单缺失时拒绝删除任何东西。
|
|
94
|
+
|
|
95
|
+
## 续传与换源
|
|
96
|
+
|
|
97
|
+
- https 下载写 `<archive>.part` + `.part.json`(去掉 query 的 URL、etag、总长)。重跑时对同一 URL 发 `Range: bytes=<n>-`(带 `If-Range`);服务端回 200 就从头,416 就丢弃 `.part`。传输失败(断连、5xx)保留 `.part`;摘要不符则删文件、换下一个源;所有源都不行才报错(`E_SHA256` / `E_DOWNLOAD`)。
|
|
98
|
+
- `file:` 源直接复制(离线介质)。
|
|
99
|
+
- 进度事件 `{item, phase, bytes?, total?, source?, note?}`;日志与错误信息里的 URL 一律去掉 query / 凭据。
|
|
100
|
+
|
|
101
|
+
## 安全边界
|
|
102
|
+
|
|
103
|
+
- 只接受 `https:` 与 `file:`;不跟随到非 https 的重定向(最多 10 跳)。
|
|
104
|
+
- 解压:拒绝绝对路径、盘符、`..`、NUL;symlink 目标必须解析在树内;拒绝穿过已建 symlink 写文件;tar 只接受普通文件/目录/symlink/hardlink(hardlink 只能指向本 archive 里已解出的文件);zip 校验 CRC32,只支持 store/deflate,拒绝加密条目。
|
|
105
|
+
- 下载内容永不执行,除 `verify.exec` 指定、且 archive 已过 sha256 的那个文件。
|
|
106
|
+
- 不读 PATH 上的任何东西(`tests/platform.test.mjs` 锁死源码里没有按名 spawn `node`/`npm`/`python`、没有读 `process.env.PATH`)。
|
|
107
|
+
|
|
108
|
+
## Windows
|
|
109
|
+
|
|
110
|
+
所有对外返回的路径经过 `externalPath()`:绝对、规范化、**去掉 `\\?\` / `\\?\UNC\` 前缀**(clawso 教训:带前缀的路径进 PATH 会被命令搜索忽略)。`stripVerbatimPrefix` / `toVerbatimPath` 导出供壳层使用。zip 在 Windows 上没有可执行位这一说,`mode` 记录但不 chmod。真实 Windows 未跑(P07 PLAT NOT_RUN)。
|
|
111
|
+
|
|
112
|
+
## 耐久性说明
|
|
113
|
+
|
|
114
|
+
原子性针对的是**进程终止**(CONSISTENCY.md X02/X03 的级别)。解压时不做逐文件 fsync(Node 树 4500 文件在 APFS 上要 20 s+),清单、账本、目录 rename 都 fsync。整机断电后若树内文件损坏,`verify` 通过清单里的逐文件 sha256 报 `corrupt`,用 `install --force` 重装即可。
|
|
115
|
+
|
|
116
|
+
## 开发
|
|
117
|
+
|
|
118
|
+
```sh
|
|
119
|
+
export npm_config_cache=$(mktemp -d)
|
|
120
|
+
pnpm install --frozen-lockfile # 开发依赖(Devkit 走 Git 子目录,只有 pnpm 能解析)
|
|
121
|
+
npm test # tsc + node --test --test-reporter=tap tests/*.test.mjs(含真实 SIGKILL 注入)
|
|
122
|
+
npm run test:types # tests/types/consumer.ts 用 TS 5.9 严格模式消费 lib/index.d.ts
|
|
123
|
+
npm run test:mutation # devkit:原 6 条变异,输出到卡运行目录
|
|
124
|
+
npm run check:consistency
|
|
125
|
+
node scripts/acceptance-real.mjs p01|p02 # 真实网络(nodejs.org)
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
测试 fixture(`tests/fixtures/https-fixture.mjs`)是本地 HTTPS 服务器(自签证书 `fixture-cert.pem`,测试进程内用 `tls.setDefaultCACertificates` 信任,子进程用 `NODE_EXTRA_CA_CERTS`),支持 Range、可注入错文件 / 断连 / 5xx / 重定向 / 慢速。
|
|
129
|
+
|
|
130
|
+
开发工具 `@hanamesh/devkit` 用 Devkit 源的正常 Git 范围 `git+https://github.com/yzsnstotz/hanamesh-server-shared.git#semver:^0.2.0&path:/packages/devkit` 安装(pnpm 10.33.0,锁在 `pnpm-lock.yaml`),只是 devDependency,不是 peer、不随包分发。`lib/` 提交在仓里,`npm run check:lib` 从 src 重新构建到临时目录并要求与 lib/ 逐字节相同(改了 src 就 `npm run compile` 后提交 lib/;不用 `build` 这个脚本名,因为 npm 的 Git 安装(pacote 21 `lib/git.js`)见到 `build`/`prepare`/`prepack`/`(pre|post)install` 就会在克隆里装开发依赖)。`npm run check` 校验工具链、provision 包策略、consistency 与 lib/;封包后 `npm run verify:pack` 经 devkit 校验纯包 JavaScript、严格 TypeScript、空环境 CLI 与 contract。默认运行目录为 `~/.cache/hanamesh-runs/CONSOLIDATION-03-PROVISION`,可用 `HANAMESH_DEVKIT_RUN_DIR` 覆盖;`HANAMESH_PROVISION_TARBALL` 指定待验归档。运行时依赖仍为零。
|
|
131
|
+
|
|
132
|
+
## 分发记录
|
|
133
|
+
|
|
134
|
+
自有代码已按 D-2026-10-05-02 获准分发。包元数据 `private: false`,`license: SEE LICENSE IN LICENSE` 指向随包的原文授权记录;不新增 MIT 或其他许可。名称、版本、协议、来源、用途见 `THIRD_PARTY_NOTICES.md`。开发用 devkit 0.2.0 来自 Devkit 源已发布 tag v0.2.0 → 8f9bcc69cbacf01d97ffe63bbbade4f865e6dd89(子目录 packages/devkit,CONTRACT-DEVKIT-GIT-SUPPLY-01),四个工具与此前 vendor 的 rc.2 字节相同。它只用于开发,不成为运行时依赖或随业务包分发。
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# 分发与第三方记录
|
|
2
|
+
|
|
3
|
+
`@hanamesh/lib-provision` 0.2.1 没有运行时依赖。tar / zip 读取、CRC32、sha256、HTTP 下载全部基于 Node.js 内置模块(`zlib`、`crypto`、`fs`、`fetch`)。
|
|
4
|
+
|
|
5
|
+
本记录按名称、版本、协议、来源、用途列明真实输入。自有代码的协议栏记录已有分发授权,不新增 SPDX 许可或再许可权利;原文见包内 `LICENSE`。
|
|
6
|
+
|
|
7
|
+
| 名称 | 版本 | 协议 / 依据 | 来源 | 用途 |
|
|
8
|
+
|---|---|---|---|---|
|
|
9
|
+
| @hanamesh/lib-provision | 0.2.1 | HanaMesh 自有代码分发授权 D-2026-10-05-02(非 SPDX;未指定新许可) | https://github.com/yzsnstotz/hanamesh-lib-provision(Git 范围 `#semver:^0.2.1`);业务输入 e8707089409ffd3483fc4c964d6032c370dae634 / rc.3,经 ac2896c1fad2fd0373d80e6a9b2ab6833f79251a / rc.4 | Node 库与 hanamesh-provision CLI 的校验、解包、原子提升及账本 |
|
|
10
|
+
| @hanamesh/devkit | 0.2.0 | SEE LICENSE IN LICENSE;HanaMesh 自有工具分发授权 D-2026-10-05-02 / D-2026-10-05-16;未指定新标准许可或再许可权利,原文见安装包内 LICENSE 与 LICENSE_RECORD.md | https://github.com/yzsnstotz/hanamesh-server-shared;Git 范围 `#semver:^0.2.0&path:/packages/devkit`,锁定 tag v0.2.0 → 8f9bcc69cbacf01d97ffe63bbbade4f865e6dd89(CONTRACT-DEVKIT-GIT-SUPPLY-01) | 开发与包门工具(check-toolchain / preflight / mutations / verify-pack);不随包分发,不是 peer |
|
|
11
|
+
| typescript | 5.9.3 | Apache-2.0(安装包 LICENSE.txt 原文) | https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz | 构建 lib/ 与 .d.ts;不随包分发 |
|
|
12
|
+
| @types/node | 22.19.7 | MIT(安装包 LICENSE 原文) | https://registry.npmjs.org/@types/node/-/node-22.19.7.tgz | 类型声明;不随包分发 |
|
|
13
|
+
| undici-types | 6.21.0 | MIT(安装包 LICENSE 原文) | https://registry.npmjs.org/undici-types/-/undici-types-6.21.0.tgz | @types/node 的锁定传递类型依赖;不随包分发 |
|
|
14
|
+
|
|
15
|
+
第三方类型与编译工具的协议和锁定来源保留不变。devkit 0.2.0 的四个工具与 rc.2 字节相同,private=false、SEE LICENSE IN LICENSE 不变;不将该授权扩展为 MIT 或其他再许可。旧 devkit rc.1 / rc.2 vendor 归档保全于 Git 历史,不同版替换。
|
|
16
|
+
|
|
17
|
+
测试 fixture 的自签证书(`tests/fixtures/fixture-cert.pem` / `fixture-key.pem`)由本仓生成,仅供本地 HTTPS fixture 使用,不随包分发。
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// Thin launcher; the CLI logic lives in lib/cli.js. Needs no PATH, HOME or working directory.
|
|
3
|
+
import { main } from '../lib/cli.js';
|
|
4
|
+
|
|
5
|
+
main(process.argv.slice(2)).then(
|
|
6
|
+
(code) => {
|
|
7
|
+
process.exitCode = code;
|
|
8
|
+
},
|
|
9
|
+
(err) => {
|
|
10
|
+
process.stderr.write(`fatal: ${err instanceof Error ? err.stack ?? err.message : String(err)}\n`);
|
|
11
|
+
process.exitCode = 1;
|
|
12
|
+
},
|
|
13
|
+
);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"module": "lib-provision",
|
|
3
|
+
"groups": [
|
|
4
|
+
{
|
|
5
|
+
"name": "目标树与它的所有权清单",
|
|
6
|
+
"facts": ["target:tree", "ownership-manifest:<target>.manifest.json"],
|
|
7
|
+
"medium": "fs:<root>",
|
|
8
|
+
"why": "树只通过一次 rename(staging/tree → target) 出现或不出现,永无半棵树;清单在 rename 之前以 temp+fsync+rename 落位并只描述这棵树(含每文件 sha256)。rename 前被杀:target 要么是旧版要么不存在(旧版在 .provision/trash 里,verify 原样放回)。"
|
|
9
|
+
}
|
|
10
|
+
],
|
|
11
|
+
"boundaries": [
|
|
12
|
+
{
|
|
13
|
+
"name": "目标树 ↔ 账本 .provision/ledger.json",
|
|
14
|
+
"sides": ["fs:target+ownership-manifest", "fs:.provision/ledger.json"],
|
|
15
|
+
"safeDirection": "target",
|
|
16
|
+
"why": "两个文件不能一次提交。顺序固定为先 rename 树、后写账本:残留只会是「磁盘上已有新树而账本落后」,verify 按所有权清单重算摘要后把账本补齐;绝不允许「账本声称已装而磁盘没有」。单写者(同一 root 同时只跑一个 provision),X03 的真实中断与顺序反转变异见 tests/kill.test.mjs 与 scripts/mutations.mjs。"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"exempt": false
|
|
20
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
- 0.2.0-rc.1 — 正常 Git 范围供给:`prepare` 构建使 `git+https://github.com/yzsnstotz/hanamesh-lib-provision.git#semver:^0.2.0-rc.1` 安装得到含 `lib/` 的完整包;新增 contract/ schema、提供方/消费方 fixture 与一致性检查;业务 API/CLI/manifest schema 1 不变。
|
|
2
|
+
- 0.2.0 — 0.2.0-rc.1 转正式:同一内容,只改版本、tag 与消费方范围 `#semver:^0.2.0`。
|
|
3
|
+
- 0.2.1-rc.1 — 公开 manifest 去掉 `@hanamesh/devkit` 可选精确 peer(它只是开发工具记录,与消费方正常 Devkit 0.2.x 在 pnpm strict 下冲突);`lib/` 随 tag 提交、去掉安装期 `prepare`,Git 消费方不再装本包开发依赖、pnpm 无需 allowlist;自身 Devkit 改走 Devkit 源 `#semver:^0.2.0&path:/packages/devkit`(pnpm),去 vendor。API/CLI/manifest schema 1 不变。
|
|
4
|
+
- 0.2.1-rc.2 — 修 0.2.1-rc.1 的 npm Git 安装:npm(pacote 21)见到 `build` 脚本也会在克隆里装开发依赖、遇 pnpm-only 的 Devkit 子目录说明符 `EINVALIDTAGNAME` 失败;编译脚本改名 `compile`。其余同 0.2.1-rc.1。
|
|
5
|
+
- 0.2.1 — 0.2.1-rc.2 经 AppHost 实际消费回执后转正式:只改版本、tag 与消费方范围 `#semver:^0.2.1` 字段;lib/bin/contract 代码与候选同字节。
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// Supply-contract checks shared by the provider tests and installed consumers. Node built-ins only.
|
|
2
|
+
import {spawnSync} from 'node:child_process';
|
|
3
|
+
import {readFileSync} from 'node:fs';
|
|
4
|
+
import {join} from 'node:path';
|
|
5
|
+
import {pathToFileURL} from 'node:url';
|
|
6
|
+
|
|
7
|
+
export const schema = JSON.parse(readFileSync(new URL('./lib-provision.schema.json', import.meta.url), 'utf8'));
|
|
8
|
+
export const providerFixture = JSON.parse(readFileSync(new URL('./fixtures/provider.json', import.meta.url), 'utf8'));
|
|
9
|
+
export const consumerFixture = JSON.parse(readFileSync(new URL('./fixtures/consumer.json', import.meta.url), 'utf8'));
|
|
10
|
+
|
|
11
|
+
// Validates the subset of JSON Schema the contract file uses: $ref, type, const, pattern, minLength,
|
|
12
|
+
// minimum, required, additionalProperties, properties, items, uniqueItems.
|
|
13
|
+
function check(node, value, at, errors) {
|
|
14
|
+
if (node.$ref !== undefined) return check(schema.$defs[node.$ref.split('/').at(-1)], value, at, errors);
|
|
15
|
+
if ('const' in node && JSON.stringify(value) !== JSON.stringify(node.const)) errors.push(`${at}: must be ${JSON.stringify(node.const)}`);
|
|
16
|
+
const type = Array.isArray(value) ? 'array' : value === null ? 'null' : Number.isInteger(value) ? 'integer' : typeof value;
|
|
17
|
+
if (node.type !== undefined && node.type !== type) return errors.push(`${at}: must be ${node.type}`);
|
|
18
|
+
if (node.pattern !== undefined && !new RegExp(node.pattern, 'u').test(value)) errors.push(`${at}: must match ${node.pattern}`);
|
|
19
|
+
if (node.minLength !== undefined && value.length < node.minLength) errors.push(`${at}: too short`);
|
|
20
|
+
if (node.minimum !== undefined && value < node.minimum) errors.push(`${at}: below ${node.minimum}`);
|
|
21
|
+
if (type === 'array') {
|
|
22
|
+
if (node.uniqueItems && new Set(value).size !== value.length) errors.push(`${at}: items must be unique`);
|
|
23
|
+
if (node.items !== undefined) value.forEach((v, i) => check(node.items, v, `${at}[${i}]`, errors));
|
|
24
|
+
}
|
|
25
|
+
if (type === 'object') {
|
|
26
|
+
for (const key of node.required ?? []) if (!(key in value)) errors.push(`${at}.${key}: required`);
|
|
27
|
+
for (const [key, v] of Object.entries(value)) {
|
|
28
|
+
const sub = node.properties?.[key] ?? node.additionalProperties;
|
|
29
|
+
if (sub === false) errors.push(`${at}.${key}: not allowed`);
|
|
30
|
+
else if (sub !== undefined && sub !== true) check(sub, v, `${at}.${key}`, errors);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return errors;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function validate(kind, value) {
|
|
37
|
+
return check(schema.$defs[kind], value, kind, []);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const major = version => Number(version.split('.')[0]);
|
|
41
|
+
const missing = (need, have) => need.filter(name => !have.includes(name));
|
|
42
|
+
|
|
43
|
+
// Only the major is a compatibility boundary; which minor gets installed is the package manager's range.
|
|
44
|
+
export function checkSupply(provider, requirement) {
|
|
45
|
+
const errors = [...validate('provider', provider), ...validate('requirement', requirement)];
|
|
46
|
+
if (errors.length > 0) return errors;
|
|
47
|
+
if (provider.package !== requirement.package) errors.push(`package ${provider.package} is not ${requirement.package}`);
|
|
48
|
+
if (major(provider.version) !== requirement.major) errors.push(`major ${major(provider.version)} of ${provider.version} is not required major ${requirement.major}`);
|
|
49
|
+
if (provider.source.tag !== `v${provider.version}`) errors.push(`tag ${provider.source.tag} does not name version ${provider.version}`);
|
|
50
|
+
if (provider.manifestSchema !== requirement.manifestSchema) errors.push(`manifest schema ${provider.manifestSchema} is not ${requirement.manifestSchema}`);
|
|
51
|
+
for (const name of missing(requirement.api, provider.api)) errors.push(`api ${name} missing`);
|
|
52
|
+
for (const name of missing(requirement.bin, Object.keys(provider.bin))) errors.push(`bin ${name} missing`);
|
|
53
|
+
for (const name of missing(requirement.cli, provider.cli)) errors.push(`cli command ${name} missing`);
|
|
54
|
+
return errors;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Reads what an installed (or built) package directory actually provides.
|
|
58
|
+
export async function describeInstalled(dir) {
|
|
59
|
+
const pkg = JSON.parse(readFileSync(join(dir, 'package.json'), 'utf8'));
|
|
60
|
+
const mod = await import(pathToFileURL(join(dir, pkg.exports['.'].import)).href);
|
|
61
|
+
const api = Object.keys(mod).sort();
|
|
62
|
+
const accepts = schemaNumber => {
|
|
63
|
+
try { mod.validateManifest({schema: schemaNumber, sources: [], items: []}); return true; } catch { return false; }
|
|
64
|
+
};
|
|
65
|
+
const manifestSchema = [1, 2].filter(accepts);
|
|
66
|
+
const usage = spawnSync(process.execPath, [join(dir, pkg.bin['hanamesh-provision']), 'help'], {env: {}, encoding: 'utf8'});
|
|
67
|
+
if (usage.status !== 0) throw new Error(`hanamesh-provision help exited ${usage.status}: ${usage.stderr}`);
|
|
68
|
+
const cli = [...usage.stdout.matchAll(/^ {2}hanamesh-provision (\w+)/gmu)].map(m => m[1]).sort();
|
|
69
|
+
return {
|
|
70
|
+
package: pkg.name,
|
|
71
|
+
version: pkg.version,
|
|
72
|
+
source: {git: providerFixture.source.git, tag: `v${pkg.version}`},
|
|
73
|
+
exports: Object.keys(pkg.exports).sort(),
|
|
74
|
+
bin: pkg.bin,
|
|
75
|
+
api,
|
|
76
|
+
cli,
|
|
77
|
+
manifestSchema: manifestSchema.length === 1 ? manifestSchema[0] : manifestSchema,
|
|
78
|
+
runtimeDependencies: Object.keys(pkg.dependencies ?? {}).length,
|
|
79
|
+
};
|
|
80
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
{
|
|
2
|
+
"package": "@hanamesh/lib-provision",
|
|
3
|
+
"range": "git+https://github.com/yzsnstotz/hanamesh-lib-provision.git#semver:^0.2.1",
|
|
4
|
+
"major": 0,
|
|
5
|
+
"api": ["isProvisionError", "plan", "platformKey", "provision", "remove", "validateManifest", "verify"],
|
|
6
|
+
"bin": ["hanamesh-provision"],
|
|
7
|
+
"cli": ["install", "plan", "platform", "remove", "verify"],
|
|
8
|
+
"manifestSchema": 1
|
|
9
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"package": "@hanamesh/lib-provision",
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"source": {"git": "git+https://github.com/yzsnstotz/hanamesh-lib-provision.git", "tag": "v0.2.1"},
|
|
5
|
+
"exports": [".", "./contract/*", "./package.json"],
|
|
6
|
+
"bin": {"hanamesh-provision": "bin/hanamesh-provision.js"},
|
|
7
|
+
"api": ["ProvisionError", "externalPath", "isInside", "isProvisionError", "ledger", "ledgerPath", "ownershipPath", "plan", "platformKey", "provision", "redactUrl", "remove", "safeEntrySegments", "safeLinkTarget", "stripVerbatimPrefix", "targetPath", "toVerbatimPath", "validateManifest", "verify"],
|
|
8
|
+
"cli": ["install", "plan", "platform", "remove", "verify"],
|
|
9
|
+
"manifestSchema": 1,
|
|
10
|
+
"runtimeDependencies": 0
|
|
11
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://github.com/yzsnstotz/hanamesh-lib-provision/contract/lib-provision.schema.json",
|
|
4
|
+
"title": "@hanamesh/lib-provision supply contract",
|
|
5
|
+
"description": "provider: what one released version actually ships. requirement: what a consumer needs. version is the package SemVer; manifestSchema is the provision manifest data format number and is never compared as SemVer.",
|
|
6
|
+
"$defs": {
|
|
7
|
+
"names": {"type": "array", "items": {"type": "string", "minLength": 1}, "uniqueItems": true},
|
|
8
|
+
"provider": {
|
|
9
|
+
"type": "object",
|
|
10
|
+
"required": ["package", "version", "source", "exports", "bin", "api", "cli", "manifestSchema", "runtimeDependencies"],
|
|
11
|
+
"additionalProperties": false,
|
|
12
|
+
"properties": {
|
|
13
|
+
"package": {"const": "@hanamesh/lib-provision"},
|
|
14
|
+
"version": {"type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+(-[0-9A-Za-z.]+)?$"},
|
|
15
|
+
"source": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"required": ["git", "tag"],
|
|
18
|
+
"additionalProperties": false,
|
|
19
|
+
"properties": {
|
|
20
|
+
"git": {"const": "git+https://github.com/yzsnstotz/hanamesh-lib-provision.git"},
|
|
21
|
+
"tag": {"type": "string", "pattern": "^v\\d+\\.\\d+\\.\\d+(-[0-9A-Za-z.]+)?$"}
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"exports": {"$ref": "#/$defs/names"},
|
|
25
|
+
"bin": {"type": "object", "additionalProperties": {"type": "string"}},
|
|
26
|
+
"api": {"$ref": "#/$defs/names"},
|
|
27
|
+
"cli": {"$ref": "#/$defs/names"},
|
|
28
|
+
"manifestSchema": {"const": 1},
|
|
29
|
+
"runtimeDependencies": {"const": 0}
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
"requirement": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"required": ["package", "range", "major", "api", "bin", "cli", "manifestSchema"],
|
|
35
|
+
"additionalProperties": false,
|
|
36
|
+
"properties": {
|
|
37
|
+
"package": {"const": "@hanamesh/lib-provision"},
|
|
38
|
+
"range": {"type": "string", "pattern": "^git\\+https://github\\.com/yzsnstotz/hanamesh-lib-provision\\.git#semver:"},
|
|
39
|
+
"major": {"type": "integer", "minimum": 0},
|
|
40
|
+
"api": {"$ref": "#/$defs/names"},
|
|
41
|
+
"bin": {"$ref": "#/$defs/names"},
|
|
42
|
+
"cli": {"$ref": "#/$defs/names"},
|
|
43
|
+
"manifestSchema": {"const": 1}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@hanamesh/lib-provision",
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"description": "Safely place a large file on the user's machine: source selection, resumable download, sha256, sandboxed extraction, atomic promotion, ledger.",
|
|
5
|
+
"private": false,
|
|
6
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"engines": {
|
|
9
|
+
"node": ">=24.13.1 <25"
|
|
10
|
+
},
|
|
11
|
+
"bin": {
|
|
12
|
+
"hanamesh-provision": "bin/hanamesh-provision.js"
|
|
13
|
+
},
|
|
14
|
+
"exports": {
|
|
15
|
+
".": {
|
|
16
|
+
"types": "./lib/index.d.ts",
|
|
17
|
+
"import": "./lib/index.js"
|
|
18
|
+
},
|
|
19
|
+
"./contract/*": "./contract/*",
|
|
20
|
+
"./package.json": "./package.json"
|
|
21
|
+
},
|
|
22
|
+
"types": "./lib/index.d.ts",
|
|
23
|
+
"files": [
|
|
24
|
+
"lib/",
|
|
25
|
+
"bin/",
|
|
26
|
+
"README.md",
|
|
27
|
+
"THIRD_PARTY_NOTICES.md",
|
|
28
|
+
"consistency.json",
|
|
29
|
+
"contract/",
|
|
30
|
+
"LICENSE"
|
|
31
|
+
],
|
|
32
|
+
"scripts": {
|
|
33
|
+
"compile": "tsc -p tsconfig.json",
|
|
34
|
+
"pretest": "tsc -p tsconfig.json",
|
|
35
|
+
"test": "node --test --test-reporter=tap tests/*.test.mjs",
|
|
36
|
+
"test:types": "tsc -p tests/types/tsconfig.json",
|
|
37
|
+
"test:mutation": "node scripts/mutations.mjs",
|
|
38
|
+
"check:consistency": "node scripts/check-consistency.mjs",
|
|
39
|
+
"check:lib": "node scripts/check-lib.mjs",
|
|
40
|
+
"check": "hanamesh-devkit check-toolchain && hanamesh-devkit preflight && node scripts/check-consistency.mjs && node scripts/check-lib.mjs",
|
|
41
|
+
"verify:pack": "bash scripts/verify-artifact.sh",
|
|
42
|
+
"preflight": "hanamesh-devkit preflight"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@types/node": "22.19.7",
|
|
46
|
+
"typescript": "5.9.3",
|
|
47
|
+
"undici-types": "6.21.0",
|
|
48
|
+
"@hanamesh/devkit": "git+https://github.com/yzsnstotz/hanamesh-server-shared.git#semver:^0.2.0&path:/packages/devkit"
|
|
49
|
+
}
|
|
50
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanamesh/dsh-app-host",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "HanaMesh application ownership, durable view leases, and application library for official DSH 0.2.
|
|
3
|
+
"version": "0.6.14",
|
|
4
|
+
"description": "HanaMesh application ownership, durable view leases, and application library for official DSH 0.2.x",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
7
7
|
"repository": {
|
|
@@ -31,6 +31,23 @@
|
|
|
31
31
|
"./client-ui": {
|
|
32
32
|
"types": "./dist/client-ui.d.ts",
|
|
33
33
|
"default": "./dist/client-ui.js"
|
|
34
|
+
},
|
|
35
|
+
"./install-target/suite": {
|
|
36
|
+
"types": "./dist/install-target/suite.d.ts",
|
|
37
|
+
"default": "./dist/install-target/suite.js"
|
|
38
|
+
},
|
|
39
|
+
"./install-target/schema.json": "./schemas/install-target.schema.json",
|
|
40
|
+
"./install-target/fixtures/*": "./dist/install-target/fixtures/*",
|
|
41
|
+
"./catalog/suite": {
|
|
42
|
+
"types": "./dist/catalog/suite.d.ts",
|
|
43
|
+
"default": "./dist/catalog/suite.js"
|
|
44
|
+
},
|
|
45
|
+
"./catalog/fixtures/*": "./dist/catalog/fixtures/*",
|
|
46
|
+
"./catalog/schema/manifest.json": "./schemas/catalog-source.schema.json",
|
|
47
|
+
"./catalog/schema/page.json": "./schemas/catalog-provider-page.schema.json",
|
|
48
|
+
"./installation-status": {
|
|
49
|
+
"types": "./dist/installation-status.d.ts",
|
|
50
|
+
"default": "./dist/installation-status.js"
|
|
34
51
|
}
|
|
35
52
|
},
|
|
36
53
|
"files": [
|
|
@@ -46,18 +63,32 @@
|
|
|
46
63
|
"docs/PROVENANCE.json",
|
|
47
64
|
"docs/LICENSES.json",
|
|
48
65
|
"schemas",
|
|
49
|
-
"profile"
|
|
66
|
+
"profile",
|
|
67
|
+
"docs/INSTALL_TARGET.md",
|
|
68
|
+
"docs/DSH_COMPATIBILITY.md",
|
|
69
|
+
"docs/INSTALLATION_STATUS.md"
|
|
50
70
|
],
|
|
51
71
|
"scripts": {
|
|
52
72
|
"build": "node scripts/build.mjs",
|
|
53
|
-
"test": "node --test --test-concurrency=1 tests/*.test.mjs",
|
|
54
|
-
"test:
|
|
73
|
+
"test": "node scripts/safe-git.mjs node --test --test-reporter=tap --test-concurrency=1 tests/*.test.mjs",
|
|
74
|
+
"test:contract": "pnpm run build && node --test --test-reporter=tap --test-concurrency=1 tests/install-target-contract.test.mjs tests/catalog-major-compat.test.mjs",
|
|
75
|
+
"test:mutation": "node scripts/safe-git.mjs node scripts/mutations.mjs",
|
|
55
76
|
"test:types": "tsc --noEmit --strict --target ES2022 --module NodeNext --moduleResolution NodeNext tests/consumer.mts",
|
|
56
|
-
"
|
|
77
|
+
"test:native-driver": "node scripts/safe-git.mjs node --test --test-reporter=tap tests/native/driver.test.mjs",
|
|
78
|
+
"check": "node scripts/safe-git.mjs node scripts/check.mjs",
|
|
57
79
|
"prepack": "npm run build",
|
|
58
80
|
"demo": "node examples/demo.mjs",
|
|
59
81
|
"preflight:dsh": "node scripts/preflight-dsh.mjs",
|
|
60
|
-
"check:consistency": "node scripts/check-consistency.mjs"
|
|
82
|
+
"check:consistency": "node scripts/check-consistency.mjs",
|
|
83
|
+
"check:toolchain": "node scripts/check-toolchain.mjs",
|
|
84
|
+
"preflight": "node scripts/preflight.mjs",
|
|
85
|
+
"verify:pack": "node scripts/safe-git.mjs node scripts/verify-package.mjs",
|
|
86
|
+
"check:devkit-supply": "node scripts/check-devkit-consumption.mjs",
|
|
87
|
+
"check:provision-supply": "node scripts/check-provision-consumption.mjs",
|
|
88
|
+
"install:safe": "node scripts/safe-git.mjs pnpm install --frozen-lockfile",
|
|
89
|
+
"release:check": "hanamesh-release check --lockfile pnpm-lock.yaml",
|
|
90
|
+
"release:publish": "hanamesh-release publish --lockfile pnpm-lock.yaml",
|
|
91
|
+
"prepublishOnly": "hanamesh-release source-guard"
|
|
61
92
|
},
|
|
62
93
|
"dsh": {
|
|
63
94
|
"bundle": {
|
|
@@ -65,7 +96,7 @@
|
|
|
65
96
|
},
|
|
66
97
|
"client": {
|
|
67
98
|
"inject": [
|
|
68
|
-
"@deepseek-ai/dsh-client-ui-
|
|
99
|
+
"@deepseek-ai/dsh-client-ui-renderer",
|
|
69
100
|
"@deepseek-ai/dsh-client-ui-settings",
|
|
70
101
|
"@deepseek-ai/dsh-client-locale"
|
|
71
102
|
],
|
|
@@ -76,37 +107,54 @@
|
|
|
76
107
|
}
|
|
77
108
|
},
|
|
78
109
|
"dependencies": {
|
|
79
|
-
"zod": "4.5.4"
|
|
110
|
+
"zod": "4.5.4",
|
|
111
|
+
"@hanamesh/lib-provision": "file:vendor/hanamesh-lib-provision-0.2.1.tgz",
|
|
112
|
+
"semver": "7.8.5"
|
|
80
113
|
},
|
|
81
114
|
"peerDependencies": {
|
|
82
|
-
"@deepseek-ai/cordis": "4.0.4",
|
|
83
|
-
"@deepseek-ai/dsh-storage-domain": "0.2.0-rc.2",
|
|
84
|
-
"@deepseek-ai/schemastery": "3.18.4",
|
|
85
|
-
"@deepseek-ai/dsh-host-webserver": "0.2.0-rc.2",
|
|
86
|
-
"@deepseek-ai/dsh-client-connection": "0.2.0-rc.2",
|
|
87
|
-
"@deepseek-ai/dsh-client-ui-
|
|
88
|
-
"@deepseek-ai/dsh-client-ui-settings": "0.2.0-rc.2",
|
|
89
|
-
"@deepseek-ai/dsh-client-locale": "0.2.0-rc.2",
|
|
90
|
-
"react": "18.3.1"
|
|
115
|
+
"@deepseek-ai/cordis": ">=4.0.4 <4.1.0-0 || >=4.0.5-alpha.1 <4.1.0-0",
|
|
116
|
+
"@deepseek-ai/dsh-storage-domain": ">=0.2.0-rc.2 <0.3.0-0 || >=0.2.1-0 <0.3.0-0",
|
|
117
|
+
"@deepseek-ai/schemastery": ">=3.18.4 <3.19.0-0 || >=3.18.5-alpha.1 <3.19.0-0",
|
|
118
|
+
"@deepseek-ai/dsh-host-webserver": ">=0.2.0-rc.2 <0.3.0-0 || >=0.2.1-0 <0.3.0-0",
|
|
119
|
+
"@deepseek-ai/dsh-client-connection": ">=0.2.0-rc.2 <0.3.0-0 || >=0.2.1-0 <0.3.0-0",
|
|
120
|
+
"@deepseek-ai/dsh-client-ui-renderer": ">=0.2.0-rc.2 <0.3.0-0 || >=0.2.1-0 <0.3.0-0",
|
|
121
|
+
"@deepseek-ai/dsh-client-ui-settings": ">=0.2.0-rc.2 <0.3.0-0 || >=0.2.1-0 <0.3.0-0",
|
|
122
|
+
"@deepseek-ai/dsh-client-locale": ">=0.2.0-rc.2 <0.3.0-0 || >=0.2.1-0 <0.3.0-0",
|
|
123
|
+
"react": "^18.3.1"
|
|
91
124
|
},
|
|
92
125
|
"hanamesh": {
|
|
93
126
|
"module": "app-host",
|
|
94
127
|
"contractVersion": 1,
|
|
95
|
-
"dshTarget": "0.2.0-rc.2",
|
|
96
|
-
"upstreamFilesModified": 0
|
|
128
|
+
"dshTarget": ">=0.2.0-rc.2 <0.3.0-0 || >=0.2.1-0 <0.3.0-0",
|
|
129
|
+
"upstreamFilesModified": 0,
|
|
130
|
+
"installTarget": {
|
|
131
|
+
"contract": "hanamesh.install-target",
|
|
132
|
+
"contractVersion": "1",
|
|
133
|
+
"supported": [
|
|
134
|
+
"1"
|
|
135
|
+
],
|
|
136
|
+
"schema": "./schemas/install-target.schema.json"
|
|
137
|
+
}
|
|
97
138
|
},
|
|
98
139
|
"devDependencies": {
|
|
99
|
-
"@deepseek-ai/cordis": "4.0.
|
|
100
|
-
"@deepseek-ai/dsh-host-webserver": "0.2.
|
|
101
|
-
"@deepseek-ai/dsh-scope": "0.2.
|
|
102
|
-
"@deepseek-ai/dsh-session": "0.2.
|
|
103
|
-
"@deepseek-ai/dsh-session-persistence": "0.2.
|
|
104
|
-
"@deepseek-ai/dsh-session-persistence-jsonl": "0.2.
|
|
105
|
-
"@deepseek-ai/dsh-session-projection": "0.2.
|
|
106
|
-
"@deepseek-ai/dsh-storage": "0.2.
|
|
107
|
-
"@deepseek-ai/dsh-storage-domain": "0.2.
|
|
108
|
-
"@deepseek-ai/dsh-storage-json": "0.2.
|
|
109
|
-
"@deepseek-ai/schemastery": "3.18.
|
|
110
|
-
"typescript": "5.8.3"
|
|
111
|
-
|
|
140
|
+
"@deepseek-ai/cordis": "4.0.5-alpha.1",
|
|
141
|
+
"@deepseek-ai/dsh-host-webserver": "0.2.1-alpha.2",
|
|
142
|
+
"@deepseek-ai/dsh-scope": "0.2.1-alpha.2",
|
|
143
|
+
"@deepseek-ai/dsh-session": "0.2.1-alpha.2",
|
|
144
|
+
"@deepseek-ai/dsh-session-persistence": "0.2.1-alpha.2",
|
|
145
|
+
"@deepseek-ai/dsh-session-persistence-jsonl": "0.2.1-alpha.2",
|
|
146
|
+
"@deepseek-ai/dsh-session-projection": "0.2.1-alpha.2",
|
|
147
|
+
"@deepseek-ai/dsh-storage": "0.2.1-alpha.2",
|
|
148
|
+
"@deepseek-ai/dsh-storage-domain": "0.2.1-alpha.2",
|
|
149
|
+
"@deepseek-ai/dsh-storage-json": "0.2.1-alpha.2",
|
|
150
|
+
"@deepseek-ai/schemastery": "3.18.5-alpha.1",
|
|
151
|
+
"typescript": "5.8.3",
|
|
152
|
+
"@hanamesh/devkit": "file:vendor/hanamesh-devkit-0.2.3.tgz",
|
|
153
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.2.1-alpha.2",
|
|
154
|
+
"@hanamesh/release-platform-gate": "file:vendor/hanamesh-release-platform-gate-0.1.9.tgz"
|
|
155
|
+
},
|
|
156
|
+
"packageManager": "pnpm@10.33.0",
|
|
157
|
+
"bundleDependencies": [
|
|
158
|
+
"@hanamesh/lib-provision"
|
|
159
|
+
]
|
|
112
160
|
}
|