openclaw-plugin-helloworld 1.0.28 → 1.0.30

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/index.ts ADDED
@@ -0,0 +1,32 @@
1
+ // index.ts
2
+ import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
3
+ import { Type } from "@sinclair/typebox";
4
+
5
+ export default definePluginEntry({
6
+ id: "my-plugin",
7
+ name: "My Plugin",
8
+ description: "Adds a custom tool to OpenClaw",
9
+ register(api) {
10
+ api.registerHttpRoute({
11
+ path: "/acme/webhook",
12
+ auth: "plugin",
13
+ match: "exact",
14
+ handler: async (_req, res) => {
15
+ res.statusCode = 200;
16
+ // 2. Set the header so the browser knows it's HTML
17
+ res.setHeader("Content-Type", "text/html");
18
+ // 3. Write your HTML string and end the response
19
+ res.end(`
20
+ <!DOCTYPE html>
21
+ <html>
22
+ <body>
23
+ <h1>Hello from OpenClaw!</h1>
24
+ <p>This is a custom HTML response from your plugin.</p>
25
+ </body>
26
+ </html>
27
+ `);
28
+ return true;
29
+ },
30
+ });
31
+ }
32
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "openclaw-plugin-helloworld",
3
- "version": "1.0.28",
3
+ "version": "1.0.30",
4
4
  "description": "A simple Hello World plugin for OpenClaw.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -8,7 +8,7 @@
8
8
  "bump": "npm version patch --no-git-tag-version",
9
9
  "do_publish": "npm run bump && npm publish --access public",
10
10
  "do_install": "ssh $OPENCLAW_USER@$OPENCLAW_SERVER 'cd /home/'\"$OPENCLAW_USER\"' && source .profile && openclaw plugins uninstall openclaw-plugin-helloworld --force; openclaw plugins install openclaw-plugin-helloworld'",
11
- "do_uninstall": "ssh $OPENCLAW_USER@$OPENCLAW_SERVER 'cd /home/'\"$OPENCLAW_USER\"' && source .profile && openclaw plugins uninstall openclaw-plugin-helloworld ; rm -fr /home/'\"$OPENCLAW_USER\"'/.openclaw/extensions/openclaw-plugin-helloworld'",
11
+ "do_uninstall": "ssh $OPENCLAW_USER@$OPENCLAW_SERVER 'cd /home/'\"$OPENCLAW_USER\"' && source .profile && openclaw plugins uninstall openclaw-plugin-helloworld --force; rm -fr /home/'\"$OPENCLAW_USER\"'/.openclaw/extensions/openclaw-plugin-helloworld'",
12
12
  "do_plugin_allow": "ssh $OPENCLAW_USER@$OPENCLAW_SERVER 'cd /home/'\"$OPENCLAW_USER\"'/.openclaw/extensions/openclaw-plugin-helloworld && source /home/'\"$OPENCLAW_USER\"'/.profile && node ./scripts/do_plugin_allow.js'"
13
13
  },
14
14
  "keywords": [],
@@ -16,7 +16,14 @@
16
16
  "license": "MIT",
17
17
  "openclaw": {
18
18
  "extensions": [
19
- "./dist/index.js"
19
+ "./index.ts"
20
20
  ]
21
+ },
22
+ "dependencies": {
23
+ "@sinclair/typebox": "^0.34.49",
24
+ "openclaw": "^2026.3.24"
25
+ },
26
+ "devDependencies": {
27
+ "typescript": "^6.0.2"
21
28
  }
22
29
  }
package/dist/index.js DELETED
@@ -1,9 +0,0 @@
1
- // Simple Hello World module
2
-
3
- module.exports = function() {
4
-
5
- return 'Hello, world!';
6
-
7
- };
8
-
9
-
package/index.js DELETED
@@ -1,4 +0,0 @@
1
- // Simple Hello World module
2
- module.exports = function() {
3
- return 'Hello, world!';
4
- };