@riconext/hermes-repo 0.1.0
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 +21 -0
- package/README.md +2 -0
- package/dist/cli.js +41 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.cjs +8 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +6 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -0
- package/package.json +69 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Rico
|
|
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
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
# hermes-repo
|
|
2
|
+
Hermes-repo 是面向任意 Git 仓库的命令行工具,将 Hermes 式「经验 → 技能 → 自改进」学习闭环映射到文档与团队约定:通过 `init` 生成 `.evolve/captures` 与可选的 `docs/evolves` 树,用 Markdown 模板沉淀纠错、审查与根因;`validate` 检查元数据与引用路径,`doctor` 按 preset 对齐 AGENTS、OpenSpec、Cursor 规则等常见布局。无服务端、不自动改规范、不替代 IDE 里的 AI;升级经 Pull Request,由人审批。主打「Hermes 能力装进 repo」——可挂 CI、跨栈复用,适合希望统一「踩坑有记录、契约能升级、 对外能讲清 Hermes 式闭环」的研发与平台团队。
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
// src/cli.ts
|
|
4
|
+
import { readFileSync } from "fs";
|
|
5
|
+
import { dirname, join } from "path";
|
|
6
|
+
import { fileURLToPath } from "url";
|
|
7
|
+
|
|
8
|
+
// src/index.ts
|
|
9
|
+
var PACKAGE_NAME = "@riconext/hermes-repo";
|
|
10
|
+
|
|
11
|
+
// src/cli.ts
|
|
12
|
+
function readPkgVersion() {
|
|
13
|
+
const root = join(dirname(fileURLToPath(import.meta.url)), "..", "package.json");
|
|
14
|
+
const raw = readFileSync(root, "utf8");
|
|
15
|
+
const pkg = JSON.parse(raw);
|
|
16
|
+
return typeof pkg.version === "string" ? pkg.version : "0.0.0";
|
|
17
|
+
}
|
|
18
|
+
var version = readPkgVersion();
|
|
19
|
+
var argv = process.argv.slice(2);
|
|
20
|
+
var cmd = argv[0];
|
|
21
|
+
if (cmd === "-v" || cmd === "--version") {
|
|
22
|
+
process.stdout.write(`${version}
|
|
23
|
+
`);
|
|
24
|
+
process.exit(0);
|
|
25
|
+
}
|
|
26
|
+
if (cmd === "-h" || cmd === "--help" || cmd === void 0) {
|
|
27
|
+
process.stdout.write(`${PACKAGE_NAME} v${version}
|
|
28
|
+
|
|
29
|
+
\u7528\u6CD5:
|
|
30
|
+
hermes-repo \u663E\u793A\u672C\u5E2E\u52A9
|
|
31
|
+
hermes-repo --version \u663E\u793A\u7248\u672C
|
|
32
|
+
|
|
33
|
+
\u540E\u7EED\u5C06\u63D0\u4F9B init / validate / doctor \u7B49\u5B50\u547D\u4EE4\uFF08\u89C1\u4ED3\u5E93 docs\uFF09\u3002
|
|
34
|
+
`);
|
|
35
|
+
process.exit(cmd === void 0 ? 0 : 0);
|
|
36
|
+
}
|
|
37
|
+
process.stderr.write(`\u672A\u77E5\u547D\u4EE4: ${cmd}
|
|
38
|
+
\u8BF7\u4F7F\u7528 hermes-repo --help
|
|
39
|
+
`);
|
|
40
|
+
process.exit(1);
|
|
41
|
+
//# sourceMappingURL=cli.js.map
|
package/dist/cli.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/cli.ts","../src/index.ts"],"sourcesContent":["import { readFileSync } from \"node:fs\";\nimport { dirname, join } from \"node:path\";\nimport { fileURLToPath } from \"node:url\";\n\nimport { PACKAGE_NAME } from \"./index.js\";\n\nfunction readPkgVersion(): string {\n const root = join(dirname(fileURLToPath(import.meta.url)), \"..\", \"package.json\");\n const raw = readFileSync(root, \"utf8\");\n const pkg = JSON.parse(raw) as { version?: string };\n return typeof pkg.version === \"string\" ? pkg.version : \"0.0.0\";\n}\n\nconst version = readPkgVersion();\nconst argv = process.argv.slice(2);\nconst cmd = argv[0];\n\nif (cmd === \"-v\" || cmd === \"--version\") {\n process.stdout.write(`${version}\\n`);\n process.exit(0);\n}\n\nif (cmd === \"-h\" || cmd === \"--help\" || cmd === undefined) {\n process.stdout.write(`${PACKAGE_NAME} v${version}\n\n用法:\n hermes-repo 显示本帮助\n hermes-repo --version 显示版本\n\n后续将提供 init / validate / doctor 等子命令(见仓库 docs)。\n`);\n process.exit(cmd === undefined ? 0 : 0);\n}\n\nprocess.stderr.write(`未知命令: ${cmd}\\n请使用 hermes-repo --help\\n`);\nprocess.exit(1);\n","/**\n * @riconext/hermes-repo — 库入口(CLI 见 `hermes-repo` bin)。\n */\n\nexport const PACKAGE_NAME = \"@riconext/hermes-repo\" as const;\n"],"mappings":";;;AAAA,SAAS,oBAAoB;AAC7B,SAAS,SAAS,YAAY;AAC9B,SAAS,qBAAqB;;;ACEvB,IAAM,eAAe;;;ADE5B,SAAS,iBAAyB;AAChC,QAAM,OAAO,KAAK,QAAQ,cAAc,YAAY,GAAG,CAAC,GAAG,MAAM,cAAc;AAC/E,QAAM,MAAM,aAAa,MAAM,MAAM;AACrC,QAAM,MAAM,KAAK,MAAM,GAAG;AAC1B,SAAO,OAAO,IAAI,YAAY,WAAW,IAAI,UAAU;AACzD;AAEA,IAAM,UAAU,eAAe;AAC/B,IAAM,OAAO,QAAQ,KAAK,MAAM,CAAC;AACjC,IAAM,MAAM,KAAK,CAAC;AAElB,IAAI,QAAQ,QAAQ,QAAQ,aAAa;AACvC,UAAQ,OAAO,MAAM,GAAG,OAAO;AAAA,CAAI;AACnC,UAAQ,KAAK,CAAC;AAChB;AAEA,IAAI,QAAQ,QAAQ,QAAQ,YAAY,QAAQ,QAAW;AACzD,UAAQ,OAAO,MAAM,GAAG,YAAY,KAAK,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,CAOjD;AACC,UAAQ,KAAK,QAAQ,SAAY,IAAI,CAAC;AACxC;AAEA,QAAQ,OAAO,MAAM,6BAAS,GAAG;AAAA;AAAA,CAA4B;AAC7D,QAAQ,KAAK,CAAC;","names":[]}
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";;;AAIO,IAAM,YAAA,GAAe","file":"index.cjs","sourcesContent":["/**\n * @riconext/hermes-repo — 库入口(CLI 见 `hermes-repo` bin)。\n */\n\nexport const PACKAGE_NAME = \"@riconext/hermes-repo\" as const;\n"]}
|
package/dist/index.d.cts
ADDED
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"names":[],"mappings":";AAIO,IAAM,YAAA,GAAe","file":"index.js","sourcesContent":["/**\n * @riconext/hermes-repo — 库入口(CLI 见 `hermes-repo` bin)。\n */\n\nexport const PACKAGE_NAME = \"@riconext/hermes-repo\" as const;\n"]}
|
package/package.json
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@riconext/hermes-repo",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Hermes-repo 是面向任意 Git 仓库的命令行工具,将 Hermes 式「经验 → 技能 → 自改进」学习闭环映射到文档与团队约定的工具,适合希望统一「踩坑有记录、契约能升级、 规范能进化」的研发与平台团队。",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": {
|
|
7
|
+
"name": "Rico",
|
|
8
|
+
"url": "https://github.com/ricoNext"
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/ricoNext/hermes-repo.git"
|
|
13
|
+
},
|
|
14
|
+
"homepage": "https://github.com/ricoNext/hermes-repo#readme",
|
|
15
|
+
"bugs": {
|
|
16
|
+
"url": "https://github.com/ricoNext/hermes-repo/issues"
|
|
17
|
+
},
|
|
18
|
+
"type": "module",
|
|
19
|
+
"main": "./dist/index.cjs",
|
|
20
|
+
"module": "./dist/index.js",
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"exports": {
|
|
23
|
+
".": {
|
|
24
|
+
"import": {
|
|
25
|
+
"types": "./dist/index.d.ts",
|
|
26
|
+
"default": "./dist/index.js"
|
|
27
|
+
},
|
|
28
|
+
"require": {
|
|
29
|
+
"types": "./dist/index.d.cts",
|
|
30
|
+
"default": "./dist/index.cjs"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"./package.json": "./package.json"
|
|
34
|
+
},
|
|
35
|
+
"bin": {
|
|
36
|
+
"hermes-repo": "./dist/cli.js"
|
|
37
|
+
},
|
|
38
|
+
"files": [
|
|
39
|
+
"dist",
|
|
40
|
+
"README.md",
|
|
41
|
+
"LICENSE"
|
|
42
|
+
],
|
|
43
|
+
"sideEffects": false,
|
|
44
|
+
"engines": {
|
|
45
|
+
"node": ">=18"
|
|
46
|
+
},
|
|
47
|
+
"publishConfig": {
|
|
48
|
+
"access": "public"
|
|
49
|
+
},
|
|
50
|
+
"scripts": {
|
|
51
|
+
"build": "tsup",
|
|
52
|
+
"prepublishOnly": "npm run build",
|
|
53
|
+
"dev": "tsup --watch",
|
|
54
|
+
"typecheck": "tsc --noEmit"
|
|
55
|
+
},
|
|
56
|
+
"keywords": [
|
|
57
|
+
"hermes-repo",
|
|
58
|
+
"evolve",
|
|
59
|
+
"git",
|
|
60
|
+
"cli",
|
|
61
|
+
"documentation",
|
|
62
|
+
"captures"
|
|
63
|
+
],
|
|
64
|
+
"devDependencies": {
|
|
65
|
+
"@types/node": "^22.10.0",
|
|
66
|
+
"tsup": "^8.5.0",
|
|
67
|
+
"typescript": "^5.9.0"
|
|
68
|
+
}
|
|
69
|
+
}
|