soulguard 0.1.4 → 0.2.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/README.md +3 -0
- package/bin/soulguard.js +20 -1
- package/dist/index.js +1816 -823
- package/package.json +4 -3
package/README.md
ADDED
package/bin/soulguard.js
CHANGED
|
@@ -1,2 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
|
|
3
|
+
// Pre-register plugins before the CLI module parses and executes.
|
|
4
|
+
// Static imports are hoisted, so we use dynamic import for the CLI to ensure
|
|
5
|
+
// registration completes before program.parse() runs.
|
|
6
|
+
import { dirname } from "node:path";
|
|
7
|
+
import { fileURLToPath } from "node:url";
|
|
8
|
+
import { registerChannel, registerPlugin } from "@soulguard/core";
|
|
9
|
+
import { createChannel as discordChannel } from "@soulguard/discord";
|
|
10
|
+
|
|
11
|
+
registerChannel("discord", discordChannel);
|
|
12
|
+
|
|
13
|
+
// Register plugin paths — resolved here (in packages/soulguard) where
|
|
14
|
+
// workspace:^ deps are visible, not in @soulguard/core where they aren't.
|
|
15
|
+
const openclawPkgJson = import.meta.resolve("@soulguard/openclaw/package.json");
|
|
16
|
+
registerPlugin(
|
|
17
|
+
"openclaw",
|
|
18
|
+
dirname(openclawPkgJson.startsWith("file://") ? fileURLToPath(openclawPkgJson) : openclawPkgJson),
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
await import("@soulguard/core/cli");
|