@hjxarthuratlas/claw-notify 0.0.0-stage → 2.0.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.
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env node
2
+ // claw-notify 的 npm 启动器:按平台选择随包发布的 Go 二进制并转发参数、退出码与信号。
3
+ 'use strict';
4
+ const { spawnSync } = require('child_process');
5
+ const path = require('path');
6
+ const fs = require('fs');
7
+
8
+ const key = `${process.platform}-${process.arch}`; // 例:linux-x64 / linux-arm64 / darwin-arm64
9
+ const bin = path.join(__dirname, `notify-${key}`);
10
+ if (!fs.existsSync(bin)) {
11
+ process.stderr.write(`claw-notify: 没有适用于 ${key} 的二进制(已提供 linux-x64 / linux-arm64 / darwin-arm64)\n`);
12
+ process.exit(2);
13
+ }
14
+ const result = spawnSync(bin, process.argv.slice(2), { stdio: 'inherit' });
15
+ if (result.error) {
16
+ process.stderr.write(`claw-notify: 启动失败: ${result.error.message}\n`);
17
+ process.exit(1);
18
+ }
19
+ process.exit(result.signal ? 1 : result.status);
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,25 @@
1
1
  {
2
2
  "name": "@hjxarthuratlas/claw-notify",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "2.0.2",
4
+ "description": "分级通知 CLI:投递到 ntfy 消息中枢,带事件目录、类别-等级约束、静音时段降级、去重与合规审计。Go 静态二进制,本包按平台选择可执行文件。",
5
+ "license": "MIT",
6
+ "repository": "git@github.com:HJXArthurAtlas/claw-notify.git",
7
+ "bin": {
8
+ "notify": "bin/claw-notify.js"
9
+ },
10
+ "files": [
11
+ "bin"
12
+ ],
13
+ "engines": {
14
+ "node": ">=18"
15
+ },
16
+ "keywords": [
17
+ "ntfy",
18
+ "notifications",
19
+ "alerting",
20
+ "agent"
21
+ ],
22
+ "publishConfig": {
23
+ "access": "public"
24
+ }
25
+ }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
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.