skill-family-harness-node 0.1.0 → 0.1.2
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/CONTRIBUTING.md +12 -2
- package/README.md +17 -3
- package/SECURITY.md +9 -5
- package/package.json +17 -17
package/CONTRIBUTING.md
CHANGED
|
@@ -7,8 +7,18 @@ Git 写操作的授权边界见仓库内文档站的生命周期指南(`docs/g
|
|
|
7
7
|
拓扑说明:本工作区仓永久 private,是唯一开发真源;三个 public 仓
|
|
8
8
|
(`skill-family-contracts`、`skill-family-harness-node`、
|
|
9
9
|
`skill-family-engineering-kit`)是版本化发布镜像,不承载完整开发历史与
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
测试。本指南描述的是私有工作区内经授权的开发流程;消费坐标与发布状态
|
|
11
|
+
唯一见 `docs/status/current.md`。
|
|
12
|
+
|
|
13
|
+
## Bug 报告与 Issue
|
|
14
|
+
|
|
15
|
+
普通 bug 报告欢迎通过各 public 发布镜像仓的 GitHub Issues 提交(例如
|
|
16
|
+
`https://github.com/ifoohoo/skill-family-engineering-kit/issues`)。提交
|
|
17
|
+
bug 报告时请尽量提供:受影响包与版本、最小复现步骤、预期与实际行为。
|
|
18
|
+
|
|
19
|
+
**未经事先讨论的 Pull Request 不予接受。** 如果你希望贡献代码,请先
|
|
20
|
+
通过 Issue 讨论变更的动机与范围,获得维护者确认后再提交 PR。这是为了
|
|
21
|
+
避免重复劳动、确保变更与本项目的架构裁决和发布合同一致。
|
|
12
22
|
|
|
13
23
|
## 本地安装
|
|
14
24
|
|
package/README.md
CHANGED
|
@@ -39,7 +39,7 @@ Contracts 机制协议的**唯一默认 Node 实现**。这是一个薄运行时
|
|
|
39
39
|
3. 符号链接逃逸:末位组件是指向根外的符号链接(或断链)→ `symlink-escape`。
|
|
40
40
|
4. 真实路径逃逸:任一中间符号链接链的规范化结果离开根 → `realpath-escape`。
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
比较是基于 `realpath` 之后的规范根,避免 macOS `/var → /private/var` 一类系统级符号链接造成误判。
|
|
43
43
|
|
|
44
44
|
## 测试
|
|
45
45
|
|
|
@@ -49,14 +49,28 @@ Contracts 机制协议的**唯一默认 Node 实现**。这是一个薄运行时
|
|
|
49
49
|
|
|
50
50
|
```sh
|
|
51
51
|
npm install skill-family-harness-node
|
|
52
|
+
npm info skill-family-harness-node --help
|
|
52
53
|
```
|
|
53
54
|
|
|
54
55
|
## 最小示例
|
|
55
56
|
|
|
56
57
|
```js
|
|
57
|
-
//
|
|
58
|
+
// 从空目录运行:npm install skill-family-harness-node
|
|
58
59
|
import { validateContractDocument } from "skill-family-harness-node";
|
|
59
|
-
|
|
60
|
+
|
|
61
|
+
const document = {
|
|
62
|
+
schemaVersion: 1,
|
|
63
|
+
kind: "skill-family.project-manifest",
|
|
64
|
+
project: { id: "my-project", name: "My Project", description: "Example" },
|
|
65
|
+
contracts: { version: "1.0.0", profile: "generic" },
|
|
66
|
+
managedFiles: ["package.json"],
|
|
67
|
+
updatedAt: "2026-01-01T00:00:00Z",
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
const result = validateContractDocument(document, {
|
|
71
|
+
schemaId: "https://contracts.skill-family.example/v1/project-manifest.json",
|
|
72
|
+
});
|
|
73
|
+
if (!result.valid) console.error(result.errorCode);
|
|
60
74
|
```
|
|
61
75
|
|
|
62
76
|
## 故障诊断
|
package/SECURITY.md
CHANGED
|
@@ -12,11 +12,15 @@
|
|
|
12
12
|
## 报告漏洞
|
|
13
13
|
|
|
14
14
|
请勿通过公开 issue 直接披露未修复的安全漏洞。private workspace 仓永久
|
|
15
|
-
private
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
private,不是公开报告渠道;请通过以下渠道私下报告:
|
|
16
|
+
|
|
17
|
+
1. **首选**:通过任一 public 发布镜像仓(例如
|
|
18
|
+
`https://github.com/ifoohoo/skill-family-engineering-kit`)在 GitHub 上使用
|
|
19
|
+
**Private vulnerability reporting**(仓库 Security 页签的
|
|
20
|
+
"Report a vulnerability");
|
|
21
|
+
2. **备选**:如上述通道不可用,请通过邮件联系仓库维护者
|
|
22
|
+
(`ifoohoo` GitHub 组织的 `security` 团队,或仓库 `README.md` 中列出的
|
|
23
|
+
维护者邮箱)。
|
|
20
24
|
|
|
21
25
|
报告时请尽量提供:
|
|
22
26
|
|
package/package.json
CHANGED
|
@@ -1,35 +1,35 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"version": "0.1.0",
|
|
4
|
-
"private": false,
|
|
5
|
-
"description": "Thin Node.js mechanism runtime for Skill Family engineering contracts.",
|
|
2
|
+
"//": "~~ Generated by projen. To modify, edit .projenrc.js and run \"npx projen\".",
|
|
6
3
|
"author": "广州市风荷科技有限公司",
|
|
7
|
-
"license": "Apache-2.0",
|
|
8
|
-
"repository": {
|
|
9
|
-
"type": "git",
|
|
10
|
-
"url": "https://github.com/ifoohoo/skill-family-harness-node.git"
|
|
11
|
-
},
|
|
12
|
-
"homepage": "https://github.com/ifoohoo/skill-family-harness-node",
|
|
13
4
|
"bugs": {
|
|
14
5
|
"url": "https://github.com/ifoohoo/skill-family-harness-node/issues"
|
|
15
6
|
},
|
|
16
|
-
"
|
|
7
|
+
"dependencies": {
|
|
8
|
+
"skill-family-contracts": "0.1.2"
|
|
9
|
+
},
|
|
10
|
+
"description": "Thin Node.js mechanism runtime for Skill Family engineering contracts.",
|
|
17
11
|
"engines": {
|
|
18
12
|
"node": ">=22.22.2 <23"
|
|
19
13
|
},
|
|
20
14
|
"exports": "./src/index.mjs",
|
|
21
|
-
"dependencies": {
|
|
22
|
-
"skill-family-contracts": "0.1.0"
|
|
23
|
-
},
|
|
24
15
|
"files": [
|
|
25
16
|
"src",
|
|
26
17
|
"SECURITY.md",
|
|
27
18
|
"CONTRIBUTING.md",
|
|
28
19
|
"CODE_OF_CONDUCT.md"
|
|
29
20
|
],
|
|
30
|
-
"
|
|
21
|
+
"homepage": "https://github.com/ifoohoo/skill-family-harness-node",
|
|
22
|
+
"license": "Apache-2.0",
|
|
23
|
+
"name": "skill-family-harness-node",
|
|
24
|
+
"private": false,
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "https://github.com/ifoohoo/skill-family-harness-node.git"
|
|
28
|
+
},
|
|
29
|
+
"type": "module",
|
|
30
|
+
"version": "0.1.2",
|
|
31
31
|
"scripts": {
|
|
32
|
-
"check": "node --
|
|
33
|
-
"test": "node --
|
|
32
|
+
"check": "node --input-type=module -e \"import('./src/index.mjs').then(() => console.log('smoke ok')).catch(e => { console.error(e); process.exit(1) })\"",
|
|
33
|
+
"test": "node --input-type=module -e \"import('./src/index.mjs').then(() => console.log('smoke ok')).catch(e => { console.error(e); process.exit(1) })\""
|
|
34
34
|
}
|
|
35
35
|
}
|