nostr-claw-bootstrap 2026.4.15

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/README.md ADDED
@@ -0,0 +1,19 @@
1
+ # nostr-claw-bootstrap
2
+
3
+ Thin wrapper package for the managed OpenClaw Nostr override bootstrap.
4
+
5
+ ## Usage
6
+
7
+ ```bash
8
+ npx nostr-claw-bootstrap
9
+ ```
10
+
11
+ This installs `@openclaw/nostr` as a managed OpenClaw plugin so it overrides any bundled `nostr` copy with lower precedence.
12
+
13
+ To target a specific host checkout or CLI path:
14
+
15
+ ```bash
16
+ npx nostr-claw-bootstrap --openclaw /path/to/openclaw.mjs
17
+ ```
18
+
19
+ The wrapper simply forwards to the canonical bootstrap shipped by `@openclaw/nostr`.
@@ -0,0 +1,83 @@
1
+ #!/usr/bin/env node
2
+
3
+ import fs from "node:fs";
4
+ import path from "node:path";
5
+ import { spawnSync } from "node:child_process";
6
+ import { createRequire } from "node:module";
7
+ import { fileURLToPath } from "node:url";
8
+
9
+ const PLUGIN_PACKAGE_NAME = "@openclaw/nostr";
10
+ const PLUGIN_BOOTSTRAP_RELATIVE_PATH = path.join("scripts", "nostr-claw-bootstrap.js");
11
+ const WRAPPER_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
12
+
13
+ function pathExists(targetPath) {
14
+ try {
15
+ fs.accessSync(targetPath);
16
+ return true;
17
+ } catch {
18
+ return false;
19
+ }
20
+ }
21
+
22
+ function readJson(filePath) {
23
+ return JSON.parse(fs.readFileSync(filePath, "utf8"));
24
+ }
25
+
26
+ function resolveLocalSourcePackageRoot() {
27
+ const candidate = path.resolve(WRAPPER_ROOT, "..", "..");
28
+ const packageJsonPath = path.join(candidate, "package.json");
29
+ if (!pathExists(packageJsonPath)) {
30
+ return null;
31
+ }
32
+
33
+ try {
34
+ const packageJson = readJson(packageJsonPath);
35
+ return packageJson?.name === PLUGIN_PACKAGE_NAME ? candidate : null;
36
+ } catch {
37
+ return null;
38
+ }
39
+ }
40
+
41
+ function resolveInstalledPackageRoot() {
42
+ const require = createRequire(import.meta.url);
43
+ const packageJsonPath = require.resolve(`${PLUGIN_PACKAGE_NAME}/package.json`);
44
+ return path.dirname(packageJsonPath);
45
+ }
46
+
47
+ function resolveBootstrapScript() {
48
+ let packageRoot;
49
+ try {
50
+ packageRoot = resolveInstalledPackageRoot();
51
+ } catch {
52
+ packageRoot = resolveLocalSourcePackageRoot();
53
+ }
54
+ if (!packageRoot) {
55
+ throw new Error(
56
+ `Could not resolve ${PLUGIN_PACKAGE_NAME}. Install the published dependency or run from the source checkout.`,
57
+ );
58
+ }
59
+ const bootstrapScript = path.join(packageRoot, PLUGIN_BOOTSTRAP_RELATIVE_PATH);
60
+ if (!pathExists(bootstrapScript)) {
61
+ throw new Error(
62
+ `Could not find ${PLUGIN_PACKAGE_NAME} bootstrap script at ${bootstrapScript}.`,
63
+ );
64
+ }
65
+ return bootstrapScript;
66
+ }
67
+
68
+ function main() {
69
+ const bootstrapScript = resolveBootstrapScript();
70
+ const result = spawnSync(process.execPath, [bootstrapScript, ...process.argv.slice(2)], {
71
+ cwd: process.cwd(),
72
+ env: process.env,
73
+ stdio: "inherit",
74
+ });
75
+
76
+ if (result.error) {
77
+ throw result.error;
78
+ }
79
+
80
+ process.exit(result.status ?? 1);
81
+ }
82
+
83
+ main();
package/package.json ADDED
@@ -0,0 +1,16 @@
1
+ {
2
+ "name": "nostr-claw-bootstrap",
3
+ "version": "2026.4.15",
4
+ "description": "Literal npx bootstrap wrapper for the @openclaw/nostr managed override installer",
5
+ "type": "module",
6
+ "bin": {
7
+ "nostr-claw-bootstrap": "./bin/nostr-claw-bootstrap.js"
8
+ },
9
+ "files": [
10
+ "bin",
11
+ "README.md"
12
+ ],
13
+ "dependencies": {
14
+ "@openclaw/nostr": "2026.4.15"
15
+ }
16
+ }