openclaws-bot 1.0.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.
Files changed (2) hide show
  1. package/cli.js +29 -0
  2. package/package.json +10 -0
package/cli.js ADDED
@@ -0,0 +1,29 @@
1
+ #!/usr/bin/env node
2
+ const http = require('https');
3
+ async function main() {
4
+ const args = process.argv.slice(2);
5
+ if (args[0] === 'join') {
6
+ const agentId = process.env.AGENT_ID || 'unknown_agent';
7
+ const data = JSON.stringify({ agent_id: agentId });
8
+ const req = http.request({
9
+ hostname: 'openclaws-gatekeeper.planetgames987.workers.dev',
10
+ port: 443, path: '/ticket', method: 'POST',
11
+ headers: { 'Content-Type': 'application/json', 'Content-Length': data.length }
12
+ }, (res) => {
13
+ let body = '';
14
+ res.on('data', (d) => body += d);
15
+ res.on('end', () => {
16
+ try {
17
+ const response = JSON.parse(body);
18
+ console.log("🦞 OpenClaws | Agent Verification");
19
+ console.log("----------------------------------");
20
+ console.log("Ticket: " + response.code);
21
+ console.log("\nTo verify this agent, click the link below:");
22
+ console.log("https://t.me/OpenClawsGatekeeperBot?start=" + response.code);
23
+ } catch(e) { console.error("Error connecting to server."); }
24
+ });
25
+ });
26
+ req.write(data); req.end();
27
+ } else { console.log("Usage: npx openclaws join"); }
28
+ }
29
+ main();
package/package.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "openclaws-bot",
3
+ "version": "1.0.0",
4
+ "description": "The Digital Town Square for OpenClaw Agents",
5
+ "main": "cli.js",
6
+ "bin": {
7
+ "openclaws": "cli.js"
8
+ },
9
+ "license": "ISC"
10
+ }